@grackle-ai/web 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -142,7 +142,7 @@ index 2b3c4d5..8f9a0b1 100644
142
142
  top: ${p}px !important;
143
143
  left: ${m}px !important;
144
144
  }
145
- `),()=>{document.head.removeChild(v)}},[s]),x.jsx(RS,{isPresent:s,childRef:u,sizeRef:c,children:D.cloneElement(i,{ref:u})})}const wS=({children:i,initial:s,isPresent:o,onExitComplete:u,custom:c,presenceAffectsLayout:h,mode:d})=>{const y=wc(VS),p=D.useId(),m=D.useCallback(S=>{y.set(S,!0);for(const b of y.values())if(!b)return;u&&u()},[y,u]),v=D.useMemo(()=>({id:p,initial:s,isPresent:o,custom:c,onExitComplete:m,register:S=>(y.set(S,!1),()=>y.delete(S))}),h?[Math.random(),m]:[o,m]);return D.useMemo(()=>{y.forEach((S,b)=>y.set(b,!1))},[o]),D.useEffect(()=>{!o&&!y.size&&u&&u()},[o]),d==="popLayout"&&(i=x.jsx(zS,{isPresent:o,children:i})),x.jsx(Oo.Provider,{value:v,children:i})};function VS(){return new Map}function Uy(i=!0){const s=D.useContext(Oo);if(s===null)return[!0,null];const{isPresent:o,onExitComplete:u,register:c}=s,h=D.useId();D.useEffect(()=>{i&&c(h)},[i]);const d=D.useCallback(()=>i&&u&&u(h),[h,u,i]);return!o&&u?[!1,d]:[!0]}const yo=i=>i.key||"";function Sp(i){const s=[];return D.Children.forEach(i,o=>{D.isValidElement(o)&&s.push(o)}),s}const Bc=typeof window<"u",Ly=Bc?D.useLayoutEffect:D.useEffect,ky=({children:i,custom:s,initial:o=!0,onExitComplete:u,presenceAffectsLayout:c=!0,mode:h="sync",propagate:d=!1})=>{const[y,p]=Uy(d),m=D.useMemo(()=>Sp(i),[i]),v=d&&!y?[]:m.map(yo),S=D.useRef(!0),b=D.useRef(m),M=wc(()=>new Map),[L,z]=D.useState(m),[O,k]=D.useState(m);Ly(()=>{S.current=!1,b.current=m;for(let J=0;J<O.length;J++){const B=yo(O[J]);v.includes(B)?M.delete(B):M.get(B)!==!0&&M.set(B,!1)}},[O,v.length,v.join("-")]);const Y=[];if(m!==L){let J=[...m];for(let B=0;B<O.length;B++){const Z=O[B],Q=yo(Z);v.includes(Q)||(J.splice(B,0,Z),Y.push(Z))}h==="wait"&&Y.length&&(J=Y),k(Sp(J)),z(m);return}const{forceRender:G}=D.useContext(zc);return x.jsx(x.Fragment,{children:O.map(J=>{const B=yo(J),Z=d&&!y?!1:m===O||v.includes(B),Q=()=>{if(M.has(B))M.set(B,!0);else return;let C=!0;M.forEach(K=>{K||(C=!1)}),C&&(G==null||G(),k(b.current),d&&(p==null||p()),u&&u())};return x.jsx(wS,{isPresent:Z,initial:!S.current||o?void 0:!1,custom:Z?void 0:s,presenceAffectsLayout:c,mode:h,onExitComplete:Z?void 0:Q,children:J},B)})})},Ze=i=>i;let Hy=Ze;const BS={useManualTiming:!1};function US(i){let s=new Set,o=new Set,u=!1,c=!1;const h=new WeakSet;let d={delta:0,timestamp:0,isProcessing:!1};function y(m){h.has(m)&&(p.schedule(m),i()),m(d)}const p={schedule:(m,v=!1,S=!1)=>{const M=S&&u?s:o;return v&&h.add(m),M.has(m)||M.add(m),m},cancel:m=>{o.delete(m),h.delete(m)},process:m=>{if(d=m,u){c=!0;return}u=!0,[s,o]=[o,s],s.forEach(y),s.clear(),u=!1,c&&(c=!1,p.process(m))}};return p}const go=["read","resolveKeyframes","update","preRender","render","postRender"],LS=40;function qy(i,s){let o=!1,u=!0;const c={delta:0,timestamp:0,isProcessing:!1},h=()=>o=!0,d=go.reduce((k,Y)=>(k[Y]=US(h),k),{}),{read:y,resolveKeyframes:p,update:m,preRender:v,render:S,postRender:b}=d,M=()=>{const k=performance.now();o=!1,c.delta=u?1e3/60:Math.max(Math.min(k-c.timestamp,LS),1),c.timestamp=k,c.isProcessing=!0,y.process(c),p.process(c),m.process(c),v.process(c),S.process(c),b.process(c),c.isProcessing=!1,o&&s&&(u=!1,i(M))},L=()=>{o=!0,u=!0,c.isProcessing||i(M)};return{schedule:go.reduce((k,Y)=>{const G=d[Y];return k[Y]=(J,B=!1,Z=!1)=>(o||L(),G.schedule(J,B,Z)),k},{}),cancel:k=>{for(let Y=0;Y<go.length;Y++)d[go[Y]].cancel(k)},state:c,steps:d}}const{schedule:Lt,cancel:ha,state:Se,steps:tc}=qy(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ze,!0),Gy=D.createContext({strict:!1}),bp={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"]},Bi={};for(const i in bp)Bi[i]={isEnabled:s=>bp[i].some(o=>!!s[o])};function kS(i){for(const s in i)Bi[s]={...Bi[s],...i[s]}}const HS=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function _o(i){return i.startsWith("while")||i.startsWith("drag")&&i!=="draggable"||i.startsWith("layout")||i.startsWith("onTap")||i.startsWith("onPan")||i.startsWith("onLayout")||HS.has(i)}let Yy=i=>!_o(i);function qS(i){i&&(Yy=s=>s.startsWith("on")?!_o(s):i(s))}try{qS(require("@emotion/is-prop-valid").default)}catch{}function GS(i,s,o){const u={};for(const c in i)c==="values"&&typeof i.values=="object"||(Yy(c)||o===!0&&_o(c)||!s&&!_o(c)||i.draggable&&c.startsWith("onDrag"))&&(u[c]=i[c]);return u}function YS(i){if(typeof Proxy>"u")return i;const s=new Map,o=(...u)=>i(...u);return new Proxy(o,{get:(u,c)=>c==="create"?i:(s.has(c)||s.set(c,i(c)),s.get(c))})}const Ro=D.createContext({});function Ys(i){return typeof i=="string"||Array.isArray(i)}function zo(i){return i!==null&&typeof i=="object"&&typeof i.start=="function"}const Uc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Lc=["initial",...Uc];function wo(i){return zo(i.animate)||Lc.some(s=>Ys(i[s]))}function Xy(i){return!!(wo(i)||i.variants)}function XS(i,s){if(wo(i)){const{initial:o,animate:u}=i;return{initial:o===!1||Ys(o)?o:void 0,animate:Ys(u)?u:void 0}}return i.inherit!==!1?s:{}}function ZS(i){const{initial:s,animate:o}=XS(i,D.useContext(Ro));return D.useMemo(()=>({initial:s,animate:o}),[Tp(s),Tp(o)])}function Tp(i){return Array.isArray(i)?i.join(" "):i}const KS=Symbol.for("motionComponentSymbol");function Ni(i){return i&&typeof i=="object"&&Object.prototype.hasOwnProperty.call(i,"current")}function QS(i,s,o){return D.useCallback(u=>{u&&i.onMount&&i.onMount(u),s&&(u?s.mount(u):s.unmount()),o&&(typeof o=="function"?o(u):Ni(o)&&(o.current=u))},[s])}const kc=i=>i.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),JS="framerAppearId",Zy="data-"+kc(JS),{schedule:Hc}=qy(queueMicrotask,!1),Ky=D.createContext({});function FS(i,s,o,u,c){var h,d;const{visualElement:y}=D.useContext(Ro),p=D.useContext(Gy),m=D.useContext(Oo),v=D.useContext(Vc).reducedMotion,S=D.useRef(null);u=u||p.renderer,!S.current&&u&&(S.current=u(i,{visualState:s,parent:y,props:o,presenceContext:m,blockInitialAnimation:m?m.initial===!1:!1,reducedMotionConfig:v}));const b=S.current,M=D.useContext(Ky);b&&!b.projection&&c&&(b.type==="html"||b.type==="svg")&&PS(S.current,o,c,M);const L=D.useRef(!1);D.useInsertionEffect(()=>{b&&L.current&&b.update(o,m)});const z=o[Zy],O=D.useRef(!!z&&!(!((h=window.MotionHandoffIsComplete)===null||h===void 0)&&h.call(window,z))&&((d=window.MotionHasOptimisedAnimation)===null||d===void 0?void 0:d.call(window,z)));return Ly(()=>{b&&(L.current=!0,window.MotionIsMounted=!0,b.updateFeatures(),Hc.render(b.render),O.current&&b.animationState&&b.animationState.animateChanges())}),D.useEffect(()=>{b&&(!O.current&&b.animationState&&b.animationState.animateChanges(),O.current&&(queueMicrotask(()=>{var k;(k=window.MotionHandoffMarkAsComplete)===null||k===void 0||k.call(window,z)}),O.current=!1))}),b}function PS(i,s,o,u){const{layoutId:c,layout:h,drag:d,dragConstraints:y,layoutScroll:p,layoutRoot:m}=s;i.projection=new o(i.latestValues,s["data-framer-portal-id"]?void 0:Qy(i.parent)),i.projection.setOptions({layoutId:c,layout:h,alwaysMeasureLayout:!!d||y&&Ni(y),visualElement:i,animationType:typeof h=="string"?h:"both",initialPromotionConfig:u,layoutScroll:p,layoutRoot:m})}function Qy(i){if(i)return i.options.allowProjection!==!1?i.projection:Qy(i.parent)}function WS({preloadedFeatures:i,createVisualElement:s,useRender:o,useVisualState:u,Component:c}){var h,d;i&&kS(i);function y(m,v){let S;const b={...D.useContext(Vc),...m,layoutId:IS(m)},{isStatic:M}=b,L=ZS(m),z=u(m,M);if(!M&&Bc){$S();const O=tb(b);S=O.MeasureLayout,L.visualElement=FS(c,z,b,s,O.ProjectionNode)}return x.jsxs(Ro.Provider,{value:L,children:[S&&L.visualElement?x.jsx(S,{visualElement:L.visualElement,...b}):null,o(c,m,QS(z,L.visualElement,v),z,M,L.visualElement)]})}y.displayName=`motion.${typeof c=="string"?c:`create(${(d=(h=c.displayName)!==null&&h!==void 0?h:c.name)!==null&&d!==void 0?d:""})`}`;const p=D.forwardRef(y);return p[KS]=c,p}function IS({layoutId:i}){const s=D.useContext(zc).id;return s&&i!==void 0?s+"-"+i:i}function $S(i,s){D.useContext(Gy).strict}function tb(i){const{drag:s,layout:o}=Bi;if(!s&&!o)return{};const u={...s,...o};return{MeasureLayout:s!=null&&s.isEnabled(i)||o!=null&&o.isEnabled(i)?u.MeasureLayout:void 0,ProjectionNode:u.ProjectionNode}}const eb=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function qc(i){return typeof i!="string"||i.includes("-")?!1:!!(eb.indexOf(i)>-1||/[A-Z]/u.test(i))}function xp(i){const s=[{},{}];return i==null||i.values.forEach((o,u)=>{s[0][u]=o.get(),s[1][u]=o.getVelocity()}),s}function Gc(i,s,o,u){if(typeof s=="function"){const[c,h]=xp(u);s=s(o!==void 0?o:i.custom,c,h)}if(typeof s=="string"&&(s=i.variants&&i.variants[s]),typeof s=="function"){const[c,h]=xp(u);s=s(o!==void 0?o:i.custom,c,h)}return s}const pc=i=>Array.isArray(i),nb=i=>!!(i&&typeof i=="object"&&i.mix&&i.toValue),ab=i=>pc(i)?i[i.length-1]||0:i,xe=i=>!!(i&&i.getVelocity);function bo(i){const s=xe(i)?i.get():i;return nb(s)?s.toValue():s}function ib({scrapeMotionValuesFromProps:i,createRenderState:s,onUpdate:o},u,c,h){const d={latestValues:sb(u,c,h,i),renderState:s()};return o&&(d.onMount=y=>o({props:u,current:y,...d}),d.onUpdate=y=>o(y)),d}const Jy=i=>(s,o)=>{const u=D.useContext(Ro),c=D.useContext(Oo),h=()=>ib(i,s,u,c);return o?h():wc(h)};function sb(i,s,o,u){const c={},h=u(i,{});for(const b in h)c[b]=bo(h[b]);let{initial:d,animate:y}=i;const p=wo(i),m=Xy(i);s&&m&&!p&&i.inherit!==!1&&(d===void 0&&(d=s.initial),y===void 0&&(y=s.animate));let v=o?o.initial===!1:!1;v=v||d===!1;const S=v?y:d;if(S&&typeof S!="boolean"&&!zo(S)){const b=Array.isArray(S)?S:[S];for(let M=0;M<b.length;M++){const L=Gc(i,b[M]);if(L){const{transitionEnd:z,transition:O,...k}=L;for(const Y in k){let G=k[Y];if(Array.isArray(G)){const J=v?G.length-1:0;G=G[J]}G!==null&&(c[Y]=G)}for(const Y in z)c[Y]=z[Y]}}}return c}const ki=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ga=new Set(ki),Fy=i=>s=>typeof s=="string"&&s.startsWith(i),Py=Fy("--"),lb=Fy("var(--"),Yc=i=>lb(i)?ob.test(i.split("/*")[0].trim()):!1,ob=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Wy=(i,s)=>s&&typeof i=="number"?s.transform(i):i,Hn=(i,s,o)=>o>s?s:o<i?i:o,Hi={test:i=>typeof i=="number",parse:parseFloat,transform:i=>i},Xs={...Hi,transform:i=>Hn(0,1,i)},vo={...Hi,default:1},Js=i=>({test:s=>typeof s=="string"&&s.endsWith(i)&&s.split(" ").length===1,parse:parseFloat,transform:s=>`${s}${i}`}),da=Js("deg"),yn=Js("%"),st=Js("px"),ub=Js("vh"),rb=Js("vw"),_p={...yn,parse:i=>yn.parse(i)/100,transform:i=>yn.transform(i*100)},cb={borderWidth:st,borderTopWidth:st,borderRightWidth:st,borderBottomWidth:st,borderLeftWidth:st,borderRadius:st,radius:st,borderTopLeftRadius:st,borderTopRightRadius:st,borderBottomRightRadius:st,borderBottomLeftRadius:st,width:st,maxWidth:st,height:st,maxHeight:st,top:st,right:st,bottom:st,left:st,padding:st,paddingTop:st,paddingRight:st,paddingBottom:st,paddingLeft:st,margin:st,marginTop:st,marginRight:st,marginBottom:st,marginLeft:st,backgroundPositionX:st,backgroundPositionY:st},fb={rotate:da,rotateX:da,rotateY:da,rotateZ:da,scale:vo,scaleX:vo,scaleY:vo,scaleZ:vo,skew:da,skewX:da,skewY:da,distance:st,translateX:st,translateY:st,translateZ:st,x:st,y:st,z:st,perspective:st,transformPerspective:st,opacity:Xs,originX:_p,originY:_p,originZ:st},Ap={...Hi,transform:Math.round},Xc={...cb,...fb,zIndex:Ap,size:st,fillOpacity:Xs,strokeOpacity:Xs,numOctaves:Ap},db={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},hb=ki.length;function mb(i,s,o){let u="",c=!0;for(let h=0;h<hb;h++){const d=ki[h],y=i[d];if(y===void 0)continue;let p=!0;if(typeof y=="number"?p=y===(d.startsWith("scale")?1:0):p=parseFloat(y)===0,!p||o){const m=Wy(y,Xc[d]);if(!p){c=!1;const v=db[d]||d;u+=`${v}(${m}) `}o&&(s[d]=m)}}return u=u.trim(),o?u=o(s,c?"":u):c&&(u="none"),u}function Zc(i,s,o){const{style:u,vars:c,transformOrigin:h}=i;let d=!1,y=!1;for(const p in s){const m=s[p];if(Ga.has(p)){d=!0;continue}else if(Py(p)){c[p]=m;continue}else{const v=Wy(m,Xc[p]);p.startsWith("origin")?(y=!0,h[p]=v):u[p]=v}}if(s.transform||(d||o?u.transform=mb(s,i.transform,o):u.transform&&(u.transform="none")),y){const{originX:p="50%",originY:m="50%",originZ:v=0}=h;u.transformOrigin=`${p} ${m} ${v}`}}const pb={offset:"stroke-dashoffset",array:"stroke-dasharray"},yb={offset:"strokeDashoffset",array:"strokeDasharray"};function gb(i,s,o=1,u=0,c=!0){i.pathLength=1;const h=c?pb:yb;i[h.offset]=st.transform(-u);const d=st.transform(s),y=st.transform(o);i[h.array]=`${d} ${y}`}function Ep(i,s,o){return typeof i=="string"?i:st.transform(s+o*i)}function vb(i,s,o){const u=Ep(s,i.x,i.width),c=Ep(o,i.y,i.height);return`${u} ${c}`}function Kc(i,{attrX:s,attrY:o,attrScale:u,originX:c,originY:h,pathLength:d,pathSpacing:y=1,pathOffset:p=0,...m},v,S){if(Zc(i,m,S),v){i.style.viewBox&&(i.attrs.viewBox=i.style.viewBox);return}i.attrs=i.style,i.style={};const{attrs:b,style:M,dimensions:L}=i;b.transform&&(L&&(M.transform=b.transform),delete b.transform),L&&(c!==void 0||h!==void 0||M.transform)&&(M.transformOrigin=vb(L,c!==void 0?c:.5,h!==void 0?h:.5)),s!==void 0&&(b.x=s),o!==void 0&&(b.y=o),u!==void 0&&(b.scale=u),d!==void 0&&gb(b,d,y,p,!1)}const Qc=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Iy=()=>({...Qc(),attrs:{}}),Jc=i=>typeof i=="string"&&i.toLowerCase()==="svg";function $y(i,{style:s,vars:o},u,c){Object.assign(i.style,s,c&&c.getProjectionStyles(u));for(const h in o)i.style.setProperty(h,o[h])}const t0=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function e0(i,s,o,u){$y(i,s,void 0,u);for(const c in s.attrs)i.setAttribute(t0.has(c)?c:kc(c),s.attrs[c])}const Ao={};function Sb(i){Object.assign(Ao,i)}function n0(i,{layout:s,layoutId:o}){return Ga.has(i)||i.startsWith("origin")||(s||o!==void 0)&&(!!Ao[i]||i==="opacity")}function Fc(i,s,o){var u;const{style:c}=i,h={};for(const d in c)(xe(c[d])||s.style&&xe(s.style[d])||n0(d,i)||((u=o==null?void 0:o.getValue(d))===null||u===void 0?void 0:u.liveStyle)!==void 0)&&(h[d]=c[d]);return h}function a0(i,s,o){const u=Fc(i,s,o);for(const c in i)if(xe(i[c])||xe(s[c])){const h=ki.indexOf(c)!==-1?"attr"+c.charAt(0).toUpperCase()+c.substring(1):c;u[h]=i[c]}return u}function bb(i,s){try{s.dimensions=typeof i.getBBox=="function"?i.getBBox():i.getBoundingClientRect()}catch{s.dimensions={x:0,y:0,width:0,height:0}}}const Dp=["x","y","width","height","cx","cy","r"],Tb={useVisualState:Jy({scrapeMotionValuesFromProps:a0,createRenderState:Iy,onUpdate:({props:i,prevProps:s,current:o,renderState:u,latestValues:c})=>{if(!o)return;let h=!!i.drag;if(!h){for(const y in c)if(Ga.has(y)){h=!0;break}}if(!h)return;let d=!s;if(s)for(let y=0;y<Dp.length;y++){const p=Dp[y];i[p]!==s[p]&&(d=!0)}d&&Lt.read(()=>{bb(o,u),Lt.render(()=>{Kc(u,c,Jc(o.tagName),i.transformTemplate),e0(o,u)})})}})},xb={useVisualState:Jy({scrapeMotionValuesFromProps:Fc,createRenderState:Qc})};function i0(i,s,o){for(const u in s)!xe(s[u])&&!n0(u,o)&&(i[u]=s[u])}function _b({transformTemplate:i},s){return D.useMemo(()=>{const o=Qc();return Zc(o,s,i),Object.assign({},o.vars,o.style)},[s])}function Ab(i,s){const o=i.style||{},u={};return i0(u,o,i),Object.assign(u,_b(i,s)),u}function Eb(i,s){const o={},u=Ab(i,s);return i.drag&&i.dragListener!==!1&&(o.draggable=!1,u.userSelect=u.WebkitUserSelect=u.WebkitTouchCallout="none",u.touchAction=i.drag===!0?"none":`pan-${i.drag==="x"?"y":"x"}`),i.tabIndex===void 0&&(i.onTap||i.onTapStart||i.whileTap)&&(o.tabIndex=0),o.style=u,o}function Db(i,s,o,u){const c=D.useMemo(()=>{const h=Iy();return Kc(h,s,Jc(u),i.transformTemplate),{...h.attrs,style:{...h.style}}},[s]);if(i.style){const h={};i0(h,i.style,i),c.style={...h,...c.style}}return c}function jb(i=!1){return(o,u,c,{latestValues:h},d)=>{const p=(qc(o)?Db:Eb)(u,h,d,o),m=GS(u,typeof o=="string",i),v=o!==D.Fragment?{...m,...p,ref:c}:{},{children:S}=u,b=D.useMemo(()=>xe(S)?S.get():S,[S]);return D.createElement(o,{...v,children:b})}}function Mb(i,s){return function(u,{forwardMotionProps:c}={forwardMotionProps:!1}){const d={...qc(u)?Tb:xb,preloadedFeatures:i,useRender:jb(c),createVisualElement:s,Component:u};return WS(d)}}function s0(i,s){if(!Array.isArray(s))return!1;const o=s.length;if(o!==i.length)return!1;for(let u=0;u<o;u++)if(s[u]!==i[u])return!1;return!0}function Vo(i,s,o){const u=i.getProps();return Gc(u,s,o!==void 0?o:u.custom,i)}function Pc(i,s){return i?i[s]||i.default||i:void 0}const l0=new Set(["width","height","top","left","right","bottom",...ki]);let To;function Cb(){To=void 0}const gn={now:()=>(To===void 0&&gn.set(Se.isProcessing||BS.useManualTiming?Se.timestamp:performance.now()),To),set:i=>{To=i,queueMicrotask(Cb)}};function Wc(i,s){i.indexOf(s)===-1&&i.push(s)}function Ic(i,s){const o=i.indexOf(s);o>-1&&i.splice(o,1)}class $c{constructor(){this.subscriptions=[]}add(s){return Wc(this.subscriptions,s),()=>Ic(this.subscriptions,s)}notify(s,o,u){const c=this.subscriptions.length;if(c)if(c===1)this.subscriptions[0](s,o,u);else for(let h=0;h<c;h++){const d=this.subscriptions[h];d&&d(s,o,u)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function o0(i,s){return s?i*(1e3/s):0}const jp=30,Nb=i=>!isNaN(parseFloat(i));class Ob{constructor(s,o={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(u,c=!0)=>{const h=gn.now();this.updatedAt!==h&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(u),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),c&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(s),this.owner=o.owner}setCurrent(s){this.current=s,this.updatedAt=gn.now(),this.canTrackVelocity===null&&s!==void 0&&(this.canTrackVelocity=Nb(this.current))}setPrevFrameValue(s=this.current){this.prevFrameValue=s,this.prevUpdatedAt=this.updatedAt}onChange(s){return this.on("change",s)}on(s,o){this.events[s]||(this.events[s]=new $c);const u=this.events[s].add(o);return s==="change"?()=>{u(),Lt.read(()=>{this.events.change.getSize()||this.stop()})}:u}clearListeners(){for(const s in this.events)this.events[s].clear()}attach(s,o){this.passiveEffect=s,this.stopPassiveEffect=o}set(s,o=!0){!o||!this.passiveEffect?this.updateAndNotify(s,o):this.passiveEffect(s,this.updateAndNotify)}setWithVelocity(s,o,u){this.set(o),this.prev=void 0,this.prevFrameValue=s,this.prevUpdatedAt=this.updatedAt-u}jump(s,o=!0){this.updateAndNotify(s),this.prev=s,this.prevUpdatedAt=this.prevFrameValue=void 0,o&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const s=gn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||s-this.updatedAt>jp)return 0;const o=Math.min(this.updatedAt-this.prevUpdatedAt,jp);return o0(parseFloat(this.current)-parseFloat(this.prevFrameValue),o)}start(s){return this.stop(),new Promise(o=>{this.hasAnimated=!0,this.animation=s(o),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Zs(i,s){return new Ob(i,s)}function Rb(i,s,o){i.hasValue(s)?i.getValue(s).set(o):i.addValue(s,Zs(o))}function zb(i,s){const o=Vo(i,s);let{transitionEnd:u={},transition:c={},...h}=o||{};h={...h,...u};for(const d in h){const y=ab(h[d]);Rb(i,d,y)}}function wb(i){return!!(xe(i)&&i.add)}function yc(i,s){const o=i.getValue("willChange");if(wb(o))return o.add(s)}function u0(i){return i.props[Zy]}function tf(i){let s;return()=>(s===void 0&&(s=i()),s)}const Vb=tf(()=>window.ScrollTimeline!==void 0);class Bb{constructor(s){this.stop=()=>this.runAll("stop"),this.animations=s.filter(Boolean)}get finished(){return Promise.all(this.animations.map(s=>"finished"in s?s.finished:s))}getAll(s){return this.animations[0][s]}setAll(s,o){for(let u=0;u<this.animations.length;u++)this.animations[u][s]=o}attachTimeline(s,o){const u=this.animations.map(c=>{if(Vb()&&c.attachTimeline)return c.attachTimeline(s);if(typeof o=="function")return o(c)});return()=>{u.forEach((c,h)=>{c&&c(),this.animations[h].stop()})}}get time(){return this.getAll("time")}set time(s){this.setAll("time",s)}get speed(){return this.getAll("speed")}set speed(s){this.setAll("speed",s)}get startTime(){return this.getAll("startTime")}get duration(){let s=0;for(let o=0;o<this.animations.length;o++)s=Math.max(s,this.animations[o].duration);return s}runAll(s){this.animations.forEach(o=>o[s]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Ub extends Bb{then(s,o){return Promise.all(this.animations).then(s).catch(o)}}const Ln=i=>i*1e3,kn=i=>i/1e3;function ef(i){return typeof i=="function"}function Mp(i,s){i.timeline=s,i.onfinish=null}const nf=i=>Array.isArray(i)&&typeof i[0]=="number",Lb={linearEasing:void 0};function kb(i,s){const o=tf(i);return()=>{var u;return(u=Lb[s])!==null&&u!==void 0?u:o()}}const Eo=kb(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ui=(i,s,o)=>{const u=s-i;return u===0?1:(o-i)/u},r0=(i,s,o=10)=>{let u="";const c=Math.max(Math.round(s/o),2);for(let h=0;h<c;h++)u+=i(Ui(0,c-1,h))+", ";return`linear(${u.substring(0,u.length-2)})`};function c0(i){return!!(typeof i=="function"&&Eo()||!i||typeof i=="string"&&(i in gc||Eo())||nf(i)||Array.isArray(i)&&i.every(c0))}const Bs=([i,s,o,u])=>`cubic-bezier(${i}, ${s}, ${o}, ${u})`,gc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Bs([0,.65,.55,1]),circOut:Bs([.55,0,1,.45]),backIn:Bs([.31,.01,.66,-.59]),backOut:Bs([.33,1.53,.69,.99])};function f0(i,s){if(i)return typeof i=="function"&&Eo()?r0(i,s):nf(i)?Bs(i):Array.isArray(i)?i.map(o=>f0(o,s)||gc.easeOut):gc[i]}const d0=(i,s,o)=>(((1-3*o+3*s)*i+(3*o-6*s))*i+3*s)*i,Hb=1e-7,qb=12;function Gb(i,s,o,u,c){let h,d,y=0;do d=s+(o-s)/2,h=d0(d,u,c)-i,h>0?o=d:s=d;while(Math.abs(h)>Hb&&++y<qb);return d}function Fs(i,s,o,u){if(i===s&&o===u)return Ze;const c=h=>Gb(h,0,1,i,o);return h=>h===0||h===1?h:d0(c(h),s,u)}const h0=i=>s=>s<=.5?i(2*s)/2:(2-i(2*(1-s)))/2,m0=i=>s=>1-i(1-s),p0=Fs(.33,1.53,.69,.99),af=m0(p0),y0=h0(af),g0=i=>(i*=2)<1?.5*af(i):.5*(2-Math.pow(2,-10*(i-1))),sf=i=>1-Math.sin(Math.acos(i)),v0=m0(sf),S0=h0(sf),b0=i=>/^0[^.\s]+$/u.test(i);function Yb(i){return typeof i=="number"?i===0:i!==null?i==="none"||i==="0"||b0(i):!0}const ks=i=>Math.round(i*1e5)/1e5,lf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Xb(i){return i==null}const Zb=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,of=(i,s)=>o=>!!(typeof o=="string"&&Zb.test(o)&&o.startsWith(i)||s&&!Xb(o)&&Object.prototype.hasOwnProperty.call(o,s)),T0=(i,s,o)=>u=>{if(typeof u!="string")return u;const[c,h,d,y]=u.match(lf);return{[i]:parseFloat(c),[s]:parseFloat(h),[o]:parseFloat(d),alpha:y!==void 0?parseFloat(y):1}},Kb=i=>Hn(0,255,i),ec={...Hi,transform:i=>Math.round(Kb(i))},ka={test:of("rgb","red"),parse:T0("red","green","blue"),transform:({red:i,green:s,blue:o,alpha:u=1})=>"rgba("+ec.transform(i)+", "+ec.transform(s)+", "+ec.transform(o)+", "+ks(Xs.transform(u))+")"};function Qb(i){let s="",o="",u="",c="";return i.length>5?(s=i.substring(1,3),o=i.substring(3,5),u=i.substring(5,7),c=i.substring(7,9)):(s=i.substring(1,2),o=i.substring(2,3),u=i.substring(3,4),c=i.substring(4,5),s+=s,o+=o,u+=u,c+=c),{red:parseInt(s,16),green:parseInt(o,16),blue:parseInt(u,16),alpha:c?parseInt(c,16)/255:1}}const vc={test:of("#"),parse:Qb,transform:ka.transform},Oi={test:of("hsl","hue"),parse:T0("hue","saturation","lightness"),transform:({hue:i,saturation:s,lightness:o,alpha:u=1})=>"hsla("+Math.round(i)+", "+yn.transform(ks(s))+", "+yn.transform(ks(o))+", "+ks(Xs.transform(u))+")"},Te={test:i=>ka.test(i)||vc.test(i)||Oi.test(i),parse:i=>ka.test(i)?ka.parse(i):Oi.test(i)?Oi.parse(i):vc.parse(i),transform:i=>typeof i=="string"?i:i.hasOwnProperty("red")?ka.transform(i):Oi.transform(i)},Jb=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Fb(i){var s,o;return isNaN(i)&&typeof i=="string"&&(((s=i.match(lf))===null||s===void 0?void 0:s.length)||0)+(((o=i.match(Jb))===null||o===void 0?void 0:o.length)||0)>0}const x0="number",_0="color",Pb="var",Wb="var(",Cp="${}",Ib=/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 Ks(i){const s=i.toString(),o=[],u={color:[],number:[],var:[]},c=[];let h=0;const y=s.replace(Ib,p=>(Te.test(p)?(u.color.push(h),c.push(_0),o.push(Te.parse(p))):p.startsWith(Wb)?(u.var.push(h),c.push(Pb),o.push(p)):(u.number.push(h),c.push(x0),o.push(parseFloat(p))),++h,Cp)).split(Cp);return{values:o,split:y,indexes:u,types:c}}function A0(i){return Ks(i).values}function E0(i){const{split:s,types:o}=Ks(i),u=s.length;return c=>{let h="";for(let d=0;d<u;d++)if(h+=s[d],c[d]!==void 0){const y=o[d];y===x0?h+=ks(c[d]):y===_0?h+=Te.transform(c[d]):h+=c[d]}return h}}const $b=i=>typeof i=="number"?0:i;function tT(i){const s=A0(i);return E0(i)(s.map($b))}const ma={test:Fb,parse:A0,createTransformer:E0,getAnimatableNone:tT},eT=new Set(["brightness","contrast","saturate","opacity"]);function nT(i){const[s,o]=i.slice(0,-1).split("(");if(s==="drop-shadow")return i;const[u]=o.match(lf)||[];if(!u)return i;const c=o.replace(u,"");let h=eT.has(s)?1:0;return u!==o&&(h*=100),s+"("+h+c+")"}const aT=/\b([a-z-]*)\(.*?\)/gu,Sc={...ma,getAnimatableNone:i=>{const s=i.match(aT);return s?s.map(nT).join(" "):i}},iT={...Xc,color:Te,backgroundColor:Te,outlineColor:Te,fill:Te,stroke:Te,borderColor:Te,borderTopColor:Te,borderRightColor:Te,borderBottomColor:Te,borderLeftColor:Te,filter:Sc,WebkitFilter:Sc},uf=i=>iT[i];function D0(i,s){let o=uf(i);return o!==Sc&&(o=ma),o.getAnimatableNone?o.getAnimatableNone(s):void 0}const sT=new Set(["auto","none","0"]);function lT(i,s,o){let u=0,c;for(;u<i.length&&!c;){const h=i[u];typeof h=="string"&&!sT.has(h)&&Ks(h).values.length&&(c=i[u]),u++}if(c&&o)for(const h of s)i[h]=D0(o,c)}const Np=i=>i===Hi||i===st,Op=(i,s)=>parseFloat(i.split(", ")[s]),Rp=(i,s)=>(o,{transform:u})=>{if(u==="none"||!u)return 0;const c=u.match(/^matrix3d\((.+)\)$/u);if(c)return Op(c[1],s);{const h=u.match(/^matrix\((.+)\)$/u);return h?Op(h[1],i):0}},oT=new Set(["x","y","z"]),uT=ki.filter(i=>!oT.has(i));function rT(i){const s=[];return uT.forEach(o=>{const u=i.getValue(o);u!==void 0&&(s.push([o,u.get()]),u.set(o.startsWith("scale")?1:0))}),s}const Li={width:({x:i},{paddingLeft:s="0",paddingRight:o="0"})=>i.max-i.min-parseFloat(s)-parseFloat(o),height:({y:i},{paddingTop:s="0",paddingBottom:o="0"})=>i.max-i.min-parseFloat(s)-parseFloat(o),top:(i,{top:s})=>parseFloat(s),left:(i,{left:s})=>parseFloat(s),bottom:({y:i},{top:s})=>parseFloat(s)+(i.max-i.min),right:({x:i},{left:s})=>parseFloat(s)+(i.max-i.min),x:Rp(4,13),y:Rp(5,14)};Li.translateX=Li.x;Li.translateY=Li.y;const Ha=new Set;let bc=!1,Tc=!1;function j0(){if(Tc){const i=Array.from(Ha).filter(u=>u.needsMeasurement),s=new Set(i.map(u=>u.element)),o=new Map;s.forEach(u=>{const c=rT(u);c.length&&(o.set(u,c),u.render())}),i.forEach(u=>u.measureInitialState()),s.forEach(u=>{u.render();const c=o.get(u);c&&c.forEach(([h,d])=>{var y;(y=u.getValue(h))===null||y===void 0||y.set(d)})}),i.forEach(u=>u.measureEndState()),i.forEach(u=>{u.suspendedScrollY!==void 0&&window.scrollTo(0,u.suspendedScrollY)})}Tc=!1,bc=!1,Ha.forEach(i=>i.complete()),Ha.clear()}function M0(){Ha.forEach(i=>{i.readKeyframes(),i.needsMeasurement&&(Tc=!0)})}function cT(){M0(),j0()}class rf{constructor(s,o,u,c,h,d=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...s],this.onComplete=o,this.name=u,this.motionValue=c,this.element=h,this.isAsync=d}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ha.add(this),bc||(bc=!0,Lt.read(M0),Lt.resolveKeyframes(j0))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:s,name:o,element:u,motionValue:c}=this;for(let h=0;h<s.length;h++)if(s[h]===null)if(h===0){const d=c==null?void 0:c.get(),y=s[s.length-1];if(d!==void 0)s[0]=d;else if(u&&o){const p=u.readValue(o,y);p!=null&&(s[0]=p)}s[0]===void 0&&(s[0]=y),c&&d===void 0&&c.set(s[0])}else s[h]=s[h-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ha.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ha.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const C0=i=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(i),fT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function dT(i){const s=fT.exec(i);if(!s)return[,];const[,o,u,c]=s;return[`--${o??u}`,c]}function N0(i,s,o=1){const[u,c]=dT(i);if(!u)return;const h=window.getComputedStyle(s).getPropertyValue(u);if(h){const d=h.trim();return C0(d)?parseFloat(d):d}return Yc(c)?N0(c,s,o+1):c}const O0=i=>s=>s.test(i),hT={test:i=>i==="auto",parse:i=>i},R0=[Hi,st,yn,da,rb,ub,hT],zp=i=>R0.find(O0(i));class z0 extends rf{constructor(s,o,u,c,h){super(s,o,u,c,h,!0)}readKeyframes(){const{unresolvedKeyframes:s,element:o,name:u}=this;if(!o||!o.current)return;super.readKeyframes();for(let p=0;p<s.length;p++){let m=s[p];if(typeof m=="string"&&(m=m.trim(),Yc(m))){const v=N0(m,o.current);v!==void 0&&(s[p]=v),p===s.length-1&&(this.finalKeyframe=m)}}if(this.resolveNoneKeyframes(),!l0.has(u)||s.length!==2)return;const[c,h]=s,d=zp(c),y=zp(h);if(d!==y)if(Np(d)&&Np(y))for(let p=0;p<s.length;p++){const m=s[p];typeof m=="string"&&(s[p]=parseFloat(m))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:s,name:o}=this,u=[];for(let c=0;c<s.length;c++)Yb(s[c])&&u.push(c);u.length&&lT(s,u,o)}measureInitialState(){const{element:s,unresolvedKeyframes:o,name:u}=this;if(!s||!s.current)return;u==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Li[u](s.measureViewportBox(),window.getComputedStyle(s.current)),o[0]=this.measuredOrigin;const c=o[o.length-1];c!==void 0&&s.getValue(u,c).jump(c,!1)}measureEndState(){var s;const{element:o,name:u,unresolvedKeyframes:c}=this;if(!o||!o.current)return;const h=o.getValue(u);h&&h.jump(this.measuredOrigin,!1);const d=c.length-1,y=c[d];c[d]=Li[u](o.measureViewportBox(),window.getComputedStyle(o.current)),y!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=y),!((s=this.removedTransforms)===null||s===void 0)&&s.length&&this.removedTransforms.forEach(([p,m])=>{o.getValue(p).set(m)}),this.resolveNoneKeyframes()}}const wp=(i,s)=>s==="zIndex"?!1:!!(typeof i=="number"||Array.isArray(i)||typeof i=="string"&&(ma.test(i)||i==="0")&&!i.startsWith("url("));function mT(i){const s=i[0];if(i.length===1)return!0;for(let o=0;o<i.length;o++)if(i[o]!==s)return!0}function pT(i,s,o,u){const c=i[0];if(c===null)return!1;if(s==="display"||s==="visibility")return!0;const h=i[i.length-1],d=wp(c,s),y=wp(h,s);return!d||!y?!1:mT(i)||(o==="spring"||ef(o))&&u}const yT=i=>i!==null;function Bo(i,{repeat:s,repeatType:o="loop"},u){const c=i.filter(yT),h=s&&o!=="loop"&&s%2===1?0:c.length-1;return!h||u===void 0?c[h]:u}const gT=40;class w0{constructor({autoplay:s=!0,delay:o=0,type:u="keyframes",repeat:c=0,repeatDelay:h=0,repeatType:d="loop",...y}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=gn.now(),this.options={autoplay:s,delay:o,type:u,repeat:c,repeatDelay:h,repeatType:d,...y},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>gT?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&cT(),this._resolved}onKeyframesResolved(s,o){this.resolvedAt=gn.now(),this.hasAttemptedResolve=!0;const{name:u,type:c,velocity:h,delay:d,onComplete:y,onUpdate:p,isGenerator:m}=this.options;if(!m&&!pT(s,u,c,h))if(d)this.options.duration=0;else{p&&p(Bo(s,this.options,o)),y&&y(),this.resolveFinishedPromise();return}const v=this.initPlayback(s,o);v!==!1&&(this._resolved={keyframes:s,finalKeyframe:o,...v},this.onPostResolved())}onPostResolved(){}then(s,o){return this.currentFinishedPromise.then(s,o)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(s=>{this.resolveFinishedPromise=s})}}const xc=2e4;function V0(i){let s=0;const o=50;let u=i.next(s);for(;!u.done&&s<xc;)s+=o,u=i.next(s);return s>=xc?1/0:s}const Xt=(i,s,o)=>i+(s-i)*o;function nc(i,s,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?i+(s-i)*6*o:o<1/2?s:o<2/3?i+(s-i)*(2/3-o)*6:i}function vT({hue:i,saturation:s,lightness:o,alpha:u}){i/=360,s/=100,o/=100;let c=0,h=0,d=0;if(!s)c=h=d=o;else{const y=o<.5?o*(1+s):o+s-o*s,p=2*o-y;c=nc(p,y,i+1/3),h=nc(p,y,i),d=nc(p,y,i-1/3)}return{red:Math.round(c*255),green:Math.round(h*255),blue:Math.round(d*255),alpha:u}}function Do(i,s){return o=>o>0?s:i}const ac=(i,s,o)=>{const u=i*i,c=o*(s*s-u)+u;return c<0?0:Math.sqrt(c)},ST=[vc,ka,Oi],bT=i=>ST.find(s=>s.test(i));function Vp(i){const s=bT(i);if(!s)return!1;let o=s.parse(i);return s===Oi&&(o=vT(o)),o}const Bp=(i,s)=>{const o=Vp(i),u=Vp(s);if(!o||!u)return Do(i,s);const c={...o};return h=>(c.red=ac(o.red,u.red,h),c.green=ac(o.green,u.green,h),c.blue=ac(o.blue,u.blue,h),c.alpha=Xt(o.alpha,u.alpha,h),ka.transform(c))},TT=(i,s)=>o=>s(i(o)),Ps=(...i)=>i.reduce(TT),_c=new Set(["none","hidden"]);function xT(i,s){return _c.has(i)?o=>o<=0?i:s:o=>o>=1?s:i}function _T(i,s){return o=>Xt(i,s,o)}function cf(i){return typeof i=="number"?_T:typeof i=="string"?Yc(i)?Do:Te.test(i)?Bp:DT:Array.isArray(i)?B0:typeof i=="object"?Te.test(i)?Bp:AT:Do}function B0(i,s){const o=[...i],u=o.length,c=i.map((h,d)=>cf(h)(h,s[d]));return h=>{for(let d=0;d<u;d++)o[d]=c[d](h);return o}}function AT(i,s){const o={...i,...s},u={};for(const c in o)i[c]!==void 0&&s[c]!==void 0&&(u[c]=cf(i[c])(i[c],s[c]));return c=>{for(const h in u)o[h]=u[h](c);return o}}function ET(i,s){var o;const u=[],c={color:0,var:0,number:0};for(let h=0;h<s.values.length;h++){const d=s.types[h],y=i.indexes[d][c[d]],p=(o=i.values[y])!==null&&o!==void 0?o:0;u[h]=p,c[d]++}return u}const DT=(i,s)=>{const o=ma.createTransformer(s),u=Ks(i),c=Ks(s);return u.indexes.var.length===c.indexes.var.length&&u.indexes.color.length===c.indexes.color.length&&u.indexes.number.length>=c.indexes.number.length?_c.has(i)&&!c.values.length||_c.has(s)&&!u.values.length?xT(i,s):Ps(B0(ET(u,c),c.values),o):Do(i,s)};function U0(i,s,o){return typeof i=="number"&&typeof s=="number"&&typeof o=="number"?Xt(i,s,o):cf(i)(i,s)}const jT=5;function L0(i,s,o){const u=Math.max(s-jT,0);return o0(o-i(u),s-u)}const Qt={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},ic=.001;function MT({duration:i=Qt.duration,bounce:s=Qt.bounce,velocity:o=Qt.velocity,mass:u=Qt.mass}){let c,h,d=1-s;d=Hn(Qt.minDamping,Qt.maxDamping,d),i=Hn(Qt.minDuration,Qt.maxDuration,kn(i)),d<1?(c=m=>{const v=m*d,S=v*i,b=v-o,M=Ac(m,d),L=Math.exp(-S);return ic-b/M*L},h=m=>{const S=m*d*i,b=S*o+o,M=Math.pow(d,2)*Math.pow(m,2)*i,L=Math.exp(-S),z=Ac(Math.pow(m,2),d);return(-c(m)+ic>0?-1:1)*((b-M)*L)/z}):(c=m=>{const v=Math.exp(-m*i),S=(m-o)*i+1;return-ic+v*S},h=m=>{const v=Math.exp(-m*i),S=(o-m)*(i*i);return v*S});const y=5/i,p=NT(c,h,y);if(i=Ln(i),isNaN(p))return{stiffness:Qt.stiffness,damping:Qt.damping,duration:i};{const m=Math.pow(p,2)*u;return{stiffness:m,damping:d*2*Math.sqrt(u*m),duration:i}}}const CT=12;function NT(i,s,o){let u=o;for(let c=1;c<CT;c++)u=u-i(u)/s(u);return u}function Ac(i,s){return i*Math.sqrt(1-s*s)}const OT=["duration","bounce"],RT=["stiffness","damping","mass"];function Up(i,s){return s.some(o=>i[o]!==void 0)}function zT(i){let s={velocity:Qt.velocity,stiffness:Qt.stiffness,damping:Qt.damping,mass:Qt.mass,isResolvedFromDuration:!1,...i};if(!Up(i,RT)&&Up(i,OT))if(i.visualDuration){const o=i.visualDuration,u=2*Math.PI/(o*1.2),c=u*u,h=2*Hn(.05,1,1-(i.bounce||0))*Math.sqrt(c);s={...s,mass:Qt.mass,stiffness:c,damping:h}}else{const o=MT(i);s={...s,...o,mass:Qt.mass},s.isResolvedFromDuration=!0}return s}function k0(i=Qt.visualDuration,s=Qt.bounce){const o=typeof i!="object"?{visualDuration:i,keyframes:[0,1],bounce:s}:i;let{restSpeed:u,restDelta:c}=o;const h=o.keyframes[0],d=o.keyframes[o.keyframes.length-1],y={done:!1,value:h},{stiffness:p,damping:m,mass:v,duration:S,velocity:b,isResolvedFromDuration:M}=zT({...o,velocity:-kn(o.velocity||0)}),L=b||0,z=m/(2*Math.sqrt(p*v)),O=d-h,k=kn(Math.sqrt(p/v)),Y=Math.abs(O)<5;u||(u=Y?Qt.restSpeed.granular:Qt.restSpeed.default),c||(c=Y?Qt.restDelta.granular:Qt.restDelta.default);let G;if(z<1){const B=Ac(k,z);G=Z=>{const Q=Math.exp(-z*k*Z);return d-Q*((L+z*k*O)/B*Math.sin(B*Z)+O*Math.cos(B*Z))}}else if(z===1)G=B=>d-Math.exp(-k*B)*(O+(L+k*O)*B);else{const B=k*Math.sqrt(z*z-1);G=Z=>{const Q=Math.exp(-z*k*Z),C=Math.min(B*Z,300);return d-Q*((L+z*k*O)*Math.sinh(C)+B*O*Math.cosh(C))/B}}const J={calculatedDuration:M&&S||null,next:B=>{const Z=G(B);if(M)y.done=B>=S;else{let Q=0;z<1&&(Q=B===0?Ln(L):L0(G,B,Z));const C=Math.abs(Q)<=u,K=Math.abs(d-Z)<=c;y.done=C&&K}return y.value=y.done?d:Z,y},toString:()=>{const B=Math.min(V0(J),xc),Z=r0(Q=>J.next(B*Q).value,B,30);return B+"ms "+Z}};return J}function Lp({keyframes:i,velocity:s=0,power:o=.8,timeConstant:u=325,bounceDamping:c=10,bounceStiffness:h=500,modifyTarget:d,min:y,max:p,restDelta:m=.5,restSpeed:v}){const S=i[0],b={done:!1,value:S},M=C=>y!==void 0&&C<y||p!==void 0&&C>p,L=C=>y===void 0?p:p===void 0||Math.abs(y-C)<Math.abs(p-C)?y:p;let z=o*s;const O=S+z,k=d===void 0?O:d(O);k!==O&&(z=k-S);const Y=C=>-z*Math.exp(-C/u),G=C=>k+Y(C),J=C=>{const K=Y(C),lt=G(C);b.done=Math.abs(K)<=m,b.value=b.done?k:lt};let B,Z;const Q=C=>{M(b.value)&&(B=C,Z=k0({keyframes:[b.value,L(b.value)],velocity:L0(G,C,b.value),damping:c,stiffness:h,restDelta:m,restSpeed:v}))};return Q(0),{calculatedDuration:null,next:C=>{let K=!1;return!Z&&B===void 0&&(K=!0,J(C),Q(C)),B!==void 0&&C>=B?Z.next(C-B):(!K&&J(C),b)}}}const wT=Fs(.42,0,1,1),VT=Fs(0,0,.58,1),H0=Fs(.42,0,.58,1),BT=i=>Array.isArray(i)&&typeof i[0]!="number",UT={linear:Ze,easeIn:wT,easeInOut:H0,easeOut:VT,circIn:sf,circInOut:S0,circOut:v0,backIn:af,backInOut:y0,backOut:p0,anticipate:g0},kp=i=>{if(nf(i)){Hy(i.length===4);const[s,o,u,c]=i;return Fs(s,o,u,c)}else if(typeof i=="string")return UT[i];return i};function LT(i,s,o){const u=[],c=o||U0,h=i.length-1;for(let d=0;d<h;d++){let y=c(i[d],i[d+1]);if(s){const p=Array.isArray(s)?s[d]||Ze:s;y=Ps(p,y)}u.push(y)}return u}function kT(i,s,{clamp:o=!0,ease:u,mixer:c}={}){const h=i.length;if(Hy(h===s.length),h===1)return()=>s[0];if(h===2&&s[0]===s[1])return()=>s[1];const d=i[0]===i[1];i[0]>i[h-1]&&(i=[...i].reverse(),s=[...s].reverse());const y=LT(s,u,c),p=y.length,m=v=>{if(d&&v<i[0])return s[0];let S=0;if(p>1)for(;S<i.length-2&&!(v<i[S+1]);S++);const b=Ui(i[S],i[S+1],v);return y[S](b)};return o?v=>m(Hn(i[0],i[h-1],v)):m}function HT(i,s){const o=i[i.length-1];for(let u=1;u<=s;u++){const c=Ui(0,s,u);i.push(Xt(o,1,c))}}function qT(i){const s=[0];return HT(s,i.length-1),s}function GT(i,s){return i.map(o=>o*s)}function YT(i,s){return i.map(()=>s||H0).splice(0,i.length-1)}function jo({duration:i=300,keyframes:s,times:o,ease:u="easeInOut"}){const c=BT(u)?u.map(kp):kp(u),h={done:!1,value:s[0]},d=GT(o&&o.length===s.length?o:qT(s),i),y=kT(d,s,{ease:Array.isArray(c)?c:YT(s,c)});return{calculatedDuration:i,next:p=>(h.value=y(p),h.done=p>=i,h)}}const XT=i=>{const s=({timestamp:o})=>i(o);return{start:()=>Lt.update(s,!0),stop:()=>ha(s),now:()=>Se.isProcessing?Se.timestamp:gn.now()}},ZT={decay:Lp,inertia:Lp,tween:jo,keyframes:jo,spring:k0},KT=i=>i/100;class ff extends w0{constructor(s){super(s),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:p}=this.options;p&&p()};const{name:o,motionValue:u,element:c,keyframes:h}=this.options,d=(c==null?void 0:c.KeyframeResolver)||rf,y=(p,m)=>this.onKeyframesResolved(p,m);this.resolver=new d(h,y,o,u,c),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(s){const{type:o="keyframes",repeat:u=0,repeatDelay:c=0,repeatType:h,velocity:d=0}=this.options,y=ef(o)?o:ZT[o]||jo;let p,m;y!==jo&&typeof s[0]!="number"&&(p=Ps(KT,U0(s[0],s[1])),s=[0,100]);const v=y({...this.options,keyframes:s});h==="mirror"&&(m=y({...this.options,keyframes:[...s].reverse(),velocity:-d})),v.calculatedDuration===null&&(v.calculatedDuration=V0(v));const{calculatedDuration:S}=v,b=S+c,M=b*(u+1)-c;return{generator:v,mirroredGenerator:m,mapPercentToKeyframes:p,calculatedDuration:S,resolvedDuration:b,totalDuration:M}}onPostResolved(){const{autoplay:s=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!s?this.pause():this.state=this.pendingPlayState}tick(s,o=!1){const{resolved:u}=this;if(!u){const{keyframes:C}=this.options;return{done:!0,value:C[C.length-1]}}const{finalKeyframe:c,generator:h,mirroredGenerator:d,mapPercentToKeyframes:y,keyframes:p,calculatedDuration:m,totalDuration:v,resolvedDuration:S}=u;if(this.startTime===null)return h.next(0);const{delay:b,repeat:M,repeatType:L,repeatDelay:z,onUpdate:O}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,s):this.speed<0&&(this.startTime=Math.min(s-v/this.speed,this.startTime)),o?this.currentTime=s:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(s-this.startTime)*this.speed;const k=this.currentTime-b*(this.speed>=0?1:-1),Y=this.speed>=0?k<0:k>v;this.currentTime=Math.max(k,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=v);let G=this.currentTime,J=h;if(M){const C=Math.min(this.currentTime,v)/S;let K=Math.floor(C),lt=C%1;!lt&&C>=1&&(lt=1),lt===1&&K--,K=Math.min(K,M+1),!!(K%2)&&(L==="reverse"?(lt=1-lt,z&&(lt-=z/S)):L==="mirror"&&(J=d)),G=Hn(0,1,lt)*S}const B=Y?{done:!1,value:p[0]}:J.next(G);y&&(B.value=y(B.value));let{done:Z}=B;!Y&&m!==null&&(Z=this.speed>=0?this.currentTime>=v:this.currentTime<=0);const Q=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&Z);return Q&&c!==void 0&&(B.value=Bo(p,this.options,c)),O&&O(B.value),Q&&this.finish(),B}get duration(){const{resolved:s}=this;return s?kn(s.calculatedDuration):0}get time(){return kn(this.currentTime)}set time(s){s=Ln(s),this.currentTime=s,this.holdTime!==null||this.speed===0?this.holdTime=s:this.driver&&(this.startTime=this.driver.now()-s/this.speed)}get speed(){return this.playbackSpeed}set speed(s){const o=this.playbackSpeed!==s;this.playbackSpeed=s,o&&(this.time=kn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:s=XT,onPlay:o,startTime:u}=this.options;this.driver||(this.driver=s(h=>this.tick(h))),o&&o();const c=this.driver.now();this.holdTime!==null?this.startTime=c-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=c):this.startTime=u??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var s;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(s=this.currentTime)!==null&&s!==void 0?s:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:s}=this.options;s&&s()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(s){return this.startTime=0,this.tick(s,!0)}}const QT=new Set(["opacity","clipPath","filter","transform"]);function JT(i,s,o,{delay:u=0,duration:c=300,repeat:h=0,repeatType:d="loop",ease:y="easeInOut",times:p}={}){const m={[s]:o};p&&(m.offset=p);const v=f0(y,c);return Array.isArray(v)&&(m.easing=v),i.animate(m,{delay:u,duration:c,easing:Array.isArray(v)?"linear":v,fill:"both",iterations:h+1,direction:d==="reverse"?"alternate":"normal"})}const FT=tf(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Mo=10,PT=2e4;function WT(i){return ef(i.type)||i.type==="spring"||!c0(i.ease)}function IT(i,s){const o=new ff({...s,keyframes:i,repeat:0,delay:0,isGenerator:!0});let u={done:!1,value:i[0]};const c=[];let h=0;for(;!u.done&&h<PT;)u=o.sample(h),c.push(u.value),h+=Mo;return{times:void 0,keyframes:c,duration:h-Mo,ease:"linear"}}const q0={anticipate:g0,backInOut:y0,circInOut:S0};function $T(i){return i in q0}class Hp extends w0{constructor(s){super(s);const{name:o,motionValue:u,element:c,keyframes:h}=this.options;this.resolver=new z0(h,(d,y)=>this.onKeyframesResolved(d,y),o,u,c),this.resolver.scheduleResolve()}initPlayback(s,o){let{duration:u=300,times:c,ease:h,type:d,motionValue:y,name:p,startTime:m}=this.options;if(!y.owner||!y.owner.current)return!1;if(typeof h=="string"&&Eo()&&$T(h)&&(h=q0[h]),WT(this.options)){const{onComplete:S,onUpdate:b,motionValue:M,element:L,...z}=this.options,O=IT(s,z);s=O.keyframes,s.length===1&&(s[1]=s[0]),u=O.duration,c=O.times,h=O.ease,d="keyframes"}const v=JT(y.owner.current,p,s,{...this.options,duration:u,times:c,ease:h});return v.startTime=m??this.calcStartTime(),this.pendingTimeline?(Mp(v,this.pendingTimeline),this.pendingTimeline=void 0):v.onfinish=()=>{const{onComplete:S}=this.options;y.set(Bo(s,this.options,o)),S&&S(),this.cancel(),this.resolveFinishedPromise()},{animation:v,duration:u,times:c,type:d,ease:h,keyframes:s}}get duration(){const{resolved:s}=this;if(!s)return 0;const{duration:o}=s;return kn(o)}get time(){const{resolved:s}=this;if(!s)return 0;const{animation:o}=s;return kn(o.currentTime||0)}set time(s){const{resolved:o}=this;if(!o)return;const{animation:u}=o;u.currentTime=Ln(s)}get speed(){const{resolved:s}=this;if(!s)return 1;const{animation:o}=s;return o.playbackRate}set speed(s){const{resolved:o}=this;if(!o)return;const{animation:u}=o;u.playbackRate=s}get state(){const{resolved:s}=this;if(!s)return"idle";const{animation:o}=s;return o.playState}get startTime(){const{resolved:s}=this;if(!s)return null;const{animation:o}=s;return o.startTime}attachTimeline(s){if(!this._resolved)this.pendingTimeline=s;else{const{resolved:o}=this;if(!o)return Ze;const{animation:u}=o;Mp(u,s)}return Ze}play(){if(this.isStopped)return;const{resolved:s}=this;if(!s)return;const{animation:o}=s;o.playState==="finished"&&this.updateFinishedPromise(),o.play()}pause(){const{resolved:s}=this;if(!s)return;const{animation:o}=s;o.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:s}=this;if(!s)return;const{animation:o,keyframes:u,duration:c,type:h,ease:d,times:y}=s;if(o.playState==="idle"||o.playState==="finished")return;if(this.time){const{motionValue:m,onUpdate:v,onComplete:S,element:b,...M}=this.options,L=new ff({...M,keyframes:u,duration:c,type:h,ease:d,times:y,isGenerator:!0}),z=Ln(this.time);m.setWithVelocity(L.sample(z-Mo).value,L.sample(z).value,Mo)}const{onStop:p}=this.options;p&&p(),this.cancel()}complete(){const{resolved:s}=this;s&&s.animation.finish()}cancel(){const{resolved:s}=this;s&&s.animation.cancel()}static supports(s){const{motionValue:o,name:u,repeatDelay:c,repeatType:h,damping:d,type:y}=s;if(!o||!o.owner||!(o.owner.current instanceof HTMLElement))return!1;const{onUpdate:p,transformTemplate:m}=o.owner.getProps();return FT()&&u&&QT.has(u)&&!p&&!m&&!c&&h!=="mirror"&&d!==0&&y!=="inertia"}}const t2={type:"spring",stiffness:500,damping:25,restSpeed:10},e2=i=>({type:"spring",stiffness:550,damping:i===0?2*Math.sqrt(550):30,restSpeed:10}),n2={type:"keyframes",duration:.8},a2={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},i2=(i,{keyframes:s})=>s.length>2?n2:Ga.has(i)?i.startsWith("scale")?e2(s[1]):t2:a2;function s2({when:i,delay:s,delayChildren:o,staggerChildren:u,staggerDirection:c,repeat:h,repeatType:d,repeatDelay:y,from:p,elapsed:m,...v}){return!!Object.keys(v).length}const df=(i,s,o,u={},c,h)=>d=>{const y=Pc(u,i)||{},p=y.delay||u.delay||0;let{elapsed:m=0}=u;m=m-Ln(p);let v={keyframes:Array.isArray(o)?o:[null,o],ease:"easeOut",velocity:s.getVelocity(),...y,delay:-m,onUpdate:b=>{s.set(b),y.onUpdate&&y.onUpdate(b)},onComplete:()=>{d(),y.onComplete&&y.onComplete()},name:i,motionValue:s,element:h?void 0:c};s2(y)||(v={...v,...i2(i,v)}),v.duration&&(v.duration=Ln(v.duration)),v.repeatDelay&&(v.repeatDelay=Ln(v.repeatDelay)),v.from!==void 0&&(v.keyframes[0]=v.from);let S=!1;if((v.type===!1||v.duration===0&&!v.repeatDelay)&&(v.duration=0,v.delay===0&&(S=!0)),S&&!h&&s.get()!==void 0){const b=Bo(v.keyframes,y);if(b!==void 0)return Lt.update(()=>{v.onUpdate(b),v.onComplete()}),new Ub([])}return!h&&Hp.supports(v)?new Hp(v):new ff(v)};function l2({protectedKeys:i,needsAnimating:s},o){const u=i.hasOwnProperty(o)&&s[o]!==!0;return s[o]=!1,u}function G0(i,s,{delay:o=0,transitionOverride:u,type:c}={}){var h;let{transition:d=i.getDefaultTransition(),transitionEnd:y,...p}=s;u&&(d=u);const m=[],v=c&&i.animationState&&i.animationState.getState()[c];for(const S in p){const b=i.getValue(S,(h=i.latestValues[S])!==null&&h!==void 0?h:null),M=p[S];if(M===void 0||v&&l2(v,S))continue;const L={delay:o,...Pc(d||{},S)};let z=!1;if(window.MotionHandoffAnimation){const k=u0(i);if(k){const Y=window.MotionHandoffAnimation(k,S,Lt);Y!==null&&(L.startTime=Y,z=!0)}}yc(i,S),b.start(df(S,b,M,i.shouldReduceMotion&&l0.has(S)?{type:!1}:L,i,z));const O=b.animation;O&&m.push(O)}return y&&Promise.all(m).then(()=>{Lt.update(()=>{y&&zb(i,y)})}),m}function Ec(i,s,o={}){var u;const c=Vo(i,s,o.type==="exit"?(u=i.presenceContext)===null||u===void 0?void 0:u.custom:void 0);let{transition:h=i.getDefaultTransition()||{}}=c||{};o.transitionOverride&&(h=o.transitionOverride);const d=c?()=>Promise.all(G0(i,c,o)):()=>Promise.resolve(),y=i.variantChildren&&i.variantChildren.size?(m=0)=>{const{delayChildren:v=0,staggerChildren:S,staggerDirection:b}=h;return o2(i,s,v+m,S,b,o)}:()=>Promise.resolve(),{when:p}=h;if(p){const[m,v]=p==="beforeChildren"?[d,y]:[y,d];return m().then(()=>v())}else return Promise.all([d(),y(o.delay)])}function o2(i,s,o=0,u=0,c=1,h){const d=[],y=(i.variantChildren.size-1)*u,p=c===1?(m=0)=>m*u:(m=0)=>y-m*u;return Array.from(i.variantChildren).sort(u2).forEach((m,v)=>{m.notify("AnimationStart",s),d.push(Ec(m,s,{...h,delay:o+p(v)}).then(()=>m.notify("AnimationComplete",s)))}),Promise.all(d)}function u2(i,s){return i.sortNodePosition(s)}function r2(i,s,o={}){i.notify("AnimationStart",s);let u;if(Array.isArray(s)){const c=s.map(h=>Ec(i,h,o));u=Promise.all(c)}else if(typeof s=="string")u=Ec(i,s,o);else{const c=typeof s=="function"?Vo(i,s,o.custom):s;u=Promise.all(G0(i,c,o))}return u.then(()=>{i.notify("AnimationComplete",s)})}const c2=Lc.length;function Y0(i){if(!i)return;if(!i.isControllingVariants){const o=i.parent?Y0(i.parent)||{}:{};return i.props.initial!==void 0&&(o.initial=i.props.initial),o}const s={};for(let o=0;o<c2;o++){const u=Lc[o],c=i.props[u];(Ys(c)||c===!1)&&(s[u]=c)}return s}const f2=[...Uc].reverse(),d2=Uc.length;function h2(i){return s=>Promise.all(s.map(({animation:o,options:u})=>r2(i,o,u)))}function m2(i){let s=h2(i),o=qp(),u=!0;const c=p=>(m,v)=>{var S;const b=Vo(i,v,p==="exit"?(S=i.presenceContext)===null||S===void 0?void 0:S.custom:void 0);if(b){const{transition:M,transitionEnd:L,...z}=b;m={...m,...z,...L}}return m};function h(p){s=p(i)}function d(p){const{props:m}=i,v=Y0(i.parent)||{},S=[],b=new Set;let M={},L=1/0;for(let O=0;O<d2;O++){const k=f2[O],Y=o[k],G=m[k]!==void 0?m[k]:v[k],J=Ys(G),B=k===p?Y.isActive:null;B===!1&&(L=O);let Z=G===v[k]&&G!==m[k]&&J;if(Z&&u&&i.manuallyAnimateOnMount&&(Z=!1),Y.protectedKeys={...M},!Y.isActive&&B===null||!G&&!Y.prevProp||zo(G)||typeof G=="boolean")continue;const Q=p2(Y.prevProp,G);let C=Q||k===p&&Y.isActive&&!Z&&J||O>L&&J,K=!1;const lt=Array.isArray(G)?G:[G];let gt=lt.reduce(c(k),{});B===!1&&(gt={});const{prevResolvedValues:ot={}}=Y,ut={...ot,...gt},wt=X=>{C=!0,b.has(X)&&(K=!0,b.delete(X)),Y.needsAnimating[X]=!0;const W=i.getValue(X);W&&(W.liveStyle=!1)};for(const X in ut){const W=gt[X],bt=ot[X];if(M.hasOwnProperty(X))continue;let Tt=!1;pc(W)&&pc(bt)?Tt=!s0(W,bt):Tt=W!==bt,Tt?W!=null?wt(X):b.add(X):W!==void 0&&b.has(X)?wt(X):Y.protectedKeys[X]=!0}Y.prevProp=G,Y.prevResolvedValues=gt,Y.isActive&&(M={...M,...gt}),u&&i.blockInitialAnimation&&(C=!1),C&&(!(Z&&Q)||K)&&S.push(...lt.map(X=>({animation:X,options:{type:k}})))}if(b.size){const O={};b.forEach(k=>{const Y=i.getBaseTarget(k),G=i.getValue(k);G&&(G.liveStyle=!0),O[k]=Y??null}),S.push({animation:O})}let z=!!S.length;return u&&(m.initial===!1||m.initial===m.animate)&&!i.manuallyAnimateOnMount&&(z=!1),u=!1,z?s(S):Promise.resolve()}function y(p,m){var v;if(o[p].isActive===m)return Promise.resolve();(v=i.variantChildren)===null||v===void 0||v.forEach(b=>{var M;return(M=b.animationState)===null||M===void 0?void 0:M.setActive(p,m)}),o[p].isActive=m;const S=d(p);for(const b in o)o[b].protectedKeys={};return S}return{animateChanges:d,setActive:y,setAnimateFunction:h,getState:()=>o,reset:()=>{o=qp(),u=!0}}}function p2(i,s){return typeof s=="string"?s!==i:Array.isArray(s)?!s0(s,i):!1}function Va(i=!1){return{isActive:i,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function qp(){return{animate:Va(!0),whileInView:Va(),whileHover:Va(),whileTap:Va(),whileDrag:Va(),whileFocus:Va(),exit:Va()}}class pa{constructor(s){this.isMounted=!1,this.node=s}update(){}}class y2 extends pa{constructor(s){super(s),s.animationState||(s.animationState=m2(s))}updateAnimationControlsSubscription(){const{animate:s}=this.node.getProps();zo(s)&&(this.unmountControls=s.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:s}=this.node.getProps(),{animate:o}=this.node.prevProps||{};s!==o&&this.updateAnimationControlsSubscription()}unmount(){var s;this.node.animationState.reset(),(s=this.unmountControls)===null||s===void 0||s.call(this)}}let g2=0;class v2 extends pa{constructor(){super(...arguments),this.id=g2++}update(){if(!this.node.presenceContext)return;const{isPresent:s,onExitComplete:o}=this.node.presenceContext,{isPresent:u}=this.node.prevPresenceContext||{};if(!this.node.animationState||s===u)return;const c=this.node.animationState.setActive("exit",!s);o&&!s&&c.then(()=>o(this.id))}mount(){const{register:s}=this.node.presenceContext||{};s&&(this.unmount=s(this.id))}unmount(){}}const S2={animation:{Feature:y2},exit:{Feature:v2}},rn={x:!1,y:!1};function X0(){return rn.x||rn.y}function b2(i){return i==="x"||i==="y"?rn[i]?null:(rn[i]=!0,()=>{rn[i]=!1}):rn.x||rn.y?null:(rn.x=rn.y=!0,()=>{rn.x=rn.y=!1})}const hf=i=>i.pointerType==="mouse"?typeof i.button!="number"||i.button<=0:i.isPrimary!==!1;function Qs(i,s,o,u={passive:!0}){return i.addEventListener(s,o,u),()=>i.removeEventListener(s,o)}function Ws(i){return{point:{x:i.pageX,y:i.pageY}}}const T2=i=>s=>hf(s)&&i(s,Ws(s));function Hs(i,s,o,u){return Qs(i,s,T2(o),u)}const Gp=(i,s)=>Math.abs(i-s);function x2(i,s){const o=Gp(i.x,s.x),u=Gp(i.y,s.y);return Math.sqrt(o**2+u**2)}class Z0{constructor(s,o,{transformPagePoint:u,contextWindow:c,dragSnapToOrigin:h=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=lc(this.lastMoveEventInfo,this.history),b=this.startEvent!==null,M=x2(S.offset,{x:0,y:0})>=3;if(!b&&!M)return;const{point:L}=S,{timestamp:z}=Se;this.history.push({...L,timestamp:z});const{onStart:O,onMove:k}=this.handlers;b||(O&&O(this.lastMoveEvent,S),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,S)},this.handlePointerMove=(S,b)=>{this.lastMoveEvent=S,this.lastMoveEventInfo=sc(b,this.transformPagePoint),Lt.update(this.updatePoint,!0)},this.handlePointerUp=(S,b)=>{this.end();const{onEnd:M,onSessionEnd:L,resumeAnimation:z}=this.handlers;if(this.dragSnapToOrigin&&z&&z(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const O=lc(S.type==="pointercancel"?this.lastMoveEventInfo:sc(b,this.transformPagePoint),this.history);this.startEvent&&M&&M(S,O),L&&L(S,O)},!hf(s))return;this.dragSnapToOrigin=h,this.handlers=o,this.transformPagePoint=u,this.contextWindow=c||window;const d=Ws(s),y=sc(d,this.transformPagePoint),{point:p}=y,{timestamp:m}=Se;this.history=[{...p,timestamp:m}];const{onSessionStart:v}=o;v&&v(s,lc(y,this.history)),this.removeListeners=Ps(Hs(this.contextWindow,"pointermove",this.handlePointerMove),Hs(this.contextWindow,"pointerup",this.handlePointerUp),Hs(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(s){this.handlers=s}end(){this.removeListeners&&this.removeListeners(),ha(this.updatePoint)}}function sc(i,s){return s?{point:s(i.point)}:i}function Yp(i,s){return{x:i.x-s.x,y:i.y-s.y}}function lc({point:i},s){return{point:i,delta:Yp(i,K0(s)),offset:Yp(i,_2(s)),velocity:A2(s,.1)}}function _2(i){return i[0]}function K0(i){return i[i.length-1]}function A2(i,s){if(i.length<2)return{x:0,y:0};let o=i.length-1,u=null;const c=K0(i);for(;o>=0&&(u=i[o],!(c.timestamp-u.timestamp>Ln(s)));)o--;if(!u)return{x:0,y:0};const h=kn(c.timestamp-u.timestamp);if(h===0)return{x:0,y:0};const d={x:(c.x-u.x)/h,y:(c.y-u.y)/h};return d.x===1/0&&(d.x=0),d.y===1/0&&(d.y=0),d}const Q0=1e-4,E2=1-Q0,D2=1+Q0,J0=.01,j2=0-J0,M2=0+J0;function Ke(i){return i.max-i.min}function C2(i,s,o){return Math.abs(i-s)<=o}function Xp(i,s,o,u=.5){i.origin=u,i.originPoint=Xt(s.min,s.max,i.origin),i.scale=Ke(o)/Ke(s),i.translate=Xt(o.min,o.max,i.origin)-i.originPoint,(i.scale>=E2&&i.scale<=D2||isNaN(i.scale))&&(i.scale=1),(i.translate>=j2&&i.translate<=M2||isNaN(i.translate))&&(i.translate=0)}function qs(i,s,o,u){Xp(i.x,s.x,o.x,u?u.originX:void 0),Xp(i.y,s.y,o.y,u?u.originY:void 0)}function Zp(i,s,o){i.min=o.min+s.min,i.max=i.min+Ke(s)}function N2(i,s,o){Zp(i.x,s.x,o.x),Zp(i.y,s.y,o.y)}function Kp(i,s,o){i.min=s.min-o.min,i.max=i.min+Ke(s)}function Gs(i,s,o){Kp(i.x,s.x,o.x),Kp(i.y,s.y,o.y)}function O2(i,{min:s,max:o},u){return s!==void 0&&i<s?i=u?Xt(s,i,u.min):Math.max(i,s):o!==void 0&&i>o&&(i=u?Xt(o,i,u.max):Math.min(i,o)),i}function Qp(i,s,o){return{min:s!==void 0?i.min+s:void 0,max:o!==void 0?i.max+o-(i.max-i.min):void 0}}function R2(i,{top:s,left:o,bottom:u,right:c}){return{x:Qp(i.x,o,c),y:Qp(i.y,s,u)}}function Jp(i,s){let o=s.min-i.min,u=s.max-i.max;return s.max-s.min<i.max-i.min&&([o,u]=[u,o]),{min:o,max:u}}function z2(i,s){return{x:Jp(i.x,s.x),y:Jp(i.y,s.y)}}function w2(i,s){let o=.5;const u=Ke(i),c=Ke(s);return c>u?o=Ui(s.min,s.max-u,i.min):u>c&&(o=Ui(i.min,i.max-c,s.min)),Hn(0,1,o)}function V2(i,s){const o={};return s.min!==void 0&&(o.min=s.min-i.min),s.max!==void 0&&(o.max=s.max-i.min),o}const Dc=.35;function B2(i=Dc){return i===!1?i=0:i===!0&&(i=Dc),{x:Fp(i,"left","right"),y:Fp(i,"top","bottom")}}function Fp(i,s,o){return{min:Pp(i,s),max:Pp(i,o)}}function Pp(i,s){return typeof i=="number"?i:i[s]||0}const Wp=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ri=()=>({x:Wp(),y:Wp()}),Ip=()=>({min:0,max:0}),Wt=()=>({x:Ip(),y:Ip()});function sn(i){return[i("x"),i("y")]}function F0({top:i,left:s,right:o,bottom:u}){return{x:{min:s,max:o},y:{min:i,max:u}}}function U2({x:i,y:s}){return{top:s.min,right:i.max,bottom:s.max,left:i.min}}function L2(i,s){if(!s)return i;const o=s({x:i.left,y:i.top}),u=s({x:i.right,y:i.bottom});return{top:o.y,left:o.x,bottom:u.y,right:u.x}}function oc(i){return i===void 0||i===1}function jc({scale:i,scaleX:s,scaleY:o}){return!oc(i)||!oc(s)||!oc(o)}function Ua(i){return jc(i)||P0(i)||i.z||i.rotate||i.rotateX||i.rotateY||i.skewX||i.skewY}function P0(i){return $p(i.x)||$p(i.y)}function $p(i){return i&&i!=="0%"}function Co(i,s,o){const u=i-o,c=s*u;return o+c}function ty(i,s,o,u,c){return c!==void 0&&(i=Co(i,c,u)),Co(i,o,u)+s}function Mc(i,s=0,o=1,u,c){i.min=ty(i.min,s,o,u,c),i.max=ty(i.max,s,o,u,c)}function W0(i,{x:s,y:o}){Mc(i.x,s.translate,s.scale,s.originPoint),Mc(i.y,o.translate,o.scale,o.originPoint)}const ey=.999999999999,ny=1.0000000000001;function k2(i,s,o,u=!1){const c=o.length;if(!c)return;s.x=s.y=1;let h,d;for(let y=0;y<c;y++){h=o[y],d=h.projectionDelta;const{visualElement:p}=h.options;p&&p.props.style&&p.props.style.display==="contents"||(u&&h.options.layoutScroll&&h.scroll&&h!==h.root&&wi(i,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),d&&(s.x*=d.x.scale,s.y*=d.y.scale,W0(i,d)),u&&Ua(h.latestValues)&&wi(i,h.latestValues))}s.x<ny&&s.x>ey&&(s.x=1),s.y<ny&&s.y>ey&&(s.y=1)}function zi(i,s){i.min=i.min+s,i.max=i.max+s}function ay(i,s,o,u,c=.5){const h=Xt(i.min,i.max,c);Mc(i,s,o,h,u)}function wi(i,s){ay(i.x,s.x,s.scaleX,s.scale,s.originX),ay(i.y,s.y,s.scaleY,s.scale,s.originY)}function I0(i,s){return F0(L2(i.getBoundingClientRect(),s))}function H2(i,s,o){const u=I0(i,o),{scroll:c}=s;return c&&(zi(u.x,c.offset.x),zi(u.y,c.offset.y)),u}const $0=({current:i})=>i?i.ownerDocument.defaultView:null,q2=new WeakMap;class G2{constructor(s){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Wt(),this.visualElement=s}start(s,{snapToCursor:o=!1}={}){const{presenceContext:u}=this.visualElement;if(u&&u.isPresent===!1)return;const c=v=>{const{dragSnapToOrigin:S}=this.getProps();S?this.pauseAnimation():this.stopAnimation(),o&&this.snapToCursor(Ws(v).point)},h=(v,S)=>{const{drag:b,dragPropagation:M,onDragStart:L}=this.getProps();if(b&&!M&&(this.openDragLock&&this.openDragLock(),this.openDragLock=b2(b),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),sn(O=>{let k=this.getAxisMotionValue(O).get()||0;if(yn.test(k)){const{projection:Y}=this.visualElement;if(Y&&Y.layout){const G=Y.layout.layoutBox[O];G&&(k=Ke(G)*(parseFloat(k)/100))}}this.originPoint[O]=k}),L&&Lt.postRender(()=>L(v,S)),yc(this.visualElement,"transform");const{animationState:z}=this.visualElement;z&&z.setActive("whileDrag",!0)},d=(v,S)=>{const{dragPropagation:b,dragDirectionLock:M,onDirectionLock:L,onDrag:z}=this.getProps();if(!b&&!this.openDragLock)return;const{offset:O}=S;if(M&&this.currentDirection===null){this.currentDirection=Y2(O),this.currentDirection!==null&&L&&L(this.currentDirection);return}this.updateAxis("x",S.point,O),this.updateAxis("y",S.point,O),this.visualElement.render(),z&&z(v,S)},y=(v,S)=>this.stop(v,S),p=()=>sn(v=>{var S;return this.getAnimationState(v)==="paused"&&((S=this.getAxisMotionValue(v).animation)===null||S===void 0?void 0:S.play())}),{dragSnapToOrigin:m}=this.getProps();this.panSession=new Z0(s,{onSessionStart:c,onStart:h,onMove:d,onSessionEnd:y,resumeAnimation:p},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,contextWindow:$0(this.visualElement)})}stop(s,o){const u=this.isDragging;if(this.cancel(),!u)return;const{velocity:c}=o;this.startAnimation(c);const{onDragEnd:h}=this.getProps();h&&Lt.postRender(()=>h(s,o))}cancel(){this.isDragging=!1;const{projection:s,animationState:o}=this.visualElement;s&&(s.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:u}=this.getProps();!u&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),o&&o.setActive("whileDrag",!1)}updateAxis(s,o,u){const{drag:c}=this.getProps();if(!u||!So(s,c,this.currentDirection))return;const h=this.getAxisMotionValue(s);let d=this.originPoint[s]+u[s];this.constraints&&this.constraints[s]&&(d=O2(d,this.constraints[s],this.elastic[s])),h.set(d)}resolveConstraints(){var s;const{dragConstraints:o,dragElastic:u}=this.getProps(),c=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)===null||s===void 0?void 0:s.layout,h=this.constraints;o&&Ni(o)?this.constraints||(this.constraints=this.resolveRefConstraints()):o&&c?this.constraints=R2(c.layoutBox,o):this.constraints=!1,this.elastic=B2(u),h!==this.constraints&&c&&this.constraints&&!this.hasMutatedConstraints&&sn(d=>{this.constraints!==!1&&this.getAxisMotionValue(d)&&(this.constraints[d]=V2(c.layoutBox[d],this.constraints[d]))})}resolveRefConstraints(){const{dragConstraints:s,onMeasureDragConstraints:o}=this.getProps();if(!s||!Ni(s))return!1;const u=s.current,{projection:c}=this.visualElement;if(!c||!c.layout)return!1;const h=H2(u,c.root,this.visualElement.getTransformPagePoint());let d=z2(c.layout.layoutBox,h);if(o){const y=o(U2(d));this.hasMutatedConstraints=!!y,y&&(d=F0(y))}return d}startAnimation(s){const{drag:o,dragMomentum:u,dragElastic:c,dragTransition:h,dragSnapToOrigin:d,onDragTransitionEnd:y}=this.getProps(),p=this.constraints||{},m=sn(v=>{if(!So(v,o,this.currentDirection))return;let S=p&&p[v]||{};d&&(S={min:0,max:0});const b=c?200:1e6,M=c?40:1e7,L={type:"inertia",velocity:u?s[v]:0,bounceStiffness:b,bounceDamping:M,timeConstant:750,restDelta:1,restSpeed:10,...h,...S};return this.startAxisValueAnimation(v,L)});return Promise.all(m).then(y)}startAxisValueAnimation(s,o){const u=this.getAxisMotionValue(s);return yc(this.visualElement,s),u.start(df(s,u,0,o,this.visualElement,!1))}stopAnimation(){sn(s=>this.getAxisMotionValue(s).stop())}pauseAnimation(){sn(s=>{var o;return(o=this.getAxisMotionValue(s).animation)===null||o===void 0?void 0:o.pause()})}getAnimationState(s){var o;return(o=this.getAxisMotionValue(s).animation)===null||o===void 0?void 0:o.state}getAxisMotionValue(s){const o=`_drag${s.toUpperCase()}`,u=this.visualElement.getProps(),c=u[o];return c||this.visualElement.getValue(s,(u.initial?u.initial[s]:void 0)||0)}snapToCursor(s){sn(o=>{const{drag:u}=this.getProps();if(!So(o,u,this.currentDirection))return;const{projection:c}=this.visualElement,h=this.getAxisMotionValue(o);if(c&&c.layout){const{min:d,max:y}=c.layout.layoutBox[o];h.set(s[o]-Xt(d,y,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:s,dragConstraints:o}=this.getProps(),{projection:u}=this.visualElement;if(!Ni(o)||!u||!this.constraints)return;this.stopAnimation();const c={x:0,y:0};sn(d=>{const y=this.getAxisMotionValue(d);if(y&&this.constraints!==!1){const p=y.get();c[d]=w2({min:p,max:p},this.constraints[d])}});const{transformTemplate:h}=this.visualElement.getProps();this.visualElement.current.style.transform=h?h({},""):"none",u.root&&u.root.updateScroll(),u.updateLayout(),this.resolveConstraints(),sn(d=>{if(!So(d,s,null))return;const y=this.getAxisMotionValue(d),{min:p,max:m}=this.constraints[d];y.set(Xt(p,m,c[d]))})}addListeners(){if(!this.visualElement.current)return;q2.set(this.visualElement,this);const s=this.visualElement.current,o=Hs(s,"pointerdown",p=>{const{drag:m,dragListener:v=!0}=this.getProps();m&&v&&this.start(p)}),u=()=>{const{dragConstraints:p}=this.getProps();Ni(p)&&p.current&&(this.constraints=this.resolveRefConstraints())},{projection:c}=this.visualElement,h=c.addEventListener("measure",u);c&&!c.layout&&(c.root&&c.root.updateScroll(),c.updateLayout()),Lt.read(u);const d=Qs(window,"resize",()=>this.scalePositionWithinConstraints()),y=c.addEventListener("didUpdate",(({delta:p,hasLayoutChanged:m})=>{this.isDragging&&m&&(sn(v=>{const S=this.getAxisMotionValue(v);S&&(this.originPoint[v]+=p[v].translate,S.set(S.get()+p[v].translate))}),this.visualElement.render())}));return()=>{d(),o(),h(),y&&y()}}getProps(){const s=this.visualElement.getProps(),{drag:o=!1,dragDirectionLock:u=!1,dragPropagation:c=!1,dragConstraints:h=!1,dragElastic:d=Dc,dragMomentum:y=!0}=s;return{...s,drag:o,dragDirectionLock:u,dragPropagation:c,dragConstraints:h,dragElastic:d,dragMomentum:y}}}function So(i,s,o){return(s===!0||s===i)&&(o===null||o===i)}function Y2(i,s=10){let o=null;return Math.abs(i.y)>s?o="y":Math.abs(i.x)>s&&(o="x"),o}class X2 extends pa{constructor(s){super(s),this.removeGroupControls=Ze,this.removeListeners=Ze,this.controls=new G2(s)}mount(){const{dragControls:s}=this.node.getProps();s&&(this.removeGroupControls=s.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ze}unmount(){this.removeGroupControls(),this.removeListeners()}}const iy=i=>(s,o)=>{i&&Lt.postRender(()=>i(s,o))};class Z2 extends pa{constructor(){super(...arguments),this.removePointerDownListener=Ze}onPointerDown(s){this.session=new Z0(s,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:$0(this.node)})}createPanHandlers(){const{onPanSessionStart:s,onPanStart:o,onPan:u,onPanEnd:c}=this.node.getProps();return{onSessionStart:iy(s),onStart:iy(o),onMove:u,onEnd:(h,d)=>{delete this.session,c&&Lt.postRender(()=>c(h,d))}}}mount(){this.removePointerDownListener=Hs(this.node.current,"pointerdown",s=>this.onPointerDown(s))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const xo={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function sy(i,s){return s.max===s.min?0:i/(s.max-s.min)*100}const Vs={correct:(i,s)=>{if(!s.target)return i;if(typeof i=="string")if(st.test(i))i=parseFloat(i);else return i;const o=sy(i,s.target.x),u=sy(i,s.target.y);return`${o}% ${u}%`}},K2={correct:(i,{treeScale:s,projectionDelta:o})=>{const u=i,c=ma.parse(i);if(c.length>5)return u;const h=ma.createTransformer(i),d=typeof c[0]!="number"?1:0,y=o.x.scale*s.x,p=o.y.scale*s.y;c[0+d]/=y,c[1+d]/=p;const m=Xt(y,p,.5);return typeof c[2+d]=="number"&&(c[2+d]/=m),typeof c[3+d]=="number"&&(c[3+d]/=m),h(c)}};class Q2 extends D.Component{componentDidMount(){const{visualElement:s,layoutGroup:o,switchLayoutGroup:u,layoutId:c}=this.props,{projection:h}=s;Sb(J2),h&&(o.group&&o.group.add(h),u&&u.register&&c&&u.register(h),h.root.didUpdate(),h.addEventListener("animationComplete",()=>{this.safeToRemove()}),h.setOptions({...h.options,onExitComplete:()=>this.safeToRemove()})),xo.hasEverUpdated=!0}getSnapshotBeforeUpdate(s){const{layoutDependency:o,visualElement:u,drag:c,isPresent:h}=this.props,d=u.projection;return d&&(d.isPresent=h,c||s.layoutDependency!==o||o===void 0?d.willUpdate():this.safeToRemove(),s.isPresent!==h&&(h?d.promote():d.relegate()||Lt.postRender(()=>{const y=d.getStack();(!y||!y.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:s}=this.props.visualElement;s&&(s.root.didUpdate(),Hc.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:s,layoutGroup:o,switchLayoutGroup:u}=this.props,{projection:c}=s;c&&(c.scheduleCheckAfterUnmount(),o&&o.group&&o.group.remove(c),u&&u.deregister&&u.deregister(c))}safeToRemove(){const{safeToRemove:s}=this.props;s&&s()}render(){return null}}function tg(i){const[s,o]=Uy(),u=D.useContext(zc);return x.jsx(Q2,{...i,layoutGroup:u,switchLayoutGroup:D.useContext(Ky),isPresent:s,safeToRemove:o})}const J2={borderRadius:{...Vs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Vs,borderTopRightRadius:Vs,borderBottomLeftRadius:Vs,borderBottomRightRadius:Vs,boxShadow:K2};function F2(i,s,o){const u=xe(i)?i:Zs(i);return u.start(df("",u,s,o)),u.animation}function P2(i){return i instanceof SVGElement&&i.tagName!=="svg"}const W2=(i,s)=>i.depth-s.depth;class I2{constructor(){this.children=[],this.isDirty=!1}add(s){Wc(this.children,s),this.isDirty=!0}remove(s){Ic(this.children,s),this.isDirty=!0}forEach(s){this.isDirty&&this.children.sort(W2),this.isDirty=!1,this.children.forEach(s)}}function $2(i,s){const o=gn.now(),u=({timestamp:c})=>{const h=c-o;h>=s&&(ha(u),i(h-s))};return Lt.read(u,!0),()=>ha(u)}const eg=["TopLeft","TopRight","BottomLeft","BottomRight"],tx=eg.length,ly=i=>typeof i=="string"?parseFloat(i):i,oy=i=>typeof i=="number"||st.test(i);function ex(i,s,o,u,c,h){c?(i.opacity=Xt(0,o.opacity!==void 0?o.opacity:1,nx(u)),i.opacityExit=Xt(s.opacity!==void 0?s.opacity:1,0,ax(u))):h&&(i.opacity=Xt(s.opacity!==void 0?s.opacity:1,o.opacity!==void 0?o.opacity:1,u));for(let d=0;d<tx;d++){const y=`border${eg[d]}Radius`;let p=uy(s,y),m=uy(o,y);if(p===void 0&&m===void 0)continue;p||(p=0),m||(m=0),p===0||m===0||oy(p)===oy(m)?(i[y]=Math.max(Xt(ly(p),ly(m),u),0),(yn.test(m)||yn.test(p))&&(i[y]+="%")):i[y]=m}(s.rotate||o.rotate)&&(i.rotate=Xt(s.rotate||0,o.rotate||0,u))}function uy(i,s){return i[s]!==void 0?i[s]:i.borderRadius}const nx=ng(0,.5,v0),ax=ng(.5,.95,Ze);function ng(i,s,o){return u=>u<i?0:u>s?1:o(Ui(i,s,u))}function ry(i,s){i.min=s.min,i.max=s.max}function an(i,s){ry(i.x,s.x),ry(i.y,s.y)}function cy(i,s){i.translate=s.translate,i.scale=s.scale,i.originPoint=s.originPoint,i.origin=s.origin}function fy(i,s,o,u,c){return i-=s,i=Co(i,1/o,u),c!==void 0&&(i=Co(i,1/c,u)),i}function ix(i,s=0,o=1,u=.5,c,h=i,d=i){if(yn.test(s)&&(s=parseFloat(s),s=Xt(d.min,d.max,s/100)-d.min),typeof s!="number")return;let y=Xt(h.min,h.max,u);i===h&&(y-=s),i.min=fy(i.min,s,o,y,c),i.max=fy(i.max,s,o,y,c)}function dy(i,s,[o,u,c],h,d){ix(i,s[o],s[u],s[c],s.scale,h,d)}const sx=["x","scaleX","originX"],lx=["y","scaleY","originY"];function hy(i,s,o,u){dy(i.x,s,sx,o?o.x:void 0,u?u.x:void 0),dy(i.y,s,lx,o?o.y:void 0,u?u.y:void 0)}function my(i){return i.translate===0&&i.scale===1}function ag(i){return my(i.x)&&my(i.y)}function py(i,s){return i.min===s.min&&i.max===s.max}function ox(i,s){return py(i.x,s.x)&&py(i.y,s.y)}function yy(i,s){return Math.round(i.min)===Math.round(s.min)&&Math.round(i.max)===Math.round(s.max)}function ig(i,s){return yy(i.x,s.x)&&yy(i.y,s.y)}function gy(i){return Ke(i.x)/Ke(i.y)}function vy(i,s){return i.translate===s.translate&&i.scale===s.scale&&i.originPoint===s.originPoint}class ux{constructor(){this.members=[]}add(s){Wc(this.members,s),s.scheduleRender()}remove(s){if(Ic(this.members,s),s===this.prevLead&&(this.prevLead=void 0),s===this.lead){const o=this.members[this.members.length-1];o&&this.promote(o)}}relegate(s){const o=this.members.findIndex(c=>s===c);if(o===0)return!1;let u;for(let c=o;c>=0;c--){const h=this.members[c];if(h.isPresent!==!1){u=h;break}}return u?(this.promote(u),!0):!1}promote(s,o){const u=this.lead;if(s!==u&&(this.prevLead=u,this.lead=s,s.show(),u)){u.instance&&u.scheduleRender(),s.scheduleRender(),s.resumeFrom=u,o&&(s.resumeFrom.preserveOpacity=!0),u.snapshot&&(s.snapshot=u.snapshot,s.snapshot.latestValues=u.animationValues||u.latestValues),s.root&&s.root.isUpdating&&(s.isLayoutDirty=!0);const{crossfade:c}=s.options;c===!1&&u.hide()}}exitAnimationComplete(){this.members.forEach(s=>{const{options:o,resumingFrom:u}=s;o.onExitComplete&&o.onExitComplete(),u&&u.options.onExitComplete&&u.options.onExitComplete()})}scheduleRender(){this.members.forEach(s=>{s.instance&&s.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function rx(i,s,o){let u="";const c=i.x.translate/s.x,h=i.y.translate/s.y,d=(o==null?void 0:o.z)||0;if((c||h||d)&&(u=`translate3d(${c}px, ${h}px, ${d}px) `),(s.x!==1||s.y!==1)&&(u+=`scale(${1/s.x}, ${1/s.y}) `),o){const{transformPerspective:m,rotate:v,rotateX:S,rotateY:b,skewX:M,skewY:L}=o;m&&(u=`perspective(${m}px) ${u}`),v&&(u+=`rotate(${v}deg) `),S&&(u+=`rotateX(${S}deg) `),b&&(u+=`rotateY(${b}deg) `),M&&(u+=`skewX(${M}deg) `),L&&(u+=`skewY(${L}deg) `)}const y=i.x.scale*s.x,p=i.y.scale*s.y;return(y!==1||p!==1)&&(u+=`scale(${y}, ${p})`),u||"none"}const La={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Us=typeof window<"u"&&window.MotionDebug!==void 0,uc=["","X","Y","Z"],cx={visibility:"hidden"},Sy=1e3;let fx=0;function rc(i,s,o,u){const{latestValues:c}=s;c[i]&&(o[i]=c[i],s.setStaticValue(i,0),u&&(u[i]=0))}function sg(i){if(i.hasCheckedOptimisedAppear=!0,i.root===i)return;const{visualElement:s}=i.options;if(!s)return;const o=u0(s);if(window.MotionHasOptimisedAnimation(o,"transform")){const{layout:c,layoutId:h}=i.options;window.MotionCancelOptimisedAnimation(o,"transform",Lt,!(c||h))}const{parent:u}=i;u&&!u.hasCheckedOptimisedAppear&&sg(u)}function lg({attachResizeListener:i,defaultParent:s,measureScroll:o,checkIsScrollRoot:u,resetTransform:c}){return class{constructor(d={},y=s==null?void 0:s()){this.id=fx++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Us&&(La.totalNodes=La.resolvedTargetDeltas=La.recalculatedProjection=0),this.nodes.forEach(mx),this.nodes.forEach(Sx),this.nodes.forEach(bx),this.nodes.forEach(px),Us&&window.MotionDebug.record(La)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=d,this.root=y?y.root||y:this,this.path=y?[...y.path,y]:[],this.parent=y,this.depth=y?y.depth+1:0;for(let p=0;p<this.path.length;p++)this.path[p].shouldResetTransform=!0;this.root===this&&(this.nodes=new I2)}addEventListener(d,y){return this.eventHandlers.has(d)||this.eventHandlers.set(d,new $c),this.eventHandlers.get(d).add(y)}notifyListeners(d,...y){const p=this.eventHandlers.get(d);p&&p.notify(...y)}hasListeners(d){return this.eventHandlers.has(d)}mount(d,y=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=P2(d),this.instance=d;const{layoutId:p,layout:m,visualElement:v}=this.options;if(v&&!v.current&&v.mount(d),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),y&&(m||p)&&(this.isLayoutDirty=!0),i){let S;const b=()=>this.root.updateBlockedByResize=!1;i(d,()=>{this.root.updateBlockedByResize=!0,S&&S(),S=$2(b,250),xo.hasAnimatedSinceResize&&(xo.hasAnimatedSinceResize=!1,this.nodes.forEach(Ty))})}p&&this.root.registerSharedNode(p,this),this.options.animate!==!1&&v&&(p||m)&&this.addEventListener("didUpdate",({delta:S,hasLayoutChanged:b,hasRelativeTargetChanged:M,layout:L})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const z=this.options.transition||v.getDefaultTransition()||Ex,{onLayoutAnimationStart:O,onLayoutAnimationComplete:k}=v.getProps(),Y=!this.targetLayout||!ig(this.targetLayout,L)||M,G=!b&&M;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||G||b&&(Y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(S,G);const J={...Pc(z,"layout"),onPlay:O,onComplete:k};(v.shouldReduceMotion||this.options.layoutRoot)&&(J.delay=0,J.type=!1),this.startAnimation(J)}else b||Ty(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=L})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const d=this.getStack();d&&d.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ha(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(Tx),this.animationId++)}getTransformTemplate(){const{visualElement:d}=this.options;return d&&d.getProps().transformTemplate}willUpdate(d=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&sg(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v<this.path.length;v++){const S=this.path[v];S.shouldResetTransform=!0,S.updateScroll("snapshot"),S.options.layoutRoot&&S.willUpdate(!1)}const{layoutId:y,layout:p}=this.options;if(y===void 0&&!p)return;const m=this.getTransformTemplate();this.prevTransformTemplateValue=m?m(this.latestValues,""):void 0,this.updateSnapshot(),d&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(by);return}this.isUpdating||this.nodes.forEach(gx),this.isUpdating=!1,this.nodes.forEach(vx),this.nodes.forEach(dx),this.nodes.forEach(hx),this.clearAllSnapshots();const y=gn.now();Se.delta=Hn(0,1e3/60,y-Se.timestamp),Se.timestamp=y,Se.isProcessing=!0,tc.update.process(Se),tc.preRender.process(Se),tc.render.process(Se),Se.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Hc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(yx),this.sharedNodes.forEach(xx)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Lt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Lt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let p=0;p<this.path.length;p++)this.path[p].updateScroll();const d=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Wt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:y}=this.options;y&&y.notify("LayoutMeasure",this.layout.layoutBox,d?d.layoutBox:void 0)}updateScroll(d="measure"){let y=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===d&&(y=!1),y){const p=u(this.instance);this.scroll={animationId:this.root.animationId,phase:d,isRoot:p,offset:o(this.instance),wasRoot:this.scroll?this.scroll.isRoot:p}}}resetTransform(){if(!c)return;const d=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,y=this.projectionDelta&&!ag(this.projectionDelta),p=this.getTransformTemplate(),m=p?p(this.latestValues,""):void 0,v=m!==this.prevTransformTemplateValue;d&&(y||Ua(this.latestValues)||v)&&(c(this.instance,m),this.shouldResetTransform=!1,this.scheduleRender())}measure(d=!0){const y=this.measurePageBox();let p=this.removeElementScroll(y);return d&&(p=this.removeTransform(p)),Dx(p),{animationId:this.root.animationId,measuredBox:y,layoutBox:p,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:y}=this.options;if(!y)return Wt();const p=y.measureViewportBox();if(!(((d=this.scroll)===null||d===void 0?void 0:d.wasRoot)||this.path.some(jx))){const{scroll:v}=this.root;v&&(zi(p.x,v.offset.x),zi(p.y,v.offset.y))}return p}removeElementScroll(d){var y;const p=Wt();if(an(p,d),!((y=this.scroll)===null||y===void 0)&&y.wasRoot)return p;for(let m=0;m<this.path.length;m++){const v=this.path[m],{scroll:S,options:b}=v;v!==this.root&&S&&b.layoutScroll&&(S.wasRoot&&an(p,d),zi(p.x,S.offset.x),zi(p.y,S.offset.y))}return p}applyTransform(d,y=!1){const p=Wt();an(p,d);for(let m=0;m<this.path.length;m++){const v=this.path[m];!y&&v.options.layoutScroll&&v.scroll&&v!==v.root&&wi(p,{x:-v.scroll.offset.x,y:-v.scroll.offset.y}),Ua(v.latestValues)&&wi(p,v.latestValues)}return Ua(this.latestValues)&&wi(p,this.latestValues),p}removeTransform(d){const y=Wt();an(y,d);for(let p=0;p<this.path.length;p++){const m=this.path[p];if(!m.instance||!Ua(m.latestValues))continue;jc(m.latestValues)&&m.updateSnapshot();const v=Wt(),S=m.measurePageBox();an(v,S),hy(y,m.latestValues,m.snapshot?m.snapshot.layoutBox:void 0,v)}return Ua(this.latestValues)&&hy(y,this.latestValues),y}setTargetDelta(d){this.targetDelta=d,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(d){this.options={...this.options,...d,crossfade:d.crossfade!==void 0?d.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!==Se.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(d=!1){var y;const p=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=p.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=p.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=p.isSharedProjectionDirty);const m=!!this.resumingFrom||this!==p;if(!(d||m&&this.isSharedProjectionDirty||this.isProjectionDirty||!((y=this.parent)===null||y===void 0)&&y.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:S,layoutId:b}=this.options;if(!(!this.layout||!(S||b))){if(this.resolvedRelativeTargetAt=Se.timestamp,!this.targetDelta&&!this.relativeTarget){const M=this.getClosestProjectingParent();M&&M.layout&&this.animationProgress!==1?(this.relativeParent=M,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Wt(),this.relativeTargetOrigin=Wt(),Gs(this.relativeTargetOrigin,this.layout.layoutBox,M.layout.layoutBox),an(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Wt(),this.targetWithTransforms=Wt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),N2(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):an(this.target,this.layout.layoutBox),W0(this.target,this.targetDelta)):an(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const M=this.getClosestProjectingParent();M&&!!M.resumingFrom==!!this.resumingFrom&&!M.options.layoutScroll&&M.target&&this.animationProgress!==1?(this.relativeParent=M,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Wt(),this.relativeTargetOrigin=Wt(),Gs(this.relativeTargetOrigin,this.target,M.target),an(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Us&&La.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||jc(this.parent.latestValues)||P0(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var d;const y=this.getLead(),p=!!this.resumingFrom||this!==y;let m=!0;if((this.isProjectionDirty||!((d=this.parent)===null||d===void 0)&&d.isProjectionDirty)&&(m=!1),p&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(m=!1),this.resolvedRelativeTargetAt===Se.timestamp&&(m=!1),m)return;const{layout:v,layoutId:S}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(v||S))return;an(this.layoutCorrected,this.layout.layoutBox);const b=this.treeScale.x,M=this.treeScale.y;k2(this.layoutCorrected,this.treeScale,this.path,p),y.layout&&!y.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(y.target=y.layout.layoutBox,y.targetWithTransforms=Wt());const{target:L}=y;if(!L){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(cy(this.prevProjectionDelta.x,this.projectionDelta.x),cy(this.prevProjectionDelta.y,this.projectionDelta.y)),qs(this.projectionDelta,this.layoutCorrected,L,this.latestValues),(this.treeScale.x!==b||this.treeScale.y!==M||!vy(this.projectionDelta.x,this.prevProjectionDelta.x)||!vy(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",L)),Us&&La.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(d=!0){var y;if((y=this.options.visualElement)===null||y===void 0||y.scheduleRender(),d){const p=this.getStack();p&&p.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ri(),this.projectionDelta=Ri(),this.projectionDeltaWithTransform=Ri()}setAnimationOrigin(d,y=!1){const p=this.snapshot,m=p?p.latestValues:{},v={...this.latestValues},S=Ri();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!y;const b=Wt(),M=p?p.source:void 0,L=this.layout?this.layout.source:void 0,z=M!==L,O=this.getStack(),k=!O||O.members.length<=1,Y=!!(z&&!k&&this.options.crossfade===!0&&!this.path.some(Ax));this.animationProgress=0;let G;this.mixTargetDelta=J=>{const B=J/1e3;xy(S.x,d.x,B),xy(S.y,d.y,B),this.setTargetDelta(S),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Gs(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox),_x(this.relativeTarget,this.relativeTargetOrigin,b,B),G&&ox(this.relativeTarget,G)&&(this.isProjectionDirty=!1),G||(G=Wt()),an(G,this.relativeTarget)),z&&(this.animationValues=v,ex(v,m,this.latestValues,B,Y,k)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=B},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(d){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ha(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Lt.update(()=>{xo.hasAnimatedSinceResize=!0,this.currentAnimation=F2(0,Sy,{...d,onUpdate:y=>{this.mixTargetDelta(y),d.onUpdate&&d.onUpdate(y)},onComplete:()=>{d.onComplete&&d.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 d=this.getStack();d&&d.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Sy),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const d=this.getLead();let{targetWithTransforms:y,target:p,layout:m,latestValues:v}=d;if(!(!y||!p||!m)){if(this!==d&&this.layout&&m&&og(this.options.animationType,this.layout.layoutBox,m.layoutBox)){p=this.target||Wt();const S=Ke(this.layout.layoutBox.x);p.x.min=d.target.x.min,p.x.max=p.x.min+S;const b=Ke(this.layout.layoutBox.y);p.y.min=d.target.y.min,p.y.max=p.y.min+b}an(y,p),wi(y,v),qs(this.projectionDeltaWithTransform,this.layoutCorrected,y,v)}}registerSharedNode(d,y){this.sharedNodes.has(d)||this.sharedNodes.set(d,new ux),this.sharedNodes.get(d).add(y);const m=y.options.initialPromotionConfig;y.promote({transition:m?m.transition:void 0,preserveFollowOpacity:m&&m.shouldPreserveFollowOpacity?m.shouldPreserveFollowOpacity(y):void 0})}isLead(){const d=this.getStack();return d?d.lead===this:!0}getLead(){var d;const{layoutId:y}=this.options;return y?((d=this.getStack())===null||d===void 0?void 0:d.lead)||this:this}getPrevLead(){var d;const{layoutId:y}=this.options;return y?(d=this.getStack())===null||d===void 0?void 0:d.prevLead:void 0}getStack(){const{layoutId:d}=this.options;if(d)return this.root.sharedNodes.get(d)}promote({needsReset:d,transition:y,preserveFollowOpacity:p}={}){const m=this.getStack();m&&m.promote(this,p),d&&(this.projectionDelta=void 0,this.needsReset=!0),y&&this.setOptions({transition:y})}relegate(){const d=this.getStack();return d?d.relegate(this):!1}resetSkewAndRotation(){const{visualElement:d}=this.options;if(!d)return;let y=!1;const{latestValues:p}=d;if((p.z||p.rotate||p.rotateX||p.rotateY||p.rotateZ||p.skewX||p.skewY)&&(y=!0),!y)return;const m={};p.z&&rc("z",d,m,this.animationValues);for(let v=0;v<uc.length;v++)rc(`rotate${uc[v]}`,d,m,this.animationValues),rc(`skew${uc[v]}`,d,m,this.animationValues);d.render();for(const v in m)d.setStaticValue(v,m[v]),this.animationValues&&(this.animationValues[v]=m[v]);d.scheduleRender()}getProjectionStyles(d){var y,p;if(!this.instance||this.isSVG)return;if(!this.isVisible)return cx;const m={visibility:""},v=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,m.opacity="",m.pointerEvents=bo(d==null?void 0:d.pointerEvents)||"",m.transform=v?v(this.latestValues,""):"none",m;const S=this.getLead();if(!this.projectionDelta||!this.layout||!S.target){const z={};return this.options.layoutId&&(z.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,z.pointerEvents=bo(d==null?void 0:d.pointerEvents)||""),this.hasProjected&&!Ua(this.latestValues)&&(z.transform=v?v({},""):"none",this.hasProjected=!1),z}const b=S.animationValues||S.latestValues;this.applyTransformsToTarget(),m.transform=rx(this.projectionDeltaWithTransform,this.treeScale,b),v&&(m.transform=v(b,m.transform));const{x:M,y:L}=this.projectionDelta;m.transformOrigin=`${M.origin*100}% ${L.origin*100}% 0`,S.animationValues?m.opacity=S===this?(p=(y=b.opacity)!==null&&y!==void 0?y:this.latestValues.opacity)!==null&&p!==void 0?p:1:this.preserveOpacity?this.latestValues.opacity:b.opacityExit:m.opacity=S===this?b.opacity!==void 0?b.opacity:"":b.opacityExit!==void 0?b.opacityExit:0;for(const z in Ao){if(b[z]===void 0)continue;const{correct:O,applyTo:k}=Ao[z],Y=m.transform==="none"?b[z]:O(b[z],S);if(k){const G=k.length;for(let J=0;J<G;J++)m[k[J]]=Y}else m[z]=Y}return this.options.layoutId&&(m.pointerEvents=S===this?bo(d==null?void 0:d.pointerEvents)||"":"none"),m}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(d=>{var y;return(y=d.currentAnimation)===null||y===void 0?void 0:y.stop()}),this.root.nodes.forEach(by),this.root.sharedNodes.clear()}}}function dx(i){i.updateLayout()}function hx(i){var s;const o=((s=i.resumeFrom)===null||s===void 0?void 0:s.snapshot)||i.snapshot;if(i.isLead()&&i.layout&&o&&i.hasListeners("didUpdate")){const{layoutBox:u,measuredBox:c}=i.layout,{animationType:h}=i.options,d=o.source!==i.layout.source;h==="size"?sn(S=>{const b=d?o.measuredBox[S]:o.layoutBox[S],M=Ke(b);b.min=u[S].min,b.max=b.min+M}):og(h,o.layoutBox,u)&&sn(S=>{const b=d?o.measuredBox[S]:o.layoutBox[S],M=Ke(u[S]);b.max=b.min+M,i.relativeTarget&&!i.currentAnimation&&(i.isProjectionDirty=!0,i.relativeTarget[S].max=i.relativeTarget[S].min+M)});const y=Ri();qs(y,u,o.layoutBox);const p=Ri();d?qs(p,i.applyTransform(c,!0),o.measuredBox):qs(p,u,o.layoutBox);const m=!ag(y);let v=!1;if(!i.resumeFrom){const S=i.getClosestProjectingParent();if(S&&!S.resumeFrom){const{snapshot:b,layout:M}=S;if(b&&M){const L=Wt();Gs(L,o.layoutBox,b.layoutBox);const z=Wt();Gs(z,u,M.layoutBox),ig(L,z)||(v=!0),S.options.layoutRoot&&(i.relativeTarget=z,i.relativeTargetOrigin=L,i.relativeParent=S)}}}i.notifyListeners("didUpdate",{layout:u,snapshot:o,delta:p,layoutDelta:y,hasLayoutChanged:m,hasRelativeTargetChanged:v})}else if(i.isLead()){const{onExitComplete:u}=i.options;u&&u()}i.options.transition=void 0}function mx(i){Us&&La.totalNodes++,i.parent&&(i.isProjecting()||(i.isProjectionDirty=i.parent.isProjectionDirty),i.isSharedProjectionDirty||(i.isSharedProjectionDirty=!!(i.isProjectionDirty||i.parent.isProjectionDirty||i.parent.isSharedProjectionDirty)),i.isTransformDirty||(i.isTransformDirty=i.parent.isTransformDirty))}function px(i){i.isProjectionDirty=i.isSharedProjectionDirty=i.isTransformDirty=!1}function yx(i){i.clearSnapshot()}function by(i){i.clearMeasurements()}function gx(i){i.isLayoutDirty=!1}function vx(i){const{visualElement:s}=i.options;s&&s.getProps().onBeforeLayoutMeasure&&s.notify("BeforeLayoutMeasure"),i.resetTransform()}function Ty(i){i.finishAnimation(),i.targetDelta=i.relativeTarget=i.target=void 0,i.isProjectionDirty=!0}function Sx(i){i.resolveTargetDelta()}function bx(i){i.calcProjection()}function Tx(i){i.resetSkewAndRotation()}function xx(i){i.removeLeadSnapshot()}function xy(i,s,o){i.translate=Xt(s.translate,0,o),i.scale=Xt(s.scale,1,o),i.origin=s.origin,i.originPoint=s.originPoint}function _y(i,s,o,u){i.min=Xt(s.min,o.min,u),i.max=Xt(s.max,o.max,u)}function _x(i,s,o,u){_y(i.x,s.x,o.x,u),_y(i.y,s.y,o.y,u)}function Ax(i){return i.animationValues&&i.animationValues.opacityExit!==void 0}const Ex={duration:.45,ease:[.4,0,.1,1]},Ay=i=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(i),Ey=Ay("applewebkit/")&&!Ay("chrome/")?Math.round:Ze;function Dy(i){i.min=Ey(i.min),i.max=Ey(i.max)}function Dx(i){Dy(i.x),Dy(i.y)}function og(i,s,o){return i==="position"||i==="preserve-aspect"&&!C2(gy(s),gy(o),.2)}function jx(i){var s;return i!==i.root&&((s=i.scroll)===null||s===void 0?void 0:s.wasRoot)}const Mx=lg({attachResizeListener:(i,s)=>Qs(i,"resize",s),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),cc={current:void 0},ug=lg({measureScroll:i=>({x:i.scrollLeft,y:i.scrollTop}),defaultParent:()=>{if(!cc.current){const i=new Mx({});i.mount(window),i.setOptions({layoutScroll:!0}),cc.current=i}return cc.current},resetTransform:(i,s)=>{i.style.transform=s!==void 0?s:"none"},checkIsScrollRoot:i=>window.getComputedStyle(i).position==="fixed"}),Cx={pan:{Feature:Z2},drag:{Feature:X2,ProjectionNode:ug,MeasureLayout:tg}};function Nx(i,s,o){var u;if(i instanceof Element)return[i];if(typeof i=="string"){let c=document;const h=(u=void 0)!==null&&u!==void 0?u:c.querySelectorAll(i);return h?Array.from(h):[]}return Array.from(i)}function rg(i,s){const o=Nx(i),u=new AbortController,c={passive:!0,...s,signal:u.signal};return[o,c,()=>u.abort()]}function jy(i){return s=>{s.pointerType==="touch"||X0()||i(s)}}function Ox(i,s,o={}){const[u,c,h]=rg(i,o),d=jy(y=>{const{target:p}=y,m=s(y);if(typeof m!="function"||!p)return;const v=jy(S=>{m(S),p.removeEventListener("pointerleave",v)});p.addEventListener("pointerleave",v,c)});return u.forEach(y=>{y.addEventListener("pointerenter",d,c)}),h}function My(i,s,o){const{props:u}=i;i.animationState&&u.whileHover&&i.animationState.setActive("whileHover",o==="Start");const c="onHover"+o,h=u[c];h&&Lt.postRender(()=>h(s,Ws(s)))}class Rx extends pa{mount(){const{current:s}=this.node;s&&(this.unmount=Ox(s,o=>(My(this.node,o,"Start"),u=>My(this.node,u,"End"))))}unmount(){}}class zx extends pa{constructor(){super(...arguments),this.isActive=!1}onFocus(){let s=!1;try{s=this.node.current.matches(":focus-visible")}catch{s=!0}!s||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ps(Qs(this.node.current,"focus",()=>this.onFocus()),Qs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const cg=(i,s)=>s?i===s?!0:cg(i,s.parentElement):!1,wx=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Vx(i){return wx.has(i.tagName)||i.tabIndex!==-1}const Ls=new WeakSet;function Cy(i){return s=>{s.key==="Enter"&&i(s)}}function fc(i,s){i.dispatchEvent(new PointerEvent("pointer"+s,{isPrimary:!0,bubbles:!0}))}const Bx=(i,s)=>{const o=i.currentTarget;if(!o)return;const u=Cy(()=>{if(Ls.has(o))return;fc(o,"down");const c=Cy(()=>{fc(o,"up")}),h=()=>fc(o,"cancel");o.addEventListener("keyup",c,s),o.addEventListener("blur",h,s)});o.addEventListener("keydown",u,s),o.addEventListener("blur",()=>o.removeEventListener("keydown",u),s)};function Ny(i){return hf(i)&&!X0()}function Ux(i,s,o={}){const[u,c,h]=rg(i,o),d=y=>{const p=y.currentTarget;if(!Ny(y)||Ls.has(p))return;Ls.add(p);const m=s(y),v=(M,L)=>{window.removeEventListener("pointerup",S),window.removeEventListener("pointercancel",b),!(!Ny(M)||!Ls.has(p))&&(Ls.delete(p),typeof m=="function"&&m(M,{success:L}))},S=M=>{v(M,o.useGlobalTarget||cg(p,M.target))},b=M=>{v(M,!1)};window.addEventListener("pointerup",S,c),window.addEventListener("pointercancel",b,c)};return u.forEach(y=>{!Vx(y)&&y.getAttribute("tabindex")===null&&(y.tabIndex=0),(o.useGlobalTarget?window:y).addEventListener("pointerdown",d,c),y.addEventListener("focus",m=>Bx(m,c),c)}),h}function Oy(i,s,o){const{props:u}=i;i.animationState&&u.whileTap&&i.animationState.setActive("whileTap",o==="Start");const c="onTap"+(o==="End"?"":o),h=u[c];h&&Lt.postRender(()=>h(s,Ws(s)))}class Lx extends pa{mount(){const{current:s}=this.node;s&&(this.unmount=Ux(s,o=>(Oy(this.node,o,"Start"),(u,{success:c})=>Oy(this.node,u,c?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Cc=new WeakMap,dc=new WeakMap,kx=i=>{const s=Cc.get(i.target);s&&s(i)},Hx=i=>{i.forEach(kx)};function qx({root:i,...s}){const o=i||document;dc.has(o)||dc.set(o,{});const u=dc.get(o),c=JSON.stringify(s);return u[c]||(u[c]=new IntersectionObserver(Hx,{root:i,...s})),u[c]}function Gx(i,s,o){const u=qx(s);return Cc.set(i,o),u.observe(i),()=>{Cc.delete(i),u.unobserve(i)}}const Yx={some:0,all:1};class Xx extends pa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:s={}}=this.node.getProps(),{root:o,margin:u,amount:c="some",once:h}=s,d={root:o?o.current:void 0,rootMargin:u,threshold:typeof c=="number"?c:Yx[c]},y=p=>{const{isIntersecting:m}=p;if(this.isInView===m||(this.isInView=m,h&&!m&&this.hasEnteredView))return;m&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",m);const{onViewportEnter:v,onViewportLeave:S}=this.node.getProps(),b=m?v:S;b&&b(p)};return Gx(this.node.current,d,y)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:s,prevProps:o}=this.node;["amount","margin","root"].some(Zx(s,o))&&this.startObserver()}unmount(){}}function Zx({viewport:i={}},{viewport:s={}}={}){return o=>i[o]!==s[o]}const Kx={inView:{Feature:Xx},tap:{Feature:Lx},focus:{Feature:zx},hover:{Feature:Rx}},Qx={layout:{ProjectionNode:ug,MeasureLayout:tg}},Nc={current:null},fg={current:!1};function Jx(){if(fg.current=!0,!!Bc)if(window.matchMedia){const i=window.matchMedia("(prefers-reduced-motion)"),s=()=>Nc.current=i.matches;i.addListener(s),s()}else Nc.current=!1}const Fx=[...R0,Te,ma],Px=i=>Fx.find(O0(i)),Ry=new WeakMap;function Wx(i,s,o){for(const u in s){const c=s[u],h=o[u];if(xe(c))i.addValue(u,c);else if(xe(h))i.addValue(u,Zs(c,{owner:i}));else if(h!==c)if(i.hasValue(u)){const d=i.getValue(u);d.liveStyle===!0?d.jump(c):d.hasAnimated||d.set(c)}else{const d=i.getStaticValue(u);i.addValue(u,Zs(d!==void 0?d:c,{owner:i}))}}for(const u in o)s[u]===void 0&&i.removeValue(u);return s}const zy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ix{scrapeMotionValuesFromProps(s,o,u){return{}}constructor({parent:s,props:o,presenceContext:u,reducedMotionConfig:c,blockInitialAnimation:h,visualState:d},y={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=rf,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 M=gn.now();this.renderScheduledAt<M&&(this.renderScheduledAt=M,Lt.render(this.render,!1,!0))};const{latestValues:p,renderState:m,onUpdate:v}=d;this.onUpdate=v,this.latestValues=p,this.baseTarget={...p},this.initialValues=o.initial?{...p}:{},this.renderState=m,this.parent=s,this.props=o,this.presenceContext=u,this.depth=s?s.depth+1:0,this.reducedMotionConfig=c,this.options=y,this.blockInitialAnimation=!!h,this.isControllingVariants=wo(o),this.isVariantNode=Xy(o),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(s&&s.current);const{willChange:S,...b}=this.scrapeMotionValuesFromProps(o,{},this);for(const M in b){const L=b[M];p[M]!==void 0&&xe(L)&&L.set(p[M],!1)}}mount(s){this.current=s,Ry.set(s,this),this.projection&&!this.projection.instance&&this.projection.mount(s),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((o,u)=>this.bindToMotionValue(u,o)),fg.current||Jx(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Nc.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Ry.delete(this.current),this.projection&&this.projection.unmount(),ha(this.notifyUpdate),ha(this.render),this.valueSubscriptions.forEach(s=>s()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const s in this.events)this.events[s].clear();for(const s in this.features){const o=this.features[s];o&&(o.unmount(),o.isMounted=!1)}this.current=null}bindToMotionValue(s,o){this.valueSubscriptions.has(s)&&this.valueSubscriptions.get(s)();const u=Ga.has(s),c=o.on("change",y=>{this.latestValues[s]=y,this.props.onUpdate&&Lt.preRender(this.notifyUpdate),u&&this.projection&&(this.projection.isTransformDirty=!0)}),h=o.on("renderRequest",this.scheduleRender);let d;window.MotionCheckAppearSync&&(d=window.MotionCheckAppearSync(this,s,o)),this.valueSubscriptions.set(s,()=>{c(),h(),d&&d(),o.owner&&o.stop()})}sortNodePosition(s){return!this.current||!this.sortInstanceNodePosition||this.type!==s.type?0:this.sortInstanceNodePosition(this.current,s.current)}updateFeatures(){let s="animation";for(s in Bi){const o=Bi[s];if(!o)continue;const{isEnabled:u,Feature:c}=o;if(!this.features[s]&&c&&u(this.props)&&(this.features[s]=new c(this)),this.features[s]){const h=this.features[s];h.isMounted?h.update():(h.mount(),h.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Wt()}getStaticValue(s){return this.latestValues[s]}setStaticValue(s,o){this.latestValues[s]=o}update(s,o){(s.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=s,this.prevPresenceContext=this.presenceContext,this.presenceContext=o;for(let u=0;u<zy.length;u++){const c=zy[u];this.propEventSubscriptions[c]&&(this.propEventSubscriptions[c](),delete this.propEventSubscriptions[c]);const h="on"+c,d=s[h];d&&(this.propEventSubscriptions[c]=this.on(c,d))}this.prevMotionValues=Wx(this,this.scrapeMotionValuesFromProps(s,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(s){return this.props.variants?this.props.variants[s]: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(s){const o=this.getClosestVariantNode();if(o)return o.variantChildren&&o.variantChildren.add(s),()=>o.variantChildren.delete(s)}addValue(s,o){const u=this.values.get(s);o!==u&&(u&&this.removeValue(s),this.bindToMotionValue(s,o),this.values.set(s,o),this.latestValues[s]=o.get())}removeValue(s){this.values.delete(s);const o=this.valueSubscriptions.get(s);o&&(o(),this.valueSubscriptions.delete(s)),delete this.latestValues[s],this.removeValueFromRenderState(s,this.renderState)}hasValue(s){return this.values.has(s)}getValue(s,o){if(this.props.values&&this.props.values[s])return this.props.values[s];let u=this.values.get(s);return u===void 0&&o!==void 0&&(u=Zs(o===null?void 0:o,{owner:this}),this.addValue(s,u)),u}readValue(s,o){var u;let c=this.latestValues[s]!==void 0||!this.current?this.latestValues[s]:(u=this.getBaseTargetFromProps(this.props,s))!==null&&u!==void 0?u:this.readValueFromInstance(this.current,s,this.options);return c!=null&&(typeof c=="string"&&(C0(c)||b0(c))?c=parseFloat(c):!Px(c)&&ma.test(o)&&(c=D0(s,o)),this.setBaseTarget(s,xe(c)?c.get():c)),xe(c)?c.get():c}setBaseTarget(s,o){this.baseTarget[s]=o}getBaseTarget(s){var o;const{initial:u}=this.props;let c;if(typeof u=="string"||typeof u=="object"){const d=Gc(this.props,u,(o=this.presenceContext)===null||o===void 0?void 0:o.custom);d&&(c=d[s])}if(u&&c!==void 0)return c;const h=this.getBaseTargetFromProps(this.props,s);return h!==void 0&&!xe(h)?h:this.initialValues[s]!==void 0&&c===void 0?void 0:this.baseTarget[s]}on(s,o){return this.events[s]||(this.events[s]=new $c),this.events[s].add(o)}notify(s,...o){this.events[s]&&this.events[s].notify(...o)}}class dg extends Ix{constructor(){super(...arguments),this.KeyframeResolver=z0}sortInstanceNodePosition(s,o){return s.compareDocumentPosition(o)&2?1:-1}getBaseTargetFromProps(s,o){return s.style?s.style[o]:void 0}removeValueFromRenderState(s,{vars:o,style:u}){delete o[s],delete u[s]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:s}=this.props;xe(s)&&(this.childSubscription=s.on("change",o=>{this.current&&(this.current.textContent=`${o}`)}))}}function $x(i){return window.getComputedStyle(i)}class t_ extends dg{constructor(){super(...arguments),this.type="html",this.renderInstance=$y}readValueFromInstance(s,o){if(Ga.has(o)){const u=uf(o);return u&&u.default||0}else{const u=$x(s),c=(Py(o)?u.getPropertyValue(o):u[o])||0;return typeof c=="string"?c.trim():c}}measureInstanceViewportBox(s,{transformPagePoint:o}){return I0(s,o)}build(s,o,u){Zc(s,o,u.transformTemplate)}scrapeMotionValuesFromProps(s,o,u){return Fc(s,o,u)}}class e_ extends dg{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Wt}getBaseTargetFromProps(s,o){return s[o]}readValueFromInstance(s,o){if(Ga.has(o)){const u=uf(o);return u&&u.default||0}return o=t0.has(o)?o:kc(o),s.getAttribute(o)}scrapeMotionValuesFromProps(s,o,u){return a0(s,o,u)}build(s,o,u){Kc(s,o,this.isSVGTag,u.transformTemplate)}renderInstance(s,o,u,c){e0(s,o,u,c)}mount(s){this.isSVGTag=Jc(s.tagName),super.mount(s)}}const n_=(i,s)=>qc(i)?new e_(s):new t_(s,{allowProjection:i!==D.Fragment}),a_=Mb({...S2,...Kx,...Cx,...Qx},n_),Vi=YS(a_),i_="_container_1c7bs_1",s_="_header_1c7bs_5",l_="_addButton_1c7bs_17",o_="_createForm_1c7bs_35",u_="_createInput_1c7bs_41",r_="_createButton_1c7bs_71",c_="_emptyState_1c7bs_101",f_="_projectRow_1c7bs_107",d_="_selected_1c7bs_127",h_="_expandArrow_1c7bs_134",m_="_expanded_1c7bs_141",p_="_projectName_1c7bs_145",y_="_taskCount_1c7bs_149",g_="_newTaskButton_1c7bs_155",v_="_taskRow_1c7bs_173",S_="_taskStatusIcon_1c7bs_202",b_="_taskTitle_1c7bs_206",T_="_dependencyBadge_1c7bs_213",x_="_emptyTasks_1c7bs_226",ie={container:i_,header:s_,addButton:l_,createForm:o_,createInput:u_,createButton:r_,emptyState:c_,projectRow:f_,selected:d_,expandArrow:h_,expanded:m_,projectName:p_,taskCount:y_,newTaskButton:g_,taskRow:v_,taskStatusIcon:S_,taskTitle:b_,dependencyBadge:T_,emptyTasks:x_},wy={pending:{color:"var(--text-tertiary)",icon:"○"},assigned:{color:"var(--accent-blue)",icon:"◎"},in_progress:{color:"var(--accent-green)",icon:"●"},review:{color:"var(--accent-yellow)",icon:"◉"},done:{color:"var(--accent-green)",icon:"✓"},failed:{color:"var(--accent-red)",icon:"✗"}};function __({viewMode:i,setViewMode:s}){const{projects:o,tasks:u,loadTasks:c,createProject:h}=qa(),[d,y]=D.useState(new Set),[p,m]=D.useState(!1),[v,S]=D.useState(""),b=i.kind==="project"?i.projectId:null,M=i.kind==="task"?i.taskId:null,L=O=>{y(k=>{const Y=new Set(k);return Y.has(O)?Y.delete(O):(Y.add(O),c(O)),Y})};D.useEffect(()=>{b&&!d.has(b)&&(y(O=>new Set(O).add(b)),c(b))},[b,d,c]);const z=()=>{v.trim()&&(h(v.trim()),S(""),m(!1))};return x.jsxs("div",{className:ie.container,children:[x.jsxs("div",{className:ie.header,children:[x.jsx("span",{children:"Projects"}),x.jsx("button",{className:ie.addButton,onClick:()=>m(!p),"aria-label":"Create project",title:"Create project",children:"+"})]}),p&&x.jsxs("div",{className:ie.createForm,children:[x.jsx("input",{type:"text",value:v,onChange:O=>S(O.target.value),onKeyDown:O=>O.key==="Enter"&&z(),placeholder:"Project name...",autoFocus:!0,className:ie.createInput}),x.jsx("button",{onClick:z,className:ie.createButton,children:"OK"})]}),o.length===0&&!p&&x.jsx("div",{className:ie.emptyState,children:"No projects. Click + to create one."}),o.map(O=>{const k=d.has(O.id),Y=u.filter(J=>J.projectId===O.id),G=b===O.id;return x.jsxs("div",{children:[x.jsxs("div",{onClick:()=>{L(O.id),s({kind:"project",projectId:O.id})},className:`${ie.projectRow} ${G?ie.selected:""}`,children:[x.jsx("span",{className:`${ie.expandArrow} ${k?ie.expanded:""}`,children:"▸"}),x.jsx("span",{className:ie.projectName,children:O.name}),x.jsx("span",{className:ie.taskCount,children:Y.length>0&&`${Y.filter(J=>J.status==="done").length}/${Y.length}`}),x.jsx("button",{onClick:J=>{J.stopPropagation(),s({kind:"new_task",projectId:O.id})},title:"New task",className:ie.newTaskButton,children:"+"})]}),x.jsx(ky,{children:k&&x.jsxs(Vi.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:"easeInOut"},style:{overflow:"hidden"},children:[Y.map((J,B)=>{const Z=wy[J.status]||wy.pending,Q=M===J.id;return x.jsxs(Vi.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{delay:B*.03,duration:.2},onClick:()=>s({kind:"task",taskId:J.id}),className:`${ie.taskRow} ${Q?ie.selected:""}`,children:[x.jsx("span",{className:ie.taskStatusIcon,style:{color:Z.color},children:Z.icon}),x.jsx("span",{className:ie.taskTitle,children:J.title}),J.dependsOn.length>0&&x.jsx("span",{className:ie.dependencyBadge,title:`Depends on: ${J.dependsOn.join(", ")}`,children:"dep"})]},J.id)}),Y.length===0&&x.jsx("div",{className:ie.emptyTasks,children:"No tasks yet"})]})})]},O.id)})]})}const A_="_container_12pne_1",E_="_tabBar_12pne_25",D_="_tab_12pne_25",j_="_active_12pne_51",M_="_content_12pne_57",Ba={container:A_,tabBar:E_,tab:D_,active:j_,content:M_};function C_({viewMode:i,setViewMode:s}){const[o,u]=D.useState("projects");return x.jsxs("div",{className:Ba.container,children:[x.jsxs("div",{className:Ba.tabBar,children:[x.jsx("button",{className:`${Ba.tab} ${o==="projects"?Ba.active:""}`,onClick:()=>u("projects"),children:"Projects"}),x.jsx("button",{className:`${Ba.tab} ${o==="environments"?Ba.active:""}`,onClick:()=>u("environments"),children:"Environments"})]}),x.jsx("div",{className:Ba.content,children:o==="projects"?x.jsx(__,{viewMode:i,setViewMode:s}):x.jsx(OS,{viewMode:i,setViewMode:s})})]})}const N_="_bar_o88a6_1",O_="_barColumn_o88a6_25",R_="_barRow_o88a6_50",z_="_input_o88a6_56",w_="_inputSmall_o88a6_84",V_="_select_o88a6_113",B_="_btnPrimary_o88a6_142",U_="_btnDanger_o88a6_168",L_="_badge_o88a6_200",k_="_statusText_o88a6_210",H_="_statusCompleted_o88a6_215",q_="_statusFailed_o88a6_219",G_="_statusBlocked_o88a6_223",Y_="_hintText_o88a6_228",at={bar:N_,barColumn:O_,barRow:R_,input:z_,inputSmall:w_,select:V_,btnPrimary:B_,btnDanger:U_,badge:L_,statusText:k_,statusCompleted:H_,statusFailed:q_,statusBlocked:G_,hintText:Y_};function X_({value:i,onChange:s}){return x.jsxs("select",{value:i,onChange:o=>s(o.target.value),className:at.select,children:[x.jsx("option",{value:"claude-code",children:"claude-code"}),x.jsx("option",{value:"copilot",children:"copilot"}),x.jsx("option",{value:"stub",children:"stub"})]})}function Z_({viewMode:i,setViewMode:s}){const{spawn:o,sendInput:u,kill:c,sessions:h,tasks:d,environments:y,createTask:p,startTask:m,approveTask:v,rejectTask:S}=qa(),[b,M]=D.useState(""),[L,z]=D.useState(i.kind==="new_chat"?i.runtime:"claude-code"),[O,k]=D.useState(""),[Y,G]=D.useState(""),[J,B]=D.useState(""),[Z,Q]=D.useState("");D.useEffect(()=>{i.kind==="new_chat"&&z(i.runtime)},[i]);const C=i.kind==="session"?h.find(ot=>ot.id===i.sessionId):void 0,K=i.kind==="task"?d.find(ot=>ot.id===i.taskId):void 0,lt=K!=null&&K.sessionId?h.find(ot=>ot.id===K.sessionId):void 0,gt=K?K.dependsOn.some(ot=>{const ut=d.find(wt=>wt.id===ot);return ut&&ut.status!=="done"}):!1;if(i.kind==="empty")return x.jsx("div",{className:at.bar,children:x.jsx("span",{className:at.hintText,children:"Select a session or click + to start"})});if(i.kind==="project")return x.jsx("div",{className:at.bar,children:x.jsx("span",{className:at.hintText,children:"Select a task or click + to create one"})});if(i.kind==="new_task"){const ot=ut=>{O.trim()&&(p(i.projectId,O.trim(),Y,J),k(""),G(""),B(""),s({kind:"project",projectId:i.projectId}))};return x.jsxs("div",{className:at.barColumn,children:[x.jsxs("div",{className:at.barRow,children:[x.jsx("span",{className:at.badge,children:"new task"}),x.jsx("input",{type:"text",value:O,onChange:ut=>k(ut.target.value),placeholder:"Task title...",autoFocus:!0,className:at.input}),x.jsxs("select",{value:J,onChange:ut=>B(ut.target.value),className:at.select,children:[x.jsx("option",{value:"",children:"Default env"}),y.map(ut=>x.jsx("option",{value:ut.id,children:ut.displayName},ut.id))]}),x.jsx("button",{onClick:()=>ot(),disabled:!O.trim(),className:at.btnPrimary,children:"Create"})]}),x.jsx("input",{type:"text",value:Y,onChange:ut=>G(ut.target.value),placeholder:"Description (optional)...",className:at.inputSmall})]})}if(i.kind==="task"&&K){if(K.status==="pending"&&gt){const ot=K.dependsOn.map(ut=>d.find(wt=>wt.id===ut)).filter(ut=>ut&&ut.status!=="done").map(ut=>ut.title);return x.jsx("div",{className:at.bar,children:x.jsxs("span",{className:at.statusBlocked,children:["Blocked by: ",ot.join(", ")]})})}if(K.status==="pending"||K.status==="assigned")return x.jsx("div",{className:at.bar,children:x.jsx("button",{onClick:()=>m(K.id),className:at.btnPrimary,children:"Start Task"})});if(K.status==="in_progress"){if((lt==null?void 0:lt.status)==="waiting_input"){const ut=wt=>{wt.preventDefault(),!(!b.trim()||!K.sessionId)&&(u(K.sessionId,b),M(""))};return x.jsxs("form",{onSubmit:ut,className:at.bar,children:[x.jsx("input",{type:"text",value:b,onChange:wt=>M(wt.target.value),placeholder:"Type a message...",autoFocus:!0,className:at.input}),x.jsx("button",{type:"submit",disabled:!b.trim(),className:at.btnPrimary,children:"Send"}),x.jsx("button",{type:"button",onClick:()=>K.sessionId&&c(K.sessionId),className:at.btnDanger,children:"Stop"})]})}return x.jsxs("div",{className:at.bar,children:[x.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:at.input}),x.jsx("button",{onClick:()=>K.sessionId&&c(K.sessionId),className:at.btnDanger,children:"Stop"})]})}if(K.status==="review")return x.jsxs("div",{className:at.bar,children:[x.jsx("input",{type:"text",value:Z,onChange:ot=>Q(ot.target.value),placeholder:"Rejection notes (optional)...",className:at.input}),x.jsx("button",{onClick:()=>{v(K.id)},className:at.btnPrimary,children:"Approve"}),x.jsx("button",{onClick:()=>{S(K.id,Z),Q("")},className:at.btnDanger,children:"Reject"})]});if(K.status==="done")return x.jsxs("div",{className:at.bar,children:[x.jsx("span",{className:`${at.statusText} ${at.statusCompleted}`,children:"Task completed"}),x.jsx("button",{onClick:()=>s({kind:"new_task",projectId:K.projectId}),className:at.btnPrimary,children:"+ New Task"})]});if(K.status==="failed")return x.jsxs("div",{className:at.bar,children:[x.jsx("span",{className:`${at.statusText} ${at.statusFailed}`,children:"Task failed"}),x.jsx("button",{onClick:()=>m(K.id),className:at.btnPrimary,children:"Retry"})]})}if(i.kind==="new_chat"){const ot=ut=>{ut.preventDefault(),b.trim()&&(o(i.environmentId,b,void 0,L),M(""))};return x.jsxs("form",{onSubmit:ot,className:at.bar,children:[x.jsx("span",{className:at.badge,children:"new chat"}),x.jsx("input",{type:"text",value:b,onChange:ut=>M(ut.target.value),placeholder:"Enter prompt...",autoFocus:!0,className:at.input}),x.jsx(X_,{value:L,onChange:z}),x.jsx("button",{type:"submit",disabled:!b.trim(),className:at.btnPrimary,children:"Go"})]})}if(i.kind==="session"){const ot=(C==null?void 0:C.status)==="running",ut=(C==null?void 0:C.status)==="waiting_input",wt=C!==void 0&&["completed","failed","killed"].includes(C.status);if(ot)return x.jsxs("div",{className:at.bar,children:[x.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:at.input}),x.jsx("button",{onClick:()=>c(i.sessionId),className:at.btnDanger,title:"Stop session",children:"Stop"})]});if(ut){const Jt=w=>{w.preventDefault(),b.trim()&&(u(i.sessionId,b),M(""))};return x.jsxs("form",{onSubmit:Jt,className:at.bar,children:[x.jsx("input",{type:"text",value:b,onChange:w=>M(w.target.value),placeholder:"Type a message...",autoFocus:!0,className:at.input}),x.jsx("button",{type:"submit",disabled:!b.trim(),className:at.btnPrimary,children:"Send"}),x.jsx("button",{type:"button",onClick:()=>c(i.sessionId),className:at.btnDanger,title:"Stop session",children:"Stop"})]})}if(wt&&C)return x.jsxs("div",{className:at.bar,children:[x.jsxs("span",{className:`${at.statusText} ${at.hintText}`,children:["Session ",C.status]}),x.jsx("button",{onClick:()=>s({kind:"new_chat",environmentId:C.environmentId,runtime:C.runtime}),className:at.btnPrimary,children:"+ New Chat"})]})}return x.jsx("div",{className:at.bar,children:x.jsx("span",{className:at.hintText,children:"Loading..."})})}function Oc(){Oc=function(c,h){return new o(c,void 0,h)};var i=RegExp.prototype,s=new WeakMap;function o(c,h,d){var y=new RegExp(c,h);return s.set(y,d||s.get(c)),No(y,o.prototype)}function u(c,h){var d=s.get(h);return Object.keys(d).reduce(function(y,p){var m=d[p];if(typeof m=="number")y[p]=c[m];else{for(var v=0;c[m[v]]===void 0&&v+1<m.length;)v++;y[p]=c[m[v]]}return y},Object.create(null))}return(function(c,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(h&&h.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),h&&No(c,h)})(o,RegExp),o.prototype.exec=function(c){var h=i.exec.call(this,c);if(h){h.groups=u(h,this);var d=h.indices;d&&(d.groups=u(d,this))}return h},o.prototype[Symbol.replace]=function(c,h){if(typeof h=="string"){var d=s.get(this);return i[Symbol.replace].call(this,c,h.replace(/\$<([^>]+)>/g,function(p,m){var v=d[m];return"$"+(Array.isArray(v)?v.join("$"):v)}))}if(typeof h=="function"){var y=this;return i[Symbol.replace].call(this,c,function(){var p=arguments;return typeof p[p.length-1]!="object"&&(p=[].slice.call(p)).push(u(p,y)),h.apply(this,p)})}return i[Symbol.replace].call(this,c,h)},Oc.apply(this,arguments)}function No(i,s){return No=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,u){return o.__proto__=u,o},No(i,s)}function Vy(i,s){(s==null||s>i.length)&&(s=i.length);for(var o=0,u=new Array(s);o<s;o++)u[o]=i[o];return u}function hc(i,s){var o=typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(o)return(o=o.call(i)).next.bind(o);if(Array.isArray(i)||(o=(function(c,h){if(c){if(typeof c=="string")return Vy(c,h);var d=Object.prototype.toString.call(c).slice(8,-1);return d==="Object"&&c.constructor&&(d=c.constructor.name),d==="Map"||d==="Set"?Array.from(c):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?Vy(c,h):void 0}})(i))||s){o&&(i=o);var u=0;return function(){return u>=i.length?{done:!0}:{done:!1,value:i[u++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
145
+ `),()=>{document.head.removeChild(v)}},[s]),x.jsx(RS,{isPresent:s,childRef:u,sizeRef:c,children:D.cloneElement(i,{ref:u})})}const wS=({children:i,initial:s,isPresent:o,onExitComplete:u,custom:c,presenceAffectsLayout:h,mode:d})=>{const y=wc(VS),p=D.useId(),m=D.useCallback(S=>{y.set(S,!0);for(const b of y.values())if(!b)return;u&&u()},[y,u]),v=D.useMemo(()=>({id:p,initial:s,isPresent:o,custom:c,onExitComplete:m,register:S=>(y.set(S,!1),()=>y.delete(S))}),h?[Math.random(),m]:[o,m]);return D.useMemo(()=>{y.forEach((S,b)=>y.set(b,!1))},[o]),D.useEffect(()=>{!o&&!y.size&&u&&u()},[o]),d==="popLayout"&&(i=x.jsx(zS,{isPresent:o,children:i})),x.jsx(Oo.Provider,{value:v,children:i})};function VS(){return new Map}function Uy(i=!0){const s=D.useContext(Oo);if(s===null)return[!0,null];const{isPresent:o,onExitComplete:u,register:c}=s,h=D.useId();D.useEffect(()=>{i&&c(h)},[i]);const d=D.useCallback(()=>i&&u&&u(h),[h,u,i]);return!o&&u?[!1,d]:[!0]}const yo=i=>i.key||"";function Sp(i){const s=[];return D.Children.forEach(i,o=>{D.isValidElement(o)&&s.push(o)}),s}const Bc=typeof window<"u",Ly=Bc?D.useLayoutEffect:D.useEffect,ky=({children:i,custom:s,initial:o=!0,onExitComplete:u,presenceAffectsLayout:c=!0,mode:h="sync",propagate:d=!1})=>{const[y,p]=Uy(d),m=D.useMemo(()=>Sp(i),[i]),v=d&&!y?[]:m.map(yo),S=D.useRef(!0),b=D.useRef(m),M=wc(()=>new Map),[L,z]=D.useState(m),[O,k]=D.useState(m);Ly(()=>{S.current=!1,b.current=m;for(let J=0;J<O.length;J++){const B=yo(O[J]);v.includes(B)?M.delete(B):M.get(B)!==!0&&M.set(B,!1)}},[O,v.length,v.join("-")]);const Y=[];if(m!==L){let J=[...m];for(let B=0;B<O.length;B++){const Z=O[B],Q=yo(Z);v.includes(Q)||(J.splice(B,0,Z),Y.push(Z))}h==="wait"&&Y.length&&(J=Y),k(Sp(J)),z(m);return}const{forceRender:G}=D.useContext(zc);return x.jsx(x.Fragment,{children:O.map(J=>{const B=yo(J),Z=d&&!y?!1:m===O||v.includes(B),Q=()=>{if(M.has(B))M.set(B,!0);else return;let C=!0;M.forEach(K=>{K||(C=!1)}),C&&(G==null||G(),k(b.current),d&&(p==null||p()),u&&u())};return x.jsx(wS,{isPresent:Z,initial:!S.current||o?void 0:!1,custom:Z?void 0:s,presenceAffectsLayout:c,mode:h,onExitComplete:Z?void 0:Q,children:J},B)})})},Ze=i=>i;let Hy=Ze;const BS={useManualTiming:!1};function US(i){let s=new Set,o=new Set,u=!1,c=!1;const h=new WeakSet;let d={delta:0,timestamp:0,isProcessing:!1};function y(m){h.has(m)&&(p.schedule(m),i()),m(d)}const p={schedule:(m,v=!1,S=!1)=>{const M=S&&u?s:o;return v&&h.add(m),M.has(m)||M.add(m),m},cancel:m=>{o.delete(m),h.delete(m)},process:m=>{if(d=m,u){c=!0;return}u=!0,[s,o]=[o,s],s.forEach(y),s.clear(),u=!1,c&&(c=!1,p.process(m))}};return p}const go=["read","resolveKeyframes","update","preRender","render","postRender"],LS=40;function qy(i,s){let o=!1,u=!0;const c={delta:0,timestamp:0,isProcessing:!1},h=()=>o=!0,d=go.reduce((k,Y)=>(k[Y]=US(h),k),{}),{read:y,resolveKeyframes:p,update:m,preRender:v,render:S,postRender:b}=d,M=()=>{const k=performance.now();o=!1,c.delta=u?1e3/60:Math.max(Math.min(k-c.timestamp,LS),1),c.timestamp=k,c.isProcessing=!0,y.process(c),p.process(c),m.process(c),v.process(c),S.process(c),b.process(c),c.isProcessing=!1,o&&s&&(u=!1,i(M))},L=()=>{o=!0,u=!0,c.isProcessing||i(M)};return{schedule:go.reduce((k,Y)=>{const G=d[Y];return k[Y]=(J,B=!1,Z=!1)=>(o||L(),G.schedule(J,B,Z)),k},{}),cancel:k=>{for(let Y=0;Y<go.length;Y++)d[go[Y]].cancel(k)},state:c,steps:d}}const{schedule:Lt,cancel:ha,state:Se,steps:tc}=qy(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ze,!0),Gy=D.createContext({strict:!1}),bp={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"]},Bi={};for(const i in bp)Bi[i]={isEnabled:s=>bp[i].some(o=>!!s[o])};function kS(i){for(const s in i)Bi[s]={...Bi[s],...i[s]}}const HS=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function _o(i){return i.startsWith("while")||i.startsWith("drag")&&i!=="draggable"||i.startsWith("layout")||i.startsWith("onTap")||i.startsWith("onPan")||i.startsWith("onLayout")||HS.has(i)}let Yy=i=>!_o(i);function qS(i){i&&(Yy=s=>s.startsWith("on")?!_o(s):i(s))}try{qS(require("@emotion/is-prop-valid").default)}catch{}function GS(i,s,o){const u={};for(const c in i)c==="values"&&typeof i.values=="object"||(Yy(c)||o===!0&&_o(c)||!s&&!_o(c)||i.draggable&&c.startsWith("onDrag"))&&(u[c]=i[c]);return u}function YS(i){if(typeof Proxy>"u")return i;const s=new Map,o=(...u)=>i(...u);return new Proxy(o,{get:(u,c)=>c==="create"?i:(s.has(c)||s.set(c,i(c)),s.get(c))})}const Ro=D.createContext({});function Ys(i){return typeof i=="string"||Array.isArray(i)}function zo(i){return i!==null&&typeof i=="object"&&typeof i.start=="function"}const Uc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Lc=["initial",...Uc];function wo(i){return zo(i.animate)||Lc.some(s=>Ys(i[s]))}function Xy(i){return!!(wo(i)||i.variants)}function XS(i,s){if(wo(i)){const{initial:o,animate:u}=i;return{initial:o===!1||Ys(o)?o:void 0,animate:Ys(u)?u:void 0}}return i.inherit!==!1?s:{}}function ZS(i){const{initial:s,animate:o}=XS(i,D.useContext(Ro));return D.useMemo(()=>({initial:s,animate:o}),[Tp(s),Tp(o)])}function Tp(i){return Array.isArray(i)?i.join(" "):i}const KS=Symbol.for("motionComponentSymbol");function Ni(i){return i&&typeof i=="object"&&Object.prototype.hasOwnProperty.call(i,"current")}function QS(i,s,o){return D.useCallback(u=>{u&&i.onMount&&i.onMount(u),s&&(u?s.mount(u):s.unmount()),o&&(typeof o=="function"?o(u):Ni(o)&&(o.current=u))},[s])}const kc=i=>i.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),JS="framerAppearId",Zy="data-"+kc(JS),{schedule:Hc}=qy(queueMicrotask,!1),Ky=D.createContext({});function FS(i,s,o,u,c){var h,d;const{visualElement:y}=D.useContext(Ro),p=D.useContext(Gy),m=D.useContext(Oo),v=D.useContext(Vc).reducedMotion,S=D.useRef(null);u=u||p.renderer,!S.current&&u&&(S.current=u(i,{visualState:s,parent:y,props:o,presenceContext:m,blockInitialAnimation:m?m.initial===!1:!1,reducedMotionConfig:v}));const b=S.current,M=D.useContext(Ky);b&&!b.projection&&c&&(b.type==="html"||b.type==="svg")&&PS(S.current,o,c,M);const L=D.useRef(!1);D.useInsertionEffect(()=>{b&&L.current&&b.update(o,m)});const z=o[Zy],O=D.useRef(!!z&&!(!((h=window.MotionHandoffIsComplete)===null||h===void 0)&&h.call(window,z))&&((d=window.MotionHasOptimisedAnimation)===null||d===void 0?void 0:d.call(window,z)));return Ly(()=>{b&&(L.current=!0,window.MotionIsMounted=!0,b.updateFeatures(),Hc.render(b.render),O.current&&b.animationState&&b.animationState.animateChanges())}),D.useEffect(()=>{b&&(!O.current&&b.animationState&&b.animationState.animateChanges(),O.current&&(queueMicrotask(()=>{var k;(k=window.MotionHandoffMarkAsComplete)===null||k===void 0||k.call(window,z)}),O.current=!1))}),b}function PS(i,s,o,u){const{layoutId:c,layout:h,drag:d,dragConstraints:y,layoutScroll:p,layoutRoot:m}=s;i.projection=new o(i.latestValues,s["data-framer-portal-id"]?void 0:Qy(i.parent)),i.projection.setOptions({layoutId:c,layout:h,alwaysMeasureLayout:!!d||y&&Ni(y),visualElement:i,animationType:typeof h=="string"?h:"both",initialPromotionConfig:u,layoutScroll:p,layoutRoot:m})}function Qy(i){if(i)return i.options.allowProjection!==!1?i.projection:Qy(i.parent)}function WS({preloadedFeatures:i,createVisualElement:s,useRender:o,useVisualState:u,Component:c}){var h,d;i&&kS(i);function y(m,v){let S;const b={...D.useContext(Vc),...m,layoutId:IS(m)},{isStatic:M}=b,L=ZS(m),z=u(m,M);if(!M&&Bc){$S();const O=tb(b);S=O.MeasureLayout,L.visualElement=FS(c,z,b,s,O.ProjectionNode)}return x.jsxs(Ro.Provider,{value:L,children:[S&&L.visualElement?x.jsx(S,{visualElement:L.visualElement,...b}):null,o(c,m,QS(z,L.visualElement,v),z,M,L.visualElement)]})}y.displayName=`motion.${typeof c=="string"?c:`create(${(d=(h=c.displayName)!==null&&h!==void 0?h:c.name)!==null&&d!==void 0?d:""})`}`;const p=D.forwardRef(y);return p[KS]=c,p}function IS({layoutId:i}){const s=D.useContext(zc).id;return s&&i!==void 0?s+"-"+i:i}function $S(i,s){D.useContext(Gy).strict}function tb(i){const{drag:s,layout:o}=Bi;if(!s&&!o)return{};const u={...s,...o};return{MeasureLayout:s!=null&&s.isEnabled(i)||o!=null&&o.isEnabled(i)?u.MeasureLayout:void 0,ProjectionNode:u.ProjectionNode}}const eb=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function qc(i){return typeof i!="string"||i.includes("-")?!1:!!(eb.indexOf(i)>-1||/[A-Z]/u.test(i))}function xp(i){const s=[{},{}];return i==null||i.values.forEach((o,u)=>{s[0][u]=o.get(),s[1][u]=o.getVelocity()}),s}function Gc(i,s,o,u){if(typeof s=="function"){const[c,h]=xp(u);s=s(o!==void 0?o:i.custom,c,h)}if(typeof s=="string"&&(s=i.variants&&i.variants[s]),typeof s=="function"){const[c,h]=xp(u);s=s(o!==void 0?o:i.custom,c,h)}return s}const pc=i=>Array.isArray(i),nb=i=>!!(i&&typeof i=="object"&&i.mix&&i.toValue),ab=i=>pc(i)?i[i.length-1]||0:i,xe=i=>!!(i&&i.getVelocity);function bo(i){const s=xe(i)?i.get():i;return nb(s)?s.toValue():s}function ib({scrapeMotionValuesFromProps:i,createRenderState:s,onUpdate:o},u,c,h){const d={latestValues:sb(u,c,h,i),renderState:s()};return o&&(d.onMount=y=>o({props:u,current:y,...d}),d.onUpdate=y=>o(y)),d}const Jy=i=>(s,o)=>{const u=D.useContext(Ro),c=D.useContext(Oo),h=()=>ib(i,s,u,c);return o?h():wc(h)};function sb(i,s,o,u){const c={},h=u(i,{});for(const b in h)c[b]=bo(h[b]);let{initial:d,animate:y}=i;const p=wo(i),m=Xy(i);s&&m&&!p&&i.inherit!==!1&&(d===void 0&&(d=s.initial),y===void 0&&(y=s.animate));let v=o?o.initial===!1:!1;v=v||d===!1;const S=v?y:d;if(S&&typeof S!="boolean"&&!zo(S)){const b=Array.isArray(S)?S:[S];for(let M=0;M<b.length;M++){const L=Gc(i,b[M]);if(L){const{transitionEnd:z,transition:O,...k}=L;for(const Y in k){let G=k[Y];if(Array.isArray(G)){const J=v?G.length-1:0;G=G[J]}G!==null&&(c[Y]=G)}for(const Y in z)c[Y]=z[Y]}}}return c}const ki=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ga=new Set(ki),Fy=i=>s=>typeof s=="string"&&s.startsWith(i),Py=Fy("--"),lb=Fy("var(--"),Yc=i=>lb(i)?ob.test(i.split("/*")[0].trim()):!1,ob=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Wy=(i,s)=>s&&typeof i=="number"?s.transform(i):i,Hn=(i,s,o)=>o>s?s:o<i?i:o,Hi={test:i=>typeof i=="number",parse:parseFloat,transform:i=>i},Xs={...Hi,transform:i=>Hn(0,1,i)},vo={...Hi,default:1},Js=i=>({test:s=>typeof s=="string"&&s.endsWith(i)&&s.split(" ").length===1,parse:parseFloat,transform:s=>`${s}${i}`}),da=Js("deg"),yn=Js("%"),st=Js("px"),ub=Js("vh"),rb=Js("vw"),_p={...yn,parse:i=>yn.parse(i)/100,transform:i=>yn.transform(i*100)},cb={borderWidth:st,borderTopWidth:st,borderRightWidth:st,borderBottomWidth:st,borderLeftWidth:st,borderRadius:st,radius:st,borderTopLeftRadius:st,borderTopRightRadius:st,borderBottomRightRadius:st,borderBottomLeftRadius:st,width:st,maxWidth:st,height:st,maxHeight:st,top:st,right:st,bottom:st,left:st,padding:st,paddingTop:st,paddingRight:st,paddingBottom:st,paddingLeft:st,margin:st,marginTop:st,marginRight:st,marginBottom:st,marginLeft:st,backgroundPositionX:st,backgroundPositionY:st},fb={rotate:da,rotateX:da,rotateY:da,rotateZ:da,scale:vo,scaleX:vo,scaleY:vo,scaleZ:vo,skew:da,skewX:da,skewY:da,distance:st,translateX:st,translateY:st,translateZ:st,x:st,y:st,z:st,perspective:st,transformPerspective:st,opacity:Xs,originX:_p,originY:_p,originZ:st},Ap={...Hi,transform:Math.round},Xc={...cb,...fb,zIndex:Ap,size:st,fillOpacity:Xs,strokeOpacity:Xs,numOctaves:Ap},db={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},hb=ki.length;function mb(i,s,o){let u="",c=!0;for(let h=0;h<hb;h++){const d=ki[h],y=i[d];if(y===void 0)continue;let p=!0;if(typeof y=="number"?p=y===(d.startsWith("scale")?1:0):p=parseFloat(y)===0,!p||o){const m=Wy(y,Xc[d]);if(!p){c=!1;const v=db[d]||d;u+=`${v}(${m}) `}o&&(s[d]=m)}}return u=u.trim(),o?u=o(s,c?"":u):c&&(u="none"),u}function Zc(i,s,o){const{style:u,vars:c,transformOrigin:h}=i;let d=!1,y=!1;for(const p in s){const m=s[p];if(Ga.has(p)){d=!0;continue}else if(Py(p)){c[p]=m;continue}else{const v=Wy(m,Xc[p]);p.startsWith("origin")?(y=!0,h[p]=v):u[p]=v}}if(s.transform||(d||o?u.transform=mb(s,i.transform,o):u.transform&&(u.transform="none")),y){const{originX:p="50%",originY:m="50%",originZ:v=0}=h;u.transformOrigin=`${p} ${m} ${v}`}}const pb={offset:"stroke-dashoffset",array:"stroke-dasharray"},yb={offset:"strokeDashoffset",array:"strokeDasharray"};function gb(i,s,o=1,u=0,c=!0){i.pathLength=1;const h=c?pb:yb;i[h.offset]=st.transform(-u);const d=st.transform(s),y=st.transform(o);i[h.array]=`${d} ${y}`}function Ep(i,s,o){return typeof i=="string"?i:st.transform(s+o*i)}function vb(i,s,o){const u=Ep(s,i.x,i.width),c=Ep(o,i.y,i.height);return`${u} ${c}`}function Kc(i,{attrX:s,attrY:o,attrScale:u,originX:c,originY:h,pathLength:d,pathSpacing:y=1,pathOffset:p=0,...m},v,S){if(Zc(i,m,S),v){i.style.viewBox&&(i.attrs.viewBox=i.style.viewBox);return}i.attrs=i.style,i.style={};const{attrs:b,style:M,dimensions:L}=i;b.transform&&(L&&(M.transform=b.transform),delete b.transform),L&&(c!==void 0||h!==void 0||M.transform)&&(M.transformOrigin=vb(L,c!==void 0?c:.5,h!==void 0?h:.5)),s!==void 0&&(b.x=s),o!==void 0&&(b.y=o),u!==void 0&&(b.scale=u),d!==void 0&&gb(b,d,y,p,!1)}const Qc=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Iy=()=>({...Qc(),attrs:{}}),Jc=i=>typeof i=="string"&&i.toLowerCase()==="svg";function $y(i,{style:s,vars:o},u,c){Object.assign(i.style,s,c&&c.getProjectionStyles(u));for(const h in o)i.style.setProperty(h,o[h])}const t0=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function e0(i,s,o,u){$y(i,s,void 0,u);for(const c in s.attrs)i.setAttribute(t0.has(c)?c:kc(c),s.attrs[c])}const Ao={};function Sb(i){Object.assign(Ao,i)}function n0(i,{layout:s,layoutId:o}){return Ga.has(i)||i.startsWith("origin")||(s||o!==void 0)&&(!!Ao[i]||i==="opacity")}function Fc(i,s,o){var u;const{style:c}=i,h={};for(const d in c)(xe(c[d])||s.style&&xe(s.style[d])||n0(d,i)||((u=o==null?void 0:o.getValue(d))===null||u===void 0?void 0:u.liveStyle)!==void 0)&&(h[d]=c[d]);return h}function a0(i,s,o){const u=Fc(i,s,o);for(const c in i)if(xe(i[c])||xe(s[c])){const h=ki.indexOf(c)!==-1?"attr"+c.charAt(0).toUpperCase()+c.substring(1):c;u[h]=i[c]}return u}function bb(i,s){try{s.dimensions=typeof i.getBBox=="function"?i.getBBox():i.getBoundingClientRect()}catch{s.dimensions={x:0,y:0,width:0,height:0}}}const Dp=["x","y","width","height","cx","cy","r"],Tb={useVisualState:Jy({scrapeMotionValuesFromProps:a0,createRenderState:Iy,onUpdate:({props:i,prevProps:s,current:o,renderState:u,latestValues:c})=>{if(!o)return;let h=!!i.drag;if(!h){for(const y in c)if(Ga.has(y)){h=!0;break}}if(!h)return;let d=!s;if(s)for(let y=0;y<Dp.length;y++){const p=Dp[y];i[p]!==s[p]&&(d=!0)}d&&Lt.read(()=>{bb(o,u),Lt.render(()=>{Kc(u,c,Jc(o.tagName),i.transformTemplate),e0(o,u)})})}})},xb={useVisualState:Jy({scrapeMotionValuesFromProps:Fc,createRenderState:Qc})};function i0(i,s,o){for(const u in s)!xe(s[u])&&!n0(u,o)&&(i[u]=s[u])}function _b({transformTemplate:i},s){return D.useMemo(()=>{const o=Qc();return Zc(o,s,i),Object.assign({},o.vars,o.style)},[s])}function Ab(i,s){const o=i.style||{},u={};return i0(u,o,i),Object.assign(u,_b(i,s)),u}function Eb(i,s){const o={},u=Ab(i,s);return i.drag&&i.dragListener!==!1&&(o.draggable=!1,u.userSelect=u.WebkitUserSelect=u.WebkitTouchCallout="none",u.touchAction=i.drag===!0?"none":`pan-${i.drag==="x"?"y":"x"}`),i.tabIndex===void 0&&(i.onTap||i.onTapStart||i.whileTap)&&(o.tabIndex=0),o.style=u,o}function Db(i,s,o,u){const c=D.useMemo(()=>{const h=Iy();return Kc(h,s,Jc(u),i.transformTemplate),{...h.attrs,style:{...h.style}}},[s]);if(i.style){const h={};i0(h,i.style,i),c.style={...h,...c.style}}return c}function jb(i=!1){return(o,u,c,{latestValues:h},d)=>{const p=(qc(o)?Db:Eb)(u,h,d,o),m=GS(u,typeof o=="string",i),v=o!==D.Fragment?{...m,...p,ref:c}:{},{children:S}=u,b=D.useMemo(()=>xe(S)?S.get():S,[S]);return D.createElement(o,{...v,children:b})}}function Mb(i,s){return function(u,{forwardMotionProps:c}={forwardMotionProps:!1}){const d={...qc(u)?Tb:xb,preloadedFeatures:i,useRender:jb(c),createVisualElement:s,Component:u};return WS(d)}}function s0(i,s){if(!Array.isArray(s))return!1;const o=s.length;if(o!==i.length)return!1;for(let u=0;u<o;u++)if(s[u]!==i[u])return!1;return!0}function Vo(i,s,o){const u=i.getProps();return Gc(u,s,o!==void 0?o:u.custom,i)}function Pc(i,s){return i?i[s]||i.default||i:void 0}const l0=new Set(["width","height","top","left","right","bottom",...ki]);let To;function Cb(){To=void 0}const gn={now:()=>(To===void 0&&gn.set(Se.isProcessing||BS.useManualTiming?Se.timestamp:performance.now()),To),set:i=>{To=i,queueMicrotask(Cb)}};function Wc(i,s){i.indexOf(s)===-1&&i.push(s)}function Ic(i,s){const o=i.indexOf(s);o>-1&&i.splice(o,1)}class $c{constructor(){this.subscriptions=[]}add(s){return Wc(this.subscriptions,s),()=>Ic(this.subscriptions,s)}notify(s,o,u){const c=this.subscriptions.length;if(c)if(c===1)this.subscriptions[0](s,o,u);else for(let h=0;h<c;h++){const d=this.subscriptions[h];d&&d(s,o,u)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function o0(i,s){return s?i*(1e3/s):0}const jp=30,Nb=i=>!isNaN(parseFloat(i));class Ob{constructor(s,o={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(u,c=!0)=>{const h=gn.now();this.updatedAt!==h&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(u),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),c&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(s),this.owner=o.owner}setCurrent(s){this.current=s,this.updatedAt=gn.now(),this.canTrackVelocity===null&&s!==void 0&&(this.canTrackVelocity=Nb(this.current))}setPrevFrameValue(s=this.current){this.prevFrameValue=s,this.prevUpdatedAt=this.updatedAt}onChange(s){return this.on("change",s)}on(s,o){this.events[s]||(this.events[s]=new $c);const u=this.events[s].add(o);return s==="change"?()=>{u(),Lt.read(()=>{this.events.change.getSize()||this.stop()})}:u}clearListeners(){for(const s in this.events)this.events[s].clear()}attach(s,o){this.passiveEffect=s,this.stopPassiveEffect=o}set(s,o=!0){!o||!this.passiveEffect?this.updateAndNotify(s,o):this.passiveEffect(s,this.updateAndNotify)}setWithVelocity(s,o,u){this.set(o),this.prev=void 0,this.prevFrameValue=s,this.prevUpdatedAt=this.updatedAt-u}jump(s,o=!0){this.updateAndNotify(s),this.prev=s,this.prevUpdatedAt=this.prevFrameValue=void 0,o&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const s=gn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||s-this.updatedAt>jp)return 0;const o=Math.min(this.updatedAt-this.prevUpdatedAt,jp);return o0(parseFloat(this.current)-parseFloat(this.prevFrameValue),o)}start(s){return this.stop(),new Promise(o=>{this.hasAnimated=!0,this.animation=s(o),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Zs(i,s){return new Ob(i,s)}function Rb(i,s,o){i.hasValue(s)?i.getValue(s).set(o):i.addValue(s,Zs(o))}function zb(i,s){const o=Vo(i,s);let{transitionEnd:u={},transition:c={},...h}=o||{};h={...h,...u};for(const d in h){const y=ab(h[d]);Rb(i,d,y)}}function wb(i){return!!(xe(i)&&i.add)}function yc(i,s){const o=i.getValue("willChange");if(wb(o))return o.add(s)}function u0(i){return i.props[Zy]}function tf(i){let s;return()=>(s===void 0&&(s=i()),s)}const Vb=tf(()=>window.ScrollTimeline!==void 0);class Bb{constructor(s){this.stop=()=>this.runAll("stop"),this.animations=s.filter(Boolean)}get finished(){return Promise.all(this.animations.map(s=>"finished"in s?s.finished:s))}getAll(s){return this.animations[0][s]}setAll(s,o){for(let u=0;u<this.animations.length;u++)this.animations[u][s]=o}attachTimeline(s,o){const u=this.animations.map(c=>{if(Vb()&&c.attachTimeline)return c.attachTimeline(s);if(typeof o=="function")return o(c)});return()=>{u.forEach((c,h)=>{c&&c(),this.animations[h].stop()})}}get time(){return this.getAll("time")}set time(s){this.setAll("time",s)}get speed(){return this.getAll("speed")}set speed(s){this.setAll("speed",s)}get startTime(){return this.getAll("startTime")}get duration(){let s=0;for(let o=0;o<this.animations.length;o++)s=Math.max(s,this.animations[o].duration);return s}runAll(s){this.animations.forEach(o=>o[s]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Ub extends Bb{then(s,o){return Promise.all(this.animations).then(s).catch(o)}}const Ln=i=>i*1e3,kn=i=>i/1e3;function ef(i){return typeof i=="function"}function Mp(i,s){i.timeline=s,i.onfinish=null}const nf=i=>Array.isArray(i)&&typeof i[0]=="number",Lb={linearEasing:void 0};function kb(i,s){const o=tf(i);return()=>{var u;return(u=Lb[s])!==null&&u!==void 0?u:o()}}const Eo=kb(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ui=(i,s,o)=>{const u=s-i;return u===0?1:(o-i)/u},r0=(i,s,o=10)=>{let u="";const c=Math.max(Math.round(s/o),2);for(let h=0;h<c;h++)u+=i(Ui(0,c-1,h))+", ";return`linear(${u.substring(0,u.length-2)})`};function c0(i){return!!(typeof i=="function"&&Eo()||!i||typeof i=="string"&&(i in gc||Eo())||nf(i)||Array.isArray(i)&&i.every(c0))}const Bs=([i,s,o,u])=>`cubic-bezier(${i}, ${s}, ${o}, ${u})`,gc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Bs([0,.65,.55,1]),circOut:Bs([.55,0,1,.45]),backIn:Bs([.31,.01,.66,-.59]),backOut:Bs([.33,1.53,.69,.99])};function f0(i,s){if(i)return typeof i=="function"&&Eo()?r0(i,s):nf(i)?Bs(i):Array.isArray(i)?i.map(o=>f0(o,s)||gc.easeOut):gc[i]}const d0=(i,s,o)=>(((1-3*o+3*s)*i+(3*o-6*s))*i+3*s)*i,Hb=1e-7,qb=12;function Gb(i,s,o,u,c){let h,d,y=0;do d=s+(o-s)/2,h=d0(d,u,c)-i,h>0?o=d:s=d;while(Math.abs(h)>Hb&&++y<qb);return d}function Fs(i,s,o,u){if(i===s&&o===u)return Ze;const c=h=>Gb(h,0,1,i,o);return h=>h===0||h===1?h:d0(c(h),s,u)}const h0=i=>s=>s<=.5?i(2*s)/2:(2-i(2*(1-s)))/2,m0=i=>s=>1-i(1-s),p0=Fs(.33,1.53,.69,.99),af=m0(p0),y0=h0(af),g0=i=>(i*=2)<1?.5*af(i):.5*(2-Math.pow(2,-10*(i-1))),sf=i=>1-Math.sin(Math.acos(i)),v0=m0(sf),S0=h0(sf),b0=i=>/^0[^.\s]+$/u.test(i);function Yb(i){return typeof i=="number"?i===0:i!==null?i==="none"||i==="0"||b0(i):!0}const ks=i=>Math.round(i*1e5)/1e5,lf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Xb(i){return i==null}const Zb=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,of=(i,s)=>o=>!!(typeof o=="string"&&Zb.test(o)&&o.startsWith(i)||s&&!Xb(o)&&Object.prototype.hasOwnProperty.call(o,s)),T0=(i,s,o)=>u=>{if(typeof u!="string")return u;const[c,h,d,y]=u.match(lf);return{[i]:parseFloat(c),[s]:parseFloat(h),[o]:parseFloat(d),alpha:y!==void 0?parseFloat(y):1}},Kb=i=>Hn(0,255,i),ec={...Hi,transform:i=>Math.round(Kb(i))},ka={test:of("rgb","red"),parse:T0("red","green","blue"),transform:({red:i,green:s,blue:o,alpha:u=1})=>"rgba("+ec.transform(i)+", "+ec.transform(s)+", "+ec.transform(o)+", "+ks(Xs.transform(u))+")"};function Qb(i){let s="",o="",u="",c="";return i.length>5?(s=i.substring(1,3),o=i.substring(3,5),u=i.substring(5,7),c=i.substring(7,9)):(s=i.substring(1,2),o=i.substring(2,3),u=i.substring(3,4),c=i.substring(4,5),s+=s,o+=o,u+=u,c+=c),{red:parseInt(s,16),green:parseInt(o,16),blue:parseInt(u,16),alpha:c?parseInt(c,16)/255:1}}const vc={test:of("#"),parse:Qb,transform:ka.transform},Oi={test:of("hsl","hue"),parse:T0("hue","saturation","lightness"),transform:({hue:i,saturation:s,lightness:o,alpha:u=1})=>"hsla("+Math.round(i)+", "+yn.transform(ks(s))+", "+yn.transform(ks(o))+", "+ks(Xs.transform(u))+")"},Te={test:i=>ka.test(i)||vc.test(i)||Oi.test(i),parse:i=>ka.test(i)?ka.parse(i):Oi.test(i)?Oi.parse(i):vc.parse(i),transform:i=>typeof i=="string"?i:i.hasOwnProperty("red")?ka.transform(i):Oi.transform(i)},Jb=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Fb(i){var s,o;return isNaN(i)&&typeof i=="string"&&(((s=i.match(lf))===null||s===void 0?void 0:s.length)||0)+(((o=i.match(Jb))===null||o===void 0?void 0:o.length)||0)>0}const x0="number",_0="color",Pb="var",Wb="var(",Cp="${}",Ib=/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 Ks(i){const s=i.toString(),o=[],u={color:[],number:[],var:[]},c=[];let h=0;const y=s.replace(Ib,p=>(Te.test(p)?(u.color.push(h),c.push(_0),o.push(Te.parse(p))):p.startsWith(Wb)?(u.var.push(h),c.push(Pb),o.push(p)):(u.number.push(h),c.push(x0),o.push(parseFloat(p))),++h,Cp)).split(Cp);return{values:o,split:y,indexes:u,types:c}}function A0(i){return Ks(i).values}function E0(i){const{split:s,types:o}=Ks(i),u=s.length;return c=>{let h="";for(let d=0;d<u;d++)if(h+=s[d],c[d]!==void 0){const y=o[d];y===x0?h+=ks(c[d]):y===_0?h+=Te.transform(c[d]):h+=c[d]}return h}}const $b=i=>typeof i=="number"?0:i;function tT(i){const s=A0(i);return E0(i)(s.map($b))}const ma={test:Fb,parse:A0,createTransformer:E0,getAnimatableNone:tT},eT=new Set(["brightness","contrast","saturate","opacity"]);function nT(i){const[s,o]=i.slice(0,-1).split("(");if(s==="drop-shadow")return i;const[u]=o.match(lf)||[];if(!u)return i;const c=o.replace(u,"");let h=eT.has(s)?1:0;return u!==o&&(h*=100),s+"("+h+c+")"}const aT=/\b([a-z-]*)\(.*?\)/gu,Sc={...ma,getAnimatableNone:i=>{const s=i.match(aT);return s?s.map(nT).join(" "):i}},iT={...Xc,color:Te,backgroundColor:Te,outlineColor:Te,fill:Te,stroke:Te,borderColor:Te,borderTopColor:Te,borderRightColor:Te,borderBottomColor:Te,borderLeftColor:Te,filter:Sc,WebkitFilter:Sc},uf=i=>iT[i];function D0(i,s){let o=uf(i);return o!==Sc&&(o=ma),o.getAnimatableNone?o.getAnimatableNone(s):void 0}const sT=new Set(["auto","none","0"]);function lT(i,s,o){let u=0,c;for(;u<i.length&&!c;){const h=i[u];typeof h=="string"&&!sT.has(h)&&Ks(h).values.length&&(c=i[u]),u++}if(c&&o)for(const h of s)i[h]=D0(o,c)}const Np=i=>i===Hi||i===st,Op=(i,s)=>parseFloat(i.split(", ")[s]),Rp=(i,s)=>(o,{transform:u})=>{if(u==="none"||!u)return 0;const c=u.match(/^matrix3d\((.+)\)$/u);if(c)return Op(c[1],s);{const h=u.match(/^matrix\((.+)\)$/u);return h?Op(h[1],i):0}},oT=new Set(["x","y","z"]),uT=ki.filter(i=>!oT.has(i));function rT(i){const s=[];return uT.forEach(o=>{const u=i.getValue(o);u!==void 0&&(s.push([o,u.get()]),u.set(o.startsWith("scale")?1:0))}),s}const Li={width:({x:i},{paddingLeft:s="0",paddingRight:o="0"})=>i.max-i.min-parseFloat(s)-parseFloat(o),height:({y:i},{paddingTop:s="0",paddingBottom:o="0"})=>i.max-i.min-parseFloat(s)-parseFloat(o),top:(i,{top:s})=>parseFloat(s),left:(i,{left:s})=>parseFloat(s),bottom:({y:i},{top:s})=>parseFloat(s)+(i.max-i.min),right:({x:i},{left:s})=>parseFloat(s)+(i.max-i.min),x:Rp(4,13),y:Rp(5,14)};Li.translateX=Li.x;Li.translateY=Li.y;const Ha=new Set;let bc=!1,Tc=!1;function j0(){if(Tc){const i=Array.from(Ha).filter(u=>u.needsMeasurement),s=new Set(i.map(u=>u.element)),o=new Map;s.forEach(u=>{const c=rT(u);c.length&&(o.set(u,c),u.render())}),i.forEach(u=>u.measureInitialState()),s.forEach(u=>{u.render();const c=o.get(u);c&&c.forEach(([h,d])=>{var y;(y=u.getValue(h))===null||y===void 0||y.set(d)})}),i.forEach(u=>u.measureEndState()),i.forEach(u=>{u.suspendedScrollY!==void 0&&window.scrollTo(0,u.suspendedScrollY)})}Tc=!1,bc=!1,Ha.forEach(i=>i.complete()),Ha.clear()}function M0(){Ha.forEach(i=>{i.readKeyframes(),i.needsMeasurement&&(Tc=!0)})}function cT(){M0(),j0()}class rf{constructor(s,o,u,c,h,d=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...s],this.onComplete=o,this.name=u,this.motionValue=c,this.element=h,this.isAsync=d}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ha.add(this),bc||(bc=!0,Lt.read(M0),Lt.resolveKeyframes(j0))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:s,name:o,element:u,motionValue:c}=this;for(let h=0;h<s.length;h++)if(s[h]===null)if(h===0){const d=c==null?void 0:c.get(),y=s[s.length-1];if(d!==void 0)s[0]=d;else if(u&&o){const p=u.readValue(o,y);p!=null&&(s[0]=p)}s[0]===void 0&&(s[0]=y),c&&d===void 0&&c.set(s[0])}else s[h]=s[h-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ha.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ha.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const C0=i=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(i),fT=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function dT(i){const s=fT.exec(i);if(!s)return[,];const[,o,u,c]=s;return[`--${o??u}`,c]}function N0(i,s,o=1){const[u,c]=dT(i);if(!u)return;const h=window.getComputedStyle(s).getPropertyValue(u);if(h){const d=h.trim();return C0(d)?parseFloat(d):d}return Yc(c)?N0(c,s,o+1):c}const O0=i=>s=>s.test(i),hT={test:i=>i==="auto",parse:i=>i},R0=[Hi,st,yn,da,rb,ub,hT],zp=i=>R0.find(O0(i));class z0 extends rf{constructor(s,o,u,c,h){super(s,o,u,c,h,!0)}readKeyframes(){const{unresolvedKeyframes:s,element:o,name:u}=this;if(!o||!o.current)return;super.readKeyframes();for(let p=0;p<s.length;p++){let m=s[p];if(typeof m=="string"&&(m=m.trim(),Yc(m))){const v=N0(m,o.current);v!==void 0&&(s[p]=v),p===s.length-1&&(this.finalKeyframe=m)}}if(this.resolveNoneKeyframes(),!l0.has(u)||s.length!==2)return;const[c,h]=s,d=zp(c),y=zp(h);if(d!==y)if(Np(d)&&Np(y))for(let p=0;p<s.length;p++){const m=s[p];typeof m=="string"&&(s[p]=parseFloat(m))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:s,name:o}=this,u=[];for(let c=0;c<s.length;c++)Yb(s[c])&&u.push(c);u.length&&lT(s,u,o)}measureInitialState(){const{element:s,unresolvedKeyframes:o,name:u}=this;if(!s||!s.current)return;u==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Li[u](s.measureViewportBox(),window.getComputedStyle(s.current)),o[0]=this.measuredOrigin;const c=o[o.length-1];c!==void 0&&s.getValue(u,c).jump(c,!1)}measureEndState(){var s;const{element:o,name:u,unresolvedKeyframes:c}=this;if(!o||!o.current)return;const h=o.getValue(u);h&&h.jump(this.measuredOrigin,!1);const d=c.length-1,y=c[d];c[d]=Li[u](o.measureViewportBox(),window.getComputedStyle(o.current)),y!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=y),!((s=this.removedTransforms)===null||s===void 0)&&s.length&&this.removedTransforms.forEach(([p,m])=>{o.getValue(p).set(m)}),this.resolveNoneKeyframes()}}const wp=(i,s)=>s==="zIndex"?!1:!!(typeof i=="number"||Array.isArray(i)||typeof i=="string"&&(ma.test(i)||i==="0")&&!i.startsWith("url("));function mT(i){const s=i[0];if(i.length===1)return!0;for(let o=0;o<i.length;o++)if(i[o]!==s)return!0}function pT(i,s,o,u){const c=i[0];if(c===null)return!1;if(s==="display"||s==="visibility")return!0;const h=i[i.length-1],d=wp(c,s),y=wp(h,s);return!d||!y?!1:mT(i)||(o==="spring"||ef(o))&&u}const yT=i=>i!==null;function Bo(i,{repeat:s,repeatType:o="loop"},u){const c=i.filter(yT),h=s&&o!=="loop"&&s%2===1?0:c.length-1;return!h||u===void 0?c[h]:u}const gT=40;class w0{constructor({autoplay:s=!0,delay:o=0,type:u="keyframes",repeat:c=0,repeatDelay:h=0,repeatType:d="loop",...y}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=gn.now(),this.options={autoplay:s,delay:o,type:u,repeat:c,repeatDelay:h,repeatType:d,...y},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>gT?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&cT(),this._resolved}onKeyframesResolved(s,o){this.resolvedAt=gn.now(),this.hasAttemptedResolve=!0;const{name:u,type:c,velocity:h,delay:d,onComplete:y,onUpdate:p,isGenerator:m}=this.options;if(!m&&!pT(s,u,c,h))if(d)this.options.duration=0;else{p&&p(Bo(s,this.options,o)),y&&y(),this.resolveFinishedPromise();return}const v=this.initPlayback(s,o);v!==!1&&(this._resolved={keyframes:s,finalKeyframe:o,...v},this.onPostResolved())}onPostResolved(){}then(s,o){return this.currentFinishedPromise.then(s,o)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(s=>{this.resolveFinishedPromise=s})}}const xc=2e4;function V0(i){let s=0;const o=50;let u=i.next(s);for(;!u.done&&s<xc;)s+=o,u=i.next(s);return s>=xc?1/0:s}const Xt=(i,s,o)=>i+(s-i)*o;function nc(i,s,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?i+(s-i)*6*o:o<1/2?s:o<2/3?i+(s-i)*(2/3-o)*6:i}function vT({hue:i,saturation:s,lightness:o,alpha:u}){i/=360,s/=100,o/=100;let c=0,h=0,d=0;if(!s)c=h=d=o;else{const y=o<.5?o*(1+s):o+s-o*s,p=2*o-y;c=nc(p,y,i+1/3),h=nc(p,y,i),d=nc(p,y,i-1/3)}return{red:Math.round(c*255),green:Math.round(h*255),blue:Math.round(d*255),alpha:u}}function Do(i,s){return o=>o>0?s:i}const ac=(i,s,o)=>{const u=i*i,c=o*(s*s-u)+u;return c<0?0:Math.sqrt(c)},ST=[vc,ka,Oi],bT=i=>ST.find(s=>s.test(i));function Vp(i){const s=bT(i);if(!s)return!1;let o=s.parse(i);return s===Oi&&(o=vT(o)),o}const Bp=(i,s)=>{const o=Vp(i),u=Vp(s);if(!o||!u)return Do(i,s);const c={...o};return h=>(c.red=ac(o.red,u.red,h),c.green=ac(o.green,u.green,h),c.blue=ac(o.blue,u.blue,h),c.alpha=Xt(o.alpha,u.alpha,h),ka.transform(c))},TT=(i,s)=>o=>s(i(o)),Ps=(...i)=>i.reduce(TT),_c=new Set(["none","hidden"]);function xT(i,s){return _c.has(i)?o=>o<=0?i:s:o=>o>=1?s:i}function _T(i,s){return o=>Xt(i,s,o)}function cf(i){return typeof i=="number"?_T:typeof i=="string"?Yc(i)?Do:Te.test(i)?Bp:DT:Array.isArray(i)?B0:typeof i=="object"?Te.test(i)?Bp:AT:Do}function B0(i,s){const o=[...i],u=o.length,c=i.map((h,d)=>cf(h)(h,s[d]));return h=>{for(let d=0;d<u;d++)o[d]=c[d](h);return o}}function AT(i,s){const o={...i,...s},u={};for(const c in o)i[c]!==void 0&&s[c]!==void 0&&(u[c]=cf(i[c])(i[c],s[c]));return c=>{for(const h in u)o[h]=u[h](c);return o}}function ET(i,s){var o;const u=[],c={color:0,var:0,number:0};for(let h=0;h<s.values.length;h++){const d=s.types[h],y=i.indexes[d][c[d]],p=(o=i.values[y])!==null&&o!==void 0?o:0;u[h]=p,c[d]++}return u}const DT=(i,s)=>{const o=ma.createTransformer(s),u=Ks(i),c=Ks(s);return u.indexes.var.length===c.indexes.var.length&&u.indexes.color.length===c.indexes.color.length&&u.indexes.number.length>=c.indexes.number.length?_c.has(i)&&!c.values.length||_c.has(s)&&!u.values.length?xT(i,s):Ps(B0(ET(u,c),c.values),o):Do(i,s)};function U0(i,s,o){return typeof i=="number"&&typeof s=="number"&&typeof o=="number"?Xt(i,s,o):cf(i)(i,s)}const jT=5;function L0(i,s,o){const u=Math.max(s-jT,0);return o0(o-i(u),s-u)}const Qt={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},ic=.001;function MT({duration:i=Qt.duration,bounce:s=Qt.bounce,velocity:o=Qt.velocity,mass:u=Qt.mass}){let c,h,d=1-s;d=Hn(Qt.minDamping,Qt.maxDamping,d),i=Hn(Qt.minDuration,Qt.maxDuration,kn(i)),d<1?(c=m=>{const v=m*d,S=v*i,b=v-o,M=Ac(m,d),L=Math.exp(-S);return ic-b/M*L},h=m=>{const S=m*d*i,b=S*o+o,M=Math.pow(d,2)*Math.pow(m,2)*i,L=Math.exp(-S),z=Ac(Math.pow(m,2),d);return(-c(m)+ic>0?-1:1)*((b-M)*L)/z}):(c=m=>{const v=Math.exp(-m*i),S=(m-o)*i+1;return-ic+v*S},h=m=>{const v=Math.exp(-m*i),S=(o-m)*(i*i);return v*S});const y=5/i,p=NT(c,h,y);if(i=Ln(i),isNaN(p))return{stiffness:Qt.stiffness,damping:Qt.damping,duration:i};{const m=Math.pow(p,2)*u;return{stiffness:m,damping:d*2*Math.sqrt(u*m),duration:i}}}const CT=12;function NT(i,s,o){let u=o;for(let c=1;c<CT;c++)u=u-i(u)/s(u);return u}function Ac(i,s){return i*Math.sqrt(1-s*s)}const OT=["duration","bounce"],RT=["stiffness","damping","mass"];function Up(i,s){return s.some(o=>i[o]!==void 0)}function zT(i){let s={velocity:Qt.velocity,stiffness:Qt.stiffness,damping:Qt.damping,mass:Qt.mass,isResolvedFromDuration:!1,...i};if(!Up(i,RT)&&Up(i,OT))if(i.visualDuration){const o=i.visualDuration,u=2*Math.PI/(o*1.2),c=u*u,h=2*Hn(.05,1,1-(i.bounce||0))*Math.sqrt(c);s={...s,mass:Qt.mass,stiffness:c,damping:h}}else{const o=MT(i);s={...s,...o,mass:Qt.mass},s.isResolvedFromDuration=!0}return s}function k0(i=Qt.visualDuration,s=Qt.bounce){const o=typeof i!="object"?{visualDuration:i,keyframes:[0,1],bounce:s}:i;let{restSpeed:u,restDelta:c}=o;const h=o.keyframes[0],d=o.keyframes[o.keyframes.length-1],y={done:!1,value:h},{stiffness:p,damping:m,mass:v,duration:S,velocity:b,isResolvedFromDuration:M}=zT({...o,velocity:-kn(o.velocity||0)}),L=b||0,z=m/(2*Math.sqrt(p*v)),O=d-h,k=kn(Math.sqrt(p/v)),Y=Math.abs(O)<5;u||(u=Y?Qt.restSpeed.granular:Qt.restSpeed.default),c||(c=Y?Qt.restDelta.granular:Qt.restDelta.default);let G;if(z<1){const B=Ac(k,z);G=Z=>{const Q=Math.exp(-z*k*Z);return d-Q*((L+z*k*O)/B*Math.sin(B*Z)+O*Math.cos(B*Z))}}else if(z===1)G=B=>d-Math.exp(-k*B)*(O+(L+k*O)*B);else{const B=k*Math.sqrt(z*z-1);G=Z=>{const Q=Math.exp(-z*k*Z),C=Math.min(B*Z,300);return d-Q*((L+z*k*O)*Math.sinh(C)+B*O*Math.cosh(C))/B}}const J={calculatedDuration:M&&S||null,next:B=>{const Z=G(B);if(M)y.done=B>=S;else{let Q=0;z<1&&(Q=B===0?Ln(L):L0(G,B,Z));const C=Math.abs(Q)<=u,K=Math.abs(d-Z)<=c;y.done=C&&K}return y.value=y.done?d:Z,y},toString:()=>{const B=Math.min(V0(J),xc),Z=r0(Q=>J.next(B*Q).value,B,30);return B+"ms "+Z}};return J}function Lp({keyframes:i,velocity:s=0,power:o=.8,timeConstant:u=325,bounceDamping:c=10,bounceStiffness:h=500,modifyTarget:d,min:y,max:p,restDelta:m=.5,restSpeed:v}){const S=i[0],b={done:!1,value:S},M=C=>y!==void 0&&C<y||p!==void 0&&C>p,L=C=>y===void 0?p:p===void 0||Math.abs(y-C)<Math.abs(p-C)?y:p;let z=o*s;const O=S+z,k=d===void 0?O:d(O);k!==O&&(z=k-S);const Y=C=>-z*Math.exp(-C/u),G=C=>k+Y(C),J=C=>{const K=Y(C),lt=G(C);b.done=Math.abs(K)<=m,b.value=b.done?k:lt};let B,Z;const Q=C=>{M(b.value)&&(B=C,Z=k0({keyframes:[b.value,L(b.value)],velocity:L0(G,C,b.value),damping:c,stiffness:h,restDelta:m,restSpeed:v}))};return Q(0),{calculatedDuration:null,next:C=>{let K=!1;return!Z&&B===void 0&&(K=!0,J(C),Q(C)),B!==void 0&&C>=B?Z.next(C-B):(!K&&J(C),b)}}}const wT=Fs(.42,0,1,1),VT=Fs(0,0,.58,1),H0=Fs(.42,0,.58,1),BT=i=>Array.isArray(i)&&typeof i[0]!="number",UT={linear:Ze,easeIn:wT,easeInOut:H0,easeOut:VT,circIn:sf,circInOut:S0,circOut:v0,backIn:af,backInOut:y0,backOut:p0,anticipate:g0},kp=i=>{if(nf(i)){Hy(i.length===4);const[s,o,u,c]=i;return Fs(s,o,u,c)}else if(typeof i=="string")return UT[i];return i};function LT(i,s,o){const u=[],c=o||U0,h=i.length-1;for(let d=0;d<h;d++){let y=c(i[d],i[d+1]);if(s){const p=Array.isArray(s)?s[d]||Ze:s;y=Ps(p,y)}u.push(y)}return u}function kT(i,s,{clamp:o=!0,ease:u,mixer:c}={}){const h=i.length;if(Hy(h===s.length),h===1)return()=>s[0];if(h===2&&s[0]===s[1])return()=>s[1];const d=i[0]===i[1];i[0]>i[h-1]&&(i=[...i].reverse(),s=[...s].reverse());const y=LT(s,u,c),p=y.length,m=v=>{if(d&&v<i[0])return s[0];let S=0;if(p>1)for(;S<i.length-2&&!(v<i[S+1]);S++);const b=Ui(i[S],i[S+1],v);return y[S](b)};return o?v=>m(Hn(i[0],i[h-1],v)):m}function HT(i,s){const o=i[i.length-1];for(let u=1;u<=s;u++){const c=Ui(0,s,u);i.push(Xt(o,1,c))}}function qT(i){const s=[0];return HT(s,i.length-1),s}function GT(i,s){return i.map(o=>o*s)}function YT(i,s){return i.map(()=>s||H0).splice(0,i.length-1)}function jo({duration:i=300,keyframes:s,times:o,ease:u="easeInOut"}){const c=BT(u)?u.map(kp):kp(u),h={done:!1,value:s[0]},d=GT(o&&o.length===s.length?o:qT(s),i),y=kT(d,s,{ease:Array.isArray(c)?c:YT(s,c)});return{calculatedDuration:i,next:p=>(h.value=y(p),h.done=p>=i,h)}}const XT=i=>{const s=({timestamp:o})=>i(o);return{start:()=>Lt.update(s,!0),stop:()=>ha(s),now:()=>Se.isProcessing?Se.timestamp:gn.now()}},ZT={decay:Lp,inertia:Lp,tween:jo,keyframes:jo,spring:k0},KT=i=>i/100;class ff extends w0{constructor(s){super(s),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:p}=this.options;p&&p()};const{name:o,motionValue:u,element:c,keyframes:h}=this.options,d=(c==null?void 0:c.KeyframeResolver)||rf,y=(p,m)=>this.onKeyframesResolved(p,m);this.resolver=new d(h,y,o,u,c),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(s){const{type:o="keyframes",repeat:u=0,repeatDelay:c=0,repeatType:h,velocity:d=0}=this.options,y=ef(o)?o:ZT[o]||jo;let p,m;y!==jo&&typeof s[0]!="number"&&(p=Ps(KT,U0(s[0],s[1])),s=[0,100]);const v=y({...this.options,keyframes:s});h==="mirror"&&(m=y({...this.options,keyframes:[...s].reverse(),velocity:-d})),v.calculatedDuration===null&&(v.calculatedDuration=V0(v));const{calculatedDuration:S}=v,b=S+c,M=b*(u+1)-c;return{generator:v,mirroredGenerator:m,mapPercentToKeyframes:p,calculatedDuration:S,resolvedDuration:b,totalDuration:M}}onPostResolved(){const{autoplay:s=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!s?this.pause():this.state=this.pendingPlayState}tick(s,o=!1){const{resolved:u}=this;if(!u){const{keyframes:C}=this.options;return{done:!0,value:C[C.length-1]}}const{finalKeyframe:c,generator:h,mirroredGenerator:d,mapPercentToKeyframes:y,keyframes:p,calculatedDuration:m,totalDuration:v,resolvedDuration:S}=u;if(this.startTime===null)return h.next(0);const{delay:b,repeat:M,repeatType:L,repeatDelay:z,onUpdate:O}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,s):this.speed<0&&(this.startTime=Math.min(s-v/this.speed,this.startTime)),o?this.currentTime=s:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(s-this.startTime)*this.speed;const k=this.currentTime-b*(this.speed>=0?1:-1),Y=this.speed>=0?k<0:k>v;this.currentTime=Math.max(k,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=v);let G=this.currentTime,J=h;if(M){const C=Math.min(this.currentTime,v)/S;let K=Math.floor(C),lt=C%1;!lt&&C>=1&&(lt=1),lt===1&&K--,K=Math.min(K,M+1),!!(K%2)&&(L==="reverse"?(lt=1-lt,z&&(lt-=z/S)):L==="mirror"&&(J=d)),G=Hn(0,1,lt)*S}const B=Y?{done:!1,value:p[0]}:J.next(G);y&&(B.value=y(B.value));let{done:Z}=B;!Y&&m!==null&&(Z=this.speed>=0?this.currentTime>=v:this.currentTime<=0);const Q=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&Z);return Q&&c!==void 0&&(B.value=Bo(p,this.options,c)),O&&O(B.value),Q&&this.finish(),B}get duration(){const{resolved:s}=this;return s?kn(s.calculatedDuration):0}get time(){return kn(this.currentTime)}set time(s){s=Ln(s),this.currentTime=s,this.holdTime!==null||this.speed===0?this.holdTime=s:this.driver&&(this.startTime=this.driver.now()-s/this.speed)}get speed(){return this.playbackSpeed}set speed(s){const o=this.playbackSpeed!==s;this.playbackSpeed=s,o&&(this.time=kn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:s=XT,onPlay:o,startTime:u}=this.options;this.driver||(this.driver=s(h=>this.tick(h))),o&&o();const c=this.driver.now();this.holdTime!==null?this.startTime=c-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=c):this.startTime=u??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var s;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(s=this.currentTime)!==null&&s!==void 0?s:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:s}=this.options;s&&s()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(s){return this.startTime=0,this.tick(s,!0)}}const QT=new Set(["opacity","clipPath","filter","transform"]);function JT(i,s,o,{delay:u=0,duration:c=300,repeat:h=0,repeatType:d="loop",ease:y="easeInOut",times:p}={}){const m={[s]:o};p&&(m.offset=p);const v=f0(y,c);return Array.isArray(v)&&(m.easing=v),i.animate(m,{delay:u,duration:c,easing:Array.isArray(v)?"linear":v,fill:"both",iterations:h+1,direction:d==="reverse"?"alternate":"normal"})}const FT=tf(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Mo=10,PT=2e4;function WT(i){return ef(i.type)||i.type==="spring"||!c0(i.ease)}function IT(i,s){const o=new ff({...s,keyframes:i,repeat:0,delay:0,isGenerator:!0});let u={done:!1,value:i[0]};const c=[];let h=0;for(;!u.done&&h<PT;)u=o.sample(h),c.push(u.value),h+=Mo;return{times:void 0,keyframes:c,duration:h-Mo,ease:"linear"}}const q0={anticipate:g0,backInOut:y0,circInOut:S0};function $T(i){return i in q0}class Hp extends w0{constructor(s){super(s);const{name:o,motionValue:u,element:c,keyframes:h}=this.options;this.resolver=new z0(h,(d,y)=>this.onKeyframesResolved(d,y),o,u,c),this.resolver.scheduleResolve()}initPlayback(s,o){let{duration:u=300,times:c,ease:h,type:d,motionValue:y,name:p,startTime:m}=this.options;if(!y.owner||!y.owner.current)return!1;if(typeof h=="string"&&Eo()&&$T(h)&&(h=q0[h]),WT(this.options)){const{onComplete:S,onUpdate:b,motionValue:M,element:L,...z}=this.options,O=IT(s,z);s=O.keyframes,s.length===1&&(s[1]=s[0]),u=O.duration,c=O.times,h=O.ease,d="keyframes"}const v=JT(y.owner.current,p,s,{...this.options,duration:u,times:c,ease:h});return v.startTime=m??this.calcStartTime(),this.pendingTimeline?(Mp(v,this.pendingTimeline),this.pendingTimeline=void 0):v.onfinish=()=>{const{onComplete:S}=this.options;y.set(Bo(s,this.options,o)),S&&S(),this.cancel(),this.resolveFinishedPromise()},{animation:v,duration:u,times:c,type:d,ease:h,keyframes:s}}get duration(){const{resolved:s}=this;if(!s)return 0;const{duration:o}=s;return kn(o)}get time(){const{resolved:s}=this;if(!s)return 0;const{animation:o}=s;return kn(o.currentTime||0)}set time(s){const{resolved:o}=this;if(!o)return;const{animation:u}=o;u.currentTime=Ln(s)}get speed(){const{resolved:s}=this;if(!s)return 1;const{animation:o}=s;return o.playbackRate}set speed(s){const{resolved:o}=this;if(!o)return;const{animation:u}=o;u.playbackRate=s}get state(){const{resolved:s}=this;if(!s)return"idle";const{animation:o}=s;return o.playState}get startTime(){const{resolved:s}=this;if(!s)return null;const{animation:o}=s;return o.startTime}attachTimeline(s){if(!this._resolved)this.pendingTimeline=s;else{const{resolved:o}=this;if(!o)return Ze;const{animation:u}=o;Mp(u,s)}return Ze}play(){if(this.isStopped)return;const{resolved:s}=this;if(!s)return;const{animation:o}=s;o.playState==="finished"&&this.updateFinishedPromise(),o.play()}pause(){const{resolved:s}=this;if(!s)return;const{animation:o}=s;o.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:s}=this;if(!s)return;const{animation:o,keyframes:u,duration:c,type:h,ease:d,times:y}=s;if(o.playState==="idle"||o.playState==="finished")return;if(this.time){const{motionValue:m,onUpdate:v,onComplete:S,element:b,...M}=this.options,L=new ff({...M,keyframes:u,duration:c,type:h,ease:d,times:y,isGenerator:!0}),z=Ln(this.time);m.setWithVelocity(L.sample(z-Mo).value,L.sample(z).value,Mo)}const{onStop:p}=this.options;p&&p(),this.cancel()}complete(){const{resolved:s}=this;s&&s.animation.finish()}cancel(){const{resolved:s}=this;s&&s.animation.cancel()}static supports(s){const{motionValue:o,name:u,repeatDelay:c,repeatType:h,damping:d,type:y}=s;if(!o||!o.owner||!(o.owner.current instanceof HTMLElement))return!1;const{onUpdate:p,transformTemplate:m}=o.owner.getProps();return FT()&&u&&QT.has(u)&&!p&&!m&&!c&&h!=="mirror"&&d!==0&&y!=="inertia"}}const t2={type:"spring",stiffness:500,damping:25,restSpeed:10},e2=i=>({type:"spring",stiffness:550,damping:i===0?2*Math.sqrt(550):30,restSpeed:10}),n2={type:"keyframes",duration:.8},a2={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},i2=(i,{keyframes:s})=>s.length>2?n2:Ga.has(i)?i.startsWith("scale")?e2(s[1]):t2:a2;function s2({when:i,delay:s,delayChildren:o,staggerChildren:u,staggerDirection:c,repeat:h,repeatType:d,repeatDelay:y,from:p,elapsed:m,...v}){return!!Object.keys(v).length}const df=(i,s,o,u={},c,h)=>d=>{const y=Pc(u,i)||{},p=y.delay||u.delay||0;let{elapsed:m=0}=u;m=m-Ln(p);let v={keyframes:Array.isArray(o)?o:[null,o],ease:"easeOut",velocity:s.getVelocity(),...y,delay:-m,onUpdate:b=>{s.set(b),y.onUpdate&&y.onUpdate(b)},onComplete:()=>{d(),y.onComplete&&y.onComplete()},name:i,motionValue:s,element:h?void 0:c};s2(y)||(v={...v,...i2(i,v)}),v.duration&&(v.duration=Ln(v.duration)),v.repeatDelay&&(v.repeatDelay=Ln(v.repeatDelay)),v.from!==void 0&&(v.keyframes[0]=v.from);let S=!1;if((v.type===!1||v.duration===0&&!v.repeatDelay)&&(v.duration=0,v.delay===0&&(S=!0)),S&&!h&&s.get()!==void 0){const b=Bo(v.keyframes,y);if(b!==void 0)return Lt.update(()=>{v.onUpdate(b),v.onComplete()}),new Ub([])}return!h&&Hp.supports(v)?new Hp(v):new ff(v)};function l2({protectedKeys:i,needsAnimating:s},o){const u=i.hasOwnProperty(o)&&s[o]!==!0;return s[o]=!1,u}function G0(i,s,{delay:o=0,transitionOverride:u,type:c}={}){var h;let{transition:d=i.getDefaultTransition(),transitionEnd:y,...p}=s;u&&(d=u);const m=[],v=c&&i.animationState&&i.animationState.getState()[c];for(const S in p){const b=i.getValue(S,(h=i.latestValues[S])!==null&&h!==void 0?h:null),M=p[S];if(M===void 0||v&&l2(v,S))continue;const L={delay:o,...Pc(d||{},S)};let z=!1;if(window.MotionHandoffAnimation){const k=u0(i);if(k){const Y=window.MotionHandoffAnimation(k,S,Lt);Y!==null&&(L.startTime=Y,z=!0)}}yc(i,S),b.start(df(S,b,M,i.shouldReduceMotion&&l0.has(S)?{type:!1}:L,i,z));const O=b.animation;O&&m.push(O)}return y&&Promise.all(m).then(()=>{Lt.update(()=>{y&&zb(i,y)})}),m}function Ec(i,s,o={}){var u;const c=Vo(i,s,o.type==="exit"?(u=i.presenceContext)===null||u===void 0?void 0:u.custom:void 0);let{transition:h=i.getDefaultTransition()||{}}=c||{};o.transitionOverride&&(h=o.transitionOverride);const d=c?()=>Promise.all(G0(i,c,o)):()=>Promise.resolve(),y=i.variantChildren&&i.variantChildren.size?(m=0)=>{const{delayChildren:v=0,staggerChildren:S,staggerDirection:b}=h;return o2(i,s,v+m,S,b,o)}:()=>Promise.resolve(),{when:p}=h;if(p){const[m,v]=p==="beforeChildren"?[d,y]:[y,d];return m().then(()=>v())}else return Promise.all([d(),y(o.delay)])}function o2(i,s,o=0,u=0,c=1,h){const d=[],y=(i.variantChildren.size-1)*u,p=c===1?(m=0)=>m*u:(m=0)=>y-m*u;return Array.from(i.variantChildren).sort(u2).forEach((m,v)=>{m.notify("AnimationStart",s),d.push(Ec(m,s,{...h,delay:o+p(v)}).then(()=>m.notify("AnimationComplete",s)))}),Promise.all(d)}function u2(i,s){return i.sortNodePosition(s)}function r2(i,s,o={}){i.notify("AnimationStart",s);let u;if(Array.isArray(s)){const c=s.map(h=>Ec(i,h,o));u=Promise.all(c)}else if(typeof s=="string")u=Ec(i,s,o);else{const c=typeof s=="function"?Vo(i,s,o.custom):s;u=Promise.all(G0(i,c,o))}return u.then(()=>{i.notify("AnimationComplete",s)})}const c2=Lc.length;function Y0(i){if(!i)return;if(!i.isControllingVariants){const o=i.parent?Y0(i.parent)||{}:{};return i.props.initial!==void 0&&(o.initial=i.props.initial),o}const s={};for(let o=0;o<c2;o++){const u=Lc[o],c=i.props[u];(Ys(c)||c===!1)&&(s[u]=c)}return s}const f2=[...Uc].reverse(),d2=Uc.length;function h2(i){return s=>Promise.all(s.map(({animation:o,options:u})=>r2(i,o,u)))}function m2(i){let s=h2(i),o=qp(),u=!0;const c=p=>(m,v)=>{var S;const b=Vo(i,v,p==="exit"?(S=i.presenceContext)===null||S===void 0?void 0:S.custom:void 0);if(b){const{transition:M,transitionEnd:L,...z}=b;m={...m,...z,...L}}return m};function h(p){s=p(i)}function d(p){const{props:m}=i,v=Y0(i.parent)||{},S=[],b=new Set;let M={},L=1/0;for(let O=0;O<d2;O++){const k=f2[O],Y=o[k],G=m[k]!==void 0?m[k]:v[k],J=Ys(G),B=k===p?Y.isActive:null;B===!1&&(L=O);let Z=G===v[k]&&G!==m[k]&&J;if(Z&&u&&i.manuallyAnimateOnMount&&(Z=!1),Y.protectedKeys={...M},!Y.isActive&&B===null||!G&&!Y.prevProp||zo(G)||typeof G=="boolean")continue;const Q=p2(Y.prevProp,G);let C=Q||k===p&&Y.isActive&&!Z&&J||O>L&&J,K=!1;const lt=Array.isArray(G)?G:[G];let gt=lt.reduce(c(k),{});B===!1&&(gt={});const{prevResolvedValues:ot={}}=Y,ut={...ot,...gt},wt=X=>{C=!0,b.has(X)&&(K=!0,b.delete(X)),Y.needsAnimating[X]=!0;const W=i.getValue(X);W&&(W.liveStyle=!1)};for(const X in ut){const W=gt[X],bt=ot[X];if(M.hasOwnProperty(X))continue;let Tt=!1;pc(W)&&pc(bt)?Tt=!s0(W,bt):Tt=W!==bt,Tt?W!=null?wt(X):b.add(X):W!==void 0&&b.has(X)?wt(X):Y.protectedKeys[X]=!0}Y.prevProp=G,Y.prevResolvedValues=gt,Y.isActive&&(M={...M,...gt}),u&&i.blockInitialAnimation&&(C=!1),C&&(!(Z&&Q)||K)&&S.push(...lt.map(X=>({animation:X,options:{type:k}})))}if(b.size){const O={};b.forEach(k=>{const Y=i.getBaseTarget(k),G=i.getValue(k);G&&(G.liveStyle=!0),O[k]=Y??null}),S.push({animation:O})}let z=!!S.length;return u&&(m.initial===!1||m.initial===m.animate)&&!i.manuallyAnimateOnMount&&(z=!1),u=!1,z?s(S):Promise.resolve()}function y(p,m){var v;if(o[p].isActive===m)return Promise.resolve();(v=i.variantChildren)===null||v===void 0||v.forEach(b=>{var M;return(M=b.animationState)===null||M===void 0?void 0:M.setActive(p,m)}),o[p].isActive=m;const S=d(p);for(const b in o)o[b].protectedKeys={};return S}return{animateChanges:d,setActive:y,setAnimateFunction:h,getState:()=>o,reset:()=>{o=qp(),u=!0}}}function p2(i,s){return typeof s=="string"?s!==i:Array.isArray(s)?!s0(s,i):!1}function Va(i=!1){return{isActive:i,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function qp(){return{animate:Va(!0),whileInView:Va(),whileHover:Va(),whileTap:Va(),whileDrag:Va(),whileFocus:Va(),exit:Va()}}class pa{constructor(s){this.isMounted=!1,this.node=s}update(){}}class y2 extends pa{constructor(s){super(s),s.animationState||(s.animationState=m2(s))}updateAnimationControlsSubscription(){const{animate:s}=this.node.getProps();zo(s)&&(this.unmountControls=s.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:s}=this.node.getProps(),{animate:o}=this.node.prevProps||{};s!==o&&this.updateAnimationControlsSubscription()}unmount(){var s;this.node.animationState.reset(),(s=this.unmountControls)===null||s===void 0||s.call(this)}}let g2=0;class v2 extends pa{constructor(){super(...arguments),this.id=g2++}update(){if(!this.node.presenceContext)return;const{isPresent:s,onExitComplete:o}=this.node.presenceContext,{isPresent:u}=this.node.prevPresenceContext||{};if(!this.node.animationState||s===u)return;const c=this.node.animationState.setActive("exit",!s);o&&!s&&c.then(()=>o(this.id))}mount(){const{register:s}=this.node.presenceContext||{};s&&(this.unmount=s(this.id))}unmount(){}}const S2={animation:{Feature:y2},exit:{Feature:v2}},rn={x:!1,y:!1};function X0(){return rn.x||rn.y}function b2(i){return i==="x"||i==="y"?rn[i]?null:(rn[i]=!0,()=>{rn[i]=!1}):rn.x||rn.y?null:(rn.x=rn.y=!0,()=>{rn.x=rn.y=!1})}const hf=i=>i.pointerType==="mouse"?typeof i.button!="number"||i.button<=0:i.isPrimary!==!1;function Qs(i,s,o,u={passive:!0}){return i.addEventListener(s,o,u),()=>i.removeEventListener(s,o)}function Ws(i){return{point:{x:i.pageX,y:i.pageY}}}const T2=i=>s=>hf(s)&&i(s,Ws(s));function Hs(i,s,o,u){return Qs(i,s,T2(o),u)}const Gp=(i,s)=>Math.abs(i-s);function x2(i,s){const o=Gp(i.x,s.x),u=Gp(i.y,s.y);return Math.sqrt(o**2+u**2)}class Z0{constructor(s,o,{transformPagePoint:u,contextWindow:c,dragSnapToOrigin:h=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=lc(this.lastMoveEventInfo,this.history),b=this.startEvent!==null,M=x2(S.offset,{x:0,y:0})>=3;if(!b&&!M)return;const{point:L}=S,{timestamp:z}=Se;this.history.push({...L,timestamp:z});const{onStart:O,onMove:k}=this.handlers;b||(O&&O(this.lastMoveEvent,S),this.startEvent=this.lastMoveEvent),k&&k(this.lastMoveEvent,S)},this.handlePointerMove=(S,b)=>{this.lastMoveEvent=S,this.lastMoveEventInfo=sc(b,this.transformPagePoint),Lt.update(this.updatePoint,!0)},this.handlePointerUp=(S,b)=>{this.end();const{onEnd:M,onSessionEnd:L,resumeAnimation:z}=this.handlers;if(this.dragSnapToOrigin&&z&&z(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const O=lc(S.type==="pointercancel"?this.lastMoveEventInfo:sc(b,this.transformPagePoint),this.history);this.startEvent&&M&&M(S,O),L&&L(S,O)},!hf(s))return;this.dragSnapToOrigin=h,this.handlers=o,this.transformPagePoint=u,this.contextWindow=c||window;const d=Ws(s),y=sc(d,this.transformPagePoint),{point:p}=y,{timestamp:m}=Se;this.history=[{...p,timestamp:m}];const{onSessionStart:v}=o;v&&v(s,lc(y,this.history)),this.removeListeners=Ps(Hs(this.contextWindow,"pointermove",this.handlePointerMove),Hs(this.contextWindow,"pointerup",this.handlePointerUp),Hs(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(s){this.handlers=s}end(){this.removeListeners&&this.removeListeners(),ha(this.updatePoint)}}function sc(i,s){return s?{point:s(i.point)}:i}function Yp(i,s){return{x:i.x-s.x,y:i.y-s.y}}function lc({point:i},s){return{point:i,delta:Yp(i,K0(s)),offset:Yp(i,_2(s)),velocity:A2(s,.1)}}function _2(i){return i[0]}function K0(i){return i[i.length-1]}function A2(i,s){if(i.length<2)return{x:0,y:0};let o=i.length-1,u=null;const c=K0(i);for(;o>=0&&(u=i[o],!(c.timestamp-u.timestamp>Ln(s)));)o--;if(!u)return{x:0,y:0};const h=kn(c.timestamp-u.timestamp);if(h===0)return{x:0,y:0};const d={x:(c.x-u.x)/h,y:(c.y-u.y)/h};return d.x===1/0&&(d.x=0),d.y===1/0&&(d.y=0),d}const Q0=1e-4,E2=1-Q0,D2=1+Q0,J0=.01,j2=0-J0,M2=0+J0;function Ke(i){return i.max-i.min}function C2(i,s,o){return Math.abs(i-s)<=o}function Xp(i,s,o,u=.5){i.origin=u,i.originPoint=Xt(s.min,s.max,i.origin),i.scale=Ke(o)/Ke(s),i.translate=Xt(o.min,o.max,i.origin)-i.originPoint,(i.scale>=E2&&i.scale<=D2||isNaN(i.scale))&&(i.scale=1),(i.translate>=j2&&i.translate<=M2||isNaN(i.translate))&&(i.translate=0)}function qs(i,s,o,u){Xp(i.x,s.x,o.x,u?u.originX:void 0),Xp(i.y,s.y,o.y,u?u.originY:void 0)}function Zp(i,s,o){i.min=o.min+s.min,i.max=i.min+Ke(s)}function N2(i,s,o){Zp(i.x,s.x,o.x),Zp(i.y,s.y,o.y)}function Kp(i,s,o){i.min=s.min-o.min,i.max=i.min+Ke(s)}function Gs(i,s,o){Kp(i.x,s.x,o.x),Kp(i.y,s.y,o.y)}function O2(i,{min:s,max:o},u){return s!==void 0&&i<s?i=u?Xt(s,i,u.min):Math.max(i,s):o!==void 0&&i>o&&(i=u?Xt(o,i,u.max):Math.min(i,o)),i}function Qp(i,s,o){return{min:s!==void 0?i.min+s:void 0,max:o!==void 0?i.max+o-(i.max-i.min):void 0}}function R2(i,{top:s,left:o,bottom:u,right:c}){return{x:Qp(i.x,o,c),y:Qp(i.y,s,u)}}function Jp(i,s){let o=s.min-i.min,u=s.max-i.max;return s.max-s.min<i.max-i.min&&([o,u]=[u,o]),{min:o,max:u}}function z2(i,s){return{x:Jp(i.x,s.x),y:Jp(i.y,s.y)}}function w2(i,s){let o=.5;const u=Ke(i),c=Ke(s);return c>u?o=Ui(s.min,s.max-u,i.min):u>c&&(o=Ui(i.min,i.max-c,s.min)),Hn(0,1,o)}function V2(i,s){const o={};return s.min!==void 0&&(o.min=s.min-i.min),s.max!==void 0&&(o.max=s.max-i.min),o}const Dc=.35;function B2(i=Dc){return i===!1?i=0:i===!0&&(i=Dc),{x:Fp(i,"left","right"),y:Fp(i,"top","bottom")}}function Fp(i,s,o){return{min:Pp(i,s),max:Pp(i,o)}}function Pp(i,s){return typeof i=="number"?i:i[s]||0}const Wp=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ri=()=>({x:Wp(),y:Wp()}),Ip=()=>({min:0,max:0}),Wt=()=>({x:Ip(),y:Ip()});function sn(i){return[i("x"),i("y")]}function F0({top:i,left:s,right:o,bottom:u}){return{x:{min:s,max:o},y:{min:i,max:u}}}function U2({x:i,y:s}){return{top:s.min,right:i.max,bottom:s.max,left:i.min}}function L2(i,s){if(!s)return i;const o=s({x:i.left,y:i.top}),u=s({x:i.right,y:i.bottom});return{top:o.y,left:o.x,bottom:u.y,right:u.x}}function oc(i){return i===void 0||i===1}function jc({scale:i,scaleX:s,scaleY:o}){return!oc(i)||!oc(s)||!oc(o)}function Ua(i){return jc(i)||P0(i)||i.z||i.rotate||i.rotateX||i.rotateY||i.skewX||i.skewY}function P0(i){return $p(i.x)||$p(i.y)}function $p(i){return i&&i!=="0%"}function Co(i,s,o){const u=i-o,c=s*u;return o+c}function ty(i,s,o,u,c){return c!==void 0&&(i=Co(i,c,u)),Co(i,o,u)+s}function Mc(i,s=0,o=1,u,c){i.min=ty(i.min,s,o,u,c),i.max=ty(i.max,s,o,u,c)}function W0(i,{x:s,y:o}){Mc(i.x,s.translate,s.scale,s.originPoint),Mc(i.y,o.translate,o.scale,o.originPoint)}const ey=.999999999999,ny=1.0000000000001;function k2(i,s,o,u=!1){const c=o.length;if(!c)return;s.x=s.y=1;let h,d;for(let y=0;y<c;y++){h=o[y],d=h.projectionDelta;const{visualElement:p}=h.options;p&&p.props.style&&p.props.style.display==="contents"||(u&&h.options.layoutScroll&&h.scroll&&h!==h.root&&wi(i,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),d&&(s.x*=d.x.scale,s.y*=d.y.scale,W0(i,d)),u&&Ua(h.latestValues)&&wi(i,h.latestValues))}s.x<ny&&s.x>ey&&(s.x=1),s.y<ny&&s.y>ey&&(s.y=1)}function zi(i,s){i.min=i.min+s,i.max=i.max+s}function ay(i,s,o,u,c=.5){const h=Xt(i.min,i.max,c);Mc(i,s,o,h,u)}function wi(i,s){ay(i.x,s.x,s.scaleX,s.scale,s.originX),ay(i.y,s.y,s.scaleY,s.scale,s.originY)}function I0(i,s){return F0(L2(i.getBoundingClientRect(),s))}function H2(i,s,o){const u=I0(i,o),{scroll:c}=s;return c&&(zi(u.x,c.offset.x),zi(u.y,c.offset.y)),u}const $0=({current:i})=>i?i.ownerDocument.defaultView:null,q2=new WeakMap;class G2{constructor(s){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Wt(),this.visualElement=s}start(s,{snapToCursor:o=!1}={}){const{presenceContext:u}=this.visualElement;if(u&&u.isPresent===!1)return;const c=v=>{const{dragSnapToOrigin:S}=this.getProps();S?this.pauseAnimation():this.stopAnimation(),o&&this.snapToCursor(Ws(v).point)},h=(v,S)=>{const{drag:b,dragPropagation:M,onDragStart:L}=this.getProps();if(b&&!M&&(this.openDragLock&&this.openDragLock(),this.openDragLock=b2(b),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),sn(O=>{let k=this.getAxisMotionValue(O).get()||0;if(yn.test(k)){const{projection:Y}=this.visualElement;if(Y&&Y.layout){const G=Y.layout.layoutBox[O];G&&(k=Ke(G)*(parseFloat(k)/100))}}this.originPoint[O]=k}),L&&Lt.postRender(()=>L(v,S)),yc(this.visualElement,"transform");const{animationState:z}=this.visualElement;z&&z.setActive("whileDrag",!0)},d=(v,S)=>{const{dragPropagation:b,dragDirectionLock:M,onDirectionLock:L,onDrag:z}=this.getProps();if(!b&&!this.openDragLock)return;const{offset:O}=S;if(M&&this.currentDirection===null){this.currentDirection=Y2(O),this.currentDirection!==null&&L&&L(this.currentDirection);return}this.updateAxis("x",S.point,O),this.updateAxis("y",S.point,O),this.visualElement.render(),z&&z(v,S)},y=(v,S)=>this.stop(v,S),p=()=>sn(v=>{var S;return this.getAnimationState(v)==="paused"&&((S=this.getAxisMotionValue(v).animation)===null||S===void 0?void 0:S.play())}),{dragSnapToOrigin:m}=this.getProps();this.panSession=new Z0(s,{onSessionStart:c,onStart:h,onMove:d,onSessionEnd:y,resumeAnimation:p},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,contextWindow:$0(this.visualElement)})}stop(s,o){const u=this.isDragging;if(this.cancel(),!u)return;const{velocity:c}=o;this.startAnimation(c);const{onDragEnd:h}=this.getProps();h&&Lt.postRender(()=>h(s,o))}cancel(){this.isDragging=!1;const{projection:s,animationState:o}=this.visualElement;s&&(s.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:u}=this.getProps();!u&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),o&&o.setActive("whileDrag",!1)}updateAxis(s,o,u){const{drag:c}=this.getProps();if(!u||!So(s,c,this.currentDirection))return;const h=this.getAxisMotionValue(s);let d=this.originPoint[s]+u[s];this.constraints&&this.constraints[s]&&(d=O2(d,this.constraints[s],this.elastic[s])),h.set(d)}resolveConstraints(){var s;const{dragConstraints:o,dragElastic:u}=this.getProps(),c=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)===null||s===void 0?void 0:s.layout,h=this.constraints;o&&Ni(o)?this.constraints||(this.constraints=this.resolveRefConstraints()):o&&c?this.constraints=R2(c.layoutBox,o):this.constraints=!1,this.elastic=B2(u),h!==this.constraints&&c&&this.constraints&&!this.hasMutatedConstraints&&sn(d=>{this.constraints!==!1&&this.getAxisMotionValue(d)&&(this.constraints[d]=V2(c.layoutBox[d],this.constraints[d]))})}resolveRefConstraints(){const{dragConstraints:s,onMeasureDragConstraints:o}=this.getProps();if(!s||!Ni(s))return!1;const u=s.current,{projection:c}=this.visualElement;if(!c||!c.layout)return!1;const h=H2(u,c.root,this.visualElement.getTransformPagePoint());let d=z2(c.layout.layoutBox,h);if(o){const y=o(U2(d));this.hasMutatedConstraints=!!y,y&&(d=F0(y))}return d}startAnimation(s){const{drag:o,dragMomentum:u,dragElastic:c,dragTransition:h,dragSnapToOrigin:d,onDragTransitionEnd:y}=this.getProps(),p=this.constraints||{},m=sn(v=>{if(!So(v,o,this.currentDirection))return;let S=p&&p[v]||{};d&&(S={min:0,max:0});const b=c?200:1e6,M=c?40:1e7,L={type:"inertia",velocity:u?s[v]:0,bounceStiffness:b,bounceDamping:M,timeConstant:750,restDelta:1,restSpeed:10,...h,...S};return this.startAxisValueAnimation(v,L)});return Promise.all(m).then(y)}startAxisValueAnimation(s,o){const u=this.getAxisMotionValue(s);return yc(this.visualElement,s),u.start(df(s,u,0,o,this.visualElement,!1))}stopAnimation(){sn(s=>this.getAxisMotionValue(s).stop())}pauseAnimation(){sn(s=>{var o;return(o=this.getAxisMotionValue(s).animation)===null||o===void 0?void 0:o.pause()})}getAnimationState(s){var o;return(o=this.getAxisMotionValue(s).animation)===null||o===void 0?void 0:o.state}getAxisMotionValue(s){const o=`_drag${s.toUpperCase()}`,u=this.visualElement.getProps(),c=u[o];return c||this.visualElement.getValue(s,(u.initial?u.initial[s]:void 0)||0)}snapToCursor(s){sn(o=>{const{drag:u}=this.getProps();if(!So(o,u,this.currentDirection))return;const{projection:c}=this.visualElement,h=this.getAxisMotionValue(o);if(c&&c.layout){const{min:d,max:y}=c.layout.layoutBox[o];h.set(s[o]-Xt(d,y,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:s,dragConstraints:o}=this.getProps(),{projection:u}=this.visualElement;if(!Ni(o)||!u||!this.constraints)return;this.stopAnimation();const c={x:0,y:0};sn(d=>{const y=this.getAxisMotionValue(d);if(y&&this.constraints!==!1){const p=y.get();c[d]=w2({min:p,max:p},this.constraints[d])}});const{transformTemplate:h}=this.visualElement.getProps();this.visualElement.current.style.transform=h?h({},""):"none",u.root&&u.root.updateScroll(),u.updateLayout(),this.resolveConstraints(),sn(d=>{if(!So(d,s,null))return;const y=this.getAxisMotionValue(d),{min:p,max:m}=this.constraints[d];y.set(Xt(p,m,c[d]))})}addListeners(){if(!this.visualElement.current)return;q2.set(this.visualElement,this);const s=this.visualElement.current,o=Hs(s,"pointerdown",p=>{const{drag:m,dragListener:v=!0}=this.getProps();m&&v&&this.start(p)}),u=()=>{const{dragConstraints:p}=this.getProps();Ni(p)&&p.current&&(this.constraints=this.resolveRefConstraints())},{projection:c}=this.visualElement,h=c.addEventListener("measure",u);c&&!c.layout&&(c.root&&c.root.updateScroll(),c.updateLayout()),Lt.read(u);const d=Qs(window,"resize",()=>this.scalePositionWithinConstraints()),y=c.addEventListener("didUpdate",(({delta:p,hasLayoutChanged:m})=>{this.isDragging&&m&&(sn(v=>{const S=this.getAxisMotionValue(v);S&&(this.originPoint[v]+=p[v].translate,S.set(S.get()+p[v].translate))}),this.visualElement.render())}));return()=>{d(),o(),h(),y&&y()}}getProps(){const s=this.visualElement.getProps(),{drag:o=!1,dragDirectionLock:u=!1,dragPropagation:c=!1,dragConstraints:h=!1,dragElastic:d=Dc,dragMomentum:y=!0}=s;return{...s,drag:o,dragDirectionLock:u,dragPropagation:c,dragConstraints:h,dragElastic:d,dragMomentum:y}}}function So(i,s,o){return(s===!0||s===i)&&(o===null||o===i)}function Y2(i,s=10){let o=null;return Math.abs(i.y)>s?o="y":Math.abs(i.x)>s&&(o="x"),o}class X2 extends pa{constructor(s){super(s),this.removeGroupControls=Ze,this.removeListeners=Ze,this.controls=new G2(s)}mount(){const{dragControls:s}=this.node.getProps();s&&(this.removeGroupControls=s.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ze}unmount(){this.removeGroupControls(),this.removeListeners()}}const iy=i=>(s,o)=>{i&&Lt.postRender(()=>i(s,o))};class Z2 extends pa{constructor(){super(...arguments),this.removePointerDownListener=Ze}onPointerDown(s){this.session=new Z0(s,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:$0(this.node)})}createPanHandlers(){const{onPanSessionStart:s,onPanStart:o,onPan:u,onPanEnd:c}=this.node.getProps();return{onSessionStart:iy(s),onStart:iy(o),onMove:u,onEnd:(h,d)=>{delete this.session,c&&Lt.postRender(()=>c(h,d))}}}mount(){this.removePointerDownListener=Hs(this.node.current,"pointerdown",s=>this.onPointerDown(s))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const xo={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function sy(i,s){return s.max===s.min?0:i/(s.max-s.min)*100}const Vs={correct:(i,s)=>{if(!s.target)return i;if(typeof i=="string")if(st.test(i))i=parseFloat(i);else return i;const o=sy(i,s.target.x),u=sy(i,s.target.y);return`${o}% ${u}%`}},K2={correct:(i,{treeScale:s,projectionDelta:o})=>{const u=i,c=ma.parse(i);if(c.length>5)return u;const h=ma.createTransformer(i),d=typeof c[0]!="number"?1:0,y=o.x.scale*s.x,p=o.y.scale*s.y;c[0+d]/=y,c[1+d]/=p;const m=Xt(y,p,.5);return typeof c[2+d]=="number"&&(c[2+d]/=m),typeof c[3+d]=="number"&&(c[3+d]/=m),h(c)}};class Q2 extends D.Component{componentDidMount(){const{visualElement:s,layoutGroup:o,switchLayoutGroup:u,layoutId:c}=this.props,{projection:h}=s;Sb(J2),h&&(o.group&&o.group.add(h),u&&u.register&&c&&u.register(h),h.root.didUpdate(),h.addEventListener("animationComplete",()=>{this.safeToRemove()}),h.setOptions({...h.options,onExitComplete:()=>this.safeToRemove()})),xo.hasEverUpdated=!0}getSnapshotBeforeUpdate(s){const{layoutDependency:o,visualElement:u,drag:c,isPresent:h}=this.props,d=u.projection;return d&&(d.isPresent=h,c||s.layoutDependency!==o||o===void 0?d.willUpdate():this.safeToRemove(),s.isPresent!==h&&(h?d.promote():d.relegate()||Lt.postRender(()=>{const y=d.getStack();(!y||!y.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:s}=this.props.visualElement;s&&(s.root.didUpdate(),Hc.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:s,layoutGroup:o,switchLayoutGroup:u}=this.props,{projection:c}=s;c&&(c.scheduleCheckAfterUnmount(),o&&o.group&&o.group.remove(c),u&&u.deregister&&u.deregister(c))}safeToRemove(){const{safeToRemove:s}=this.props;s&&s()}render(){return null}}function tg(i){const[s,o]=Uy(),u=D.useContext(zc);return x.jsx(Q2,{...i,layoutGroup:u,switchLayoutGroup:D.useContext(Ky),isPresent:s,safeToRemove:o})}const J2={borderRadius:{...Vs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Vs,borderTopRightRadius:Vs,borderBottomLeftRadius:Vs,borderBottomRightRadius:Vs,boxShadow:K2};function F2(i,s,o){const u=xe(i)?i:Zs(i);return u.start(df("",u,s,o)),u.animation}function P2(i){return i instanceof SVGElement&&i.tagName!=="svg"}const W2=(i,s)=>i.depth-s.depth;class I2{constructor(){this.children=[],this.isDirty=!1}add(s){Wc(this.children,s),this.isDirty=!0}remove(s){Ic(this.children,s),this.isDirty=!0}forEach(s){this.isDirty&&this.children.sort(W2),this.isDirty=!1,this.children.forEach(s)}}function $2(i,s){const o=gn.now(),u=({timestamp:c})=>{const h=c-o;h>=s&&(ha(u),i(h-s))};return Lt.read(u,!0),()=>ha(u)}const eg=["TopLeft","TopRight","BottomLeft","BottomRight"],tx=eg.length,ly=i=>typeof i=="string"?parseFloat(i):i,oy=i=>typeof i=="number"||st.test(i);function ex(i,s,o,u,c,h){c?(i.opacity=Xt(0,o.opacity!==void 0?o.opacity:1,nx(u)),i.opacityExit=Xt(s.opacity!==void 0?s.opacity:1,0,ax(u))):h&&(i.opacity=Xt(s.opacity!==void 0?s.opacity:1,o.opacity!==void 0?o.opacity:1,u));for(let d=0;d<tx;d++){const y=`border${eg[d]}Radius`;let p=uy(s,y),m=uy(o,y);if(p===void 0&&m===void 0)continue;p||(p=0),m||(m=0),p===0||m===0||oy(p)===oy(m)?(i[y]=Math.max(Xt(ly(p),ly(m),u),0),(yn.test(m)||yn.test(p))&&(i[y]+="%")):i[y]=m}(s.rotate||o.rotate)&&(i.rotate=Xt(s.rotate||0,o.rotate||0,u))}function uy(i,s){return i[s]!==void 0?i[s]:i.borderRadius}const nx=ng(0,.5,v0),ax=ng(.5,.95,Ze);function ng(i,s,o){return u=>u<i?0:u>s?1:o(Ui(i,s,u))}function ry(i,s){i.min=s.min,i.max=s.max}function an(i,s){ry(i.x,s.x),ry(i.y,s.y)}function cy(i,s){i.translate=s.translate,i.scale=s.scale,i.originPoint=s.originPoint,i.origin=s.origin}function fy(i,s,o,u,c){return i-=s,i=Co(i,1/o,u),c!==void 0&&(i=Co(i,1/c,u)),i}function ix(i,s=0,o=1,u=.5,c,h=i,d=i){if(yn.test(s)&&(s=parseFloat(s),s=Xt(d.min,d.max,s/100)-d.min),typeof s!="number")return;let y=Xt(h.min,h.max,u);i===h&&(y-=s),i.min=fy(i.min,s,o,y,c),i.max=fy(i.max,s,o,y,c)}function dy(i,s,[o,u,c],h,d){ix(i,s[o],s[u],s[c],s.scale,h,d)}const sx=["x","scaleX","originX"],lx=["y","scaleY","originY"];function hy(i,s,o,u){dy(i.x,s,sx,o?o.x:void 0,u?u.x:void 0),dy(i.y,s,lx,o?o.y:void 0,u?u.y:void 0)}function my(i){return i.translate===0&&i.scale===1}function ag(i){return my(i.x)&&my(i.y)}function py(i,s){return i.min===s.min&&i.max===s.max}function ox(i,s){return py(i.x,s.x)&&py(i.y,s.y)}function yy(i,s){return Math.round(i.min)===Math.round(s.min)&&Math.round(i.max)===Math.round(s.max)}function ig(i,s){return yy(i.x,s.x)&&yy(i.y,s.y)}function gy(i){return Ke(i.x)/Ke(i.y)}function vy(i,s){return i.translate===s.translate&&i.scale===s.scale&&i.originPoint===s.originPoint}class ux{constructor(){this.members=[]}add(s){Wc(this.members,s),s.scheduleRender()}remove(s){if(Ic(this.members,s),s===this.prevLead&&(this.prevLead=void 0),s===this.lead){const o=this.members[this.members.length-1];o&&this.promote(o)}}relegate(s){const o=this.members.findIndex(c=>s===c);if(o===0)return!1;let u;for(let c=o;c>=0;c--){const h=this.members[c];if(h.isPresent!==!1){u=h;break}}return u?(this.promote(u),!0):!1}promote(s,o){const u=this.lead;if(s!==u&&(this.prevLead=u,this.lead=s,s.show(),u)){u.instance&&u.scheduleRender(),s.scheduleRender(),s.resumeFrom=u,o&&(s.resumeFrom.preserveOpacity=!0),u.snapshot&&(s.snapshot=u.snapshot,s.snapshot.latestValues=u.animationValues||u.latestValues),s.root&&s.root.isUpdating&&(s.isLayoutDirty=!0);const{crossfade:c}=s.options;c===!1&&u.hide()}}exitAnimationComplete(){this.members.forEach(s=>{const{options:o,resumingFrom:u}=s;o.onExitComplete&&o.onExitComplete(),u&&u.options.onExitComplete&&u.options.onExitComplete()})}scheduleRender(){this.members.forEach(s=>{s.instance&&s.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function rx(i,s,o){let u="";const c=i.x.translate/s.x,h=i.y.translate/s.y,d=(o==null?void 0:o.z)||0;if((c||h||d)&&(u=`translate3d(${c}px, ${h}px, ${d}px) `),(s.x!==1||s.y!==1)&&(u+=`scale(${1/s.x}, ${1/s.y}) `),o){const{transformPerspective:m,rotate:v,rotateX:S,rotateY:b,skewX:M,skewY:L}=o;m&&(u=`perspective(${m}px) ${u}`),v&&(u+=`rotate(${v}deg) `),S&&(u+=`rotateX(${S}deg) `),b&&(u+=`rotateY(${b}deg) `),M&&(u+=`skewX(${M}deg) `),L&&(u+=`skewY(${L}deg) `)}const y=i.x.scale*s.x,p=i.y.scale*s.y;return(y!==1||p!==1)&&(u+=`scale(${y}, ${p})`),u||"none"}const La={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Us=typeof window<"u"&&window.MotionDebug!==void 0,uc=["","X","Y","Z"],cx={visibility:"hidden"},Sy=1e3;let fx=0;function rc(i,s,o,u){const{latestValues:c}=s;c[i]&&(o[i]=c[i],s.setStaticValue(i,0),u&&(u[i]=0))}function sg(i){if(i.hasCheckedOptimisedAppear=!0,i.root===i)return;const{visualElement:s}=i.options;if(!s)return;const o=u0(s);if(window.MotionHasOptimisedAnimation(o,"transform")){const{layout:c,layoutId:h}=i.options;window.MotionCancelOptimisedAnimation(o,"transform",Lt,!(c||h))}const{parent:u}=i;u&&!u.hasCheckedOptimisedAppear&&sg(u)}function lg({attachResizeListener:i,defaultParent:s,measureScroll:o,checkIsScrollRoot:u,resetTransform:c}){return class{constructor(d={},y=s==null?void 0:s()){this.id=fx++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Us&&(La.totalNodes=La.resolvedTargetDeltas=La.recalculatedProjection=0),this.nodes.forEach(mx),this.nodes.forEach(Sx),this.nodes.forEach(bx),this.nodes.forEach(px),Us&&window.MotionDebug.record(La)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=d,this.root=y?y.root||y:this,this.path=y?[...y.path,y]:[],this.parent=y,this.depth=y?y.depth+1:0;for(let p=0;p<this.path.length;p++)this.path[p].shouldResetTransform=!0;this.root===this&&(this.nodes=new I2)}addEventListener(d,y){return this.eventHandlers.has(d)||this.eventHandlers.set(d,new $c),this.eventHandlers.get(d).add(y)}notifyListeners(d,...y){const p=this.eventHandlers.get(d);p&&p.notify(...y)}hasListeners(d){return this.eventHandlers.has(d)}mount(d,y=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=P2(d),this.instance=d;const{layoutId:p,layout:m,visualElement:v}=this.options;if(v&&!v.current&&v.mount(d),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),y&&(m||p)&&(this.isLayoutDirty=!0),i){let S;const b=()=>this.root.updateBlockedByResize=!1;i(d,()=>{this.root.updateBlockedByResize=!0,S&&S(),S=$2(b,250),xo.hasAnimatedSinceResize&&(xo.hasAnimatedSinceResize=!1,this.nodes.forEach(Ty))})}p&&this.root.registerSharedNode(p,this),this.options.animate!==!1&&v&&(p||m)&&this.addEventListener("didUpdate",({delta:S,hasLayoutChanged:b,hasRelativeTargetChanged:M,layout:L})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const z=this.options.transition||v.getDefaultTransition()||Ex,{onLayoutAnimationStart:O,onLayoutAnimationComplete:k}=v.getProps(),Y=!this.targetLayout||!ig(this.targetLayout,L)||M,G=!b&&M;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||G||b&&(Y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(S,G);const J={...Pc(z,"layout"),onPlay:O,onComplete:k};(v.shouldReduceMotion||this.options.layoutRoot)&&(J.delay=0,J.type=!1),this.startAnimation(J)}else b||Ty(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=L})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const d=this.getStack();d&&d.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ha(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(Tx),this.animationId++)}getTransformTemplate(){const{visualElement:d}=this.options;return d&&d.getProps().transformTemplate}willUpdate(d=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&sg(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let v=0;v<this.path.length;v++){const S=this.path[v];S.shouldResetTransform=!0,S.updateScroll("snapshot"),S.options.layoutRoot&&S.willUpdate(!1)}const{layoutId:y,layout:p}=this.options;if(y===void 0&&!p)return;const m=this.getTransformTemplate();this.prevTransformTemplateValue=m?m(this.latestValues,""):void 0,this.updateSnapshot(),d&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(by);return}this.isUpdating||this.nodes.forEach(gx),this.isUpdating=!1,this.nodes.forEach(vx),this.nodes.forEach(dx),this.nodes.forEach(hx),this.clearAllSnapshots();const y=gn.now();Se.delta=Hn(0,1e3/60,y-Se.timestamp),Se.timestamp=y,Se.isProcessing=!0,tc.update.process(Se),tc.preRender.process(Se),tc.render.process(Se),Se.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Hc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(yx),this.sharedNodes.forEach(xx)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Lt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Lt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let p=0;p<this.path.length;p++)this.path[p].updateScroll();const d=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Wt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:y}=this.options;y&&y.notify("LayoutMeasure",this.layout.layoutBox,d?d.layoutBox:void 0)}updateScroll(d="measure"){let y=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===d&&(y=!1),y){const p=u(this.instance);this.scroll={animationId:this.root.animationId,phase:d,isRoot:p,offset:o(this.instance),wasRoot:this.scroll?this.scroll.isRoot:p}}}resetTransform(){if(!c)return;const d=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,y=this.projectionDelta&&!ag(this.projectionDelta),p=this.getTransformTemplate(),m=p?p(this.latestValues,""):void 0,v=m!==this.prevTransformTemplateValue;d&&(y||Ua(this.latestValues)||v)&&(c(this.instance,m),this.shouldResetTransform=!1,this.scheduleRender())}measure(d=!0){const y=this.measurePageBox();let p=this.removeElementScroll(y);return d&&(p=this.removeTransform(p)),Dx(p),{animationId:this.root.animationId,measuredBox:y,layoutBox:p,latestValues:{},source:this.id}}measurePageBox(){var d;const{visualElement:y}=this.options;if(!y)return Wt();const p=y.measureViewportBox();if(!(((d=this.scroll)===null||d===void 0?void 0:d.wasRoot)||this.path.some(jx))){const{scroll:v}=this.root;v&&(zi(p.x,v.offset.x),zi(p.y,v.offset.y))}return p}removeElementScroll(d){var y;const p=Wt();if(an(p,d),!((y=this.scroll)===null||y===void 0)&&y.wasRoot)return p;for(let m=0;m<this.path.length;m++){const v=this.path[m],{scroll:S,options:b}=v;v!==this.root&&S&&b.layoutScroll&&(S.wasRoot&&an(p,d),zi(p.x,S.offset.x),zi(p.y,S.offset.y))}return p}applyTransform(d,y=!1){const p=Wt();an(p,d);for(let m=0;m<this.path.length;m++){const v=this.path[m];!y&&v.options.layoutScroll&&v.scroll&&v!==v.root&&wi(p,{x:-v.scroll.offset.x,y:-v.scroll.offset.y}),Ua(v.latestValues)&&wi(p,v.latestValues)}return Ua(this.latestValues)&&wi(p,this.latestValues),p}removeTransform(d){const y=Wt();an(y,d);for(let p=0;p<this.path.length;p++){const m=this.path[p];if(!m.instance||!Ua(m.latestValues))continue;jc(m.latestValues)&&m.updateSnapshot();const v=Wt(),S=m.measurePageBox();an(v,S),hy(y,m.latestValues,m.snapshot?m.snapshot.layoutBox:void 0,v)}return Ua(this.latestValues)&&hy(y,this.latestValues),y}setTargetDelta(d){this.targetDelta=d,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(d){this.options={...this.options,...d,crossfade:d.crossfade!==void 0?d.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!==Se.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(d=!1){var y;const p=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=p.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=p.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=p.isSharedProjectionDirty);const m=!!this.resumingFrom||this!==p;if(!(d||m&&this.isSharedProjectionDirty||this.isProjectionDirty||!((y=this.parent)===null||y===void 0)&&y.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:S,layoutId:b}=this.options;if(!(!this.layout||!(S||b))){if(this.resolvedRelativeTargetAt=Se.timestamp,!this.targetDelta&&!this.relativeTarget){const M=this.getClosestProjectingParent();M&&M.layout&&this.animationProgress!==1?(this.relativeParent=M,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Wt(),this.relativeTargetOrigin=Wt(),Gs(this.relativeTargetOrigin,this.layout.layoutBox,M.layout.layoutBox),an(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Wt(),this.targetWithTransforms=Wt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),N2(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):an(this.target,this.layout.layoutBox),W0(this.target,this.targetDelta)):an(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const M=this.getClosestProjectingParent();M&&!!M.resumingFrom==!!this.resumingFrom&&!M.options.layoutScroll&&M.target&&this.animationProgress!==1?(this.relativeParent=M,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Wt(),this.relativeTargetOrigin=Wt(),Gs(this.relativeTargetOrigin,this.target,M.target),an(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Us&&La.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||jc(this.parent.latestValues)||P0(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var d;const y=this.getLead(),p=!!this.resumingFrom||this!==y;let m=!0;if((this.isProjectionDirty||!((d=this.parent)===null||d===void 0)&&d.isProjectionDirty)&&(m=!1),p&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(m=!1),this.resolvedRelativeTargetAt===Se.timestamp&&(m=!1),m)return;const{layout:v,layoutId:S}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(v||S))return;an(this.layoutCorrected,this.layout.layoutBox);const b=this.treeScale.x,M=this.treeScale.y;k2(this.layoutCorrected,this.treeScale,this.path,p),y.layout&&!y.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(y.target=y.layout.layoutBox,y.targetWithTransforms=Wt());const{target:L}=y;if(!L){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(cy(this.prevProjectionDelta.x,this.projectionDelta.x),cy(this.prevProjectionDelta.y,this.projectionDelta.y)),qs(this.projectionDelta,this.layoutCorrected,L,this.latestValues),(this.treeScale.x!==b||this.treeScale.y!==M||!vy(this.projectionDelta.x,this.prevProjectionDelta.x)||!vy(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",L)),Us&&La.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(d=!0){var y;if((y=this.options.visualElement)===null||y===void 0||y.scheduleRender(),d){const p=this.getStack();p&&p.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ri(),this.projectionDelta=Ri(),this.projectionDeltaWithTransform=Ri()}setAnimationOrigin(d,y=!1){const p=this.snapshot,m=p?p.latestValues:{},v={...this.latestValues},S=Ri();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!y;const b=Wt(),M=p?p.source:void 0,L=this.layout?this.layout.source:void 0,z=M!==L,O=this.getStack(),k=!O||O.members.length<=1,Y=!!(z&&!k&&this.options.crossfade===!0&&!this.path.some(Ax));this.animationProgress=0;let G;this.mixTargetDelta=J=>{const B=J/1e3;xy(S.x,d.x,B),xy(S.y,d.y,B),this.setTargetDelta(S),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Gs(b,this.layout.layoutBox,this.relativeParent.layout.layoutBox),_x(this.relativeTarget,this.relativeTargetOrigin,b,B),G&&ox(this.relativeTarget,G)&&(this.isProjectionDirty=!1),G||(G=Wt()),an(G,this.relativeTarget)),z&&(this.animationValues=v,ex(v,m,this.latestValues,B,Y,k)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=B},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(d){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ha(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Lt.update(()=>{xo.hasAnimatedSinceResize=!0,this.currentAnimation=F2(0,Sy,{...d,onUpdate:y=>{this.mixTargetDelta(y),d.onUpdate&&d.onUpdate(y)},onComplete:()=>{d.onComplete&&d.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 d=this.getStack();d&&d.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Sy),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const d=this.getLead();let{targetWithTransforms:y,target:p,layout:m,latestValues:v}=d;if(!(!y||!p||!m)){if(this!==d&&this.layout&&m&&og(this.options.animationType,this.layout.layoutBox,m.layoutBox)){p=this.target||Wt();const S=Ke(this.layout.layoutBox.x);p.x.min=d.target.x.min,p.x.max=p.x.min+S;const b=Ke(this.layout.layoutBox.y);p.y.min=d.target.y.min,p.y.max=p.y.min+b}an(y,p),wi(y,v),qs(this.projectionDeltaWithTransform,this.layoutCorrected,y,v)}}registerSharedNode(d,y){this.sharedNodes.has(d)||this.sharedNodes.set(d,new ux),this.sharedNodes.get(d).add(y);const m=y.options.initialPromotionConfig;y.promote({transition:m?m.transition:void 0,preserveFollowOpacity:m&&m.shouldPreserveFollowOpacity?m.shouldPreserveFollowOpacity(y):void 0})}isLead(){const d=this.getStack();return d?d.lead===this:!0}getLead(){var d;const{layoutId:y}=this.options;return y?((d=this.getStack())===null||d===void 0?void 0:d.lead)||this:this}getPrevLead(){var d;const{layoutId:y}=this.options;return y?(d=this.getStack())===null||d===void 0?void 0:d.prevLead:void 0}getStack(){const{layoutId:d}=this.options;if(d)return this.root.sharedNodes.get(d)}promote({needsReset:d,transition:y,preserveFollowOpacity:p}={}){const m=this.getStack();m&&m.promote(this,p),d&&(this.projectionDelta=void 0,this.needsReset=!0),y&&this.setOptions({transition:y})}relegate(){const d=this.getStack();return d?d.relegate(this):!1}resetSkewAndRotation(){const{visualElement:d}=this.options;if(!d)return;let y=!1;const{latestValues:p}=d;if((p.z||p.rotate||p.rotateX||p.rotateY||p.rotateZ||p.skewX||p.skewY)&&(y=!0),!y)return;const m={};p.z&&rc("z",d,m,this.animationValues);for(let v=0;v<uc.length;v++)rc(`rotate${uc[v]}`,d,m,this.animationValues),rc(`skew${uc[v]}`,d,m,this.animationValues);d.render();for(const v in m)d.setStaticValue(v,m[v]),this.animationValues&&(this.animationValues[v]=m[v]);d.scheduleRender()}getProjectionStyles(d){var y,p;if(!this.instance||this.isSVG)return;if(!this.isVisible)return cx;const m={visibility:""},v=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,m.opacity="",m.pointerEvents=bo(d==null?void 0:d.pointerEvents)||"",m.transform=v?v(this.latestValues,""):"none",m;const S=this.getLead();if(!this.projectionDelta||!this.layout||!S.target){const z={};return this.options.layoutId&&(z.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,z.pointerEvents=bo(d==null?void 0:d.pointerEvents)||""),this.hasProjected&&!Ua(this.latestValues)&&(z.transform=v?v({},""):"none",this.hasProjected=!1),z}const b=S.animationValues||S.latestValues;this.applyTransformsToTarget(),m.transform=rx(this.projectionDeltaWithTransform,this.treeScale,b),v&&(m.transform=v(b,m.transform));const{x:M,y:L}=this.projectionDelta;m.transformOrigin=`${M.origin*100}% ${L.origin*100}% 0`,S.animationValues?m.opacity=S===this?(p=(y=b.opacity)!==null&&y!==void 0?y:this.latestValues.opacity)!==null&&p!==void 0?p:1:this.preserveOpacity?this.latestValues.opacity:b.opacityExit:m.opacity=S===this?b.opacity!==void 0?b.opacity:"":b.opacityExit!==void 0?b.opacityExit:0;for(const z in Ao){if(b[z]===void 0)continue;const{correct:O,applyTo:k}=Ao[z],Y=m.transform==="none"?b[z]:O(b[z],S);if(k){const G=k.length;for(let J=0;J<G;J++)m[k[J]]=Y}else m[z]=Y}return this.options.layoutId&&(m.pointerEvents=S===this?bo(d==null?void 0:d.pointerEvents)||"":"none"),m}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(d=>{var y;return(y=d.currentAnimation)===null||y===void 0?void 0:y.stop()}),this.root.nodes.forEach(by),this.root.sharedNodes.clear()}}}function dx(i){i.updateLayout()}function hx(i){var s;const o=((s=i.resumeFrom)===null||s===void 0?void 0:s.snapshot)||i.snapshot;if(i.isLead()&&i.layout&&o&&i.hasListeners("didUpdate")){const{layoutBox:u,measuredBox:c}=i.layout,{animationType:h}=i.options,d=o.source!==i.layout.source;h==="size"?sn(S=>{const b=d?o.measuredBox[S]:o.layoutBox[S],M=Ke(b);b.min=u[S].min,b.max=b.min+M}):og(h,o.layoutBox,u)&&sn(S=>{const b=d?o.measuredBox[S]:o.layoutBox[S],M=Ke(u[S]);b.max=b.min+M,i.relativeTarget&&!i.currentAnimation&&(i.isProjectionDirty=!0,i.relativeTarget[S].max=i.relativeTarget[S].min+M)});const y=Ri();qs(y,u,o.layoutBox);const p=Ri();d?qs(p,i.applyTransform(c,!0),o.measuredBox):qs(p,u,o.layoutBox);const m=!ag(y);let v=!1;if(!i.resumeFrom){const S=i.getClosestProjectingParent();if(S&&!S.resumeFrom){const{snapshot:b,layout:M}=S;if(b&&M){const L=Wt();Gs(L,o.layoutBox,b.layoutBox);const z=Wt();Gs(z,u,M.layoutBox),ig(L,z)||(v=!0),S.options.layoutRoot&&(i.relativeTarget=z,i.relativeTargetOrigin=L,i.relativeParent=S)}}}i.notifyListeners("didUpdate",{layout:u,snapshot:o,delta:p,layoutDelta:y,hasLayoutChanged:m,hasRelativeTargetChanged:v})}else if(i.isLead()){const{onExitComplete:u}=i.options;u&&u()}i.options.transition=void 0}function mx(i){Us&&La.totalNodes++,i.parent&&(i.isProjecting()||(i.isProjectionDirty=i.parent.isProjectionDirty),i.isSharedProjectionDirty||(i.isSharedProjectionDirty=!!(i.isProjectionDirty||i.parent.isProjectionDirty||i.parent.isSharedProjectionDirty)),i.isTransformDirty||(i.isTransformDirty=i.parent.isTransformDirty))}function px(i){i.isProjectionDirty=i.isSharedProjectionDirty=i.isTransformDirty=!1}function yx(i){i.clearSnapshot()}function by(i){i.clearMeasurements()}function gx(i){i.isLayoutDirty=!1}function vx(i){const{visualElement:s}=i.options;s&&s.getProps().onBeforeLayoutMeasure&&s.notify("BeforeLayoutMeasure"),i.resetTransform()}function Ty(i){i.finishAnimation(),i.targetDelta=i.relativeTarget=i.target=void 0,i.isProjectionDirty=!0}function Sx(i){i.resolveTargetDelta()}function bx(i){i.calcProjection()}function Tx(i){i.resetSkewAndRotation()}function xx(i){i.removeLeadSnapshot()}function xy(i,s,o){i.translate=Xt(s.translate,0,o),i.scale=Xt(s.scale,1,o),i.origin=s.origin,i.originPoint=s.originPoint}function _y(i,s,o,u){i.min=Xt(s.min,o.min,u),i.max=Xt(s.max,o.max,u)}function _x(i,s,o,u){_y(i.x,s.x,o.x,u),_y(i.y,s.y,o.y,u)}function Ax(i){return i.animationValues&&i.animationValues.opacityExit!==void 0}const Ex={duration:.45,ease:[.4,0,.1,1]},Ay=i=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(i),Ey=Ay("applewebkit/")&&!Ay("chrome/")?Math.round:Ze;function Dy(i){i.min=Ey(i.min),i.max=Ey(i.max)}function Dx(i){Dy(i.x),Dy(i.y)}function og(i,s,o){return i==="position"||i==="preserve-aspect"&&!C2(gy(s),gy(o),.2)}function jx(i){var s;return i!==i.root&&((s=i.scroll)===null||s===void 0?void 0:s.wasRoot)}const Mx=lg({attachResizeListener:(i,s)=>Qs(i,"resize",s),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),cc={current:void 0},ug=lg({measureScroll:i=>({x:i.scrollLeft,y:i.scrollTop}),defaultParent:()=>{if(!cc.current){const i=new Mx({});i.mount(window),i.setOptions({layoutScroll:!0}),cc.current=i}return cc.current},resetTransform:(i,s)=>{i.style.transform=s!==void 0?s:"none"},checkIsScrollRoot:i=>window.getComputedStyle(i).position==="fixed"}),Cx={pan:{Feature:Z2},drag:{Feature:X2,ProjectionNode:ug,MeasureLayout:tg}};function Nx(i,s,o){var u;if(i instanceof Element)return[i];if(typeof i=="string"){let c=document;const h=(u=void 0)!==null&&u!==void 0?u:c.querySelectorAll(i);return h?Array.from(h):[]}return Array.from(i)}function rg(i,s){const o=Nx(i),u=new AbortController,c={passive:!0,...s,signal:u.signal};return[o,c,()=>u.abort()]}function jy(i){return s=>{s.pointerType==="touch"||X0()||i(s)}}function Ox(i,s,o={}){const[u,c,h]=rg(i,o),d=jy(y=>{const{target:p}=y,m=s(y);if(typeof m!="function"||!p)return;const v=jy(S=>{m(S),p.removeEventListener("pointerleave",v)});p.addEventListener("pointerleave",v,c)});return u.forEach(y=>{y.addEventListener("pointerenter",d,c)}),h}function My(i,s,o){const{props:u}=i;i.animationState&&u.whileHover&&i.animationState.setActive("whileHover",o==="Start");const c="onHover"+o,h=u[c];h&&Lt.postRender(()=>h(s,Ws(s)))}class Rx extends pa{mount(){const{current:s}=this.node;s&&(this.unmount=Ox(s,o=>(My(this.node,o,"Start"),u=>My(this.node,u,"End"))))}unmount(){}}class zx extends pa{constructor(){super(...arguments),this.isActive=!1}onFocus(){let s=!1;try{s=this.node.current.matches(":focus-visible")}catch{s=!0}!s||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ps(Qs(this.node.current,"focus",()=>this.onFocus()),Qs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const cg=(i,s)=>s?i===s?!0:cg(i,s.parentElement):!1,wx=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Vx(i){return wx.has(i.tagName)||i.tabIndex!==-1}const Ls=new WeakSet;function Cy(i){return s=>{s.key==="Enter"&&i(s)}}function fc(i,s){i.dispatchEvent(new PointerEvent("pointer"+s,{isPrimary:!0,bubbles:!0}))}const Bx=(i,s)=>{const o=i.currentTarget;if(!o)return;const u=Cy(()=>{if(Ls.has(o))return;fc(o,"down");const c=Cy(()=>{fc(o,"up")}),h=()=>fc(o,"cancel");o.addEventListener("keyup",c,s),o.addEventListener("blur",h,s)});o.addEventListener("keydown",u,s),o.addEventListener("blur",()=>o.removeEventListener("keydown",u),s)};function Ny(i){return hf(i)&&!X0()}function Ux(i,s,o={}){const[u,c,h]=rg(i,o),d=y=>{const p=y.currentTarget;if(!Ny(y)||Ls.has(p))return;Ls.add(p);const m=s(y),v=(M,L)=>{window.removeEventListener("pointerup",S),window.removeEventListener("pointercancel",b),!(!Ny(M)||!Ls.has(p))&&(Ls.delete(p),typeof m=="function"&&m(M,{success:L}))},S=M=>{v(M,o.useGlobalTarget||cg(p,M.target))},b=M=>{v(M,!1)};window.addEventListener("pointerup",S,c),window.addEventListener("pointercancel",b,c)};return u.forEach(y=>{!Vx(y)&&y.getAttribute("tabindex")===null&&(y.tabIndex=0),(o.useGlobalTarget?window:y).addEventListener("pointerdown",d,c),y.addEventListener("focus",m=>Bx(m,c),c)}),h}function Oy(i,s,o){const{props:u}=i;i.animationState&&u.whileTap&&i.animationState.setActive("whileTap",o==="Start");const c="onTap"+(o==="End"?"":o),h=u[c];h&&Lt.postRender(()=>h(s,Ws(s)))}class Lx extends pa{mount(){const{current:s}=this.node;s&&(this.unmount=Ux(s,o=>(Oy(this.node,o,"Start"),(u,{success:c})=>Oy(this.node,u,c?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Cc=new WeakMap,dc=new WeakMap,kx=i=>{const s=Cc.get(i.target);s&&s(i)},Hx=i=>{i.forEach(kx)};function qx({root:i,...s}){const o=i||document;dc.has(o)||dc.set(o,{});const u=dc.get(o),c=JSON.stringify(s);return u[c]||(u[c]=new IntersectionObserver(Hx,{root:i,...s})),u[c]}function Gx(i,s,o){const u=qx(s);return Cc.set(i,o),u.observe(i),()=>{Cc.delete(i),u.unobserve(i)}}const Yx={some:0,all:1};class Xx extends pa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:s={}}=this.node.getProps(),{root:o,margin:u,amount:c="some",once:h}=s,d={root:o?o.current:void 0,rootMargin:u,threshold:typeof c=="number"?c:Yx[c]},y=p=>{const{isIntersecting:m}=p;if(this.isInView===m||(this.isInView=m,h&&!m&&this.hasEnteredView))return;m&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",m);const{onViewportEnter:v,onViewportLeave:S}=this.node.getProps(),b=m?v:S;b&&b(p)};return Gx(this.node.current,d,y)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:s,prevProps:o}=this.node;["amount","margin","root"].some(Zx(s,o))&&this.startObserver()}unmount(){}}function Zx({viewport:i={}},{viewport:s={}}={}){return o=>i[o]!==s[o]}const Kx={inView:{Feature:Xx},tap:{Feature:Lx},focus:{Feature:zx},hover:{Feature:Rx}},Qx={layout:{ProjectionNode:ug,MeasureLayout:tg}},Nc={current:null},fg={current:!1};function Jx(){if(fg.current=!0,!!Bc)if(window.matchMedia){const i=window.matchMedia("(prefers-reduced-motion)"),s=()=>Nc.current=i.matches;i.addListener(s),s()}else Nc.current=!1}const Fx=[...R0,Te,ma],Px=i=>Fx.find(O0(i)),Ry=new WeakMap;function Wx(i,s,o){for(const u in s){const c=s[u],h=o[u];if(xe(c))i.addValue(u,c);else if(xe(h))i.addValue(u,Zs(c,{owner:i}));else if(h!==c)if(i.hasValue(u)){const d=i.getValue(u);d.liveStyle===!0?d.jump(c):d.hasAnimated||d.set(c)}else{const d=i.getStaticValue(u);i.addValue(u,Zs(d!==void 0?d:c,{owner:i}))}}for(const u in o)s[u]===void 0&&i.removeValue(u);return s}const zy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Ix{scrapeMotionValuesFromProps(s,o,u){return{}}constructor({parent:s,props:o,presenceContext:u,reducedMotionConfig:c,blockInitialAnimation:h,visualState:d},y={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=rf,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 M=gn.now();this.renderScheduledAt<M&&(this.renderScheduledAt=M,Lt.render(this.render,!1,!0))};const{latestValues:p,renderState:m,onUpdate:v}=d;this.onUpdate=v,this.latestValues=p,this.baseTarget={...p},this.initialValues=o.initial?{...p}:{},this.renderState=m,this.parent=s,this.props=o,this.presenceContext=u,this.depth=s?s.depth+1:0,this.reducedMotionConfig=c,this.options=y,this.blockInitialAnimation=!!h,this.isControllingVariants=wo(o),this.isVariantNode=Xy(o),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(s&&s.current);const{willChange:S,...b}=this.scrapeMotionValuesFromProps(o,{},this);for(const M in b){const L=b[M];p[M]!==void 0&&xe(L)&&L.set(p[M],!1)}}mount(s){this.current=s,Ry.set(s,this),this.projection&&!this.projection.instance&&this.projection.mount(s),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((o,u)=>this.bindToMotionValue(u,o)),fg.current||Jx(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Nc.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Ry.delete(this.current),this.projection&&this.projection.unmount(),ha(this.notifyUpdate),ha(this.render),this.valueSubscriptions.forEach(s=>s()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const s in this.events)this.events[s].clear();for(const s in this.features){const o=this.features[s];o&&(o.unmount(),o.isMounted=!1)}this.current=null}bindToMotionValue(s,o){this.valueSubscriptions.has(s)&&this.valueSubscriptions.get(s)();const u=Ga.has(s),c=o.on("change",y=>{this.latestValues[s]=y,this.props.onUpdate&&Lt.preRender(this.notifyUpdate),u&&this.projection&&(this.projection.isTransformDirty=!0)}),h=o.on("renderRequest",this.scheduleRender);let d;window.MotionCheckAppearSync&&(d=window.MotionCheckAppearSync(this,s,o)),this.valueSubscriptions.set(s,()=>{c(),h(),d&&d(),o.owner&&o.stop()})}sortNodePosition(s){return!this.current||!this.sortInstanceNodePosition||this.type!==s.type?0:this.sortInstanceNodePosition(this.current,s.current)}updateFeatures(){let s="animation";for(s in Bi){const o=Bi[s];if(!o)continue;const{isEnabled:u,Feature:c}=o;if(!this.features[s]&&c&&u(this.props)&&(this.features[s]=new c(this)),this.features[s]){const h=this.features[s];h.isMounted?h.update():(h.mount(),h.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Wt()}getStaticValue(s){return this.latestValues[s]}setStaticValue(s,o){this.latestValues[s]=o}update(s,o){(s.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=s,this.prevPresenceContext=this.presenceContext,this.presenceContext=o;for(let u=0;u<zy.length;u++){const c=zy[u];this.propEventSubscriptions[c]&&(this.propEventSubscriptions[c](),delete this.propEventSubscriptions[c]);const h="on"+c,d=s[h];d&&(this.propEventSubscriptions[c]=this.on(c,d))}this.prevMotionValues=Wx(this,this.scrapeMotionValuesFromProps(s,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(s){return this.props.variants?this.props.variants[s]: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(s){const o=this.getClosestVariantNode();if(o)return o.variantChildren&&o.variantChildren.add(s),()=>o.variantChildren.delete(s)}addValue(s,o){const u=this.values.get(s);o!==u&&(u&&this.removeValue(s),this.bindToMotionValue(s,o),this.values.set(s,o),this.latestValues[s]=o.get())}removeValue(s){this.values.delete(s);const o=this.valueSubscriptions.get(s);o&&(o(),this.valueSubscriptions.delete(s)),delete this.latestValues[s],this.removeValueFromRenderState(s,this.renderState)}hasValue(s){return this.values.has(s)}getValue(s,o){if(this.props.values&&this.props.values[s])return this.props.values[s];let u=this.values.get(s);return u===void 0&&o!==void 0&&(u=Zs(o===null?void 0:o,{owner:this}),this.addValue(s,u)),u}readValue(s,o){var u;let c=this.latestValues[s]!==void 0||!this.current?this.latestValues[s]:(u=this.getBaseTargetFromProps(this.props,s))!==null&&u!==void 0?u:this.readValueFromInstance(this.current,s,this.options);return c!=null&&(typeof c=="string"&&(C0(c)||b0(c))?c=parseFloat(c):!Px(c)&&ma.test(o)&&(c=D0(s,o)),this.setBaseTarget(s,xe(c)?c.get():c)),xe(c)?c.get():c}setBaseTarget(s,o){this.baseTarget[s]=o}getBaseTarget(s){var o;const{initial:u}=this.props;let c;if(typeof u=="string"||typeof u=="object"){const d=Gc(this.props,u,(o=this.presenceContext)===null||o===void 0?void 0:o.custom);d&&(c=d[s])}if(u&&c!==void 0)return c;const h=this.getBaseTargetFromProps(this.props,s);return h!==void 0&&!xe(h)?h:this.initialValues[s]!==void 0&&c===void 0?void 0:this.baseTarget[s]}on(s,o){return this.events[s]||(this.events[s]=new $c),this.events[s].add(o)}notify(s,...o){this.events[s]&&this.events[s].notify(...o)}}class dg extends Ix{constructor(){super(...arguments),this.KeyframeResolver=z0}sortInstanceNodePosition(s,o){return s.compareDocumentPosition(o)&2?1:-1}getBaseTargetFromProps(s,o){return s.style?s.style[o]:void 0}removeValueFromRenderState(s,{vars:o,style:u}){delete o[s],delete u[s]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:s}=this.props;xe(s)&&(this.childSubscription=s.on("change",o=>{this.current&&(this.current.textContent=`${o}`)}))}}function $x(i){return window.getComputedStyle(i)}class t_ extends dg{constructor(){super(...arguments),this.type="html",this.renderInstance=$y}readValueFromInstance(s,o){if(Ga.has(o)){const u=uf(o);return u&&u.default||0}else{const u=$x(s),c=(Py(o)?u.getPropertyValue(o):u[o])||0;return typeof c=="string"?c.trim():c}}measureInstanceViewportBox(s,{transformPagePoint:o}){return I0(s,o)}build(s,o,u){Zc(s,o,u.transformTemplate)}scrapeMotionValuesFromProps(s,o,u){return Fc(s,o,u)}}class e_ extends dg{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Wt}getBaseTargetFromProps(s,o){return s[o]}readValueFromInstance(s,o){if(Ga.has(o)){const u=uf(o);return u&&u.default||0}return o=t0.has(o)?o:kc(o),s.getAttribute(o)}scrapeMotionValuesFromProps(s,o,u){return a0(s,o,u)}build(s,o,u){Kc(s,o,this.isSVGTag,u.transformTemplate)}renderInstance(s,o,u,c){e0(s,o,u,c)}mount(s){this.isSVGTag=Jc(s.tagName),super.mount(s)}}const n_=(i,s)=>qc(i)?new e_(s):new t_(s,{allowProjection:i!==D.Fragment}),a_=Mb({...S2,...Kx,...Cx,...Qx},n_),Vi=YS(a_),i_="_container_1c7bs_1",s_="_header_1c7bs_5",l_="_addButton_1c7bs_17",o_="_createForm_1c7bs_35",u_="_createInput_1c7bs_41",r_="_createButton_1c7bs_71",c_="_emptyState_1c7bs_101",f_="_projectRow_1c7bs_107",d_="_selected_1c7bs_127",h_="_expandArrow_1c7bs_134",m_="_expanded_1c7bs_141",p_="_projectName_1c7bs_145",y_="_taskCount_1c7bs_149",g_="_newTaskButton_1c7bs_155",v_="_taskRow_1c7bs_173",S_="_taskStatusIcon_1c7bs_202",b_="_taskTitle_1c7bs_206",T_="_dependencyBadge_1c7bs_213",x_="_emptyTasks_1c7bs_226",ie={container:i_,header:s_,addButton:l_,createForm:o_,createInput:u_,createButton:r_,emptyState:c_,projectRow:f_,selected:d_,expandArrow:h_,expanded:m_,projectName:p_,taskCount:y_,newTaskButton:g_,taskRow:v_,taskStatusIcon:S_,taskTitle:b_,dependencyBadge:T_,emptyTasks:x_},wy={pending:{color:"var(--text-tertiary)",icon:"○"},assigned:{color:"var(--accent-blue)",icon:"◎"},in_progress:{color:"var(--accent-green)",icon:"●"},review:{color:"var(--accent-yellow)",icon:"◉"},done:{color:"var(--accent-green)",icon:"✓"},failed:{color:"var(--accent-red)",icon:"✗"}};function __({viewMode:i,setViewMode:s}){const{projects:o,tasks:u,loadTasks:c,createProject:h}=qa(),[d,y]=D.useState(new Set),[p,m]=D.useState(!1),[v,S]=D.useState(""),b=i.kind==="project"?i.projectId:null,M=i.kind==="task"?i.taskId:null,L=O=>{y(k=>{const Y=new Set(k);return Y.has(O)?Y.delete(O):(Y.add(O),c(O)),Y})};D.useEffect(()=>{b&&!d.has(b)&&(y(O=>new Set(O).add(b)),c(b))},[b,d,c]);const z=()=>{v.trim()&&(h(v.trim()),S(""),m(!1))};return x.jsxs("div",{className:ie.container,children:[x.jsxs("div",{className:ie.header,children:[x.jsx("span",{children:"Projects"}),x.jsx("button",{className:ie.addButton,onClick:()=>m(!p),"aria-label":"Create project",title:"Create project",children:"+"})]}),p&&x.jsxs("div",{className:ie.createForm,children:[x.jsx("input",{type:"text",value:v,onChange:O=>S(O.target.value),onKeyDown:O=>O.key==="Enter"&&z(),placeholder:"Project name...",autoFocus:!0,className:ie.createInput}),x.jsx("button",{onClick:z,className:ie.createButton,children:"OK"})]}),o.length===0&&!p&&x.jsx("div",{className:ie.emptyState,children:"No projects. Click + to create one."}),o.map(O=>{const k=d.has(O.id),Y=u.filter(J=>J.projectId===O.id),G=b===O.id;return x.jsxs("div",{children:[x.jsxs("div",{onClick:()=>{L(O.id),s({kind:"project",projectId:O.id})},className:`${ie.projectRow} ${G?ie.selected:""}`,children:[x.jsx("span",{className:`${ie.expandArrow} ${k?ie.expanded:""}`,children:"▸"}),x.jsx("span",{className:ie.projectName,children:O.name}),x.jsx("span",{className:ie.taskCount,children:Y.length>0&&`${Y.filter(J=>J.status==="done").length}/${Y.length}`}),x.jsx("button",{onClick:J=>{J.stopPropagation(),s({kind:"new_task",projectId:O.id})},title:"New task",className:ie.newTaskButton,children:"+"})]}),x.jsx(ky,{children:k&&x.jsxs(Vi.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:"easeInOut"},style:{overflow:"hidden"},children:[Y.map((J,B)=>{const Z=wy[J.status]||wy.pending,Q=M===J.id;return x.jsxs(Vi.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{delay:B*.03,duration:.2},onClick:()=>s({kind:"task",taskId:J.id}),className:`${ie.taskRow} ${Q?ie.selected:""}`,children:[x.jsx("span",{className:ie.taskStatusIcon,style:{color:Z.color},children:Z.icon}),x.jsx("span",{className:ie.taskTitle,children:J.title}),J.dependsOn.length>0&&x.jsx("span",{className:ie.dependencyBadge,title:`Depends on: ${J.dependsOn.join(", ")}`,children:"dep"})]},J.id)}),Y.length===0&&x.jsx("div",{className:ie.emptyTasks,children:"No tasks yet"})]})})]},O.id)})]})}const A_="_container_12pne_1",E_="_tabBar_12pne_25",D_="_tab_12pne_25",j_="_active_12pne_51",M_="_content_12pne_57",Ba={container:A_,tabBar:E_,tab:D_,active:j_,content:M_};function C_({viewMode:i,setViewMode:s}){const[o,u]=D.useState("projects");return x.jsxs("div",{className:Ba.container,children:[x.jsxs("div",{className:Ba.tabBar,children:[x.jsx("button",{className:`${Ba.tab} ${o==="projects"?Ba.active:""}`,onClick:()=>u("projects"),children:"Projects"}),x.jsx("button",{className:`${Ba.tab} ${o==="environments"?Ba.active:""}`,onClick:()=>u("environments"),children:"Environments"})]}),x.jsx("div",{className:Ba.content,children:o==="projects"?x.jsx(__,{viewMode:i,setViewMode:s}):x.jsx(OS,{viewMode:i,setViewMode:s})})]})}const N_="_bar_o88a6_1",O_="_barColumn_o88a6_25",R_="_barRow_o88a6_50",z_="_input_o88a6_56",w_="_inputSmall_o88a6_84",V_="_select_o88a6_113",B_="_btnPrimary_o88a6_142",U_="_btnDanger_o88a6_168",L_="_badge_o88a6_200",k_="_statusText_o88a6_210",H_="_statusCompleted_o88a6_215",q_="_statusFailed_o88a6_219",G_="_statusBlocked_o88a6_223",Y_="_hintText_o88a6_228",at={bar:N_,barColumn:O_,barRow:R_,input:z_,inputSmall:w_,select:V_,btnPrimary:B_,btnDanger:U_,badge:L_,statusText:k_,statusCompleted:H_,statusFailed:q_,statusBlocked:G_,hintText:Y_};function X_({value:i,onChange:s}){return x.jsxs("select",{value:i,onChange:o=>s(o.target.value),className:at.select,children:[x.jsx("option",{value:"claude-code",children:"claude-code"}),x.jsx("option",{value:"codex",children:"codex"}),x.jsx("option",{value:"copilot",children:"copilot"}),x.jsx("option",{value:"stub",children:"stub"})]})}function Z_({viewMode:i,setViewMode:s}){const{spawn:o,sendInput:u,kill:c,sessions:h,tasks:d,environments:y,createTask:p,startTask:m,approveTask:v,rejectTask:S}=qa(),[b,M]=D.useState(""),[L,z]=D.useState(i.kind==="new_chat"?i.runtime:"claude-code"),[O,k]=D.useState(""),[Y,G]=D.useState(""),[J,B]=D.useState(""),[Z,Q]=D.useState("");D.useEffect(()=>{i.kind==="new_chat"&&z(i.runtime)},[i]);const C=i.kind==="session"?h.find(ot=>ot.id===i.sessionId):void 0,K=i.kind==="task"?d.find(ot=>ot.id===i.taskId):void 0,lt=K!=null&&K.sessionId?h.find(ot=>ot.id===K.sessionId):void 0,gt=K?K.dependsOn.some(ot=>{const ut=d.find(wt=>wt.id===ot);return ut&&ut.status!=="done"}):!1;if(i.kind==="empty")return x.jsx("div",{className:at.bar,children:x.jsx("span",{className:at.hintText,children:"Select a session or click + to start"})});if(i.kind==="project")return x.jsx("div",{className:at.bar,children:x.jsx("span",{className:at.hintText,children:"Select a task or click + to create one"})});if(i.kind==="new_task"){const ot=ut=>{O.trim()&&(p(i.projectId,O.trim(),Y,J),k(""),G(""),B(""),s({kind:"project",projectId:i.projectId}))};return x.jsxs("div",{className:at.barColumn,children:[x.jsxs("div",{className:at.barRow,children:[x.jsx("span",{className:at.badge,children:"new task"}),x.jsx("input",{type:"text",value:O,onChange:ut=>k(ut.target.value),placeholder:"Task title...",autoFocus:!0,className:at.input}),x.jsxs("select",{value:J,onChange:ut=>B(ut.target.value),className:at.select,children:[x.jsx("option",{value:"",children:"Default env"}),y.map(ut=>x.jsx("option",{value:ut.id,children:ut.displayName},ut.id))]}),x.jsx("button",{onClick:()=>ot(),disabled:!O.trim(),className:at.btnPrimary,children:"Create"})]}),x.jsx("input",{type:"text",value:Y,onChange:ut=>G(ut.target.value),placeholder:"Description (optional)...",className:at.inputSmall})]})}if(i.kind==="task"&&K){if(K.status==="pending"&&gt){const ot=K.dependsOn.map(ut=>d.find(wt=>wt.id===ut)).filter(ut=>ut&&ut.status!=="done").map(ut=>ut.title);return x.jsx("div",{className:at.bar,children:x.jsxs("span",{className:at.statusBlocked,children:["Blocked by: ",ot.join(", ")]})})}if(K.status==="pending"||K.status==="assigned")return x.jsx("div",{className:at.bar,children:x.jsx("button",{onClick:()=>m(K.id),className:at.btnPrimary,children:"Start Task"})});if(K.status==="in_progress"){if((lt==null?void 0:lt.status)==="waiting_input"){const ut=wt=>{wt.preventDefault(),!(!b.trim()||!K.sessionId)&&(u(K.sessionId,b),M(""))};return x.jsxs("form",{onSubmit:ut,className:at.bar,children:[x.jsx("input",{type:"text",value:b,onChange:wt=>M(wt.target.value),placeholder:"Type a message...",autoFocus:!0,className:at.input}),x.jsx("button",{type:"submit",disabled:!b.trim(),className:at.btnPrimary,children:"Send"}),x.jsx("button",{type:"button",onClick:()=>K.sessionId&&c(K.sessionId),className:at.btnDanger,children:"Stop"})]})}return x.jsxs("div",{className:at.bar,children:[x.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:at.input}),x.jsx("button",{onClick:()=>K.sessionId&&c(K.sessionId),className:at.btnDanger,children:"Stop"})]})}if(K.status==="review")return x.jsxs("div",{className:at.bar,children:[x.jsx("input",{type:"text",value:Z,onChange:ot=>Q(ot.target.value),placeholder:"Rejection notes (optional)...",className:at.input}),x.jsx("button",{onClick:()=>{v(K.id)},className:at.btnPrimary,children:"Approve"}),x.jsx("button",{onClick:()=>{S(K.id,Z),Q("")},className:at.btnDanger,children:"Reject"})]});if(K.status==="done")return x.jsxs("div",{className:at.bar,children:[x.jsx("span",{className:`${at.statusText} ${at.statusCompleted}`,children:"Task completed"}),x.jsx("button",{onClick:()=>s({kind:"new_task",projectId:K.projectId}),className:at.btnPrimary,children:"+ New Task"})]});if(K.status==="failed")return x.jsxs("div",{className:at.bar,children:[x.jsx("span",{className:`${at.statusText} ${at.statusFailed}`,children:"Task failed"}),x.jsx("button",{onClick:()=>m(K.id),className:at.btnPrimary,children:"Retry"})]})}if(i.kind==="new_chat"){const ot=ut=>{ut.preventDefault(),b.trim()&&(o(i.environmentId,b,void 0,L),M(""))};return x.jsxs("form",{onSubmit:ot,className:at.bar,children:[x.jsx("span",{className:at.badge,children:"new chat"}),x.jsx("input",{type:"text",value:b,onChange:ut=>M(ut.target.value),placeholder:"Enter prompt...",autoFocus:!0,className:at.input}),x.jsx(X_,{value:L,onChange:z}),x.jsx("button",{type:"submit",disabled:!b.trim(),className:at.btnPrimary,children:"Go"})]})}if(i.kind==="session"){const ot=(C==null?void 0:C.status)==="running",ut=(C==null?void 0:C.status)==="waiting_input",wt=C!==void 0&&["completed","failed","killed"].includes(C.status);if(ot)return x.jsxs("div",{className:at.bar,children:[x.jsx("input",{type:"text",disabled:!0,placeholder:"Agent is working...",className:at.input}),x.jsx("button",{onClick:()=>c(i.sessionId),className:at.btnDanger,title:"Stop session",children:"Stop"})]});if(ut){const Jt=w=>{w.preventDefault(),b.trim()&&(u(i.sessionId,b),M(""))};return x.jsxs("form",{onSubmit:Jt,className:at.bar,children:[x.jsx("input",{type:"text",value:b,onChange:w=>M(w.target.value),placeholder:"Type a message...",autoFocus:!0,className:at.input}),x.jsx("button",{type:"submit",disabled:!b.trim(),className:at.btnPrimary,children:"Send"}),x.jsx("button",{type:"button",onClick:()=>c(i.sessionId),className:at.btnDanger,title:"Stop session",children:"Stop"})]})}if(wt&&C)return x.jsxs("div",{className:at.bar,children:[x.jsxs("span",{className:`${at.statusText} ${at.hintText}`,children:["Session ",C.status]}),x.jsx("button",{onClick:()=>s({kind:"new_chat",environmentId:C.environmentId,runtime:C.runtime}),className:at.btnPrimary,children:"+ New Chat"})]})}return x.jsx("div",{className:at.bar,children:x.jsx("span",{className:at.hintText,children:"Loading..."})})}function Oc(){Oc=function(c,h){return new o(c,void 0,h)};var i=RegExp.prototype,s=new WeakMap;function o(c,h,d){var y=new RegExp(c,h);return s.set(y,d||s.get(c)),No(y,o.prototype)}function u(c,h){var d=s.get(h);return Object.keys(d).reduce(function(y,p){var m=d[p];if(typeof m=="number")y[p]=c[m];else{for(var v=0;c[m[v]]===void 0&&v+1<m.length;)v++;y[p]=c[m[v]]}return y},Object.create(null))}return(function(c,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(h&&h.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),h&&No(c,h)})(o,RegExp),o.prototype.exec=function(c){var h=i.exec.call(this,c);if(h){h.groups=u(h,this);var d=h.indices;d&&(d.groups=u(d,this))}return h},o.prototype[Symbol.replace]=function(c,h){if(typeof h=="string"){var d=s.get(this);return i[Symbol.replace].call(this,c,h.replace(/\$<([^>]+)>/g,function(p,m){var v=d[m];return"$"+(Array.isArray(v)?v.join("$"):v)}))}if(typeof h=="function"){var y=this;return i[Symbol.replace].call(this,c,function(){var p=arguments;return typeof p[p.length-1]!="object"&&(p=[].slice.call(p)).push(u(p,y)),h.apply(this,p)})}return i[Symbol.replace].call(this,c,h)},Oc.apply(this,arguments)}function No(i,s){return No=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,u){return o.__proto__=u,o},No(i,s)}function Vy(i,s){(s==null||s>i.length)&&(s=i.length);for(var o=0,u=new Array(s);o<s;o++)u[o]=i[o];return u}function hc(i,s){var o=typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(o)return(o=o.call(i)).next.bind(o);if(Array.isArray(i)||(o=(function(c,h){if(c){if(typeof c=="string")return Vy(c,h);var d=Object.prototype.toString.call(c).slice(8,-1);return d==="Object"&&c.constructor&&(d=c.constructor.name),d==="Map"||d==="Set"?Array.from(c):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?Vy(c,h):void 0}})(i))||s){o&&(i=o);var u=0;return function(){return u>=i.length?{done:!0}:{done:!1,value:i[u++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
146
146
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var K_=(function(i){return function(s){return s===void 0&&(s={}),(function(u,c){if(c&&!u.registered(c))throw new Error('The default language "'+c+'" is not registered with refractor.')})(i,s.defaultLanguage),function(u){O1(u,"element",o)};function o(u,c,h){var d,y;if(h&&h.tagName==="pre"&&u.tagName==="code"){var p=(u==null||(d=u.data)==null?void 0:d.meta)||(u==null||(y=u.properties)==null?void 0:y.metastring)||"";u.properties.className?typeof u.properties.className=="boolean"?u.properties.className=[]:Array.isArray(u.properties.className)||(u.properties.className=[u.properties.className]):u.properties.className=[];var m,v,S=(function(B){for(var Z,Q=hc(B.properties.className);!(Z=Q()).done;){var C=Z.value;if(C.slice(0,9)==="language-")return C.slice(9).toLowerCase()}return null})(u);if(!S&&s.defaultLanguage&&u.properties.className.push("language-"+(S=s.defaultLanguage)),u.properties.className.push("code-highlight"),S)try{var b,M;M=(b=S)!=null&&b.includes("diff-")?S.split("-")[1]:S,m=i.highlight(po(u),M),h.properties.className=(h.properties.className||[]).concat("language-"+M)}catch(B){if(!s.ignoreMissing||!/Unknown language/.test(B.message))throw B;m=u}else m=u;m.children=(v=1,function B(Z){return Z.reduce(function(Q,C){if(C.type==="text"){var K=C.value,lt=(K.match(/\n/g)||"").length;if(lt===0)C.position={start:{line:v,column:1},end:{line:v,column:1}},Q.push(C);else for(var gt,ot=K.split(`
147
147
  `),ut=hc(ot.entries());!(gt=ut()).done;){var wt=gt.value,Jt=wt[0],w=wt[1];Q.push({type:"text",value:Jt===ot.length-1?w:w+`
148
148
  `,position:{start:{line:v+Jt,column:1},end:{line:v+Jt,column:1}}})}return v+=lt,Q}if(Object.prototype.hasOwnProperty.call(C,"children")){var X=v;return C.children=B(C.children),Q.push(C),C.position={start:{line:X,column:1},end:{line:v,column:1}},Q}return Q.push(C),Q},[])})(m.children),m.position=m.children.length>0?{start:{line:m.children[0].position.start.line,column:0},end:{line:m.children[m.children.length-1].position.end.line,column:0}}:{start:{line:0,column:0},end:{line:0,column:0}};for(var L,z=(function(B){var Z=/{([\d,-]+)}/,Q=B.split(",").map(function(lt){return lt.trim()}).join();if(Z.test(Q)){var C=Z.exec(Q)[1],K=z1(C);return function(lt){return K.includes(lt+1)}}return function(){return!1}})(p),O=(function(B){var Z=Oc(/showLineNumbers=(\d+)/i,{lines:1});if(Z.test(B)){var Q=Z.exec(B);return Number(Q.groups.lines)}return 1})(p),k=(function(B){for(var Z=new Array(B),Q=0;Q<B;Q++)Z[Q]={type:"element",tagName:"span",properties:{className:[]},children:[]};return Z})(m.position.end.line),Y=["showlinenumbers=false",'showlinenumbers="false"',"showlinenumbers={false}"],G=function(){var B,Z,Q=L.value,C=Q[0],K=Q[1];K.properties.className=["code-line"];var lt=w1(m,function(gt){return gt.position.start.line<=C+1&&gt.position.end.line>=C+1});K.children=lt.children,(p.toLowerCase().includes("showLineNumbers".toLowerCase())||s.showLineNumbers===!0||typeof s.showLineNumbers=="object"&&s.showLineNumbers.includes(S))&&!Y.some(function(gt){return p.toLowerCase().includes(gt)})&&(K.properties.line=[(C+O).toString()],K.properties.className.push("line-number")),z(C)&&K.properties.className.push("highlight-line"),(S==="diff"||(B=S)!=null&&B.includes("diff-"))&&po(K).substring(0,1)==="-"?K.properties.className.push("deleted"):(S==="diff"||(Z=S)!=null&&Z.includes("diff-"))&&po(K).substring(0,1)==="+"&&K.properties.className.push("inserted")},J=hc(k.entries());!(L=J()).done;)G();k.length>0&&po(k[k.length-1]).trim()===""&&k.pop(),u.children=k}}}})(R1);const Q_="_systemEvent_1ftop_1",J_="_systemTimestamp_1ftop_9",F_="_textEvent_1ftop_13",P_="_toolUseEvent_1ftop_100",W_="_toolUsePrefix_1ftop_116",I_="_toolResultEvent_1ftop_120",$_="_toolResultSummary_1ftop_126",tA="_toolResultPre_1ftop_140",eA="_errorEvent_1ftop_154",nA="_statusEvent_1ftop_163",aA="_defaultEvent_1ftop_173",cn={systemEvent:Q_,systemTimestamp:J_,textEvent:F_,toolUseEvent:P_,toolUsePrefix:W_,toolResultEvent:I_,toolResultSummary:$_,toolResultPre:tA,errorEvent:eA,statusEvent:nA,defaultEvent:aA};function iA({time:i,content:s}){return x.jsxs("div",{className:cn.systemEvent,children:[x.jsxs("span",{className:cn.systemTimestamp,children:["[",i,"]"]})," ",s]})}function sA({content:i}){return x.jsx("div",{className:cn.textEvent,children:x.jsx(V1,{remarkPlugins:[B1],rehypePlugins:[K_],children:i})})}function lA({content:i}){let s=i;try{const o=JSON.parse(i);s=`${o.tool}: ${JSON.stringify(o.args,null,2)}`}catch{}return x.jsxs("div",{className:cn.toolUseEvent,children:[x.jsx("span",{className:cn.toolUsePrefix,children:">"})," ",s]})}function oA({content:i}){return x.jsxs("details",{className:cn.toolResultEvent,children:[x.jsx("summary",{className:cn.toolResultSummary,children:"Tool output"}),x.jsx("pre",{className:cn.toolResultPre,children:i})]})}function uA({content:i}){return x.jsxs("div",{className:cn.errorEvent,children:["Error: ",i]})}function rA({content:i}){return x.jsxs("div",{className:cn.statusEvent,children:["--- ",i," ---"]})}function cA({content:i}){return x.jsx("div",{className:cn.defaultEvent,children:i})}function hg({event:i}){const s=new Date(i.timestamp).toLocaleTimeString();switch(i.eventType){case"system":return x.jsx(iA,{time:s,content:i.content});case"text":return x.jsx(sA,{content:i.content});case"tool_use":return x.jsx(lA,{content:i.content});case"tool_result":return x.jsx(oA,{content:i.content});case"error":return x.jsx(uA,{content:i.content});case"status":return x.jsx(rA,{content:i.content});default:return x.jsx(cA,{content:i.content})}}const fA="_container_1e9es_1",dA="_emptyState_1e9es_7",hA="_errorState_1e9es_13",mA="_statsBar_1e9es_19",pA="_branchName_1e9es_45",yA="_additions_1e9es_50",gA="_deletions_1e9es_54",vA="_fileList_1e9es_58",SA="_fileName_1e9es_68",bA="_diffContent_1e9es_85",TA="_diffLine_1e9es_103",xA="_added_1e9es_112",_A="_removed_1e9es_116",AA="_hunk_1e9es_120",EA="_meta_1e9es_123",DA="_context_1e9es_126",ve={container:fA,emptyState:dA,errorState:hA,statsBar:mA,branchName:pA,additions:yA,deletions:gA,fileList:vA,fileName:SA,diffContent:bA,diffLine:TA,added:xA,removed:_A,hunk:AA,meta:EA,context:DA};function jA(i){return i.startsWith("+")&&!i.startsWith("+++")?ve.added:i.startsWith("-")&&!i.startsWith("---")?ve.removed:i.startsWith("@@")?ve.hunk:i.startsWith("diff ")||i.startsWith("index ")?ve.meta:ve.context}function MA({diff:i}){var o;if(!i)return x.jsx("div",{className:ve.emptyState,children:"Loading diff..."});if(i.error)return x.jsx("div",{className:ve.errorState,children:i.error});if(!i.diff||i.diff.trim()==="")return x.jsxs("div",{className:ve.emptyState,children:["No changes on branch ",i.branch]});const s=i.diff.split(`
package/dist/index.html CHANGED
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Grackle</title>
7
- <script type="module" crossorigin src="/assets/index-BuYprtkt.js"></script>
7
+ <script type="module" crossorigin src="/assets/index-WBjz6mvj.js"></script>
8
8
  <link rel="modulepreload" crossorigin href="/assets/markdown-BjEjdFC5.js">
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-CHcMeuvJ.css">
10
10
  </head>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grackle-ai/web",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "React web UI for the Grackle multi-agent coordination platform",
5
5
  "license": "MIT",
6
6
  "repository": {