cli-link 0.0.6 → 0.0.8

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.
Files changed (57) hide show
  1. package/README.md +56 -14
  2. package/dist/client/assets/History-D2xDopni.js +4 -0
  3. package/dist/client/assets/ImageViewer-DuegU_fC.js +1 -0
  4. package/dist/client/assets/MarkdownRenderer-CsyizEL3.js +1 -0
  5. package/dist/client/assets/{PageTopBar-C8j-5s_3.js → PageTopBar-CQwjO6Af.js} +1 -1
  6. package/dist/client/assets/Session-B0s5zBGg.js +7 -0
  7. package/dist/client/assets/Settings-CfHFmJdV.js +1 -0
  8. package/dist/client/assets/Workspace-Cfl0mbNE.js +4 -0
  9. package/dist/client/assets/WorkspaceLinkedText-DCVYd9x-.js +2 -0
  10. package/dist/client/assets/c-BIGW1oBm.js +1 -0
  11. package/dist/client/assets/cpp-DIPi6g--.js +1 -0
  12. package/dist/client/assets/csharp-DSvCPggb.js +1 -0
  13. package/dist/client/assets/dart-bE4Kk8sk.js +1 -0
  14. package/dist/client/assets/dotenv-Da5cRb03.js +1 -0
  15. package/dist/client/assets/go-C27-OAKa.js +1 -0
  16. package/dist/client/assets/graphql-pNE0_Gx8.js +1 -0
  17. package/dist/client/assets/groovy-gcz8RCvz.js +1 -0
  18. package/dist/client/assets/index-BCg3ymV3.css +1 -0
  19. package/dist/client/assets/index-CrJqHlc8.js +2 -0
  20. package/dist/client/assets/java-VnEXKtx_.js +148 -0
  21. package/dist/client/assets/jsx-g9-lgVsj.js +1 -0
  22. package/dist/client/assets/kotlin-BdnUsdx6.js +1 -0
  23. package/dist/client/assets/less-B1dDrJ26.js +1 -0
  24. package/dist/client/assets/lua-BaeVxFsk.js +1 -0
  25. package/dist/client/assets/makefile-CHLpvVh8.js +1 -0
  26. package/dist/client/assets/php-BcCyJq-p.js +1 -0
  27. package/dist/client/assets/properties-DTPjHERo.js +1 -0
  28. package/dist/client/assets/ruby-BwImf3Ka.js +1 -0
  29. package/dist/client/assets/rust-B1yitclQ.js +1 -0
  30. package/dist/client/assets/scss-lMagJa-5.js +1 -0
  31. package/dist/client/assets/sql-CRqJ_cUM.js +1 -0
  32. package/dist/client/assets/svelte-B4a9v_or.js +1 -0
  33. package/dist/client/assets/swift-D82vCrfD.js +1 -0
  34. package/dist/client/assets/toml-vGWfd6FD.js +1 -0
  35. package/dist/client/assets/{vendor-icons-CNN4EKVi.js → vendor-icons-CMXJHDEv.js} +125 -65
  36. package/dist/client/assets/vendor-markdown--d-T3AbU.js +37 -0
  37. package/dist/client/assets/{vendor-motion-n6Lx6G4a.js → vendor-motion-D0ZmPdi9.js} +1 -1
  38. package/dist/client/assets/{vendor-react-DSV5aFEg.js → vendor-react-CcDXZHn_.js} +1 -1
  39. package/dist/client/assets/{vendor-virtual-CcftJrIC.js → vendor-virtual-DJI7OicV.js} +1 -1
  40. package/dist/client/assets/vue-DBXACu8K.js +1 -0
  41. package/dist/client/assets/workspace-return-FrQUv7g3.js +1 -0
  42. package/dist/client/index.html +4 -4
  43. package/dist/server/cli-manager.js +151 -26
  44. package/dist/server/codex-history.js +119 -17
  45. package/dist/server/index.js +906 -57
  46. package/dist/server/store.js +369 -27
  47. package/package.json +3 -3
  48. package/dist/client/assets/History-BxJVDFpN.js +0 -3
  49. package/dist/client/assets/MarkdownRenderer-BO-KS_L1.js +0 -1
  50. package/dist/client/assets/Session-CQFXA2Sr.js +0 -11
  51. package/dist/client/assets/Settings-DYmjRmoN.js +0 -1
  52. package/dist/client/assets/Workspace-D8kv9euM.js +0 -8
  53. package/dist/client/assets/WorkspaceLinkedText-DQyPLk-X.js +0 -2
  54. package/dist/client/assets/code-highlight-CEcsuMpw.js +0 -1
  55. package/dist/client/assets/index-BXT2BylN.css +0 -1
  56. package/dist/client/assets/index-DOgH1Kf3.js +0 -2
  57. package/dist/client/assets/vendor-markdown-BDwu-Ux6.js +0 -35
