import{j as dt}from"./jsx-runtime-D_zvdyIk.js";import{r as p}from"./chunk-EPOLDU6W-COUfDpEH.js";const ye=p.createContext({});function be(t){const e=p.useRef(null);return e.current===null&&(e.current=t()),e.current}const Bt=typeof window<"u",Ve=Bt?p.useLayoutEffect:p.useEffect,Nt=p.createContext(null);function we(t,e){t.indexOf(e)===-1&&t.push(e)}function Me(t,e){const s=t.indexOf(e);s>-1&&t.splice(s,1)}const Lt=(t,e,s)=>s>e?e:s/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),ve=t=>/^0[^.\s]+$/u.test(t),xe=t=>t;class Ot{constructor(){this.subscriptions=[]}add(e){return we(this.subscriptions,e),()=>Me(this.subscriptions,e)}notify(e,s,n){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,s,n);else for(let i=0;i{const b=l&&r?s:n;return d&&o.add(f),b.has(f)||b.add(f),f},cancel:f=>{n.delete(f),o.delete(f)},process:f=>{if(u=f,r){i=!0;return}r=!0,[s,n]=[n,s],s.forEach(c),s.clear(),r=!1,i&&(i=!1,h.process(f))}};return h}const Pe=40;function Dt(t,e){let s=!1,n=!0;const r={delta:0,timestamp:0,isProcessing:!1},i=()=>s=!0,o=k.reduce((g,S)=>(g[S]=Te(i),g),{}),{setup:u,read:c,resolveKeyframes:h,preUpdate:f,update:d,preRender:l,render:m,postRender:b}=o,V=()=>{const g=G.useManualTiming?r.timestamp:performance.now();s=!1,G.useManualTiming||(r.delta=n?1e3/60:Math.max(Math.min(g-r.timestamp,Pe),1)),r.timestamp=g,r.isProcessing=!0,u.process(r),c.process(r),h.process(r),f.process(r),d.process(r),l.process(r),m.process(r),b.process(r),r.isProcessing=!1,s&&e&&(n=!1,t(V))},M=()=>{s=!0,n=!0,r.isProcessing||t(V)};return{schedule:k.reduce((g,S)=>{const he=o[S];return g[S]=(pe,me=!1,ge=!1)=>(s||M(),he.schedule(pe,me,ge)),g},{}),cancel:g=>{for(let S=0;S($===void 0&&B.set(pt.isProcessing||G.useManualTiming?pt.timestamp:performance.now()),$),set:t=>{$=t,queueMicrotask(Ae)}},jt=t=>e=>typeof e=="string"&&e.startsWith(t),Re=jt("--"),Fe=jt("var(--"),pn=t=>Fe(t)?Ee.test(t.split("/*")[0].trim()):!1,Ee=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function mn(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const F={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},O={...F,transform:t=>Lt(0,1,t)},W={...F,default:1},N=t=>Math.round(t*1e5)/1e5,at=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ie(t){return t==null}const Be=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ut=(t,e)=>s=>!!(typeof s=="string"&&Be.test(s)&&s.startsWith(t)||e&&!Ie(s)&&Object.prototype.hasOwnProperty.call(s,e)),kt=(t,e,s)=>n=>{if(typeof n!="string")return n;const[r,i,o,u]=n.match(at);return{[t]:parseFloat(r),[e]:parseFloat(i),[s]:parseFloat(o),alpha:u!==void 0?parseFloat(u):1}},Ne=t=>Lt(0,255,t),z={...F,transform:t=>Math.round(Ne(t))},I={test:ut("rgb","red"),parse:kt("red","green","blue"),transform:({red:t,green:e,blue:s,alpha:n=1})=>"rgba("+z.transform(t)+", "+z.transform(e)+", "+z.transform(s)+", "+N(O.transform(n))+")"};function Le(t){let e="",s="",n="",r="";return t.length>5?(e=t.substring(1,3),s=t.substring(3,5),n=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),s=t.substring(2,3),n=t.substring(3,4),r=t.substring(4,5),e+=e,s+=s,n+=n,r+=r),{red:parseInt(e,16),green:parseInt(s,16),blue:parseInt(n,16),alpha:r?parseInt(r,16)/255:1}}const mt={test:ut("#"),parse:Le,transform:I.transform},D=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),x=D("deg"),A=D("%"),a=D("px"),Oe=D("vh"),De=D("vw"),gt={...A,parse:t=>A.parse(t)/100,transform:t=>A.transform(t*100)},K={test:ut("hsl","hue"),parse:kt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:s,alpha:n=1})=>"hsla("+Math.round(t)+", "+A.transform(N(e))+", "+A.transform(N(s))+", "+N(O.transform(n))+")"},y={test:t=>I.test(t)||mt.test(t)||K.test(t),parse:t=>I.test(t)?I.parse(t):K.test(t)?K.parse(t):mt.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?I.transform(t):K.transform(t),getAnimatableNone:t=>{const e=y.parse(t);return e.alpha=0,y.transform(e)}},je=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ke(t){var e,s;return isNaN(t)&&typeof t=="string"&&(((e=t.match(at))==null?void 0:e.length)||0)+(((s=t.match(je))==null?void 0:s.length)||0)>0}const Wt="number",Kt="color",We="var",Ke="var(",yt="${}",$e=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function $t(t){const e=t.toString(),s=[],n={color:[],number:[],var:[]},r=[];let i=0;const u=e.replace($e,c=>(y.test(c)?(n.color.push(i),r.push(Kt),s.push(y.parse(c))):c.startsWith(Ke)?(n.var.push(i),r.push(We),s.push(c)):(n.number.push(i),r.push(Wt),s.push(parseFloat(c))),++i,yt)).split(yt);return{values:s,split:u,indexes:n,types:r}}function Yt(t){return $t(t).values}function Ut(t){const{split:e,types:s}=$t(t),n=e.length;return r=>{let i="";for(let o=0;otypeof t=="number"?0:y.test(t)?y.getAnimatableNone(t):t;function Ue(t){const e=Yt(t);return Ut(t)(e.map(Ye))}const R={test:ke,parse:Yt,createTransformer:Ut,getAnimatableNone:Ue},Xe=(t,e,s)=>t+(e-t)*s;function _e(t){for(let e=1;et*180/Math.PI,q=t=>{const e=C(Math.atan2(t[1],t[0]));return Q(e)},He={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:q,rotateZ:q,skewX:t=>C(Math.atan(t[1])),skewY:t=>C(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Q=t=>(t=t%360,t<0&&(t+=360),t),bt=q,Vt=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),wt=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),ze={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Vt,scaleY:wt,scale:t=>(Vt(t)+wt(t))/2,rotateX:t=>Q(C(Math.atan2(t[6],t[5]))),rotateY:t=>Q(C(Math.atan2(-t[2],t[0]))),rotateZ:bt,rotate:bt,skewX:t=>C(Math.atan(t[4])),skewY:t=>C(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Mt(t){return t.includes("scale")?1:0}function J(t,e){if(!t||t==="none")return Mt(e);const s=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,r;if(s)n=ze,r=s;else{const u=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=He,r=u}if(!r)return Mt(e);const i=n[e],o=r[1].split(",").map(Ze);return typeof i=="function"?i(o):o[i]}const gn=(t,e)=>{const{transform:s="none"}=getComputedStyle(t);return J(s,e)};function Ze(t){return parseFloat(t.trim())}const j=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ct=new Set(j),yn=t=>t===F||t===a,Ge=new Set(["x","y","z"]),qe=j.filter(t=>!Ge.has(t));function Qe(t){const e=[];return qe.forEach(s=>{const n=t.getValue(s);n!==void 0&&(e.push([s,n.get()]),n.set(s.startsWith("scale")?1:0))}),e}const Y={width:({x:t},{paddingLeft:e="0",paddingRight:s="0"})=>t.max-t.min-parseFloat(e)-parseFloat(s),height:({y:t},{paddingTop:e="0",paddingBottom:s="0"})=>t.max-t.min-parseFloat(e)-parseFloat(s),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>J(e,"x"),y:(t,{transform:e})=>J(e,"y")};Y.translateX=Y.x;Y.translateY=Y.y;const T=new Set;let tt=!1,et=!1,st=!1;function Xt(){if(et){const t=Array.from(T).filter(n=>n.needsMeasurement),e=new Set(t.map(n=>n.element)),s=new Map;e.forEach(n=>{const r=Qe(n);r.length&&(s.set(n,r),n.render())}),t.forEach(n=>n.measureInitialState()),e.forEach(n=>{n.render();const r=s.get(n);r&&r.forEach(([i,o])=>{var u;(u=n.getValue(i))==null||u.set(o)})}),t.forEach(n=>n.measureEndState()),t.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}et=!1,tt=!1,T.forEach(t=>t.complete(st)),T.clear()}function _t(){T.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(et=!0)})}function bn(){st=!0,_t(),Xt(),st=!1}class Je{constructor(e,s,n,r,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=s,this.name=n,this.motionValue=r,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(T.add(this),tt||(tt=!0,L.read(_t),L.resolveKeyframes(Xt))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:s,element:n,motionValue:r}=this;if(e[0]===null){const i=r==null?void 0:r.get(),o=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&s){const u=n.readValue(s,o);u!=null&&(e[0]=u)}e[0]===void 0&&(e[0]=o),r&&i===void 0&&r.set(e[0])}_e(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),T.delete(this)}cancel(){this.state==="scheduled"&&(T.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}function St(t){const e=[{},{}];return t==null||t.values.forEach((s,n)=>{e[0][n]=s.get(),e[1][n]=s.getVelocity()}),e}function Ht(t,e,s,n){if(typeof e=="function"){const[r,i]=St(n);e=e(s!==void 0?s:t.custom,r,i)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[r,i]=St(n);e=e(s!==void 0?s:t.custom,r,i)}return e}const vt=30,ts=t=>!isNaN(parseFloat(t)),xt={current:void 0};class es{constructor(e,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{var i;const r=B.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=s.owner}setCurrent(e){this.current=e,this.updatedAt=B.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=ts(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,s){this.events[e]||(this.events[e]=new Ot);const n=this.events[e].add(s);return e==="change"?()=>{n(),L.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,s){this.passiveEffect=e,this.stopPassiveEffect=s}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,s,n){this.set(s),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,s=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return xt.current&&xt.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=B.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>vt)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,vt);return Ce(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(e){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=e(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,s;(e=this.dependents)==null||e.clear(),(s=this.events.destroy)==null||s.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function nt(t,e){return new es(t,e)}const w=t=>!!(t&&t.getVelocity);function ss(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const ns="framerAppearId",rs="data-"+ss(ns),is={test:t=>t==="auto",parse:t=>t},zt=t=>e=>e.test(t),Zt=[F,a,A,x,De,Oe,is],Vn=t=>Zt.find(zt(t)),os=new Set(["brightness","contrast","saturate","opacity"]);function as(t){const[e,s]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=s.match(at)||[];if(!n)return t;const r=s.replace(n,"");let i=os.has(e)?1:0;return n!==s&&(i*=100),e+"("+i+r+")"}const us=/\b([a-z-]*)\(.*?\)/gu,rt={...R,getAnimatableNone:t=>{const e=t.match(us);return e?e.map(as).join(" "):t}},Ct={...F,transform:Math.round},cs={rotate:x,rotateX:x,rotateY:x,rotateZ:x,scale:W,scaleX:W,scaleY:W,scaleZ:W,skew:x,skewX:x,skewY:x,distance:a,translateX:a,translateY:a,translateZ:a,x:a,y:a,z:a,perspective:a,transformPerspective:a,opacity:O,originX:gt,originY:gt,originZ:a},lt={borderWidth:a,borderTopWidth:a,borderRightWidth:a,borderBottomWidth:a,borderLeftWidth:a,borderRadius:a,borderTopLeftRadius:a,borderTopRightRadius:a,borderBottomRightRadius:a,borderBottomLeftRadius:a,width:a,maxWidth:a,height:a,maxHeight:a,top:a,right:a,bottom:a,left:a,inset:a,insetBlock:a,insetBlockStart:a,insetBlockEnd:a,insetInline:a,insetInlineStart:a,insetInlineEnd:a,padding:a,paddingTop:a,paddingRight:a,paddingBottom:a,paddingLeft:a,paddingBlock:a,paddingBlockStart:a,paddingBlockEnd:a,paddingInline:a,paddingInlineStart:a,paddingInlineEnd:a,margin:a,marginTop:a,marginRight:a,marginBottom:a,marginLeft:a,marginBlock:a,marginBlockStart:a,marginBlockEnd:a,marginInline:a,marginInlineStart:a,marginInlineEnd:a,fontSize:a,backgroundPositionX:a,backgroundPositionY:a,...cs,zIndex:Ct,fillOpacity:O,strokeOpacity:O,numOctaves:Ct},ls={...lt,color:y,backgroundColor:y,outlineColor:y,fill:y,stroke:y,borderColor:y,borderTopColor:y,borderRightColor:y,borderBottomColor:y,borderLeftColor:y,filter:rt,WebkitFilter:rt},fs=t=>ls[t];function ds(t,e){let s=fs(t);return s!==rt&&(s=R),s.getAnimatableNone?s.getAnimatableNone(e):void 0}const Gt=(t,e)=>e&&typeof t=="number"?e.transform(t):t,{schedule:hs}=Dt(queueMicrotask,!1),ps=[...Zt,y,R],ms=t=>ps.find(zt(t)),Tt=()=>({translate:0,scale:1,origin:0,originPoint:0}),wn=()=>({x:Tt(),y:Tt()}),Pt=()=>({min:0,max:0}),gs=()=>({x:Pt(),y:Pt()}),it={current:null},qt={current:!1},ys=typeof window<"u";function bs(){if(qt.current=!0,!!ys)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>it.current=t.matches;t.addEventListener("change",e),e()}else it.current=!1}const Vs=new WeakMap;function Qt(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function ot(t){return typeof t=="string"||Array.isArray(t)}const ws=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ms=["initial",...ws];function _(t){return Qt(t.animate)||Ms.some(e=>ot(t[e]))}function Jt(t){return!!(_(t)||t.variants)}function Ss(t,e,s){for(const n in e){const r=e[n],i=s[n];if(w(r))t.addValue(n,r);else if(w(i))t.addValue(n,nt(r,{owner:t}));else if(i!==r)if(t.hasValue(n)){const o=t.getValue(n);o.liveStyle===!0?o.jump(r):o.hasAnimated||o.set(r)}else{const o=t.getStaticValue(n);t.addValue(n,nt(o!==void 0?o:r,{owner:t}))}}for(const n in s)e[n]===void 0&&t.removeValue(n);return e}const At=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let U={};function te(t){U=t}function vs(){return U}class Mn{scrapeMotionValuesFromProps(e,s,n){return{}}constructor({parent:e,props:s,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:o},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Je,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const l=B.now();this.renderScheduledAtthis.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(qt.current||bs(),this.shouldReduceMotion=it.current),(s=this.parent)==null||s.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),ht(this.notifyUpdate),ht(this.render),this.valueSubscriptions.forEach(s=>s()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const s in this.events)this.events[s].clear();for(const s in this.features){const n=this.features[s];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,s){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=ct.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=s.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&L.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,s)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),s.owner&&s.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in U){const s=U[e];if(!s)continue;const{isEnabled:n,Feature:r}=s;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const i=this.features[e];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):gs()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,s){this.latestValues[e]=s}update(e,s){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let n=0;ns.variantChildren.delete(e)}addValue(e,s){const n=this.values.get(e);s!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,s),this.values.set(e,s),this.latestValues[e]=s.get())}removeValue(e){this.values.delete(e);const s=this.valueSubscriptions.get(e);s&&(s(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,s){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&s!==void 0&&(n=nt(s===null?void 0:s,{owner:this}),this.addValue(e,n)),n}readValue(e,s){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n=="string"&&(Se(n)||ve(n))?n=parseFloat(n):!ms(n)&&R.test(s)&&(n=ds(e,s)),this.setBaseTarget(e,w(n)?n.get():n)),w(n)?n.get():n}setBaseTarget(e,s){this.baseTarget[e]=s}getBaseTarget(e){var i;const{initial:s}=this.props;let n;if(typeof s=="string"||typeof s=="object"){const o=Ht(this.props,s,(i=this.presenceContext)==null?void 0:i.custom);o&&(n=o[e])}if(s&&n!==void 0)return n;const r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!w(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,s){return this.events[e]||(this.events[e]=new Ot),this.events[e].add(s)}notify(e,...s){this.events[e]&&this.events[e].notify(...s)}scheduleRenderMicrotask(){hs.render(this.render)}}const xs={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Cs=j.length;function Ts(t,e,s){let n="",r=!0;for(let i=0;i{if(!e.target)return t;if(typeof t=="string")if(a.test(t))t=parseFloat(t);else return t;const s=Rt(t,e.target.x),n=Rt(t,e.target.y);return`${s}% ${n}%`}},Ps={correct:(t,{treeScale:e,projectionDelta:s})=>{const n=t,r=R.parse(t);if(r.length>5)return n;const i=R.createTransformer(t),o=typeof r[0]!="number"?1:0,u=s.x.scale*e.x,c=s.y.scale*e.y;r[0+o]/=u,r[1+o]/=c;const h=Xe(u,c,.5);return typeof r[2+o]=="number"&&(r[2+o]/=h),typeof r[3+o]=="number"&&(r[3+o]/=h),i(r)}},As={borderRadius:{...E,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:E,borderTopRightRadius:E,borderBottomLeftRadius:E,borderBottomRightRadius:E,boxShadow:Ps};function se(t,{layout:e,layoutId:s}){return ct.has(t)||t.startsWith("origin")||(e||s!==void 0)&&(!!As[t]||t==="opacity")}function ne(t,e,s){var o;const n=t.style,r=e==null?void 0:e.style,i={};if(!n)return i;for(const u in n)(w(n[u])||r&&w(r[u])||se(u,t)||((o=s==null?void 0:s.getValue(u))==null?void 0:o.liveStyle)!==void 0)&&(i[u]=n[u]);return i}const Rs={offset:"stroke-dashoffset",array:"stroke-dasharray"},Fs={offset:"strokeDashoffset",array:"strokeDasharray"};function Es(t,e,s=1,n=0,r=!0){t.pathLength=1;const i=r?Rs:Fs;t[i.offset]=`${-n}`,t[i.array]=`${e} ${s}`}const Is=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Bs(t,{attrX:e,attrY:s,attrScale:n,pathLength:r,pathSpacing:i=1,pathOffset:o=0,...u},c,h,f){if(ee(t,u,h),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:l}=t;d.transform&&(l.transform=d.transform,delete d.transform),(l.transform||d.transformOrigin)&&(l.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),l.transform&&(l.transformBox=(f==null?void 0:f.transformBox)??"fill-box",delete d.transformBox);for(const m of Is)d[m]!==void 0&&(l[m]=d[m],delete d[m]);e!==void 0&&(d.x=e),s!==void 0&&(d.y=s),n!==void 0&&(d.scale=n),r!==void 0&&Es(d,r,i,o,!1)}const Ns=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Ls(t,e,s){const n=ne(t,e,s);for(const r in t)if(w(t[r])||w(e[r])){const i=j.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=t[r]}return n}function Os(t){return w(t)?t.get():t}const re=p.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),ie=p.createContext({strict:!1}),Ft={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Et=!1;function Ds(){if(Et)return;const t={};for(const e in Ft)t[e]={isEnabled:s=>Ft[e].some(n=>!!s[n])};te(t),Et=!0}function oe(){return Ds(),vs()}function js(t){const e=oe();for(const s in t)e[s]={...e[s],...t[s]};te(e)}const ks=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function X(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||ks.has(t)}let ae=t=>!X(t);function Ws(t){typeof t=="function"&&(ae=e=>e.startsWith("on")?!X(e):t(e))}try{Ws(require("@emotion/is-prop-valid").default)}catch{}function Ks(t,e,s){const n={};for(const r in t)r==="values"&&typeof t.values=="object"||(ae(r)||s===!0&&X(r)||!e&&!X(r)||t.draggable&&r.startsWith("onDrag"))&&(n[r]=t[r]);return n}const H=p.createContext({});function $s(t,e){if(_(t)){const{initial:s,animate:n}=t;return{initial:s===!1||ot(s)?s:void 0,animate:ot(n)?n:void 0}}return t.inherit!==!1?e:{}}function Ys(t){const{initial:e,animate:s}=$s(t,p.useContext(H));return p.useMemo(()=>({initial:e,animate:s}),[It(e),It(s)])}function It(t){return Array.isArray(t)?t.join(" "):t}const ft=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ue(t,e,s){for(const n in e)!w(e[n])&&!se(n,s)&&(t[n]=e[n])}function Us({transformTemplate:t},e){return p.useMemo(()=>{const s=ft();return ee(s,e,t),Object.assign({},s.vars,s.style)},[e])}function Xs(t,e){const s=t.style||{},n={};return ue(n,s,t),Object.assign(n,Us(t,e)),n}function _s(t,e){const s={},n=Xs(t,e);return t.drag&&t.dragListener!==!1&&(s.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=n,s}const ce=()=>({...ft(),attrs:{}});function Hs(t,e,s,n){const r=p.useMemo(()=>{const i=ce();return Bs(i,e,Ns(n),t.transformTemplate,t.style),{...i.attrs,style:{...i.style}}},[e]);if(t.style){const i={};ue(i,t.style,t),r.style={...i,...r.style}}return r}const zs=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function le(t){return typeof t!="string"||t.includes("-")?!1:!!(zs.indexOf(t)>-1||/[A-Z]/u.test(t))}function Zs(t,e,s,{latestValues:n},r,i=!1,o){const c=(o??le(t)?Hs:_s)(e,n,r,t),h=Ks(e,typeof t=="string",i),f=t!==p.Fragment?{...h,...c,ref:s}:{},{children:d}=e,l=p.useMemo(()=>w(d)?d.get():d,[d]);return p.createElement(t,{...f,children:l})}function Gs({scrapeMotionValuesFromProps:t,createRenderState:e},s,n,r){return{latestValues:qs(s,n,r,t),renderState:e()}}function qs(t,e,s,n){const r={},i=n(t,{});for(const l in i)r[l]=Os(i[l]);let{initial:o,animate:u}=t;const c=_(t),h=Jt(t);e&&h&&!c&&t.inherit!==!1&&(o===void 0&&(o=e.initial),u===void 0&&(u=e.animate));let f=s?s.initial===!1:!1;f=f||o===!1;const d=f?u:o;if(d&&typeof d!="boolean"&&!Qt(d)){const l=Array.isArray(d)?d:[d];for(let m=0;m(e,s)=>{const n=p.useContext(H),r=p.useContext(Nt),i=()=>Gs(t,e,n,r);return s?i():be(i)},Qs=fe({scrapeMotionValuesFromProps:ne,createRenderState:ft}),Js=fe({scrapeMotionValuesFromProps:Ls,createRenderState:ce}),tn=Symbol.for("motionComponentSymbol");function en(t,e,s){const n=p.useRef(s);p.useInsertionEffect(()=>{n.current=s});const r=p.useRef(null);return p.useCallback(i=>{var u;i&&((u=t.onMount)==null||u.call(t,i)),e&&(i?e.mount(i):e.unmount());const o=n.current;if(typeof o=="function")if(i){const c=o(i);typeof c=="function"&&(r.current=c)}else r.current?(r.current(),r.current=null):o(i);else o&&(o.current=i)},[e])}const sn=p.createContext({});function nn(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function rn(t,e,s,n,r,i){var P,v;const{visualElement:o}=p.useContext(H),u=p.useContext(ie),c=p.useContext(Nt),h=p.useContext(re).reducedMotion,f=p.useRef(null),d=p.useRef(!1);n=n||u.renderer,!f.current&&n&&(f.current=n(t,{visualState:e,parent:o,props:s,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:h,isSVG:i}),d.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const l=f.current,m=p.useContext(sn);l&&!l.projection&&r&&(l.type==="html"||l.type==="svg")&&on(f.current,s,r,m);const b=p.useRef(!1);p.useInsertionEffect(()=>{l&&b.current&&l.update(s,c)});const V=s[rs],M=p.useRef(!!V&&!((P=window.MotionHandoffIsComplete)!=null&&P.call(window,V))&&((v=window.MotionHasOptimisedAnimation)==null?void 0:v.call(window,V)));return Ve(()=>{d.current=!0,l&&(b.current=!0,window.MotionIsMounted=!0,l.updateFeatures(),l.scheduleRenderMicrotask(),M.current&&l.animationState&&l.animationState.animateChanges())}),p.useEffect(()=>{l&&(!M.current&&l.animationState&&l.animationState.animateChanges(),M.current&&(queueMicrotask(()=>{var g;(g=window.MotionHandoffMarkAsComplete)==null||g.call(window,V)}),M.current=!1),l.enteringChildren=void 0)}),l}function on(t,e,s,n){const{layoutId:r,layout:i,drag:o,dragConstraints:u,layoutScroll:c,layoutRoot:h,layoutCrossfade:f}=e;t.projection=new s(t.latestValues,e["data-framer-portal-id"]?void 0:de(t.parent)),t.projection.setOptions({layoutId:r,layout:i,alwaysMeasureLayout:!!o||u&&nn(u),visualElement:t,animationType:typeof i=="string"?i:"both",initialPromotionConfig:n,crossfade:f,layoutScroll:c,layoutRoot:h})}function de(t){if(t)return t.options.allowProjection!==!1?t.projection:de(t.parent)}function Z(t,{forwardMotionProps:e=!1,type:s}={},n,r){n&&js(n);const i=s?s==="svg":le(t),o=i?Js:Qs;function u(h,f){let d;const l={...p.useContext(re),...h,layoutId:an(h)},{isStatic:m}=l,b=Ys(h),V=o(h,m);if(!m&&Bt){un();const M=cn(l);d=M.MeasureLayout,b.visualElement=rn(t,V,l,r,M.ProjectionNode,i)}return dt.jsxs(H.Provider,{value:b,children:[d&&b.visualElement?dt.jsx(d,{visualElement:b.visualElement,...l}):null,Zs(t,h,en(V,b.visualElement,f),V,m,e,i)]})}u.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const c=p.forwardRef(u);return c[tn]=t,c}function an({layoutId:t}){const e=p.useContext(ye).id;return e&&t!==void 0?e+"-"+t:t}function un(t,e){p.useContext(ie).strict}function cn(t){const e=oe(),{drag:s,layout:n}=e;if(!s&&!n)return{};const r={...s,...n};return{MeasureLayout:s!=null&&s.isEnabled(t)||n!=null&&n.isEnabled(t)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function ln(t,e){if(typeof Proxy>"u")return Z;const s=new Map,n=(i,o)=>Z(i,o,t,e),r=(i,o)=>n(i,o);return new Proxy(r,{get:(i,o)=>o==="create"?n:(s.has(o)||s.set(o,Z(o,void 0,t,e)),s.get(o))})}const Sn=ln();export{gn as $,hn as A,hs as B,gs as C,wn as D,Os as E,As as F,nn as G,sn as H,bn as I,ct as J,Je as K,ye as L,re as M,Ht as N,j as O,Nt as P,rs as Q,Se as R,Ot as S,ve as T,ds as U,Vn as V,mn as W,Y as X,yn as Y,Mn as Z,Mt as _,Ve as a,Re as a0,ee as a1,ne as a2,ss as a3,Ls as a4,Bs as a5,Ns as a6,fs as a7,ot as a8,Ms as a9,Qt as aa,ws as ab,js as ac,ie as ad,le as ae,nt as b,ht as c,xt as d,Xe as e,L as f,mt as g,K as h,w as i,pn as j,y as k,R as l,Sn as m,xe as n,$t as o,Lt as p,G as q,I as r,pt as s,B as t,be as u,Ce as v,A as w,a as x,we as y,Me as z};