Viewing File: /usr/local/cpanel/base/frontend/jupiter/koality/_nuxt/CHSuUJqx.js
import{bT as zo,bW as Go,i as os,cu as qt,s as Et,aO as rs,aP as as,d as ls,o as et,c as ct,w as Y,ag as Ho,ah as Zt,k,b8 as Ae,cv as Xo,cw as Yo,A as us,cx as qo,bM as Zo,b7 as Jo,ch as Qo,cr as tr,cy as er,av as cs,c4 as nr,bL as ir,aq as sr,bN as Sn,ck as or,e as wn,a as X,cz as An,D as Pn,p as En,F as rr,cA as ar,cB as lr,a2 as ur,cC as cr,at as Vn,aE as hr}from"./EJiqiqZX.js";import{D as fr,a as dr,b as pr}from"./qv9l9arW.js";import"./NwK2Pm4d.js";const mr={slots:{base:"rounded-md w-full",overlay:"fixed inset-0 bg-default/75 backdrop-blur-sm will-change-opacity",content:"fixed inset-0 flex items-center justify-center cursor-zoom-out focus:outline-none",zoomedImage:"w-full h-auto max-w-[95vw] max-h-[95vh] object-contain rounded-md"},variants:{zoom:{true:"will-change-transform"},open:{true:""}},compoundVariants:[{zoom:!0,open:!1,class:"cursor-zoom-in"}]},Wt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function gr(t,e){let n=new Set,i=new Set,s=!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,f=!1)=>{const p=f&&s?n:i;return h&&o.add(u),p.has(u)||p.add(u),u},cancel:u=>{i.delete(u),o.delete(u)},process:u=>{if(a=u,s){r=!0;return}s=!0,[n,i]=[i,n],n.forEach(l),n.clear(),s=!1,r&&(r=!1,c.process(u))}};return c}const q={},yr=40;function hs(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Wt.reduce((x,S)=>(x[S]=gr(r),x),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:h,preRender:f,render:d,postRender:p}=o,m=()=>{const x=q.useManualTiming?s.timestamp:performance.now();n=!1,q.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(x-s.timestamp,yr),1)),s.timestamp=x,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),u.process(s),h.process(s),f.process(s),d.process(s),p.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(m))},g=()=>{n=!0,i=!0,s.isProcessing||t(m)};return{schedule:Wt.reduce((x,S)=>{const b=o[S];return x[S]=(w,M=!1,A=!1)=>(n||g(),b.schedule(w,M,A)),x},{}),cancel:x=>{for(let S=0;S<Wt.length;S++)o[Wt[S]].cancel(x)},state:s,steps:o}}const j=t=>t,{schedule:E,cancel:Z,state:B,steps:ue}=hs(typeof requestAnimationFrame<"u"?requestAnimationFrame:j,!0);let Ht;function vr(){Ht=void 0}const F={now:()=>(Ht===void 0&&F.set(B.isProcessing||q.useManualTiming?B.timestamp:performance.now()),Ht),set:t=>{Ht=t,queueMicrotask(vr)}},$=t=>t*1e3,O=t=>t/1e3;function xr(t,e){const n=F.now(),i=({timestamp:s})=>{const r=s-n;r>=e&&(Z(i),t(r-e))};return E.setup(i,!0),()=>Z(i)}const jt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),nt=jt("deg"),z=jt("%"),v=jt("px"),Tr=jt("vh"),br=jt("vw"),Cn={...z,parse:t=>z.parse(t)/100,transform:t=>z.transform(t*100)};function Mn(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const K={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(v.test(t))t=parseFloat(t);else return t;const n=Mn(t,e.target.x),i=Mn(t,e.target.y);return`${n}% ${i}%`}},G=(t,e,n)=>n>e?e:n<t?t:n,gt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Lt={...gt,transform:t=>G(0,1,t)},Kt={...gt,default:1},Vt=t=>Math.round(t*1e5)/1e5,Ke=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Sr(t){return t==null}const wr=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ze=(t,e)=>n=>!!(typeof n=="string"&&wr.test(n)&&n.startsWith(t)||e&&!Sr(n)&&Object.prototype.hasOwnProperty.call(n,e)),fs=(t,e,n)=>i=>{if(typeof i!="string")return i;const[s,r,o,a]=i.match(Ke);return{[t]:parseFloat(s),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Ar=t=>G(0,255,t),ce={...gt,transform:t=>Math.round(Ar(t))},rt={test:ze("rgb","red"),parse:fs("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+ce.transform(t)+", "+ce.transform(e)+", "+ce.transform(n)+", "+Vt(Lt.transform(i))+")"};function Pr(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const Pe={test:ze("#"),parse:Pr,transform:rt.transform},ht={test:ze("hsl","hue"),parse:fs("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+z.transform(Vt(e))+", "+z.transform(Vt(n))+", "+Vt(Lt.transform(i))+")"},D={test:t=>rt.test(t)||Pe.test(t)||ht.test(t),parse:t=>rt.test(t)?rt.parse(t):ht.test(t)?ht.parse(t):Pe.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?rt.transform(t):ht.transform(t),getAnimatableNone:t=>{const e=D.parse(t);return e.alpha=0,D.transform(e)}},Er=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Vr(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Ke))==null?void 0:e.length)||0)+(((n=t.match(Er))==null?void 0:n.length)||0)>0}const ds="number",ps="color",Cr="var",Mr="var(",Dn="${}",Dr=/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 Bt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let r=0;const a=e.replace(Dr,l=>(D.test(l)?(i.color.push(r),s.push(ps),n.push(D.parse(l))):l.startsWith(Mr)?(i.var.push(r),s.push(Cr),n.push(l)):(i.number.push(r),s.push(ds),n.push(parseFloat(l))),++r,Dn)).split(Dn);return{values:n,split:a,indexes:i,types:s}}function ms(t){return Bt(t).values}function gs(t){const{split:e,types:n}=Bt(t),i=e.length;return s=>{let r="";for(let o=0;o<i;o++)if(r+=e[o],s[o]!==void 0){const a=n[o];a===ds?r+=Vt(s[o]):a===ps?r+=D.transform(s[o]):r+=s[o]}return r}}const Rr=t=>typeof t=="number"?0:D.test(t)?D.getAnimatableNone(t):t;function Lr(t){const e=ms(t);return gs(t)(e.map(Rr))}const st={test:Vr,parse:ms,createTransformer:gs,getAnimatableNone:Lr},V=(t,e,n)=>t+(e-t)*n,ys={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=st.parse(t);if(s.length>5)return i;const r=st.createTransformer(t),o=typeof s[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+o]/=a,s[1+o]/=l;const c=V(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=c),typeof s[3+o]=="number"&&(s[3+o]/=c),r(s)}},vs=t=>e=>typeof e=="string"&&e.startsWith(t),Ge=vs("--"),Br=vs("var(--"),He=t=>Br(t)?kr.test(t.split("/*")[0].trim()):!1,kr=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Rn(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const kt={borderRadius:{...K,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:K,borderTopRightRadius:K,borderBottomLeftRadius:K,borderBottomRightRadius:K,boxShadow:ys};function xs(t){for(const e in t)kt[e]=t[e],Ge(e)&&(kt[e].isCSSVariable=!0)}function It(t,e){const n=typeof t=="string"&&!e?`${t}Context`:e,i=Symbol(n);return[o=>{const a=zo(i,o);if(a===void 0)throw new Error(`Injection \`${i.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`);return a},o=>(Go(i,o),o)]}const[Fr,jr]=It("Motion"),[Ir]=It("LayoutGroup");function Ln(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}class Q{constructor(e){this.state=e}beforeMount(){}mount(){}unmount(){}update(){}beforeUpdate(e){}beforeUnmount(){}}function Ct(t,e,n){if(Array.isArray(t))return t.reduce((i,s)=>{const r=Ct(s,e,n);return r?{...i,...r}:i},{});if(typeof t=="object")return t;if(t&&e){const i=e[t];return typeof i=="function"?i(n):i}}function Or(t,e){return typeof t!=typeof e?!0:Array.isArray(t)&&Array.isArray(e)?!_r(t,e):t!==e}function _r(t,e){const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}function Bn(t){return t?.startsWith("--")}const Ur=t=>t;function $r(t){return typeof t=="number"}const Nr=["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"],Wr=new Set(Nr);function Ts(t){return Wr.has(t)}class Kr{constructor(e){this.features=[];const{features:n=[],lazyMotionContext:i}=e.options,s=n.concat(i.features.value);this.features=s.map(o=>new o(e));const r=this.features;os(i.features,o=>{o.forEach(a=>{if(!s.includes(a)){s.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 n;return(n=e.beforeMount)==null?void 0:n.call(e)})}unmount(){this.features.forEach(e=>e.unmount())}update(){this.features.forEach(e=>{var n;return(n=e.update)==null?void 0:n.call(e)})}beforeUpdate(e){this.features.forEach(n=>{var i;return(i=n.beforeUpdate)==null?void 0:i.call(n,e)})}beforeUnmount(){this.features.forEach(e=>e.beforeUnmount())}}function zr(t){return typeof t=="string"||t===!1||Array.isArray(t)}const Jt=new WeakMap;let Gr=0;class Hr{constructor(e,n){var i;this.element=null,this.isExiting=!1,this.presenceContainer=null,this.children=new Set,this.activeStates={initial:!0,animate:!0},this.currentProcess=null,this._context=null,this.animateUpdates=j,this.id=`motion-state-${Gr++}`,this.options=e,this.parent=n,(i=n?.children)==null||i.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 Kr(this),this.type=Ts(this.options.as)?"svg":"html"}get context(){if(!this._context){const e={get:(n,i)=>{var s;return zr(this.options[i])?this.options[i]:(s=this.parent)==null?void 0:s.context[i]}};this._context=new Proxy({},e)}return this._context}initTarget(e){var n;const i=this.options.custom??((n=this.options.animatePresenceContext)==null?void 0:n.custom);this.baseTarget=e.reduce((s,r)=>({...s,...Ct(this.options[r]||this.context[r],this.options.variants,i)}),{}),this.target={}}updateOptions(e){var n;this.options=e,(n=this.visualElement)==null||n.update({...this.options,whileTap:this.options.whilePress},null)}beforeMount(){this.featureManager.beforeMount()}mount(e,n,i=!1){var s;this.element=e,this.updateOptions(n),this.featureManager.mount(),!i&&this.options.animate&&((s=this.startAnimation)==null||s.call(this))}clearAnimation(){var e,n;this.currentProcess&&Z(this.currentProcess),this.currentProcess=null,(n=(e=this.visualElement)==null?void 0:e.variantChildren)==null||n.forEach(i=>{i.state.clearAnimation()})}startAnimation(){this.clearAnimation(),this.currentProcess=E.render(()=>{this.currentProcess=null,this.animateUpdates()})}beforeUnmount(){this.featureManager.beforeUnmount()}unmount(){var e,n,i;(n=(e=this.parent)==null?void 0:e.children)==null||n.delete(this),Jt.delete(this.element),this.featureManager.unmount(),(i=this.visualElement)==null||i.unmount(),this.clearAnimation()}beforeUpdate(e){this.featureManager.beforeUpdate(e)}update(e){this.updateOptions(e),this.featureManager.update(),this.startAnimation()}setActive(e,n,i=!0){var s;!this.element||this.activeStates[e]===n||(this.activeStates[e]=n,(s=this.visualElement.variantChildren)==null||s.forEach(r=>{r.state.setActive(e,n,!1)}),i&&this.animateUpdates({isExit:e==="exit"&&this.activeStates.exit}))}isMounted(){return!!this.element}getSnapshot(e,n){}didUpdate(e){}}const ut=new WeakMap;function kn(t,e,n){return new CustomEvent(t,{detail:{target:e,isExit:n}})}const Fn={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:t=>`${t}deg`},Xr={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:t=>`${t}px`},rotate:Fn,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:Ur},skew:Fn},Yr=["translate","scale","rotate","skew"],qr=["","X","Y","Z"],Xe=new Map,Qt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"];Yr.forEach(t=>{qr.forEach(e=>{Qt.push(t+e),Xe.set(t+e,Xr[t])})});const Zr=new Set(Qt),Jr=t=>Zr.has(t),jn={x:"translateX",y:"translateY",z:"translateZ"};function Qr([t],[e]){return Qt.indexOf(t)-Qt.indexOf(e)}function ta(t,[e,n]){return`${t} ${e}(${n})`}function ea(t){return t.sort(Qr).reduce(ta,"").trim()}const In={translate:[0,0],rotate:0,scale:1,skew:0,x:0,y:0,z:0},R=t=>!!(t&&t.getVelocity),na={get:(t,e)=>{let n=Bn(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!n&&n!=="0"){const i=Xe.get(e);i&&(n=i.initialValue)}return n},set:(t,e,n)=>{Bn(e)?t.style.setProperty(e,n):t.style[e]=n}};function ia(t){var e;const n={},i=[];for(let s in t){let r=t[s];r=R(r)?r.get():r,Jr(s)&&s in jn&&(s=jn[s]);let o=Array.isArray(r)?r[0]:r;const a=Xe.get(s);a?(o=$r(r)?(e=a.toDefaultUnit)==null?void 0:e.call(a,r):r,i.push([s,o])):n[s]=o}return i.length&&(n.transform=ea(i)),Object.keys(n).length===0?null:n}const sa={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 oa(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function ra(t,e,n=1,i=0){t.pathLength=1,delete t["path-length"],t["stroke-dashoffset"]=v.transform(-i);const s=v.transform(e),r=v.transform(n);t["stroke-dasharray"]=`${s} ${r}`}function aa(t){const e={},n={};for(const i in t){const s=oa(i);if(s in sa){const r=t[i];e[s]=R(r)?r.get():r}else n[i]=t[i]}return e["path-length"]!==void 0&&ra(e,e["path-length"],e["path-spacing"],e["path-offset"]),{attrs:e,style:n}}function la({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function ua(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function ca(t,e){return la(ua(t.getBoundingClientRect(),e))}const On={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 On)Ee[t]={isEnabled:e=>On[t].some(n=>!!e[n])};const _n=()=>({translate:0,scale:1,origin:0,originPoint:0}),ft=()=>({x:_n(),y:_n()}),Un=()=>({min:0,max:0}),L=()=>({x:Un(),y:Un()}),ha=typeof window<"u",te={current:null},bs={current:!1};function fa(){if(bs.current=!0,!!ha)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>te.current=t.matches;t.addEventListener("change",e),e()}else te.current=!1}function da(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function pa(t){return typeof t=="string"||Array.isArray(t)}const ma=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ga=["initial",...ma];function Ss(t){return da(t.animate)||ga.some(e=>pa(t[e]))}function ya(t){return!!(Ss(t)||t.variants)}function $n(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}function Ye(t,e){t.indexOf(e)===-1&&t.push(e)}function ae(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class qe{constructor(){this.subscriptions=[]}add(e){return Ye(this.subscriptions,e),()=>ae(this.subscriptions,e)}notify(e,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,n,i);else for(let r=0;r<s;r++){const o=this.subscriptions[r];o&&o(e,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function ws(t,e){return e?t*(1e3/e):0}const Nn=30,va=t=>!isNaN(parseFloat(t));class xa{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{var s;const r=F.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=F.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=va(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new qe);const i=this.events[e].add(n);return e==="change"?()=>{i(),E.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&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=F.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Nn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Nn);return ws(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),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,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function pt(t,e){return new xa(t,e)}function Ta(t,e,n){for(const i in e){const s=e[i],r=n[i];if(R(s))t.addValue(i,s);else if(R(r))t.addValue(i,pt(s,{owner:t}));else if(r!==s)if(t.hasValue(i)){const o=t.getValue(i);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=t.getStaticValue(i);t.addValue(i,pt(o!==void 0?o:s,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}function Wn(t){const e=[{},{}];return t?.values.forEach((n,i)=>{e[0][i]=n.get(),e[1][i]=n.getVelocity()}),e}function As(t,e,n,i){if(typeof e=="function"){const[s,r]=Wn(i);e=e(n!==void 0?n:t.custom,s,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[s,r]=Wn(i);e=e(n!==void 0?n:t.custom,s,r)}return e}function ba(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const at=t=>t*180/Math.PI,Ve=t=>{const e=at(Math.atan2(t[1],t[0]));return Ce(e)},Sa={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Ve,rotateZ:Ve,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),Kn=Ve,zn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Gn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),wa={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:zn,scaleY:Gn,scale:t=>(zn(t)+Gn(t))/2,rotateX:t=>Ce(at(Math.atan2(t[6],t[5]))),rotateY:t=>Ce(at(Math.atan2(-t[2],t[0]))),rotateZ:Kn,rotate:Kn,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 Me(t){return t.includes("scale")?1:0}function De(t,e){if(!t||t==="none")return Me(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=wa,s=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Sa,s=a}if(!s)return Me(e);const r=i[e],o=s[1].split(",").map(Pa);return typeof r=="function"?r(o):o[r]}const Aa=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return De(n,e)};function Pa(t){return parseFloat(t.trim())}const yt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],vt=new Set(yt),Hn=t=>t===gt||t===v,Ea=new Set(["x","y","z"]),Va=yt.filter(t=>!Ea.has(t));function Ca(t){const e=[];return Va.forEach(n=>{const i=t.getValue(n);i!==void 0&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}const it={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),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})=>De(e,"x"),y:(t,{transform:e})=>De(e,"y")};it.translateX=it.x;it.translateY=it.y;const lt=new Set;let Re=!1,Le=!1,Be=!1;function Ps(){if(Le){const t=Array.from(lt).filter(i=>i.needsMeasurement),e=new Set(t.map(i=>i.element)),n=new Map;e.forEach(i=>{const s=Ca(i);s.length&&(n.set(i,s),i.render())}),t.forEach(i=>i.measureInitialState()),e.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([r,o])=>{var a;(a=i.getValue(r))==null||a.set(o)})}),t.forEach(i=>i.measureEndState()),t.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}Le=!1,Re=!1,lt.forEach(t=>t.complete(Be)),lt.clear()}function Es(){lt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Le=!0)})}function Ma(){Be=!0,Es(),Ps(),Be=!1}class Ze{constructor(e,n,i,s,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=i,this.motionValue=s,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(lt.add(this),Re||(Re=!0,E.read(Es),E.resolveKeyframes(Ps))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:i,motionValue:s}=this;if(e[0]===null){const r=s?.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(i&&n){const a=i.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),s&&r===void 0&&s.set(e[0])}ba(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),lt.delete(this)}cancel(){this.state==="scheduled"&&(lt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Vs=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Cs=t=>/^0[^.\s]+$/u.test(t),Da={test:t=>t==="auto",parse:t=>t},Ms=t=>e=>e.test(t),Ds=[gt,v,z,nt,br,Tr,Da],Xn=t=>Ds.find(Ms(t)),Ra=[...Ds,D,st],La=t=>Ra.find(Ms(t)),Ba=new Set(["brightness","contrast","saturate","opacity"]);function ka(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[i]=n.match(Ke)||[];if(!i)return t;const s=n.replace(i,"");let r=Ba.has(e)?1:0;return i!==n&&(r*=100),e+"("+r+s+")"}const Fa=/\b([a-z-]*)\(.*?\)/gu,ke={...st,getAnimatableNone:t=>{const e=t.match(Fa);return e?e.map(ka).join(" "):t}},Yn={...gt,transform:Math.round},ja={rotate:nt,rotateX:nt,rotateY:nt,rotateZ:nt,scale:Kt,scaleX:Kt,scaleY:Kt,scaleZ:Kt,skew:nt,skewX:nt,skewY:nt,distance:v,translateX:v,translateY:v,translateZ:v,x:v,y:v,z:v,perspective:v,transformPerspective:v,opacity:Lt,originX:Cn,originY:Cn,originZ:v},Je={borderWidth:v,borderTopWidth:v,borderRightWidth:v,borderBottomWidth:v,borderLeftWidth:v,borderRadius:v,radius:v,borderTopLeftRadius:v,borderTopRightRadius:v,borderBottomRightRadius:v,borderBottomLeftRadius:v,width:v,maxWidth:v,height:v,maxHeight:v,top:v,right:v,bottom:v,left:v,inset:v,insetBlock:v,insetBlockStart:v,insetBlockEnd:v,insetInline:v,insetInlineStart:v,insetInlineEnd:v,padding:v,paddingTop:v,paddingRight:v,paddingBottom:v,paddingLeft:v,paddingBlock:v,paddingBlockStart:v,paddingBlockEnd:v,paddingInline:v,paddingInlineStart:v,paddingInlineEnd:v,margin:v,marginTop:v,marginRight:v,marginBottom:v,marginLeft:v,marginBlock:v,marginBlockStart:v,marginBlockEnd:v,marginInline:v,marginInlineStart:v,marginInlineEnd:v,backgroundPositionX:v,backgroundPositionY:v,...ja,zIndex:Yn,fillOpacity:Lt,strokeOpacity:Lt,numOctaves:Yn},Ia={...Je,color:D,backgroundColor:D,outlineColor:D,fill:D,stroke:D,borderColor:D,borderTopColor:D,borderRightColor:D,borderBottomColor:D,borderLeftColor:D,filter:ke,WebkitFilter:ke},Rs=t=>Ia[t];function Ls(t,e){let n=Rs(t);return n!==ke&&(n=st),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const{schedule:Bs}=hs(queueMicrotask,!0),qn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ks{scrapeMotionValuesFromProps(e,n,i){return{}}constructor({parent:e,props:n,presenceContext:i,reducedMotionConfig:s,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=Ze,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 f=F.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,E.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=Ss(n),this.isVariantNode=ya(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const d=h[f];l[f]!==void 0&&R(d)&&d.set(l[f])}}mount(e){var n;this.current=e,ut.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((i,s)=>this.bindToMotionValue(s,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(bs.current||fa(),this.shouldReduceMotion=te.current),(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),Z(this.notifyUpdate),Z(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const i=this.features[n];i&&(i.unmount(),i.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,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const i=vt.has(e);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&E.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{s(),r&&r(),n.owner&&n.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 n=Ee[e];if(!n)continue;const{isEnabled:i,Feature:s}=n;if(!this.features[e]&&s&&i(this.props)&&(this.features[e]=new s(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,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<qn.length;i++){const s=qn[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const r="on"+s,o=e[r];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=Ta(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 n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const i=this.values.get(e);n!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&n!==void 0&&(i=pt(n===null?void 0:n,{owner:this}),this.addValue(e,i)),i}readValue(e,n){let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(Vs(i)||Cs(i))?i=parseFloat(i):!La(i)&&st.test(n)&&(i=Ls(e,n)),this.setBaseTarget(e,R(i)?i.get():i)),R(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:i}=this.props;let s;if(typeof i=="string"||typeof i=="object"){const o=As(this.props,i,(n=this.presenceContext)==null?void 0:n.custom);o&&(s=o[e])}if(i&&s!==void 0)return s;const r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!R(r)?r:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new qe),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Bs.render(this.render)}}const Fs=new Set(["width","height","top","left","right","bottom",...yt]);var Oa={},Zn;let Ot=()=>{},J=()=>{};typeof process<"u"&&((Zn=Oa)==null?void 0:Zn.NODE_ENV)!=="production"&&(Ot=(t,e,n)=>{!t&&typeof console<"u"&&console.warn($n(e,n))},J=(t,e,n)=>{if(!t)throw new Error($n(e,n))});const _a=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ua(t){const e=_a.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}const $a=4;function js(t,e,n=1){J(n<=$a,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,s]=Ua(t);if(!i)return;const r=window.getComputedStyle(e).getPropertyValue(i);if(r){const o=r.trim();return Vs(o)?parseFloat(o):o}return He(s)?js(s,e,n+1):s}function Na(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Cs(t):!0}const Wa=new Set(["auto","none","0"]);function Ka(t,e,n){let i=0,s;for(;i<t.length&&!s;){const r=t[i];typeof r=="string"&&!Wa.has(r)&&Bt(r).values.length&&(s=t[i]),i++}if(s&&n)for(const r of e)t[r]=Ls(n,s)}class za extends Ze{constructor(e,n,i,s,r){super(e,n,i,s,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<e.length;u++){let h=e[u];if(typeof h=="string"&&(h=h.trim(),He(h))){const f=js(h,n.current);f!==void 0&&(e[u]=f),u===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Fs.has(i)||e.length!==2)return;const[s,r]=e,o=Xn(s),a=Xn(r),l=Rn(s),c=Rn(r);if(l!==c&&it[i]){this.needsMeasurement=!0;return}if(o!==a)if(Hn(o)&&Hn(a))for(let u=0;u<e.length;u++){const h=e[u];typeof h=="string"&&(e[u]=parseFloat(h))}else it[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,i=[];for(let s=0;s<e.length;s++)(e[s]===null||Na(e[s]))&&i.push(s);i.length&&Ka(e,i,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:i}=this;if(!e||!e.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=it[i](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&e.getValue(i,s).jump(s,!1)}measureEndState(){var e;const{element:n,name:i,unresolvedKeyframes:s}=this;if(!n||!n.current)return;const r=n.getValue(i);r&&r.jump(this.measuredOrigin,!1);const o=s.length-1,a=s[o];s[o]=it[i](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(e=this.removedTransforms)!=null&&e.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}class Is extends ks{constructor(){super(...arguments),this.KeyframeResolver=za}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:i}){delete n[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;R(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}const Os=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Ga={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ha=yt.length;function Xa(t,e,n){let i="",s=!0;for(let r=0;r<Ha;r++){const o=yt[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||n){const c=Os(a,Je[o]);if(!l){s=!1;const u=Ga[o]||o;i+=`${u}(${c}) `}n&&(e[o]=c)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function _s(t,e,n){const{style:i,vars:s,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const c=e[l];if(vt.has(l)){o=!0;continue}else if(Ge(l)){s[l]=c;continue}else{const u=Os(c,Je[l]);l.startsWith("origin")?(a=!0,r[l]=u):i[l]=u}}if(e.transform||(o||n?i.transform=Xa(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=r;i.transformOrigin=`${l} ${c} ${u}`}}function Us(t,{style:e,vars:n},i,s){const r=t.style;let o;for(o in e)r[o]=e[o];s?.applyProjectionStyles(r,i);for(o in n)r.setProperty(o,n[o])}function Ya(t,{layout:e,layoutId:n}){return vt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!kt[t]||t==="opacity")}function $s(t,e,n){var i;const{style:s}=t,r={};for(const o in s)(R(s[o])||e.style&&R(e.style[o])||Ya(o,t)||((i=n?.getValue(o))==null?void 0:i.liveStyle)!==void 0)&&(r[o]=s[o]);return r}function qa(t){return window.getComputedStyle(t)}class Ns extends Is{constructor(){super(...arguments),this.type="html",this.renderInstance=Us}readValueFromInstance(e,n){var i;if(vt.has(n))return(i=this.projection)!=null&&i.isProjecting?Me(n):Aa(e,n);{const s=qa(e),r=(Ge(n)?s.getPropertyValue(n):s[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:n}){return ca(e,n)}build(e,n,i){_s(e,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,i){return $s(e,n,i)}}const Qe=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Za={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ja={offset:"strokeDashoffset",array:"strokeDasharray"};function Qa(t,e,n=1,i=0,s=!0){t.pathLength=1;const r=s?Za:Ja;t[r.offset]=v.transform(-i);const o=v.transform(e),a=v.transform(n);t[r.array]=`${o} ${a}`}const tl=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function el(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:r=1,pathOffset:o=0,...a},l,c,u){if(_s(t,a,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete h.transformBox);for(const d of tl)h[d]!==void 0&&(f[d]=h[d],delete h[d]);e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),i!==void 0&&(h.scale=i),s!==void 0&&Qa(h,s,r,o,!1)}const Ws=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"]),nl=t=>typeof t=="string"&&t.toLowerCase()==="svg";function il(t,e,n,i){Us(t,e,void 0,i);for(const s in e.attrs)t.setAttribute(Ws.has(s)?s:Qe(s),e.attrs[s])}function sl(t,e,n){const i=$s(t,e,n);for(const s in t)if(R(t[s])||R(e[s])){const r=yt.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[r]=t[s]}return i}class Ks extends Is{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=L}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(vt.has(n)){const i=Rs(n);return i&&i.default||0}return n=Ws.has(n)?n:Qe(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,i){return sl(e,n,i)}build(e,n,i){el(e,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(e,n,i,s){il(e,n,i,s)}mount(e){this.isSVGTag=nl(e.tagName),super.mount(e)}}function ol(t,e){return Ts(t)?new Ks(e):new Ns(e)}function rl(t,e,n,i=0,s=1){const r=Array.from(t),o=r.indexOf(e),a=t.size,l=(a-1)*i,c=typeof n=="function";return o===r.length-1&&(e.parent.enteringChildren=void 0),c?n(o,a):s===1?o*i:l-o*i}function tn(t){return typeof t=="object"&&!Array.isArray(t)}function en(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){let i=document;const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t)}function zs(t,e,n,i){return typeof t=="string"&&tn(e)?en(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function al(t,e,n){return t*(e+1)}function Jn(t,e,n,i){return typeof e=="number"?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):e==="<"?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):i.get(e)??t}const ll=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t},Gs=t=>Array.isArray(t)&&typeof t[0]!="number";function Hs(t,e){return Gs(t)?t[ll(0,t.length,e)]:t}function ul(t,e,n){for(let i=0;i<t.length;i++){const s=t[i];s.at>e&&s.at<n&&(ae(t,s),i--)}}function cl(t,e,n,i,s,r){ul(t,s,r);for(let o=0;o<e.length;o++)t.push({value:e[o],at:V(s,r,i[o]),easing:Hs(n,o)})}function hl(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function fl(t,e){return t.at===e.at?t.value===null?1:e.value===null?-1:0:t.at-e.at}const mt=(t,e,n)=>{const i=e-t;return i===0?1:(n-t)/i};function Xs(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=mt(0,e,i);t.push(V(n,1,s))}}function Ys(t){const e=[0];return Xs(e,t.length-1),e}const ee=2e4;function nn(t){let e=0;const n=50;let i=t.next(e);for(;!i.done&&e<ee;)e+=n,i=t.next(e);return e>=ee?1/0:e}function qs(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(nn(i),ee);return{type:"keyframes",ease:r=>i.next(s*r).value/e,duration:O(s)}}function sn(t){return typeof t=="function"&&"applyToOptions"in t}const dl="easeInOut",pl=20;function ml(t,{defaultTransition:e={},...n}={},i,s){const r=e.duration||.3,o=new Map,a=new Map,l={},c=new Map;let u=0,h=0,f=0;for(let d=0;d<t.length;d++){const p=t[d];if(typeof p=="string"){c.set(p,h);continue}else if(!Array.isArray(p)){c.set(p.name,Jn(h,p.at,u,c));continue}let[m,g,y={}]=p;y.at!==void 0&&(h=Jn(h,y.at,u,c));let T=0;const x=(S,b,w,M=0,A=0)=>{const P=gl(S),{delay:I=0,times:N=Ys(P),type:le="keyframes",repeat:xt,repeatType:_h,repeatDelay:Uh=0,...Ko}=b;let{ease:tt=e.ease||"easeOut",duration:H}=b;const gn=typeof I=="function"?I(M,A):I,yn=P.length,vn=sn(le)?le:s?.[le||"keyframes"];if(yn<=2&&vn){let Tt=100;if(yn===2&&xl(P)){const bt=P[1]-P[0];Tt=Math.abs(bt)}const $t={...Ko};H!==void 0&&($t.duration=$(H));const Nt=qs($t,Tt,vn);tt=Nt.ease,H=Nt.duration}H??(H=r);const xn=h+gn;N.length===1&&N[0]===0&&(N[1]=1);const Tn=N.length-P.length;if(Tn>0&&Xs(N,Tn),P.length===1&&P.unshift(null),xt){J(xt<pl,"Repeat count too high, must be less than 20","repeat-count-high"),H=al(H,xt);const Tt=[...P],$t=[...N];tt=Array.isArray(tt)?[...tt]:[tt];const Nt=[...tt];for(let bt=0;bt<xt;bt++){P.push(...Tt);for(let St=0;St<Tt.length;St++)N.push($t[St]+(bt+1)),tt.push(St===0?"linear":Hs(Nt,St-1))}hl(N,xt)}const bn=xn+H;cl(w,P,tt,N,xn,bn),T=Math.max(gn+H,T),f=Math.max(bn,f)};if(R(m)){const S=Qn(m,a);x(g,y,ti("default",S))}else{const S=zs(m,g,i,l),b=S.length;for(let w=0;w<b;w++){g=g,y=y;const M=S[w],A=Qn(M,a);for(const P in g)x(g[P],yl(y,P),ti(P,A),w,b)}}u=h,h+=T}return a.forEach((d,p)=>{for(const m in d){const g=d[m];g.sort(fl);const y=[],T=[],x=[];for(let b=0;b<g.length;b++){const{at:w,value:M,easing:A}=g[b];y.push(M),T.push(mt(0,f,w)),x.push(A||"easeOut")}T[0]!==0&&(T.unshift(0),y.unshift(y[0]),x.unshift(dl)),T[T.length-1]!==1&&(T.push(1),y.push(null)),o.has(p)||o.set(p,{keyframes:{},transition:{}});const S=o.get(p);S.keyframes[m]=y,S.transition[m]={...e,duration:f,ease:x,times:T,...n}}}),o}function Qn(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function ti(t,e){return e[t]||(e[t]=[]),e[t]}function gl(t){return Array.isArray(t)?t:[t]}function yl(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const vl=t=>typeof t=="number",xl=t=>t.every(vl),Tl=t=>Array.isArray(t);function bl(t,e,n){const i=t.getProps();return As(i,e,i.custom,t)}function Sl(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,pt(n))}function wl(t){return Tl(t)?t[t.length-1]||0:t}function Al(t,e){const n=bl(t,e);let{transitionEnd:i={},transition:s={},...r}=n||{};r={...r,...i};for(const o in r){const a=wl(r[o]);Sl(t,o,a)}}function Pl(t){return!!(R(t)&&t.add)}function El(t,e){const n=t.getValue("willChange");if(Pl(n))return n.add(e);if(!n&&q.WillChange){const i=new q.WillChange("auto");t.addValue("willChange",i),i.add(e)}}const Vl="framerAppearId",Cl="data-"+Qe(Vl);function Zs(t){return t.props[Cl]}const Ml=t=>t!==null;function Dl(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(Ml),r=e&&n!=="loop"&&e%2===1?0:s.length-1;return s[r]}const Rl={type:"spring",stiffness:500,damping:25,restSpeed:10},Ll=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Bl={type:"keyframes",duration:.8},kl={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Fl=(t,{keyframes:e})=>e.length>2?Bl:vt.has(t)?t.startsWith("scale")?Ll(e[1]):Rl:kl;function jl({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function on(t,e){return t?.[e]??t?.default??t}function Fe(t){t.duration=0,t.type="keyframes"}function he(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Il({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,e/=100,n/=100;let s=0,r=0,o=0;if(!e)s=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;s=he(l,a,t+1/3),r=he(l,a,t),o=he(l,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:i}}function ne(t,e){return n=>n>0?e:t}const fe=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Ol=[Pe,rt,ht],_l=t=>Ol.find(e=>e.test(t));function ei(t){const e=_l(t);if(Ot(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!e)return!1;let n=e.parse(t);return e===ht&&(n=Il(n)),n}const ni=(t,e)=>{const n=ei(t),i=ei(e);if(!n||!i)return ne(t,e);const s={...n};return r=>(s.red=fe(n.red,i.red,r),s.green=fe(n.green,i.green,r),s.blue=fe(n.blue,i.blue,r),s.alpha=V(n.alpha,i.alpha,r),rt.transform(s))},je=new Set(["none","hidden"]);function Ul(t,e){return je.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}const $l=(t,e)=>n=>e(t(n)),_t=(...t)=>t.reduce($l);function Nl(t,e){return n=>V(t,e,n)}function rn(t){return typeof t=="number"?Nl:typeof t=="string"?He(t)?ne:D.test(t)?ni:zl:Array.isArray(t)?Js:typeof t=="object"?D.test(t)?ni:Wl:ne}function Js(t,e){const n=[...t],i=n.length,s=t.map((r,o)=>rn(r)(r,e[o]));return r=>{for(let o=0;o<i;o++)n[o]=s[o](r);return n}}function Wl(t,e){const n={...t,...e},i={};for(const s in n)t[s]!==void 0&&e[s]!==void 0&&(i[s]=rn(t[s])(t[s],e[s]));return s=>{for(const r in i)n[r]=i[r](s);return n}}function Kl(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const r=e.types[s],o=t.indexes[r][i[r]],a=t.values[o]??0;n[s]=a,i[r]++}return n}const zl=(t,e)=>{const n=st.createTransformer(e),i=Bt(t),s=Bt(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?je.has(t)&&!s.values.length||je.has(e)&&!i.values.length?Ul(t,e):_t(Js(Kl(i,s),s.values),n):(Ot(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),ne(t,e))};function Qs(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?V(t,e,n):rn(t)(t,e)}const Gl=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>E.update(e,n),stop:()=>Z(e),now:()=>B.isProcessing?B.timestamp:F.now()}},to=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let r=0;r<s;r++)i+=Math.round(t(r/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Hl=5;function eo(t,e,n){const i=Math.max(e-Hl,0);return ws(n-t(i),e-i)}const C={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},de=.001;function Xl({duration:t=C.duration,bounce:e=C.bounce,velocity:n=C.velocity,mass:i=C.mass}){let s,r;Ot(t<=$(C.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-e;o=G(C.minDamping,C.maxDamping,o),t=G(C.minDuration,C.maxDuration,O(t)),o<1?(s=c=>{const u=c*o,h=u*t,f=u-n,d=Ie(c,o),p=Math.exp(-h);return de-f/d*p},r=c=>{const h=c*o*t,f=h*n+n,d=Math.pow(o,2)*Math.pow(c,2)*t,p=Math.exp(-h),m=Ie(Math.pow(c,2),o);return(-s(c)+de>0?-1:1)*((f-d)*p)/m}):(s=c=>{const u=Math.exp(-c*t),h=(c-n)*t+1;return-de+u*h},r=c=>{const u=Math.exp(-c*t),h=(n-c)*(t*t);return u*h});const a=5/t,l=ql(s,r,a);if(t=$(t),isNaN(l))return{stiffness:C.stiffness,damping:C.damping,duration:t};{const c=Math.pow(l,2)*i;return{stiffness:c,damping:o*2*Math.sqrt(i*c),duration:t}}}const Yl=12;function ql(t,e,n){let i=n;for(let s=1;s<Yl;s++)i=i-t(i)/e(i);return i}function Ie(t,e){return t*Math.sqrt(1-e*e)}const Zl=["duration","bounce"],Jl=["stiffness","damping","mass"];function ii(t,e){return e.some(n=>t[n]!==void 0)}function Ql(t){let e={velocity:C.velocity,stiffness:C.stiffness,damping:C.damping,mass:C.mass,isResolvedFromDuration:!1,...t};if(!ii(t,Jl)&&ii(t,Zl))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(n*1.2),s=i*i,r=2*G(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:C.mass,stiffness:s,damping:r}}else{const n=Xl(t);e={...e,...n,mass:C.mass},e.isResolvedFromDuration=!0}return e}function Ft(t=C.visualDuration,e=C.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:c,mass:u,duration:h,velocity:f,isResolvedFromDuration:d}=Ql({...n,velocity:-O(n.velocity||0)}),p=f||0,m=c/(2*Math.sqrt(l*u)),g=o-r,y=O(Math.sqrt(l/u)),T=Math.abs(g)<5;i||(i=T?C.restSpeed.granular:C.restSpeed.default),s||(s=T?C.restDelta.granular:C.restDelta.default);let x;if(m<1){const b=Ie(y,m);x=w=>{const M=Math.exp(-m*y*w);return o-M*((p+m*y*g)/b*Math.sin(b*w)+g*Math.cos(b*w))}}else if(m===1)x=b=>o-Math.exp(-y*b)*(g+(p+y*g)*b);else{const b=y*Math.sqrt(m*m-1);x=w=>{const M=Math.exp(-m*y*w),A=Math.min(b*w,300);return o-M*((p+m*y*g)*Math.sinh(A)+b*g*Math.cosh(A))/b}}const S={calculatedDuration:d&&h||null,next:b=>{const w=x(b);if(d)a.done=b>=h;else{let M=b===0?p:0;m<1&&(M=b===0?$(p):eo(x,b,w));const A=Math.abs(M)<=i,P=Math.abs(o-w)<=s;a.done=A&&P}return a.value=a.done?o:w,a},toString:()=>{const b=Math.min(nn(S),ee),w=to(M=>S.next(b*M).value,b,30);return b+"ms "+w},toTransition:()=>{}};return S}Ft.applyToOptions=t=>{const e=qs(t,100,Ft);return t.ease=e.ease,t.duration=$(e.duration),t.type="keyframes",t};function Oe({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],f={done:!1,value:h},d=A=>a!==void 0&&A<a||l!==void 0&&A>l,p=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let m=n*e;const g=h+m,y=o===void 0?g:o(g);y!==g&&(m=y-h);const T=A=>-m*Math.exp(-A/i),x=A=>y+T(A),S=A=>{const P=T(A),I=x(A);f.done=Math.abs(P)<=c,f.value=f.done?y:I};let b,w;const M=A=>{d(f.value)&&(b=A,w=Ft({keyframes:[f.value,p(f.value)],velocity:eo(x,A,f.value),damping:s,stiffness:r,restDelta:c,restSpeed:u}))};return M(0),{calculatedDuration:null,next:A=>{let P=!1;return!w&&b===void 0&&(P=!0,S(A),M(A)),b!==void 0&&A>=b?w.next(A-b):(!P&&S(A),f)}}}function tu(t,e,n){const i=[],s=n||q.mix||Qs,r=t.length-1;for(let o=0;o<r;o++){let a=s(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||j:e;a=_t(l,a)}i.push(a)}return i}function eu(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const r=t.length;if(J(r===e.length,"Both input and output ranges must be the same length","range-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=tu(e,i,s),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 f=mt(t[h],t[h+1],u);return a[h](f)};return n?u=>c(G(t[0],t[r-1],u)):c}function nu(t,e){return t.map(n=>n*e)}const no=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,iu=1e-7,su=12;function ou(t,e,n,i,s){let r,o,a=0;do o=e+(n-e)/2,r=no(o,i,s)-t,r>0?n=o:e=o;while(Math.abs(r)>iu&&++a<su);return o}function Ut(t,e,n,i){if(t===e&&n===i)return j;const s=r=>ou(r,0,1,t,n);return r=>r===0||r===1?r:no(s(r),e,i)}const ru=Ut(.42,0,1,1),au=Ut(0,0,.58,1),io=Ut(.42,0,.58,1),so=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,oo=t=>e=>1-t(1-e),ro=Ut(.33,1.53,.69,.99),an=oo(ro),ao=so(an),lo=t=>(t*=2)<1?.5*an(t):.5*(2-Math.pow(2,-10*(t-1))),ln=t=>1-Math.sin(Math.acos(t)),uo=oo(ln),co=so(ln),ho=t=>Array.isArray(t)&&typeof t[0]=="number",si={linear:j,easeIn:ru,easeInOut:io,easeOut:au,circIn:ln,circInOut:co,circOut:uo,backIn:an,backInOut:ao,backOut:ro,anticipate:lo},lu=t=>typeof t=="string",oi=t=>{if(ho(t)){J(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,n,i,s]=t;return Ut(e,n,i,s)}else if(lu(t))return J(si[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),si[t];return t};function uu(t,e){return t.map(()=>e||io).splice(0,t.length-1)}function Mt({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=Gs(i)?i.map(oi):oi(i),r={done:!1,value:e[0]},o=nu(n&&n.length===e.length?n:Ys(e),t),a=eu(o,e,{ease:Array.isArray(s)?s:uu(e,s)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const cu=t=>t!==null;function un(t,{repeat:e,repeatType:n="loop"},i,s=1){const r=t.filter(cu),a=s<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||i===void 0?r[a]:i}const hu={decay:Oe,inertia:Oe,tween:Mt,keyframes:Mt,spring:Ft};function fo(t){typeof t.type=="string"&&(t.type=hu[t.type])}class cn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const fu=t=>t/100;class hn extends cn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var n,i;const{motionValue:s}=this.options;s&&s.updatedAt!==F.now()&&this.tick(F.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(n=this.options).onStop)==null||i.call(n))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;fo(e);const{type:n=Mt,repeat:i=0,repeatDelay:s=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const l=n||Mt;l!==Mt&&typeof a[0]!="number"&&(this.mixKeyframes=_t(fu,Qs(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=nn(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=c}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:i,totalDuration:s,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return i.next(0);const{delay:c=0,keyframes:u,repeat:h,repeatType:f,repeatDelay:d,type:p,onUpdate:m,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-s/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?y<0:y>s;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let x=this.currentTime,S=i;if(h){const A=Math.min(this.currentTime,s)/a;let P=Math.floor(A),I=A%1;!I&&A>=1&&(I=1),I===1&&P--,P=Math.min(P,h+1),P%2&&(f==="reverse"?(I=1-I,d&&(I-=d/a)):f==="mirror"&&(S=o)),x=G(0,1,I)*a}const b=T?{done:!1,value:u[0]}:S.next(x);r&&(b.value=r(b.value));let{done:w}=b;!T&&l!==null&&(w=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&w);return M&&p!==Oe&&(b.value=un(u,this.options,g,this.speed)),m&&m(b.value),M&&this.finish(),b}then(e,n){return this.finished.then(e,n)}get duration(){return O(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+O(e)}get time(){return O(this.currentTime)}set time(e){var n;e=$(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),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(F.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=O(this.currentTime))}play(){var e,n;if(this.isStopped)return;const{driver:i=Gl,startTime:s}=this.options;this.driver||(this.driver=i(o=>this.tick(o))),(n=(e=this.options).onPlay)==null||n.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=s??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(F.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.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 n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}const du=t=>t.startsWith("--");function pu(t,e,n){du(e)?t.style.setProperty(e,n):t.style[e]=n}function fn(t){let e;return()=>(e===void 0&&(e=t()),e)}const mu=fn(()=>window.ScrollTimeline!==void 0),gu={};function yu(t,e){const n=fn(t);return()=>gu[e]??n()}const po=yu(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),At=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,ri={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:At([0,.65,.55,1]),circOut:At([.55,0,1,.45]),backIn:At([.31,.01,.66,-.59]),backOut:At([.33,1.53,.69,.99])};function mo(t,e){if(t)return typeof t=="function"?po()?to(t,e):"ease-out":ho(t)?At(t):Array.isArray(t)?t.map(n=>mo(n,e)||ri.easeOut):ri[t]}function vu(t,e,n,{delay:i=0,duration:s=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=mo(a,s);Array.isArray(h)&&(u.easing=h);const f={delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),t.animate(u,f)}function xu({type:t,...e}){return sn(t)&&po()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Tu extends cn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:i,keyframes:s,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,J(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=xu(e);this.animation=vu(n,i,s,c,r),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const u=un(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):pu(n,i,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.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,n;this.isPseudoElement||(n=(e=this.animation).commitStyles)==null||n.call(e)}get duration(){var e,n;const i=((n=(e=this.animation.effect)==null?void 0:e.getComputedTiming)==null?void 0:n.call(e).duration)||0;return O(Number(i))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+O(e)}get time(){return O(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=$(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 this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){var i;return this.allowFlatten&&((i=this.animation.effect)==null||i.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&mu()?(this.animation.timeline=e,j):n(this)}}const go={anticipate:lo,backInOut:ao,circInOut:co};function bu(t){return t in go}function Su(t){typeof t.ease=="string"&&bu(t.ease)&&(t.ease=go[t.ease])}const pe=10;class wu extends Tu{constructor(e){Su(e),fo(e),super(e),e.startTime!==void 0&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:i,onComplete:s,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new hn({...o,autoplay:!1}),l=Math.max(pe,F.now()-this.startTime),c=G(0,pe,l-pe);n.setWithVelocity(a.sample(Math.max(0,l-c)).value,a.sample(l).value,c),a.stop()}}const ai=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(st.test(t)||t==="0")&&!t.startsWith("url("));function Au(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Pu(t,e,n,i){const s=t[0];if(s===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=ai(s,e),a=ai(r,e);return Ot(o===a,`You are trying to animate ${e} from "${s}" to "${r}". "${o?r:s}" is not an animatable value.`,"value-not-animatable"),!o||!a?!1:Au(t)||(n==="spring"||sn(n))&&i}const Eu=new Set(["opacity","clipPath","filter","transform"]),Vu=fn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Cu(t){var e;const{motionValue:n,name:i,repeatDelay:s,repeatType:r,damping:o,type:a}=t;if(!(((e=n?.owner)==null?void 0:e.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=n.owner.getProps();return Vu()&&i&&Eu.has(i)&&(i!=="transform"||!u)&&!c&&!s&&r!=="mirror"&&o!==0&&a!=="inertia"}const Mu=40;class Du extends cn{constructor({autoplay:e=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:c,element:u,...h}){var f;super(),this.stop=()=>{var m,g;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(g=this.keyframeResolver)==null||g.cancel()},this.createdAt=F.now();const d={autoplay:e,delay:n,type:i,repeat:s,repeatDelay:r,repeatType:o,name:l,motionValue:c,element:u,...h},p=u?.KeyframeResolver||Ze;this.keyframeResolver=new p(a,(m,g,y)=>this.onKeyframesResolved(m,g,d,!y),l,c,u),(f=this.keyframeResolver)==null||f.scheduleResolve()}onKeyframesResolved(e,n,i,s){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:c,onUpdate:u}=i;this.resolvedAt=F.now(),Pu(e,r,o,a)||((q.instantAnimations||!l)&&u?.(un(e,i,n)),e[0]=e[e.length-1],Fe(i),i.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Mu?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},d=!c&&Cu(f)?new wu({...f,element:f.motionValue.owner.current}):new hn(f);d.finished.then(()=>this.notifyFinished()).catch(j),this.pendingTimeline&&(this.stopTimeline=d.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=d}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),Ma()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}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 dn=(t,e,n,i={},s,r)=>o=>{const a=on(i,t)||{},l=a.delay||i.delay||0;let{elapsed:c=0}=i;c=c-$(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:s};jl(a)||Object.assign(u,Fl(t,u)),u.duration&&(u.duration=$(u.duration)),u.repeatDelay&&(u.repeatDelay=$(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 f=Dl(u.keyframes,a);if(f!==void 0){E.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new hn(u):new Du(u)};function Ru({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,i}function Lu(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:o,...a}=e;i&&(r=i);const l=[],c=s&&t.animationState&&t.animationState.getState()[s];for(const u in a){const h=t.getValue(u,t.latestValues[u]??null),f=a[u];if(f===void 0||c&&Ru(c,u))continue;const d={delay:n,...on(r||{},u)},p=h.get();if(p!==void 0&&!h.isAnimating&&!Array.isArray(f)&&f===p&&!d.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){const y=Zs(t);if(y){const T=window.MotionHandoffAnimation(y,u,E);T!==null&&(d.startTime=T,m=!0)}}El(t,u),h.start(dn(u,h,f,t.shouldReduceMotion&&Fs.has(u)?{type:!1}:d,t,m));const g=h.animation;g&&l.push(g)}return o&&Promise.all(l).then(()=>{E.update(()=>{o&&Al(t,o)})}),l}function Bu(t,e){return t in e}class ku extends ks{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,n){if(Bu(n,e)){const i=e[n];if(typeof i=="string"||typeof i=="number")return i}}getBaseTargetFromProps(){}removeValueFromRenderState(e,n){delete n.output[e]}measureInstanceViewportBox(){return L()}build(e,n){Object.assign(e.output,n)}renderInstance(e,{output:n}){Object.assign(e,n)}sortInstanceNodePosition(){return 0}}function yo(t){return typeof t=="object"&&t!==null}function pn(t){return yo(t)&&"ownerSVGElement"in t}function vo(t){return pn(t)&&t.tagName==="svg"}function Fu(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=pn(t)&&!vo(t)?new Ks(e):new Ns(e);n.mount(t),ut.set(t,n)}function ju(t){const e={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new ku(e);n.mount(t),ut.set(t,n)}function xo(t,e,n){const i=R(t)?t:pt(t);return i.start(dn("",i,e,n)),i.animation}function Iu(t,e){return R(t)||typeof t=="number"||typeof t=="string"&&!tn(e)}function To(t,e,n,i){const s=[];if(Iu(t,e))s.push(xo(t,tn(e)&&e.default||e,n&&(n.default||n)));else{const r=zs(t,e,i),o=r.length;J(!!o,"No valid elements provided.","no-valid-elements");for(let a=0;a<o;a++){const l=r[a];J(l!==null,"You're trying to perform an animation on null. Ensure that selectors are correctly finding elements and refs are correctly hydrated.","animate-null");const c=l instanceof Element?Fu:ju;ut.has(l)||c(l);const u=ut.get(l),h={...n};"delay"in h&&typeof h.delay=="function"&&(h.delay=h.delay(a,o)),s.push(...Lu(u,{...e,transition:h},{}))}}return s}function Ou(t,e,n){const i=[];return ml(t,e,n,{spring:Ft}).forEach(({keyframes:r,transition:o},a)=>{i.push(...To(a,r,o))}),i}class _u{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,n){for(let i=0;i<this.animations.length;i++)this.animations[i][e]=n}attachTimeline(e){const n=this.animations.map(i=>i.attachTimeline(e));return()=>{n.forEach((i,s)=>{i&&i(),this.animations[s].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(){return li(this.animations,"duration")}get iterationDuration(){return li(this.animations,"iterationDuration")}runAll(e){this.animations.forEach(n=>n[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function li(t,e){let n=0;for(let i=0;i<t.length;i++){const s=t[i][e];s!==null&&s>n&&(n=s)}return n}class Uu extends _u{then(e,n){return this.finished.finally(e).then(()=>{})}}function $u(t){return Array.isArray(t)&&t.some(Array.isArray)}function Nu(t){function e(n,i,s){let r=[],o;if($u(n))r=Ou(n,i,t);else{const{onComplete:l,...c}=s||{};typeof l=="function"&&(o=l),r=To(n,i,c,t)}const a=new Uu(r);return o&&a.finished.then(o),a}return e}const Wu=Nu(),Ku=["initial","animate","whileInView","whileHover","whilePress","whileDrag","whileFocus","exit"];class zu extends Q{constructor(e){var n,i;super(e),this.animateUpdates=({controlActiveState:s,directAnimate:r,directTransition:o,controlDelay:a=0,isExit:l}={})=>{const{reducedMotion:c}=this.state.options.motionConfig;this.state.visualElement.shouldReduceMotion=c==="always"||c==="user"&&!!te.current;const u=this.state.target;this.state.target={...this.state.baseTarget};let h={};h=this.resolveStateAnimation({controlActiveState:s,directAnimate:r,directTransition:o}),this.state.finalTransition=h;const f=this.createAnimationFactories(u,h,a),{getChildAnimations:d}=this.setupChildAnimations(h,this.state.activeStates);return this.executeAnimations({factories:f,getChildAnimations:d,transition:h,controlActiveState:s,isExit:l})},this.state.visualElement=ol(this.state.options.as,{presenceContext:null,parent:(n=this.state.parent)==null?void 0:n.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}),(i=this.state.visualElement.parent)==null||i.addChild(this.state.visualElement),this.state.animateUpdates=this.animateUpdates,this.state.isMounted()&&this.state.startAnimation()}updateAnimationControlsSubscription(){const{animate:e}=this.state.options;Ln(e)&&(this.unmountControls=e.subscribe(this.state))}executeAnimations({factories:e,getChildAnimations:n,transition:i,controlActiveState:s,isExit:r=!1}){const o=()=>Promise.all(e.map(h=>h()).filter(Boolean)),a={...this.state.target},l=this.state.element,c=h=>{var f,d;r&&(this.state.isExiting=!0),l.dispatchEvent(kn("motionstart",a)),(d=(f=this.state.options).onAnimationStart)==null||d.call(f,a),h.then(()=>{var p,m,g,y;if(r){this.state.isExiting=!1;const T=this.state.options.animatePresenceContext;if(T?.onMotionExitComplete&&this.state.presenceContainer){const x=this.state,S=x.visualElement.projection;(p=x.options)!=null&&p.layoutId&&((m=S.currentAnimation)==null?void 0:m.state)==="running"&&!x.options.exit||T.onMotionExitComplete(x.presenceContainer,x)}}l.dispatchEvent(kn("motioncomplete",a,r)),(y=(g=this.state.options).onAnimationComplete)==null||y.call(g,a)}).catch(j)},u=()=>{const h=i?.when?(i.when==="beforeChildren"?o():n()).then(()=>i.when==="beforeChildren"?n():o()):Promise.all([o(),n()]);return c(h),h};return s?u:u()}setupChildAnimations(e,n){var i;const s=this.state.visualElement;if(!((i=s.variantChildren)!=null&&i.size)||!n)return{getChildAnimations:()=>Promise.resolve()};const{staggerChildren:r=0,staggerDirection:o=1,delayChildren:a=0}=e||{},l=s.variantChildren.size,c=(l-1)*r,u=typeof a=="function",h=u?d=>a(d,l):o===1?(d=0)=>d*r:(d=0)=>c-d*r,f=Array.from(s.variantChildren).map((d,p)=>d.state.animateUpdates({controlActiveState:n,controlDelay:(u?0:a)+h(p)}));return{getChildAnimations:()=>Promise.all(f.map(d=>d()))}}createAnimationFactories(e,n,i){const s=[];return Object.keys(this.state.target).forEach(r=>{var o;if(!Or(e[r],this.state.target[r]))return;(o=this.state.baseTarget)[r]??(o[r]=na.get(this.state.element,r));const a=this.state.target[r]==="none"&&qt(In[r])?In[r]:this.state.target[r];s.push(()=>{var l;return Wu(this.state.element,{[r]:a},{...n?.[r]||n,delay:(((l=n?.[r])==null?void 0:l.delay)||n?.delay||0)+i})})}),s}resolveStateAnimation({controlActiveState:e,directAnimate:n,directTransition:i}){let s=this.state.options.transition,r={};const{variants:o,custom:a,transition:l,animatePresenceContext:c}=this.state.options,u=a??c?.custom;return this.state.activeStates={...this.state.activeStates,...e},Ku.forEach(h=>{if(!this.state.activeStates[h]||Ln(this.state.options[h]))return;const f=this.state.options[h];let d=qt(f)?Ct(f,o,u):void 0;if(this.state.visualElement.isVariantNode){const p=Ct(this.state.context[h],o,u);d=Object.assign(p?p||{}:r,d)}d&&(h!=="initial"&&(s=d.transition||this.state.options.transition||{}),r=Object.assign(r,d))}),n&&(r=Ct(n,o,u),s=r.transition||i||l),Object.entries(r).forEach(([h,f])=>{h!=="transition"&&(this.state.target[h]=f)}),s}mount(){var e,n;const{element:i}=this.state;Jt.set(i,this.state),ut.get(i)||(this.state.visualElement.mount(i),ut.set(i,this.state.visualElement)),this.state.visualElement.state=this.state,this.updateAnimationControlsSubscription();const s=this.state.visualElement,r=s.parent;if(s.enteringChildren=void 0,(e=this.state.parent)!=null&&e.isMounted()&&!s.isControllingVariants&&((n=r?.enteringChildren)!=null&&n.has(s))){const{delayChildren:o}=this.state.parent.finalTransition||{};this.animateUpdates({controlActiveState:this.state.parent.activeStates,controlDelay:rl(r.enteringChildren,s,o)})()}}update(){const{animate:e}=this.state.options,{animate:n}=this.state.visualElement.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;(e=this.unmountControls)==null||e.call(this)}}function Gu(t){return yo(t)&&"offsetHeight"in t}const Hu={y:!1};function Xu(){return Hu.y}const bo=(t,e)=>e?t===e?!0:bo(t,e.parentElement):!1,Yu=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function So(t,e){const n=en(t),i=new AbortController,s={passive:!0,...e,signal:i.signal};return[n,s,()=>i.abort()]}const qu=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Zu(t){return qu.has(t.tagName)||t.isContentEditable===!0}const Xt=new WeakSet;function ui(t){return e=>{e.key==="Enter"&&t(e)}}function me(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Ju=(t,e)=>{const n=t.currentTarget;if(!n)return;const i=ui(()=>{if(Xt.has(n))return;me(n,"down");const s=ui(()=>{me(n,"up")}),r=()=>me(n,"cancel");n.addEventListener("keyup",s,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)};function ci(t){return Yu(t)&&!0}function Qu(t,e,n={}){const[i,s,r]=So(t,n),o=a=>{const l=a.currentTarget;if(!ci(a))return;Xt.add(l);const c=e(l,a),u=(d,p)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),Xt.has(l)&&Xt.delete(l),ci(d)&&typeof c=="function"&&c(d,{success:p})},h=d=>{u(d,l===window||l===document||n.useGlobalTarget||bo(l,d.target))},f=d=>{u(d,!1)};window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",f,s)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),Gu(a)&&(a.addEventListener("focus",c=>Ju(c,s)),!Zu(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function wo(t){return{point:{x:t.pageX,y:t.pageY}}}function hi(t,e,n){const i=t.options;i.whilePress&&t.setActive("whilePress",n==="Start");const s=`onPress${n==="End"?"":n}`,r=i[s];r&&E.postRender(()=>r(e,wo(e)))}class tc extends Q{isActive(){const{whilePress:e,onPress:n,onPressCancel:i,onPressStart:s}=this.state.options;return!!(e||n||i||s)}constructor(e){super(e)}mount(){this.register()}update(){const{whilePress:e,onPress:n,onPressCancel:i,onPressStart:s}=this.state.options;e||n||i||s||this.register()}register(){const e=this.state.element;!e||!this.isActive()||(this.unmount(),this.unmount=Qu(e,(n,i)=>(hi(this.state,i,"Start"),(s,{success:r})=>hi(this.state,s,r?"End":"Cancel")),{useGlobalTarget:this.state.options.globalPressTarget}))}}function fi(t){return!(t.pointerType==="touch"||Xu())}function ec(t,e,n={}){const[i,s,r]=So(t,n),o=a=>{if(!fi(a))return;const{target:l}=a,c=e(l,a);if(typeof c!="function"||!l)return;const u=h=>{fi(h)&&(c(h),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,s)};return i.forEach(a=>{a.addEventListener("pointerenter",o,s)}),r}function di(t,e,n){const i=t.options;i.whileHover&&t.setActive("whileHover",n==="Start");const s=`onHover${n}`,r=i[s];r&&E.postRender(()=>r(e,wo(e)))}class nc extends Q{isActive(){const{whileHover:e,onHoverStart:n,onHoverEnd:i}=this.state.options;return!!(e||n||i)}constructor(e){super(e)}mount(){this.register()}update(){const{whileHover:e,onHoverStart:n,onHoverEnd:i}=this.state.visualElement.prevProps;e||n||i||this.register()}register(){const e=this.state.element;!e||!this.isActive()||(this.unmount(),this.unmount=ec(e,(n,i)=>(di(this.state,i,"Start"),s=>{di(this.state,s,"End")})))}}const ic={some:0,all:1};function sc(t,e,{root:n,margin:i,amount:s="some"}={}){const r=en(t),o=new WeakMap,a=c=>{c.forEach(u=>{const h=o.get(u.target);if(u.isIntersecting!==!!h)if(u.isIntersecting){const f=e(u.target,u);typeof f=="function"?o.set(u.target,f):l.unobserve(u.target)}else typeof h=="function"&&(h(u),o.delete(u.target))})},l=new IntersectionObserver(a,{root:n,rootMargin:i,threshold:typeof s=="number"?s:ic[s]});return r.forEach(c=>l.observe(c)),()=>l.disconnect()}function pi(t,e,n){const i=t.options;i.whileInView&&t.setActive("whileInView",n==="Enter");const s=`onViewport${n}`,r=i[s];r&&E.postRender(()=>r(e))}class oc extends Q{isActive(){const{whileInView:e,onViewportEnter:n,onViewportLeave:i}=this.state.options;return!!(e||n||i)}constructor(e){super(e)}startObserver(){const e=this.state.element;if(!e||!this.isActive())return;this.unmount();const{once:n,...i}=this.state.options.inViewOptions||{};this.unmount=sc(e,(s,r)=>{if(pi(this.state,r,"Enter"),!n)return o=>{pi(this.state,r,"Leave")}},i)}mount(){this.startObserver()}update(){const{props:e,prevProps:n}=this.state.visualElement;["amount","margin","root"].some(rc(e,n))&&this.startObserver()}}function rc({inViewOptions:t={}},{inViewOptions:e={}}={}){return n=>t[n]!==e[n]}function ie(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}class ac extends Q{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(ie(this.state.element,"focus",()=>this.onFocus()),ie(this.state.element,"blur",()=>this.onBlur()))}}const lc=(t,e)=>t.depth-e.depth;class uc{constructor(){this.children=[],this.isDirty=!1}add(e){Ye(this.children,e),this.isDirty=!0}remove(e){ae(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(lc),this.isDirty=!1,this.children.forEach(e)}}function ge(t){return R(t)?t.get():t}const Ao=["TopLeft","TopRight","BottomLeft","BottomRight"],cc=Ao.length,mi=t=>typeof t=="string"?parseFloat(t):t,gi=t=>typeof t=="number"||v.test(t);function hc(t,e,n,i,s,r){s?(t.opacity=V(0,n.opacity??1,fc(i)),t.opacityExit=V(e.opacity??1,0,dc(i))):r&&(t.opacity=V(e.opacity??1,n.opacity??1,i));for(let o=0;o<cc;o++){const a=`border${Ao[o]}Radius`;let l=yi(e,a),c=yi(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||gi(l)===gi(c)?(t[a]=Math.max(V(mi(l),mi(c),i),0),(z.test(c)||z.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=V(e.rotate||0,n.rotate||0,i))}function yi(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const fc=Po(0,.5,uo),dc=Po(.5,.95,j);function Po(t,e,n){return i=>i<t?0:i>e?1:n(mt(t,e,i))}function vi(t,e){t.min=e.min,t.max=e.max}function U(t,e){vi(t.x,e.x),vi(t.y,e.y)}function xi(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function ye(t){return t===void 0||t===1}function _e({scale:t,scaleX:e,scaleY:n}){return!ye(t)||!ye(e)||!ye(n)}function ot(t){return _e(t)||Eo(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Eo(t){return Ti(t.x)||Ti(t.y)}function Ti(t){return t&&t!=="0%"}function se(t,e,n){const i=t-n,s=e*i;return n+s}function bi(t,e,n,i,s){return s!==void 0&&(t=se(t,s,i)),se(t,n,i)+e}function Ue(t,e=0,n=1,i,s){t.min=bi(t.min,e,n,i,s),t.max=bi(t.max,e,n,i,s)}function Vo(t,{x:e,y:n}){Ue(t.x,e.translate,e.scale,e.originPoint),Ue(t.y,n.translate,n.scale,n.originPoint)}const Si=.999999999999,wi=1.0000000000001;function pc(t,e,n,i=!1){const s=n.length;if(!s)return;e.x=e.y=1;let r,o;for(let a=0;a<s;a++){r=n[a],o=r.projectionDelta;const{visualElement:l}=r.options;l&&l.props.style&&l.props.style.display==="contents"||(i&&r.options.layoutScroll&&r.scroll&&r!==r.root&&dt(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,Vo(t,o)),i&&ot(r.latestValues)&&dt(t,r.latestValues))}e.x<wi&&e.x>Si&&(e.x=1),e.y<wi&&e.y>Si&&(e.y=1)}function zt(t,e){t.min=t.min+e,t.max=t.max+e}function Ai(t,e,n,i,s=.5){const r=V(t.min,t.max,s);Ue(t,e,n,r,i)}function dt(t,e){Ai(t.x,e.x,e.scaleX,e.scale,e.originX),Ai(t.y,e.y,e.scaleY,e.scale,e.originY)}const Co=1e-4,mc=1-Co,gc=1+Co,Mo=.01,yc=0-Mo,vc=0+Mo;function _(t){return t.max-t.min}function xc(t,e,n){return Math.abs(t-e)<=n}function Pi(t,e,n,i=.5){t.origin=i,t.originPoint=V(e.min,e.max,t.origin),t.scale=_(n)/_(e),t.translate=V(n.min,n.max,t.origin)-t.originPoint,(t.scale>=mc&&t.scale<=gc||isNaN(t.scale))&&(t.scale=1),(t.translate>=yc&&t.translate<=vc||isNaN(t.translate))&&(t.translate=0)}function Dt(t,e,n,i){Pi(t.x,e.x,n.x,i?i.originX:void 0),Pi(t.y,e.y,n.y,i?i.originY:void 0)}function Ei(t,e,n){t.min=n.min+e.min,t.max=t.min+_(e)}function Tc(t,e,n){Ei(t.x,e.x,n.x),Ei(t.y,e.y,n.y)}function Vi(t,e,n){t.min=e.min-n.min,t.max=t.min+_(e)}function oe(t,e,n){Vi(t.x,e.x,n.x),Vi(t.y,e.y,n.y)}function Ci(t,e,n,i,s){return t-=e,t=se(t,1/n,i),s!==void 0&&(t=se(t,1/s,i)),t}function bc(t,e=0,n=1,i=.5,s,r=t,o=t){if(z.test(e)&&(e=parseFloat(e),e=V(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=V(r.min,r.max,i);t===r&&(a-=e),t.min=Ci(t.min,e,n,a,s),t.max=Ci(t.max,e,n,a,s)}function Mi(t,e,[n,i,s],r,o){bc(t,e[n],e[i],e[s],e.scale,r,o)}const Sc=["x","scaleX","originX"],wc=["y","scaleY","originY"];function Di(t,e,n,i){Mi(t.x,e,Sc,n?n.x:void 0,i?i.x:void 0),Mi(t.y,e,wc,n?n.y:void 0,i?i.y:void 0)}function Ri(t){return t.translate===0&&t.scale===1}function Do(t){return Ri(t.x)&&Ri(t.y)}function Li(t,e){return t.min===e.min&&t.max===e.max}function Ac(t,e){return Li(t.x,e.x)&&Li(t.y,e.y)}function Bi(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Ro(t,e){return Bi(t.x,e.x)&&Bi(t.y,e.y)}function ki(t){return _(t.x)/_(t.y)}function Fi(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Pc{constructor(){this.members=[]}add(e){Ye(this.members,e),e.scheduleRender()}remove(e){if(ae(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(s=>e===s);if(n===0)return!1;let i;for(let s=n;s>=0;s--){const r=this.members[s];if(r.isPresent!==!1){i=r;break}}return i?(this.promote(i),!0):!1}promote(e,n){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,n&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:s}=e.options;s===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:i}=e;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Ec(t,e,n){let i="";const s=t.x.translate/e.x,r=t.y.translate/e.y,o=n?.z||0;if((s||r||o)&&(i=`translate3d(${s}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:h,rotateY:f,skewX:d,skewY:p}=n;c&&(i=`perspective(${c}px) ${i}`),u&&(i+=`rotate(${u}deg) `),h&&(i+=`rotateX(${h}deg) `),f&&(i+=`rotateY(${f}deg) `),d&&(i+=`skewX(${d}deg) `),p&&(i+=`skewY(${p}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(i+=`scale(${a}, ${l})`),i||"none"}function ji(t){return[t("x"),t("y")]}const Yt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ve=["","X","Y","Z"],Vc=1e3;let Cc=0;function xe(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Lo(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Zs(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",E,!(s||r))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Lo(i)}function Bo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(o={},a=e?.()){this.id=Cc++,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.layoutVersion=0,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(Rc),this.nodes.forEach(Fc),this.nodes.forEach(jc),this.nodes.forEach(Lc)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=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 uc)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new qe),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=pn(o)&&!vo(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 f=()=>this.root.updateBlockedByResize=!1;E.read(()=>{h=window.innerWidth}),t(o,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,u&&u(),u=xr(f,250),Yt.hasAnimatedSinceResize&&(Yt.hasAnimatedSinceResize=!1,this.nodes.forEach(_i)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||c.getDefaultTransition()||$c,{onLayoutAnimationStart:m,onLayoutAnimationComplete:g}=c.getProps(),y=!this.targetLayout||!Ro(this.targetLayout,d),T=!h&&f;if(this.options.layoutRoot||this.resumeFrom||T||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...on(p,"layout"),onPlay:m,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,T)}else h||_i(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}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(),Z(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(Ic),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&&Lo(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(Ii);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Oi);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(kc),this.nodes.forEach(Mc),this.nodes.forEach(Dc)):this.nodes.forEach(Oi),this.clearAllSnapshots();const a=F.now();B.delta=G(0,1e3/60,a-B.timestamp),B.timestamp=a,B.isProcessing=!0,ue.update.process(B),ue.preRender.process(B),ue.render.process(B),B.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Bs.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Bc),this.sharedNodes.forEach(Oc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,E.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){E.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!_(this.snapshot.measuredBox.x)&&!_(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.layoutVersion++,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=i(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Do(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;o&&this.instance&&(a||ot(this.latestValues)||u)&&(s(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)),Nc(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(Wc))){const{scroll:u}=this.root;u&&(zt(l.x,u.offset.x),zt(l.y,u.offset.y))}return l}removeElementScroll(o){var a;const l=L();if(U(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:f}=u;u!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&U(l,o),zt(l.x,h.offset.x),zt(l.y,h.offset.y))}return l}applyTransform(o,a=!1){const l=L();U(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&&dt(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),ot(u.latestValues)&&dt(l,u.latestValues)}return ot(this.latestValues)&&dt(l,this.latestValues),l}removeTransform(o){const a=L();U(a,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!ot(c.latestValues))continue;_e(c.latestValues)&&c.updateSnapshot();const u=L(),h=c.measurePageBox();U(u,h),Di(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return ot(this.latestValues)&&Di(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:f}=this.options;if(!this.layout||!(h||f))return;this.resolvedRelativeTargetAt=B.timestamp;const d=this.getClosestProjectingParent();d&&this.linkedParentVersion!==d.layoutVersion&&!d.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(d&&d.layout?this.createRelativeTarget(d,this.layout.layoutBox,d.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=L(),this.targetWithTransforms=L()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Tc(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):U(this.target,this.layout.layoutBox),Vo(this.target,this.targetDelta)):U(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?this.createRelativeTarget(d,this.target,d.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||_e(this.parent.latestValues)||Eo(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=L(),this.relativeTargetOrigin=L(),oe(this.relativeTargetOrigin,a,l),U(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}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;U(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;pc(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():(xi(this.prevProjectionDelta.x,this.projectionDelta.x),xi(this.prevProjectionDelta.y,this.projectionDelta.y)),Dt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!Fi(this.projectionDelta.x,this.prevProjectionDelta.x)||!Fi(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 f=L(),d=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=d!==p,g=this.getStack(),y=!g||g.members.length<=1,T=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(Uc));this.animationProgress=0;let x;this.mixTargetDelta=S=>{const b=S/1e3;Ui(h.x,o.x,b),Ui(h.y,o.y,b),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(oe(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),_c(this.relativeTarget,this.relativeTargetOrigin,f,b),x&&Ac(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=L()),U(x,this.relativeTarget)),m&&(this.animationValues=u,hc(u,c,this.latestValues,b,T,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},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&&(Z(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=E.update(()=>{Yt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=pt(0)),this.currentAnimation=xo(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(Vc),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&&ko(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||L();const h=_(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=_(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}U(a,l),dt(a,u),Dt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Pc),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&&xe("z",o,c,this.animationValues);for(let u=0;u<ve.length;u++)xe(`rotate${ve[u]}`,o,c,this.animationValues),xe(`skew${ve[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=ge(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=ge(a?.pointerEvents)||""),this.hasProjected&&!ot(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let h=Ec(this.projectionDeltaWithTransform,this.treeScale,u);l&&(h=l(u,h)),o.transform=h;const{x:f,y:d}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${d.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 kt){if(u[p]===void 0)continue;const{correct:m,applyTo:g,isCSSVariable:y}=kt[p],T=h==="none"?u[p]:m(u[p],c);if(g){const x=g.length;for(let S=0;S<x;S++)o[g[S]]=T}else y?this.options.visualElement.renderState.vars[p]=T:o[p]=T}this.options.layoutId&&(o.pointerEvents=c===this?ge(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(Ii),this.root.sharedNodes.clear()}}}function Mc(t){t.updateLayout()}function Dc(t){var e;const n=((e=t.resumeFrom)==null?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:s}=t.layout,{animationType:r}=t.options,o=n.source!==t.layout.source;r==="size"?ji(h=>{const f=o?n.measuredBox[h]:n.layoutBox[h],d=_(f);f.min=i[h].min,f.max=f.min+d}):ko(r,n.layoutBox,i)&&ji(h=>{const f=o?n.measuredBox[h]:n.layoutBox[h],d=_(i[h]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+d)});const a=ft();Dt(a,i,n.layoutBox);const l=ft();o?Dt(l,t.applyTransform(s,!0),n.measuredBox):Dt(l,i,n.layoutBox);const c=!Do(a);let u=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const p=L();oe(p,n.layoutBox,f.layoutBox);const m=L();oe(m,i,d.layoutBox),Ro(p,m)||(u=!0),h.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:i}=t.options;i&&i()}t.options.transition=void 0}function Rc(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 Lc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Bc(t){t.clearSnapshot()}function Ii(t){t.clearMeasurements()}function Oi(t){t.isLayoutDirty=!1}function kc(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function _i(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Fc(t){t.resolveTargetDelta()}function jc(t){t.calcProjection()}function Ic(t){t.resetSkewAndRotation()}function Oc(t){t.removeLeadSnapshot()}function Ui(t,e,n){t.translate=V(e.translate,0,n),t.scale=V(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function $i(t,e,n,i){t.min=V(e.min,n.min,i),t.max=V(e.max,n.max,i)}function _c(t,e,n,i){$i(t.x,e.x,n.x,i),$i(t.y,e.y,n.y,i)}function Uc(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const $c={duration:.45,ease:[.4,0,.1,1]},Ni=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Wi=Ni("applewebkit/")&&!Ni("chrome/")?Math.round:j;function Ki(t){t.min=Wi(t.min),t.max=Wi(t.max)}function Nc(t){Ki(t.x),Ki(t.y)}function ko(t,e,n){return t==="position"||t==="preserve-aspect"&&!xc(ki(e),ki(n),.2)}function Wc(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}function Kc(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const zc=Bo({attachResizeListener:(t,e)=>Kc(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Te={current:void 0},Gc=Bo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Te.current){const t=new zc({});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 Fo(t){if(t)return t.options.allowProjection!==!1?t.projection:Fo(t.parent)}const jo={borderRadius:{...K,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:K,borderTopRightRadius:K,borderBottomLeftRadius:K,borderBottomRightRadius:K,boxShadow:ys};function Pt(t){return typeof t=="object"&&t!==null&&"nodeType"in t}class Hc extends Q{constructor(e){super(e),xs(jo)}initProjection(){const e=this.state.options;this.state.visualElement.projection=new Gc(this.state.visualElement.latestValues,e["data-framer-portal-id"]?void 0:Fo(this.state.visualElement.parent)),this.state.visualElement.projection.isPresent=!0,this.setOptions()}beforeMount(){this.initProjection()}setOptions(){const e=this.state.options,{layoutId:n,layout:i,drag:s=!1,dragConstraints:r=!1}=e;this.state.visualElement.projection.setOptions({layout:i,layoutId:n,alwaysMeasureLayout:!!n||!!s||r&&Pt(r),visualElement:this.state.visualElement,animationType:typeof e.layout=="string"?e.layout:"both",layoutRoot:e.layoutRoot,layoutScroll:e.layoutScroll,crossfade:e.crossfade,onExitComplete:()=>{var o,a;!((o=this.state.visualElement.projection)!=null&&o.isPresent)&&this.state.options.layoutId&&!this.state.isExiting&&((a=this.state.options.animatePresenceContext)==null||a.onMotionExitComplete(this.state.presenceContainer,this.state))}})}update(){this.setOptions()}mount(){var e;(e=this.state.visualElement.projection)==null||e.mount(this.state.element)}}function Io(t){return t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1}function mn(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}function Xc(t){return e=>Io(e)&&t(e,mn(e))}function Rt(t,e,n,i){return ie(t,e,Xc(n),i)}function Oo(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const zi=Oo("dragHorizontal"),Gi=Oo("dragVertical");function Yc(t){let e=!1;if(t==="y")e=Gi();else if(t==="x")e=zi();else{const n=zi(),i=Gi();n&&i?e=()=>{n(),i()}:(n&&n(),i&&i())}return e}function $e(t){return t.max-t.min}function qc(t,{min:e,max:n},i){return e!==void 0&&t<e?t=i?V(e,t,i.min):Math.max(t,e):n!==void 0&&t>n&&(t=i?V(n,t,i.max):Math.min(t,n)),t}const Ne=.35;function Zc(t,{top:e,left:n,bottom:i,right:s}){return{x:Hi(t.x,n,s),y:Hi(t.y,e,i)}}function Hi(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Jc(t=Ne){return t===!1?t=0:t===!0&&(t=Ne),{x:Xi(t,"left","right"),y:Xi(t,"top","bottom")}}function Xi(t,e,n){return{min:Yi(t,e),max:Yi(t,n)}}function Yi(t,e){return typeof t=="number"?t:t[e]||0}function Qc(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}function th(t,e){return{x:qi(t.x,e.x),y:qi(t.y,e.y)}}function qi(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}function eh(t,e){let n=.5;const i=$e(t),s=$e(e);return s>i?n=mt(e.min,e.max-i,t.min):i>s&&(n=mt(t.min,t.max-s,e.min)),G(0,1,n)}const Zi=(t,e)=>Math.abs(t-e);function nh(t,e){const n=Zi(t.x,e.x),i=Zi(t.y,e.y);return Math.sqrt(n**2+i**2)}const Ji=new Set(["auto","scroll"]);class _o{constructor(e,n,{transformPagePoint:i,contextWindow:s,dragSnapToOrigin:r=!1,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=f=>{this.handleScroll(f.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Se(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,p=nh(f.offset,{x:0,y:0})>=3;if(!d&&!p)return;const{point:m}=f,{timestamp:g}=B;this.history.push({...m,timestamp:g});const{onStart:y,onMove:T}=this.handlers;d||(y&&y(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,f)},this.handlePointerMove=(f,d)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=be(d,this.transformPagePoint),E.update(this.updatePoint,!0)},this.handlePointerUp=(f,d)=>{this.end();const{onEnd:p,onSessionEnd:m,resumeAnimation:g}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Se(f.type==="pointercancel"?this.lastMoveEventInfo:be(d,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,y),m&&m(f,y)},!Io(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=i,this.contextWindow=s||window;const a=mn(e),l=be(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=B;this.history=[{...c,timestamp:u}];const{onSessionStart:h}=n;h&&h(e,Se(l,this.history)),this.removeListeners=_t(Rt(this.contextWindow,"pointermove",this.handlePointerMove),Rt(this.contextWindow,"pointerup",this.handlePointerUp),Rt(this.contextWindow,"pointercancel",this.handlePointerUp)),o&&this.startScrollTracking(o)}isScrollable(e){const n=window.getComputedStyle(e);return n.overflow==="auto"||n.overflow==="scroll"||n.overflowX==="auto"||n.overflowX==="scroll"||n.overflowY==="auto"||n.overflowY==="scroll"}startScrollTracking(e){let n=e.parentElement;for(;n;){const i=getComputedStyle(n);(Ji.has(i.overflowX)||Ji.has(i.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const i=e===window,s=i?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},r={x:s.x-n.x,y:s.y-n.y};r.x===0&&r.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(e,s),E.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){var e;this.removeListeners&&this.removeListeners(),(e=this.removeScrollListeners)==null||e.call(this),this.scrollPositions.clear(),Z(this.updatePoint)}}function be(t,e){return e?{point:e(t.point)}:t}function Qi(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Se({point:t},e){return{point:t,delta:Qi(t,Uo(e)),offset:Qi(t,ih(e)),velocity:sh(e,.1)}}function ih(t){return t[0]}function Uo(t){return t[t.length-1]}function sh(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=Uo(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>$(e)));)n--;if(!i)return{x:0,y:0};const r=O(s.timestamp-i.timestamp);if(r===0)return{x:0,y:0};const o={x:(s.x-i.x)/r,y:(s.y-i.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const ts=()=>({min:0,max:0});function oh(){return{x:ts(),y:ts()}}function W(t){return[t("x"),t("y")]}function rh(t){return!!(R(t)&&t.add)}function es(t,e){const n=t.getValue("willChange");if(rh(n))return n.add(e)}function $o({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function ah(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function lh({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function ns(t,e){t.min=t.min+e,t.max=t.max+e}function uh(t,e){return $o(ah(t.getBoundingClientRect(),e))}function ch(t,e,n){const i=uh(t,n),{scroll:s}=e;return s&&(ns(i.x,s.offset.x),ns(i.y,s.offset.y)),i}function hh(t){var e;return(e=t.projection)==null?void 0:e.isPresent}function No({current:t}){return t?t.ownerDocument.defaultView:null}const fh=new WeakMap;class dh{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=oh(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const i=c=>{n?this.stopAnimation():this.pauseAnimation(),n&&this.snapToCursor(mn(c,"page").point)},s=(c,u)=>{this.stopAnimation();const{drag:h,dragPropagation:f,onDragStart:d}=this.getProps();if(h&&!f&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Yc(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),W(m=>{let g=this.getAxisMotionValue(m).get()||0;if(z.test(g)){const{projection:y}=this.visualElement;if(y&&y.layout){const T=y.layout.layoutBox[m];T&&(g=$e(T)*(parseFloat(g)/100))}}this.originPoint[m]=g}),d&&E.postRender(()=>d(c,u)),es(this.visualElement,"transform"),this.visualElement.state.setActive("whileDrag",!0)},r=(c,u)=>{const{dragPropagation:h,dragDirectionLock:f,onDirectionLock:d,onDrag:p}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:m}=u;if(f&&this.currentDirection===null){this.currentDirection=ph(m),this.currentDirection!==null&&d&&d(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=()=>W(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 _o(e,{onSessionStart:i,onStart:s,onMove:r,onSessionEnd:o,resumeAnimation:a},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:No(this.visualElement),element:this.visualElement.current})}stop(e,n){const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:r}=this.getProps();r&&E.postRender(()=>r(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),this.visualElement.state.setActive("whileDrag",!1)}updateAxis(e,n,i){const{drag:s}=this.getProps();if(!i||!Gt(e,s,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(o=qc(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:i}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)==null?void 0:e.layout,r=this.constraints;n&&Pt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=Zc(s.layoutBox,n):this.constraints=!1,this.elastic=Jc(i),r!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&W(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Qc(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Pt(e))return!1;const i=e,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const r=ch(i,s.root,this.visualElement.getTransformPagePoint());let o=th(s.layout.layoutBox,r);if(n){const a=n(lh(o));this.hasMutatedConstraints=!!a,a&&(o=$o(a))}return o}startAnimation(e){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=W(u=>{if(!Gt(u,n,this.currentDirection))return;let h=l&&l[u]||{};o&&(h={min:0,max:0});const f=s?200:1e6,d=s?40:1e7,p={type:"inertia",velocity:i?e[u]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(u,p)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const i=this.getAxisMotionValue(e);return es(this.visualElement,e),i.start(dn(e,i,0,n,this.visualElement,!1))}stopAnimation(){hh(this.visualElement)&&W(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){W(e=>{var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps();return i[n]||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){W(n=>{const{drag:i}=this.getProps();if(!Gt(n,i,this.currentDirection))return;const{projection:s}=this.visualElement,r=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n];r.set(e[n]-V(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Pt(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};W(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();s[o]=eh({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),W(o=>{if(!Gt(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];a.set(V(l,c,s[o]))})}addListeners(){if(!this.visualElement.current)return;fh.set(this.visualElement,this);const e=this.visualElement.current,n=Rt(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();Pt(l)&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,r=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),E.read(i);const o=ie(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(W(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(),n(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:r=!1,dragElastic:o=Ne,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Gt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function ph(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class mh extends Q{constructor(e){super(e),this.removeGroupControls=j,this.removeListeners=j,this.controls=new dh(e.visualElement)}mount(){const{dragControls:e}=this.state.options;e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||j}unmount(){this.removeGroupControls(),this.removeListeners()}}let wt=!1;class gh extends Q{constructor(e){super(e),xs(jo),e.getSnapshot=this.getSnapshot.bind(this),e.didUpdate=this.didUpdate.bind(this)}beforeUpdate(e){this.getSnapshot(e,void 0)}update(){this.didUpdate()}didUpdate(){var e,n;wt&&(this.state.options.layout||this.state.options.layoutId||this.state.options.drag)&&(wt=!1,(n=(e=this.state.visualElement.projection)==null?void 0:e.root)==null||n.didUpdate())}mount(){var e;const n=this.state.options,i=this.state.options.layoutGroup;if(n.layout||n.layoutId){const s=this.state.visualElement.projection;if(s){s.promote();const r=s.getStack();r?.prevLead&&!r.prevLead.snapshot&&(r.prevLead.willUpdate(),wt=!0),(e=i?.group)==null||e.add(s)}Yt.hasEverUpdated=!0}this.didUpdate()}beforeUnmount(){this.getSnapshot(this.state.options,!1)}unmount(){const e=this.state.options.layoutGroup,n=this.state.visualElement.projection;n&&(e?.group&&(this.state.options.layout||this.state.options.layoutId)&&e.group.remove(n),this.state.options.layoutId&&(wt=!0),this.didUpdate())}getSnapshot(e,n){const i=this.state.visualElement.projection,{drag:s,layoutDependency:r,layout:o,layoutId:a}=e;if(!i||!o&&!a&&!s)return;wt=!0;const l=this.state.options;(s||l.layoutDependency!==r||r===void 0||qt(n)&&i.isPresent!==n)&&i.willUpdate(),qt(n)&&n!==i.isPresent&&(i.isPresent=n,n?i.promote():i.relegate())}}function is(t){return(e,n)=>{t&&E.postRender(()=>t(e,n))}}class yh extends Q{constructor(){super(...arguments),this.removePointerDownListener=j}onPointerDown(e){this.session=new _o(e,this.createPanHandlers(),{transformPagePoint:this.state.visualElement.getTransformPagePoint(),contextWindow:No(this.state.visualElement)})}createPanHandlers(){return{onSessionStart:is((e,n)=>{const{onPanSessionStart:i}=this.state.options;i&&i(e,n)}),onStart:is((e,n)=>{const{onPanStart:i}=this.state.options;i&&i(e,n)}),onMove:(e,n)=>{const{onPan:i}=this.state.options;i&&i(e,n)},onEnd:(e,n)=>{const{onPanEnd:i}=this.state.options;delete this.session,i&&E.postRender(()=>i(e,n))}}}mount(){this.removePointerDownListener=Rt(this.state.element,"pointerdown",this.onPointerDown.bind(this))}update(){}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const vh=[zu,tc,nc,oc,ac,Hc,yh,mh,gh],xh={reducedMotion:"never",transition:void 0,nonce:void 0},[Th]=It("MotionConfig");function Wo(){return Th(Et(()=>xh))}let bh=0;function Sh(t){const e=new WeakMap,n=Wo();function i(r){if(t.mode!=="popLayout")return;const o=r.offsetParent,a=o instanceof HTMLElement&&o.offsetWidth||0,l={height:r.offsetHeight||0,width:r.offsetWidth||0,top:r.offsetTop,left:r.offsetLeft,right:0};l.right=a-l.width-l.left;const c=t.anchorX==="left"?`left: ${l.left}px`:`right: ${l.right}px`,u=`pop-${bh++}`;r.dataset.motionPopId=u;const h=document.createElement("style");n.value.nonce&&(h.nonce=n.value.nonce),e.set(r,h),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`
[data-motion-pop-id="${u}"] {
position: absolute !important;
width: ${l.width}px !important;
height: ${l.height}px !important;
top: ${l.top}px !important;
${c} !important;
}
`)}function s(r){const o=e.get(r);o&&(e.delete(r),E.render(()=>{document.head.removeChild(o)}))}return{addPopStyle:i,removePopStyle:s}}const We="data-ap-child",[wh,Ah]=It("AnimatePresenceContext");function Ph(t){const e=new Map,n=new Set,{addPopStyle:i,removePopStyle:s}=Sh(t);function r(p,m){let g=e.get(p);g||(g={motions:new Set,exitingMotions:new Set,el:p},e.set(p,g)),g.motions.add(m)}function o(p,m){const g=e.get(p);g&&(g.exitingMotions.delete(m),g.exitingMotions.size===0&&g.done&&h(g))}function a(p){n.add(p)}function l(p){n.delete(p)}const c={initial:t.initial,custom:t.custom,register:r,onMotionExitComplete:o,registerPending:a,unregisterPending:l};os(()=>t.custom,p=>{c.custom=p},{flush:"pre"}),Ah(c),rs(()=>{c.initial=void 0});function u(p){if(p instanceof HTMLElement&&!p.hasAttribute(We)){p.setAttribute(We,"");const m=Jt.get(p);m&&!m.presenceContainer&&(m.presenceContainer=p,r(p,m))}}function h(p){var m,g,y,T,x;s(p.el),(m=p.done)==null||m.call(p),p.done=void 0,(g=p.el)!=null&&g.isConnected?(T=(y=p.motions.values().next())==null?void 0:y.value)==null||T.didUpdate():(p.motions.forEach(S=>{S.unmount()}),p.motions.clear()),(x=t.onExitComplete)==null||x.call(t)}function f(p,m){u(p);const g=e.get(p);g&&(g.exitingMotions.clear(),g.motions.forEach(y=>{y.setActive("exit",!1),y.getSnapshot(y.options,!0)})),m()}function d(p,m){var g,y,T;const x=p;u(x),n.forEach(w=>{w.element&&x.contains(w.element)&&(w.presenceContainer=x,r(x,w),n.delete(w))});const S=e.get(x),b=Jt.get(x);if((!S||S.motions.size===0)&&!b){m(),(g=t.onExitComplete)==null||g.call(t);return}S.done=m,i(x),S.motions.forEach(w=>{S.exitingMotions.add(w),w.setActive("exit",!0),w.getSnapshot(w.options,!1)}),(T=(y=S.motions.values().next())==null?void 0:y.value)==null||T.didUpdate()}return as(()=>{e.forEach(p=>{p.motions.forEach(m=>{m.unmount()})}),e.clear()}),{enter:f,exit:d}}const Eh=ls({name:"AnimatePresence",inheritAttrs:!0,__name:"AnimatePresence",props:{mode:{default:"sync"},initial:{type:Boolean,default:!0},as:{},custom:{},onExitComplete:{},anchorX:{default:"left"}},setup(t){const e=t,{enter:n,exit:i}=Ph(e),s=Et(()=>e.mode!=="wait"?{tag:e.as}:{mode:e.mode==="wait"?"out-in":void 0});return(r,o)=>(et(),ct(Ae(r.mode==="wait"?Xo:Yo),Zt(s.value,{appear:"",onLeave:k(i),onEnter:k(n)}),{default:Y(()=>[Ho(r.$slots,"default")]),_:3},16,["onLeave","onEnter"]))}});function re(t){if(t)return t.nodeType===3||t.nodeType===8?re(t.nextSibling):t}const[Vh]=It("LazyMotionContext");function Ch(t){const e=Fr(null),n=Ir({}),i=Wo(),s=wh({}),r=Vh({features:us([]),strict:!1}),o=qo();function a(){return n.id&&t.layoutId?`${n.id}-${t.layoutId}`:t.layoutId||void 0}function l(){return{...t,lazyMotionContext:r,layoutId:a(),transition:t.transition??i.value.transition,layoutGroup:n,motionConfig:i.value,inViewOptions:t.inViewOptions??i.value.inViewOptions,animatePresenceContext:s,initial:s.initial===!1?s.initial:t.initial===!0?void 0:t.initial}}function c(){return{...o,...l()}}const u=new Hr(c(),e);jr(u);function h(){var d;const p=u.type==="svg",m={...o};Object.keys(o).forEach(T=>{R(o[T])&&(m[T]=o[T].get())});let g={...t.style,...p?{}:((d=u.visualElement)==null?void 0:d.latestValues)||u.baseTarget};if(p){const{attrs:T,style:x}=aa({...u.isMounted()?u.target:u.baseTarget,...g});(x.transform||T.transformOrigin)&&(x.transformOrigin=T.transformOrigin??"50% 50%",delete T.transformOrigin),x.transform&&(x.transformBox=x.transformBox??"fill-box",delete T.transformBox),Object.assign(m,T),g=x}t.drag&&t.dragListener!==!1&&Object.assign(g,{userSelect:"none",WebkitUserSelect:"none",WebkitTouchCallout:"none",touchAction:t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`});const y=ia(g);return y&&(m.style=y),m}const f=Zo().proxy;return Jo(()=>{u.beforeMount()}),rs(()=>{if(u.mount(re(f.$el),c(),Dh(f)),s.register&&u.element){const d=u.element.closest(`[${We}]`);d?(u.presenceContainer=d,s.register(d,u)):s.registerPending&&s.registerPending(u)}}),Qo(()=>u.beforeUnmount()),as(()=>{s.unregisterPending&&s.unregisterPending(u);const d=re(f.$el);d?.isConnected||u.unmount()}),tr(()=>{u.beforeUpdate(c())}),er(()=>{u.update(c())}),{getProps:l,getAttrs:h,layoutGroup:n,state:u}}const Mh={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,default:void 0},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 n=((e=re(t.$el))==null?void 0:e.style.display)==="none";return t.$.vnode.transition&&n}const Rh=new Map,Lh=new Map;function Bh(t){if(!Array.isArray(t))return[t];const e=[];for(const n of t)Array.isArray(n)?e.push(...n):e.push(n);return e}const kh=["area","img","input"];function Fh(t,e,n){var i,s;if(typeof t=="string"&&kh.includes(t))return cs(t,e);if(t==="template"){if(!n.default)return null;const r=Bh(n.default()),o=r.findIndex(u=>u.type!==nr);if(o===-1)return r;const a=r[o];(i=a.props)==null||delete i.ref;const l=a.props?Zt(e,a.props):e;e.class&&((s=a.props)!=null&&s.class)&&delete a.props.class;const c=ir(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 ss(t,e={}){var n;const i=typeof t=="string",s=i?t:t.name||"",r=((n=e.features)==null?void 0:n.length)>0?Rh:Lh;if(i&&r?.has(t))return r.get(t);const o=ls({inheritAttrs:!1,props:{...Mh,features:{type:Object,default:()=>e.features||[]},as:{type:[String,Object],default:t||"div"}},name:s?`motion.${s}`:"Motion",setup(a,{slots:l}){const{getProps:c,getAttrs:u,state:h}=Ch(a);function f(){const d=h.element;if((!(typeof a.as=="object")||a.asChild)&&d){const{style:m}=u();if(m)for(const[g,y]of Object.entries(m))d.style[g]=y}}return()=>{const d=c(),p=u(),m=a.asChild?"template":a.as,g={...e.forwardMotionProps||a.forwardMotionProps?d:{},...p,onVnodeUpdated:f},y=Fh(m,g,l);return y!==null?y:cs(m,{...g},l)}}});return i&&r?.set(t,o),o}function jh(t=[]){return new Proxy({},{get(e,n){return n==="create"?(i,s)=>ss(i,{...s,features:t}):ss(n,{features:t})}})}const Ih=jh(vh),we=Ih.create("div"),Oh=["onClick"],zh=Object.assign({inheritAttrs:!1},{__name:"ProseImg",props:{src:{type:String,required:!0},alt:{type:String,required:!0},width:{type:[String,Number],required:!1},height:{type:[String,Number],required:!1},class:{type:null,required:!1},zoom:{type:Boolean,required:!1,default:!0},ui:{type:null,required:!1}},setup(t){const e=t,n=sr(),[i,s]=Sn(),[r,o]=Sn(),a=us(!1),l=Et(()=>Vn({extend:Vn(mr),...n.ui?.prose?.img||{}})({zoom:e.zoom,open:a.value})),c=Et(()=>{if(e.src?.startsWith("/")&&!e.src.startsWith("//")){const h=ar(lr(ur().app.baseURL));if(h!=="/"&&!e.src.startsWith(h))return cr(h,e.src)}return e.src}),u=Et(()=>`${c.value}::${hr()}`);return e.zoom&&or(window,"scroll",()=>{a.value=!1}),(h,f)=>(et(),wn(rr,null,[X(k(i),null,{default:Y(()=>[(et(),ct(Ae(k(An)),Zt({src:c.value,alt:t.alt,width:t.width,height:t.height},h.$attrs,{class:l.value.base({class:[e.ui?.base,e.class]})}),null,16,["src","alt","width","height","class"]))]),_:1}),X(k(r),null,{default:Y(()=>[(et(),ct(Ae(k(An)),Zt({src:c.value,alt:t.alt},h.$attrs,{class:l.value.zoomedImage({class:[e.ui?.zoomedImage]})}),null,16,["src","alt","class"]))]),_:1}),t.zoom?(et(),ct(k(pr),{key:0,open:a.value,"onUpdate:open":f[0]||(f[0]=d=>a.value=d),modal:!1},{default:Y(({close:d})=>[X(k(fr),{"as-child":""},{default:Y(()=>[X(k(we),{"layout-id":u.value,"as-child":"",transition:{type:"spring",bounce:.15,duration:.5,ease:"easeInOut"}},{default:Y(()=>[X(k(s))]),_:1},8,["layout-id"])]),_:1}),X(k(dr),null,{default:Y(()=>[X(k(Eh),null,{default:Y(()=>[a.value?(et(),ct(k(we),{key:0,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},class:Pn(l.value.overlay({class:[e.ui?.overlay]}))},null,8,["class"])):En("",!0),a.value?(et(),wn("div",{key:1,class:Pn(l.value.content({class:[e.ui?.content]})),onClick:d},[X(k(we),{"as-child":"","layout-id":u.value,transition:{type:"spring",bounce:.15,duration:.5,ease:"easeInOut"}},{default:Y(()=>[X(k(o))]),_:1},8,["layout-id"])],10,Oh)):En("",!0)]),_:2},1024)]),_:2},1024)]),_:1},8,["open"])):(et(),ct(k(s),{key:1}))],64))}});export{zh as default};
Back to Directory
File Manager