@@ -1,4 +1,4 @@
1
- import{r as y,j}from"./vendor-react-DSV5aFEg.js";const we=y.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Wt=y.createContext({}),$t=y.createContext(null),Ae=typeof document<"u",Ce=Ae?y.useLayoutEffect:y.useEffect,cs=y.createContext({strict:!1}),Me=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Li="framerAppearId",hs="data-"+Me(Li),Fi={useManualTiming:!1};class sn{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function Bi(t){let e=new sn,n=new sn,s=0,i=!1,o=!1;const r=new WeakSet,a={schedule:(l,c=!1,u=!1)=>{const h=u&&i,f=h?e:n;return c&&r.add(l),f.add(l)&&h&&i&&(s=e.order.length),l},cancel:l=>{n.remove(l),r.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[e,n]=[n,e],n.clear(),s=e.order.length,s)for(let c=0;c<s;c++){const u=e.order[c];r.has(u)&&(a.schedule(u),t()),u(l)}i=!1,o&&(o=!1,a.process(l))}};return a}const Dt=["read","resolveKeyframes","update","preRender","render","postRender"],ki=40;function fs(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=Dt.reduce((h,f)=>(h[f]=Bi(()=>n=!0),h),{}),r=h=>{o[h].process(i)},a=()=>{const h=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(h-i.timestamp,ki),1),i.timestamp=h,i.isProcessing=!0,Dt.forEach(r),i.isProcessing=!1,n&&e&&(s=!1,t(a))},l=()=>{n=!0,s=!0,i.isProcessing||t(a)};return{schedule:Dt.reduce((h,f)=>{const d=o[f];return h[f]=(m,p=!1,x=!1)=>(n||l(),d.schedule(m,p,x)),h},{}),cancel:h=>Dt.forEach(f=>o[f].cancel(h)),state:i,steps:o}}const{schedule:De}=fs(queueMicrotask,!1);function ji(t,e,n,s){const{visualElement:i}=y.useContext(Wt),o=y.useContext(cs),r=y.useContext($t),a=y.useContext(we).reducedMotion,l=y.useRef();s=s||o.renderer,!l.current&&s&&(l.current=s(t,{visualState:e,parent:i,props:n,presenceContext:r,blockInitialAnimation:r?r.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;y.useInsertionEffect(()=>{c&&c.update(n,r)});const u=y.useRef(!!(n[hs]&&!window.HandoffComplete));return Ce(()=>{c&&(De.postRender(c.render),u.current&&c.animationState&&c.animationState.animateChanges())}),y.useEffect(()=>{c&&(c.updateFeatures(),!u.current&&c.animationState&&c.animationState.animateChanges(),u.current&&(u.current=!1,window.HandoffComplete=!0))}),c}function ut(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Oi(t,e,n){return y.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):ut(n)&&(n.current=s))},[e])}function Pt(t){return typeof t=="string"||Array.isArray(t)}function Gt(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const Re=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ee=["initial",...Re];function _t(t){return Gt(t.animate)||Ee.some(e=>Pt(t[e]))}function ds(t){return!!(_t(t)||t.variants)}function Ii(t,e){if(_t(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Pt(n)?n:void 0,animate:Pt(s)?s:void 0}}return t.inherit!==!1?e:{}}function Ui(t){const{initial:e,animate:n}=Ii(t,y.useContext(Wt));return y.useMemo(()=>({initial:e,animate:n}),[rn(e),rn(n)])}function rn(t){return Array.isArray(t)?t.join(" "):t}const on={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},St={};for(const t in on)St[t]={isEnabled:e=>on[t].some(n=>!!e[n])};function Ni(t){for(const e in t)St[e]={...St[e],...t[e]}}const Le=y.createContext({}),ms=y.createContext({}),Ki=Symbol.for("motionComponentSymbol");function Wi({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){t&&Ni(t);function o(a,l){let c;const u={...y.useContext(we),...a,layoutId:$i(a)},{isStatic:h}=u,f=Ui(a),d=s(a,h);if(!h&&Ae){f.visualElement=ji(i,d,u,e);const m=y.useContext(ms),p=y.useContext(cs).strict;f.visualElement&&(c=f.visualElement.loadFeatures(u,p,t,m))}return j.jsxs(Wt.Provider,{value:f,children:[c&&f.visualElement?j.jsx(c,{visualElement:f.visualElement,...u}):null,n(i,a,Oi(d,f.visualElement,l),d,h,f.visualElement)]})}const r=y.forwardRef(o);return r[Ki]=i,r}function $i({layoutId:t}){const e=y.useContext(Le).id;return e&&t!==void 0?e+"-"+t:t}function Gi(t){function e(s,i={}){return Wi(t(s,i))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(s,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const _i=["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 Fe(t){return typeof t!="string"||t.includes("-")?!1:!!(_i.indexOf(t)>-1||/[A-Z]/u.test(t))}const kt={};function zi(t){Object.assign(kt,t)}const wt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],at=new Set(wt);function ps(t,{layout:e,layoutId:n}){return at.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!kt[t]||t==="opacity")}const L=t=>!!(t&&t.getVelocity),Hi={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Yi=wt.length;function Xi(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let o="";for(let r=0;r<Yi;r++){const a=wt[r];if(t[a]!==void 0){const l=Hi[a]||a;o+=`${l}(${t[a]}) `}}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,s?"":o):n&&s&&(o="none"),o}const gs=t=>e=>typeof e=="string"&&e.startsWith(t),ys=gs("--"),qi=gs("var(--"),Be=t=>qi(t)?Zi.test(t.split("/*")[0].trim()):!1,Zi=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Qi=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Z=(t,e,n)=>n>e?e:n<t?t:n,mt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},yt={...mt,transform:t=>Z(0,1,t)},Rt={...mt,default:1},vt=t=>Math.round(t*1e5)/1e5,ke=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Ji=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,tr=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function At(t){return typeof t=="string"}const Ct=t=>({test:e=>At(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),H=Ct("deg"),K=Ct("%"),P=Ct("px"),er=Ct("vh"),nr=Ct("vw"),an={...K,parse:t=>K.parse(t)/100,transform:t=>K.transform(t*100)},ln={...mt,transform:Math.round},vs={borderWidth:P,borderTopWidth:P,borderRightWidth:P,borderBottomWidth:P,borderLeftWidth:P,borderRadius:P,radius:P,borderTopLeftRadius:P,borderTopRightRadius:P,borderBottomRightRadius:P,borderBottomLeftRadius:P,width:P,maxWidth:P,height:P,maxHeight:P,size:P,top:P,right:P,bottom:P,left:P,padding:P,paddingTop:P,paddingRight:P,paddingBottom:P,paddingLeft:P,margin:P,marginTop:P,marginRight:P,marginBottom:P,marginLeft:P,rotate:H,rotateX:H,rotateY:H,rotateZ:H,scale:Rt,scaleX:Rt,scaleY:Rt,scaleZ:Rt,skew:H,skewX:H,skewY:H,distance:P,translateX:P,translateY:P,translateZ:P,x:P,y:P,z:P,perspective:P,transformPerspective:P,opacity:yt,originX:an,originY:an,originZ:P,zIndex:ln,backgroundPositionX:P,backgroundPositionY:P,fillOpacity:yt,strokeOpacity:yt,numOctaves:ln};function je(t,e,n,s){const{style:i,vars:o,transform:r,transformOrigin:a}=t;let l=!1,c=!1,u=!0;for(const h in e){const f=e[h];if(ys(h)){o[h]=f;continue}const d=vs[h],m=Qi(f,d);if(at.has(h)){if(l=!0,r[h]=m,!u)continue;f!==(d.default||0)&&(u=!1)}else h.startsWith("origin")?(c=!0,a[h]=m):i[h]=m}if(e.transform||(l||s?i.transform=Xi(t.transform,n,u,s):i.transform&&(i.transform="none")),c){const{originX:h="50%",originY:f="50%",originZ:d=0}=a;i.transformOrigin=`${h} ${f} ${d}`}}const Oe=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function xs(t,e,n){for(const s in e)!L(e[s])&&!ps(s,n)&&(t[s]=e[s])}function sr({transformTemplate:t},e,n){return y.useMemo(()=>{const s=Oe();return je(s,e,{enableHardwareAcceleration:!n},t),Object.assign({},s.vars,s.style)},[e])}function ir(t,e,n){const s=t.style||{},i={};return xs(i,s,t),Object.assign(i,sr(t,e,n)),i}function rr(t,e,n){const s={},i=ir(t,e,n);return t.drag&&t.dragListener!==!1&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const or=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 jt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||or.has(t)}let Ts=t=>!jt(t);function ar(t){t&&(Ts=e=>e.startsWith("on")?!jt(e):t(e))}try{ar(require("@emotion/is-prop-valid").default)}catch{}function lr(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Ts(i)||n===!0&&jt(i)||!e&&!jt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function un(t,e,n){return typeof t=="string"?t:P.transform(e+n*t)}function ur(t,e,n){const s=un(e,t.x,t.width),i=un(n,t.y,t.height);return`${s} ${i}`}const cr={offset:"stroke-dashoffset",array:"stroke-dasharray"},hr={offset:"strokeDashoffset",array:"strokeDasharray"};function fr(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?cr:hr;t[o.offset]=P.transform(-s);const r=P.transform(e),a=P.transform(n);t[o.array]=`${r} ${a}`}function Ie(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...c},u,h,f){if(je(t,c,u,f),h){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:m,dimensions:p}=t;d.transform&&(p&&(m.transform=d.transform),delete d.transform),p&&(i!==void 0||o!==void 0||m.transform)&&(m.transformOrigin=ur(p,i!==void 0?i:.5,o!==void 0?o:.5)),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),r!==void 0&&fr(d,r,a,l,!1)}const Ps=()=>({...Oe(),attrs:{}}),Ue=t=>typeof t=="string"&&t.toLowerCase()==="svg";function dr(t,e,n,s){const i=y.useMemo(()=>{const o=Ps();return Ie(o,e,{enableHardwareAcceleration:!1},Ue(s),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};xs(o,t.style,t),i.style={...o,...i.style}}return i}function mr(t=!1){return(n,s,i,{latestValues:o},r)=>{const l=(Fe(n)?dr:rr)(s,o,r,n),c=lr(s,typeof n=="string",t),u=n!==y.Fragment?{...c,...l,ref:i}:{},{children:h}=s,f=y.useMemo(()=>L(h)?h.get():h,[h]);return y.createElement(n,{...u,children:f})}}function Ss(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const o in n)t.style.setProperty(o,n[o])}const bs=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 Vs(t,e,n,s){Ss(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(bs.has(i)?i:Me(i),e.attrs[i])}function Ne(t,e,n){var s;const{style:i}=t,o={};for(const r in i)(L(i[r])||e.style&&L(e.style[r])||ps(r,t)||((s=n==null?void 0:n.getValue(r))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(o[r]=i[r]);return o}function ws(t,e,n){const s=Ne(t,e,n);for(const i in t)if(L(t[i])||L(e[i])){const o=wt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}function Ke(t,e,n,s={},i={}){return typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),e}function As(t){const e=y.useRef(null);return e.current===null&&(e.current=t()),e.current}const he=t=>Array.isArray(t),pr=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),gr=t=>he(t)?t[t.length-1]||0:t;function Lt(t){const e=L(t)?t.get():t;return pr(e)?e.toValue():e}function yr({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,o){const r={latestValues:vr(s,i,o,t),renderState:e()};return n&&(r.mount=a=>n(s,a,r)),r}const Cs=t=>(e,n)=>{const s=y.useContext(Wt),i=y.useContext($t),o=()=>yr(t,e,s,i);return n?o():As(o)};function vr(t,e,n,s){const i={},o=s(t,{});for(const f in o)i[f]=Lt(o[f]);let{initial:r,animate:a}=t;const l=_t(t),c=ds(t);e&&c&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const h=u?a:r;return h&&typeof h!="boolean"&&!Gt(h)&&(Array.isArray(h)?h:[h]).forEach(d=>{const m=Ke(t,d);if(!m)return;const{transitionEnd:p,transition:x,...T}=m;for(const v in T){let g=T[v];if(Array.isArray(g)){const S=u?g.length-1:0;g=g[S]}g!==null&&(i[v]=g)}for(const v in p)i[v]=p[v]}),i}const F=t=>t,{schedule:D,cancel:Q,state:R,steps:Zt}=fs(typeof requestAnimationFrame<"u"?requestAnimationFrame:F,!0),xr={useVisualState:Cs({scrapeMotionValuesFromProps:ws,createRenderState:Ps,onMount:(t,e,{renderState:n,latestValues:s})=>{D.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),D.render(()=>{Ie(n,s,{enableHardwareAcceleration:!1},Ue(e.tagName),t.transformTemplate),Vs(e,n)})}})},Tr={useVisualState:Cs({scrapeMotionValuesFromProps:Ne,createRenderState:Oe})};function Pr(t,{forwardMotionProps:e=!1},n,s){return{...Fe(t)?xr:Tr,preloadedFeatures:n,useRender:mr(e),createVisualElement:s,Component:t}}function $(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Ms=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function zt(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const Sr=t=>e=>Ms(e)&&t(e,zt(e));function G(t,e,n,s){return $(t,e,Sr(n),s)}const br=(t,e)=>n=>e(t(n)),_=(...t)=>t.reduce(br);function Ds(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const cn=Ds("dragHorizontal"),hn=Ds("dragVertical");function Rs(t){let e=!1;if(t==="y")e=hn();else if(t==="x")e=cn();else{const n=cn(),s=hn();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function Es(){const t=Rs(!0);return t?(t(),!1):!0}class tt{constructor(e){this.isMounted=!1,this.node=e}update(){}}function fn(t,e){const n=e?"pointerenter":"pointerleave",s=e?"onHoverStart":"onHoverEnd",i=(o,r)=>{if(o.pointerType==="touch"||Es())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e);const l=a[s];l&&l(o,r)};return G(t.current,n,i,{passive:!t.getProps()[s]})}class Vr extends tt{mount(){this.unmount=_(fn(this.node,!0),fn(this.node,!1))}unmount(){}}class wr extends tt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!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=_($(this.node.current,"focus",()=>this.onFocus()),$(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Ls=(t,e)=>e?t===e?!0:Ls(t,e.parentElement):!1;function Qt(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,zt(n))}class Ar extends tt{constructor(){super(...arguments),this.removeStartListeners=F,this.removeEndListeners=F,this.removeAccessibleListeners=F,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const s=this.node.getProps(),o=G(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:h}=this.node.getProps();!h&&!Ls(this.node.current,a.target)?u&&u(a,l):c&&c(a,l)},{passive:!(s.onTap||s.onPointerUp)}),r=G(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(s.onTapCancel||s.onPointerCancel)});this.removeEndListeners=_(o,r),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=o=>{if(o.key!=="Enter"||this.isPressing)return;const r=a=>{a.key!=="Enter"||!this.checkPressEnd()||Qt("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&u(l,c)})};this.removeEndListeners(),this.removeEndListeners=$(this.node.current,"keyup",r),Qt("down",(a,l)=>{this.startPress(a,l)})},n=$(this.node.current,"keydown",e),s=()=>{this.isPressing&&Qt("cancel",(o,r)=>this.cancelPress(o,r))},i=$(this.node.current,"blur",s);this.removeAccessibleListeners=_(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:s,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),s&&s(e,n)}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Es()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:s}=this.node.getProps();s&&s(e,n)}mount(){const e=this.node.getProps(),n=G(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),s=$(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=_(n,s)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const fe=new WeakMap,Jt=new WeakMap,Cr=t=>{const e=fe.get(t.target);e&&e(t)},Mr=t=>{t.forEach(Cr)};function Dr({root:t,...e}){const n=t||document;Jt.has(n)||Jt.set(n,{});const s=Jt.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Mr,{root:t,...e})),s[i]}function Rr(t,e,n){const s=Dr(e);return fe.set(t,n),s.observe(t),()=>{fe.delete(t),s.unobserve(t)}}const Er={some:0,all:1};class Lr extends tt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:Er[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),f=c?u:h;f&&f(l)};return Rr(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Fr(e,n))&&this.startObserver()}unmount(){}}function Fr({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Br={inView:{Feature:Lr},tap:{Feature:Ar},focus:{Feature:wr},hover:{Feature:Vr}};function Fs(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function kr(t){const e={};return t.values.forEach((n,s)=>e[s]=n.get()),e}function jr(t){const e={};return t.values.forEach((n,s)=>e[s]=n.getVelocity()),e}function Ht(t,e,n){const s=t.getProps();return Ke(s,e,n!==void 0?n:s.custom,kr(t),jr(t))}const X=t=>t*1e3,z=t=>t/1e3,Or={type:"spring",stiffness:500,damping:25,restSpeed:10},Ir=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Ur={type:"keyframes",duration:.8},Nr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Kr=(t,{keyframes:e})=>e.length>2?Ur:at.has(t)?t.startsWith("scale")?Ir(e[1]):Or:Nr;function Wr({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function We(t,e){return t[e]||t.default||t}const $r=t=>t!==null;function Yt(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter($r),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return!o||s===void 0?i[o]:s}let Ft;function Gr(){Ft=void 0}const q={now:()=>(Ft===void 0&&q.set(R.isProcessing||Fi.useManualTiming?R.timestamp:performance.now()),Ft),set:t=>{Ft=t,queueMicrotask(Gr)}},Bs=t=>/^0[^.\s]+$/u.test(t);function _r(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Bs(t):!0}let ks=F;const js=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),zr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Hr(t){const e=zr.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Os(t,e,n=1){const[s,i]=Hr(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return js(r)?parseFloat(r):r}return Be(i)?Os(i,e,n+1):i}const Yr=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),dn=t=>t===mt||t===P,mn=(t,e)=>parseFloat(t.split(", ")[e]),pn=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return mn(i[1],e);{const o=s.match(/^matrix\((.+)\)$/u);return o?mn(o[1],t):0}},Xr=new Set(["x","y","z"]),qr=wt.filter(t=>!Xr.has(t));function Zr(t){const e=[];return qr.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const dt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:pn(4,13),y:pn(5,14)};dt.translateX=dt.x;dt.translateY=dt.y;const Is=t=>e=>e.test(t),Qr={test:t=>t==="auto",parse:t=>t},Us=[mt,P,K,H,nr,er,Qr],gn=t=>Us.find(Is(t)),ot=new Set;let de=!1,me=!1;function Ns(){if(me){const t=Array.from(ot).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Zr(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{var a;(a=s.getValue(o))===null||a===void 0||a.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}me=!1,de=!1,ot.forEach(t=>t.complete()),ot.clear()}function Ks(){ot.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(me=!0)})}function Jr(){Ks(),Ns()}class $e{constructor(e,n,s,i,o,r=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ot.add(this),de||(de=!0,D.read(Ks),D.resolveKeyframes(Ns))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;for(let o=0;o<e.length;o++)if(e[o]===null)if(o===0){const r=i==null?void 0:i.get(),a=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const l=s.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),i&&r===void 0&&i.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ot.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ot.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Ge=(t,e)=>n=>!!(At(n)&&tr.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Ws=(t,e,n)=>s=>{if(!At(s))return s;const[i,o,r,a]=s.match(ke);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},to=t=>Z(0,255,t),te={...mt,transform:t=>Math.round(to(t))},rt={test:Ge("rgb","red"),parse:Ws("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+te.transform(t)+", "+te.transform(e)+", "+te.transform(n)+", "+vt(yt.transform(s))+")"};function eo(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const pe={test:Ge("#"),parse:eo,transform:rt.transform},ct={test:Ge("hsl","hue"),parse:Ws("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+K.transform(vt(e))+", "+K.transform(vt(n))+", "+vt(yt.transform(s))+")"},E={test:t=>rt.test(t)||pe.test(t)||ct.test(t),parse:t=>rt.test(t)?rt.parse(t):ct.test(t)?ct.parse(t):pe.parse(t),transform:t=>At(t)?t:t.hasOwnProperty("red")?rt.transform(t):ct.transform(t)};function no(t){var e,n;return isNaN(t)&&At(t)&&(((e=t.match(ke))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(Ji))===null||n===void 0?void 0:n.length)||0)>0}const $s="number",Gs="color",so="var",io="var(",yn="${}",ro=/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 Ot(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(ro,l=>(E.test(l)?(s.color.push(o),i.push(Gs),n.push(E.parse(l))):l.startsWith(io)?(s.var.push(o),i.push(so),n.push(l)):(s.number.push(o),i.push($s),n.push(parseFloat(l))),++o,yn)).split(yn);return{values:n,split:a,indexes:s,types:i}}function _s(t){return Ot(t).values}function zs(t){const{split:e,types:n}=Ot(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===$s?o+=vt(i[r]):a===Gs?o+=E.transform(i[r]):o+=i[r]}return o}}const oo=t=>typeof t=="number"?0:t;function ao(t){const e=_s(t);return zs(t)(e.map(oo))}const J={test:no,parse:_s,createTransformer:zs,getAnimatableNone:ao},lo=new Set(["brightness","contrast","saturate","opacity"]);function uo(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(ke)||[];if(!s)return t;const i=n.replace(s,"");let o=lo.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const co=/\b([a-z-]*)\(.*?\)/gu,ge={...J,getAnimatableNone:t=>{const e=t.match(co);return e?e.map(uo).join(" "):t}},ho={...vs,color:E,backgroundColor:E,outlineColor:E,fill:E,stroke:E,borderColor:E,borderTopColor:E,borderRightColor:E,borderBottomColor:E,borderLeftColor:E,filter:ge,WebkitFilter:ge},_e=t=>ho[t];function Hs(t,e){let n=_e(t);return n!==ge&&(n=J),n.getAnimatableNone?n.getAnimatableNone(e):void 0}function fo(t,e,n){let s=0,i;for(;s<t.length&&!i;)typeof t[s]=="string"&&t[s]!=="none"&&t[s]!=="0"&&(i=t[s]),s++;if(i&&n)for(const o of e)t[o]=Hs(n,i)}class Ys extends $e{constructor(e,n,s,i){super(e,n,s,i,i==null?void 0:i.owner,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){const c=e[l];if(typeof c=="string"&&Be(c)){const u=Os(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(!Yr.has(s)||e.length!==2)return this.resolveNoneKeyframes();const[i,o]=e,r=gn(i),a=gn(o);if(r!==a)if(dn(r)&&dn(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)_r(e[i])&&s.push(i);s.length&&fo(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=dt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){var e;const{element:n,name:s,unresolvedKeyframes:i}=this;if(!n.current)return;const o=n.getValue(s);o&&o.jump(this.measuredOrigin,!1);const r=i.length-1,a=i[r];i[r]=dt[s](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function mo(t){let e;return()=>(e===void 0&&(e=t()),e)}const vn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(J.test(t)||t==="0")&&!t.startsWith("url("));function po(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function go(t,e,n,s){const i=t[0];if(i===null)return!1;const o=t[t.length-1],r=vn(i,e),a=vn(o,e);return!r||!a?!1:po(t)||n==="spring"&&s}class Xs{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Jr(),this._resolved}onKeyframesResolved(e,n){this.hasAttemptedResolve=!0;const{name:s,type:i,velocity:o,delay:r,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!go(e,s,i,o))if(r)this.options.duration=0;else{l==null||l(Yt(e,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const u=this.initPlayback(e,n);u!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}function qs(t,e){return e?t*(1e3/e):0}const yo=5;function Zs(t,e,n){const s=Math.max(e-yo,0);return qs(n-t(s),e-s)}const ee=.001,vo=.01,xo=10,To=.05,Po=1;function So({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,o,r=1-e;r=Z(To,Po,r),t=Z(vo,xo,z(t)),r<1?(i=c=>{const u=c*r,h=u*t,f=u-n,d=ye(c,r),m=Math.exp(-h);return ee-f/d*m},o=c=>{const h=c*r*t,f=h*n+n,d=Math.pow(r,2)*Math.pow(c,2)*t,m=Math.exp(-h),p=ye(Math.pow(c,2),r);return(-i(c)+ee>0?-1:1)*((f-d)*m)/p}):(i=c=>{const u=Math.exp(-c*t),h=(c-n)*t+1;return-ee+u*h},o=c=>{const u=Math.exp(-c*t),h=(n-c)*(t*t);return u*h});const a=5/t,l=Vo(i,o,a);if(t=X(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:r*2*Math.sqrt(s*c),duration:t}}}const bo=12;function Vo(t,e,n){let s=n;for(let i=1;i<bo;i++)s=s-t(s)/e(s);return s}function ye(t,e){return t*Math.sqrt(1-e*e)}const wo=["duration","bounce"],Ao=["stiffness","damping","mass"];function xn(t,e){return e.some(n=>t[n]!==void 0)}function Co(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!xn(t,Ao)&&xn(t,wo)){const n=So(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function Qs({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],o=t[t.length-1],r={done:!1,value:i},{stiffness:a,damping:l,mass:c,duration:u,velocity:h,isResolvedFromDuration:f}=Co({...s,velocity:-z(s.velocity||0)}),d=h||0,m=l/(2*Math.sqrt(a*c)),p=o-i,x=z(Math.sqrt(a/c)),T=Math.abs(p)<5;n||(n=T?.01:2),e||(e=T?.005:.5);let v;if(m<1){const g=ye(x,m);v=S=>{const V=Math.exp(-m*x*S);return o-V*((d+m*x*p)/g*Math.sin(g*S)+p*Math.cos(g*S))}}else if(m===1)v=g=>o-Math.exp(-x*g)*(p+(d+x*p)*g);else{const g=x*Math.sqrt(m*m-1);v=S=>{const V=Math.exp(-m*x*S),A=Math.min(g*S,300);return o-V*((d+m*x*p)*Math.sinh(A)+g*p*Math.cosh(A))/g}}return{calculatedDuration:f&&u||null,next:g=>{const S=v(g);if(f)r.done=g>=u;else{let V=d;g!==0&&(m<1?V=Zs(v,g,S):V=0);const A=Math.abs(V)<=n,N=Math.abs(o-S)<=e;r.done=A&&N}return r.value=r.done?o:S,r}}}function Tn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],f={done:!1,value:h},d=b=>a!==void 0&&b<a||l!==void 0&&b>l,m=b=>a===void 0?l:l===void 0||Math.abs(a-b)<Math.abs(l-b)?a:l;let p=n*e;const x=h+p,T=r===void 0?x:r(x);T!==x&&(p=T-h);const v=b=>-p*Math.exp(-b/s),g=b=>T+v(b),S=b=>{const M=v(b),B=g(b);f.done=Math.abs(M)<=c,f.value=f.done?T:B};let V,A;const N=b=>{d(f.value)&&(V=b,A=Qs({keyframes:[f.value,m(f.value)],velocity:Zs(g,b,f.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return N(0),{calculatedDuration:null,next:b=>{let M=!1;return!A&&V===void 0&&(M=!0,S(b),N(b)),V!==void 0&&b>=V?A.next(b-V):(!M&&S(b),f)}}}const Js=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Mo=1e-7,Do=12;function Ro(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=Js(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Mo&&++a<Do);return r}function Mt(t,e,n,s){if(t===e&&n===s)return F;const i=o=>Ro(o,0,1,t,n);return o=>o===0||o===1?o:Js(i(o),e,s)}const Eo=Mt(.42,0,1,1),Lo=Mt(0,0,.58,1),ti=Mt(.42,0,.58,1),Fo=t=>Array.isArray(t)&&typeof t[0]!="number",ei=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ni=t=>e=>1-t(1-e),ze=t=>1-Math.sin(Math.acos(t)),si=ni(ze),Bo=ei(ze),ii=Mt(.33,1.53,.69,.99),He=ni(ii),ko=ei(He),jo=t=>(t*=2)<1?.5*He(t):.5*(2-Math.pow(2,-10*(t-1))),Oo={linear:F,easeIn:Eo,easeInOut:ti,easeOut:Lo,circIn:ze,circInOut:Bo,circOut:si,backIn:He,backInOut:ko,backOut:ii,anticipate:jo},Pn=t=>{if(Array.isArray(t)){ks(t.length===4);const[e,n,s,i]=t;return Mt(e,n,s,i)}else if(typeof t=="string")return Oo[t];return t},bt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},w=(t,e,n)=>t+(e-t)*n;function ne(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Io({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=ne(l,a,t+1/3),o=ne(l,a,t),r=ne(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}const se=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Uo=[pe,rt,ct],No=t=>Uo.find(e=>e.test(t));function Sn(t){const e=No(t);let n=e.parse(t);return e===ct&&(n=Io(n)),n}const bn=(t,e)=>{const n=Sn(t),s=Sn(e),i={...n};return o=>(i.red=se(n.red,s.red,o),i.green=se(n.green,s.green,o),i.blue=se(n.blue,s.blue,o),i.alpha=w(n.alpha,s.alpha,o),rt.transform(i))};function ve(t,e){return n=>n>0?e:t}function Ko(t,e){return n=>w(t,e,n)}function Ye(t){return typeof t=="number"?Ko:typeof t=="string"?Be(t)?ve:E.test(t)?bn:Go:Array.isArray(t)?ri:typeof t=="object"?E.test(t)?bn:Wo:ve}function ri(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>Ye(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function Wo(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=Ye(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function $o(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const r=e.types[o],a=t.indexes[r][i[r]],l=(n=t.values[a])!==null&&n!==void 0?n:0;s[o]=l,i[r]++}return s}const Go=(t,e)=>{const n=J.createTransformer(e),s=Ot(t),i=Ot(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?_(ri($o(s,i),i.values),n):ve(t,e)};function oi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?w(t,e,n):Ye(t)(t,e)}function _o(t,e,n){const s=[],i=n||oi,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||F:e;a=_(l,a)}s.push(a)}return s}function zo(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(ks(o===e.length),o===1)return()=>e[0];if(o===2&&t[0]===t[1])return()=>e[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=_o(e,s,i),a=r.length,l=c=>{let u=0;if(a>1)for(;u<t.length-2&&!(c<t[u+1]);u++);const h=bt(t[u],t[u+1],c);return r[u](h)};return n?c=>l(Z(t[0],t[o-1],c)):l}function Ho(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=bt(0,e,s);t.push(w(n,1,i))}}function Yo(t){const e=[0];return Ho(e,t.length-1),e}function Xo(t,e){return t.map(n=>n*e)}function qo(t,e){return t.map(()=>e||ti).splice(0,t.length-1)}function It({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Fo(s)?s.map(Pn):Pn(s),o={done:!1,value:e[0]},r=Xo(n&&n.length===e.length?n:Yo(e),t),a=zo(r,e,{ease:Array.isArray(i)?i:qo(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const Vn=2e4;function Zo(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Vn;)e+=n,s=t.next(e);return e>=Vn?1/0:e}const Qo=t=>{const e=({timestamp:n})=>t(n);return{start:()=>D.update(e,!0),stop:()=>Q(e),now:()=>R.isProcessing?R.timestamp:q.now()}},Jo={decay:Tn,inertia:Tn,tween:It,keyframes:It,spring:Qs},ta=t=>t/100;class Xe extends Xs{constructor({KeyframeResolver:e=$e,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:s,motionValue:i,keyframes:o}=this.options,r=(a,l)=>this.onKeyframesResolved(a,l);s&&i&&i.owner?this.resolver=i.owner.resolveKeyframes(o,r,s,i):this.resolver=new e(o,r,s,i),this.resolver.scheduleResolve()}initPlayback(e){const{type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=this.options,a=Jo[n]||It;let l,c;a!==It&&typeof e[0]!="number"&&(l=_(ta,oi(e[0],e[1])),e=[0,100]);const u=a({...this.options,keyframes:e});o==="mirror"&&(c=a({...this.options,keyframes:[...e].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=Zo(u));const{calculatedDuration:h}=u,f=h+i,d=f*(s+1)-i;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:h,resolvedDuration:f,totalDuration:d}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:s}=this;if(!s){const{keyframes:b}=this.options;return{done:!0,value:b[b.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:r,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:h}=s;if(this.startTime===null)return o.next(0);const{delay:f,repeat:d,repeatType:m,repeatDelay:p,onUpdate:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const T=this.currentTime-f*(this.speed>=0?1:-1),v=this.speed>=0?T<0:T>u;this.currentTime=Math.max(T,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let g=this.currentTime,S=o;if(d){const b=Math.min(this.currentTime,u)/h;let M=Math.floor(b),B=b%1;!B&&b>=1&&(B=1),B===1&&M--,M=Math.min(M,d+1),!!(M%2)&&(m==="reverse"?(B=1-B,p&&(B-=p/h)):m==="mirror"&&(S=r)),g=Z(0,1,B)*h}const V=v?{done:!1,value:l[0]}:S.next(g);a&&(V.value=a(V.value));let{done:A}=V;!v&&c!==null&&(A=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return N&&i!==void 0&&(V.value=Yt(l,this.options,i)),x&&x(V.value),N&&this.finish(),V}get duration(){const{resolved:e}=this;return e?z(e.calculatedDuration):0}get time(){return z(this.currentTime)}set time(e){e=X(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=z(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=Qo,onPlay:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=s),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}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(e){return this.startTime=0,this.tick(e,!0)}}const ai=t=>Array.isArray(t)&&typeof t[0]=="number";function li(t){return!!(!t||typeof t=="string"&&t in qe||ai(t)||Array.isArray(t)&&t.every(li))}const gt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,qe={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:gt([0,.65,.55,1]),circOut:gt([.55,0,1,.45]),backIn:gt([.31,.01,.66,-.59]),backOut:gt([.33,1.53,.69,.99])};function ea(t){return ui(t)||qe.easeOut}function ui(t){if(t)return ai(t)?gt(t):Array.isArray(t)?t.map(ea):qe[t]}function na(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=ui(a);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:s,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"})}const sa=mo(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ia=new Set(["opacity","clipPath","filter","transform"]),Ut=10,ra=2e4;function oa(t){return t.type==="spring"||t.name==="backgroundColor"||!li(t.ease)}function aa(t,e){const n=new Xe({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let o=0;for(;!s.done&&o<ra;)s=n.sample(o),i.push(s.value),o+=Ut;return{times:void 0,keyframes:i,duration:o-Ut,ease:"linear"}}class wn extends Xs{constructor(e){super(e);const{name:n,motionValue:s,keyframes:i}=this.options;this.resolver=new Ys(i,(o,r)=>this.onKeyframesResolved(o,r),n,s),this.resolver.scheduleResolve()}initPlayback(e,n){var s;let{duration:i=300,times:o,ease:r,type:a,motionValue:l,name:c}=this.options;if(!(!((s=l.owner)===null||s===void 0)&&s.current))return!1;if(oa(this.options)){const{onComplete:h,onUpdate:f,motionValue:d,...m}=this.options,p=aa(e,m);e=p.keyframes,e.length===1&&(e[1]=e[0]),i=p.duration,o=p.times,r=p.ease,a="keyframes"}const u=na(l.owner.current,c,e,{...this.options,duration:i,times:o,ease:r});return u.startTime=q.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:h}=this.options;l.set(Yt(e,this.options,n)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:i,times:o,type:a,ease:r,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return z(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return z(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=X(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return F;const{animation:s}=n;s.timeline=e,s.onfinish=null}return F}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:s,duration:i,type:o,ease:r,times:a}=e;if(!(n.playState==="idle"||n.playState==="finished")){if(this.time){const{motionValue:l,onUpdate:c,onComplete:u,...h}=this.options,f=new Xe({...h,keyframes:s,duration:i,type:o,ease:r,times:a,isGenerator:!0}),d=X(this.time);l.setWithVelocity(f.sample(d-Ut).value,f.sample(d).value,Ut)}this.cancel()}}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:s,repeatDelay:i,repeatType:o,damping:r,type:a}=e;return sa()&&s&&ia.has(s)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&o!=="mirror"&&r!==0&&a!=="inertia"}}const Ze=(t,e,n,s={},i,o)=>r=>{const a=We(s,t)||{},l=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-X(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};Wr(a)||(u={...u,...Kr(t,u)}),u.duration&&(u.duration=X(u.duration)),u.repeatDelay&&(u.repeatDelay=X(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(h=!0)),h&&!o&&e.get()!==void 0){const f=Yt(u.keyframes,a);if(f!==void 0){D.update(()=>{u.onUpdate(f),u.onComplete()});return}}return!o&&wn.supports(u)?new wn(u):new Xe(u)};function Nt(t){return!!(L(t)&&t.add)}function Qe(t,e){t.indexOf(e)===-1&&t.push(e)}function Je(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class tn{constructor(){this.subscriptions=[]}add(e){return Qe(this.subscriptions,e),()=>Je(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const An=30,la=t=>!isNaN(parseFloat(t));class ua{constructor(e,n={}){this.version="11.1.7",this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(s,i=!0)=>{const o=q.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.canTrackVelocity=la(this.current),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=q.now()}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new tn);const s=this.events[e].add(n);return e==="change"?()=>{s(),D.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=q.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>An)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,An);return qs(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Vt(t,e){return new ua(t,e)}function ca(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Vt(n))}function ha(t,e){const n=Ht(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=gr(o[r]);ca(t,r,a)}}function fa({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function ci(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var o;let{transition:r=t.getDefaultTransition(),transitionEnd:a,...l}=e;const c=t.getValue("willChange");s&&(r=s);const u=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const f in l){const d=t.getValue(f,(o=t.latestValues[f])!==null&&o!==void 0?o:null),m=l[f];if(m===void 0||h&&fa(h,f))continue;const p={delay:n,elapsed:0,...We(r||{},f)};let x=!1;if(window.HandoffAppearAnimations){const g=t.getProps()[hs];if(g){const S=window.HandoffAppearAnimations(g,f);S!==null&&(p.elapsed=S,x=!0)}}d.start(Ze(f,d,m,t.shouldReduceMotion&&at.has(f)?{type:!1}:p,t,x));const T=d.animation;T&&(Nt(c)&&(c.add(f),T.then(()=>c.remove(f))),u.push(T))}return a&&Promise.all(u).then(()=>{D.update(()=>{a&&ha(t,a)})}),u}function xe(t,e,n={}){var s;const i=Ht(t,e,n.type==="exit"?(s=t.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const r=i?()=>Promise.all(ci(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:h,staggerDirection:f}=o;return da(t,e,u+c,h,f,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[c,u]=l==="beforeChildren"?[r,a]:[a,r];return c().then(()=>u())}else return Promise.all([r(),a(n.delay)])}function da(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,l=i===1?(c=0)=>c*s:(c=0)=>a-c*s;return Array.from(t.variantChildren).sort(ma).forEach((c,u)=>{c.notify("AnimationStart",e),r.push(xe(c,e,{...o,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(r)}function ma(t,e){return t.sortNodePosition(e)}function pa(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>xe(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=xe(t,e,n);else{const i=typeof e=="function"?Ht(t,e,n.custom):e;s=Promise.all(ci(t,i,n))}return s.then(()=>{D.postRender(()=>{t.notify("AnimationComplete",e)})})}const ga=[...Re].reverse(),ya=Re.length;function va(t){return e=>Promise.all(e.map(({animation:n,options:s})=>pa(t,n,s)))}function xa(t){let e=va(t);const n=Pa();let s=!0;const i=l=>(c,u)=>{var h;const f=Ht(t,u,l==="exit"?(h=t.presenceContext)===null||h===void 0?void 0:h.custom:void 0);if(f){const{transition:d,transitionEnd:m,...p}=f;c={...c,...p,...m}}return c};function o(l){e=l(t)}function r(l){const c=t.getProps(),u=t.getVariantContext(!0)||{},h=[],f=new Set;let d={},m=1/0;for(let x=0;x<ya;x++){const T=ga[x],v=n[T],g=c[T]!==void 0?c[T]:u[T],S=Pt(g),V=T===l?v.isActive:null;V===!1&&(m=x);let A=g===u[T]&&g!==c[T]&&S;if(A&&s&&t.manuallyAnimateOnMount&&(A=!1),v.protectedKeys={...d},!v.isActive&&V===null||!g&&!v.prevProp||Gt(g)||typeof g=="boolean")continue;let b=Ta(v.prevProp,g)||T===l&&v.isActive&&!A&&S||x>m&&S,M=!1;const B=Array.isArray(g)?g:[g];let lt=B.reduce(i(T),{});V===!1&&(lt={});const{prevResolvedValues:en={}}=v,Ei={...en,...lt},nn=k=>{b=!0,f.has(k)&&(M=!0,f.delete(k)),v.needsAnimating[k]=!0;const W=t.getValue(k);W&&(W.liveStyle=!1)};for(const k in Ei){const W=lt[k],Xt=en[k];if(d.hasOwnProperty(k))continue;let qt=!1;he(W)&&he(Xt)?qt=!Fs(W,Xt):qt=W!==Xt,qt?W!=null?nn(k):f.add(k):W!==void 0&&f.has(k)?nn(k):v.protectedKeys[k]=!0}v.prevProp=g,v.prevResolvedValues=lt,v.isActive&&(d={...d,...lt}),s&&t.blockInitialAnimation&&(b=!1),b&&(!A||M)&&h.push(...B.map(k=>({animation:k,options:{type:T}})))}if(f.size){const x={};f.forEach(T=>{const v=t.getBaseTarget(T),g=t.getValue(T);g&&(g.liveStyle=!0),x[T]=v??null}),h.push({animation:x})}let p=!!h.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(p=!1),s=!1,p?e(h):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(f=>{var d;return(d=f.animationState)===null||d===void 0?void 0:d.setActive(l,c)}),n[l].isActive=c;const h=r(l);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n}}function Ta(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Fs(e,t):!1}function et(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Pa(){return{animate:et(!0),whileInView:et(),whileHover:et(),whileTap:et(),whileDrag:et(),whileFocus:et(),exit:et()}}class Sa extends tt{constructor(e){super(e),e.animationState||(e.animationState=xa(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),Gt(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let ba=0;class Va extends tt{constructor(){super(...arguments),this.id=ba++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const wa={animation:{Feature:Sa},exit:{Feature:Va}},Cn=(t,e)=>Math.abs(t-e);function Aa(t,e){const n=Cn(t.x,e.x),s=Cn(t.y,e.y);return Math.sqrt(n**2+s**2)}class hi{constructor(e,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=re(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,d=Aa(h.offset,{x:0,y:0})>=3;if(!f&&!d)return;const{point:m}=h,{timestamp:p}=R;this.history.push({...m,timestamp:p});const{onStart:x,onMove:T}=this.handlers;f||(x&&x(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=ie(f,this.transformPagePoint),D.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:d,onSessionEnd:m,resumeAnimation:p}=this.handlers;if(this.dragSnapToOrigin&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=re(h.type==="pointercancel"?this.lastMoveEventInfo:ie(f,this.transformPagePoint),this.history);this.startEvent&&d&&d(h,x),m&&m(h,x)},!Ms(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const r=zt(e),a=ie(r,this.transformPagePoint),{point:l}=a,{timestamp:c}=R;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,re(a,this.history)),this.removeListeners=_(G(this.contextWindow,"pointermove",this.handlePointerMove),G(this.contextWindow,"pointerup",this.handlePointerUp),G(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Q(this.updatePoint)}}function ie(t,e){return e?{point:e(t.point)}:t}function Mn(t,e){return{x:t.x-e.x,y:t.y-e.y}}function re({point:t},e){return{point:t,delta:Mn(t,fi(e)),offset:Mn(t,Ca(e)),velocity:Ma(e,.1)}}function Ca(t){return t[0]}function fi(t){return t[t.length-1]}function Ma(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=fi(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>X(e)));)n--;if(!s)return{x:0,y:0};const o=z(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function O(t){return t.max-t.min}function Te(t,e=0,n=.01){return Math.abs(t-e)<=n}function Dn(t,e,n,s=.5){t.origin=s,t.originPoint=w(e.min,e.max,t.origin),t.scale=O(n)/O(e),(Te(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=w(n.min,n.max,t.origin)-t.originPoint,(Te(t.translate)||isNaN(t.translate))&&(t.translate=0)}function xt(t,e,n,s){Dn(t.x,e.x,n.x,s?s.originX:void 0),Dn(t.y,e.y,n.y,s?s.originY:void 0)}function Rn(t,e,n){t.min=n.min+e.min,t.max=t.min+O(e)}function Da(t,e,n){Rn(t.x,e.x,n.x),Rn(t.y,e.y,n.y)}function En(t,e,n){t.min=e.min-n.min,t.max=t.min+O(e)}function Tt(t,e,n){En(t.x,e.x,n.x),En(t.y,e.y,n.y)}function Ra(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?w(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?w(n,t,s.max):Math.min(t,n)),t}function Ln(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Ea(t,{top:e,left:n,bottom:s,right:i}){return{x:Ln(t.x,n,i),y:Ln(t.y,e,s)}}function Fn(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function La(t,e){return{x:Fn(t.x,e.x),y:Fn(t.y,e.y)}}function Fa(t,e){let n=.5;const s=O(t),i=O(e);return i>s?n=bt(e.min,e.max-s,t.min):s>i&&(n=bt(t.min,t.max-i,e.min)),Z(0,1,n)}function Ba(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Pe=.35;function ka(t=Pe){return t===!1?t=0:t===!0&&(t=Pe),{x:Bn(t,"left","right"),y:Bn(t,"top","bottom")}}function Bn(t,e,n){return{min:kn(t,e),max:kn(t,n)}}function kn(t,e){return typeof t=="number"?t:t[e]||0}const jn=()=>({translate:0,scale:1,origin:0,originPoint:0}),ht=()=>({x:jn(),y:jn()}),On=()=>({min:0,max:0}),C=()=>({x:On(),y:On()});function U(t){return[t("x"),t("y")]}function di({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function ja({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Oa(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function oe(t){return t===void 0||t===1}function Se({scale:t,scaleX:e,scaleY:n}){return!oe(t)||!oe(e)||!oe(n)}function nt(t){return Se(t)||mi(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function mi(t){return In(t.x)||In(t.y)}function In(t){return t&&t!=="0%"}function Kt(t,e,n){const s=t-n,i=e*s;return n+i}function Un(t,e,n,s,i){return i!==void 0&&(t=Kt(t,i,s)),Kt(t,n,s)+e}function be(t,e=0,n=1,s,i){t.min=Un(t.min,e,n,s,i),t.max=Un(t.max,e,n,s,i)}function pi(t,{x:e,y:n}){be(t.x,e.translate,e.scale,e.originPoint),be(t.y,n.translate,n.scale,n.originPoint)}function Ia(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const l=o.instance;l&&l.style&&l.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&ft(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,pi(t,r)),s&&nt(o.latestValues)&&ft(t,o.latestValues))}e.x=Nn(e.x),e.y=Nn(e.y)}function Nn(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function Y(t,e){t.min=t.min+e,t.max=t.max+e}function Kn(t,e,[n,s,i]){const o=e[i]!==void 0?e[i]:.5,r=w(t.min,t.max,o);be(t,e[n],e[s],r,e.scale)}const Ua=["x","scaleX","originX"],Na=["y","scaleY","originY"];function ft(t,e){Kn(t.x,e,Ua),Kn(t.y,e,Na)}function gi(t,e){return di(Oa(t.getBoundingClientRect(),e))}function Ka(t,e,n){const s=gi(t,n),{scroll:i}=e;return i&&(Y(s.x,i.offset.x),Y(s.y,i.offset.y)),s}const yi=({current:t})=>t?t.ownerDocument.defaultView:null,Wa=new WeakMap;class $a{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=C(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=u=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(zt(u,"page").point)},o=(u,h)=>{const{drag:f,dragPropagation:d,onDragStart:m}=this.getProps();if(f&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Rs(f),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),U(x=>{let T=this.getAxisMotionValue(x).get()||0;if(K.test(T)){const{projection:v}=this.visualElement;if(v&&v.layout){const g=v.layout.layoutBox[x];g&&(T=O(g)*(parseFloat(T)/100))}}this.originPoint[x]=T}),m&&m(u,h);const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},r=(u,h)=>{const{dragPropagation:f,dragDirectionLock:d,onDirectionLock:m,onDrag:p}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:x}=h;if(d&&this.currentDirection===null){this.currentDirection=Ga(x),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",h.point,x),this.updateAxis("y",h.point,x),this.visualElement.render(),p&&p(u,h)},a=(u,h)=>this.stop(u,h),l=()=>U(u=>{var h;return this.getAnimationState(u)==="paused"&&((h=this.getAxisMotionValue(u).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new hi(e,{onSessionStart:i,onStart:o,onMove:r,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:yi(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&o(e,n)}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Et(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=Ra(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,o=this.constraints;n&&ut(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=Ea(i.layoutBox,n):this.constraints=!1,this.elastic=ka(s),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&U(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=Ba(i.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!ut(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Ka(s,i.root,this.visualElement.getTransformPagePoint());let r=La(i.layout.layoutBox,o);if(n){const a=n(ja(r));this.hasMutatedConstraints=!!a,a&&(r=di(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=U(u=>{if(!Et(u,n,this.currentDirection))return;let h=l&&l[u]||{};r&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,m={type:"inertia",velocity:s?e[u]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return s.start(Ze(e,s,0,n,this.visualElement))}stopAnimation(){U(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){U(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){U(n=>{const{drag:s}=this.getProps();if(!Et(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(e[n]-w(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!ut(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};U(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=Fa({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),U(r=>{if(!Et(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];a.set(w(l,c,i[r]))})}addListeners(){if(!this.visualElement.current)return;Wa.set(this.visualElement,this);const e=this.visualElement.current,n=G(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();ut(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),s();const r=$(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(U(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=l[u].translate,h.set(h.get()+l[u].translate))}),this.visualElement.render())});return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Pe,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Et(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Ga(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class _a extends tt{constructor(e){super(e),this.removeGroupControls=F,this.removeListeners=F,this.controls=new $a(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||F}unmount(){this.removeGroupControls(),this.removeListeners()}}const Wn=t=>(e,n)=>{t&&t(e,n)};class za extends tt{constructor(){super(...arguments),this.removePointerDownListener=F}onPointerDown(e){this.session=new hi(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:yi(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Wn(e),onStart:Wn(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&i(o,r)}}}mount(){this.removePointerDownListener=G(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function Ha(){const t=y.useContext($t);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,i=y.useId();return y.useEffect(()=>s(i),[]),!e&&n?[!1,()=>n&&n(i)]:[!0]}const Bt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function $n(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const pt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(P.test(t))t=parseFloat(t);else return t;const n=$n(t,e.target.x),s=$n(t,e.target.y);return`${n}% ${s}%`}},Ya={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=J.parse(t);if(i.length>5)return s;const o=J.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const c=w(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=c),typeof i[3+r]=="number"&&(i[3+r]/=c),o(i)}};class Xa extends y.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;zi(qa),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Bt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,r=s.projection;return r&&(r.isPresent=o,i||e.layoutDependency!==n||n===void 0?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||D.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),De.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function vi(t){const[e,n]=Ha(),s=y.useContext(Le);return j.jsx(Xa,{...t,layoutGroup:s,switchLayoutGroup:y.useContext(ms),isPresent:e,safeToRemove:n})}const qa={borderRadius:{...pt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:pt,borderTopRightRadius:pt,borderBottomLeftRadius:pt,borderBottomRightRadius:pt,boxShadow:Ya},xi=["TopLeft","TopRight","BottomLeft","BottomRight"],Za=xi.length,Gn=t=>typeof t=="string"?parseFloat(t):t,_n=t=>typeof t=="number"||P.test(t);function Qa(t,e,n,s,i,o){i?(t.opacity=w(0,n.opacity!==void 0?n.opacity:1,Ja(s)),t.opacityExit=w(e.opacity!==void 0?e.opacity:1,0,tl(s))):o&&(t.opacity=w(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let r=0;r<Za;r++){const a=`border${xi[r]}Radius`;let l=zn(e,a),c=zn(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||_n(l)===_n(c)?(t[a]=Math.max(w(Gn(l),Gn(c),s),0),(K.test(c)||K.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=w(e.rotate||0,n.rotate||0,s))}function zn(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Ja=Ti(0,.5,si),tl=Ti(.5,.95,F);function Ti(t,e,n){return s=>s<t?0:s>e?1:n(bt(t,e,s))}function Hn(t,e){t.min=e.min,t.max=e.max}function I(t,e){Hn(t.x,e.x),Hn(t.y,e.y)}function Yn(t,e,n,s,i){return t-=e,t=Kt(t,1/n,s),i!==void 0&&(t=Kt(t,1/i,s)),t}function el(t,e=0,n=1,s=.5,i,o=t,r=t){if(K.test(e)&&(e=parseFloat(e),e=w(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=w(o.min,o.max,s);t===o&&(a-=e),t.min=Yn(t.min,e,n,a,i),t.max=Yn(t.max,e,n,a,i)}function Xn(t,e,[n,s,i],o,r){el(t,e[n],e[s],e[i],e.scale,o,r)}const nl=["x","scaleX","originX"],sl=["y","scaleY","originY"];function qn(t,e,n,s){Xn(t.x,e,nl,n?n.x:void 0,s?s.x:void 0),Xn(t.y,e,sl,n?n.y:void 0,s?s.y:void 0)}function Zn(t){return t.translate===0&&t.scale===1}function Pi(t){return Zn(t.x)&&Zn(t.y)}function il(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function Si(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function Qn(t){return O(t.x)/O(t.y)}class rl{constructor(){this.members=[]}add(e){Qe(this.members,e),e.scheduleRender()}remove(e){if(Je(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Jn(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=(n==null?void 0:n.z)||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:h,rotateY:f,skewX:d,skewY:m}=n;c&&(s=`perspective(${c}px) ${s}`),u&&(s+=`rotate(${u}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),d&&(s+=`skewX(${d}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const ol=(t,e)=>t.depth-e.depth;class al{constructor(){this.children=[],this.isDirty=!1}add(e){Qe(this.children,e),this.isDirty=!0}remove(e){Je(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ol),this.isDirty=!1,this.children.forEach(e)}}function ll(t,e){const n=q.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(Q(s),t(o-e))};return D.read(s,!0),()=>Q(s)}function ul(t){window.MotionDebug&&window.MotionDebug.record(t)}function cl(t){return t instanceof SVGElement&&t.tagName!=="svg"}function hl(t,e,n){const s=L(t)?t:Vt(t);return s.start(Ze("",s,e,n)),s.animation}const ae=["","X","Y","Z"],fl={visibility:"hidden"},ts=1e3;let dl=0;const st={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function le(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function bi({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e==null?void 0:e()){this.id=dl++,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.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,st.totalNodes=st.resolvedTargetDeltas=st.recalculatedProjection=0,this.nodes.forEach(gl),this.nodes.forEach(Pl),this.nodes.forEach(Sl),this.nodes.forEach(yl),ul(st)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new al)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new tn),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=cl(r),this.instance=r;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),t){let h;const f=()=>this.root.updateBlockedByResize=!1;t(r,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=ll(f,250),Bt.hasAnimatedSinceResize&&(Bt.hasAnimatedSinceResize=!1,this.nodes.forEach(ns))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeTargetChanged:d,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||Cl,{onLayoutAnimationStart:x,onLayoutAnimationComplete:T}=u.getProps(),v=!this.targetLayout||!Si(this.targetLayout,m)||d,g=!f&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||f&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,g);const S={...We(p,"layout"),onPlay:x,onComplete:T};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else f||ns(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Q(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(bl),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(es);return}this.isUpdating||this.nodes.forEach(xl),this.isUpdating=!1,window.HandoffCancelAllAnimations&&window.HandoffCancelAllAnimations(),this.nodes.forEach(Tl),this.nodes.forEach(ml),this.nodes.forEach(pl),this.clearAllSnapshots();const a=q.now();R.delta=Z(0,1e3/60,a-R.timestamp),R.timestamp=a,R.isProcessing=!0,Zt.update.process(R),Zt.preRender.process(R),Zt.render.process(R),R.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,De.read(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(vl),this.sharedNodes.forEach(Vl)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,D.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){D.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 l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=C(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:r,isRoot:s(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform,a=this.projectionDelta&&!Pi(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&(a||nt(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),Ml(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return C();const a=r.measureViewportBox(),{scroll:l}=this.root;return l&&(Y(a.x,l.offset.x),Y(a.y,l.offset.y)),a}removeElementScroll(r){const a=C();I(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:h}=c;if(c!==this.root&&u&&h.layoutScroll){if(u.isRoot){I(a,r);const{scroll:f}=this.root;f&&(Y(a.x,-f.offset.x),Y(a.y,-f.offset.y))}Y(a.x,u.offset.x),Y(a.y,u.offset.y)}}return a}applyTransform(r,a=!1){const l=C();I(l,r);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&ft(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),nt(u.latestValues)&&ft(l,u.latestValues)}return nt(this.latestValues)&&ft(l,this.latestValues),l}removeTransform(r){const a=C();I(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!nt(c.latestValues))continue;Se(c.latestValues)&&c.updateSnapshot();const u=C(),h=c.measurePageBox();I(u,h),qn(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return nt(this.latestValues)&&qn(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.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!==R.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(r||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:h,layoutId:f}=this.options;if(!(!this.layout||!(h||f))){if(this.resolvedRelativeTargetAt=R.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=C(),this.relativeTargetOrigin=C(),Tt(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),I(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=C(),this.targetWithTransforms=C()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Da(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):I(this.target,this.layout.layoutBox),pi(this.target,this.targetDelta)):I(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=C(),this.relativeTargetOrigin=C(),Tt(this.relativeTargetOrigin,this.target,d.target),I(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}st.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Se(this.parent.latestValues)||mi(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 r;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((r=this.parent)===null||r===void 0)&&r.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===R.timestamp&&(c=!1),c)return;const{layout:u,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||h))return;I(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;Ia(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=C());const{target:m}=a;if(!m){this.projectionTransform&&(this.projectionDelta=ht(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=ht(),this.projectionDeltaWithTransform=ht());const p=this.projectionTransform;xt(this.projectionDelta,this.layoutCorrected,m,this.latestValues),this.projectionTransform=Jn(this.projectionDelta,this.treeScale),(this.projectionTransform!==p||this.treeScale.x!==f||this.treeScale.y!==d)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),st.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(r,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},h=ht();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=C(),d=l?l.source:void 0,m=this.layout?this.layout.source:void 0,p=d!==m,x=this.getStack(),T=!x||x.members.length<=1,v=!!(p&&!T&&this.options.crossfade===!0&&!this.path.some(Al));this.animationProgress=0;let g;this.mixTargetDelta=S=>{const V=S/1e3;ss(h.x,r.x,V),ss(h.y,r.y,V),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Tt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),wl(this.relativeTarget,this.relativeTargetOrigin,f,V),g&&il(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=C()),I(g,this.relativeTarget)),p&&(this.animationValues=u,Qa(u,c,this.latestValues,V,v,T)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=V},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Q(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=D.update(()=>{Bt.hasAnimatedSinceResize=!0,this.currentAnimation=hl(0,ts,{...r,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onComplete:()=>{r.onComplete&&r.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 r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ts),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=r;if(!(!a||!l||!c)){if(this!==r&&this.layout&&c&&Vi(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||C();const h=O(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+h;const f=O(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}I(a,l),ft(a,u),xt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new rl),this.sharedNodes.get(r).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var r;const{layoutId:a}=this.options;return a?((r=this.getStack())===null||r===void 0?void 0:r.lead)||this:this}getPrevLead(){var r;const{layoutId:a}=this.options;return a?(r=this.getStack())===null||r===void 0?void 0:r.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&le("z",r,c,this.animationValues);for(let u=0;u<ae.length;u++)le(`rotate${ae[u]}`,r,c,this.animationValues),le(`skew${ae[u]}`,r,c,this.animationValues);r.render();for(const u in c)r.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);r.scheduleRender()}getProjectionStyles(r){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return fl;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Lt(r==null?void 0:r.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const p={};return this.options.layoutId&&(p.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,p.pointerEvents=Lt(r==null?void 0:r.pointerEvents)||""),this.hasProjected&&!nt(this.latestValues)&&(p.transform=u?u({},""):"none",this.hasProjected=!1),p}const f=h.animationValues||h.latestValues;this.applyTransformsToTarget(),c.transform=Jn(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:d,y:m}=this.projectionDelta;c.transformOrigin=`${d.origin*100}% ${m.origin*100}% 0`,h.animationValues?c.opacity=h===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=h===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const p in kt){if(f[p]===void 0)continue;const{correct:x,applyTo:T}=kt[p],v=c.transform==="none"?f[p]:x(f[p],h);if(T){const g=T.length;for(let S=0;S<g;S++)c[T[S]]=v}else c[p]=v}return this.options.layoutId&&(c.pointerEvents=h===this?Lt(r==null?void 0:r.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var a;return(a=r.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(es),this.root.sharedNodes.clear()}}}function ml(t){t.updateLayout()}function pl(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:o}=t.options,r=n.source!==t.layout.source;o==="size"?U(h=>{const f=r?n.measuredBox[h]:n.layoutBox[h],d=O(f);f.min=s[h].min,f.max=f.min+d}):Vi(o,n.layoutBox,s)&&U(h=>{const f=r?n.measuredBox[h]:n.layoutBox[h],d=O(s[h]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+d)});const a=ht();xt(a,s,n.layoutBox);const l=ht();r?xt(l,t.applyTransform(i,!0),n.measuredBox):xt(l,s,n.layoutBox);const c=!Pi(a);let u=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const m=C();Tt(m,n.layoutBox,f.layoutBox);const p=C();Tt(p,s,d.layoutBox),Si(m,p)||(u=!0),h.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=m,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function gl(t){st.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function yl(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function vl(t){t.clearSnapshot()}function es(t){t.clearMeasurements()}function xl(t){t.isLayoutDirty=!1}function Tl(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ns(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Pl(t){t.resolveTargetDelta()}function Sl(t){t.calcProjection()}function bl(t){t.resetSkewAndRotation()}function Vl(t){t.removeLeadSnapshot()}function ss(t,e,n){t.translate=w(e.translate,0,n),t.scale=w(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function is(t,e,n,s){t.min=w(e.min,n.min,s),t.max=w(e.max,n.max,s)}function wl(t,e,n,s){is(t.x,e.x,n.x,s),is(t.y,e.y,n.y,s)}function Al(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Cl={duration:.45,ease:[.4,0,.1,1]},rs=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),os=rs("applewebkit/")&&!rs("chrome/")?Math.round:F;function as(t){t.min=os(t.min),t.max=os(t.max)}function Ml(t){as(t.x),as(t.y)}function Vi(t,e,n){return t==="position"||t==="preserve-aspect"&&!Te(Qn(e),Qn(n),.2)}const Dl=bi({attachResizeListener:(t,e)=>$(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ue={current:void 0},wi=bi({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ue.current){const t=new Dl({});t.mount(window),t.setOptions({layoutScroll:!0}),ue.current=t}return ue.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Rl={pan:{Feature:za},drag:{Feature:_a,ProjectionNode:wi,MeasureLayout:vi}},Ve={current:null},Ai={current:!1};function El(){if(Ai.current=!0,!!Ae)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ve.current=t.matches;t.addListener(e),e()}else Ve.current=!1}function Ll(t,e,n){const{willChange:s}=e;for(const i in e){const o=e[i],r=n[i];if(L(o))t.addValue(i,o),Nt(s)&&s.add(i);else if(L(r))t.addValue(i,Vt(o,{owner:t})),Nt(s)&&s.remove(i);else if(r!==o)if(t.hasValue(i)){const a=t.getValue(i);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=t.getStaticValue(i);t.addValue(i,Vt(a!==void 0?a:o,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const ls=new WeakMap,Fl=[...Us,E,J],Bl=t=>Fl.find(Is(t)),Ci=Object.keys(St),kl=Ci.length,us=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],jl=Ee.length;function Mi(t){if(t)return t.options.allowProjection!==!1?t.projection:Mi(t.parent)}class Ol{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.resolveKeyframes=(f,d,m,p)=>new this.KeyframeResolver(f,d,m,p,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=$e,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.scheduleRender=()=>D.render(this.render,!1,!0);const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=_t(n),this.isVariantNode=ds(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const d=h[f];l[f]!==void 0&&L(d)&&(d.set(l[f],!1),Nt(u)&&u.add(f))}}mount(e){this.current=e,ls.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),Ai.current||El(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ve.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){var e;ls.delete(this.current),this.projection&&this.projection.unmount(),Q(this.notifyUpdate),Q(this.render),this.valueSubscriptions.forEach(n=>n()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const n in this.events)this.events[n].clear();for(const n in this.features)(e=this.features[n])===null||e===void 0||e.unmount();this.current=null}bindToMotionValue(e,n){const s=at.has(e),i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&D.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...n},s,i,o){let r,a;for(let l=0;l<kl;l++){const c=Ci[l],{isEnabled:u,Feature:h,ProjectionNode:f,MeasureLayout:d}=St[c];f&&(r=f),u(n)&&(!this.features[c]&&h&&(this.features[c]=new h(this)),d&&(a=d))}if((this.type==="html"||this.type==="svg")&&!this.projection&&r){this.projection=new r(this.latestValues,Mi(this.parent));const{layoutId:l,layout:c,drag:u,dragConstraints:h,layoutScroll:f,layoutRoot:d}=n;this.projection.setOptions({layoutId:l,layout:c,alwaysMeasureLayout:!!u||h&&ut(h),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof c=="string"?c:"both",initialPromotionConfig:o,layoutScroll:f,layoutRoot:d})}return a}updateFeatures(){for(const e in this.features){const n=this.features[e];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):C()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<us.length;s++){const i=us[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=Ll(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const s=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(s.initial=this.props.initial),s}const n={};for(let s=0;s<jl;s++){const i=Ee[s],o=this.props[i];(Pt(o)||o===!1)&&(n[i]=o)}return n}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=Vt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){var s;let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(s=this.getBaseTargetFromProps(this.props,e))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(js(i)||Bs(i))?i=parseFloat(i):!Bl(i)&&J.test(n)&&(i=Hs(e,n)),this.setBaseTarget(e,L(i)?i.get():i)),L(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const r=Ke(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);r&&(i=r[e])}if(s&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!L(o)?o:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new tn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class Di extends Ol{constructor(){super(...arguments),this.KeyframeResolver=Ys}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}}function Il(t){return window.getComputedStyle(t)}class Ul extends Di{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,n){if(at.has(n)){const s=_e(n);return s&&s.default||0}else{const s=Il(e),i=(ys(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return gi(e,n)}build(e,n,s,i){je(e,n,s,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Ne(e,n,s)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;L(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,s,i){Ss(e,n,s,i)}}class Nl extends Di{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(at.has(n)){const s=_e(n);return s&&s.default||0}return n=bs.has(n)?n:Me(n),e.getAttribute(n)}measureInstanceViewportBox(){return C()}scrapeMotionValuesFromProps(e,n,s){return ws(e,n,s)}build(e,n,s,i){Ie(e,n,s,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,s,i){Vs(e,n,s,i)}mount(e){this.isSVGTag=Ue(e.tagName),super.mount(e)}}const Kl=(t,e)=>Fe(t)?new Nl(e,{enableHardwareAcceleration:!1}):new Ul(e,{allowProjection:t!==y.Fragment,enableHardwareAcceleration:!0}),Wl={layout:{ProjectionNode:wi,MeasureLayout:vi}},$l={...wa,...Br,...Rl,...Wl},Jl=Gi((t,e)=>Pr(t,e,$l,Kl));function Ri(){const t=y.useRef(!1);return Ce(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Gl(){const t=Ri(),[e,n]=y.useState(0),s=y.useCallback(()=>{t.current&&n(e+1)},[e]);return[y.useCallback(()=>D.postRender(s),[s]),e]}class _l extends y.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function zl({children:t,isPresent:e}){const n=y.useId(),s=y.useRef(null),i=y.useRef({width:0,height:0,top:0,left:0}),{nonce:o}=y.useContext(we);return y.useInsertionEffect(()=>{const{width:r,height:a,top:l,left:c}=i.current;if(e||!s.current||!r||!a)return;s.current.dataset.motionPopId=n;const u=document.createElement("style");return o&&(u.nonce=o),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
1
+ import{r as y,j}from"./vendor-react-CcDXZHn_.js";const we=y.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),Wt=y.createContext({}),$t=y.createContext(null),Ae=typeof document<"u",Ce=Ae?y.useLayoutEffect:y.useEffect,cs=y.createContext({strict:!1}),Me=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Li="framerAppearId",hs="data-"+Me(Li),Fi={useManualTiming:!1};class sn{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function Bi(t){let e=new sn,n=new sn,s=0,i=!1,o=!1;const r=new WeakSet,a={schedule:(l,c=!1,u=!1)=>{const h=u&&i,f=h?e:n;return c&&r.add(l),f.add(l)&&h&&i&&(s=e.order.length),l},cancel:l=>{n.remove(l),r.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[e,n]=[n,e],n.clear(),s=e.order.length,s)for(let c=0;c<s;c++){const u=e.order[c];r.has(u)&&(a.schedule(u),t()),u(l)}i=!1,o&&(o=!1,a.process(l))}};return a}const Dt=["read","resolveKeyframes","update","preRender","render","postRender"],ki=40;function fs(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=Dt.reduce((h,f)=>(h[f]=Bi(()=>n=!0),h),{}),r=h=>{o[h].process(i)},a=()=>{const h=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(h-i.timestamp,ki),1),i.timestamp=h,i.isProcessing=!0,Dt.forEach(r),i.isProcessing=!1,n&&e&&(s=!1,t(a))},l=()=>{n=!0,s=!0,i.isProcessing||t(a)};return{schedule:Dt.reduce((h,f)=>{const d=o[f];return h[f]=(m,p=!1,x=!1)=>(n||l(),d.schedule(m,p,x)),h},{}),cancel:h=>Dt.forEach(f=>o[f].cancel(h)),state:i,steps:o}}const{schedule:De}=fs(queueMicrotask,!1);function ji(t,e,n,s){const{visualElement:i}=y.useContext(Wt),o=y.useContext(cs),r=y.useContext($t),a=y.useContext(we).reducedMotion,l=y.useRef();s=s||o.renderer,!l.current&&s&&(l.current=s(t,{visualState:e,parent:i,props:n,presenceContext:r,blockInitialAnimation:r?r.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;y.useInsertionEffect(()=>{c&&c.update(n,r)});const u=y.useRef(!!(n[hs]&&!window.HandoffComplete));return Ce(()=>{c&&(De.postRender(c.render),u.current&&c.animationState&&c.animationState.animateChanges())}),y.useEffect(()=>{c&&(c.updateFeatures(),!u.current&&c.animationState&&c.animationState.animateChanges(),u.current&&(u.current=!1,window.HandoffComplete=!0))}),c}function ut(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Oi(t,e,n){return y.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):ut(n)&&(n.current=s))},[e])}function Pt(t){return typeof t=="string"||Array.isArray(t)}function Gt(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const Re=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ee=["initial",...Re];function _t(t){return Gt(t.animate)||Ee.some(e=>Pt(t[e]))}function ds(t){return!!(_t(t)||t.variants)}function Ii(t,e){if(_t(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Pt(n)?n:void 0,animate:Pt(s)?s:void 0}}return t.inherit!==!1?e:{}}function Ui(t){const{initial:e,animate:n}=Ii(t,y.useContext(Wt));return y.useMemo(()=>({initial:e,animate:n}),[rn(e),rn(n)])}function rn(t){return Array.isArray(t)?t.join(" "):t}const on={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},St={};for(const t in on)St[t]={isEnabled:e=>on[t].some(n=>!!e[n])};function Ni(t){for(const e in t)St[e]={...St[e],...t[e]}}const Le=y.createContext({}),ms=y.createContext({}),Ki=Symbol.for("motionComponentSymbol");function Wi({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){t&&Ni(t);function o(a,l){let c;const u={...y.useContext(we),...a,layoutId:$i(a)},{isStatic:h}=u,f=Ui(a),d=s(a,h);if(!h&&Ae){f.visualElement=ji(i,d,u,e);const m=y.useContext(ms),p=y.useContext(cs).strict;f.visualElement&&(c=f.visualElement.loadFeatures(u,p,t,m))}return j.jsxs(Wt.Provider,{value:f,children:[c&&f.visualElement?j.jsx(c,{visualElement:f.visualElement,...u}):null,n(i,a,Oi(d,f.visualElement,l),d,h,f.visualElement)]})}const r=y.forwardRef(o);return r[Ki]=i,r}function $i({layoutId:t}){const e=y.useContext(Le).id;return e&&t!==void 0?e+"-"+t:t}function Gi(t){function e(s,i={}){return Wi(t(s,i))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(s,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const _i=["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 Fe(t){return typeof t!="string"||t.includes("-")?!1:!!(_i.indexOf(t)>-1||/[A-Z]/u.test(t))}const kt={};function zi(t){Object.assign(kt,t)}const wt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],at=new Set(wt);function ps(t,{layout:e,layoutId:n}){return at.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!kt[t]||t==="opacity")}const L=t=>!!(t&&t.getVelocity),Hi={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Yi=wt.length;function Xi(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let o="";for(let r=0;r<Yi;r++){const a=wt[r];if(t[a]!==void 0){const l=Hi[a]||a;o+=`${l}(${t[a]}) `}}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,s?"":o):n&&s&&(o="none"),o}const gs=t=>e=>typeof e=="string"&&e.startsWith(t),ys=gs("--"),qi=gs("var(--"),Be=t=>qi(t)?Zi.test(t.split("/*")[0].trim()):!1,Zi=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Qi=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Z=(t,e,n)=>n>e?e:n<t?t:n,mt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},yt={...mt,transform:t=>Z(0,1,t)},Rt={...mt,default:1},vt=t=>Math.round(t*1e5)/1e5,ke=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Ji=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,tr=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function At(t){return typeof t=="string"}const Ct=t=>({test:e=>At(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),H=Ct("deg"),K=Ct("%"),P=Ct("px"),er=Ct("vh"),nr=Ct("vw"),an={...K,parse:t=>K.parse(t)/100,transform:t=>K.transform(t*100)},ln={...mt,transform:Math.round},vs={borderWidth:P,borderTopWidth:P,borderRightWidth:P,borderBottomWidth:P,borderLeftWidth:P,borderRadius:P,radius:P,borderTopLeftRadius:P,borderTopRightRadius:P,borderBottomRightRadius:P,borderBottomLeftRadius:P,width:P,maxWidth:P,height:P,maxHeight:P,size:P,top:P,right:P,bottom:P,left:P,padding:P,paddingTop:P,paddingRight:P,paddingBottom:P,paddingLeft:P,margin:P,marginTop:P,marginRight:P,marginBottom:P,marginLeft:P,rotate:H,rotateX:H,rotateY:H,rotateZ:H,scale:Rt,scaleX:Rt,scaleY:Rt,scaleZ:Rt,skew:H,skewX:H,skewY:H,distance:P,translateX:P,translateY:P,translateZ:P,x:P,y:P,z:P,perspective:P,transformPerspective:P,opacity:yt,originX:an,originY:an,originZ:P,zIndex:ln,backgroundPositionX:P,backgroundPositionY:P,fillOpacity:yt,strokeOpacity:yt,numOctaves:ln};function je(t,e,n,s){const{style:i,vars:o,transform:r,transformOrigin:a}=t;let l=!1,c=!1,u=!0;for(const h in e){const f=e[h];if(ys(h)){o[h]=f;continue}const d=vs[h],m=Qi(f,d);if(at.has(h)){if(l=!0,r[h]=m,!u)continue;f!==(d.default||0)&&(u=!1)}else h.startsWith("origin")?(c=!0,a[h]=m):i[h]=m}if(e.transform||(l||s?i.transform=Xi(t.transform,n,u,s):i.transform&&(i.transform="none")),c){const{originX:h="50%",originY:f="50%",originZ:d=0}=a;i.transformOrigin=`${h} ${f} ${d}`}}const Oe=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function xs(t,e,n){for(const s in e)!L(e[s])&&!ps(s,n)&&(t[s]=e[s])}function sr({transformTemplate:t},e,n){return y.useMemo(()=>{const s=Oe();return je(s,e,{enableHardwareAcceleration:!n},t),Object.assign({},s.vars,s.style)},[e])}function ir(t,e,n){const s=t.style||{},i={};return xs(i,s,t),Object.assign(i,sr(t,e,n)),i}function rr(t,e,n){const s={},i=ir(t,e,n);return t.drag&&t.dragListener!==!1&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const or=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 jt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||or.has(t)}let Ts=t=>!jt(t);function ar(t){t&&(Ts=e=>e.startsWith("on")?!jt(e):t(e))}try{ar(require("@emotion/is-prop-valid").default)}catch{}function lr(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Ts(i)||n===!0&&jt(i)||!e&&!jt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function un(t,e,n){return typeof t=="string"?t:P.transform(e+n*t)}function ur(t,e,n){const s=un(e,t.x,t.width),i=un(n,t.y,t.height);return`${s} ${i}`}const cr={offset:"stroke-dashoffset",array:"stroke-dasharray"},hr={offset:"strokeDashoffset",array:"strokeDasharray"};function fr(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?cr:hr;t[o.offset]=P.transform(-s);const r=P.transform(e),a=P.transform(n);t[o.array]=`${r} ${a}`}function Ie(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...c},u,h,f){if(je(t,c,u,f),h){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:m,dimensions:p}=t;d.transform&&(p&&(m.transform=d.transform),delete d.transform),p&&(i!==void 0||o!==void 0||m.transform)&&(m.transformOrigin=ur(p,i!==void 0?i:.5,o!==void 0?o:.5)),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),r!==void 0&&fr(d,r,a,l,!1)}const Ps=()=>({...Oe(),attrs:{}}),Ue=t=>typeof t=="string"&&t.toLowerCase()==="svg";function dr(t,e,n,s){const i=y.useMemo(()=>{const o=Ps();return Ie(o,e,{enableHardwareAcceleration:!1},Ue(s),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};xs(o,t.style,t),i.style={...o,...i.style}}return i}function mr(t=!1){return(n,s,i,{latestValues:o},r)=>{const l=(Fe(n)?dr:rr)(s,o,r,n),c=lr(s,typeof n=="string",t),u=n!==y.Fragment?{...c,...l,ref:i}:{},{children:h}=s,f=y.useMemo(()=>L(h)?h.get():h,[h]);return y.createElement(n,{...u,children:f})}}function Ss(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const o in n)t.style.setProperty(o,n[o])}const bs=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 Vs(t,e,n,s){Ss(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(bs.has(i)?i:Me(i),e.attrs[i])}function Ne(t,e,n){var s;const{style:i}=t,o={};for(const r in i)(L(i[r])||e.style&&L(e.style[r])||ps(r,t)||((s=n==null?void 0:n.getValue(r))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(o[r]=i[r]);return o}function ws(t,e,n){const s=Ne(t,e,n);for(const i in t)if(L(t[i])||L(e[i])){const o=wt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}function Ke(t,e,n,s={},i={}){return typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),e}function As(t){const e=y.useRef(null);return e.current===null&&(e.current=t()),e.current}const he=t=>Array.isArray(t),pr=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),gr=t=>he(t)?t[t.length-1]||0:t;function Lt(t){const e=L(t)?t.get():t;return pr(e)?e.toValue():e}function yr({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,o){const r={latestValues:vr(s,i,o,t),renderState:e()};return n&&(r.mount=a=>n(s,a,r)),r}const Cs=t=>(e,n)=>{const s=y.useContext(Wt),i=y.useContext($t),o=()=>yr(t,e,s,i);return n?o():As(o)};function vr(t,e,n,s){const i={},o=s(t,{});for(const f in o)i[f]=Lt(o[f]);let{initial:r,animate:a}=t;const l=_t(t),c=ds(t);e&&c&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const h=u?a:r;return h&&typeof h!="boolean"&&!Gt(h)&&(Array.isArray(h)?h:[h]).forEach(d=>{const m=Ke(t,d);if(!m)return;const{transitionEnd:p,transition:x,...T}=m;for(const v in T){let g=T[v];if(Array.isArray(g)){const S=u?g.length-1:0;g=g[S]}g!==null&&(i[v]=g)}for(const v in p)i[v]=p[v]}),i}const F=t=>t,{schedule:D,cancel:Q,state:R,steps:Zt}=fs(typeof requestAnimationFrame<"u"?requestAnimationFrame:F,!0),xr={useVisualState:Cs({scrapeMotionValuesFromProps:ws,createRenderState:Ps,onMount:(t,e,{renderState:n,latestValues:s})=>{D.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),D.render(()=>{Ie(n,s,{enableHardwareAcceleration:!1},Ue(e.tagName),t.transformTemplate),Vs(e,n)})}})},Tr={useVisualState:Cs({scrapeMotionValuesFromProps:Ne,createRenderState:Oe})};function Pr(t,{forwardMotionProps:e=!1},n,s){return{...Fe(t)?xr:Tr,preloadedFeatures:n,useRender:mr(e),createVisualElement:s,Component:t}}function $(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Ms=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function zt(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const Sr=t=>e=>Ms(e)&&t(e,zt(e));function G(t,e,n,s){return $(t,e,Sr(n),s)}const br=(t,e)=>n=>e(t(n)),_=(...t)=>t.reduce(br);function Ds(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const cn=Ds("dragHorizontal"),hn=Ds("dragVertical");function Rs(t){let e=!1;if(t==="y")e=hn();else if(t==="x")e=cn();else{const n=cn(),s=hn();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function Es(){const t=Rs(!0);return t?(t(),!1):!0}class tt{constructor(e){this.isMounted=!1,this.node=e}update(){}}function fn(t,e){const n=e?"pointerenter":"pointerleave",s=e?"onHoverStart":"onHoverEnd",i=(o,r)=>{if(o.pointerType==="touch"||Es())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e);const l=a[s];l&&l(o,r)};return G(t.current,n,i,{passive:!t.getProps()[s]})}class Vr extends tt{mount(){this.unmount=_(fn(this.node,!0),fn(this.node,!1))}unmount(){}}class wr extends tt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!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=_($(this.node.current,"focus",()=>this.onFocus()),$(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Ls=(t,e)=>e?t===e?!0:Ls(t,e.parentElement):!1;function Qt(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,zt(n))}class Ar extends tt{constructor(){super(...arguments),this.removeStartListeners=F,this.removeEndListeners=F,this.removeAccessibleListeners=F,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const s=this.node.getProps(),o=G(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:h}=this.node.getProps();!h&&!Ls(this.node.current,a.target)?u&&u(a,l):c&&c(a,l)},{passive:!(s.onTap||s.onPointerUp)}),r=G(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(s.onTapCancel||s.onPointerCancel)});this.removeEndListeners=_(o,r),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=o=>{if(o.key!=="Enter"||this.isPressing)return;const r=a=>{a.key!=="Enter"||!this.checkPressEnd()||Qt("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&u(l,c)})};this.removeEndListeners(),this.removeEndListeners=$(this.node.current,"keyup",r),Qt("down",(a,l)=>{this.startPress(a,l)})},n=$(this.node.current,"keydown",e),s=()=>{this.isPressing&&Qt("cancel",(o,r)=>this.cancelPress(o,r))},i=$(this.node.current,"blur",s);this.removeAccessibleListeners=_(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:s,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),s&&s(e,n)}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Es()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:s}=this.node.getProps();s&&s(e,n)}mount(){const e=this.node.getProps(),n=G(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),s=$(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=_(n,s)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const fe=new WeakMap,Jt=new WeakMap,Cr=t=>{const e=fe.get(t.target);e&&e(t)},Mr=t=>{t.forEach(Cr)};function Dr({root:t,...e}){const n=t||document;Jt.has(n)||Jt.set(n,{});const s=Jt.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Mr,{root:t,...e})),s[i]}function Rr(t,e,n){const s=Dr(e);return fe.set(t,n),s.observe(t),()=>{fe.delete(t),s.unobserve(t)}}const Er={some:0,all:1};class Lr extends tt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:Er[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),f=c?u:h;f&&f(l)};return Rr(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Fr(e,n))&&this.startObserver()}unmount(){}}function Fr({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Br={inView:{Feature:Lr},tap:{Feature:Ar},focus:{Feature:wr},hover:{Feature:Vr}};function Fs(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function kr(t){const e={};return t.values.forEach((n,s)=>e[s]=n.get()),e}function jr(t){const e={};return t.values.forEach((n,s)=>e[s]=n.getVelocity()),e}function Ht(t,e,n){const s=t.getProps();return Ke(s,e,n!==void 0?n:s.custom,kr(t),jr(t))}const X=t=>t*1e3,z=t=>t/1e3,Or={type:"spring",stiffness:500,damping:25,restSpeed:10},Ir=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Ur={type:"keyframes",duration:.8},Nr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Kr=(t,{keyframes:e})=>e.length>2?Ur:at.has(t)?t.startsWith("scale")?Ir(e[1]):Or:Nr;function Wr({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function We(t,e){return t[e]||t.default||t}const $r=t=>t!==null;function Yt(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter($r),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return!o||s===void 0?i[o]:s}let Ft;function Gr(){Ft=void 0}const q={now:()=>(Ft===void 0&&q.set(R.isProcessing||Fi.useManualTiming?R.timestamp:performance.now()),Ft),set:t=>{Ft=t,queueMicrotask(Gr)}},Bs=t=>/^0[^.\s]+$/u.test(t);function _r(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Bs(t):!0}let ks=F;const js=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),zr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Hr(t){const e=zr.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Os(t,e,n=1){const[s,i]=Hr(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return js(r)?parseFloat(r):r}return Be(i)?Os(i,e,n+1):i}const Yr=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),dn=t=>t===mt||t===P,mn=(t,e)=>parseFloat(t.split(", ")[e]),pn=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return mn(i[1],e);{const o=s.match(/^matrix\((.+)\)$/u);return o?mn(o[1],t):0}},Xr=new Set(["x","y","z"]),qr=wt.filter(t=>!Xr.has(t));function Zr(t){const e=[];return qr.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const dt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:pn(4,13),y:pn(5,14)};dt.translateX=dt.x;dt.translateY=dt.y;const Is=t=>e=>e.test(t),Qr={test:t=>t==="auto",parse:t=>t},Us=[mt,P,K,H,nr,er,Qr],gn=t=>Us.find(Is(t)),ot=new Set;let de=!1,me=!1;function Ns(){if(me){const t=Array.from(ot).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Zr(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{var a;(a=s.getValue(o))===null||a===void 0||a.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}me=!1,de=!1,ot.forEach(t=>t.complete()),ot.clear()}function Ks(){ot.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(me=!0)})}function Jr(){Ks(),Ns()}class $e{constructor(e,n,s,i,o,r=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ot.add(this),de||(de=!0,D.read(Ks),D.resolveKeyframes(Ns))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;for(let o=0;o<e.length;o++)if(e[o]===null)if(o===0){const r=i==null?void 0:i.get(),a=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const l=s.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),i&&r===void 0&&i.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ot.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ot.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Ge=(t,e)=>n=>!!(At(n)&&tr.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Ws=(t,e,n)=>s=>{if(!At(s))return s;const[i,o,r,a]=s.match(ke);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},to=t=>Z(0,255,t),te={...mt,transform:t=>Math.round(to(t))},rt={test:Ge("rgb","red"),parse:Ws("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+te.transform(t)+", "+te.transform(e)+", "+te.transform(n)+", "+vt(yt.transform(s))+")"};function eo(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const pe={test:Ge("#"),parse:eo,transform:rt.transform},ct={test:Ge("hsl","hue"),parse:Ws("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+K.transform(vt(e))+", "+K.transform(vt(n))+", "+vt(yt.transform(s))+")"},E={test:t=>rt.test(t)||pe.test(t)||ct.test(t),parse:t=>rt.test(t)?rt.parse(t):ct.test(t)?ct.parse(t):pe.parse(t),transform:t=>At(t)?t:t.hasOwnProperty("red")?rt.transform(t):ct.transform(t)};function no(t){var e,n;return isNaN(t)&&At(t)&&(((e=t.match(ke))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(Ji))===null||n===void 0?void 0:n.length)||0)>0}const $s="number",Gs="color",so="var",io="var(",yn="${}",ro=/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 Ot(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(ro,l=>(E.test(l)?(s.color.push(o),i.push(Gs),n.push(E.parse(l))):l.startsWith(io)?(s.var.push(o),i.push(so),n.push(l)):(s.number.push(o),i.push($s),n.push(parseFloat(l))),++o,yn)).split(yn);return{values:n,split:a,indexes:s,types:i}}function _s(t){return Ot(t).values}function zs(t){const{split:e,types:n}=Ot(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===$s?o+=vt(i[r]):a===Gs?o+=E.transform(i[r]):o+=i[r]}return o}}const oo=t=>typeof t=="number"?0:t;function ao(t){const e=_s(t);return zs(t)(e.map(oo))}const J={test:no,parse:_s,createTransformer:zs,getAnimatableNone:ao},lo=new Set(["brightness","contrast","saturate","opacity"]);function uo(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(ke)||[];if(!s)return t;const i=n.replace(s,"");let o=lo.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const co=/\b([a-z-]*)\(.*?\)/gu,ge={...J,getAnimatableNone:t=>{const e=t.match(co);return e?e.map(uo).join(" "):t}},ho={...vs,color:E,backgroundColor:E,outlineColor:E,fill:E,stroke:E,borderColor:E,borderTopColor:E,borderRightColor:E,borderBottomColor:E,borderLeftColor:E,filter:ge,WebkitFilter:ge},_e=t=>ho[t];function Hs(t,e){let n=_e(t);return n!==ge&&(n=J),n.getAnimatableNone?n.getAnimatableNone(e):void 0}function fo(t,e,n){let s=0,i;for(;s<t.length&&!i;)typeof t[s]=="string"&&t[s]!=="none"&&t[s]!=="0"&&(i=t[s]),s++;if(i&&n)for(const o of e)t[o]=Hs(n,i)}class Ys extends $e{constructor(e,n,s,i){super(e,n,s,i,i==null?void 0:i.owner,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){const c=e[l];if(typeof c=="string"&&Be(c)){const u=Os(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(!Yr.has(s)||e.length!==2)return this.resolveNoneKeyframes();const[i,o]=e,r=gn(i),a=gn(o);if(r!==a)if(dn(r)&&dn(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)_r(e[i])&&s.push(i);s.length&&fo(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=dt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){var e;const{element:n,name:s,unresolvedKeyframes:i}=this;if(!n.current)return;const o=n.getValue(s);o&&o.jump(this.measuredOrigin,!1);const r=i.length-1,a=i[r];i[r]=dt[s](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function mo(t){let e;return()=>(e===void 0&&(e=t()),e)}const vn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(J.test(t)||t==="0")&&!t.startsWith("url("));function po(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function go(t,e,n,s){const i=t[0];if(i===null)return!1;const o=t[t.length-1],r=vn(i,e),a=vn(o,e);return!r||!a?!1:po(t)||n==="spring"&&s}class Xs{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Jr(),this._resolved}onKeyframesResolved(e,n){this.hasAttemptedResolve=!0;const{name:s,type:i,velocity:o,delay:r,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!go(e,s,i,o))if(r)this.options.duration=0;else{l==null||l(Yt(e,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const u=this.initPlayback(e,n);u!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}function qs(t,e){return e?t*(1e3/e):0}const yo=5;function Zs(t,e,n){const s=Math.max(e-yo,0);return qs(n-t(s),e-s)}const ee=.001,vo=.01,xo=10,To=.05,Po=1;function So({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,o,r=1-e;r=Z(To,Po,r),t=Z(vo,xo,z(t)),r<1?(i=c=>{const u=c*r,h=u*t,f=u-n,d=ye(c,r),m=Math.exp(-h);return ee-f/d*m},o=c=>{const h=c*r*t,f=h*n+n,d=Math.pow(r,2)*Math.pow(c,2)*t,m=Math.exp(-h),p=ye(Math.pow(c,2),r);return(-i(c)+ee>0?-1:1)*((f-d)*m)/p}):(i=c=>{const u=Math.exp(-c*t),h=(c-n)*t+1;return-ee+u*h},o=c=>{const u=Math.exp(-c*t),h=(n-c)*(t*t);return u*h});const a=5/t,l=Vo(i,o,a);if(t=X(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:r*2*Math.sqrt(s*c),duration:t}}}const bo=12;function Vo(t,e,n){let s=n;for(let i=1;i<bo;i++)s=s-t(s)/e(s);return s}function ye(t,e){return t*Math.sqrt(1-e*e)}const wo=["duration","bounce"],Ao=["stiffness","damping","mass"];function xn(t,e){return e.some(n=>t[n]!==void 0)}function Co(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!xn(t,Ao)&&xn(t,wo)){const n=So(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function Qs({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],o=t[t.length-1],r={done:!1,value:i},{stiffness:a,damping:l,mass:c,duration:u,velocity:h,isResolvedFromDuration:f}=Co({...s,velocity:-z(s.velocity||0)}),d=h||0,m=l/(2*Math.sqrt(a*c)),p=o-i,x=z(Math.sqrt(a/c)),T=Math.abs(p)<5;n||(n=T?.01:2),e||(e=T?.005:.5);let v;if(m<1){const g=ye(x,m);v=S=>{const V=Math.exp(-m*x*S);return o-V*((d+m*x*p)/g*Math.sin(g*S)+p*Math.cos(g*S))}}else if(m===1)v=g=>o-Math.exp(-x*g)*(p+(d+x*p)*g);else{const g=x*Math.sqrt(m*m-1);v=S=>{const V=Math.exp(-m*x*S),A=Math.min(g*S,300);return o-V*((d+m*x*p)*Math.sinh(A)+g*p*Math.cosh(A))/g}}return{calculatedDuration:f&&u||null,next:g=>{const S=v(g);if(f)r.done=g>=u;else{let V=d;g!==0&&(m<1?V=Zs(v,g,S):V=0);const A=Math.abs(V)<=n,N=Math.abs(o-S)<=e;r.done=A&&N}return r.value=r.done?o:S,r}}}function Tn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],f={done:!1,value:h},d=b=>a!==void 0&&b<a||l!==void 0&&b>l,m=b=>a===void 0?l:l===void 0||Math.abs(a-b)<Math.abs(l-b)?a:l;let p=n*e;const x=h+p,T=r===void 0?x:r(x);T!==x&&(p=T-h);const v=b=>-p*Math.exp(-b/s),g=b=>T+v(b),S=b=>{const M=v(b),B=g(b);f.done=Math.abs(M)<=c,f.value=f.done?T:B};let V,A;const N=b=>{d(f.value)&&(V=b,A=Qs({keyframes:[f.value,m(f.value)],velocity:Zs(g,b,f.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return N(0),{calculatedDuration:null,next:b=>{let M=!1;return!A&&V===void 0&&(M=!0,S(b),N(b)),V!==void 0&&b>=V?A.next(b-V):(!M&&S(b),f)}}}const Js=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Mo=1e-7,Do=12;function Ro(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=Js(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Mo&&++a<Do);return r}function Mt(t,e,n,s){if(t===e&&n===s)return F;const i=o=>Ro(o,0,1,t,n);return o=>o===0||o===1?o:Js(i(o),e,s)}const Eo=Mt(.42,0,1,1),Lo=Mt(0,0,.58,1),ti=Mt(.42,0,.58,1),Fo=t=>Array.isArray(t)&&typeof t[0]!="number",ei=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ni=t=>e=>1-t(1-e),ze=t=>1-Math.sin(Math.acos(t)),si=ni(ze),Bo=ei(ze),ii=Mt(.33,1.53,.69,.99),He=ni(ii),ko=ei(He),jo=t=>(t*=2)<1?.5*He(t):.5*(2-Math.pow(2,-10*(t-1))),Oo={linear:F,easeIn:Eo,easeInOut:ti,easeOut:Lo,circIn:ze,circInOut:Bo,circOut:si,backIn:He,backInOut:ko,backOut:ii,anticipate:jo},Pn=t=>{if(Array.isArray(t)){ks(t.length===4);const[e,n,s,i]=t;return Mt(e,n,s,i)}else if(typeof t=="string")return Oo[t];return t},bt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},w=(t,e,n)=>t+(e-t)*n;function ne(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Io({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=ne(l,a,t+1/3),o=ne(l,a,t),r=ne(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}const se=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Uo=[pe,rt,ct],No=t=>Uo.find(e=>e.test(t));function Sn(t){const e=No(t);let n=e.parse(t);return e===ct&&(n=Io(n)),n}const bn=(t,e)=>{const n=Sn(t),s=Sn(e),i={...n};return o=>(i.red=se(n.red,s.red,o),i.green=se(n.green,s.green,o),i.blue=se(n.blue,s.blue,o),i.alpha=w(n.alpha,s.alpha,o),rt.transform(i))};function ve(t,e){return n=>n>0?e:t}function Ko(t,e){return n=>w(t,e,n)}function Ye(t){return typeof t=="number"?Ko:typeof t=="string"?Be(t)?ve:E.test(t)?bn:Go:Array.isArray(t)?ri:typeof t=="object"?E.test(t)?bn:Wo:ve}function ri(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>Ye(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function Wo(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=Ye(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function $o(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const r=e.types[o],a=t.indexes[r][i[r]],l=(n=t.values[a])!==null&&n!==void 0?n:0;s[o]=l,i[r]++}return s}const Go=(t,e)=>{const n=J.createTransformer(e),s=Ot(t),i=Ot(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?_(ri($o(s,i),i.values),n):ve(t,e)};function oi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?w(t,e,n):Ye(t)(t,e)}function _o(t,e,n){const s=[],i=n||oi,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||F:e;a=_(l,a)}s.push(a)}return s}function zo(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(ks(o===e.length),o===1)return()=>e[0];if(o===2&&t[0]===t[1])return()=>e[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=_o(e,s,i),a=r.length,l=c=>{let u=0;if(a>1)for(;u<t.length-2&&!(c<t[u+1]);u++);const h=bt(t[u],t[u+1],c);return r[u](h)};return n?c=>l(Z(t[0],t[o-1],c)):l}function Ho(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=bt(0,e,s);t.push(w(n,1,i))}}function Yo(t){const e=[0];return Ho(e,t.length-1),e}function Xo(t,e){return t.map(n=>n*e)}function qo(t,e){return t.map(()=>e||ti).splice(0,t.length-1)}function It({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Fo(s)?s.map(Pn):Pn(s),o={done:!1,value:e[0]},r=Xo(n&&n.length===e.length?n:Yo(e),t),a=zo(r,e,{ease:Array.isArray(i)?i:qo(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const Vn=2e4;function Zo(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Vn;)e+=n,s=t.next(e);return e>=Vn?1/0:e}const Qo=t=>{const e=({timestamp:n})=>t(n);return{start:()=>D.update(e,!0),stop:()=>Q(e),now:()=>R.isProcessing?R.timestamp:q.now()}},Jo={decay:Tn,inertia:Tn,tween:It,keyframes:It,spring:Qs},ta=t=>t/100;class Xe extends Xs{constructor({KeyframeResolver:e=$e,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:s,motionValue:i,keyframes:o}=this.options,r=(a,l)=>this.onKeyframesResolved(a,l);s&&i&&i.owner?this.resolver=i.owner.resolveKeyframes(o,r,s,i):this.resolver=new e(o,r,s,i),this.resolver.scheduleResolve()}initPlayback(e){const{type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=this.options,a=Jo[n]||It;let l,c;a!==It&&typeof e[0]!="number"&&(l=_(ta,oi(e[0],e[1])),e=[0,100]);const u=a({...this.options,keyframes:e});o==="mirror"&&(c=a({...this.options,keyframes:[...e].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=Zo(u));const{calculatedDuration:h}=u,f=h+i,d=f*(s+1)-i;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:h,resolvedDuration:f,totalDuration:d}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:s}=this;if(!s){const{keyframes:b}=this.options;return{done:!0,value:b[b.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:r,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:h}=s;if(this.startTime===null)return o.next(0);const{delay:f,repeat:d,repeatType:m,repeatDelay:p,onUpdate:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const T=this.currentTime-f*(this.speed>=0?1:-1),v=this.speed>=0?T<0:T>u;this.currentTime=Math.max(T,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let g=this.currentTime,S=o;if(d){const b=Math.min(this.currentTime,u)/h;let M=Math.floor(b),B=b%1;!B&&b>=1&&(B=1),B===1&&M--,M=Math.min(M,d+1),!!(M%2)&&(m==="reverse"?(B=1-B,p&&(B-=p/h)):m==="mirror"&&(S=r)),g=Z(0,1,B)*h}const V=v?{done:!1,value:l[0]}:S.next(g);a&&(V.value=a(V.value));let{done:A}=V;!v&&c!==null&&(A=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return N&&i!==void 0&&(V.value=Yt(l,this.options,i)),x&&x(V.value),N&&this.finish(),V}get duration(){const{resolved:e}=this;return e?z(e.calculatedDuration):0}get time(){return z(this.currentTime)}set time(e){e=X(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=z(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=Qo,onPlay:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=s),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}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(e){return this.startTime=0,this.tick(e,!0)}}const ai=t=>Array.isArray(t)&&typeof t[0]=="number";function li(t){return!!(!t||typeof t=="string"&&t in qe||ai(t)||Array.isArray(t)&&t.every(li))}const gt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,qe={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:gt([0,.65,.55,1]),circOut:gt([.55,0,1,.45]),backIn:gt([.31,.01,.66,-.59]),backOut:gt([.33,1.53,.69,.99])};function ea(t){return ui(t)||qe.easeOut}function ui(t){if(t)return ai(t)?gt(t):Array.isArray(t)?t.map(ea):qe[t]}function na(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=ui(a);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:s,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"})}const sa=mo(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ia=new Set(["opacity","clipPath","filter","transform"]),Ut=10,ra=2e4;function oa(t){return t.type==="spring"||t.name==="backgroundColor"||!li(t.ease)}function aa(t,e){const n=new Xe({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let o=0;for(;!s.done&&o<ra;)s=n.sample(o),i.push(s.value),o+=Ut;return{times:void 0,keyframes:i,duration:o-Ut,ease:"linear"}}class wn extends Xs{constructor(e){super(e);const{name:n,motionValue:s,keyframes:i}=this.options;this.resolver=new Ys(i,(o,r)=>this.onKeyframesResolved(o,r),n,s),this.resolver.scheduleResolve()}initPlayback(e,n){var s;let{duration:i=300,times:o,ease:r,type:a,motionValue:l,name:c}=this.options;if(!(!((s=l.owner)===null||s===void 0)&&s.current))return!1;if(oa(this.options)){const{onComplete:h,onUpdate:f,motionValue:d,...m}=this.options,p=aa(e,m);e=p.keyframes,e.length===1&&(e[1]=e[0]),i=p.duration,o=p.times,r=p.ease,a="keyframes"}const u=na(l.owner.current,c,e,{...this.options,duration:i,times:o,ease:r});return u.startTime=q.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:h}=this.options;l.set(Yt(e,this.options,n)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:i,times:o,type:a,ease:r,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return z(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return z(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=X(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return F;const{animation:s}=n;s.timeline=e,s.onfinish=null}return F}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:s,duration:i,type:o,ease:r,times:a}=e;if(!(n.playState==="idle"||n.playState==="finished")){if(this.time){const{motionValue:l,onUpdate:c,onComplete:u,...h}=this.options,f=new Xe({...h,keyframes:s,duration:i,type:o,ease:r,times:a,isGenerator:!0}),d=X(this.time);l.setWithVelocity(f.sample(d-Ut).value,f.sample(d).value,Ut)}this.cancel()}}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:s,repeatDelay:i,repeatType:o,damping:r,type:a}=e;return sa()&&s&&ia.has(s)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&o!=="mirror"&&r!==0&&a!=="inertia"}}const Ze=(t,e,n,s={},i,o)=>r=>{const a=We(s,t)||{},l=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-X(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};Wr(a)||(u={...u,...Kr(t,u)}),u.duration&&(u.duration=X(u.duration)),u.repeatDelay&&(u.repeatDelay=X(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(h=!0)),h&&!o&&e.get()!==void 0){const f=Yt(u.keyframes,a);if(f!==void 0){D.update(()=>{u.onUpdate(f),u.onComplete()});return}}return!o&&wn.supports(u)?new wn(u):new Xe(u)};function Nt(t){return!!(L(t)&&t.add)}function Qe(t,e){t.indexOf(e)===-1&&t.push(e)}function Je(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class tn{constructor(){this.subscriptions=[]}add(e){return Qe(this.subscriptions,e),()=>Je(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const An=30,la=t=>!isNaN(parseFloat(t));class ua{constructor(e,n={}){this.version="11.1.7",this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(s,i=!0)=>{const o=q.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.canTrackVelocity=la(this.current),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=q.now()}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new tn);const s=this.events[e].add(n);return e==="change"?()=>{s(),D.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=q.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>An)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,An);return qs(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Vt(t,e){return new ua(t,e)}function ca(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Vt(n))}function ha(t,e){const n=Ht(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=gr(o[r]);ca(t,r,a)}}function fa({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function ci(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var o;let{transition:r=t.getDefaultTransition(),transitionEnd:a,...l}=e;const c=t.getValue("willChange");s&&(r=s);const u=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const f in l){const d=t.getValue(f,(o=t.latestValues[f])!==null&&o!==void 0?o:null),m=l[f];if(m===void 0||h&&fa(h,f))continue;const p={delay:n,elapsed:0,...We(r||{},f)};let x=!1;if(window.HandoffAppearAnimations){const g=t.getProps()[hs];if(g){const S=window.HandoffAppearAnimations(g,f);S!==null&&(p.elapsed=S,x=!0)}}d.start(Ze(f,d,m,t.shouldReduceMotion&&at.has(f)?{type:!1}:p,t,x));const T=d.animation;T&&(Nt(c)&&(c.add(f),T.then(()=>c.remove(f))),u.push(T))}return a&&Promise.all(u).then(()=>{D.update(()=>{a&&ha(t,a)})}),u}function xe(t,e,n={}){var s;const i=Ht(t,e,n.type==="exit"?(s=t.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const r=i?()=>Promise.all(ci(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:h,staggerDirection:f}=o;return da(t,e,u+c,h,f,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[c,u]=l==="beforeChildren"?[r,a]:[a,r];return c().then(()=>u())}else return Promise.all([r(),a(n.delay)])}function da(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,l=i===1?(c=0)=>c*s:(c=0)=>a-c*s;return Array.from(t.variantChildren).sort(ma).forEach((c,u)=>{c.notify("AnimationStart",e),r.push(xe(c,e,{...o,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(r)}function ma(t,e){return t.sortNodePosition(e)}function pa(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>xe(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=xe(t,e,n);else{const i=typeof e=="function"?Ht(t,e,n.custom):e;s=Promise.all(ci(t,i,n))}return s.then(()=>{D.postRender(()=>{t.notify("AnimationComplete",e)})})}const ga=[...Re].reverse(),ya=Re.length;function va(t){return e=>Promise.all(e.map(({animation:n,options:s})=>pa(t,n,s)))}function xa(t){let e=va(t);const n=Pa();let s=!0;const i=l=>(c,u)=>{var h;const f=Ht(t,u,l==="exit"?(h=t.presenceContext)===null||h===void 0?void 0:h.custom:void 0);if(f){const{transition:d,transitionEnd:m,...p}=f;c={...c,...p,...m}}return c};function o(l){e=l(t)}function r(l){const c=t.getProps(),u=t.getVariantContext(!0)||{},h=[],f=new Set;let d={},m=1/0;for(let x=0;x<ya;x++){const T=ga[x],v=n[T],g=c[T]!==void 0?c[T]:u[T],S=Pt(g),V=T===l?v.isActive:null;V===!1&&(m=x);let A=g===u[T]&&g!==c[T]&&S;if(A&&s&&t.manuallyAnimateOnMount&&(A=!1),v.protectedKeys={...d},!v.isActive&&V===null||!g&&!v.prevProp||Gt(g)||typeof g=="boolean")continue;let b=Ta(v.prevProp,g)||T===l&&v.isActive&&!A&&S||x>m&&S,M=!1;const B=Array.isArray(g)?g:[g];let lt=B.reduce(i(T),{});V===!1&&(lt={});const{prevResolvedValues:en={}}=v,Ei={...en,...lt},nn=k=>{b=!0,f.has(k)&&(M=!0,f.delete(k)),v.needsAnimating[k]=!0;const W=t.getValue(k);W&&(W.liveStyle=!1)};for(const k in Ei){const W=lt[k],Xt=en[k];if(d.hasOwnProperty(k))continue;let qt=!1;he(W)&&he(Xt)?qt=!Fs(W,Xt):qt=W!==Xt,qt?W!=null?nn(k):f.add(k):W!==void 0&&f.has(k)?nn(k):v.protectedKeys[k]=!0}v.prevProp=g,v.prevResolvedValues=lt,v.isActive&&(d={...d,...lt}),s&&t.blockInitialAnimation&&(b=!1),b&&(!A||M)&&h.push(...B.map(k=>({animation:k,options:{type:T}})))}if(f.size){const x={};f.forEach(T=>{const v=t.getBaseTarget(T),g=t.getValue(T);g&&(g.liveStyle=!0),x[T]=v??null}),h.push({animation:x})}let p=!!h.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(p=!1),s=!1,p?e(h):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(f=>{var d;return(d=f.animationState)===null||d===void 0?void 0:d.setActive(l,c)}),n[l].isActive=c;const h=r(l);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n}}function Ta(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Fs(e,t):!1}function et(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Pa(){return{animate:et(!0),whileInView:et(),whileHover:et(),whileTap:et(),whileDrag:et(),whileFocus:et(),exit:et()}}class Sa extends tt{constructor(e){super(e),e.animationState||(e.animationState=xa(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),Gt(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let ba=0;class Va extends tt{constructor(){super(...arguments),this.id=ba++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const wa={animation:{Feature:Sa},exit:{Feature:Va}},Cn=(t,e)=>Math.abs(t-e);function Aa(t,e){const n=Cn(t.x,e.x),s=Cn(t.y,e.y);return Math.sqrt(n**2+s**2)}class hi{constructor(e,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=re(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,d=Aa(h.offset,{x:0,y:0})>=3;if(!f&&!d)return;const{point:m}=h,{timestamp:p}=R;this.history.push({...m,timestamp:p});const{onStart:x,onMove:T}=this.handlers;f||(x&&x(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),T&&T(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=ie(f,this.transformPagePoint),D.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:d,onSessionEnd:m,resumeAnimation:p}=this.handlers;if(this.dragSnapToOrigin&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=re(h.type==="pointercancel"?this.lastMoveEventInfo:ie(f,this.transformPagePoint),this.history);this.startEvent&&d&&d(h,x),m&&m(h,x)},!Ms(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const r=zt(e),a=ie(r,this.transformPagePoint),{point:l}=a,{timestamp:c}=R;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,re(a,this.history)),this.removeListeners=_(G(this.contextWindow,"pointermove",this.handlePointerMove),G(this.contextWindow,"pointerup",this.handlePointerUp),G(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Q(this.updatePoint)}}function ie(t,e){return e?{point:e(t.point)}:t}function Mn(t,e){return{x:t.x-e.x,y:t.y-e.y}}function re({point:t},e){return{point:t,delta:Mn(t,fi(e)),offset:Mn(t,Ca(e)),velocity:Ma(e,.1)}}function Ca(t){return t[0]}function fi(t){return t[t.length-1]}function Ma(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=fi(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>X(e)));)n--;if(!s)return{x:0,y:0};const o=z(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function O(t){return t.max-t.min}function Te(t,e=0,n=.01){return Math.abs(t-e)<=n}function Dn(t,e,n,s=.5){t.origin=s,t.originPoint=w(e.min,e.max,t.origin),t.scale=O(n)/O(e),(Te(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=w(n.min,n.max,t.origin)-t.originPoint,(Te(t.translate)||isNaN(t.translate))&&(t.translate=0)}function xt(t,e,n,s){Dn(t.x,e.x,n.x,s?s.originX:void 0),Dn(t.y,e.y,n.y,s?s.originY:void 0)}function Rn(t,e,n){t.min=n.min+e.min,t.max=t.min+O(e)}function Da(t,e,n){Rn(t.x,e.x,n.x),Rn(t.y,e.y,n.y)}function En(t,e,n){t.min=e.min-n.min,t.max=t.min+O(e)}function Tt(t,e,n){En(t.x,e.x,n.x),En(t.y,e.y,n.y)}function Ra(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?w(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?w(n,t,s.max):Math.min(t,n)),t}function Ln(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Ea(t,{top:e,left:n,bottom:s,right:i}){return{x:Ln(t.x,n,i),y:Ln(t.y,e,s)}}function Fn(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function La(t,e){return{x:Fn(t.x,e.x),y:Fn(t.y,e.y)}}function Fa(t,e){let n=.5;const s=O(t),i=O(e);return i>s?n=bt(e.min,e.max-s,t.min):s>i&&(n=bt(t.min,t.max-i,e.min)),Z(0,1,n)}function Ba(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Pe=.35;function ka(t=Pe){return t===!1?t=0:t===!0&&(t=Pe),{x:Bn(t,"left","right"),y:Bn(t,"top","bottom")}}function Bn(t,e,n){return{min:kn(t,e),max:kn(t,n)}}function kn(t,e){return typeof t=="number"?t:t[e]||0}const jn=()=>({translate:0,scale:1,origin:0,originPoint:0}),ht=()=>({x:jn(),y:jn()}),On=()=>({min:0,max:0}),C=()=>({x:On(),y:On()});function U(t){return[t("x"),t("y")]}function di({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function ja({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Oa(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function oe(t){return t===void 0||t===1}function Se({scale:t,scaleX:e,scaleY:n}){return!oe(t)||!oe(e)||!oe(n)}function nt(t){return Se(t)||mi(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function mi(t){return In(t.x)||In(t.y)}function In(t){return t&&t!=="0%"}function Kt(t,e,n){const s=t-n,i=e*s;return n+i}function Un(t,e,n,s,i){return i!==void 0&&(t=Kt(t,i,s)),Kt(t,n,s)+e}function be(t,e=0,n=1,s,i){t.min=Un(t.min,e,n,s,i),t.max=Un(t.max,e,n,s,i)}function pi(t,{x:e,y:n}){be(t.x,e.translate,e.scale,e.originPoint),be(t.y,n.translate,n.scale,n.originPoint)}function Ia(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const l=o.instance;l&&l.style&&l.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&ft(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,pi(t,r)),s&&nt(o.latestValues)&&ft(t,o.latestValues))}e.x=Nn(e.x),e.y=Nn(e.y)}function Nn(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function Y(t,e){t.min=t.min+e,t.max=t.max+e}function Kn(t,e,[n,s,i]){const o=e[i]!==void 0?e[i]:.5,r=w(t.min,t.max,o);be(t,e[n],e[s],r,e.scale)}const Ua=["x","scaleX","originX"],Na=["y","scaleY","originY"];function ft(t,e){Kn(t.x,e,Ua),Kn(t.y,e,Na)}function gi(t,e){return di(Oa(t.getBoundingClientRect(),e))}function Ka(t,e,n){const s=gi(t,n),{scroll:i}=e;return i&&(Y(s.x,i.offset.x),Y(s.y,i.offset.y)),s}const yi=({current:t})=>t?t.ownerDocument.defaultView:null,Wa=new WeakMap;class $a{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=C(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=u=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(zt(u,"page").point)},o=(u,h)=>{const{drag:f,dragPropagation:d,onDragStart:m}=this.getProps();if(f&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Rs(f),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),U(x=>{let T=this.getAxisMotionValue(x).get()||0;if(K.test(T)){const{projection:v}=this.visualElement;if(v&&v.layout){const g=v.layout.layoutBox[x];g&&(T=O(g)*(parseFloat(T)/100))}}this.originPoint[x]=T}),m&&m(u,h);const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},r=(u,h)=>{const{dragPropagation:f,dragDirectionLock:d,onDirectionLock:m,onDrag:p}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:x}=h;if(d&&this.currentDirection===null){this.currentDirection=Ga(x),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",h.point,x),this.updateAxis("y",h.point,x),this.visualElement.render(),p&&p(u,h)},a=(u,h)=>this.stop(u,h),l=()=>U(u=>{var h;return this.getAnimationState(u)==="paused"&&((h=this.getAxisMotionValue(u).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new hi(e,{onSessionStart:i,onStart:o,onMove:r,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:yi(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&o(e,n)}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Et(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=Ra(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,o=this.constraints;n&&ut(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=Ea(i.layoutBox,n):this.constraints=!1,this.elastic=ka(s),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&U(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=Ba(i.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!ut(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Ka(s,i.root,this.visualElement.getTransformPagePoint());let r=La(i.layout.layoutBox,o);if(n){const a=n(ja(r));this.hasMutatedConstraints=!!a,a&&(r=di(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=U(u=>{if(!Et(u,n,this.currentDirection))return;let h=l&&l[u]||{};r&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,m={type:"inertia",velocity:s?e[u]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return s.start(Ze(e,s,0,n,this.visualElement))}stopAnimation(){U(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){U(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){U(n=>{const{drag:s}=this.getProps();if(!Et(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(e[n]-w(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!ut(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};U(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=Fa({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),U(r=>{if(!Et(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];a.set(w(l,c,i[r]))})}addListeners(){if(!this.visualElement.current)return;Wa.set(this.visualElement,this);const e=this.visualElement.current,n=G(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();ut(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),s();const r=$(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(U(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=l[u].translate,h.set(h.get()+l[u].translate))}),this.visualElement.render())});return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Pe,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Et(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Ga(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class _a extends tt{constructor(e){super(e),this.removeGroupControls=F,this.removeListeners=F,this.controls=new $a(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||F}unmount(){this.removeGroupControls(),this.removeListeners()}}const Wn=t=>(e,n)=>{t&&t(e,n)};class za extends tt{constructor(){super(...arguments),this.removePointerDownListener=F}onPointerDown(e){this.session=new hi(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:yi(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Wn(e),onStart:Wn(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&i(o,r)}}}mount(){this.removePointerDownListener=G(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function Ha(){const t=y.useContext($t);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,i=y.useId();return y.useEffect(()=>s(i),[]),!e&&n?[!1,()=>n&&n(i)]:[!0]}const Bt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function $n(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const pt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(P.test(t))t=parseFloat(t);else return t;const n=$n(t,e.target.x),s=$n(t,e.target.y);return`${n}% ${s}%`}},Ya={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=J.parse(t);if(i.length>5)return s;const o=J.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const c=w(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=c),typeof i[3+r]=="number"&&(i[3+r]/=c),o(i)}};class Xa extends y.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;zi(qa),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Bt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,r=s.projection;return r&&(r.isPresent=o,i||e.layoutDependency!==n||n===void 0?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||D.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),De.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function vi(t){const[e,n]=Ha(),s=y.useContext(Le);return j.jsx(Xa,{...t,layoutGroup:s,switchLayoutGroup:y.useContext(ms),isPresent:e,safeToRemove:n})}const qa={borderRadius:{...pt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:pt,borderTopRightRadius:pt,borderBottomLeftRadius:pt,borderBottomRightRadius:pt,boxShadow:Ya},xi=["TopLeft","TopRight","BottomLeft","BottomRight"],Za=xi.length,Gn=t=>typeof t=="string"?parseFloat(t):t,_n=t=>typeof t=="number"||P.test(t);function Qa(t,e,n,s,i,o){i?(t.opacity=w(0,n.opacity!==void 0?n.opacity:1,Ja(s)),t.opacityExit=w(e.opacity!==void 0?e.opacity:1,0,tl(s))):o&&(t.opacity=w(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let r=0;r<Za;r++){const a=`border${xi[r]}Radius`;let l=zn(e,a),c=zn(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||_n(l)===_n(c)?(t[a]=Math.max(w(Gn(l),Gn(c),s),0),(K.test(c)||K.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=w(e.rotate||0,n.rotate||0,s))}function zn(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Ja=Ti(0,.5,si),tl=Ti(.5,.95,F);function Ti(t,e,n){return s=>s<t?0:s>e?1:n(bt(t,e,s))}function Hn(t,e){t.min=e.min,t.max=e.max}function I(t,e){Hn(t.x,e.x),Hn(t.y,e.y)}function Yn(t,e,n,s,i){return t-=e,t=Kt(t,1/n,s),i!==void 0&&(t=Kt(t,1/i,s)),t}function el(t,e=0,n=1,s=.5,i,o=t,r=t){if(K.test(e)&&(e=parseFloat(e),e=w(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=w(o.min,o.max,s);t===o&&(a-=e),t.min=Yn(t.min,e,n,a,i),t.max=Yn(t.max,e,n,a,i)}function Xn(t,e,[n,s,i],o,r){el(t,e[n],e[s],e[i],e.scale,o,r)}const nl=["x","scaleX","originX"],sl=["y","scaleY","originY"];function qn(t,e,n,s){Xn(t.x,e,nl,n?n.x:void 0,s?s.x:void 0),Xn(t.y,e,sl,n?n.y:void 0,s?s.y:void 0)}function Zn(t){return t.translate===0&&t.scale===1}function Pi(t){return Zn(t.x)&&Zn(t.y)}function il(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function Si(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function Qn(t){return O(t.x)/O(t.y)}class rl{constructor(){this.members=[]}add(e){Qe(this.members,e),e.scheduleRender()}remove(e){if(Je(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Jn(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=(n==null?void 0:n.z)||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:h,rotateY:f,skewX:d,skewY:m}=n;c&&(s=`perspective(${c}px) ${s}`),u&&(s+=`rotate(${u}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),d&&(s+=`skewX(${d}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const ol=(t,e)=>t.depth-e.depth;class al{constructor(){this.children=[],this.isDirty=!1}add(e){Qe(this.children,e),this.isDirty=!0}remove(e){Je(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ol),this.isDirty=!1,this.children.forEach(e)}}function ll(t,e){const n=q.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(Q(s),t(o-e))};return D.read(s,!0),()=>Q(s)}function ul(t){window.MotionDebug&&window.MotionDebug.record(t)}function cl(t){return t instanceof SVGElement&&t.tagName!=="svg"}function hl(t,e,n){const s=L(t)?t:Vt(t);return s.start(Ze("",s,e,n)),s.animation}const ae=["","X","Y","Z"],fl={visibility:"hidden"},ts=1e3;let dl=0;const st={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function le(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function bi({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e==null?void 0:e()){this.id=dl++,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.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,st.totalNodes=st.resolvedTargetDeltas=st.recalculatedProjection=0,this.nodes.forEach(gl),this.nodes.forEach(Pl),this.nodes.forEach(Sl),this.nodes.forEach(yl),ul(st)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new al)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new tn),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=cl(r),this.instance=r;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),t){let h;const f=()=>this.root.updateBlockedByResize=!1;t(r,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=ll(f,250),Bt.hasAnimatedSinceResize&&(Bt.hasAnimatedSinceResize=!1,this.nodes.forEach(ns))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeTargetChanged:d,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||Cl,{onLayoutAnimationStart:x,onLayoutAnimationComplete:T}=u.getProps(),v=!this.targetLayout||!Si(this.targetLayout,m)||d,g=!f&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||f&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,g);const S={...We(p,"layout"),onPlay:x,onComplete:T};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else f||ns(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Q(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(bl),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(es);return}this.isUpdating||this.nodes.forEach(xl),this.isUpdating=!1,window.HandoffCancelAllAnimations&&window.HandoffCancelAllAnimations(),this.nodes.forEach(Tl),this.nodes.forEach(ml),this.nodes.forEach(pl),this.clearAllSnapshots();const a=q.now();R.delta=Z(0,1e3/60,a-R.timestamp),R.timestamp=a,R.isProcessing=!0,Zt.update.process(R),Zt.preRender.process(R),Zt.render.process(R),R.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,De.read(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(vl),this.sharedNodes.forEach(Vl)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,D.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){D.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 l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=C(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:r,isRoot:s(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform,a=this.projectionDelta&&!Pi(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&(a||nt(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),Ml(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return C();const a=r.measureViewportBox(),{scroll:l}=this.root;return l&&(Y(a.x,l.offset.x),Y(a.y,l.offset.y)),a}removeElementScroll(r){const a=C();I(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:h}=c;if(c!==this.root&&u&&h.layoutScroll){if(u.isRoot){I(a,r);const{scroll:f}=this.root;f&&(Y(a.x,-f.offset.x),Y(a.y,-f.offset.y))}Y(a.x,u.offset.x),Y(a.y,u.offset.y)}}return a}applyTransform(r,a=!1){const l=C();I(l,r);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&ft(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),nt(u.latestValues)&&ft(l,u.latestValues)}return nt(this.latestValues)&&ft(l,this.latestValues),l}removeTransform(r){const a=C();I(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!nt(c.latestValues))continue;Se(c.latestValues)&&c.updateSnapshot();const u=C(),h=c.measurePageBox();I(u,h),qn(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return nt(this.latestValues)&&qn(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.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!==R.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(r||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:h,layoutId:f}=this.options;if(!(!this.layout||!(h||f))){if(this.resolvedRelativeTargetAt=R.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=C(),this.relativeTargetOrigin=C(),Tt(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),I(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=C(),this.targetWithTransforms=C()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Da(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):I(this.target,this.layout.layoutBox),pi(this.target,this.targetDelta)):I(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=C(),this.relativeTargetOrigin=C(),Tt(this.relativeTargetOrigin,this.target,d.target),I(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}st.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Se(this.parent.latestValues)||mi(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 r;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((r=this.parent)===null||r===void 0)&&r.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===R.timestamp&&(c=!1),c)return;const{layout:u,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||h))return;I(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;Ia(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=C());const{target:m}=a;if(!m){this.projectionTransform&&(this.projectionDelta=ht(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=ht(),this.projectionDeltaWithTransform=ht());const p=this.projectionTransform;xt(this.projectionDelta,this.layoutCorrected,m,this.latestValues),this.projectionTransform=Jn(this.projectionDelta,this.treeScale),(this.projectionTransform!==p||this.treeScale.x!==f||this.treeScale.y!==d)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),st.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(r,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},h=ht();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=C(),d=l?l.source:void 0,m=this.layout?this.layout.source:void 0,p=d!==m,x=this.getStack(),T=!x||x.members.length<=1,v=!!(p&&!T&&this.options.crossfade===!0&&!this.path.some(Al));this.animationProgress=0;let g;this.mixTargetDelta=S=>{const V=S/1e3;ss(h.x,r.x,V),ss(h.y,r.y,V),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Tt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),wl(this.relativeTarget,this.relativeTargetOrigin,f,V),g&&il(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=C()),I(g,this.relativeTarget)),p&&(this.animationValues=u,Qa(u,c,this.latestValues,V,v,T)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=V},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Q(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=D.update(()=>{Bt.hasAnimatedSinceResize=!0,this.currentAnimation=hl(0,ts,{...r,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onComplete:()=>{r.onComplete&&r.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 r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ts),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=r;if(!(!a||!l||!c)){if(this!==r&&this.layout&&c&&Vi(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||C();const h=O(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+h;const f=O(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}I(a,l),ft(a,u),xt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new rl),this.sharedNodes.get(r).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var r;const{layoutId:a}=this.options;return a?((r=this.getStack())===null||r===void 0?void 0:r.lead)||this:this}getPrevLead(){var r;const{layoutId:a}=this.options;return a?(r=this.getStack())===null||r===void 0?void 0:r.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&le("z",r,c,this.animationValues);for(let u=0;u<ae.length;u++)le(`rotate${ae[u]}`,r,c,this.animationValues),le(`skew${ae[u]}`,r,c,this.animationValues);r.render();for(const u in c)r.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);r.scheduleRender()}getProjectionStyles(r){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return fl;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Lt(r==null?void 0:r.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const p={};return this.options.layoutId&&(p.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,p.pointerEvents=Lt(r==null?void 0:r.pointerEvents)||""),this.hasProjected&&!nt(this.latestValues)&&(p.transform=u?u({},""):"none",this.hasProjected=!1),p}const f=h.animationValues||h.latestValues;this.applyTransformsToTarget(),c.transform=Jn(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:d,y:m}=this.projectionDelta;c.transformOrigin=`${d.origin*100}% ${m.origin*100}% 0`,h.animationValues?c.opacity=h===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=h===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const p in kt){if(f[p]===void 0)continue;const{correct:x,applyTo:T}=kt[p],v=c.transform==="none"?f[p]:x(f[p],h);if(T){const g=T.length;for(let S=0;S<g;S++)c[T[S]]=v}else c[p]=v}return this.options.layoutId&&(c.pointerEvents=h===this?Lt(r==null?void 0:r.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var a;return(a=r.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(es),this.root.sharedNodes.clear()}}}function ml(t){t.updateLayout()}function pl(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:o}=t.options,r=n.source!==t.layout.source;o==="size"?U(h=>{const f=r?n.measuredBox[h]:n.layoutBox[h],d=O(f);f.min=s[h].min,f.max=f.min+d}):Vi(o,n.layoutBox,s)&&U(h=>{const f=r?n.measuredBox[h]:n.layoutBox[h],d=O(s[h]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+d)});const a=ht();xt(a,s,n.layoutBox);const l=ht();r?xt(l,t.applyTransform(i,!0),n.measuredBox):xt(l,s,n.layoutBox);const c=!Pi(a);let u=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const m=C();Tt(m,n.layoutBox,f.layoutBox);const p=C();Tt(p,s,d.layoutBox),Si(m,p)||(u=!0),h.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=m,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function gl(t){st.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function yl(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function vl(t){t.clearSnapshot()}function es(t){t.clearMeasurements()}function xl(t){t.isLayoutDirty=!1}function Tl(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ns(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Pl(t){t.resolveTargetDelta()}function Sl(t){t.calcProjection()}function bl(t){t.resetSkewAndRotation()}function Vl(t){t.removeLeadSnapshot()}function ss(t,e,n){t.translate=w(e.translate,0,n),t.scale=w(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function is(t,e,n,s){t.min=w(e.min,n.min,s),t.max=w(e.max,n.max,s)}function wl(t,e,n,s){is(t.x,e.x,n.x,s),is(t.y,e.y,n.y,s)}function Al(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Cl={duration:.45,ease:[.4,0,.1,1]},rs=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),os=rs("applewebkit/")&&!rs("chrome/")?Math.round:F;function as(t){t.min=os(t.min),t.max=os(t.max)}function Ml(t){as(t.x),as(t.y)}function Vi(t,e,n){return t==="position"||t==="preserve-aspect"&&!Te(Qn(e),Qn(n),.2)}const Dl=bi({attachResizeListener:(t,e)=>$(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ue={current:void 0},wi=bi({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ue.current){const t=new Dl({});t.mount(window),t.setOptions({layoutScroll:!0}),ue.current=t}return ue.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Rl={pan:{Feature:za},drag:{Feature:_a,ProjectionNode:wi,MeasureLayout:vi}},Ve={current:null},Ai={current:!1};function El(){if(Ai.current=!0,!!Ae)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ve.current=t.matches;t.addListener(e),e()}else Ve.current=!1}function Ll(t,e,n){const{willChange:s}=e;for(const i in e){const o=e[i],r=n[i];if(L(o))t.addValue(i,o),Nt(s)&&s.add(i);else if(L(r))t.addValue(i,Vt(o,{owner:t})),Nt(s)&&s.remove(i);else if(r!==o)if(t.hasValue(i)){const a=t.getValue(i);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=t.getStaticValue(i);t.addValue(i,Vt(a!==void 0?a:o,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const ls=new WeakMap,Fl=[...Us,E,J],Bl=t=>Fl.find(Is(t)),Ci=Object.keys(St),kl=Ci.length,us=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],jl=Ee.length;function Mi(t){if(t)return t.options.allowProjection!==!1?t.projection:Mi(t.parent)}class Ol{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.resolveKeyframes=(f,d,m,p)=>new this.KeyframeResolver(f,d,m,p,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=$e,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.scheduleRender=()=>D.render(this.render,!1,!0);const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=_t(n),this.isVariantNode=ds(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const d=h[f];l[f]!==void 0&&L(d)&&(d.set(l[f],!1),Nt(u)&&u.add(f))}}mount(e){this.current=e,ls.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),Ai.current||El(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ve.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){var e;ls.delete(this.current),this.projection&&this.projection.unmount(),Q(this.notifyUpdate),Q(this.render),this.valueSubscriptions.forEach(n=>n()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const n in this.events)this.events[n].clear();for(const n in this.features)(e=this.features[n])===null||e===void 0||e.unmount();this.current=null}bindToMotionValue(e,n){const s=at.has(e),i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&D.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...n},s,i,o){let r,a;for(let l=0;l<kl;l++){const c=Ci[l],{isEnabled:u,Feature:h,ProjectionNode:f,MeasureLayout:d}=St[c];f&&(r=f),u(n)&&(!this.features[c]&&h&&(this.features[c]=new h(this)),d&&(a=d))}if((this.type==="html"||this.type==="svg")&&!this.projection&&r){this.projection=new r(this.latestValues,Mi(this.parent));const{layoutId:l,layout:c,drag:u,dragConstraints:h,layoutScroll:f,layoutRoot:d}=n;this.projection.setOptions({layoutId:l,layout:c,alwaysMeasureLayout:!!u||h&&ut(h),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof c=="string"?c:"both",initialPromotionConfig:o,layoutScroll:f,layoutRoot:d})}return a}updateFeatures(){for(const e in this.features){const n=this.features[e];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):C()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<us.length;s++){const i=us[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=Ll(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const s=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(s.initial=this.props.initial),s}const n={};for(let s=0;s<jl;s++){const i=Ee[s],o=this.props[i];(Pt(o)||o===!1)&&(n[i]=o)}return n}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=Vt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){var s;let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(s=this.getBaseTargetFromProps(this.props,e))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(js(i)||Bs(i))?i=parseFloat(i):!Bl(i)&&J.test(n)&&(i=Hs(e,n)),this.setBaseTarget(e,L(i)?i.get():i)),L(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const r=Ke(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);r&&(i=r[e])}if(s&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!L(o)?o:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new tn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class Di extends Ol{constructor(){super(...arguments),this.KeyframeResolver=Ys}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}}function Il(t){return window.getComputedStyle(t)}class Ul extends Di{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,n){if(at.has(n)){const s=_e(n);return s&&s.default||0}else{const s=Il(e),i=(ys(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return gi(e,n)}build(e,n,s,i){je(e,n,s,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Ne(e,n,s)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;L(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,s,i){Ss(e,n,s,i)}}class Nl extends Di{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(at.has(n)){const s=_e(n);return s&&s.default||0}return n=bs.has(n)?n:Me(n),e.getAttribute(n)}measureInstanceViewportBox(){return C()}scrapeMotionValuesFromProps(e,n,s){return ws(e,n,s)}build(e,n,s,i){Ie(e,n,s,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,s,i){Vs(e,n,s,i)}mount(e){this.isSVGTag=Ue(e.tagName),super.mount(e)}}const Kl=(t,e)=>Fe(t)?new Nl(e,{enableHardwareAcceleration:!1}):new Ul(e,{allowProjection:t!==y.Fragment,enableHardwareAcceleration:!0}),Wl={layout:{ProjectionNode:wi,MeasureLayout:vi}},$l={...wa,...Br,...Rl,...Wl},Jl=Gi((t,e)=>Pr(t,e,$l,Kl));function Ri(){const t=y.useRef(!1);return Ce(()=>(t.current=!0,()=>{t.current=!1}),[]),t}function Gl(){const t=Ri(),[e,n]=y.useState(0),s=y.useCallback(()=>{t.current&&n(e+1)},[e]);return[y.useCallback(()=>D.postRender(s),[s]),e]}class _l extends y.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function zl({children:t,isPresent:e}){const n=y.useId(),s=y.useRef(null),i=y.useRef({width:0,height:0,top:0,left:0}),{nonce:o}=y.useContext(we);return y.useInsertionEffect(()=>{const{width:r,height:a,top:l,left:c}=i.current;if(e||!s.current||!r||!a)return;s.current.dataset.motionPopId=n;const u=document.createElement("style");return o&&(u.nonce=o),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
2
2
  [data-motion-pop-id="${n}"] {
3
3
  position: absolute !important;
4
4
  width: ${r}px !important;
@@ -64,4 +64,4 @@ Error generating stack: `+u.message+`
64
64
  * LICENSE.md file in the root directory of this source tree.
65
65
  *
66
66
  * @license MIT
67
- */function Zu(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(l=>[n,l]):[[n,r]])},[]))}function oh(e,t){let n=Zu(e);return t&&t.forEach((r,l)=>{n.has(l)||t.getAll(l).forEach(u=>{n.append(l,u)})}),n}const ih="6";try{window.__reactRouterVersion=ih}catch{}const sh="startTransition",as=lf[sh];function hh(e){let{basename:t,children:n,future:r,window:l}=e,u=x.useRef();u.current==null&&(u.current=vp({window:l,v5Compat:!0}));let o=u.current,[i,s]=x.useState({action:o.action,location:o.location}),{v7_startTransition:a}=r||{},h=x.useCallback(p=>{a&&as?as(()=>s(p)):s(p)},[s,a]);return x.useLayoutEffect(()=>o.listen(h),[o,h]),x.createElement(uh,{basename:t,children:n,location:i.location,navigationType:i.action,navigator:o,future:r})}var cs;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(cs||(cs={}));var fs;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(fs||(fs={}));function mh(e){let t=x.useRef(Zu(e)),n=x.useRef(!1),r=_l(),l=x.useMemo(()=>oh(r.search,n.current?null:t.current),[r.search]),u=Fc(),o=x.useCallback((i,s)=>{const a=Zu(typeof i=="function"?i(l):i);n.current=!0,u("?"+a,s)},[u,l]);return[l,o]}export{hh as B,fh as N,dh as O,rf as R,mp as a,_l as b,ah as c,ph as d,lh as e,Jo as f,Ac as g,mh as h,ch as j,x as r,Fc as u};
67
+ */function Zu(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(l=>[n,l]):[[n,r]])},[]))}function oh(e,t){let n=Zu(e);return t&&t.forEach((r,l)=>{n.has(l)||t.getAll(l).forEach(u=>{n.append(l,u)})}),n}const ih="6";try{window.__reactRouterVersion=ih}catch{}const sh="startTransition",as=lf[sh];function hh(e){let{basename:t,children:n,future:r,window:l}=e,u=x.useRef();u.current==null&&(u.current=vp({window:l,v5Compat:!0}));let o=u.current,[i,s]=x.useState({action:o.action,location:o.location}),{v7_startTransition:a}=r||{},h=x.useCallback(p=>{a&&as?as(()=>s(p)):s(p)},[s,a]);return x.useLayoutEffect(()=>o.listen(h),[o,h]),x.createElement(uh,{basename:t,children:n,location:i.location,navigationType:i.action,navigator:o,future:r})}var cs;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(cs||(cs={}));var fs;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(fs||(fs={}));function mh(e){let t=x.useRef(Zu(e)),n=x.useRef(!1),r=_l(),l=x.useMemo(()=>oh(r.search,n.current?null:t.current),[r.search]),u=Fc(),o=x.useCallback((i,s)=>{const a=Zu(typeof i=="function"?i(l):i);n.current=!0,u("?"+a,s)},[u,l]);return[l,o]}export{hh as B,fh as N,dh as O,rf as R,mp as a,_l as b,ah as c,mh as d,ph as e,lh as f,Ac as g,Jo as h,ch as j,x as r,Fc as u};