Files
youguang_dist/assets/index-CDpj06Sn.js
2025-10-27 15:45:36 +08:00

2 lines
137 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{i as Ke,p as ei,w as Uo,c as si,r as gt,u as $o,g as No,o as Wo,a as zo,b as Ko,d as ni,e as Ho,f as Go,h as dt,j as ii,C as Xo,m as Yo,k as qo,l as G,n as F,q as ee,s as g,t as N,v as Zo,x as J,y as k,z as V,F as Pe,A as Ve,B as Jo,D as oi,E as Qo,G as Ps,H as tr,I as er,J as sr}from"./index-rDThlOme.js";import{I as ri}from"./index-B1jP4d3J.js";import{T as nr}from"./Time-CkEgft2m.js";import{S as ir}from"./Star-C7vO4eAL.js";const Ht=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function or(t,e){let s=new Set,n=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){o.has(u)&&(c.schedule(u),t()),u(a)}const c={schedule:(u,h=!1,d=!1)=>{const p=d&&i?s:n;return h&&o.add(u),p.has(u)||p.add(u),u},cancel:u=>{n.delete(u),o.delete(u)},process:u=>{if(a=u,i){r=!0;return}i=!0,[s,n]=[n,s],s.forEach(l),s.clear(),i=!1,r&&(r=!1,c.process(u))}};return c}const Q={},rr=40;function ai(t,e){let s=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>s=!0,o=Ht.reduce((T,A)=>(T[A]=or(r),T),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:h,preRender:d,render:f,postRender:p}=o,m=()=>{const T=Q.useManualTiming?i.timestamp:performance.now();s=!1,Q.useManualTiming||(i.delta=n?1e3/60:Math.max(Math.min(T-i.timestamp,rr),1)),i.timestamp=T,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),h.process(i),d.process(i),f.process(i),p.process(i),i.isProcessing=!1,s&&e&&(n=!1,t(m))},y=()=>{s=!0,n=!0,i.isProcessing||t(m)};return{schedule:Ht.reduce((T,A)=>{const x=o[A];return T[A]=(P,D=!1,S=!1)=>(s||y(),x.schedule(P,D,S)),T},{}),cancel:T=>{for(let A=0;A<Ht.length;A++)o[Ht[A]].cancel(T)},state:i,steps:o}}const I=t=>t,{schedule:M,cancel:tt,state:B,steps:he}=ai(typeof requestAnimationFrame<"u"?requestAnimationFrame:I,!0);let Jt;function ar(){Jt=void 0}const O={now:()=>(Jt===void 0&&O.set(B.isProcessing||Q.useManualTiming?B.timestamp:performance.now()),Jt),set:t=>{Jt=t,queueMicrotask(ar)}},z=t=>t*1e3,X=t=>t/1e3;function lr(t,e){const s=O.now(),n=({timestamp:i})=>{const r=i-s;r>=e&&(tt(n),t(r-e))};return M.setup(n,!0),()=>tt(n)}const li=t=>e=>typeof e=="string"&&e.startsWith(t),He=li("--"),ur=li("var(--"),Ge=t=>ur(t)?cr.test(t.split("/*")[0].trim()):!1,cr=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,jt={};function ui(t){for(const e in t)jt[e]=t[e],He(e)&&(jt[e].isCSSVariable=!0)}function It(t,e){const s=typeof t=="string"&&!e?`${t}Context`:e,n=Symbol(s);return[o=>{const a=Ke(n,o);if(a===void 0)throw new Error(`Injection \`${n.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`);return a},o=>(ei(n,o),o)]}const[hr,dr]=It("Motion"),[fr]=It("LayoutGroup");function Vs(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}class st{constructor(e){this.state=e}beforeMount(){}mount(){}unmount(){}update(){}beforeUpdate(){}beforeUnmount(){}}function Ct(t,e,s){if(Array.isArray(t))return t.reduce((n,i)=>{const r=Ct(i,e,s);return r?{...n,...r}:n},{});if(typeof t=="object")return t;if(t&&e){const n=e[t];return typeof n=="function"?n(s):n}}function pr(t,e){return typeof t!=typeof e?!0:Array.isArray(t)&&Array.isArray(e)?!mr(t,e):t!==e}function mr(t,e){const s=e.length;if(s!==t.length)return!1;for(let n=0;n<s;n++)if(e[n]!==t[n])return!1;return!0}function Es(t){return t==null?void 0:t.startsWith("--")}const gr=t=>t;function yr(t){return typeof t=="number"}const vr=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],xr=new Set(vr);function ci(t){return xr.has(t)}class br{constructor(e){this.features=[];const{features:s=[],lazyMotionContext:n}=e.options,i=s.concat(n.features.value);this.features=i.map(o=>new o(e));const r=this.features;Uo(n.features,o=>{o.forEach(a=>{if(!i.includes(a)){i.push(a);const l=new a(e);r.push(l),e.isMounted()&&(l.beforeMount(),l.mount())}})},{flush:"pre"})}mount(){this.features.forEach(e=>e.mount())}beforeMount(){this.features.forEach(e=>{var s;return(s=e.beforeMount)==null?void 0:s.call(e)})}unmount(){this.features.forEach(e=>e.unmount())}update(){this.features.forEach(e=>{var s;return(s=e.update)==null?void 0:s.call(e)})}beforeUpdate(){this.features.forEach(e=>e.beforeUpdate())}beforeUnmount(){this.features.forEach(e=>e.beforeUnmount())}}const Xe=new WeakMap,[Tr]=It("AnimatePresenceContext");function wr(t){return typeof t=="string"||t===!1||Array.isArray(t)}const hi=new WeakMap;let Sr=0;class Ar{constructor(e,s){var n;this.element=null,this.isSafeToRemove=!1,this.isVShow=!1,this.children=new Set,this.activeStates={initial:!0,animate:!0},this.currentProcess=null,this._context=null,this.animateUpdates=I,this.id=`motion-state-${Sr++}`,this.options=e,this.parent=s,(n=s==null?void 0:s.children)==null||n.add(this);const r=(e.initial===void 0&&e.variants?this.context.initial:e.initial)===!1?["initial","animate"]:["initial"];this.initTarget(r),this.featureManager=new br(this),this.type=ci(this.options.as)?"svg":"html"}get context(){if(!this._context){const e={get:(s,n)=>{var i;return wr(this.options[n])?this.options[n]:(i=this.parent)==null?void 0:i.context[n]}};this._context=new Proxy({},e)}return this._context}initTarget(e){var s;const n=this.options.custom??((s=this.options.animatePresenceContext)==null?void 0:s.custom);this.baseTarget=e.reduce((i,r)=>({...i,...Ct(this.options[r]||this.context[r],this.options.variants,n)}),{}),this.target={}}updateOptions(e){var s;this.options=e,(s=this.visualElement)==null||s.update({...this.options,whileTap:this.options.whilePress},{isPresent:!Xe.has(this.element)})}beforeMount(){this.featureManager.beforeMount()}mount(e,s,n=!1){var i,r;this.element=e,this.updateOptions(s),this.options.layoutId&&((i=this.visualElement.projection.getStack())==null?void 0:i.members.length)>0,this.featureManager.mount(),!n&&this.options.animate&&((r=this.startAnimation)==null||r.call(this))}clearAnimation(){var e,s;this.currentProcess&&tt(this.currentProcess),this.currentProcess=null,(s=(e=this.visualElement)==null?void 0:e.variantChildren)==null||s.forEach(n=>{n.state.clearAnimation()})}startAnimation(){this.clearAnimation(),this.currentProcess=M.render(()=>{this.currentProcess=null,this.animateUpdates()})}beforeUnmount(){this.featureManager.beforeUnmount()}unmount(e=!1){var s;const n=this.options.layoutId&&((s=this.visualElement.projection)==null?void 0:s.getStack().lead)===this.visualElement.projection&&this.visualElement.projection.isProjecting(),i=()=>{var r,o,a;e&&Array.from(this.children).reverse().forEach(this.unmountChild),(o=(r=this.parent)==null?void 0:r.children)==null||o.delete(this),hi.delete(this.element),this.featureManager.unmount(),(a=this.visualElement)==null||a.unmount(),this.clearAnimation()};n?Promise.resolve().then(()=>{i()}):i()}unmountChild(e){e.unmount(!0)}beforeUpdate(){this.featureManager.beforeUpdate()}update(e){this.updateOptions(e),this.featureManager.update(),this.startAnimation()}setActive(e,s,n=!0){var i;!this.element||this.activeStates[e]===s||(this.activeStates[e]=s,(i=this.visualElement.variantChildren)==null||i.forEach(r=>{r.state.setActive(e,s,!1)}),n&&this.animateUpdates({isExit:e==="exit"&&this.activeStates.exit}))}isMounted(){return!!this.element}willUpdate(e){var s;(this.options.layout||this.options.layoutId)&&((s=this.visualElement.projection)==null||s.willUpdate())}}const ht=new WeakMap;function Ms(t,e,s){return new CustomEvent(t,{detail:{target:e,isExit:s}})}const Cs={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>`${t}deg`},Pr={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>`${t}px`},rotate:Cs,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:gr},skew:Cs},Vr=["translate","scale","rotate","skew"],Er=["","X","Y","Z"],Ye=new Map,se=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"];Vr.forEach(t=>{Er.forEach(e=>{se.push(t+e),Ye.set(t+e,Pr[t])})});const Mr=new Set(se),Cr=t=>Mr.has(t),Ds={x:"translateX",y:"translateY",z:"translateZ"};function Dr([t],[e]){return se.indexOf(t)-se.indexOf(e)}function _r(t,[e,s]){return`${t} ${e}(${s})`}function Lr(t){return t.sort(Dr).reduce(_r,"").trim()}const _s={translate:[0,0],rotate:0,scale:1,skew:0,x:0,y:0,z:0},Ut=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),it=Ut("deg"),Y=Ut("%"),b=Ut("px"),kr=Ut("vh"),Rr=Ut("vw"),Ls={...Y,parse:t=>Y.parse(t)/100,transform:t=>Y.transform(t*100)},j=t=>!!(t&&t.getVelocity),jr={get:(t,e)=>{let s=Es(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!s&&s!=="0"){const n=Ye.get(e);n&&(s=n.initialValue)}return s},set:(t,e,s)=>{Es(e)?t.style.setProperty(e,s):t.style[e]=s}};function Br(t){var e;const s={},n=[];for(let i in t){let r=t[i];r=j(r)?r.get():r,Cr(i)&&i in Ds&&(i=Ds[i]);let o=Array.isArray(r)?r[0]:r;const a=Ye.get(i);a?(o=yr(r)?(e=a.toDefaultUnit)==null?void 0:e.call(a,r):r,n.push([i,o])):s[i]=o}return n.length&&(s.transform=Lr(n)),Object.keys(s).length===0?null:s}const Fr={fill:!0,stroke:!0,opacity:!0,"stroke-width":!0,"fill-opacity":!0,"stroke-opacity":!0,"stroke-linecap":!0,"stroke-linejoin":!0,"stroke-dasharray":!0,"stroke-dashoffset":!0,cx:!0,cy:!0,r:!0,d:!0,x1:!0,y1:!0,x2:!0,y2:!0,points:!0,"path-length":!0,viewBox:!0,width:!0,height:!0,"preserve-aspect-ratio":!0,"clip-path":!0,filter:!0,mask:!0,"stop-color":!0,"stop-opacity":!0,"gradient-transform":!0,"gradient-units":!0,"spread-method":!0,"marker-end":!0,"marker-mid":!0,"marker-start":!0,"text-anchor":!0,"dominant-baseline":!0,"font-family":!0,"font-size":!0,"font-weight":!0,"letter-spacing":!0,"vector-effect":!0};function Or(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Ir(t,e,s=1,n=0){t.pathLength=1,delete t["path-length"],t["stroke-dashoffset"]=b.transform(-n);const i=b.transform(e),r=b.transform(s);t["stroke-dasharray"]=`${i} ${r}`}function Ur(t){const e={},s={};for(const n in t){const i=Or(n);if(i in Fr){const r=t[n];e[i]=j(r)?r.get():r}else s[n]=t[n]}return e["path-length"]!==void 0&&Ir(e,e["path-length"],e["path-spacing"],e["path-offset"]),{attrs:e,style:s}}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ks=t=>typeof t<"u";function $r({top:t,left:e,right:s,bottom:n}){return{x:{min:e,max:s},y:{min:t,max:n}}}function Nr(t,e){if(!e)return t;const s=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:s.y,left:s.x,bottom:n.y,right:n.x}}function Wr(t,e){return $r(Nr(t.getBoundingClientRect(),e))}const Rs={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"]},Ee={};for(const t in Rs)Ee[t]={isEnabled:e=>Rs[t].some(s=>!!e[s])};const js=()=>({translate:0,scale:1,origin:0,originPoint:0}),ft=()=>({x:js(),y:js()}),Bs=()=>({min:0,max:0}),L=()=>({x:Bs(),y:Bs()}),zr=typeof window<"u",ne={current:null},di={current:!1};function Kr(){if(di.current=!0,!!zr)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ne.current=t.matches;t.addEventListener("change",e),e()}else ne.current=!1}function Hr(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Gr(t){return typeof t=="string"||Array.isArray(t)}const Xr=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Yr=["initial",...Xr];function fi(t){return Hr(t.animate)||Yr.some(e=>Gr(t[e]))}function qr(t){return!!(fi(t)||t.variants)}function qe(t,e){t.indexOf(e)===-1&&t.push(e)}function ue(t,e){const s=t.indexOf(e);s>-1&&t.splice(s,1)}class Ze{constructor(){this.subscriptions=[]}add(e){return qe(this.subscriptions,e),()=>ue(this.subscriptions,e)}notify(e,s,n){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,s,n);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,s,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function pi(t,e){return e?t*(1e3/e):0}const Fs=30,Zr=t=>!isNaN(parseFloat(t));class Jr{constructor(e,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{var i;const r=O.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=O.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Zr(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 Ze);const n=this.events[e].add(s);return e==="change"?()=>{n(),M.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 this.current}getPrevious(){return this.prev}getVelocity(){const e=O.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Fs)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,Fs);return pi(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 yt(t,e){return new Jr(t,e)}function Qr(t,e,s){for(const n in e){const i=e[n],r=s[n];if(j(i))t.addValue(n,i);else if(j(r))t.addValue(n,yt(i,{owner:t}));else if(r!==i)if(t.hasValue(n)){const o=t.getValue(n);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(n);t.addValue(n,yt(o!==void 0?o:i,{owner:t}))}}for(const n in s)e[n]===void 0&&t.removeValue(n);return e}function Os(t){const e=[{},{}];return t==null||t.values.forEach((s,n)=>{e[0][n]=s.get(),e[1][n]=s.getVelocity()}),e}function mi(t,e,s,n){if(typeof e=="function"){const[i,r]=Os(n);e=e(s!==void 0?s:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=Os(n);e=e(s!==void 0?s:t.custom,i,r)}return e}function ta(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const at=t=>t*180/Math.PI,Me=t=>{const e=at(Math.atan2(t[1],t[0]));return Ce(e)},ea={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Me,rotateZ:Me,skewX:t=>at(Math.atan(t[1])),skewY:t=>at(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ce=t=>(t=t%360,t<0&&(t+=360),t),Is=Me,Us=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),$s=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),sa={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Us,scaleY:$s,scale:t=>(Us(t)+$s(t))/2,rotateX:t=>Ce(at(Math.atan2(t[6],t[5]))),rotateY:t=>Ce(at(Math.atan2(-t[2],t[0]))),rotateZ:Is,rotate:Is,skewX:t=>at(Math.atan(t[4])),skewY:t=>at(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function De(t){return t.includes("scale")?1:0}function _e(t,e){if(!t||t==="none")return De(e);const s=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,i;if(s)n=sa,i=s;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=ea,i=a}if(!i)return De(e);const r=n[e],o=i[1].split(",").map(ia);return typeof r=="function"?r(o):o[r]}const na=(t,e)=>{const{transform:s="none"}=getComputedStyle(t);return _e(s,e)};function ia(t){return parseFloat(t.trim())}const xt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],bt=new Set(xt),et=(t,e,s)=>s>e?e:s<t?t:s,Tt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Bt={...Tt,transform:t=>et(0,1,t)},Gt={...Tt,default:1},Ns=t=>t===Tt||t===b,oa=new Set(["x","y","z"]),ra=xt.filter(t=>!oa.has(t));function aa(t){const e=[];return ra.forEach(s=>{const n=t.getValue(s);n!==void 0&&(e.push([s,n.get()]),n.set(s.startsWith("scale")?1:0))}),e}const ut={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})=>_e(e,"x"),y:(t,{transform:e})=>_e(e,"y")};ut.translateX=ut.x;ut.translateY=ut.y;const ct=new Set;let Le=!1,ke=!1,Re=!1;function gi(){if(ke){const t=Array.from(ct).filter(n=>n.needsMeasurement),e=new Set(t.map(n=>n.element)),s=new Map;e.forEach(n=>{const i=aa(n);i.length&&(s.set(n,i),n.render())}),t.forEach(n=>n.measureInitialState()),e.forEach(n=>{n.render();const i=s.get(n);i&&i.forEach(([r,o])=>{var a;(a=n.getValue(r))==null||a.set(o)})}),t.forEach(n=>n.measureEndState()),t.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}ke=!1,Le=!1,ct.forEach(t=>t.complete(Re)),ct.clear()}function yi(){ct.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(ke=!0)})}function la(){Re=!0,yi(),gi(),Re=!1}class Je{constructor(e,s,n,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=s,this.name=n,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(ct.add(this),Le||(Le=!0,M.read(yi),M.resolveKeyframes(gi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:s,element:n,motionValue:i}=this;if(e[0]===null){const r=i==null?void 0:i.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(n&&s){const a=n.readValue(s,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&r===void 0&&i.set(e[0])}ta(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),ct.delete(this)}cancel(){this.state==="scheduled"&&(ct.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const vi=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),xi=t=>/^0[^.\s]+$/u.test(t),Dt=t=>Math.round(t*1e5)/1e5,Qe=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ua(t){return t==null}const ca=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ts=(t,e)=>s=>!!(typeof s=="string"&&ca.test(s)&&s.startsWith(t)||e&&!ua(s)&&Object.prototype.hasOwnProperty.call(s,e)),bi=(t,e,s)=>n=>{if(typeof n!="string")return n;const[i,r,o,a]=n.match(Qe);return{[t]:parseFloat(i),[e]:parseFloat(r),[s]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},ha=t=>et(0,255,t),de={...Tt,transform:t=>Math.round(ha(t))},lt={test:ts("rgb","red"),parse:bi("red","green","blue"),transform:({red:t,green:e,blue:s,alpha:n=1})=>"rgba("+de.transform(t)+", "+de.transform(e)+", "+de.transform(s)+", "+Dt(Bt.transform(n))+")"};function da(t){let e="",s="",n="",i="";return t.length>5?(e=t.substring(1,3),s=t.substring(3,5),n=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),s=t.substring(2,3),n=t.substring(3,4),i=t.substring(4,5),e+=e,s+=s,n+=n,i+=i),{red:parseInt(e,16),green:parseInt(s,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const je={test:ts("#"),parse:da,transform:lt.transform},pt={test:ts("hsl","hue"),parse:bi("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:s,alpha:n=1})=>"hsla("+Math.round(t)+", "+Y.transform(Dt(e))+", "+Y.transform(Dt(s))+", "+Dt(Bt.transform(n))+")"},R={test:t=>lt.test(t)||je.test(t)||pt.test(t),parse:t=>lt.test(t)?lt.parse(t):pt.test(t)?pt.parse(t):je.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?lt.transform(t):pt.transform(t),getAnimatableNone:t=>{const e=R.parse(t);return e.alpha=0,R.transform(e)}},fa=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function pa(t){var e,s;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Qe))==null?void 0:e.length)||0)+(((s=t.match(fa))==null?void 0:s.length)||0)>0}const Ti="number",wi="color",ma="var",ga="var(",Ws="${}",ya=/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 Ft(t){const e=t.toString(),s=[],n={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(ya,l=>(R.test(l)?(n.color.push(r),i.push(wi),s.push(R.parse(l))):l.startsWith(ga)?(n.var.push(r),i.push(ma),s.push(l)):(n.number.push(r),i.push(Ti),s.push(parseFloat(l))),++r,Ws)).split(Ws);return{values:s,split:a,indexes:n,types:i}}function Si(t){return Ft(t).values}function Ai(t){const{split:e,types:s}=Ft(t),n=e.length;return i=>{let r="";for(let o=0;o<n;o++)if(r+=e[o],i[o]!==void 0){const a=s[o];a===Ti?r+=Dt(i[o]):a===wi?r+=R.transform(i[o]):r+=i[o]}return r}}const va=t=>typeof t=="number"?0:R.test(t)?R.getAnimatableNone(t):t;function xa(t){const e=Si(t);return Ai(t)(e.map(va))}const ot={test:pa,parse:Si,createTransformer:Ai,getAnimatableNone:xa},ba={test:t=>t==="auto",parse:t=>t},Pi=t=>e=>e.test(t),Vi=[Tt,b,Y,it,Rr,kr,ba],zs=t=>Vi.find(Pi(t)),Ta=[...Vi,R,ot],wa=t=>Ta.find(Pi(t)),Sa=new Set(["brightness","contrast","saturate","opacity"]);function Aa(t){const[e,s]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[n]=s.match(Qe)||[];if(!n)return t;const i=s.replace(n,"");let r=Sa.has(e)?1:0;return n!==s&&(r*=100),e+"("+r+i+")"}const Pa=/\b([a-z-]*)\(.*?\)/gu,Be={...ot,getAnimatableNone:t=>{const e=t.match(Pa);return e?e.map(Aa).join(" "):t}},Ks={...Tt,transform:Math.round},Va={rotate:it,rotateX:it,rotateY:it,rotateZ:it,scale:Gt,scaleX:Gt,scaleY:Gt,scaleZ:Gt,skew:it,skewX:it,skewY:it,distance:b,translateX:b,translateY:b,translateZ:b,x:b,y:b,z:b,perspective:b,transformPerspective:b,opacity:Bt,originX:Ls,originY:Ls,originZ:b},es={borderWidth:b,borderTopWidth:b,borderRightWidth:b,borderBottomWidth:b,borderLeftWidth:b,borderRadius:b,radius:b,borderTopLeftRadius:b,borderTopRightRadius:b,borderBottomRightRadius:b,borderBottomLeftRadius:b,width:b,maxWidth:b,height:b,maxHeight:b,top:b,right:b,bottom:b,left:b,padding:b,paddingTop:b,paddingRight:b,paddingBottom:b,paddingLeft:b,margin:b,marginTop:b,marginRight:b,marginBottom:b,marginLeft:b,backgroundPositionX:b,backgroundPositionY:b,...Va,zIndex:Ks,fillOpacity:Bt,strokeOpacity:Bt,numOctaves:Ks},Ea={...es,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:Be,WebkitFilter:Be},Ei=t=>Ea[t];function Mi(t,e){let s=Ei(t);return s!==Be&&(s=ot),s.getAnimatableNone?s.getAnimatableNone(e):void 0}const{schedule:Ci}=ai(queueMicrotask,!0),Hs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Di{scrapeMotionValuesFromProps(e,s,n){return{}}constructor({parent:e,props:s,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},a={}){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 d=O.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,M.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=s.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=s,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=fi(s),this.isVariantNode=qr(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(s,{},this);for(const d in h){const f=h[d];l[d]!==void 0&&j(f)&&f.set(l[d])}}mount(e){var s;this.current=e,ht.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),di.current||Kr(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ne.current,(s=this.parent)==null||s.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),tt(this.notifyUpdate),tt(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=bt.has(e);n&&this.onBindTransform&&this.onBindTransform();const i=s.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&M.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,s)),this.valueSubscriptions.set(e,()=>{i(),r&&r(),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 Ee){const s=Ee[e];if(!s)continue;const{isEnabled:n,Feature:i}=s;if(!this.features[e]&&i&&n(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):L()}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;n<Hs.length;n++){const i=Hs[n];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=Qr(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const s=this.getClosestVariantNode();if(s)return s.variantChildren&&s.variantChildren.add(e),()=>s.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=yt(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"&&(vi(n)||xi(n))?n=parseFloat(n):!wa(n)&&ot.test(s)&&(n=Mi(e,s)),this.setBaseTarget(e,j(n)?n.get():n)),j(n)?n.get():n}setBaseTarget(e,s){this.baseTarget[e]=s}getBaseTarget(e){var s;const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const o=mi(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);o&&(i=o[e])}if(n&&i!==void 0)return i;const r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!j(r)?r:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,s){return this.events[e]||(this.events[e]=new Ze),this.events[e].add(s)}notify(e,...s){this.events[e]&&this.events[e].notify(...s)}scheduleRenderMicrotask(){Ci.render(this.render)}}const _i=new Set(["width","height","top","left","right","bottom",...xt]);let ss=()=>{};const Ma=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ca(t){const e=Ma.exec(t);if(!e)return[,];const[,s,n,i]=e;return[`--${s??n}`,i]}function Li(t,e,s=1){const[n,i]=Ca(t);if(!n)return;const r=window.getComputedStyle(e).getPropertyValue(n);if(r){const o=r.trim();return vi(o)?parseFloat(o):o}return Ge(i)?Li(i,e,s+1):i}function Da(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||xi(t):!0}const _a=new Set(["auto","none","0"]);function La(t,e,s){let n=0,i;for(;n<t.length&&!i;){const r=t[n];typeof r=="string"&&!_a.has(r)&&Ft(r).values.length&&(i=t[n]),n++}if(i&&s)for(const r of e)t[r]=Mi(s,i)}class ka extends Je{constructor(e,s,n,i,r){super(e,s,n,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:s,name:n}=this;if(!s||!s.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),Ge(c))){const u=Li(c,s.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!_i.has(n)||e.length!==2)return;const[i,r]=e,o=zs(i),a=zs(r);if(o!==a)if(Ns(o)&&Ns(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else ut[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:s}=this,n=[];for(let i=0;i<e.length;i++)(e[i]===null||Da(e[i]))&&n.push(i);n.length&&La(e,n,s)}measureInitialState(){const{element:e,unresolvedKeyframes:s,name:n}=this;if(!e||!e.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ut[n](e.measureViewportBox(),window.getComputedStyle(e.current)),s[0]=this.measuredOrigin;const i=s[s.length-1];i!==void 0&&e.getValue(n,i).jump(i,!1)}measureEndState(){var e;const{element:s,name:n,unresolvedKeyframes:i}=this;if(!s||!s.current)return;const r=s.getValue(n);r&&r.jump(this.measuredOrigin,!1);const o=i.length-1,a=i[o];i[o]=ut[n](s.measureViewportBox(),window.getComputedStyle(s.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(e=this.removedTransforms)!=null&&e.length&&this.removedTransforms.forEach(([l,c])=>{s.getValue(l).set(c)}),this.resolveNoneKeyframes()}}class ki extends Di{constructor(){super(...arguments),this.KeyframeResolver=ka}sortInstanceNodePosition(e,s){return e.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(e,s){return e.style?e.style[s]:void 0}removeValueFromRenderState(e,{vars:s,style:n}){delete s[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;j(e)&&(this.childSubscription=e.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}const Ri=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Ra={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ja=xt.length;function Ba(t,e,s){let n="",i=!0;for(let r=0;r<ja;r++){const o=xt[r],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||s){const c=Ri(a,es[o]);if(!l){i=!1;const u=Ra[o]||o;n+=`${u}(${c}) `}s&&(e[o]=c)}}return n=n.trim(),s?n=s(e,i?"":n):i&&(n="none"),n}function ji(t,e,s){const{style:n,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const c=e[l];if(bt.has(l)){o=!0;continue}else if(He(l)){i[l]=c;continue}else{const u=Ri(c,es[l]);l.startsWith("origin")?(a=!0,r[l]=u):n[l]=u}}if(e.transform||(o||s?n.transform=Ba(e,t.transform,s):n.transform&&(n.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=r;n.transformOrigin=`${l} ${c} ${u}`}}function Bi(t,{style:e,vars:s},n,i){const r=t.style;let o;for(o in e)r[o]=e[o];i==null||i.applyProjectionStyles(r,n);for(o in s)r.setProperty(o,s[o])}function Fa(t,{layout:e,layoutId:s}){return bt.has(t)||t.startsWith("origin")||(e||s!==void 0)&&(!!jt[t]||t==="opacity")}function Fi(t,e,s){var n;const{style:i}=t,r={};for(const o in i)(j(i[o])||e.style&&j(e.style[o])||Fa(o,t)||((n=s==null?void 0:s.getValue(o))==null?void 0:n.liveStyle)!==void 0)&&(r[o]=i[o]);return r}function Oa(t){return window.getComputedStyle(t)}class Oi extends ki{constructor(){super(...arguments),this.type="html",this.renderInstance=Bi}readValueFromInstance(e,s){var n;if(bt.has(s))return(n=this.projection)!=null&&n.isProjecting?De(s):na(e,s);{const i=Oa(e),r=(He(s)?i.getPropertyValue(s):i[s])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:s}){return Wr(e,s)}build(e,s,n){ji(e,s,n.transformTemplate)}scrapeMotionValuesFromProps(e,s,n){return Fi(e,s,n)}}const ns=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ia={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ua={offset:"strokeDashoffset",array:"strokeDasharray"};function $a(t,e,s=1,n=0,i=!0){t.pathLength=1;const r=i?Ia:Ua;t[r.offset]=b.transform(-n);const o=b.transform(e),a=b.transform(s);t[r.array]=`${o} ${a}`}function Na(t,{attrX:e,attrY:s,attrScale:n,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},l,c,u){if(ji(t,a,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;h.transform&&(d.transform=h.transform,delete h.transform),(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete h.transformBox),e!==void 0&&(h.x=e),s!==void 0&&(h.y=s),n!==void 0&&(h.scale=n),i!==void 0&&$a(h,i,r,o,!1)}const Ii=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Wa=t=>typeof t=="string"&&t.toLowerCase()==="svg";function za(t,e,s,n){Bi(t,e,void 0,n);for(const i in e.attrs)t.setAttribute(Ii.has(i)?i:ns(i),e.attrs[i])}function Ka(t,e,s){const n=Fi(t,e,s);for(const i in t)if(j(t[i])||j(e[i])){const r=xt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;n[r]=t[i]}return n}class Ui extends ki{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=L}getBaseTargetFromProps(e,s){return e[s]}readValueFromInstance(e,s){if(bt.has(s)){const n=Ei(s);return n&&n.default||0}return s=Ii.has(s)?s:ns(s),e.getAttribute(s)}scrapeMotionValuesFromProps(e,s,n){return Ka(e,s,n)}build(e,s,n){Na(e,s,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,s,n,i){za(e,s,n,i)}mount(e){this.isSVGTag=Wa(e.tagName),super.mount(e)}}function Ha(t,e){return ci(t)?new Ui(e):new Oi(e)}function Ga(t,e,s,n=0,i=1){const r=Array.from(t),o=r.indexOf(e),a=t.size,l=(a-1)*n,c=typeof s=="function";return o===r.length-1&&(e.parent.enteringChildren=void 0),c?s(o,a):i===1?o*n:l-o*n}function is(t){return typeof t=="object"&&!Array.isArray(t)}function os(t,e,s){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let n=document;const i=(s==null?void 0:s[t])??n.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}function $i(t,e,s,n){return typeof t=="string"&&is(e)?os(t,s,n):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function Xa(t,e,s){return t*(e+1)}function Gs(t,e,s,n){return typeof e=="number"?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):e==="<"?s:e.startsWith("<")?Math.max(0,s+parseFloat(e.slice(1))):n.get(e)??t}const C=(t,e,s)=>t+(e-t)*s,Ya=(t,e,s)=>{const n=e-t;return((s-t)%n+n)%n+t},Ni=t=>Array.isArray(t)&&typeof t[0]!="number";function Wi(t,e){return Ni(t)?t[Ya(0,t.length,e)]:t}function qa(t,e,s){for(let n=0;n<t.length;n++){const i=t[n];i.at>e&&i.at<s&&(ue(t,i),n--)}}function Za(t,e,s,n,i,r){qa(t,i,r);for(let o=0;o<e.length;o++)t.push({value:e[o],at:C(i,r,n[o]),easing:Wi(s,o)})}function Ja(t,e){for(let s=0;s<t.length;s++)t[s]=t[s]/(e+1)}function Qa(t,e){return t.at===e.at?t.value===null?1:e.value===null?-1:0:t.at-e.at}const vt=(t,e,s)=>{const n=e-t;return n===0?1:(s-t)/n};function zi(t,e){const s=t[t.length-1];for(let n=1;n<=e;n++){const i=vt(0,e,n);t.push(C(s,1,i))}}function Ki(t){const e=[0];return zi(e,t.length-1),e}const ie=2e4;function rs(t){let e=0;const s=50;let n=t.next(e);for(;!n.done&&e<ie;)e+=s,n=t.next(e);return e>=ie?1/0:e}function Hi(t,e=100,s){const n=s({...t,keyframes:[0,e]}),i=Math.min(rs(n),ie);return{type:"keyframes",ease:r=>n.next(i*r).value/e,duration:X(i)}}function as(t){return typeof t=="function"&&"applyToOptions"in t}const tl="easeInOut";function el(t,{defaultTransition:e={},...s}={},n,i){const r=e.duration||.3,o=new Map,a=new Map,l={},c=new Map;let u=0,h=0,d=0;for(let f=0;f<t.length;f++){const p=t[f];if(typeof p=="string"){c.set(p,h);continue}else if(!Array.isArray(p)){c.set(p.name,Gs(h,p.at,u,c));continue}let[m,y,v={}]=p;v.at!==void 0&&(h=Gs(h,v.at,u,c));let w=0;const T=(A,x,P,D=0,S=0)=>{const E=sl(A),{delay:U=0,times:K=Ki(E),type:ce="keyframes",repeat:Wt,repeatType:yd,repeatDelay:vd=0,...Io}=x;let{ease:nt=e.ease||"easeOut",duration:q}=x;const xs=typeof U=="function"?U(D,S):U,bs=E.length,Ts=as(ce)?ce:i==null?void 0:i[ce||"keyframes"];if(bs<=2&&Ts){let wt=100;if(bs===2&&ol(E)){const St=E[1]-E[0];wt=Math.abs(St)}const zt={...Io};q!==void 0&&(zt.duration=z(q));const Kt=Hi(zt,wt,Ts);nt=Kt.ease,q=Kt.duration}q??(q=r);const ws=h+xs;K.length===1&&K[0]===0&&(K[1]=1);const Ss=K.length-E.length;if(Ss>0&&zi(K,Ss),E.length===1&&E.unshift(null),Wt){q=Xa(q,Wt);const wt=[...E],zt=[...K];nt=Array.isArray(nt)?[...nt]:[nt];const Kt=[...nt];for(let St=0;St<Wt;St++){E.push(...wt);for(let At=0;At<wt.length;At++)K.push(zt[At]+(St+1)),nt.push(At===0?"linear":Wi(Kt,At-1))}Ja(K,Wt)}const As=ws+q;Za(P,E,nt,K,ws,As),w=Math.max(xs+q,w),d=Math.max(As,d)};if(j(m)){const A=Xs(m,a);T(y,v,Ys("default",A))}else{const A=$i(m,y,n,l),x=A.length;for(let P=0;P<x;P++){y=y,v=v;const D=A[P],S=Xs(D,a);for(const E in y)T(y[E],nl(v,E),Ys(E,S),P,x)}}u=h,h+=w}return a.forEach((f,p)=>{for(const m in f){const y=f[m];y.sort(Qa);const v=[],w=[],T=[];for(let x=0;x<y.length;x++){const{at:P,value:D,easing:S}=y[x];v.push(D),w.push(vt(0,d,P)),T.push(S||"easeOut")}w[0]!==0&&(w.unshift(0),v.unshift(v[0]),T.unshift(tl)),w[w.length-1]!==1&&(w.push(1),v.push(null)),o.has(p)||o.set(p,{keyframes:{},transition:{}});const A=o.get(p);A.keyframes[m]=v,A.transition[m]={...e,duration:d,ease:T,times:w,...s}}}),o}function Xs(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Ys(t,e){return e[t]||(e[t]=[]),e[t]}function sl(t){return Array.isArray(t)?t:[t]}function nl(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const il=t=>typeof t=="number",ol=t=>t.every(il),rl=t=>Array.isArray(t);function al(t,e,s){const n=t.getProps();return mi(n,e,n.custom,t)}function ll(t,e,s){t.hasValue(e)?t.getValue(e).set(s):t.addValue(e,yt(s))}function ul(t){return rl(t)?t[t.length-1]||0:t}function cl(t,e){const s=al(t,e);let{transitionEnd:n={},transition:i={},...r}=s||{};r={...r,...n};for(const o in r){const a=ul(r[o]);ll(t,o,a)}}function hl(t){return!!(j(t)&&t.add)}function dl(t,e){const s=t.getValue("willChange");if(hl(s))return s.add(e);if(!s&&Q.WillChange){const n=new Q.WillChange("auto");t.addValue("willChange",n),n.add(e)}}const fl="framerAppearId",pl="data-"+ns(fl);function Gi(t){return t.props[pl]}const ml=t=>t!==null;function gl(t,{repeat:e,repeatType:s="loop"},n){const i=t.filter(ml),r=e&&s!=="loop"&&e%2===1?0:i.length-1;return i[r]}const yl={type:"spring",stiffness:500,damping:25,restSpeed:10},vl=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),xl={type:"keyframes",duration:.8},bl={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Tl=(t,{keyframes:e})=>e.length>2?xl:bt.has(t)?t.startsWith("scale")?vl(e[1]):yl:bl;function wl({when:t,delay:e,delayChildren:s,staggerChildren:n,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function ls(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}function Fe(t){t.duration=0,t.type}function fe(t,e,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?t+(e-t)*6*s:s<1/2?e:s<2/3?t+(e-t)*(2/3-s)*6:t}function Sl({hue:t,saturation:e,lightness:s,alpha:n}){t/=360,e/=100,s/=100;let i=0,r=0,o=0;if(!e)i=r=o=s;else{const a=s<.5?s*(1+e):s+e-s*e,l=2*s-a;i=fe(l,a,t+1/3),r=fe(l,a,t),o=fe(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:n}}function oe(t,e){return s=>s>0?e:t}const pe=(t,e,s)=>{const n=t*t,i=s*(e*e-n)+n;return i<0?0:Math.sqrt(i)},Al=[je,lt,pt],Pl=t=>Al.find(e=>e.test(t));function qs(t){const e=Pl(t);if(!e)return!1;let s=e.parse(t);return e===pt&&(s=Sl(s)),s}const Zs=(t,e)=>{const s=qs(t),n=qs(e);if(!s||!n)return oe(t,e);const i={...s};return r=>(i.red=pe(s.red,n.red,r),i.green=pe(s.green,n.green,r),i.blue=pe(s.blue,n.blue,r),i.alpha=C(s.alpha,n.alpha,r),lt.transform(i))},Oe=new Set(["none","hidden"]);function Vl(t,e){return Oe.has(t)?s=>s<=0?t:e:s=>s>=1?e:t}const El=(t,e)=>s=>e(t(s)),$t=(...t)=>t.reduce(El);function Ml(t,e){return s=>C(t,e,s)}function us(t){return typeof t=="number"?Ml:typeof t=="string"?Ge(t)?oe:R.test(t)?Zs:_l:Array.isArray(t)?Xi:typeof t=="object"?R.test(t)?Zs:Cl:oe}function Xi(t,e){const s=[...t],n=s.length,i=t.map((r,o)=>us(r)(r,e[o]));return r=>{for(let o=0;o<n;o++)s[o]=i[o](r);return s}}function Cl(t,e){const s={...t,...e},n={};for(const i in s)t[i]!==void 0&&e[i]!==void 0&&(n[i]=us(t[i])(t[i],e[i]));return i=>{for(const r in n)s[r]=n[r](i);return s}}function Dl(t,e){const s=[],n={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const r=e.types[i],o=t.indexes[r][n[r]],a=t.values[o]??0;s[i]=a,n[r]++}return s}const _l=(t,e)=>{const s=ot.createTransformer(e),n=Ft(t),i=Ft(e);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?Oe.has(t)&&!i.values.length||Oe.has(e)&&!n.values.length?Vl(t,e):$t(Xi(Dl(n,i),i.values),s):oe(t,e)};function Yi(t,e,s){return typeof t=="number"&&typeof e=="number"&&typeof s=="number"?C(t,e,s):us(t)(t,e)}const Ll=t=>{const e=({timestamp:s})=>t(s);return{start:(s=!0)=>M.update(e,s),stop:()=>tt(e),now:()=>B.isProcessing?B.timestamp:O.now()}},qi=(t,e,s=10)=>{let n="";const i=Math.max(Math.round(e/s),2);for(let r=0;r<i;r++)n+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},kl=5;function Zi(t,e,s){const n=Math.max(e-kl,0);return pi(s-t(n),e-n)}const _={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},me=.001;function Rl({duration:t=_.duration,bounce:e=_.bounce,velocity:s=_.velocity,mass:n=_.mass}){let i,r,o=1-e;o=et(_.minDamping,_.maxDamping,o),t=et(_.minDuration,_.maxDuration,X(t)),o<1?(i=c=>{const u=c*o,h=u*t,d=u-s,f=Ie(c,o),p=Math.exp(-h);return me-d/f*p},r=c=>{const h=c*o*t,d=h*s+s,f=Math.pow(o,2)*Math.pow(c,2)*t,p=Math.exp(-h),m=Ie(Math.pow(c,2),o);return(-i(c)+me>0?-1:1)*((d-f)*p)/m}):(i=c=>{const u=Math.exp(-c*t),h=(c-s)*t+1;return-me+u*h},r=c=>{const u=Math.exp(-c*t),h=(s-c)*(t*t);return u*h});const a=5/t,l=Bl(i,r,a);if(t=z(t),isNaN(l))return{stiffness:_.stiffness,damping:_.damping,duration:t};{const c=Math.pow(l,2)*n;return{stiffness:c,damping:o*2*Math.sqrt(n*c),duration:t}}}const jl=12;function Bl(t,e,s){let n=s;for(let i=1;i<jl;i++)n=n-t(n)/e(n);return n}function Ie(t,e){return t*Math.sqrt(1-e*e)}const Fl=["duration","bounce"],Ol=["stiffness","damping","mass"];function Js(t,e){return e.some(s=>t[s]!==void 0)}function Il(t){let e={velocity:_.velocity,stiffness:_.stiffness,damping:_.damping,mass:_.mass,isResolvedFromDuration:!1,...t};if(!Js(t,Ol)&&Js(t,Fl))if(t.visualDuration){const s=t.visualDuration,n=2*Math.PI/(s*1.2),i=n*n,r=2*et(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:_.mass,stiffness:i,damping:r}}else{const s=Rl(t);e={...e,...s,mass:_.mass},e.isResolvedFromDuration=!0}return e}function Ot(t=_.visualDuration,e=_.bounce){const s=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:n,restDelta:i}=s;const r=s.keyframes[0],o=s.keyframes[s.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:c,mass:u,duration:h,velocity:d,isResolvedFromDuration:f}=Il({...s,velocity:-X(s.velocity||0)}),p=d||0,m=c/(2*Math.sqrt(l*u)),y=o-r,v=X(Math.sqrt(l/u)),w=Math.abs(y)<5;n||(n=w?_.restSpeed.granular:_.restSpeed.default),i||(i=w?_.restDelta.granular:_.restDelta.default);let T;if(m<1){const x=Ie(v,m);T=P=>{const D=Math.exp(-m*v*P);return o-D*((p+m*v*y)/x*Math.sin(x*P)+y*Math.cos(x*P))}}else if(m===1)T=x=>o-Math.exp(-v*x)*(y+(p+v*y)*x);else{const x=v*Math.sqrt(m*m-1);T=P=>{const D=Math.exp(-m*v*P),S=Math.min(x*P,300);return o-D*((p+m*v*y)*Math.sinh(S)+x*y*Math.cosh(S))/x}}const A={calculatedDuration:f&&h||null,next:x=>{const P=T(x);if(f)a.done=x>=h;else{let D=x===0?p:0;m<1&&(D=x===0?z(p):Zi(T,x,P));const S=Math.abs(D)<=n,E=Math.abs(o-P)<=i;a.done=S&&E}return a.value=a.done?o:P,a},toString:()=>{const x=Math.min(rs(A),ie),P=qi(D=>A.next(x*D).value,x,30);return x+"ms "+P},toTransition:()=>{}};return A}Ot.applyToOptions=t=>{const e=Hi(t,100,Ot);return t.ease=e.ease,t.duration=z(e.duration),t.type="keyframes",t};function Ue({keyframes:t,velocity:e=0,power:s=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},f=S=>a!==void 0&&S<a||l!==void 0&&S>l,p=S=>a===void 0?l:l===void 0||Math.abs(a-S)<Math.abs(l-S)?a:l;let m=s*e;const y=h+m,v=o===void 0?y:o(y);v!==y&&(m=v-h);const w=S=>-m*Math.exp(-S/n),T=S=>v+w(S),A=S=>{const E=w(S),U=T(S);d.done=Math.abs(E)<=c,d.value=d.done?v:U};let x,P;const D=S=>{f(d.value)&&(x=S,P=Ot({keyframes:[d.value,p(d.value)],velocity:Zi(T,S,d.value),damping:i,stiffness:r,restDelta:c,restSpeed:u}))};return D(0),{calculatedDuration:null,next:S=>{let E=!1;return!P&&x===void 0&&(E=!0,A(S),D(S)),x!==void 0&&S>=x?P.next(S-x):(!E&&A(S),d)}}}function Ul(t,e,s){const n=[],i=s||Q.mix||Yi,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||I:e;a=$t(l,a)}n.push(a)}return n}function $l(t,e,{clamp:s=!0,ease:n,mixer:i}={}){const r=t.length;if(ss(r===e.length),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Ul(e,n,i),l=a.length,c=u=>{if(o&&u<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(u<t[h+1]);h++);const d=vt(t[h],t[h+1],u);return a[h](d)};return s?u=>c(et(t[0],t[r-1],u)):c}function Nl(t,e){return t.map(s=>s*e)}const Ji=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,Wl=1e-7,zl=12;function Kl(t,e,s,n,i){let r,o,a=0;do o=e+(s-e)/2,r=Ji(o,n,i)-t,r>0?s=o:e=o;while(Math.abs(r)>Wl&&++a<zl);return o}function Nt(t,e,s,n){if(t===e&&s===n)return I;const i=r=>Kl(r,0,1,t,s);return r=>r===0||r===1?r:Ji(i(r),e,n)}const Hl=Nt(.42,0,1,1),Gl=Nt(0,0,.58,1),Qi=Nt(.42,0,.58,1),to=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,eo=t=>e=>1-t(1-e),so=Nt(.33,1.53,.69,.99),cs=eo(so),no=to(cs),io=t=>(t*=2)<1?.5*cs(t):.5*(2-Math.pow(2,-10*(t-1))),hs=t=>1-Math.sin(Math.acos(t)),oo=eo(hs),ro=to(hs),ao=t=>Array.isArray(t)&&typeof t[0]=="number",Xl={linear:I,easeIn:Hl,easeInOut:Qi,easeOut:Gl,circIn:hs,circInOut:ro,circOut:oo,backIn:cs,backInOut:no,backOut:so,anticipate:io},Yl=t=>typeof t=="string",Qs=t=>{if(ao(t)){ss(t.length===4);const[e,s,n,i]=t;return Nt(e,s,n,i)}else if(Yl(t))return Xl[t];return t};function ql(t,e){return t.map(()=>e||Qi).splice(0,t.length-1)}function _t({duration:t=300,keyframes:e,times:s,ease:n="easeInOut"}){const i=Ni(n)?n.map(Qs):Qs(n),r={done:!1,value:e[0]},o=Nl(s&&s.length===e.length?s:Ki(e),t),a=$l(o,e,{ease:Array.isArray(i)?i:ql(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const Zl=t=>t!==null;function ds(t,{repeat:e,repeatType:s="loop"},n,i=1){const r=t.filter(Zl),a=i<0||e&&s!=="loop"&&e%2===1?0:r.length-1;return!a||n===void 0?r[a]:n}const Jl={decay:Ue,inertia:Ue,tween:_t,keyframes:_t,spring:Ot};function lo(t){typeof t.type=="string"&&(t.type=Jl[t.type])}class fs{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,s){return this.finished.then(e,s)}}const Ql=t=>t/100;class ps extends fs{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,n;const{motionValue:i}=this.options;i&&i.updatedAt!==O.now()&&this.tick(O.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(n=(s=this.options).onStop)==null||n.call(s))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;lo(e);const{type:s=_t,repeat:n=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const l=s||_t;l!==_t&&typeof a[0]!="number"&&(this.mixKeyframes=$t(Ql,Yi(a[0],a[1])),a=[0,100]);const c=l({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=rs(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(n+1)-i,this.generator=c}updateTime(e){const s=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(e,s=!1){const{generator:n,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return n.next(0);const{delay:c=0,keyframes:u,repeat:h,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),s?this.currentTime=e:this.updateTime(e);const v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?v<0:v>i;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let T=this.currentTime,A=n;if(h){const S=Math.min(this.currentTime,i)/a;let E=Math.floor(S),U=S%1;!U&&S>=1&&(U=1),U===1&&E--,E=Math.min(E,h+1),!!(E%2)&&(d==="reverse"?(U=1-U,f&&(U-=f/a)):d==="mirror"&&(A=o)),T=et(0,1,U)*a}const x=w?{done:!1,value:u[0]}:A.next(T);r&&(x.value=r(x.value));let{done:P}=x;!w&&l!==null&&(P=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return D&&p!==Ue&&(x.value=ds(u,this.options,y,this.speed)),m&&m(x.value),D&&this.finish(),x}then(e,s){return this.finished.then(e,s)}get duration(){return X(this.calculatedDuration)}get time(){return X(this.currentTime)}set time(e){var s;e=z(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(s=this.driver)==null||s.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(O.now());const s=this.playbackSpeed!==e;this.playbackSpeed=e,s&&(this.time=X(this.currentTime))}play(){var e,s;if(this.isStopped)return;const{driver:n=Ll,startTime:i}=this.options;this.driver||(this.driver=n(o=>this.tick(o))),(s=(e=this.options).onPlay)==null||s.call(e);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=i??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(O.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,s;this.notifyFinished(),this.teardown(),this.state="finished",(s=(e=this.options).onComplete)==null||s.call(e)}cancel(){var e,s;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(s=(e=this.options).onCancel)==null||s.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var s;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(s=this.driver)==null||s.stop(),e.observe(this)}}const tu=t=>t.startsWith("--");function eu(t,e,s){tu(e)?t.style.setProperty(e,s):t.style[e]=s}function ms(t){let e;return()=>(e===void 0&&(e=t()),e)}const su=ms(()=>window.ScrollTimeline!==void 0),nu={};function iu(t,e){const s=ms(t);return()=>nu[e]??s()}const uo=iu(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Et=([t,e,s,n])=>`cubic-bezier(${t}, ${e}, ${s}, ${n})`,tn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Et([0,.65,.55,1]),circOut:Et([.55,0,1,.45]),backIn:Et([.31,.01,.66,-.59]),backOut:Et([.33,1.53,.69,.99])};function co(t,e){if(t)return typeof t=="function"?uo()?qi(t,e):"ease-out":ao(t)?Et(t):Array.isArray(t)?t.map(s=>co(s,e)||tn.easeOut):tn[t]}function ou(t,e,s,{delay:n=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:s};l&&(u.offset=l);const h=co(a,i);Array.isArray(h)&&(u.easing=h);const d={delay:n,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return c&&(d.pseudoElement=c),t.animate(u,d)}function ru({type:t,...e}){return as(t)&&uo()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class au extends fs{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:s,name:n,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,ss(typeof e.type!="string");const c=ru(e);this.animation=ou(s,n,i,c,r),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const u=ds(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):eu(s,n,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,s;(s=(e=this.animation).finish)==null||s.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,s;this.isPseudoElement||(s=(e=this.animation).commitStyles)==null||s.call(e)}get duration(){var e,s;const n=((s=(e=this.animation.effect)==null?void 0:e.getComputedTiming)==null?void 0:s.call(e).duration)||0;return X(Number(n))}get time(){return X(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=z(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:s}){var n;return this.allowFlatten&&((n=this.animation.effect)==null||n.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&su()?(this.animation.timeline=e,I):s(this)}}const ho={anticipate:io,backInOut:no,circInOut:ro};function lu(t){return t in ho}function uu(t){typeof t.ease=="string"&&lu(t.ease)&&(t.ease=ho[t.ease])}const en=10;class cu extends au{constructor(e){uu(e),lo(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:s,onUpdate:n,onComplete:i,element:r,...o}=this.options;if(!s)return;if(e!==void 0){s.set(e);return}const a=new ps({...o,autoplay:!1}),l=z(this.finishedTime??this.time);s.setWithVelocity(a.sample(l-en).value,a.sample(l).value,en),a.stop()}}const sn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(ot.test(t)||t==="0")&&!t.startsWith("url("));function hu(t){const e=t[0];if(t.length===1)return!0;for(let s=0;s<t.length;s++)if(t[s]!==e)return!0}function du(t,e,s,n){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=sn(i,e),a=sn(r,e);return!o||!a?!1:hu(t)||(s==="spring"||as(s))&&n}const fu=new Set(["opacity","clipPath","filter","transform"]),pu=ms(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function mu(t){var e;const{motionValue:s,name:n,repeatDelay:i,repeatType:r,damping:o,type:a}=t;if(!(((e=s==null?void 0:s.owner)==null?void 0:e.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=s.owner.getProps();return pu()&&n&&fu.has(n)&&(n!=="transform"||!u)&&!c&&!i&&r!=="mirror"&&o!==0&&a!=="inertia"}const gu=40;class yu extends fs{constructor({autoplay:e=!0,delay:s=0,type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:c,element:u,...h}){var d;super(),this.stop=()=>{var m,y;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=O.now();const f={autoplay:e,delay:s,type:n,repeat:i,repeatDelay:r,repeatType:o,name:l,motionValue:c,element:u,...h},p=(u==null?void 0:u.KeyframeResolver)||Je;this.keyframeResolver=new p(a,(m,y,v)=>this.onKeyframesResolved(m,y,f,!v),l,c,u),(d=this.keyframeResolver)==null||d.scheduleResolve()}onKeyframesResolved(e,s,n,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=n;this.resolvedAt=O.now(),du(e,r,o,a)||((Q.instantAnimations||!l)&&(u==null||u(ds(e,n,s))),e[0]=e[e.length-1],Fe(n),n.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>gu?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:s,...n,keyframes:e},f=!c&&mu(d)?new cu({...d,element:d.motionValue.owner.current}):new ps(d);f.finished.then(()=>this.notifyFinished()).catch(I),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(e,s){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),la()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}const gs=(t,e,s,n={},i,r)=>o=>{const a=ls(n,t)||{},l=a.delay||n.delay||0;let{elapsed:c=0}=n;c=c-z(l);const u={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:d=>{e.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};wl(a)||Object.assign(u,Tl(t,u)),u.duration&&(u.duration=z(u.duration)),u.repeatDelay&&(u.repeatDelay=z(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Fe(u),u.delay===0&&(h=!0)),(Q.instantAnimations||Q.skipAnimations)&&(h=!0,Fe(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const d=gl(u.keyframes,a);if(d!==void 0){M.update(()=>{u.onUpdate(d),u.onComplete()});return}}return a.isSync?new ps(u):new yu(u)};function vu({protectedKeys:t,needsAnimating:e},s){const n=t.hasOwnProperty(s)&&e[s]!==!0;return e[s]=!1,n}function xu(t,e,{delay:s=0,transitionOverride:n,type:i}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:o,...a}=e;n&&(r=n);const l=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const u in a){const h=t.getValue(u,t.latestValues[u]??null),d=a[u];if(d===void 0||c&&vu(c,u))continue;const f={delay:s,...ls(r||{},u)},p=h.get();if(p!==void 0&&!h.isAnimating&&!Array.isArray(d)&&d===p&&!f.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const v=Gi(t);if(v){const w=window.MotionHandoffAnimation(v,u,M);w!==null&&(f.startTime=w,m=!0)}}dl(t,u),h.start(gs(u,h,d,t.shouldReduceMotion&&_i.has(u)?{type:!1}:f,t,m));const y=h.animation;y&&l.push(y)}return o&&Promise.all(l).then(()=>{M.update(()=>{o&&cl(t,o)})}),l}function bu(t,e){return t in e}class Tu extends Di{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,s){if(bu(s,e)){const n=e[s];if(typeof n=="string"||typeof n=="number")return n}}getBaseTargetFromProps(){}removeValueFromRenderState(e,s){delete s.output[e]}measureInstanceViewportBox(){return L()}build(e,s){Object.assign(e.output,s)}renderInstance(e,{output:s}){Object.assign(e,s)}sortInstanceNodePosition(){return 0}}function fo(t){return typeof t=="object"&&t!==null}function ys(t){return fo(t)&&"ownerSVGElement"in t}function po(t){return ys(t)&&t.tagName==="svg"}function wu(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},s=ys(t)&&!po(t)?new Ui(e):new Oi(e);s.mount(t),ht.set(t,s)}function Su(t){const e={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},s=new Tu(e);s.mount(t),ht.set(t,s)}function mo(t,e,s){const n=j(t)?t:yt(t);return n.start(gs("",n,e,s)),n.animation}function Au(t,e){return j(t)||typeof t=="number"||typeof t=="string"&&!is(e)}function go(t,e,s,n){const i=[];if(Au(t,e))i.push(mo(t,is(e)&&e.default||e,s&&(s.default||s)));else{const r=$i(t,e,n),o=r.length;for(let a=0;a<o;a++){const l=r[a],c=l instanceof Element?wu:Su;ht.has(l)||c(l);const u=ht.get(l),h={...s};"delay"in h&&typeof h.delay=="function"&&(h.delay=h.delay(a,o)),i.push(...xu(u,{...e,transition:h},{}))}}return i}function Pu(t,e,s){const n=[];return el(t,e,s,{spring:Ot}).forEach(({keyframes:r,transition:o},a)=>{n.push(...go(a,r,o))}),n}class Vu{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,s){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=s}attachTimeline(e){const s=this.animations.map(n=>n.attachTimeline(e));return()=>{s.forEach((n,i)=>{n&&n(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let s=0;s<this.animations.length;s++)e=Math.max(e,this.animations[s].duration);return e}runAll(e){this.animations.forEach(s=>s[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Eu extends Vu{then(e,s){return this.finished.finally(e).then(()=>{})}}function Mu(t){return Array.isArray(t)&&t.some(Array.isArray)}function Cu(t){function e(s,n,i){let r=[];return Mu(s)?r=Pu(s,n,t):r=go(s,n,i,t),new Eu(r)}return e}const Du=Cu(),_u=["initial","animate","whileInView","whileHover","whilePress","whileDrag","whileFocus","exit"];class Lu extends st{constructor(e){var s,n;super(e),this.animateUpdates=({controlActiveState:i,directAnimate:r,directTransition:o,controlDelay:a=0,isExit:l}={})=>{const{reducedMotion:c}=this.state.options.motionConfig;this.state.visualElement.shouldReduceMotion=c==="always"||c==="user"&&!!ne.current;const u=this.state.target;this.state.target={...this.state.baseTarget};let h={};h=this.resolveStateAnimation({controlActiveState:i,directAnimate:r,directTransition:o}),this.state.finalTransition=h;const d=this.createAnimationFactories(u,h,a),{getChildAnimations:f}=this.setupChildAnimations(h,this.state.activeStates);return this.executeAnimations({factories:d,getChildAnimations:f,transition:h,controlActiveState:i,isExit:l})},this.state.visualElement=Ha(this.state.options.as,{presenceContext:null,parent:(s=this.state.parent)==null?void 0:s.visualElement,props:{...this.state.options,whileTap:this.state.options.whilePress},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{...this.state.baseTarget}},reducedMotionConfig:this.state.options.motionConfig.reducedMotion}),(n=this.state.visualElement.parent)==null||n.addChild(this.state.visualElement),this.state.animateUpdates=this.animateUpdates,this.state.isMounted()&&this.state.startAnimation()}updateAnimationControlsSubscription(){const{animate:e}=this.state.options;Vs(e)&&(this.unmountControls=e.subscribe(this.state))}executeAnimations({factories:e,getChildAnimations:s,transition:n,controlActiveState:i,isExit:r=!1}){const o=()=>Promise.all(e.map(h=>h()).filter(Boolean)),a={...this.state.target},l=this.state.element,c=h=>{var d,f;l.dispatchEvent(Ms("motionstart",a)),(f=(d=this.state.options).onAnimationStart)==null||f.call(d,a),h.then(()=>{var p,m;l.dispatchEvent(Ms("motioncomplete",a,r)),(m=(p=this.state.options).onAnimationComplete)==null||m.call(p,a)}).catch(I)},u=()=>{const h=n!=null&&n.when?(n.when==="beforeChildren"?o():s()).then(()=>n.when==="beforeChildren"?s():o()):Promise.all([o(),s()]);return c(h),h};return i?u:u()}setupChildAnimations(e,s){var n;const i=this.state.visualElement;if(!((n=i.variantChildren)!=null&&n.size)||!s)return{getChildAnimations:()=>Promise.resolve()};const{staggerChildren:r=0,staggerDirection:o=1,delayChildren:a=0}=e||{},l=i.variantChildren.size,c=(l-1)*r,u=typeof a=="function",h=u?f=>a(f,l):o===1?(f=0)=>f*r:(f=0)=>c-f*r,d=Array.from(i.variantChildren).map((f,p)=>f.state.animateUpdates({controlActiveState:s,controlDelay:(u?0:a)+h(p)}));return{getChildAnimations:()=>Promise.all(d.map(f=>f()))}}createAnimationFactories(e,s,n){const i=[];return Object.keys(this.state.target).forEach(r=>{var o;if(!pr(e[r],this.state.target[r]))return;(o=this.state.baseTarget)[r]??(o[r]=jr.get(this.state.element,r));const a=this.state.target[r]==="none"&&ks(_s[r])?_s[r]:this.state.target[r];i.push(()=>{var l;return Du(this.state.element,{[r]:a},{...(s==null?void 0:s[r])||s,delay:(((l=s==null?void 0:s[r])==null?void 0:l.delay)||(s==null?void 0:s.delay)||0)+n})})}),i}resolveStateAnimation({controlActiveState:e,directAnimate:s,directTransition:n}){let i=this.state.options.transition,r={};const{variants:o,custom:a,transition:l,animatePresenceContext:c}=this.state.options,u=a??(c==null?void 0:c.custom);return this.state.activeStates={...this.state.activeStates,...e},_u.forEach(h=>{if(!this.state.activeStates[h]||Vs(this.state.options[h]))return;const d=this.state.options[h];let f=ks(d)?Ct(d,o,u):void 0;if(this.state.visualElement.isVariantNode){const p=Ct(this.state.context[h],o,u);f=Object.assign(p?p||{}:r,f)}f&&(h!=="initial"&&(i=f.transition||this.state.options.transition||{}),r=Object.assign(r,f))}),s&&(r=Ct(s,o,u),i=r.transition||n||l),Object.entries(r).forEach(([h,d])=>{h!=="transition"&&(this.state.target[h]=d)}),i}mount(){var e,s;const{element:n}=this.state;hi.set(n,this.state),ht.get(n)||(this.state.visualElement.mount(n),ht.set(n,this.state.visualElement)),this.state.visualElement.state=this.state,this.updateAnimationControlsSubscription();const i=this.state.visualElement,r=i.parent;if(i.enteringChildren=void 0,(e=this.state.parent)!=null&&e.isMounted()&&!i.isControllingVariants&&((s=r==null?void 0:r.enteringChildren)!=null&&s.has(i))){const{delayChildren:o}=this.state.parent.finalTransition||{};this.animateUpdates({controlActiveState:this.state.parent.activeStates,controlDelay:Ga(r.enteringChildren,i,o)})()}}update(){const{animate:e}=this.state.options,{animate:s}=this.state.visualElement.prevProps||{};e!==s&&this.updateAnimationControlsSubscription()}unmount(){var e;(e=this.unmountControls)==null||e.call(this)}}function ku(t){return fo(t)&&"offsetHeight"in t}const Ru={y:!1};function ju(){return Ru.y}const yo=(t,e)=>e?t===e?!0:yo(t,e.parentElement):!1,Bu=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function vo(t,e){const s=os(t),n=new AbortController,i={passive:!0,...e,signal:n.signal};return[s,i,()=>n.abort()]}const Fu=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ou(t){return Fu.has(t.tagName)||t.tabIndex!==-1}const Qt=new WeakSet;function nn(t){return e=>{e.key==="Enter"&&t(e)}}function ge(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Iu=(t,e)=>{const s=t.currentTarget;if(!s)return;const n=nn(()=>{if(Qt.has(s))return;ge(s,"down");const i=nn(()=>{ge(s,"up")}),r=()=>ge(s,"cancel");s.addEventListener("keyup",i,e),s.addEventListener("blur",r,e)});s.addEventListener("keydown",n,e),s.addEventListener("blur",()=>s.removeEventListener("keydown",n),e)};function on(t){return Bu(t)&&!0}function Uu(t,e,s={}){const[n,i,r]=vo(t,s),o=a=>{const l=a.currentTarget;if(!on(a))return;Qt.add(l);const c=e(l,a),u=(f,p)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",d),Qt.has(l)&&Qt.delete(l),on(f)&&typeof c=="function"&&c(f,{success:p})},h=f=>{u(f,l===window||l===document||s.useGlobalTarget||yo(l,f.target))},d=f=>{u(f,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",d,i)};return n.forEach(a=>{(s.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),ku(a)&&(a.addEventListener("focus",c=>Iu(c,i)),!Ou(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function xo(t){return{point:{x:t.pageX,y:t.pageY}}}function rn(t,e,s){const n=t.options;n.whilePress&&t.setActive("whilePress",s==="Start");const i=`onPress${s==="End"?"":s}`,r=n[i];r&&M.postRender(()=>r(e,xo(e)))}class $u extends st{isActive(){const{whilePress:e,onPress:s,onPressCancel:n,onPressStart:i}=this.state.options;return!!(e||s||n||i)}constructor(e){super(e)}mount(){this.register()}update(){const{whilePress:e,onPress:s,onPressCancel:n,onPressStart:i}=this.state.options;e||s||n||i||this.register()}register(){const e=this.state.element;!e||!this.isActive()||(this.unmount(),this.unmount=Uu(e,(s,n)=>(rn(this.state,n,"Start"),(i,{success:r})=>rn(this.state,i,r?"End":"Cancel")),{useGlobalTarget:this.state.options.globalPressTarget}))}}function an(t){return!(t.pointerType==="touch"||ju())}function Nu(t,e,s={}){const[n,i,r]=vo(t,s),o=a=>{if(!an(a))return;const{target:l}=a,c=e(l,a);if(typeof c!="function"||!l)return;const u=h=>{an(h)&&(c(h),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,i)};return n.forEach(a=>{a.addEventListener("pointerenter",o,i)}),r}function ln(t,e,s){const n=t.options;n.whileHover&&t.setActive("whileHover",s==="Start");const i=`onHover${s}`,r=n[i];r&&M.postRender(()=>r(e,xo(e)))}class Wu extends st{isActive(){const{whileHover:e,onHoverStart:s,onHoverEnd:n}=this.state.options;return!!(e||s||n)}constructor(e){super(e)}mount(){this.register()}update(){const{whileHover:e,onHoverStart:s,onHoverEnd:n}=this.state.visualElement.prevProps;e||s||n||this.register()}register(){const e=this.state.element;!e||!this.isActive()||(this.unmount(),this.unmount=Nu(e,(s,n)=>(ln(this.state,n,"Start"),i=>{ln(this.state,i,"End")})))}}const zu={some:0,all:1};function Ku(t,e,{root:s,margin:n,amount:i="some"}={}){const r=os(t),o=new WeakMap,a=c=>{c.forEach(u=>{const h=o.get(u.target);if(u.isIntersecting!==!!h)if(u.isIntersecting){const d=e(u.target,u);typeof d=="function"?o.set(u.target,d):l.unobserve(u.target)}else typeof h=="function"&&(h(u),o.delete(u.target))})},l=new IntersectionObserver(a,{root:s,rootMargin:n,threshold:typeof i=="number"?i:zu[i]});return r.forEach(c=>l.observe(c)),()=>l.disconnect()}function un(t,e,s){const n=t.options;n.whileInView&&t.setActive("whileInView",s==="Enter");const i=`onViewport${s}`,r=n[i];r&&M.postRender(()=>r(e))}class Hu extends st{isActive(){const{whileInView:e,onViewportEnter:s,onViewportLeave:n}=this.state.options;return!!(e||s||n)}constructor(e){super(e)}startObserver(){const e=this.state.element;if(!e||!this.isActive())return;this.unmount();const{once:s,...n}=this.state.options.inViewOptions||{};this.unmount=Ku(e,(i,r)=>{if(un(this.state,r,"Enter"),!s)return o=>{un(this.state,r,"Leave")}},n)}mount(){this.startObserver()}update(){const{props:e,prevProps:s}=this.state.visualElement;["amount","margin","root"].some(Gu(e,s))&&this.startObserver()}}function Gu({inViewOptions:t={}},{inViewOptions:e={}}={}){return s=>t[s]!==e[s]}function re(t,e,s,n={passive:!0}){return t.addEventListener(e,s,n),()=>t.removeEventListener(e,s)}class Xu extends st{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.state.element.matches(":focus-visible")}catch{e=!0}e&&(this.state.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&(this.state.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=$t(re(this.state.element,"focus",()=>this.onFocus()),re(this.state.element,"blur",()=>this.onBlur()))}}const Yu=(t,e)=>t.depth-e.depth;class qu{constructor(){this.children=[],this.isDirty=!1}add(e){qe(this.children,e),this.isDirty=!0}remove(e){ue(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Yu),this.isDirty=!1,this.children.forEach(e)}}function ye(t){return j(t)?t.get():t}const bo=["TopLeft","TopRight","BottomLeft","BottomRight"],Zu=bo.length,cn=t=>typeof t=="string"?parseFloat(t):t,hn=t=>typeof t=="number"||b.test(t);function Ju(t,e,s,n,i,r){i?(t.opacity=C(0,s.opacity??1,Qu(n)),t.opacityExit=C(e.opacity??1,0,tc(n))):r&&(t.opacity=C(e.opacity??1,s.opacity??1,n));for(let o=0;o<Zu;o++){const a=`border${bo[o]}Radius`;let l=dn(e,a),c=dn(s,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||hn(l)===hn(c)?(t[a]=Math.max(C(cn(l),cn(c),n),0),(Y.test(c)||Y.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||s.rotate)&&(t.rotate=C(e.rotate||0,s.rotate||0,n))}function dn(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Qu=To(0,.5,oo),tc=To(.5,.95,I);function To(t,e,s){return n=>n<t?0:n>e?1:s(vt(t,e,n))}function fn(t,e){t.min=e.min,t.max=e.max}function $(t,e){fn(t.x,e.x),fn(t.y,e.y)}function pn(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function ve(t){return t===void 0||t===1}function $e({scale:t,scaleX:e,scaleY:s}){return!ve(t)||!ve(e)||!ve(s)}function rt(t){return $e(t)||wo(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function wo(t){return mn(t.x)||mn(t.y)}function mn(t){return t&&t!=="0%"}function ae(t,e,s){const n=t-s,i=e*n;return s+i}function gn(t,e,s,n,i){return i!==void 0&&(t=ae(t,i,n)),ae(t,s,n)+e}function Ne(t,e=0,s=1,n,i){t.min=gn(t.min,e,s,n,i),t.max=gn(t.max,e,s,n,i)}function So(t,{x:e,y:s}){Ne(t.x,e.translate,e.scale,e.originPoint),Ne(t.y,s.translate,s.scale,s.originPoint)}const yn=.999999999999,vn=1.0000000000001;function ec(t,e,s,n=!1){const i=s.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=s[a],o=r.projectionDelta;const{visualElement:l}=r.options;l&&l.props.style&&l.props.style.display==="contents"||(n&&r.options.layoutScroll&&r.scroll&&r!==r.root&&mt(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,So(t,o)),n&&rt(r.latestValues)&&mt(t,r.latestValues))}e.x<vn&&e.x>yn&&(e.x=1),e.y<vn&&e.y>yn&&(e.y=1)}function Xt(t,e){t.min=t.min+e,t.max=t.max+e}function xn(t,e,s,n,i=.5){const r=C(t.min,t.max,i);Ne(t,e,s,r,n)}function mt(t,e){xn(t.x,e.x,e.scaleX,e.scale,e.originX),xn(t.y,e.y,e.scaleY,e.scale,e.originY)}const Ao=1e-4,sc=1-Ao,nc=1+Ao,Po=.01,ic=0-Po,oc=0+Po;function W(t){return t.max-t.min}function rc(t,e,s){return Math.abs(t-e)<=s}function bn(t,e,s,n=.5){t.origin=n,t.originPoint=C(e.min,e.max,t.origin),t.scale=W(s)/W(e),t.translate=C(s.min,s.max,t.origin)-t.originPoint,(t.scale>=sc&&t.scale<=nc||isNaN(t.scale))&&(t.scale=1),(t.translate>=ic&&t.translate<=oc||isNaN(t.translate))&&(t.translate=0)}function Lt(t,e,s,n){bn(t.x,e.x,s.x,n?n.originX:void 0),bn(t.y,e.y,s.y,n?n.originY:void 0)}function Tn(t,e,s){t.min=s.min+e.min,t.max=t.min+W(e)}function ac(t,e,s){Tn(t.x,e.x,s.x),Tn(t.y,e.y,s.y)}function wn(t,e,s){t.min=e.min-s.min,t.max=t.min+W(e)}function kt(t,e,s){wn(t.x,e.x,s.x),wn(t.y,e.y,s.y)}function Sn(t,e,s,n,i){return t-=e,t=ae(t,1/s,n),i!==void 0&&(t=ae(t,1/i,n)),t}function lc(t,e=0,s=1,n=.5,i,r=t,o=t){if(Y.test(e)&&(e=parseFloat(e),e=C(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=C(r.min,r.max,n);t===r&&(a-=e),t.min=Sn(t.min,e,s,a,i),t.max=Sn(t.max,e,s,a,i)}function An(t,e,[s,n,i],r,o){lc(t,e[s],e[n],e[i],e.scale,r,o)}const uc=["x","scaleX","originX"],cc=["y","scaleY","originY"];function Pn(t,e,s,n){An(t.x,e,uc,s?s.x:void 0,n?n.x:void 0),An(t.y,e,cc,s?s.y:void 0,n?n.y:void 0)}function Vn(t){return t.translate===0&&t.scale===1}function Vo(t){return Vn(t.x)&&Vn(t.y)}function En(t,e){return t.min===e.min&&t.max===e.max}function hc(t,e){return En(t.x,e.x)&&En(t.y,e.y)}function Mn(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Eo(t,e){return Mn(t.x,e.x)&&Mn(t.y,e.y)}function Cn(t){return W(t.x)/W(t.y)}function Dn(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class dc{constructor(){this.members=[]}add(e){qe(this.members,e),e.scheduleRender()}remove(e){if(ue(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(e){const s=this.members.findIndex(i=>e===i);if(s===0)return!1;let n;for(let i=s;i>=0;i--){const r=this.members[i];if(r.isPresent!==!1){n=r;break}}return n?(this.promote(n),!0):!1}promote(e,s){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,s&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:s,resumingFrom:n}=e;s.onExitComplete&&s.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function fc(t,e,s){let n="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=(s==null?void 0:s.z)||0;if((i||r||o)&&(n=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(n+=`scale(${1/e.x}, ${1/e.y}) `),s){const{transformPerspective:c,rotate:u,rotateX:h,rotateY:d,skewX:f,skewY:p}=s;c&&(n=`perspective(${c}px) ${n}`),u&&(n+=`rotate(${u}deg) `),h&&(n+=`rotateX(${h}deg) `),d&&(n+=`rotateY(${d}deg) `),f&&(n+=`skewX(${f}deg) `),p&&(n+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(n+=`scale(${a}, ${l})`),n||"none"}function _n(t){return[t("x"),t("y")]}const te={hasAnimatedSinceResize:!0,hasEverUpdated:!1},xe=["","X","Y","Z"],pc=1e3;let mc=0;function be(t,e,s,n){const{latestValues:i}=e;i[t]&&(s[t]=i[t],e.setStaticValue(t,0),n&&(n[t]=0))}function Mo(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const s=Gi(e);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(s,"transform",M,!(i||r))}const{parent:n}=t;n&&!n.hasCheckedOptimisedAppear&&Mo(n)}function Co({attachResizeListener:t,defaultParent:e,measureScroll:s,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=mc++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(vc),this.nodes.forEach(wc),this.nodes.forEach(Sc),this.nodes.forEach(xc)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new qu)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Ze),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=ys(o)&&!po(o),this.instance=o;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let u,h=0;const d=()=>this.root.updateBlockedByResize=!1;M.read(()=>{h=window.innerWidth}),t(o,()=>{const f=window.innerWidth;f!==h&&(h=f,this.root.updateBlockedByResize=!0,u&&u(),u=lr(d,250),te.hasAnimatedSinceResize&&(te.hasAnimatedSinceResize=!1,this.nodes.forEach(Rn)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:d,layout:f})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||c.getDefaultTransition()||Mc,{onLayoutAnimationStart:m,onLayoutAnimationComplete:y}=c.getProps(),v=!this.targetLayout||!Eo(this.targetLayout,f),w=!h&&d;if(this.options.layoutRoot||this.resumeFrom||w||h&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const T={...ls(p,"layout"),onPlay:m,onComplete:y};(c.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T),this.setAnimationOrigin(u,w)}else h||Rn(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=f})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),tt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ac),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Mo(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ln);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(kn);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Tc),this.nodes.forEach(gc),this.nodes.forEach(yc)):this.nodes.forEach(kn),this.clearAllSnapshots();const a=O.now();B.delta=et(0,1e3/60,a-B.timestamp),B.timestamp=a,B.isProcessing=!0,he.update.process(B),he.preRender.process(B),he.render.process(B),B.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ci.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(bc),this.sharedNodes.forEach(Pc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,M.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){M.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!W(this.snapshot.measuredBox.x)&&!W(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=L(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=n(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Vo(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||rt(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),Cc(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:a}=this.options;if(!a)return L();const l=a.measureViewportBox();if(!(((o=this.scroll)==null?void 0:o.wasRoot)||this.path.some(Dc))){const{scroll:u}=this.root;u&&(Xt(l.x,u.offset.x),Xt(l.y,u.offset.y))}return l}removeElementScroll(o){var a;const l=L();if($(l,o),(a=this.scroll)!=null&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:h,options:d}=u;u!==this.root&&h&&d.layoutScroll&&(h.wasRoot&&$(l,o),Xt(l.x,h.offset.x),Xt(l.y,h.offset.y))}return l}applyTransform(o,a=!1){const l=L();$(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&mt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),rt(u.latestValues)&&mt(l,u.latestValues)}return rt(this.latestValues)&&mt(l,this.latestValues),l}removeTransform(o){const a=L();$(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!rt(c.latestValues))continue;$e(c.latestValues)&&c.updateSnapshot();const u=L(),h=c.measurePageBox();$(u,h),Pn(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return rt(this.latestValues)&&Pn(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==B.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(a=this.parent)!=null&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:d}=this.options;if(!(!this.layout||!(h||d))){if(this.resolvedRelativeTargetAt=B.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=L(),this.relativeTargetOrigin=L(),kt(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),$(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=L(),this.targetWithTransforms=L()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ac(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):$(this.target,this.layout.layoutBox),So(this.target,this.targetDelta)):$(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=L(),this.relativeTargetOrigin=L(),kt(this.relativeTargetOrigin,this.target,f.target),$(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||$e(this.parent.latestValues)||wo(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||(o=this.parent)!=null&&o.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===B.timestamp&&(c=!1),c)return;const{layout:u,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||h))return;$(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;ec(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=L());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(pn(this.prevProjectionDelta.x,this.projectionDelta.x),pn(this.prevProjectionDelta.y,this.projectionDelta.y)),Lt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!Dn(this.projectionDelta.x,this.prevProjectionDelta.x)||!Dn(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ft(),this.projectionDelta=ft(),this.projectionDeltaWithTransform=ft()}setAnimationOrigin(o,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},h=ft();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=L(),f=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=f!==p,y=this.getStack(),v=!y||y.members.length<=1,w=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(Ec));this.animationProgress=0;let T;this.mixTargetDelta=A=>{const x=A/1e3;jn(h.x,o.x,x),jn(h.y,o.y,x),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(kt(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Vc(this.relativeTarget,this.relativeTargetOrigin,d,x),T&&hc(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=L()),$(T,this.relativeTarget)),m&&(this.animationValues=u,Ju(u,c,this.latestValues,x,w,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=x},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(tt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=M.update(()=>{te.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=yt(0)),this.currentAnimation=mo(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),o.onUpdate&&o.onUpdate(u)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(pc),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=o;if(!(!a||!l||!c)){if(this!==o&&this.layout&&c&&Do(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||L();const h=W(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const d=W(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}$(a,l),mt(a,u),Lt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new dc),this.sharedNodes.get(o).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())==null?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())==null?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&be("z",o,c,this.animationValues);for(let u=0;u<xe.length;u++)be(`rotate${xe[u]}`,o,c,this.animationValues),be(`skew${xe[u]}`,o,c,this.animationValues);o.render();for(const u in c)o.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=ye(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=ye(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!rt(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let h=fc(this.projectionDeltaWithTransform,this.treeScale,u);l&&(h=l(u,h)),o.transform=h;const{x:d,y:f}=this.projectionDelta;o.transformOrigin=`${d.origin*100}% ${f.origin*100}% 0`,c.animationValues?o.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const p in jt){if(u[p]===void 0)continue;const{correct:m,applyTo:y,isCSSVariable:v}=jt[p],w=h==="none"?u[p]:m(u[p],c);if(y){const T=y.length;for(let A=0;A<T;A++)o[y[A]]=w}else v?this.options.visualElement.renderState.vars[p]=w:o[p]=w}this.options.layoutId&&(o.pointerEvents=c===this?ye(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Ln),this.root.sharedNodes.clear()}}}function gc(t){t.updateLayout()}function yc(t){var e;const s=((e=t.resumeFrom)==null?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&s&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:r}=t.options,o=s.source!==t.layout.source;r==="size"?_n(h=>{const d=o?s.measuredBox[h]:s.layoutBox[h],f=W(d);d.min=n[h].min,d.max=d.min+f}):Do(r,s.layoutBox,n)&&_n(h=>{const d=o?s.measuredBox[h]:s.layoutBox[h],f=W(n[h]);d.max=d.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+f)});const a=ft();Lt(a,n,s.layoutBox);const l=ft();o?Lt(l,t.applyTransform(i,!0),s.measuredBox):Lt(l,n,s.layoutBox);const c=!Vo(a);let u=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:d,layout:f}=h;if(d&&f){const p=L();kt(p,s.layoutBox,d.layoutBox);const m=L();kt(m,n,f.layoutBox),Eo(p,m)||(u=!0),h.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:s,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function vc(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function xc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function bc(t){t.clearSnapshot()}function Ln(t){t.clearMeasurements()}function kn(t){t.isLayoutDirty=!1}function Tc(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Rn(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function wc(t){t.resolveTargetDelta()}function Sc(t){t.calcProjection()}function Ac(t){t.resetSkewAndRotation()}function Pc(t){t.removeLeadSnapshot()}function jn(t,e,s){t.translate=C(e.translate,0,s),t.scale=C(e.scale,1,s),t.origin=e.origin,t.originPoint=e.originPoint}function Bn(t,e,s,n){t.min=C(e.min,s.min,n),t.max=C(e.max,s.max,n)}function Vc(t,e,s,n){Bn(t.x,e.x,s.x,n),Bn(t.y,e.y,s.y,n)}function Ec(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Mc={duration:.45,ease:[.4,0,.1,1]},Fn=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),On=Fn("applewebkit/")&&!Fn("chrome/")?Math.round:I;function In(t){t.min=On(t.min),t.max=On(t.max)}function Cc(t){In(t.x),In(t.y)}function Do(t,e,s){return t==="position"||t==="preserve-aspect"&&!rc(Cn(e),Cn(s),.2)}function Dc(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}function _c(t,e,s,n={passive:!0}){return t.addEventListener(e,s,n),()=>t.removeEventListener(e,s)}const Lc=Co({attachResizeListener:(t,e)=>_c(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Te={current:void 0},kc=Co({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Te.current){const t=new Lc({});t.mount(window),t.setOptions({layoutScroll:!0}),Te.current=t}return Te.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"});function _o(t){if(t)return t.options.allowProjection!==!1?t.projection:_o(t.parent)}function Un(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Pt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(b.test(t))t=parseFloat(t);else return t;const s=Un(t,e.target.x),n=Un(t,e.target.y);return`${s}% ${n}%`}},Rc={correct:(t,{treeScale:e,projectionDelta:s})=>{const n=t,i=ot.parse(t);if(i.length>5)return n;const r=ot.createTransformer(t),o=typeof i[0]!="number"?1:0,a=s.x.scale*e.x,l=s.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const c=C(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),r(i)}},Lo={borderRadius:{...Pt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Pt,borderTopRightRadius:Pt,borderBottomLeftRadius:Pt,borderBottomRightRadius:Pt,boxShadow:Rc};function Mt(t){return typeof t=="object"&&t!==null&&"nodeType"in t}class jc extends st{constructor(e){super(e),ui(Lo)}initProjection(){const e=this.state.options;this.state.visualElement.projection=new kc(this.state.visualElement.latestValues,e["data-framer-portal-id"]?void 0:_o(this.state.visualElement.parent)),this.state.visualElement.projection.isPresent=!0,this.setOptions()}beforeMount(){this.initProjection()}setOptions(){const e=this.state.options;this.state.visualElement.projection.setOptions({layout:e.layout,layoutId:e.layoutId,alwaysMeasureLayout:!!e.drag||e.dragConstraints&&Mt(e.dragConstraints),visualElement:this.state.visualElement,animationType:typeof e.layout=="string"?e.layout:"both",layoutRoot:e.layoutRoot,layoutScroll:e.layoutScroll,crossfade:e.crossfade,onExitComplete:()=>{var s;if(!((s=this.state.visualElement.projection)!=null&&s.isPresent)){const n=Xe.get(this.state.element);this.state.isSafeToRemove=!0,n&&n({detail:{isExit:!0}},!0)}}})}update(){this.setOptions()}mount(){var e;(e=this.state.visualElement.projection)==null||e.mount(this.state.element)}}function ko(t){return t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1}function vs(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}function Bc(t){return e=>ko(e)&&t(e,vs(e))}function Rt(t,e,s,n){return re(t,e,Bc(s),n)}function Ro(t){let e=null;return()=>{const s=()=>{e=null};return e===null?(e=t,s):!1}}const $n=Ro("dragHorizontal"),Nn=Ro("dragVertical");function Fc(t){let e=!1;if(t==="y")e=Nn();else if(t==="x")e=$n();else{const s=$n(),n=Nn();s&&n?e=()=>{s(),n()}:(s&&s(),n&&n())}return e}function We(t){return t.max-t.min}function Oc(t,{min:e,max:s},n){return e!==void 0&&t<e?t=n?C(e,t,n.min):Math.max(t,e):s!==void 0&&t>s&&(t=n?C(s,t,n.max):Math.min(t,s)),t}const ze=.35;function Ic(t,{top:e,left:s,bottom:n,right:i}){return{x:Wn(t.x,s,i),y:Wn(t.y,e,n)}}function Wn(t,e,s){return{min:e!==void 0?t.min+e:void 0,max:s!==void 0?t.max+s-(t.max-t.min):void 0}}function Uc(t=ze){return t===!1?t=0:t===!0&&(t=ze),{x:zn(t,"left","right"),y:zn(t,"top","bottom")}}function zn(t,e,s){return{min:Kn(t,e),max:Kn(t,s)}}function Kn(t,e){return typeof t=="number"?t:t[e]||0}function $c(t,e){const s={};return e.min!==void 0&&(s.min=e.min-t.min),e.max!==void 0&&(s.max=e.max-t.min),s}function Nc(t,e){return{x:Hn(t.x,e.x),y:Hn(t.y,e.y)}}function Hn(t,e){let s=e.min-t.min,n=e.max-t.max;return e.max-e.min<t.max-t.min&&([s,n]=[n,s]),{min:s,max:n}}function Wc(t,e){let s=.5;const n=We(t),i=We(e);return i>n?s=vt(e.min,e.max-n,t.min):n>i&&(s=vt(t.min,t.max-i,e.min)),et(0,1,s)}const Gn=(t,e)=>Math.abs(t-e);function zc(t,e){const s=Gn(t.x,e.x),n=Gn(t.y,e.y);return Math.sqrt(s**2+n**2)}class jo{constructor(e,s,{transformPagePoint:n,contextWindow:i,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=Se(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,f=zc(h.offset,{x:0,y:0})>=3;if(!d&&!f)return;const{point:p}=h,{timestamp:m}=B;this.history.push({...p,timestamp:m});const{onStart:y,onMove:v}=this.handlers;d||(y&&y(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,h)},this.handlePointerMove=(h,d)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=we(d,this.transformPagePoint),M.update(this.updatePoint,!0)},this.handlePointerUp=(h,d)=>{this.end();const{onEnd:f,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Se(h.type==="pointercancel"?this.lastMoveEventInfo:we(d,this.transformPagePoint),this.history);this.startEvent&&f&&f(h,y),p&&p(h,y)},!ko(e))return;this.dragSnapToOrigin=r,this.handlers=s,this.transformPagePoint=n,this.contextWindow=i||window;const o=vs(e),a=we(o,this.transformPagePoint),{point:l}=a,{timestamp:c}=B;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=s;u&&u(e,Se(a,this.history)),this.removeListeners=$t(Rt(this.contextWindow,"pointermove",this.handlePointerMove),Rt(this.contextWindow,"pointerup",this.handlePointerUp),Rt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),tt(this.updatePoint)}}function we(t,e){return e?{point:e(t.point)}:t}function Xn(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Se({point:t},e){return{point:t,delta:Xn(t,Bo(e)),offset:Xn(t,Kc(e)),velocity:Hc(e,.1)}}function Kc(t){return t[0]}function Bo(t){return t[t.length-1]}function Hc(t,e){if(t.length<2)return{x:0,y:0};let s=t.length-1,n=null;const i=Bo(t);for(;s>=0&&(n=t[s],!(i.timestamp-n.timestamp>z(e)));)s--;if(!n)return{x:0,y:0};const r=X(i.timestamp-n.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-n.x)/r,y:(i.y-n.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const Yn=()=>({min:0,max:0});function Gc(){return{x:Yn(),y:Yn()}}function H(t){return[t("x"),t("y")]}function Xc(t){return!!(j(t)&&t.add)}function qn(t,e){const s=t.getValue("willChange");if(Xc(s))return s.add(e)}function Fo({top:t,left:e,right:s,bottom:n}){return{x:{min:e,max:s},y:{min:t,max:n}}}function Yc(t,e){if(!e)return t;const s=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:s.y,left:s.x,bottom:n.y,right:n.x}}function qc({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Zn(t,e){t.min=t.min+e,t.max=t.max+e}function Zc(t,e){return Fo(Yc(t.getBoundingClientRect(),e))}function Jc(t,e,s){const n=Zc(t,s),{scroll:i}=e;return i&&(Zn(n.x,i.offset.x),Zn(n.y,i.offset.y)),n}function Jn(t){return!Xe.has(t.current)}function Oo({current:t}){return t?t.ownerDocument.defaultView:null}const Qc=new WeakMap;class th{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=Gc(),this.visualElement=e}start(e,{snapToCursor:s=!1}={}){if(!Jn(this.visualElement))return;const n=c=>{const{dragSnapToOrigin:u}=this.getProps();u?this.pauseAnimation():this.stopAnimation(),s&&this.snapToCursor(vs(c,"page").point)},i=(c,u)=>{const{drag:h,dragPropagation:d,onDragStart:f}=this.getProps();if(h&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Fc(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),H(m=>{let y=this.getAxisMotionValue(m).get()||0;if(Y.test(y)){const{projection:v}=this.visualElement;if(v&&v.layout){const w=v.layout.layoutBox[m];w&&(y=We(w)*(parseFloat(y)/100))}}this.originPoint[m]=y}),f&&M.postRender(()=>f(c,u)),qn(this.visualElement,"transform"),this.visualElement.state.setActive("whileDrag",!0)},r=(c,u)=>{const{dragPropagation:h,dragDirectionLock:d,onDirectionLock:f,onDrag:p}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:m}=u;if(d&&this.currentDirection===null){this.currentDirection=eh(m),this.currentDirection!==null&&f&&f(this.currentDirection);return}this.updateAxis("x",u.point,m),this.updateAxis("y",u.point,m),this.visualElement.render(),p&&p(c,u)},o=(c,u)=>this.stop(c,u),a=()=>H(c=>{var u;return this.getAnimationState(c)==="paused"&&((u=this.getAxisMotionValue(c).animation)==null?void 0:u.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new jo(e,{onSessionStart:n,onStart:i,onMove:r,onSessionEnd:o,resumeAnimation:a},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:Oo(this.visualElement)})}stop(e,s){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=s;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&M.postRender(()=>r(e,s))}cancel(){this.isDragging=!1;const{projection:e,animationState:s}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),this.visualElement.state.setActive("whileDrag",!1)}updateAxis(e,s,n){const{drag:i}=this.getProps();if(!n||!Yt(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(o=Oc(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){var e;const{dragConstraints:s,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)==null?void 0:e.layout,r=this.constraints;s&&Mt(s)?this.constraints||(this.constraints=this.resolveRefConstraints()):s&&i?this.constraints=Ic(i.layoutBox,s):this.constraints=!1,this.elastic=Uc(n),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&H(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=$c(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:s}=this.getProps();if(!e||!Mt(e))return!1;const n=e,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=Jc(n,i.root,this.visualElement.getTransformPagePoint());let o=Nc(i.layout.layoutBox,r);if(s){const a=s(qc(o));this.hasMutatedConstraints=!!a,a&&(o=Fo(a))}return o}startAnimation(e){const{drag:s,dragMomentum:n,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=H(u=>{if(!Yt(u,s,this.currentDirection))return;let h=l&&l[u]||{};o&&(h={min:0,max:0});const d=i?200:1e6,f=i?40:1e7,p={type:"inertia",velocity:n?e[u]:0,bounceStiffness:d,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,s){const n=this.getAxisMotionValue(e);return qn(this.visualElement,e),n.start(gs(e,n,0,s,this.visualElement,!1))}stopAnimation(){Jn(this.visualElement)&&H(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){H(e=>{var s;return(s=this.getAxisMotionValue(e).animation)==null?void 0:s.pause()})}getAnimationState(e){var s;return(s=this.getAxisMotionValue(e).animation)==null?void 0:s.state}getAxisMotionValue(e){const s=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[s]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){H(s=>{const{drag:n}=this.getProps();if(!Yt(s,n,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(s);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[s];r.set(e[s]-C(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:s}=this.getProps(),{projection:n}=this.visualElement;if(!Mt(s)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};H(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=Wc({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),H(o=>{if(!Yt(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(C(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;Qc.set(this.visualElement,this);const e=this.visualElement.current,s=Rt(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),n=()=>{const{dragConstraints:l}=this.getProps();Mt(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,r=i.addEventListener("measure",n);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),M.read(n);const o=re(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(H(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=l[u].translate,h.set(h.get()+l[u].translate))}),this.visualElement.render())});return()=>{o(),s(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=ze,dragMomentum:a=!0}=e;return{...e,drag:s,dragDirectionLock:n,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Yt(t,e,s){return(e===!0||e===t)&&(s===null||s===t)}function eh(t,e=10){let s=null;return Math.abs(t.y)>e?s="y":Math.abs(t.x)>e&&(s="x"),s}class sh extends st{constructor(e){super(e),this.removeGroupControls=I,this.removeListeners=I,this.controls=new th(e.visualElement)}mount(){const{dragControls:e}=this.state.options;e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||I}unmount(){this.removeGroupControls(),this.removeListeners()}}class nh extends st{constructor(e){super(e),ui(Lo)}beforeUpdate(){this.state.willUpdate("beforeUpdate")}update(){this.didUpdate()}didUpdate(){var e,s;(this.state.options.layout||this.state.options.layoutId||this.state.options.drag)&&((s=(e=this.state.visualElement.projection)==null?void 0:e.root)==null||s.didUpdate())}mount(){var e;const s=this.state.options,n=this.state.options.layoutGroup;if(s.layout||s.layoutId){const i=this.state.visualElement.projection;i&&(i.promote(),(e=n==null?void 0:n.group)==null||e.add(i)),te.hasEverUpdated=!0}this.didUpdate()}beforeUnmount(){const e=this.state.visualElement.projection;e&&(this.state.willUpdate("beforeUnmount"),this.state.options.layoutId?(e.isPresent=!1,e.relegate()):this.state.options.layout&&(this.state.isSafeToRemove=!0))}unmount(){const e=this.state.options.layoutGroup,s=this.state.visualElement.projection;s&&(e!=null&&e.group&&(this.state.options.layout||this.state.options.layoutId)&&e.group.remove(s),this.didUpdate())}}function Qn(t){return(e,s)=>{t&&M.postRender(()=>t(e,s))}}class ih extends st{constructor(){super(...arguments),this.removePointerDownListener=I}onPointerDown(e){this.session=new jo(e,this.createPanHandlers(),{transformPagePoint:this.state.visualElement.getTransformPagePoint(),contextWindow:Oo(this.state.visualElement)})}createPanHandlers(){return{onSessionStart:Qn((e,s)=>{const{onPanSessionStart:n}=this.state.options;n&&n(e,s)}),onStart:Qn((e,s)=>{const{onPanStart:n}=this.state.options;n&&n(e,s)}),onMove:(e,s)=>{const{onPan:n}=this.state.options;n&&n(e,s)},onEnd:(e,s)=>{const{onPanEnd:n}=this.state.options;delete this.session,n&&M.postRender(()=>n(e,s))}}}mount(){this.removePointerDownListener=Rt(this.state.element,"pointerdown",this.onPointerDown.bind(this))}update(){}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const oh=[Lu,$u,Wu,Hu,Xu,jc,ih,sh,nh],rh={reducedMotion:"never",transition:void 0,nonce:void 0},[ah]=It("MotionConfig");function lh(){return ah(si(()=>rh))}function le(t){if(t)return t.nodeType===3||t.nodeType===8?le(t.nextSibling):t}const[uh]=It("LazyMotionContext");function ch(t){const e=hr(null),s=fr({}),n=lh(),i=Tr({}),r=uh({features:gt([]),strict:!1}),o=$o();function a(){return s.id&&t.layoutId?`${s.id}-${t.layoutId}`:t.layoutId||void 0}function l(){return{...t,lazyMotionContext:r,layoutId:a(),transition:t.transition??n.value.transition,layoutGroup:s,motionConfig:n.value,inViewOptions:t.inViewOptions??n.value.inViewOptions,animatePresenceContext:i,initial:i.initial===!1?i.initial:t.initial===!0?void 0:t.initial}}function c(){return{...o,...l()}}const u=new Ar(c(),e);dr(u);function h(){var f;const p=u.type==="svg",m={...o};Object.keys(o).forEach(w=>{j(o[w])&&(m[w]=o[w].get())});let y={...t.style,...p?{}:((f=u.visualElement)==null?void 0:f.latestValues)||u.baseTarget};if(p){const{attrs:w,style:T}=Ur({...u.isMounted()?u.target:u.baseTarget,...y});(T.transform||w.transformOrigin)&&(T.transformOrigin=w.transformOrigin??"50% 50%",delete w.transformOrigin),T.transform&&(T.transformBox=T.transformBox??"fill-box",delete w.transformBox),Object.assign(m,w),y=T}t.drag&&t.dragListener!==!1&&Object.assign(y,{userSelect:"none",WebkitUserSelect:"none",WebkitTouchCallout:"none",touchAction:t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`});const v=Br(y);return v&&(m.style=v),m}const d=No().proxy;return Wo(()=>{u.beforeMount()}),zo(()=>{u.mount(le(d.$el),c(),dh(d))}),Ko(()=>u.beforeUnmount()),ni(()=>{const f=le(d.$el);f!=null&&f.isConnected||u.unmount()}),Ho(()=>{u.beforeUpdate()}),Go(()=>{u.update(c())}),{getProps:l,getAttrs:h,layoutGroup:s,state:u}}const hh={ignoreStrict:{type:Boolean},forwardMotionProps:{type:Boolean,default:!1},asChild:{type:Boolean,default:!1},hover:{type:[String,Array,Object]},press:{type:[String,Array,Object]},inView:{type:[String,Array,Object]},focus:{type:[String,Array,Object]},whileDrag:{type:[String,Array,Object]},whileHover:{type:[String,Array,Object],default:({hover:t})=>t},whilePress:{type:[String,Array,Object],default:({press:t})=>t},whileInView:{type:[String,Array,Object],default:({inView:t})=>t},whileFocus:{type:[String,Array,Object],default:({focus:t})=>t},custom:{type:[String,Number,Object,Array]},initial:{type:[String,Array,Object,Boolean],default:void 0},animate:{type:[String,Array,Object],default:void 0},exit:{type:[String,Array,Object]},variants:{type:Object},inherit:{type:Boolean},style:{type:Object},transformTemplate:{type:Function},transition:{type:Object},layoutGroup:{type:Object},motionConfig:{type:Object},onAnimationComplete:{type:Function},onUpdate:{type:Function},layout:{type:[Boolean,String],default:!1},layoutId:{type:String,default:void 0},layoutScroll:{type:Boolean,default:!1},layoutRoot:{type:Boolean,default:!1},"data-framer-portal-id":{type:String},crossfade:{type:Boolean,default:!0},layoutDependency:{type:null},onBeforeLayoutMeasure:{type:Function},onLayoutMeasure:{type:Function},onLayoutAnimationStart:{type:Function},onLayoutAnimationComplete:{type:Function},globalPressTarget:{type:Boolean},onPressStart:{type:Function},onPress:{type:Function},onPressCancel:{type:Function},onHoverStart:{type:Function},onHoverEnd:{type:Function},inViewOptions:{type:Object},onViewportEnter:{type:Function},onViewportLeave:{type:Function},drag:{type:[Boolean,String]},dragSnapToOrigin:{type:Boolean},dragDirectionLock:{type:Boolean},dragPropagation:{type:Boolean},dragConstraints:{type:[Boolean,Object]},dragElastic:{type:[Boolean,Number,Object],default:.5},dragMomentum:{type:Boolean,default:!0},dragTransition:{type:Object},dragListener:{type:Boolean,default:!0},dragControls:{type:Object},onDragStart:{type:Function},onDragEnd:{type:Function},onDrag:{type:Function},onDirectionLock:{type:Function},onDragTransitionEnd:{type:Function},onMeasureDragConstraints:{type:Function},onPanSessionStart:{type:Function},onPanStart:{type:Function},onPan:{type:Function},onPanEnd:{type:Function}};function dh(t){var e;const s=((e=le(t.$el))==null?void 0:e.style.display)==="none";return t.$.vnode.transition&&s}const fh=new Map,ph=new Map;function mh(t){if(!Array.isArray(t))return[t];const e=[];for(const s of t)Array.isArray(s)?e.push(...s):e.push(s);return e}const gh=["area","img","input"];function yh(t,e,s){var n,i;if(typeof t=="string"&&gh.includes(t))return ii(t,e);if(t==="template"){if(!s.default)return null;const r=mh(s.default()),o=r.findIndex(u=>u.type!==Xo);if(o===-1)return r;const a=r[o];(n=a.props)==null||delete n.ref;const l=a.props?Yo(e,a.props):e;e.class&&((i=a.props)!=null&&i.class)&&delete a.props.class;const c=qo(a,l);for(const u in l)u.startsWith("on")&&(c.props||(c.props={}),c.props[u]=l[u]);return r.length===1?c:(r[o]=c,r)}return null}function ti(t,e={}){var s;const n=typeof t=="string",i=n?t:t.name||"",r=((s=e.features)==null?void 0:s.length)>0?fh:ph;if(n&&(r!=null&&r.has(t)))return r.get(t);const o=dt({inheritAttrs:!1,props:{...hh,features:{type:Object,default:()=>e.features||[]},as:{type:[String,Object],default:t||"div"}},name:i?`motion.${i}`:"Motion",setup(a,{slots:l}){const{getProps:c,getAttrs:u,state:h}=ch(a);function d(){const f=h.element;if((!(typeof a.as=="object")||a.asChild)&&f){const{style:m}=u();if(m)for(const[y,v]of Object.entries(m))f.style[y]=v}}return()=>{const f=c(),p=u(),m=a.asChild?"template":a.as,y={...e.forwardMotionProps||a.forwardMotionProps?f:{},...p,onVnodeUpdated:d},v=yh(m,y,l);return v!==null?v:ii(m,{...y},l)}}});return n&&(r==null||r.set(t,o)),o}function vh(t=[]){return new Proxy({},{get(e,s){return s==="create"?(n,i)=>ti(n,{...i,features:t}):ti(s,{features:t})}})}const Z=vh(oh),qt=Z.create("div"),xh={class:"flex flex-col items-center"},bh={class:"text-sm mt-2 text-white/80"},Ae=dt({__name:"time-unit",props:{value:{},label:{}},setup(t){const e=t,s=si(()=>String(e.value).padStart(2,"0"));return(n,i)=>(F(),G("div",xh,[(F(),ee(k(Z).div,{key:t.value,initial:{scale:1.2,opacity:.5},animate:{scale:1,opacity:1},transition:{duration:.3},class:"bg-gradient-to-br from-orange-500 to-orange-600 text-white text-3xl md:text-4xl w-16 h-16 md:w-20 md:h-20 rounded-xl flex items-center justify-center shadow-lg"},{default:N(()=>[Zo(J(s.value),1)]),_:1})),g("span",bh,J(t.label),1)]))}}),Th={class:"relative h-[70vh] min-h-[500px] overflow-hidden"},wh={class:"relative z-10 flex justify-between items-center p-4"},Sh={class:"relative z-10 flex flex-col items-center justify-center h-full px-4 text-center text-white pb-16"},Ah={class:"text-orange-400 mb-4"},Ph={class:"flex gap-4"},Vh=dt({__name:"hero",props:{end:{type:Boolean,default:!1}},setup(t){const e=Ke("activeInfo"),s=gt({hours:0,minutes:0,seconds:0});let n=null;const i=t;function r(){if(!(e!=null&&e.value))return;const o=new Date(e.value.active_end_at).getTime();i.end||(n=setInterval(()=>{const a=Date.now(),l=Math.max(0,o-a);l===0&&n&&(clearInterval(n),n=null);const c=Math.floor(l/(1e3*60*60)),u=Math.floor(l%(1e3*60*60)/(1e3*60)),h=Math.floor(l%(1e3*60)/1e3);s.value={hours:c,minutes:u,seconds:h}},1e3))}return r(),ni(()=>{n&&clearInterval(n)}),(o,a)=>(F(),G("div",Th,[a[5]||(a[5]=g("div",{class:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:"url('https://images.unsplash.com/photo-1753613648191-4771cf76f034')"}},[g("div",{class:"absolute inset-0 bg-gradient-to-b from-black/50 via-black/40 to-black/60"})],-1)),g("div",wh,[V(k(qt),{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.5},class:"text-white text-xl"},{default:N(()=>[...a[0]||(a[0]=[g("span",{class:"bg-gradient-to-r from-orange-400 to-orange-500 px-3 py-1 rounded-lg"}," 有光自习室 ",-1)])]),_:1})]),g("div",Sh,[V(k(qt),{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,delay:.2}},{default:N(()=>[...a[1]||(a[1]=[g("h1",{class:"text-4xl md:text-5xl mb-4 text-white"},"专业老师在线陪读",-1),g("p",{class:"text-xl md:text-2xl mb-8 text-white/90"},"让孩子高效学习,专注成长",-1)])]),_:1}),V(k(qt),{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{duration:.6,delay:.4},class:"bg-white/10 backdrop-blur-md rounded-2xl p-6 border border-white/20 shadow-2xl"},{default:N(()=>[g("p",Ah,J(t.end?"活动已结束":"限时优惠倒计时"),1),g("div",Ph,[V(Ae,{value:s.value.hours,label:"时"},null,8,["value"]),a[2]||(a[2]=g("span",{class:"text-3xl"},":",-1)),V(Ae,{value:s.value.minutes,label:"分"},null,8,["value"]),a[3]||(a[3]=g("span",{class:"text-3xl"},":",-1)),V(Ae,{value:s.value.seconds,label:"秒"},null,8,["value"])])]),_:1}),V(k(qt),{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.6},class:"mt-8"},{default:N(()=>[...a[4]||(a[4]=[g("div",{class:"bg-gradient-to-r from-orange-500 to-orange-600 text-white px-8 py-3 rounded-full inline-block shadow-lg"},[g("span",{class:"text-2xl"},"课时翻倍 限时抢购")],-1)])]),_:1})])]))}}),Vt=ri("check",!0,function(t){return V("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},[V("path",{d:"M43 11L16.875 37L5 25.1818",stroke:t.colors[0],"stroke-width":t.strokeWidth,"stroke-linecap":t.strokeLinecap,"stroke-linejoin":t.strokeLinejoin},null)])}),Zt=ri("user",!1,function(t){return V("svg",{width:t.size,height:t.size,viewBox:"0 0 48 48",fill:"none"},[V("circle",{cx:"24",cy:"12",r:"8",fill:t.colors[1],stroke:t.colors[0],"stroke-width":t.strokeWidth,"stroke-linecap":t.strokeLinecap,"stroke-linejoin":t.strokeLinejoin},null),V("path",{d:"M42 44C42 34.0589 33.9411 26 24 26C14.0589 26 6 34.0589 6 44",stroke:t.colors[0],"stroke-width":t.strokeWidth,"stroke-linecap":t.strokeLinecap,"stroke-linejoin":t.strokeLinejoin},null)])}),Eh={class:"py-12 px-4 bg-gradient-to-b from-white to-orange-50"},Mh={class:"max-w-5xl mx-auto grid grid-cols-1 sm:grid-cols-2 gap-6"},Ch={class:"flex items-start gap-4"},Dh={class:"bg-gradient-to-br from-orange-400 to-orange-600 text-white p-3 rounded-xl flex-shrink-0"},_h={class:"flex-1"},Lh={class:"text-xl mb-2 text-gray-800"},kh={class:"text-gray-600"},Rh=dt({__name:"course-highlights",setup(t){const e=[{icon:Zt,title:"专业讲师陪伴",description:"资深教师在线督导,实时答疑解惑"},{icon:Zt,title:"高效学习氛围",description:"沉浸式学习环境,远离干扰提升效率"},{icon:Zt,title:"专注力提升",description:"科学时间管理,培养良好学习习惯"},{icon:Zt,title:"同伴互助学习",description:"与优秀学员共同进步,激发学习动力"}];return(s,n)=>(F(),G("div",Eh,[V(k(Z).div,{initial:{opacity:0,y:30},"while-in-view":{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},class:"text-center mb-10"},{default:N(()=>[...n[0]||(n[0]=[g("h2",{class:"text-3xl md:text-4xl mb-3 text-gray-800"},"课程核心优势",-1),g("p",{class:"text-gray-600"},"四大亮点助力孩子高效学习",-1)])]),_:1}),g("div",Mh,[(F(),G(Pe,null,Ve(e,(i,r)=>V(k(Z).div,{key:r,initial:{opacity:0,y:30},"while-in-view":{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:r*.1},"while-hover":{scale:1.05,y:-5},class:"bg-white rounded-2xl p-6 shadow-lg hover:shadow-xl transition-all border border-orange-100"},{default:N(()=>[g("div",Ch,[g("div",Dh,[(F(),ee(Jo(i.icon),{size:28}))]),g("div",_h,[g("h3",Lh,J(i.title),1),g("p",kh,J(i.description),1)])])]),_:2},1032,["transition"])),64))])]))}}),jh={class:"py-16 px-4 bg-gradient-to-br from-orange-500 to-orange-600 text-white relative overflow-hidden"},Bh={class:"max-w-4xl mx-auto relative z-10"},Fh={class:"inline-flex items-center gap-2 bg-white/20 backdrop-blur-sm px-4 py-2 rounded-full mb-4"},Oh={class:"grid grid-cols-1 md:grid-cols-2 gap-6 items-center"},Ih={class:"text-center"},Uh={class:"space-y-2"},$h={class:"flex items-center justify-center gap-2 text-white/80"},Nh={class:"flex items-center justify-center gap-2 text-white/80"},Wh={class:"text-center"},zh={class:"text-5xl mb-1"},Kh={class:"text-orange-600"},Hh={class:"space-y-3"},Gh={class:"flex items-center gap-3 bg-orange-50 rounded-lg p-3"},Xh={class:"bg-orange-500 text-white rounded-full p-1"},Yh={class:"text-lg"},qh={class:"flex items-center gap-3 bg-orange-50 rounded-lg p-3"},Zh={class:"bg-orange-500 text-white rounded-full p-1"},Jh={class:"flex items-center gap-3 bg-orange-50 rounded-lg p-3"},Qh={class:"bg-orange-500 text-white rounded-full p-1"},td=dt({__name:"price-section",setup(t){const e=Ke("activeInfo");return(s,n)=>(F(),G("div",jh,[n[12]||(n[12]=g("div",{class:"absolute inset-0 opacity-10"},[g("div",{class:"absolute top-10 left-10 w-32 h-32 bg-white rounded-full blur-3xl"}),g("div",{class:"absolute bottom-10 right-10 w-40 h-40 bg-white rounded-full blur-3xl"})],-1)),g("div",Bh,[V(k(Z).div,{initial:{opacity:0,y:30},"while-in-view":{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},class:"text-center mb-12"},{default:N(()=>[g("div",Fh,[V(k(nr),{size:20}),n[0]||(n[0]=g("span",null,"限时特惠",-1))]),n[1]||(n[1]=g("h2",{class:"text-3xl md:text-4xl mb-3"},"超值优惠方案",-1)),n[2]||(n[2]=g("p",{class:"text-white/90 text-lg"},"现在报名立享课时翻倍",-1))]),_:1}),g("div",Oh,[V(k(Z).div,{initial:{opacity:0,x:-30},"while-in-view":{opacity:1,x:0},viewport:{once:!0},transition:{duration:.6,delay:.2},class:"bg-white/10 backdrop-blur-md rounded-2xl p-8 border border-white/20"},{default:N(()=>[g("div",Ih,[n[5]||(n[5]=g("p",{class:"text-white/70 mb-2"},"原价套餐",-1)),n[6]||(n[6]=g("div",{class:"text-4xl mb-4"},[g("span",{class:"line-through opacity-60"},"¥200")],-1)),g("div",Uh,[g("div",$h,[V(k(Vt),{size:18}),n[3]||(n[3]=g("span",null,"10节课时",-1))]),g("div",Nh,[V(k(Vt),{size:18}),n[4]||(n[4]=g("span",null,"在线自习陪伴",-1))])])])]),_:1}),V(k(Z).div,{initial:{opacity:0,x:30},"while-in-view":{opacity:1,x:0},viewport:{once:!0},transition:{duration:.6,delay:.4},class:"bg-white text-gray-800 rounded-2xl p-8 shadow-2xl relative overflow-hidden"},{default:N(()=>[n[11]||(n[11]=g("div",{class:"absolute -top-1 -right-1"},[g("div",{class:"bg-gradient-to-br from-yellow-400 to-orange-500 text-white px-6 py-2 rounded-bl-2xl rounded-tr-2xl shadow-lg"},[g("span",{class:"text-sm"},"限时抢购")])],-1)),g("div",Wh,[n[9]||(n[9]=g("p",{class:"text-orange-600 mb-2"},"现在购买",-1)),g("div",zh,[g("span",Kh,"¥"+J(k(e).order_amount),1)]),n[10]||(n[10]=g("p",{class:"text-gray-500 mb-6"},"享双倍课时",-1)),g("div",Hh,[g("div",Gh,[g("div",Xh,[V(k(Vt),{size:18})]),g("span",Yh,J(k(e).course_num)+"节课时",1)]),g("div",qh,[g("div",Zh,[V(k(Vt),{size:18})]),n[7]||(n[7]=g("span",{class:"text-lg"},"专业老师陪读",-1))]),g("div",Jh,[g("div",Qh,[V(k(Vt),{size:18})]),n[8]||(n[8]=g("span",{class:"text-lg"},"实时答疑辅导",-1))])])])]),_:1})])])]))}}),ed={class:"py-16 px-4 bg-white"},sd={class:"max-w-6xl mx-auto"},nd={class:"md:hidden overflow-x-auto pb-4 -mx-4 px-4"},id={class:"flex gap-4",style:{width:"max-content"}},od={class:"flex items-center gap-4 mb-4"},rd={class:"w-12 h-12 rounded-full overflow-hidden border-2 border-orange-300"},ad=["src","alt"],ld={class:"flex-1"},ud={class:"text-gray-800"},cd={class:"flex gap-1"},hd={class:"text-gray-700 leading-relaxed"},dd=dt({__name:"reviews",setup(t){const e=gt([{name:"李妈妈",avatar:"https://images.unsplash.com/photo-1561065533-316e3142d586?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHx5b3VuZyUyMHN0dWRlbnQlMjBwb3J0cmFpdHxlbnwxfHx8fDE3NjExOTU1NzZ8MA&ixlib=rb-4.1.0&q=80&w=1080",rating:5,comment:"孩子在有光自习室学习后,专注力明显提升,作业效率也提高了很多!"},{name:"王同学",avatar:"https://images.unsplash.com/photo-1514355315815-2b64b0216b14?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHxhc2lhbiUyMHN0dWRlbnQlMjBoYXBweXxlbnwxfHx8fDE3NjEyMjc3MzR8MA&ixlib=rb-4.1.0&q=80&w=1080",rating:5,comment:"老师很负责,遇到问题可以随时提问,学习氛围特别好,推荐!"},{name:"张爸爸",avatar:"https://images.unsplash.com/photo-1585432959389-67f059cf1e41?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHx0ZWVuYWdlciUyMHN0dWR5aW5nfGVufDF8fHx8MTc2MTI3MzgwMnww&ixlib=rb-4.1.0&q=80&w=1080",rating:5,comment:"性价比超高20节课才200元老师专业又耐心孩子很喜欢"},{name:"陈同学",avatar:"https://images.unsplash.com/photo-1561065533-316e3142d586?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w3Nzg4Nzd8MHwxfHNlYXJjaHwxfHx5b3VuZyUyMHN0dWRlbnQlMjBwb3J0cmFpdHxlbnwxfHx8fDE3NjExOTU1NzZ8MA&ixlib=rb-4.1.0&q=80&w=1080",rating:5,comment:"和优秀的同学一起学习,感觉自己也变得更加努力了,很有动力!"}]);return(s,n)=>(F(),G("div",ed,[g("div",sd,[V(k(Z).div,{initial:{opacity:0,y:30},"while-in-view":{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},class:"text-center mb-10"},{default:N(()=>[...n[0]||(n[0]=[g("h2",{class:"text-3xl md:text-4xl mb-3 text-gray-800"},"学员真实反馈",-1),g("p",{class:"text-gray-600"},"数千家长和学员的共同选择",-1)])]),_:1}),g("div",nd,[g("div",id,[(F(!0),G(Pe,null,Ve(e.value,(i,r)=>(F(),ee(k(Z).div,{key:r,initial:{opacity:0,y:30},"while-in-view":{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:r*.1},class:"w-[300px] flex-shrink-0 bg-gradient-to-br from-orange-50 to-white rounded-2xl p-6 shadow-lg border border-orange-100 hover:shadow-xl transition-shadow"},{default:N(()=>[g("div",od,[g("div",rd,[g("img",{src:i.avatar,alt:i.name,class:"w-full h-full object-cover"},null,8,ad)]),g("div",ld,[g("h4",ud,J(i.name),1),g("div",cd,[(F(!0),G(Pe,null,Ve(i.rating,o=>(F(),ee(k(ir),{theme:"filled",key:o,size:"14",class:"fill-orange-400 text-orange-400"}))),128))])])]),g("p",hd,J(i.comment),1)]),_:2},1032,["transition"]))),128))])]),n[1]||(n[1]=g("div",{class:"md:hidden text-center mt-4 text-gray-400 text-sm"}," ← 滑动查看更多评价 → ",-1))])]))}});function fd(){return oi.get("/yg/active_info")}function pd(){return oi.post("/yg/order/create")}function md(t){return new Promise(e=>{Qo.chooseWXPay({timestamp:t.timestamp,nonceStr:t.nonceStr,package:t.package,signType:t.signType,paySign:t.paySign,success:function(){e(!0)},cancel:function(s){console.log(s),e(!1)}})})}const gd={key:0,class:"min-h-screen bg-white"},Ad=dt({__name:"index",setup(t){const e=sr(),s=gt({}),n=gt(!1),i=gt(!1);(async()=>{let a=await fd();s.value=a,n.value=!0;const l=new Date(s.value.active_end_at).getTime();(s.value.active_status!=1||l<=Date.now())&&(i.value=!0)})(),ei("activeInfo",s);const o=async()=>{tr({duration:0,forbidClick:!0,message:"支付中"});let a=await pd();md(a).then(l=>{l&&(er("支付成功"),e.push({path:"/pay_success",query:s.value}))})};return(a,l)=>n.value?(F(),G("div",gd,[V(Vh,{end:i.value},null,8,["end"]),V(Rh),V(td),V(dd),l[1]||(l[1]=g("div",{class:"h-24"},null,-1)),i.value?Ps("",!0):(F(),G("div",{key:0,onClick:o,class:"fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200 shadow-2xl z-50 px-4 py-3 safe-area-bottom"},[...l[0]||(l[0]=[g("div",{class:"flex-1 flex items-center justify-center gap-2 bg-gradient-to-r from-orange-500 to-orange-600 text-white px-8 py-4 rounded-full hover:from-orange-600 hover:to-orange-700 transition-all shadow-lg"},[g("span",{class:"text-lg"},"立即参与")],-1)])]))])):Ps("",!0)}});export{Ad as default};