import{a as e,n as t,o as n,r}from"./rolldown-runtime-DAXXjFlN.js";import{Q as i}from"./ScrollBoard-D-MccN6c.js";var a=n(i(),1),o=(0,a.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`}),s=(0,a.createContext)({});function c(){return(0,a.useContext)(s).visualElement}var l=(0,a.createContext)(null),u=typeof document<`u`,d=u?a.useLayoutEffect:a.useEffect,f=(0,a.createContext)({strict:!1});function p(e,t,n,r){let i=c(),s=(0,a.useContext)(f),u=(0,a.useContext)(l),p=(0,a.useContext)(o).reducedMotion,m=(0,a.useRef)();r=r||s.renderer,!m.current&&r&&(m.current=r(e,{visualState:t,parent:i,props:n,presenceId:u?u.id:void 0,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:p}));let h=m.current;return d(()=>{h&&h.render()}),(0,a.useEffect)(()=>{h&&h.animationState&&h.animationState.animateChanges()}),d(()=>()=>h&&h.notify(`Unmount`),[]),h}function m(e){return typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function h(e,t,n){return(0,a.useCallback)(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n==`function`?n(r):m(n)&&(n.current=r))},[t])}function g(e){return typeof e==`string`||Array.isArray(e)}function _(e){return typeof e==`object`&&typeof e.start==`function`}var v=[`initial`,`animate`,`exit`,`whileHover`,`whileDrag`,`whileTap`,`whileFocus`,`whileInView`];function y(e){return _(e.animate)||v.some(t=>g(e[t]))}function b(e){return!!(y(e)||e.variants)}function x(e,t){if(y(e)){let{initial:t,animate:n}=e;return{initial:t===!1||g(t)?t:void 0,animate:g(n)?n:void 0}}return e.inherit===!1?{}:t}function S(e){let{initial:t,animate:n}=x(e,(0,a.useContext)(s));return(0,a.useMemo)(()=>({initial:t,animate:n}),[ee(t),ee(n)])}function ee(e){return Array.isArray(e)?e.join(` `):e}var C=e=>({isEnabled:t=>e.some(e=>!!t[e])}),w={measureLayout:C([`layout`,`layoutId`,`drag`]),animation:C([`animate`,`exit`,`variants`,`whileHover`,`whileTap`,`whileFocus`,`whileDrag`,`whileInView`]),exit:C([`exit`]),drag:C([`drag`,`dragControls`]),focus:C([`whileFocus`]),hover:C([`whileHover`,`onHoverStart`,`onHoverEnd`]),tap:C([`whileTap`,`onTap`,`onTapStart`,`onTapCancel`]),pan:C([`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`]),inView:C([`whileInView`,`onViewportEnter`,`onViewportLeave`])};function te(e){for(let t in e)t===`projectionNodeConstructor`?w.projectionNodeConstructor=e[t]:w[t].Component=e[t]}function T(e){let t=(0,a.useRef)(null);return t.current===null&&(t.current=e()),t.current}var E={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ne=1;function re(){return T(()=>{if(E.hasEverUpdated)return ne++})}var ie=(0,a.createContext)({}),ae=class extends a.Component{getSnapshotBeforeUpdate(){let{visualElement:e,props:t}=this.props;return e&&e.setProps(t),null}componentDidUpdate(){}render(){return this.props.children}},oe=(0,a.createContext)({}),se=Symbol.for(`motionComponentSymbol`);function ce({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:c}){e&&te(e);function l(l,d){let m={...(0,a.useContext)(o),...l,layoutId:le(l)},{isStatic:g}=m,_=null,v=S(l),y=g?void 0:re(),b=i(l,g);if(!g&&u){v.visualElement=p(c,b,m,t);let r=(0,a.useContext)(f).strict,i=(0,a.useContext)(oe);v.visualElement&&(_=v.visualElement.loadFeatures(m,r,e,y,n||w.projectionNodeConstructor,i))}return a.createElement(ae,{visualElement:v.visualElement,props:m},_,a.createElement(s.Provider,{value:v},r(c,l,y,h(b,v.visualElement,d),b,g,v.visualElement)))}let d=(0,a.forwardRef)(l);return d[se]=c,d}function le({layoutId:e}){let t=(0,a.useContext)(ie).id;return t&&e!==void 0?t+`-`+e:e}function ue(e){function t(t,n={}){return ce(e(t,n))}if(typeof Proxy>`u`)return t;let n=new Map;return new Proxy(t,{get:(e,r)=>(n.has(r)||n.set(r,t(r)),n.get(r))})}var de=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`text`,`tspan`,`use`,`view`];function fe(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(de.indexOf(e)>-1||/[A-Z]/.test(e))}var pe={};function me(e){Object.assign(pe,e)}var he=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],D=new Set(he);function ge(e,{layout:t,layoutId:n}){return D.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!pe[e]||e===`opacity`)}var O=e=>!!e?.getVelocity,_e={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},ve=(e,t)=>he.indexOf(e)-he.indexOf(t);function ye({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,a){let o=``;t.sort(ve);for(let n of t)o+=`${_e[n]||n}(${e[n]}) `;return n&&!e.z&&(o+=`translateZ(0)`),o=o.trim(),a?o=a(e,i?``:o):r&&i&&(o=`none`),o}function be(e){return e.startsWith(`--`)}var xe=(e,t)=>t&&typeof e==`number`?t.transform(e):e,Se=(e,t)=>n=>Math.max(Math.min(n,t),e),Ce=e=>e%1?Number(e.toFixed(5)):e,we=/(-)?([\d]*\.?[\d])+/g,Te=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Ee=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function De(e){return typeof e==`string`}var k={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Oe=Object.assign(Object.assign({},k),{transform:Se(0,1)}),ke=Object.assign(Object.assign({},k),{default:1}),Ae=e=>({test:t=>De(t)&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),A=Ae(`deg`),j=Ae(`%`),M=Ae(`px`),je=Ae(`vh`),Me=Ae(`vw`),Ne=Object.assign(Object.assign({},j),{parse:e=>j.parse(e)/100,transform:e=>j.transform(e*100)}),Pe=(e,t)=>n=>!!(De(n)&&Ee.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),Fe=(e,t,n)=>r=>{if(!De(r))return r;let[i,a,o,s]=r.match(we);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},N={test:Pe(`hsl`,`hue`),parse:Fe(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+j.transform(Ce(t))+`, `+j.transform(Ce(n))+`, `+Ce(Oe.transform(r))+`)`},Ie=Se(0,255),Le=Object.assign(Object.assign({},k),{transform:e=>Math.round(Ie(e))}),P={test:Pe(`rgb`,`red`),parse:Fe(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Le.transform(e)+`, `+Le.transform(t)+`, `+Le.transform(n)+`, `+Ce(Oe.transform(r))+`)`};function Re(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var ze={test:Pe(`#`),parse:Re,transform:P.transform},F={test:e=>P.test(e)||ze.test(e)||N.test(e),parse:e=>P.test(e)?P.parse(e):N.test(e)?N.parse(e):ze.parse(e),transform:e=>De(e)?e:e.hasOwnProperty(`red`)?P.transform(e):N.transform(e)},Be="${c}",Ve="${n}";function He(e){return isNaN(e)&&De(e)&&(e.match(we)?.length??0)+(e.match(Te)?.length??0)>0}function Ue(e){typeof e==`number`&&(e=`${e}`);let t=[],n=0,r=e.match(Te);r&&(n=r.length,e=e.replace(Te,Be),t.push(...r.map(F.parse)));let i=e.match(we);return i&&(e=e.replace(we,Ve),t.push(...i.map(k.parse))),{values:t,numColors:n,tokenised:e}}function We(e){return Ue(e).values}function Ge(e){let{values:t,numColors:n,tokenised:r}=Ue(e),i=t.length;return e=>{let t=r;for(let r=0;r<i;r++)t=t.replace(r<n?Be:Ve,r<n?F.transform(e[r]):Ce(e[r]));return t}}var Ke=e=>typeof e==`number`?0:e;function qe(e){let t=We(e);return Ge(e)(t.map(Ke))}var I={test:He,parse:We,createTransformer:Ge,getAnimatableNone:qe},Je=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Ye(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(we)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Je.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Xe=/([a-z-]*)\(.*?\)/g,Ze=Object.assign(Object.assign({},I),{getAnimatableNone:e=>{let t=e.match(Xe);return t?t.map(Ye).join(` `):e}}),Qe={...k,transform:Math.round},$e={borderWidth:M,borderTopWidth:M,borderRightWidth:M,borderBottomWidth:M,borderLeftWidth:M,borderRadius:M,radius:M,borderTopLeftRadius:M,borderTopRightRadius:M,borderBottomRightRadius:M,borderBottomLeftRadius:M,width:M,maxWidth:M,height:M,maxHeight:M,size:M,top:M,right:M,bottom:M,left:M,padding:M,paddingTop:M,paddingRight:M,paddingBottom:M,paddingLeft:M,margin:M,marginTop:M,marginRight:M,marginBottom:M,marginLeft:M,rotate:A,rotateX:A,rotateY:A,rotateZ:A,scale:ke,scaleX:ke,scaleY:ke,scaleZ:ke,skew:A,skewX:A,skewY:A,distance:M,translateX:M,translateY:M,translateZ:M,x:M,y:M,z:M,perspective:M,transformPerspective:M,opacity:Oe,originX:Ne,originY:Ne,originZ:M,zIndex:Qe,fillOpacity:Oe,strokeOpacity:Oe,numOctaves:Qe};function et(e,t,n,r){let{style:i,vars:a,transform:o,transformKeys:s,transformOrigin:c}=e;s.length=0;let l=!1,u=!1,d=!0;for(let e in t){let n=t[e];if(be(e)){a[e]=n;continue}let r=$e[e],f=xe(n,r);if(D.has(e)){if(l=!0,o[e]=f,s.push(e),!d)continue;n!==(r.default||0)&&(d=!1)}else e.startsWith(`origin`)?(u=!0,c[e]=f):i[e]=f}if(t.transform||(l||r?i.transform=ye(e,n,d,r):i.transform&&(i.transform=`none`)),u){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=c;i.transformOrigin=`${e} ${t} ${n}`}}var tt=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function nt(e,t,n){for(let r in t)!O(t[r])&&!ge(r,n)&&(e[r]=t[r])}function rt({transformTemplate:e},t,n){return(0,a.useMemo)(()=>{let r=tt();return et(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function it(e,t,n){let r=e.style||{},i={};return nt(i,r,e),Object.assign(i,rt(e,t,n)),e.transformValues?e.transformValues(i):i}function at(e,t,n){let r={},i=it(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout=`none`,i.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),r.style=i,r}var ot=[`animate`,`exit`,`variants`,`whileHover`,`whileTap`,`whileFocus`,`whileDrag`,`whileInView`],st=[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],ct=[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],lt=new Set([`initial`,`style`,`values`,`variants`,`transition`,`transformTemplate`,`transformValues`,`custom`,`inherit`,`layout`,`layoutId`,`layoutDependency`,`onLayoutAnimationStart`,`onLayoutAnimationComplete`,`onLayoutMeasure`,`onBeforeLayoutMeasure`,`onAnimationStart`,`onAnimationComplete`,`onUpdate`,`onDragStart`,`onDrag`,`onDragEnd`,`onMeasureDragConstraints`,`onDirectionLock`,`onDragTransitionEnd`,`drag`,`dragControls`,`dragListener`,`dragConstraints`,`dragDirectionLock`,`dragSnapToOrigin`,`_dragX`,`_dragY`,`dragElastic`,`dragMomentum`,`dragPropagation`,`dragTransition`,`onHoverStart`,`onHoverEnd`,`layoutScroll`,`whileInView`,`onViewportEnter`,`onViewportLeave`,`viewport`,...st,...ot,...ct]);function ut(e){return lt.has(e)}function dt(e){var t={};return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var ft=t((()=>{})),pt=r({default:()=>ht}),mt,ht,gt=t((()=>{ft(),mt=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,ht=dt(function(e){return mt.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91})})),_t=e=>!ut(e);function vt(e){e&&(_t=t=>t.startsWith(`on`)?!ut(t):e(t))}try{vt((gt(),e(pt)).default)}catch{}function yt(e,t,n){let r={};for(let i in e)(_t(i)||n===!0&&ut(i)||!t&&!ut(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}function bt(e,t,n){return typeof e==`string`?e:M.transform(t+n*e)}function xt(e,t,n){return`${bt(t,e.x,e.width)} ${bt(n,e.y,e.height)}`}var St={offset:`stroke-dashoffset`,array:`stroke-dasharray`},Ct={offset:`strokeDashoffset`,array:`strokeDasharray`};function wt(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?St:Ct;e[a.offset]=M.transform(-r);let o=M.transform(t),s=M.transform(n);e[a.array]=`${o} ${s}`}function Tt(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:a,pathSpacing:o=1,pathOffset:s=0,...c},l,u){et(e,c,l,u),e.attrs=e.style,e.style={};let{attrs:d,style:f,dimensions:p}=e;d.transform&&(p&&(f.transform=d.transform),delete d.transform),p&&(r!==void 0||i!==void 0||f.transform)&&(f.transformOrigin=xt(p,r===void 0?.5:r,i===void 0?.5:i)),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),a!==void 0&&wt(d,a,o,s,!1)}var Et=()=>({...tt(),attrs:{}});function Dt(e,t){let n=(0,a.useMemo)(()=>{let n=Et();return Tt(n,t,{enableHardwareAcceleration:!1},e.transformTemplate),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};nt(t,e.style,e),n.style={...t,...n.style}}return n}function Ot(e=!1){return(t,n,r,i,{latestValues:o},s)=>{let c=(fe(t)?Dt:at)(n,o,s),l={...yt(n,typeof t==`string`,e),...c,ref:i};return r&&(l[`data-projection-id`]=r),(0,a.createElement)(t,l)}}var kt=e=>e.replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase();function At(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(let t in n)e.style.setProperty(t,n[t])}var jt=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`]);function Mt(e,t,n,r){At(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(jt.has(n)?n:kt(n),t.attrs[n])}function Nt(e){let{style:t}=e,n={};for(let r in t)(O(t[r])||ge(r,e))&&(n[r]=t[r]);return n}function Pt(e){let t=Nt(e);for(let n in e)if(O(e[n])){let r=n===`x`||n===`y`?`attr`+n.toUpperCase():n;t[r]=e[n]}return t}function Ft(e,t,n,r={},i={}){return typeof t==`function`&&(t=t(n===void 0?e.custom:n,r,i)),typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`&&(t=t(n===void 0?e.custom:n,r,i)),t}var It=e=>Array.isArray(e),Lt=e=>!!(e&&typeof e==`object`&&e.mix&&e.toValue),Rt=e=>It(e)?e[e.length-1]||0:e;function zt(e){let t=O(e)?e.get():e;return Lt(t)?t.toValue():t}function Bt({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,a){let o={latestValues:Ht(r,i,a,e),renderState:t()};return n&&(o.mount=e=>n(r,e,o)),o}var Vt=e=>(t,n)=>{let r=(0,a.useContext)(s),i=(0,a.useContext)(l),o=()=>Bt(e,t,r,i);return n?o():T(o)};function Ht(e,t,n,r){let i={},a=r(e);for(let e in a)i[e]=zt(a[e]);let{initial:o,animate:s}=e,c=y(e),l=b(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u=u||o===!1;let d=u?s:o;return d&&typeof d!=`boolean`&&!_(d)&&(Array.isArray(d)?d:[d]).forEach(t=>{let n=Ft(e,t);if(!n)return;let{transitionEnd:r,transition:a,...o}=n;for(let e in o){let t=o[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let e in r)i[e]=r[e]}),i}var Ut={useVisualState:Vt({scrapeMotionValuesFromProps:Pt,createRenderState:Et,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox==`function`?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}Tt(n,r,{enableHardwareAcceleration:!1},e.transformTemplate),Mt(t,n)}})},Wt={useVisualState:Vt({scrapeMotionValuesFromProps:Nt,createRenderState:tt})};function Gt(e,{forwardMotionProps:t=!1},n,r,i){return{...fe(e)?Ut:Wt,preloadedFeatures:n,useRender:Ot(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var L;(function(e){e.Animate=`animate`,e.Hover=`whileHover`,e.Tap=`whileTap`,e.Drag=`whileDrag`,e.Focus=`whileFocus`,e.InView=`whileInView`,e.Exit=`exit`})(L||(L={}));function Kt(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function qt(e,t,n,r){(0,a.useEffect)(()=>{let i=e.current;if(n&&i)return Kt(i,t,n,r)},[e,t,n,r])}function Jt({whileFocus:e,visualElement:t}){let{animationState:n}=t;qt(t,`focus`,e?()=>{n&&n.setActive(L.Focus,!0)}:void 0),qt(t,`blur`,e?()=>{n&&n.setActive(L.Focus,!1)}:void 0)}function Yt(e){return typeof PointerEvent<`u`&&e instanceof PointerEvent?e.pointerType===`mouse`:e instanceof MouseEvent}function Xt(e){return!!e.touches}function Zt(e){return t=>{let n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}var Qt={pageX:0,pageY:0};function $t(e,t=`page`){let n=e.touches[0]||e.changedTouches[0]||Qt;return{x:n[t+`X`],y:n[t+`Y`]}}function en(e,t=`page`){return{x:e[t+`X`],y:e[t+`Y`]}}function tn(e,t=`page`){return{point:Xt(e)?$t(e,t):en(e,t)}}var nn=(e,t=!1)=>{let n=t=>e(t,tn(t));return t?Zt(n):n},rn=()=>u&&window.onpointerdown===null,an=()=>u&&window.ontouchstart===null,on=()=>u&&window.onmousedown===null,sn={pointerdown:`mousedown`,pointermove:`mousemove`,pointerup:`mouseup`,pointercancel:`mousecancel`,pointerover:`mouseover`,pointerout:`mouseout`,pointerenter:`mouseenter`,pointerleave:`mouseleave`},cn={pointerdown:`touchstart`,pointermove:`touchmove`,pointerup:`touchend`,pointercancel:`touchcancel`};function ln(e){return rn()?e:an()?cn[e]:on()?sn[e]:e}function R(e,t,n,r){return Kt(e,ln(t),nn(n,t===`pointerdown`),r)}function un(e,t,n,r){return qt(e,ln(t),n&&nn(n,t===`pointerdown`),r)}function dn(e){let t=null;return()=>t===null?(t=e,()=>{t=null}):!1}var fn=dn(`dragHorizontal`),pn=dn(`dragVertical`);function mn(e){let t=!1;if(e===`y`)t=pn();else if(e===`x`)t=fn();else{let e=fn(),n=pn();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function hn(){let e=mn(!0);return e?(e(),!1):!0}function gn(e,t,n){return(r,i)=>{!Yt(r)||hn()||(e.animationState&&e.animationState.setActive(L.Hover,t),n&&n(r,i))}}function _n({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){un(r,`pointerenter`,e||n?gn(r,!0,e):void 0,{passive:!e}),un(r,`pointerleave`,t||n?gn(r,!1,t):void 0,{passive:!t})}var vn=(e,t)=>t?e===t||vn(e,t.parentElement):!1;function yn(e){return(0,a.useEffect)(()=>()=>e(),[])}function bn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var xn=(e,t,n)=>Math.min(Math.max(n,e),t),Sn=.001,Cn=.01,wn=.05;function Tn({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,a,o=1-t;o=xn(wn,1,o),e=xn(Cn,10,e/1e3),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=On(t,o),c=Math.exp(-i);return Sn-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=On(t**2,o);return(-i(t)+Sn>0?-1:1)*((a-s)*c)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=Dn(i,a,s);if(e*=1e3,isNaN(c))return{stiffness:100,damping:10,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var En=12;function Dn(e,t,n){let r=n;for(let n=1;n<En;n++)r-=e(r)/t(r);return r}function On(e,t){return e*Math.sqrt(1-t*t)}var kn=[`duration`,`bounce`],An=[`stiffness`,`damping`,`mass`];function jn(e,t){return t.some(t=>e[t]!==void 0)}function Mn(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!jn(e,An)&&jn(e,kn)){let n=Tn(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function Nn(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,a=bn(e,[`from`,`to`,`restSpeed`,`restDelta`]);let o={done:!1,value:t},{stiffness:s,damping:c,mass:l,velocity:u,duration:d,isResolvedFromDuration:f}=Mn(a),p=Pn,m=Pn;function h(){let e=u?-(u/1e3):0,r=n-t,a=c/(2*Math.sqrt(s*l)),o=Math.sqrt(s/l)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),a<1){let t=On(o,a);p=i=>{let s=Math.exp(-a*o*i);return n-s*((e+a*o*r)/t*Math.sin(t*i)+r*Math.cos(t*i))},m=n=>{let i=Math.exp(-a*o*n);return a*o*i*(Math.sin(t*n)*(e+a*o*r)/t+r*Math.cos(t*n))-i*(Math.cos(t*n)*(e+a*o*r)-t*r*Math.sin(t*n))}}else if(a===1)p=t=>n-Math.exp(-o*t)*(r+(e+o*r)*t);else{let t=o*Math.sqrt(a*a-1);p=i=>{let s=Math.exp(-a*o*i),c=Math.min(t*i,300);return n-s*((e+a*o*r)*Math.sinh(c)+t*r*Math.cosh(c))/t}}}return h(),{next:e=>{let t=p(e);if(f)o.done=e>=d;else{let a=m(e)*1e3,s=Math.abs(a)<=r,c=Math.abs(n-t)<=i;o.done=s&&c}return o.value=o.done?n:t,o},flipTarget:()=>{u=-u,[t,n]=[n,t],h()}}}Nn.needsInterpolation=(e,t)=>typeof e==`string`||typeof t==`string`;var Pn=e=>0,Fn=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},z=(e,t,n)=>-n*e+n*t+e;function In(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ln({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=In(s,r,e+1/3),a=In(s,r,e),o=In(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}var Rn=(e,t,n)=>{let r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},zn=[ze,P,N],Bn=e=>zn.find(t=>t.test(e)),Vn=e=>`'${e}' is not an animatable color. Use the equivalent color code instead.`,Hn=(e,t)=>{let n=Bn(e),r=Bn(t);Vn(e),Vn(t);let i=n.parse(e),a=r.parse(t);n===N&&(i=Ln(i),n=P),r===N&&(a=Ln(a),r=P);let o=Object.assign({},i);return e=>{for(let t in o)t!==`alpha`&&(o[t]=Rn(i[t],a[t],e));return o.alpha=z(i.alpha,a.alpha,e),n.transform(o)}},Un=e=>typeof e==`number`,Wn=(e,t)=>n=>t(e(n)),Gn=(...e)=>e.reduce(Wn);function Kn(e,t){return Un(e)?n=>z(e,t,n):F.test(e)?Hn(e,t):Xn(e,t)}var qn=(e,t)=>{let n=[...e],r=n.length,i=e.map((e,n)=>Kn(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}},Jn=(e,t)=>{let n=Object.assign(Object.assign({},e),t),r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Kn(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}};function Yn(e){let t=I.parse(e),n=t.length,r=0,i=0,a=0;for(let e=0;e<n;e++)r||typeof t[e]==`number`?r++:t[e].hue===void 0?i++:a++;return{parsed:t,numNumbers:r,numRGB:i,numHSL:a}}var Xn=(e,t)=>{let n=I.createTransformer(t),r=Yn(e),i=Yn(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?Gn(qn(r.parsed,i.parsed),n):(`${e}${t}`,n=>`${n>0?t:e}`)},Zn=(e,t)=>n=>z(e,t,n);function Qn(e){if(typeof e==`number`)return Zn;if(typeof e==`string`)return F.test(e)?Hn:Xn;if(Array.isArray(e))return qn;if(typeof e==`object`)return Jn}function $n(e,t,n){let r=[],i=n||Qn(e[0]),a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=Gn(Array.isArray(t)?t[n]:t,a)),r.push(a)}return r}function er([e,t],[n]){return r=>n(Fn(e,t,r))}function tr(e,t){let n=e.length,r=n-1;return i=>{let a=0,o=!1;if(i<=e[0]?o=!0:i>=e[r]&&(a=r-1,o=!0),!o){let t=1;for(;t<n&&!(e[t]>i||t===r);t++);a=t-1}let s=Fn(e[a],e[a+1],i);return t[a](s)}}function nr(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;t.length,!r||!Array.isArray(r)||(r.length,a-1),e[0]>e[a-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());let o=$n(t,r,i),s=a===2?er(e,o):tr(e,o);return n?t=>s(xn(e[0],e[a-1],t)):s}var rr=e=>t=>1-e(1-t),ir=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ar=e=>t=>t**+e,or=e=>t=>t*t*((e+1)*t-e),sr=e=>{let t=or(e);return e=>(e*=2)<1?.5*t(e):.5*(2-2**(-10*(e-1)))},cr=1.525,lr=4/11,ur=8/11,dr=9/10,fr=e=>e,pr=ar(2),mr=rr(pr),hr=ir(pr),gr=e=>1-Math.sin(Math.acos(e)),_r=rr(gr),vr=ir(_r),yr=or(cr),br=rr(yr),xr=ir(yr),Sr=sr(cr),Cr=4356/361,wr=35442/1805,Tr=16061/1805,Er=e=>{if(e===1||e===0)return e;let t=e*e;return e<lr?7.5625*t:e<ur?9.075*t-9.9*e+3.4:e<dr?Cr*t-wr*e+Tr:10.8*e*e-20.52*e+10.72},Dr=rr(Er),Or=e=>e<.5?.5*(1-Er(1-e*2)):.5*Er(e*2-1)+.5;function kr(e,t){return e.map(()=>t||hr).splice(0,e.length-1)}function Ar(e){let t=e.length;return e.map((e,n)=>n===0?0:n/(t-1))}function jr(e,t){return e.map(e=>e*t)}function Mr({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){let a={done:!1,value:e},o=Array.isArray(t)?t:[e,t],s=jr(r&&r.length===o.length?r:Ar(o),i);function c(){return nr(s,o,{ease:Array.isArray(n)?n:kr(o,n)})}let l=c();return{next:e=>(a.value=l(e),a.done=e>=i,a),flipTarget:()=>{o.reverse(),l=c()}}}function Nr({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:a}){let o={done:!1,value:t},s=n*e,c=t+s,l=a===void 0?c:a(c);return l!==c&&(s=l-t),{next:e=>{let t=-s*Math.exp(-e/r);return o.done=!(t>i||t<-i),o.value=o.done?l:l+t,o},flipTarget:()=>{}}}var Pr={keyframes:Mr,spring:Nn,decay:Nr};function Fr(e){if(Array.isArray(e.to))return Mr;if(Pr[e.type])return Pr[e.type];let t=new Set(Object.keys(e));return t.has(`ease`)||t.has(`duration`)&&!t.has(`dampingRatio`)?Mr:t.has(`dampingRatio`)||t.has(`stiffness`)||t.has(`mass`)||t.has(`damping`)||t.has(`restSpeed`)||t.has(`restDelta`)?Nn:Mr}var Ir=1/60*1e3,Lr=typeof performance<`u`?()=>performance.now():()=>Date.now(),Rr=typeof window<`u`?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Lr()),Ir);function zr(e){let t=[],n=[],r=0,i=!1,a=!1,o=new WeakSet,s={schedule:(e,a=!1,s=!1)=>{let c=s&&i,l=c?t:n;return a&&o.add(e),l.indexOf(e)===-1&&(l.push(e),c&&i&&(r=t.length)),e},cancel:e=>{let t=n.indexOf(e);t!==-1&&n.splice(t,1),o.delete(e)},process:c=>{if(i){a=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let n=0;n<r;n++){let r=t[n];r(c),o.has(r)&&(s.schedule(r),e())}i=!1,a&&(a=!1,s.process(c))}};return s}var Br=40,Vr=!0,Hr=!1,Ur=!1,B={delta:0,timestamp:0},Wr=[`read`,`update`,`preRender`,`render`,`postRender`],Gr=Wr.reduce((e,t)=>(e[t]=zr(()=>Hr=!0),e),{}),V=Wr.reduce((e,t)=>{let n=Gr[t];return e[t]=(e,t=!1,r=!1)=>(Hr||Yr(),n.schedule(e,t,r)),e},{}),H=Wr.reduce((e,t)=>(e[t]=Gr[t].cancel,e),{}),Kr=Wr.reduce((e,t)=>(e[t]=()=>Gr[t].process(B),e),{}),qr=e=>Gr[e].process(B),Jr=e=>{Hr=!1,B.delta=Vr?Ir:Math.max(Math.min(e-B.timestamp,Br),1),B.timestamp=e,Ur=!0,Wr.forEach(qr),Ur=!1,Hr&&(Vr=!1,Rr(Jr))},Yr=()=>{Hr=!0,Vr=!0,Ur||Rr(Jr)},Xr=()=>B;function Zr(e,t,n=0){return e-t-n}function Qr(e,t,n=0,r=!0){return r?Zr(t+-e,t,n):t-(e-t)+n}function $r(e,t,n,r){return r?e>=t+n:e<=-n}var ei=e=>{let t=({delta:t})=>e(t);return{start:()=>V.update(t,!0),stop:()=>H.update(t)}};function ti(e){var t,{from:n,autoplay:r=!0,driver:i=ei,elapsed:a=0,repeat:o=0,repeatType:s=`loop`,repeatDelay:c=0,onPlay:l,onStop:u,onComplete:d,onRepeat:f,onUpdate:p}=e,m=bn(e,[`from`,`autoplay`,`driver`,`elapsed`,`repeat`,`repeatType`,`repeatDelay`,`onPlay`,`onStop`,`onComplete`,`onRepeat`,`onUpdate`]);let{to:h}=m,g,_=0,v=m.duration,y,b=!1,x=!0,S,ee=Fr(m);(t=ee).needsInterpolation?.call(t,n,h)&&(S=nr([0,100],[n,h],{clamp:!1}),n=0,h=100);let C=ee(Object.assign(Object.assign({},m),{from:n,to:h}));function w(){_++,s===`reverse`?(x=_%2==0,a=Qr(a,v,c,x)):(a=Zr(a,v,c),s===`mirror`&&C.flipTarget()),b=!1,f&&f()}function te(){g.stop(),d&&d()}function T(e){if(x||(e=-e),a+=e,!b){let e=C.next(Math.max(0,a));y=e.value,S&&(y=S(y)),b=x?e.done:a<=0}p?.(y),b&&(_===0&&(v??(v=a)),_<o?$r(a,v,c,x)&&w():te())}function E(){l?.(),g=i(T),g.start()}return r&&E(),{stop:()=>{u?.(),g.stop()}}}function ni(e,t){return t?1e3/t*e:0}function ri({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:a=750,bounceStiffness:o=500,bounceDamping:s=10,restDelta:c=1,modifyTarget:l,driver:u,onUpdate:d,onComplete:f,onStop:p}){let m;function h(e){return n!==void 0&&e<n||r!==void 0&&e>r}function g(e){return n===void 0?r:r===void 0||Math.abs(n-e)<Math.abs(r-e)?n:r}function _(e){m?.stop(),m=ti(Object.assign(Object.assign({},e),{driver:u,onUpdate:t=>{var n;d?.(t),(n=e.onUpdate)==null||n.call(e,t)},onComplete:f,onStop:p}))}function v(e){_(Object.assign({type:`spring`,stiffness:o,damping:s,restDelta:c},e))}if(h(e))v({from:e,velocity:t,to:g(e)});else{let r=i*t+e;l!==void 0&&(r=l(r));let o=g(r),s=o===n?-1:1,u,d;_({type:`decay`,from:e,velocity:t,timeConstant:a,power:i,restDelta:c,modifyTarget:l,onUpdate:h(r)?e=>{u=d,d=e,t=ni(e-u,Xr().delta),(s===1&&e>o||s===-1&&e<o)&&v({from:e,to:o,velocity:t})}:void 0})}return{stop:()=>m?.stop()}}var ii=e=>e.hasOwnProperty(`x`)&&e.hasOwnProperty(`y`),ai=e=>ii(e)&&e.hasOwnProperty(`z`),oi=(e,t)=>Math.abs(e-t);function si(e,t){if(Un(e)&&Un(t))return oi(e,t);if(ii(e)&&ii(t)){let n=oi(e.x,t.x),r=oi(e.y,t.y),i=ai(e)&&ai(t)?oi(e.z,t.z):0;return Math.sqrt(n**2+r**2+i**2)}}var ci=(e,t)=>1-3*t+3*e,li=(e,t)=>3*t-6*e,ui=e=>3*e,di=(e,t,n)=>((ci(t,n)*e+li(t,n))*e+ui(t))*e,fi=(e,t,n)=>3*ci(t,n)*e*e+2*li(t,n)*e+ui(t),pi=1e-7,mi=10;function hi(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=di(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>pi&&++s<mi);return o}var gi=8,_i=.001;function vi(e,t,n,r){for(let i=0;i<gi;++i){let i=fi(t,n,r);if(i===0)return t;let a=di(t,n,r)-e;t-=a/i}return t}var yi=11,bi=1/(yi-1);function xi(e,t,n,r){if(e===t&&n===r)return fr;let i=new Float32Array(yi);for(let t=0;t<yi;++t)i[t]=di(t*bi,e,n);function a(t){let r=0,a=1,o=yi-1;for(;a!==o&&i[a]<=t;++a)r+=bi;--a;let s=(t-i[a])/(i[a+1]-i[a]),c=r+s*bi,l=fi(c,e,n);return l>=_i?vi(t,c,e,n):l===0?c:hi(t,r,r+bi,e,n)}return e=>e===0||e===1?e:di(a(e),t,r)}function Si({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){let o=e||t||n||r,s=(0,a.useRef)(!1),c=(0,a.useRef)(null),l={passive:!(t||e||n||m)};function u(){c.current&&c.current(),c.current=null}function d(){return u(),s.current=!1,i.animationState&&i.animationState.setActive(L.Tap,!1),!hn()}function f(t,r){d()&&(vn(i.current,t.target)?e&&e(t,r):n&&n(t,r))}function p(e,t){d()&&n&&n(e,t)}function m(e,n){u(),!s.current&&(s.current=!0,c.current=Gn(R(window,`pointerup`,f,l),R(window,`pointercancel`,p,l)),i.animationState&&i.animationState.setActive(L.Tap,!0),t&&t(e,n))}un(i,`pointerdown`,o?m:void 0,l),yn(u)}var Ci=`production`,wi=new Set;function Ti(e,t,n){e||wi.has(t)||(console.warn(t),n&&console.warn(n),wi.add(t))}var Ei=new WeakMap,Di=new WeakMap,Oi=e=>{let t=Ei.get(e.target);t&&t(e)},ki=e=>{e.forEach(Oi)};function Ai({root:e,...t}){let n=e||document;Di.has(n)||Di.set(n,{});let r=Di.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(ki,{root:e,...t})),r[i]}function ji(e,t,n){let r=Ai(t);return Ei.set(e,n),r.observe(e),()=>{Ei.delete(e),r.unobserve(e)}}function Mi({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){let o=(0,a.useRef)({hasEnteredView:!1,isInView:!1}),s=!!(t||n||r);i.once&&o.current.hasEnteredView&&(s=!1),(typeof IntersectionObserver>`u`?Fi:Pi)(s,o.current,e,i)}var Ni={some:0,all:1};function Pi(e,t,n,{root:r,margin:i,amount:o=`some`,once:s}){(0,a.useEffect)(()=>{if(!e||!n.current)return;let a={root:r?.current,rootMargin:i,threshold:typeof o==`number`?o:Ni[o]};return ji(n.current,a,e=>{let{isIntersecting:r}=e;if(t.isInView===r||(t.isInView=r,s&&!r&&t.hasEnteredView))return;r&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(L.InView,r);let i=n.getProps(),a=r?i.onViewportEnter:i.onViewportLeave;a&&a(e)})},[e,r,i,o])}function Fi(e,t,n,{fallback:r=!0}){(0,a.useEffect)(()=>{!e||!r||(Ci!==`production`&&Ti(!1,`IntersectionObserver not available on this device. whileInView animations will trigger on mount.`),requestAnimationFrame(()=>{t.hasEnteredView=!0;let{onViewportEnter:e}=n.getProps();e&&e(null),n.animationState&&n.animationState.setActive(L.InView,!0)}))},[e])}var U=e=>t=>(e(t),null),Ii={inView:U(Mi),tap:U(Si),focus:U(Jt),hover:U(_n)};function Li(){let e=(0,a.useContext)(l);if(e===null)return[!0,null];let{isPresent:t,onExitComplete:n,register:r}=e,i=(0,a.useId)();return(0,a.useEffect)(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function Ri(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var zi=e=>e*1e3,Bi={linear:fr,easeIn:pr,easeInOut:hr,easeOut:mr,circIn:gr,circInOut:vr,circOut:_r,backIn:yr,backInOut:xr,backOut:br,anticipate:Sr,bounceIn:Dr,bounceInOut:Or,bounceOut:Er},Vi=e=>{if(Array.isArray(e)){e.length;let[t,n,r,i]=e;return xi(t,n,r,i)}else if(typeof e==`string`)return Bi[e],`${e}`,Bi[e];return e},Hi=e=>Array.isArray(e)&&typeof e[0]!=`number`,Ui=(e,t)=>e!==`zIndex`&&!!(typeof t==`number`||Array.isArray(t)||typeof t==`string`&&I.test(t)&&!t.startsWith(`url(`)),W=()=>({type:`spring`,stiffness:500,damping:25,restSpeed:10}),Wi=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Gi=()=>({type:`keyframes`,ease:`linear`,duration:.3}),Ki=e=>({type:`keyframes`,duration:.8,values:e}),qi={x:W,y:W,z:W,rotate:W,rotateX:W,rotateY:W,rotateZ:W,scaleX:Wi,scaleY:Wi,scale:Wi,opacity:Gi,backgroundColor:Gi,color:Gi,default:Wi},Ji=(e,t)=>{let n;return n=It(t)?Ki:qi[e]||qi.default,{to:t,...n(t)}},Yi={...$e,color:F,backgroundColor:F,outlineColor:F,fill:F,stroke:F,borderColor:F,borderTopColor:F,borderRightColor:F,borderBottomColor:F,borderLeftColor:F,filter:Ze,WebkitFilter:Ze},Xi=e=>Yi[e];function Zi(e,t){let n=Xi(e);return n!==Ze&&(n=I),n.getAnimatableNone?.call(n,t)}var Qi={current:!1};function $i(e,t){let n=performance.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(H.read(r),e(a-t))};return V.read(r,!0),()=>H.read(r)}function ea({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:c,...l}){return!!Object.keys(l).length}function ta({ease:e,times:t,yoyo:n,flip:r,loop:i,...a}){let o={...a};return t&&(o.offset=t),a.duration&&(o.duration=zi(a.duration)),a.repeatDelay&&(o.repeatDelay=zi(a.repeatDelay)),e&&(o.ease=Hi(e)?e.map(Vi):Vi(e)),a.type===`tween`&&(o.type=`keyframes`),(n||i||r)&&(n?o.repeatType=`reverse`:i?o.repeatType=`loop`:r&&(o.repeatType=`mirror`),o.repeat=i||n||r||a.repeat),a.type!==`spring`&&(o.type=`keyframes`),o}function na(e,t){return(ca(e,t)||{}).delay??e.delay??0}function ra(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function ia(e,t,n){return Array.isArray(t.to)&&e.duration===void 0&&(e.duration=.8),ra(t),ea(e)||(e={...e,...Ji(n,t.to)}),{...t,...ta(e)}}function aa(e,t,n,r,i){let a=ca(r,e)||{},o=a.from===void 0?t.get():a.from,s=Ui(e,n);o===`none`&&s&&typeof n==`string`?o=Zi(e,n):oa(o)&&typeof n==`string`?o=sa(n):!Array.isArray(n)&&oa(n)&&typeof o==`string`&&(n=sa(o));let c=Ui(e,o);`${e}${o}${n}${o}${o}${n}`;function l(){let r={from:o,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:e=>t.set(e)};return a.type===`inertia`||a.type===`decay`?ri({...r,...a}):ti({...ia(a,r,e),onUpdate:e=>{r.onUpdate(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{r.onComplete(),a.onComplete&&a.onComplete()}})}function u(){let e=Rt(n);return t.set(e),i(),a.onUpdate&&a.onUpdate(e),a.onComplete&&a.onComplete(),{stop:()=>{}}}return!c||!s||a.type===!1?u:l}function oa(e){return e===0||typeof e==`string`&&parseFloat(e)===0&&e.indexOf(` `)===-1}function sa(e){return typeof e==`number`?0:Zi(``,e)}function ca(e,t){return e[t]||e.default||e}function la(e,t,n,r={}){return Qi.current&&(r={type:!1}),t.start(i=>{let a,o=aa(e,t,n,r,i),s=na(r,e),c=()=>a=o(),l;return s?l=$i(c,zi(s)):c(),()=>{l&&l(),a&&a.stop()}})}var ua=e=>/^\-?\d*\.?\d+$/.test(e),da=e=>/^0[^.\s]+$/.test(e);function fa(e,t){e.indexOf(t)===-1&&e.push(t)}function pa(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var ma=class{constructor(){this.subscriptions=[]}add(e){return fa(this.subscriptions,e),()=>pa(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},ha=e=>!isNaN(parseFloat(e)),ga=class{constructor(e){this.version=`7.6.15`,this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new ma,this.velocityUpdateSubscribers=new ma,this.renderSubscribers=new ma,this.canTrackVelocity=!1,this.updateAndNotify=(e,t=!0)=>{this.prev=this.current,this.current=e;let{delta:n,timestamp:r}=Xr();this.lastUpdated!==r&&(this.timeDelta=n,this.lastUpdated=r,V.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.updateSubscribers.notify(this.current),this.velocityUpdateSubscribers.getSize()&&this.velocityUpdateSubscribers.notify(this.getVelocity()),t&&this.renderSubscribers.notify(this.current)},this.scheduleVelocityCheck=()=>V.postRender(this.velocityCheck),this.velocityCheck=({timestamp:e})=>{e!==this.lastUpdated&&(this.prev=this.current,this.velocityUpdateSubscribers.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=ha(this.current)}onChange(e){return this.updateSubscribers.add(e)}clearListeners(){this.updateSubscribers.clear()}onRenderRequest(e){return e(this.get()),this.renderSubscribers.add(e)}attach(e){this.passiveEffect=e}set(e,t=!0){!t||!this.passiveEffect?this.updateAndNotify(e,t):this.passiveEffect(e,this.updateAndNotify)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?ni(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.stopAnimation=e(t)}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}};function G(e){return new ga(e)}var _a=e=>t=>t.test(e),va=[k,M,j,A,Me,je,{test:e=>e===`auto`,parse:e=>e}],ya=e=>va.find(_a(e)),ba=[...va,F,I],xa=e=>ba.find(_a(e));function Sa(e){let t={};return e.values.forEach((e,n)=>t[n]=e.get()),t}function Ca(e){let t={};return e.values.forEach((e,n)=>t[n]=e.getVelocity()),t}function wa(e,t,n){let r=e.getProps();return Ft(r,t,n===void 0?r.custom:n,Sa(e),Ca(e))}function Ta(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,G(n))}function Ea(e,t){let n=wa(e,t),{transitionEnd:r={},transition:i={},...a}=n?e.makeTargetAnimatable(n,!1):{};a={...a,...r};for(let t in a)Ta(e,t,Rt(a[t]))}function Da(e,t,n){let r=Object.keys(t).filter(t=>!e.hasValue(t)),i=r.length;if(i)for(let a=0;a<i;a++){let i=r[a],o=t[i],s=null;Array.isArray(o)&&(s=o[0]),s===null&&(s=n[i]??e.readValue(i)??t[i]),s!=null&&(typeof s==`string`&&(ua(s)||da(s))?s=parseFloat(s):!xa(s)&&I.test(o)&&(s=Zi(i,o)),e.addValue(i,G(s)),n[i]===void 0&&(n[i]=s),s!==null&&e.setBaseTarget(i,s))}}function Oa(e,t){if(t)return(t[e]||t.default||t).from}function ka(e,t,n){let r={};for(let i in e){let e=Oa(i,t);r[i]=e===void 0?n.getValue(i)?.get():e}return r}function Aa(e){return!!(O(e)&&e.add)}function ja(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Ma(e,t,n));r=Promise.all(i)}else r=typeof t==`string`?Ma(e,t,n):Na(e,typeof t==`function`?wa(e,t,n.custom):t,n);return r.then(()=>e.notify(`AnimationComplete`,t))}function Ma(e,t,n={}){let r=wa(e,t,n.custom),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Na(e,r,n):()=>Promise.resolve(),o=e.variantChildren?.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Pa(e,t,a+r,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(t)}else return Promise.all([a(),o(n.delay)])}function Na(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...s}=e.makeTargetAnimatable(t),c=e.getValue(`willChange`);r&&(a=r);let l=[],u=i&&e.animationState?.getState()[i];for(let t in s){let r=e.getValue(t),i=s[t];if(!r||i===void 0||u&&Ia(u,t))continue;let o={delay:n,...a};e.shouldReduceMotion&&D.has(t)&&(o={...o,type:!1,delay:0});let d=la(t,r,i,o);Aa(c)&&(c.add(t),d=d.then(()=>c.remove(t))),l.push(d)}return Promise.all(l).then(()=>{o&&Ea(e,o)})}function Pa(e,t,n=0,r=0,i=1,a){let o=[],s=(e.variantChildren.size-1)*r,c=i===1?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(Fa).forEach((e,r)=>{o.push(Ma(e,t,{...a,delay:n+c(r)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(o)}function Fa(e,t){return e.sortNodePosition(t)}function Ia({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}var La=[L.Animate,L.InView,L.Focus,L.Hover,L.Tap,L.Drag,L.Exit],Ra=[...La].reverse(),za=La.length;function Ba(e){return t=>Promise.all(t.map(({animation:t,options:n})=>ja(e,t,n)))}function Va(e){let t=Ba(e),n=Ua(),r=!0,i=(t,n)=>{let r=wa(e,n);if(r){let{transition:e,transitionEnd:n,...i}=r;t={...t,...i,...n}}return t};function a(n){t=n(e)}function o(a,o){let s=e.getProps(),c=e.getVariantContext(!0)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<za;t++){let p=Ra[t],m=n[p],h=s[p]??c[p],v=g(h),y=p===o?m.isActive:null;y===!1&&(f=t);let b=h===c[p]&&h!==s[p]&&v;if(b&&r&&e.manuallyAnimateOnMount&&(b=!1),m.protectedKeys={...d},!m.isActive&&y===null||!h&&!m.prevProp||_(h)||typeof h==`boolean`)continue;let x=Ha(m.prevProp,h),S=x||p===o&&m.isActive&&!b&&v||t>f&&v,ee=Array.isArray(h)?h:[h],C=ee.reduce(i,{});y===!1&&(C={});let{prevResolvedValues:w={}}=m,te={...w,...C},T=e=>{S=!0,u.delete(e),m.needsAnimating[e]=!0};for(let e in te){let t=C[e],n=w[e];d.hasOwnProperty(e)||(t===n?t!==void 0&&u.has(e)?T(e):m.protectedKeys[e]=!0:It(t)&&It(n)?!Ri(t,n)||x?T(e):m.protectedKeys[e]=!0:t===void 0?u.add(e):T(e))}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),r&&e.blockInitialAnimation&&(S=!1),S&&!b&&l.push(...ee.map(e=>({animation:e,options:{type:p,...a}})))}if(u.size){let t={};u.forEach(n=>{let r=e.getBaseTarget(n);r!==void 0&&(t[n]=r)}),l.push({animation:t})}let p=!!l.length;return r&&s.initial===!1&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,p?t(l):Promise.resolve()}function s(t,r,i){var a;if(n[t].isActive===r)return Promise.resolve();(a=e.variantChildren)==null||a.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let s=o(i,t);for(let e in n)n[e].protectedKeys={};return s}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n}}function Ha(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!Ri(t,e):!1}function K(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ua(){return{[L.Animate]:K(!0),[L.InView]:K(),[L.Hover]:K(),[L.Tap]:K(),[L.Drag]:K(),[L.Focus]:K(),[L.Exit]:K()}}var Wa={animation:U(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Va(e)),_(t)&&(0,a.useEffect)(()=>t.subscribe(e),[t])}),exit:U(e=>{let{custom:t,visualElement:n}=e,[r,i]=Li(),o=(0,a.useContext)(l);(0,a.useEffect)(()=>{n.isPresent=r;let e=n.animationState&&n.animationState.setActive(L.Exit,!r,{custom:o&&o.custom||t});e&&!r&&e.then(i)},[r])})},Ga=class{constructor(e,t,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let e=Ja(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=si(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=Xr();this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{if(this.lastMoveEvent=e,this.lastMoveEventInfo=Ka(t,this.transformPagePoint),Yt(e)&&e.buttons===0){this.handlePointerUp(e,t);return}V.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r}=this.handlers,i=Ja(Ka(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},Xt(e)&&e.touches.length>1)return;this.handlers=t,this.transformPagePoint=n;let r=Ka(tn(e),this.transformPagePoint),{point:i}=r,{timestamp:a}=Xr();this.history=[{...i,timestamp:a}];let{onSessionStart:o}=t;o&&o(e,Ja(r,this.history)),this.removeListeners=Gn(R(window,`pointermove`,this.handlePointerMove),R(window,`pointerup`,this.handlePointerUp),R(window,`pointercancel`,this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),H.update(this.updatePoint)}};function Ka(e,t){return t?{point:t(e.point)}:e}function qa(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ja({point:e},t){return{point:e,delta:qa(e,Xa(t)),offset:qa(e,Ya(t)),velocity:Za(t,.1)}}function Ya(e){return e[0]}function Xa(e){return e[e.length-1]}function Za(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Xa(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>zi(t)));)n--;if(!r)return{x:0,y:0};let a=(i.timestamp-r.timestamp)/1e3;if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function q(e){return e.max-e.min}function Qa(e,t=0,n=.01){return Math.abs(e-t)<=n}function $a(e,t,n,r=.5){e.origin=r,e.originPoint=z(t.min,t.max,e.origin),e.scale=q(n)/q(t),(Qa(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=z(n.min,n.max,e.origin)-e.originPoint,(Qa(e.translate)||isNaN(e.translate))&&(e.translate=0)}function eo(e,t,n,r){$a(e.x,t.x,n.x,r?.originX),$a(e.y,t.y,n.y,r?.originY)}function to(e,t,n){e.min=n.min+t.min,e.max=e.min+q(t)}function no(e,t,n){to(e.x,t.x,n.x),to(e.y,t.y,n.y)}function ro(e,t,n){e.min=t.min-n.min,e.max=e.min+q(t)}function io(e,t,n){ro(e.x,t.x,n.x),ro(e.y,t.y,n.y)}function ao(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?z(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?z(n,e,r.max):Math.min(e,n)),e}function oo(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function so(e,{top:t,left:n,bottom:r,right:i}){return{x:oo(e.x,n,i),y:oo(e.y,t,r)}}function co(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function lo(e,t){return{x:co(e.x,t.x),y:co(e.y,t.y)}}function uo(e,t){let n=.5,r=q(e),i=q(t);return i>r?n=Fn(t.min,t.max-r,e.min):r>i&&(n=Fn(e.min,e.max-i,t.min)),xn(0,1,n)}function fo(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var po=.35;function mo(e=po){return e===!1?e=0:e===!0&&(e=po),{x:ho(e,`left`,`right`),y:ho(e,`top`,`bottom`)}}function ho(e,t,n){return{min:go(e,t),max:go(e,n)}}function go(e,t){return typeof e==`number`?e:e[t]??0}var _o=()=>({translate:0,scale:1,origin:0,originPoint:0}),vo=()=>({x:_o(),y:_o()}),yo=()=>({min:0,max:0}),J=()=>({x:yo(),y:yo()});function Y(e){return[e(`x`),e(`y`)]}function bo({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function xo({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function So(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Co(e){return e===void 0||e===1}function wo({scale:e,scaleX:t,scaleY:n}){return!Co(e)||!Co(t)||!Co(n)}function X(e){return wo(e)||To(e)||e.z||e.rotate||e.rotateX||e.rotateY}function To(e){return Eo(e.x)||Eo(e.y)}function Eo(e){return e&&e!==`0%`}function Do(e,t,n){return n+t*(e-n)}function Oo(e,t,n,r,i){return i!==void 0&&(e=Do(e,i,r)),Do(e,n,r)+t}function ko(e,t=0,n=1,r,i){e.min=Oo(e.min,t,n,r,i),e.max=Oo(e.max,t,n,r,i)}function Ao(e,{x:t,y:n}){ko(e.x,t.translate,t.scale,t.originPoint),ko(e.y,n.translate,n.scale,n.originPoint)}function jo(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++)a=n[s],o=a.projectionDelta,a.instance?.style?.display!==`contents`&&(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Q(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Ao(e,o)),r&&X(a.latestValues)&&Q(e,a.latestValues));t.x=Mo(t.x),t.y=Mo(t.y)}function Mo(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function Z(e,t){e.min+=t,e.max+=t}function No(e,t,[n,r,i]){let a=t[i]===void 0?.5:t[i],o=z(e.min,e.max,a);ko(e,t[n],t[r],o,t.scale)}var Po=[`x`,`scaleX`,`originX`],Fo=[`y`,`scaleY`,`originY`];function Q(e,t){No(e.x,t,Po),No(e.y,t,Fo)}function Io(e,t){return bo(So(e.getBoundingClientRect(),t))}function Lo(e,t,n){let r=Io(e,n),{scroll:i}=t;return i&&(Z(r.x,i.offset.x),Z(r.y,i.offset.y)),r}var Ro=new WeakMap,zo=class{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=J(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){if(this.visualElement.isPresent===!1)return;let n=e=>{this.stopAnimation(),t&&this.snapToCursor(tn(e,`page`).point)},r=(e,t)=>{var n;let{drag:r,dragPropagation:i,onDragStart:a}=this.getProps();r&&!i&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=mn(r),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Y(e=>{let t=this.getAxisMotionValue(e).get()||0;if(j.test(t)){let n=(this.visualElement.projection?.layout)?.layoutBox[e];n&&(t=q(n)*(parseFloat(t)/100))}this.originPoint[e]=t}),a?.(e,t),(n=this.visualElement.animationState)==null||n.setActive(L.Drag,!0))},i=(e,t)=>{let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openGlobalLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=Vo(o),this.currentDirection!==null&&i?.(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a?.(e,t)},a=(e,t)=>this.stop(e,t);this.panSession=new Ga(e,{onSessionStart:n,onStart:r,onMove:i,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,t){let n=this.isDragging;if(this.cancel(),!n)return;let{velocity:r}=t;this.startAnimation(r);let{onDragEnd:i}=this.getProps();i?.(e,t)}cancel(){var e,t;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(e=this.panSession)==null||e.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(t=this.visualElement.animationState)==null||t.setActive(L.Drag,!1)}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Bo(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=ao(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),{layout:n}=this.visualElement.projection||{},r=this.constraints;e&&m(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&n?this.constraints=so(n.layoutBox,e):this.constraints=!1,this.elastic=mo(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Y(e=>{this.getAxisMotionValue(e)&&(this.constraints[e]=fo(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!m(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=Lo(n,r.root,this.visualElement.getTransformPagePoint()),a=lo(r.layout.layoutBox,i);if(t){let e=t(xo(a));this.hasMutatedConstraints=!!e,e&&(a=bo(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=Y(o=>{if(!Bo(o,t,this.currentDirection))return;let c=s?.[o]??{};a&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){return la(e,this.getAxisMotionValue(e),0,t)}stopAnimation(){Y(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag`+e.toUpperCase();return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.getProps().initial?.[e]??0)}snapToCursor(e){Y(t=>{let{drag:n}=this.getProps();if(!Bo(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t];i.set(e[t]-z(n,a,.5))}})}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;let{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!m(n)||!r||!this.constraints)return;this.stopAnimation();let i={x:0,y:0};Y(e=>{let t=this.getAxisMotionValue(e);if(t){let n=t.get();i[e]=uo({min:n,max:n},this.constraints[e])}});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},``):`none`,(e=r.root)==null||e.updateScroll(),r.updateLayout(),this.resolveConstraints(),Y(e=>{if(!Bo(e,t,null))return;let n=this.getAxisMotionValue(e),{min:r,max:a}=this.constraints[e];n.set(z(r,a,i[e]))})}addListeners(){var e;if(!this.visualElement.current)return;Ro.set(this.visualElement,this);let t=this.visualElement.current,n=R(t,`pointerdown`,e=>{let{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),r=()=>{let{dragConstraints:e}=this.getProps();m(e)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&((e=i.root)==null||e.updateScroll(),i.updateLayout()),r();let o=Kt(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Y(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),n(),a(),s?.()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=po,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Bo(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Vo(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}function Ho(e){let{dragControls:t,visualElement:n}=e,r=T(()=>new zo(n));(0,a.useEffect)(()=>t&&t.subscribe(r),[r,t]),(0,a.useEffect)(()=>r.addListeners(),[r])}function Uo({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){let s=e||t||n||r,c=(0,a.useRef)(null),{transformPagePoint:l}=(0,a.useContext)(o),u={onSessionStart:r,onStart:t,onMove:e,onEnd:(e,t)=>{c.current=null,n&&n(e,t)}};(0,a.useEffect)(()=>{c.current!==null&&c.current.updateHandlers(u)});function d(e){c.current=new Ga(e,u,{transformPagePoint:l})}un(i,`pointerdown`,s&&d),yn(()=>c.current&&c.current.end())}var Wo={pan:U(Uo),drag:U(Ho)};function Go(e){return typeof e==`string`&&e.startsWith(`var(--`)}var Ko=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function qo(e){let t=Ko.exec(e);if(!t)return[,];let[,n,r]=t;return[n,r]}function Jo(e,t,n=1){`${e}`;let[r,i]=qo(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);return a?a.trim():Go(i)?Jo(i,t,n+1):i}function Yo(e,{...t},n){let r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(e=>{let t=e.get();if(!Go(t))return;let n=Jo(t,r);n&&e.set(n)});for(let e in t){let i=t[e];if(!Go(i))continue;let a=Jo(i,r);a&&(t[e]=a,n&&n[e]===void 0&&(n[e]=i))}return{target:t,transitionEnd:n}}var Xo=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,`x`,`y`]),Zo=e=>Xo.has(e),Qo=e=>Object.keys(e).some(Zo),$o=(e,t)=>{e.set(t,!1),e.set(t)},es=e=>e===k||e===M,ts;(function(e){e.width=`width`,e.height=`height`,e.left=`left`,e.right=`right`,e.top=`top`,e.bottom=`bottom`})(ts||(ts={}));var ns=(e,t)=>parseFloat(e.split(`, `)[t]),rs=(e,t)=>(n,{transform:r})=>{if(r===`none`||!r)return 0;let i=r.match(/^matrix3d\((.+)\)$/);if(i)return ns(i[1],t);{let t=r.match(/^matrix\((.+)\)$/);return t?ns(t[1],e):0}},is=new Set([`x`,`y`,`z`]),as=he.filter(e=>!is.has(e));function os(e){let t=[];return as.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t.length&&e.render(),t}var ss={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:rs(4,13),y:rs(5,14)},cs=(e,t,n)=>{let r=t.measureViewportBox(),i=t.current,a=getComputedStyle(i),{display:o}=a,s={};o===`none`&&t.setStaticValue(`display`,e.display||`block`),n.forEach(e=>{s[e]=ss[e](r,a)}),t.render();let c=t.measureViewportBox();return n.forEach(n=>{$o(t.getValue(n),s[n]),e[n]=ss[n](c,a)}),e},ls=(e,t,n={},r={})=>{t={...t},r={...r};let i=Object.keys(t).filter(Zo),a=[],o=!1,s=[];if(i.forEach(i=>{let c=e.getValue(i);if(!e.hasValue(i))return;let l=n[i],u=ya(l),d=t[i],f;if(It(d)){let e=d.length,t=+(d[0]===null);l=d[t],u=ya(l);for(let n=t;n<e;n++)f?ya(d[n]):f=ya(d[n])}else f=ya(d);if(u!==f)if(es(u)&&es(f)){let e=c.get();typeof e==`string`&&c.set(parseFloat(e)),typeof d==`string`?t[i]=parseFloat(d):Array.isArray(d)&&f===M&&(t[i]=d.map(parseFloat))}else u?.transform&&f?.transform&&(l===0||d===0)?l===0?c.set(f.transform(l)):t[i]=u.transform(d):(o||(a=os(e),o=!0),s.push(i),r[i]=r[i]===void 0?t[i]:r[i],$o(c,d))}),s.length){let n=s.indexOf(`height`)>=0?window.pageYOffset:null,i=cs(t,e,s);return a.length&&a.forEach(([t,n])=>{e.getValue(t).set(n)}),e.render(),u&&n!==null&&window.scrollTo({top:n}),{target:i,transitionEnd:r}}else return{target:t,transitionEnd:r}};function us(e,t,n,r){return Qo(t)?ls(e,t,n,r):{target:t,transitionEnd:r}}var ds=(e,t,n,r)=>{let i=Yo(e,t,r);return t=i.target,r=i.transitionEnd,us(e,t,n,r)},fs={current:null},ps={current:!1};function ms(){if(ps.current=!0,u)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>fs.current=e.matches;e.addListener(t),t()}else fs.current=!1}function hs(e,t,n){let{willChange:r}=t;for(let i in t){let a=t[i],o=n[i];if(O(a))e.addValue(i,a),Aa(r)&&r.add(i);else if(O(o))e.addValue(i,G(a)),Aa(r)&&r.remove(i);else if(o!==a)if(e.hasValue(i)){let t=e.getValue(i);!t.hasAnimated&&t.set(a)}else{let t=e.getStaticValue(i);e.addValue(i,G(t===void 0?a:t))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var gs=Object.keys(w),_s=gs.length,vs=[`AnimationStart`,`AnimationComplete`,`Update`,`Unmount`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],ys=class{constructor({parent:e,props:t,reducedMotionConfig:n,visualState:r},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,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=()=>V.render(this.render,!1,!0);let{latestValues:a,renderState:o}=r;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=o,this.parent=e,this.props=t,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=i,this.isControllingVariants=y(t),this.isVariantNode=b(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:s,...c}=this.scrapeMotionValuesFromProps(t);for(let e in c){let t=c[e];a[e]!==void 0&&O(t)&&(t.set(a[e],!1),Aa(s)&&s.add(e))}}scrapeMotionValuesFromProps(e){return{}}mount(e){this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent?.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),ps.current||ms(),this.shouldReduceMotion=this.reducedMotionConfig===`never`?!1:this.reducedMotionConfig===`always`||fs.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var e,t,n;(e=this.projection)==null||e.unmount(),H.update(this.notifyUpdate),H.render(this.render),this.valueSubscriptions.forEach(e=>e()),(t=this.removeFromVariantTree)==null||t.call(this),(n=this.parent)==null||n.children.delete(this);for(let e in this.events)this.events[e].clear();this.current=null}bindToMotionValue(e,t){let n=D.has(e),r=t.onChange(t=>{this.latestValues[e]=t,this.props.onUpdate&&V.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=t.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(e,()=>{r(),i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures(e,t,n,r,i,o){let s=[];for(let t=0;t<_s;t++){let n=gs[t],{isEnabled:r,Component:i}=w[n];r(e)&&i&&s.push((0,a.createElement)(i,{key:n,...e,visualElement:this}))}if(!this.projection&&i){this.projection=new i(r,this.latestValues,this.parent&&this.parent.projection);let{layoutId:t,layout:n,drag:a,dragConstraints:s,layoutScroll:c}=e;this.projection.setOptions({layoutId:t,layout:n,alwaysMeasureLayout:!!a||s&&m(s),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof n==`string`?n:`both`,initialPromotionConfig:o,layoutScroll:c})}return s}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):J()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}makeTargetAnimatable(e,t=!0){return this.makeTargetAnimatableFromInstance(e,this.props,t)}setProps(e){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=e;for(let t=0;t<vs.length;t++){let n=vs[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=hs(this,this.scrapeMotionValuesFromProps(e),this.prevMotionValues)}getProps(){return this.props}getVariant(e){return this.props.variants?.[e]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?.getClosestVariantNode()}getVariantContext(e=!1){if(e)return this.parent?.getVariantContext();if(!this.isControllingVariants){let e=this.parent?.getVariantContext()||{};return this.props.initial!==void 0&&(e.initial=this.props.initial),e}let t={};for(let e=0;e<xs;e++){let n=bs[e],r=this.props[n];(g(r)||r===!1)&&(t[n]=r)}return t}addVariantChild(e){var t;let n=this.getClosestVariantNode();if(n)return(t=n.variantChildren)==null||t.add(e),()=>n.variantChildren.delete(e)}addValue(e,t){this.hasValue(e)&&this.removeValue(e),this.values.set(e,t),this.latestValues[e]=t.get(),this.bindToMotionValue(e,t)}removeValue(e){var t;this.values.delete(e),(t=this.valueSubscriptions.get(e))==null||t(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=G(t),this.addValue(e,n)),n}readValue(e){return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n=typeof t==`string`||typeof t==`object`?Ft(this.props,t)?.[e]:void 0;if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!O(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new ma),this.events[e].add(t)}notify(e,...t){var n;(n=this.events[e])==null||n.notify(...t)}},bs=[`initial`,...La],xs=bs.length,Ss=class extends ys{sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?.[t]}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:t,...n},{transformValues:r},i){let a=ka(n,e||{},this);if(r&&(t&&(t=r(t)),n&&(n=r(n)),a&&(a=r(a))),i){Da(this,n,a);let e=ds(this,n,a,t);t=e.transitionEnd,n=e.target}return{transition:e,transitionEnd:t,...n}}};function Cs(e){return window.getComputedStyle(e)}var ws=class extends Ss{readValueFromInstance(e,t){if(D.has(t)){let e=Xi(t);return e&&e.default||0}else{let n=Cs(e),r=(be(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Io(e,t)}build(e,t,n,r){et(e,t,n,r.transformTemplate)}scrapeMotionValuesFromProps(e){return Nt(e)}renderInstance(e,t,n,r){At(e,t,n,r)}},Ts=class extends Ss{getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){return D.has(t)?Xi(t)?.default||0:(t=jt.has(t)?t:kt(t),e.getAttribute(t))}measureInstanceViewportBox(){return J()}scrapeMotionValuesFromProps(e){return Pt(e)}build(e,t,n,r){Tt(e,t,n,r.transformTemplate)}renderInstance(e,t,n,r){Mt(e,t,n,r)}},Es=(e,t)=>fe(e)?new Ts(t,{enableHardwareAcceleration:!1}):new ws(t,{enableHardwareAcceleration:!0});function Ds(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Os={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(M.test(e))e=parseFloat(e);else return e;return`${Ds(e,t.target.x)}% ${Ds(e,t.target.y)}%`}},ks=`_$css`,As={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=e.includes(`var(`),a=[];i&&(e=e.replace(Ko,e=>(a.push(e),ks)));let o=I.parse(e);if(o.length>5)return r;let s=I.createTransformer(e),c=typeof o[0]==`number`?0:1,l=n.x.scale*t.x,u=n.y.scale*t.y;o[0+c]/=l,o[1+c]/=u;let d=z(l,u,.5);typeof o[2+c]==`number`&&(o[2+c]/=d),typeof o[3+c]==`number`&&(o[3+c]/=d);let f=s(o);if(i){let e=0;f=f.replace(ks,()=>{let t=a[e];return e++,t})}return f}},js=class extends a.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;me(Ns),i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),E.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,a=n.projection;return a?(a.isPresent=i,r||e.layoutDependency!==t||t===void 0?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||V.postRender(()=>{a.getStack()?.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t?.group&&t.group.remove(r),n?.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e?.()}render(){return null}};function Ms(e){let[t,n]=Li(),r=(0,a.useContext)(ie);return a.createElement(js,{...e,layoutGroup:r,switchLayoutGroup:(0,a.useContext)(oe),isPresent:t,safeToRemove:n})}var Ns={borderRadius:{...Os,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:Os,borderTopRightRadius:Os,borderBottomLeftRadius:Os,borderBottomRightRadius:Os,boxShadow:As},Ps={measureLayout:Ms};function Fs(e,t,n={}){let r=O(e)?e:G(e);return la(``,r,t,n),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}var Is=[`TopLeft`,`TopRight`,`BottomLeft`,`BottomRight`],Ls=Is.length,Rs=e=>typeof e==`string`?parseFloat(e):e,zs=e=>typeof e==`number`||M.test(e);function Bs(e,t,n,r,i,a){i?(e.opacity=z(0,n.opacity??1,Hs(r)),e.opacityExit=z(t.opacity??1,0,Us(r))):a&&(e.opacity=z(t.opacity??1,n.opacity??1,r));for(let i=0;i<Ls;i++){let a=`border${Is[i]}Radius`,o=Vs(t,a),s=Vs(n,a);o===void 0&&s===void 0||(o||(o=0),s||(s=0),o===0||s===0||zs(o)===zs(s)?(e[a]=Math.max(z(Rs(o),Rs(s),r),0),(j.test(s)||j.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=z(t.rotate||0,n.rotate||0,r))}function Vs(e,t){return e[t]??e.borderRadius}var Hs=Ws(0,.5,_r),Us=Ws(.5,.95,fr);function Ws(e,t,n){return r=>r<e?0:r>t?1:n(Fn(e,t,r))}function Gs(e,t){e.min=t.min,e.max=t.max}function $(e,t){Gs(e.x,t.x),Gs(e.y,t.y)}function Ks(e,t,n,r,i){return e-=t,e=Do(e,1/n,r),i!==void 0&&(e=Do(e,1/i,r)),e}function qs(e,t=0,n=1,r=.5,i,a=e,o=e){if(j.test(t)&&(t=parseFloat(t),t=z(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=z(a.min,a.max,r);e===a&&(s-=t),e.min=Ks(e.min,t,n,s,i),e.max=Ks(e.max,t,n,s,i)}function Js(e,t,[n,r,i],a,o){qs(e,t[n],t[r],t[i],t.scale,a,o)}var Ys=[`x`,`scaleX`,`originX`],Xs=[`y`,`scaleY`,`originY`];function Zs(e,t,n,r){Js(e.x,t,Ys,n?.x,r?.x),Js(e.y,t,Xs,n?.y,r?.y)}function Qs(e){return e.translate===0&&e.scale===1}function $s(e){return Qs(e.x)&&Qs(e.y)}function ec(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function tc(e){return q(e.x)/q(e.y)}var nc=class{constructor(){this.members=[]}add(e){fa(this.members,e),e.scheduleRender()}remove(e){if(pa(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t=this.members.findIndex(t=>e===t);if(t===0)return!1;let n;for(let e=t;e>=0;e--){let t=this.members[e];if(t.isPresent!==!1){n=t;break}}return n?(this.promote(n),!0):!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:r}=e.options;r===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var t,n,r,i,a;(n=(t=e.options).onExitComplete)==null||n.call(t),(a=(r=e.resumingFrom)==null?void 0:(i=r.options).onExitComplete)==null||a.call(i)})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function rc(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y;if((i||a)&&(r=`translate3d(${i}px, ${a}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{rotate:e,rotateX:t,rotateY:i}=n;e&&(r+=`rotate(${e}deg) `),t&&(r+=`rotateX(${t}deg) `),i&&(r+=`rotateY(${i}deg) `)}let o=e.x.scale*t.x,s=e.y.scale*t.y;return(o!==1||s!==1)&&(r+=`scale(${o}, ${s})`),r||`none`}var ic=(e,t)=>e.depth-t.depth,ac=class{constructor(){this.children=[],this.isDirty=!1}add(e){fa(this.children,e),this.isDirty=!0}remove(e){pa(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ic),this.isDirty=!1,this.children.forEach(e)}},oc=[``,`X`,`Y`,`Z`],sc=1e3,cc=0;function lc({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e,n={},r=t?.()){this.id=cc++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isTransformDirty=!1,this.isProjectionDirty=!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.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(fc),this.nodes.forEach(_c),this.nodes.forEach(vc)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=e,this.latestValues=n,this.root=r?r.root||r:this,this.path=r?[...r.path,r]:[],this.parent=r,this.depth=r?r.depth+1:0,e&&this.root.registerPotentialNode(e,this);for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new ac)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new ma),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){this.eventHandlers.get(e)?.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}registerPotentialNode(e,t){this.potentialNodes.set(e,t)}mount(t,n=!1){var r;if(this.instance)return;this.isSVG=t instanceof SVGElement&&t.tagName!==`svg`,this.instance=t;let{layoutId:i,layout:a,visualElement:o}=this.options;if(o&&!o.current&&o.mount(t),this.root.nodes.add(this),(r=this.parent)==null||r.children.add(this),this.elementId&&this.root.potentialNodes.delete(this.elementId),n&&(a||i)&&(this.isLayoutDirty=!0),e){let n,r=()=>this.root.updateBlockedByResize=!1;e(t,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=$i(r,250),E.hasAnimatedSinceResize&&(E.hasAnimatedSinceResize=!1,this.nodes.forEach(gc))})}i&&this.root.registerSharedNode(i,this),this.options.animate!==!1&&o&&(i||a)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{var i,a;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let s=this.options.transition??o.getDefaultTransition()??Tc,{onLayoutAnimationStart:c,onLayoutAnimationComplete:l}=o.getProps(),u=!this.targetLayout||!ec(this.targetLayout,r)||n,d=!t&&n;if(this.resumeFrom?.instance||d||t&&(u||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,d);let t={...ca(s,`layout`),onPlay:c,onComplete:l};o.shouldReduceMotion&&(t.delay=0,t.type=!1),this.startAnimation(t)}else!t&&this.animationProgress===0&&gc(this),this.isLead()&&((a=(i=this.options).onExitComplete)==null||a.call(i));this.targetLayout=r})}unmount(){var e,t;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(e=this.getStack())==null||e.remove(this),(t=this.parent)==null||t.children.delete(this),this.instance=void 0,H.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent?.isTreeAnimationBlocked()||!1}startUpdate(){var e;this.isUpdateBlocked()||(this.isUpdating=!0,(e=this.nodes)==null||e.forEach(yc),this.animationId++)}willUpdate(e=!0){var t,n;if(this.root.isUpdateBlocked()){(n=(t=this.options).onExitComplete)==null||n.call(t);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,t.updateScroll(`snapshot`)}let{layoutId:r,layout:i}=this.options;if(r===void 0&&!i)return;let a=this.options.visualElement?.getProps().transformTemplate;this.prevTransformTemplateValue=a?.(this.latestValues,``),this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}didUpdate(){if(this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(mc);return}this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(Ec),this.potentialNodes.clear()),this.nodes.forEach(hc),this.nodes.forEach(uc),this.nodes.forEach(dc),this.clearAllSnapshots(),Kr.update(),Kr.preRender(),Kr.render())}clearAllSnapshots(){this.nodes.forEach(pc),this.sharedNodes.forEach(bc)}scheduleUpdateProjection(){V.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){V.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var e;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let t=this.layout;this.layout=this.measure(!1),this.layoutCorrected=J(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox),(e=this.options.visualElement)==null||e.notify(`LayoutMeasure`,this.layout.layoutBox,t?.layoutBox)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&(this.scroll={animationId:this.root.animationId,phase:e,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform,t=this.projectionDelta&&!$s(this.projectionDelta),n=this.options.visualElement?.getProps().transformTemplate,r=n?.(this.latestValues,``),a=r!==this.prevTransformTemplateValue;e&&(t||X(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),Oc(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return J();let t=e.measureViewportBox(),{scroll:n}=this.root;return n&&(Z(t.x,n.offset.x),Z(t.y,n.offset.y)),t}removeElementScroll(e){let t=J();$(t,e);for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;if(r!==this.root&&i&&a.layoutScroll){if(i.isRoot){$(t,e);let{scroll:n}=this.root;n&&(Z(t.x,-n.offset.x),Z(t.y,-n.offset.y))}Z(t.x,i.offset.x),Z(t.y,i.offset.y)}}return t}applyTransform(e,t=!1){let n=J();$(n,e);for(let e=0;e<this.path.length;e++){let r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Q(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),X(r.latestValues)&&Q(n,r.latestValues)}return X(this.latestValues)&&Q(n,this.latestValues),n}removeTransform(e){let t=J();$(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!n.instance||!X(n.latestValues))continue;wo(n.latestValues)&&n.updateSnapshot();let r=J();$(r,n.measurePageBox()),Zs(t,n.latestValues,n.snapshot?.layoutBox,r)}return X(this.latestValues)&&Zs(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.isProjectionDirty=!0,this.root.scheduleUpdateProjection()}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.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}resolveTargetDelta(){let e=this.getLead();if(this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),!this.isProjectionDirty&&!this.attemptToResolveRelativeTarget)return;let{layout:t,layoutId:n}=this.options;if(!(!this.layout||!(t||n))){if(!this.targetDelta&&!this.relativeTarget){let e=this.getClosestProjectingParent();e&&e.layout?(this.relativeParent=e,this.relativeTarget=J(),this.relativeTargetOrigin=J(),io(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),$(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=J(),this.targetWithTransforms=J()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent?.target?no(this.target,this.relativeTarget,this.relativeParent.target):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):$(this.target,this.layout.layoutBox),Ao(this.target,this.targetDelta)):$(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;let e=this.getClosestProjectingParent();e&&!!e.resumingFrom==!!this.resumingFrom&&!e.options.layoutScroll&&e.target?(this.relativeParent=e,this.relativeTarget=J(),this.relativeTargetOrigin=J(),io(this.relativeTargetOrigin,this.target,e.target),$(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||wo(this.parent.latestValues)||To(this.parent.latestValues)))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()}calcProjection(){let{isProjectionDirty:e,isTransformDirty:t}=this;this.isProjectionDirty=this.isTransformDirty=!1;let n=this.getLead(),r=!!this.resumingFrom||this!==n,i=!0;if(e&&(i=!1),r&&t&&(i=!1),i)return;let{layout:a,layoutId:o}=this.options;if(this.isTreeAnimating=!!(this.parent?.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(a||o))return;$(this.layoutCorrected,this.layout.layoutBox),jo(this.layoutCorrected,this.treeScale,this.path,r);let{target:s}=n;if(!s)return;this.projectionDelta||(this.projectionDelta=vo(),this.projectionDeltaWithTransform=vo());let c=this.treeScale.x,l=this.treeScale.y,u=this.projectionTransform;eo(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.projectionTransform=rc(this.projectionDelta,this.treeScale),(this.projectionTransform!==u||this.treeScale.x!==c||this.treeScale.y!==l)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t,n,r;(n=(t=this.options).scheduleRender)==null||n.call(t),e&&((r=this.getStack())==null||r.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?.latestValues||{},i={...this.latestValues},a=vo();this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!t;let o=J(),s=n?.source!==this.layout?.source,c=(this.getStack()?.members.length||0)<=1,l=!!(s&&!c&&this.options.crossfade===!0&&!this.path.some(wc));this.animationProgress=0,this.mixTargetDelta=t=>{let n=t/1e3;xc(a.x,e.x,n),xc(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent?.layout&&(io(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Cc(this.relativeTarget,this.relativeTargetOrigin,o,n)),s&&(this.animationValues=i,Bs(i,r,this.latestValues,n,l,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(0)}startAnimation(e){var t,n;this.notifyListeners(`animationStart`),(t=this.currentAnimation)==null||t.stop(),this.resumingFrom&&((n=this.resumingFrom.currentAnimation)==null||n.stop()),this.pendingAnimation&&(H.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=V.update(()=>{E.hasAnimatedSinceResize=!0,this.currentAnimation=Fs(0,sc,{...e,onUpdate:t=>{var n;this.mixTargetDelta(t),(n=e.onUpdate)==null||n.call(e,t)},onComplete:()=>{var t;(t=e.onComplete)==null||t.call(e),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var e;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(e=this.getStack())==null||e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){var e;this.currentAnimation&&((e=this.mixTargetDelta)==null||e.call(this,sc),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&kc(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||J();let t=q(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=q(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}$(t,n),Q(t,i),eo(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){var n;this.sharedNodes.has(e)||this.sharedNodes.set(e,new nc),this.sharedNodes.get(e).add(t),t.promote({transition:t.options.initialPromotionConfig?.transition,preserveFollowOpacity:((n=t.options.initialPromotionConfig)?.shouldPreserveFollowOpacity)?.call(n,t)})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(t=!0),!t)return;let r={};for(let t=0;t<oc.length;t++){let i=`rotate`+oc[t];n[i]&&(r[i]=n[i],e.setStaticValue(i,0))}e?.render();for(let t in r)e.setStaticValue(t,r[t]);e.scheduleRender()}getProjectionStyles(e={}){let t={};if(!this.instance||this.isSVG)return t;if(this.isVisible)t.visibility=``;else return{visibility:`hidden`};let n=this.options.visualElement?.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,t.opacity=``,t.pointerEvents=zt(e.pointerEvents)||``,t.transform=n?n(this.latestValues,``):`none`,t;let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){let t={};return this.options.layoutId&&(t.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,t.pointerEvents=zt(e.pointerEvents)||``),this.hasProjected&&!X(this.latestValues)&&(t.transform=n?n({},``):`none`,this.hasProjected=!1),t}let i=r.animationValues||r.latestValues;this.applyTransformsToTarget(),t.transform=rc(this.projectionDeltaWithTransform,this.treeScale,i),n&&(t.transform=n(i,t.transform));let{x:a,y:o}=this.projectionDelta;t.transformOrigin=`${a.origin*100}% ${o.origin*100}% 0`,r.animationValues?t.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:t.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let e in pe){if(i[e]===void 0)continue;let{correct:n,applyTo:a}=pe[e],o=n(i[e],r);if(a){let e=a.length;for(let n=0;n<e;n++)t[a[n]]=o}else t[e]=o}return this.options.layoutId&&(t.pointerEvents=r===this?zt(e.pointerEvents)||``:`none`),t}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(mc),this.root.sharedNodes.clear()}}}function uc(e){e.updateLayout()}function dc(e){var t,n;let r=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&r&&e.hasListeners(`didUpdate`)){let{layoutBox:t,measuredBox:n}=e.layout,{animationType:i}=e.options,a=r.source!==e.layout.source;i===`size`?Y(e=>{let n=a?r.measuredBox[e]:r.layoutBox[e],i=q(n);n.min=t[e].min,n.max=n.min+i}):kc(i,r.layoutBox,t)&&Y(e=>{let n=a?r.measuredBox[e]:r.layoutBox[e],i=q(t[e]);n.max=n.min+i});let o=vo();eo(o,t,r.layoutBox);let s=vo();a?eo(s,e.applyTransform(n,!0),r.measuredBox):eo(s,t,r.layoutBox);let c=!$s(o),l=!1;if(!e.resumeFrom){let n=e.getClosestProjectingParent();if(n&&!n.resumeFrom){let{snapshot:e,layout:i}=n;if(e&&i){let n=J();io(n,r.layoutBox,e.layoutBox);let a=J();io(a,t,i.layoutBox),ec(n,a)||(l=!0)}}}e.notifyListeners(`didUpdate`,{layout:t,snapshot:r,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeTargetChanged:l})}else e.isLead()&&((n=(t=e.options).onExitComplete)==null||n.call(t));e.options.transition=void 0}function fc(e){e.isProjectionDirty||(e.isProjectionDirty=!!(e.parent&&e.parent.isProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=!!(e.parent&&e.parent.isTransformDirty))}function pc(e){e.clearSnapshot()}function mc(e){e.clearMeasurements()}function hc(e){let{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function gc(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function _c(e){e.resolveTargetDelta()}function vc(e){e.calcProjection()}function yc(e){e.resetRotation()}function bc(e){e.removeLeadSnapshot()}function xc(e,t,n){e.translate=z(t.translate,0,n),e.scale=z(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Sc(e,t,n,r){e.min=z(t.min,n.min,r),e.max=z(t.max,n.max,r)}function Cc(e,t,n,r){Sc(e.x,t.x,n.x,r),Sc(e.y,t.y,n.y,r)}function wc(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Tc={duration:.45,ease:[.4,0,.1,1]};function Ec(e,t){let n=e.root;for(let t=e.path.length-1;t>=0;t--)if(e.path[t].instance){n=e.path[t];break}let r=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);r&&e.mount(r,!0)}function Dc(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function Oc(e){Dc(e.x),Dc(e.y)}function kc(e,t,n){return e===`position`||e===`preserve-aspect`&&!Qa(tc(t),tc(n),.2)}var Ac=lc({attachResizeListener:(e,t)=>Kt(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),jc={current:void 0},Mc=lc({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!jc.current){let e=new Ac(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),jc.current=e}return jc.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Nc={...Wa,...Ii,...Wo,...Ps},Pc=ue((e,t)=>Gt(e,t,Nc,Es,Mc));export{Ci as a,ie as c,l as d,o as f,Ti as i,T as l,Fs as n,V as o,G as r,yn as s,Pc as t,d as u};