@useorgx/openclaw-plugin 0.7.11 → 0.7.16
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.
- package/README.md +94 -122
- package/dashboard/dist/assets/8pbG6uLK.js +1 -0
- package/dashboard/dist/assets/8pbG6uLK.js.br +0 -0
- package/dashboard/dist/assets/8pbG6uLK.js.gz +0 -0
- package/dashboard/dist/assets/B1LENRC8.js +212 -0
- package/dashboard/dist/assets/B1LENRC8.js.br +0 -0
- package/dashboard/dist/assets/B1LENRC8.js.gz +0 -0
- package/dashboard/dist/assets/{tcEHYcbW.js → BCudUvwg.js} +1 -1
- package/dashboard/dist/assets/BCudUvwg.js.br +0 -0
- package/dashboard/dist/assets/BCudUvwg.js.gz +0 -0
- package/dashboard/dist/assets/{Du1wfrXa.js → BM75sh1f.js} +2 -2
- package/dashboard/dist/assets/BM75sh1f.js.br +0 -0
- package/dashboard/dist/assets/BM75sh1f.js.gz +0 -0
- package/dashboard/dist/assets/BV0BcV1u.js +53 -0
- package/dashboard/dist/assets/BV0BcV1u.js.br +0 -0
- package/dashboard/dist/assets/BV0BcV1u.js.gz +0 -0
- package/dashboard/dist/assets/BYVYH9CH.js +1 -0
- package/dashboard/dist/assets/BYVYH9CH.js.br +0 -0
- package/dashboard/dist/assets/BYVYH9CH.js.gz +0 -0
- package/dashboard/dist/assets/BjK42gtU.js +1 -0
- package/dashboard/dist/assets/BjK42gtU.js.br +0 -0
- package/dashboard/dist/assets/BjK42gtU.js.gz +0 -0
- package/dashboard/dist/assets/BkMrrjAv.js +1 -0
- package/dashboard/dist/assets/BkMrrjAv.js.br +0 -0
- package/dashboard/dist/assets/BkMrrjAv.js.gz +0 -0
- package/dashboard/dist/assets/BpF7v1Dk.js +1 -0
- package/dashboard/dist/assets/BpF7v1Dk.js.br +0 -0
- package/dashboard/dist/assets/BpF7v1Dk.js.gz +0 -0
- package/dashboard/dist/assets/{AqVoI3SF.js → Bv_86bUY.js} +1 -1
- package/dashboard/dist/assets/Bv_86bUY.js.br +0 -0
- package/dashboard/dist/assets/Bv_86bUY.js.gz +0 -0
- package/dashboard/dist/assets/C-MOJWHs.js +1 -0
- package/dashboard/dist/assets/C-MOJWHs.js.br +0 -0
- package/dashboard/dist/assets/C-MOJWHs.js.gz +0 -0
- package/dashboard/dist/assets/C3PrI8L7.js +1 -0
- package/dashboard/dist/assets/C3PrI8L7.js.br +0 -0
- package/dashboard/dist/assets/C3PrI8L7.js.gz +0 -0
- package/dashboard/dist/assets/{CD-q5mdP.js → C6AqbA9J.js} +1 -1
- package/dashboard/dist/assets/C6AqbA9J.js.br +0 -0
- package/dashboard/dist/assets/C6AqbA9J.js.gz +0 -0
- package/dashboard/dist/assets/CSlBSRyv.js +1 -0
- package/dashboard/dist/assets/CSlBSRyv.js.br +0 -0
- package/dashboard/dist/assets/CSlBSRyv.js.gz +0 -0
- package/dashboard/dist/assets/{beHYBbh6.js → CUXb_4F3.js} +2 -2
- package/dashboard/dist/assets/CUXb_4F3.js.br +0 -0
- package/dashboard/dist/assets/CUXb_4F3.js.gz +0 -0
- package/dashboard/dist/assets/Cn8sRTkO.js +1 -0
- package/dashboard/dist/assets/Cn8sRTkO.js.br +0 -0
- package/dashboard/dist/assets/Cn8sRTkO.js.gz +0 -0
- package/dashboard/dist/assets/D5IgXoTj.js +1 -0
- package/dashboard/dist/assets/D5IgXoTj.js.br +0 -0
- package/dashboard/dist/assets/D5IgXoTj.js.gz +0 -0
- package/dashboard/dist/assets/DMKyYAtD.js +1 -0
- package/dashboard/dist/assets/DMKyYAtD.js.br +0 -0
- package/dashboard/dist/assets/DMKyYAtD.js.gz +0 -0
- package/dashboard/dist/assets/{DCP-C7fn.js → DXzpQUC0.js} +1 -1
- package/dashboard/dist/assets/DXzpQUC0.js.br +0 -0
- package/dashboard/dist/assets/DXzpQUC0.js.gz +0 -0
- package/dashboard/dist/assets/Dj2k1r16.js +8 -0
- package/dashboard/dist/assets/Dj2k1r16.js.br +0 -0
- package/dashboard/dist/assets/Dj2k1r16.js.gz +0 -0
- package/dashboard/dist/assets/JDPvhd68.js +1 -0
- package/dashboard/dist/assets/JDPvhd68.js.br +0 -0
- package/dashboard/dist/assets/JDPvhd68.js.gz +0 -0
- package/dashboard/dist/assets/R6N_VVqm.js +1 -0
- package/dashboard/dist/assets/R6N_VVqm.js.br +0 -0
- package/dashboard/dist/assets/R6N_VVqm.js.gz +0 -0
- package/dashboard/dist/assets/cEP7N1dn.js +1 -0
- package/dashboard/dist/assets/cEP7N1dn.js.br +0 -0
- package/dashboard/dist/assets/cEP7N1dn.js.gz +0 -0
- package/dashboard/dist/assets/cX2e-TLi.js +1 -0
- package/dashboard/dist/assets/cX2e-TLi.js.br +0 -0
- package/dashboard/dist/assets/cX2e-TLi.js.gz +0 -0
- package/dashboard/dist/assets/eeHXe_OQ.js +9 -0
- package/dashboard/dist/assets/eeHXe_OQ.js.br +0 -0
- package/dashboard/dist/assets/eeHXe_OQ.js.gz +0 -0
- package/dashboard/dist/assets/iLnvdWmW.css +1 -0
- package/dashboard/dist/assets/iLnvdWmW.css.br +0 -0
- package/dashboard/dist/assets/iLnvdWmW.css.gz +0 -0
- package/dashboard/dist/assets/konqMbVI.js +1 -0
- package/dashboard/dist/assets/konqMbVI.js.br +0 -0
- package/dashboard/dist/assets/konqMbVI.js.gz +0 -0
- package/dashboard/dist/assets/wc6cgXzV.js +1 -0
- package/dashboard/dist/assets/wc6cgXzV.js.br +0 -0
- package/dashboard/dist/assets/wc6cgXzV.js.gz +0 -0
- package/dashboard/dist/brand/control-tower.png +0 -0
- package/dashboard/dist/brand/design-codex.png +0 -0
- package/dashboard/dist/brand/engineering-autopilot.png +0 -0
- package/dashboard/dist/brand/launch-captain.png +0 -0
- package/dashboard/dist/brand/orgx-logo.png +0 -0
- package/dashboard/dist/brand/pipeline-intelligence.png +0 -0
- package/dashboard/dist/brand/product-orchestrator.png +0 -0
- package/dashboard/dist/brand/xandy-orchestrator.png +0 -0
- package/dashboard/dist/index.html +8 -6
- package/dashboard/dist/index.html.br +0 -0
- package/dashboard/dist/index.html.gz +0 -0
- package/dist/hash-utils.d.ts +1 -0
- package/dist/hash-utils.js +4 -0
- package/dist/http/helpers/auto-continue-engine.d.ts +15 -0
- package/dist/http/helpers/auto-continue-engine.js +289 -67
- package/dist/http/helpers/autopilot-slice-utils.js +112 -66
- package/dist/http/helpers/hash-utils.d.ts +1 -1
- package/dist/http/helpers/hash-utils.js +1 -1
- package/dist/http/helpers/mission-control.d.ts +3 -0
- package/dist/http/helpers/mission-control.js +43 -9
- package/dist/http/helpers/queue-constants.d.ts +37 -0
- package/dist/http/helpers/queue-constants.js +34 -0
- package/dist/http/helpers/slice-experience-v2.js +2 -5
- package/dist/http/helpers/slice-run-projections.js +2 -5
- package/dist/http/helpers/value-utils.d.ts +1 -1
- package/dist/http/helpers/value-utils.js +5 -2
- package/dist/http/helpers/workspace-scope.js +4 -3
- package/dist/http/index.js +104 -61
- package/dist/http/routes/chat.d.ts +1 -1
- package/dist/http/routes/chat.js +3 -23
- package/dist/http/routes/entities.js +60 -2
- package/dist/http/routes/entity-dynamic.js +49 -9
- package/dist/http/routes/live-snapshot.d.ts +10 -1
- package/dist/http/routes/live-snapshot.js +15 -26
- package/dist/http/routes/mission-control-actions.d.ts +6 -0
- package/dist/http/routes/mission-control-actions.js +35 -18
- package/dist/http/routes/mission-control-read.js +4 -107
- package/dist/lib/type-coercion.d.ts +10 -0
- package/dist/lib/type-coercion.js +82 -0
- package/dist/mcp-http-handler.js +14 -2
- package/dist/openclaw.plugin.json +1 -1
- package/dist/services/experiment-randomization.js +9 -2
- package/openclaw.plugin.json +1 -1
- package/package.json +3 -2
- package/dashboard/dist/assets/AqVoI3SF.js.br +0 -0
- package/dashboard/dist/assets/AqVoI3SF.js.gz +0 -0
- package/dashboard/dist/assets/BC4WvnHJ.js +0 -1
- package/dashboard/dist/assets/BC4WvnHJ.js.br +0 -0
- package/dashboard/dist/assets/BC4WvnHJ.js.gz +0 -0
- package/dashboard/dist/assets/BG5mwTkg.js +0 -1
- package/dashboard/dist/assets/BG5mwTkg.js.br +0 -0
- package/dashboard/dist/assets/BG5mwTkg.js.gz +0 -0
- package/dashboard/dist/assets/BJgZIVUQ.js +0 -53
- package/dashboard/dist/assets/BJgZIVUQ.js.br +0 -0
- package/dashboard/dist/assets/BJgZIVUQ.js.gz +0 -0
- package/dashboard/dist/assets/BNh-XYPV.js +0 -1
- package/dashboard/dist/assets/BNh-XYPV.js.br +0 -0
- package/dashboard/dist/assets/BNh-XYPV.js.gz +0 -0
- package/dashboard/dist/assets/BTAEErUY.js +0 -1
- package/dashboard/dist/assets/BTAEErUY.js.br +0 -0
- package/dashboard/dist/assets/BTAEErUY.js.gz +0 -0
- package/dashboard/dist/assets/BepW_590.js +0 -1
- package/dashboard/dist/assets/BepW_590.js.br +0 -0
- package/dashboard/dist/assets/BepW_590.js.gz +0 -0
- package/dashboard/dist/assets/BerAfzjq.js +0 -1
- package/dashboard/dist/assets/BerAfzjq.js.br +0 -0
- package/dashboard/dist/assets/BerAfzjq.js.gz +0 -0
- package/dashboard/dist/assets/Bp3N-QL5.js +0 -212
- package/dashboard/dist/assets/Bp3N-QL5.js.br +0 -0
- package/dashboard/dist/assets/Bp3N-QL5.js.gz +0 -0
- package/dashboard/dist/assets/C-KIc3Wc.js +0 -1
- package/dashboard/dist/assets/C-KIc3Wc.js.br +0 -0
- package/dashboard/dist/assets/C-KIc3Wc.js.gz +0 -0
- package/dashboard/dist/assets/C3dZRz9P.css +0 -1
- package/dashboard/dist/assets/C3dZRz9P.css.br +0 -0
- package/dashboard/dist/assets/C3dZRz9P.css.gz +0 -0
- package/dashboard/dist/assets/CD-q5mdP.js.br +0 -0
- package/dashboard/dist/assets/CD-q5mdP.js.gz +0 -0
- package/dashboard/dist/assets/CL_wXqR7.js +0 -1
- package/dashboard/dist/assets/CL_wXqR7.js.br +0 -0
- package/dashboard/dist/assets/CL_wXqR7.js.gz +0 -0
- package/dashboard/dist/assets/CdvjC9G9.js +0 -1
- package/dashboard/dist/assets/CdvjC9G9.js.br +0 -0
- package/dashboard/dist/assets/CdvjC9G9.js.gz +0 -0
- package/dashboard/dist/assets/Ck2agw-s.js +0 -1
- package/dashboard/dist/assets/Ck2agw-s.js.br +0 -0
- package/dashboard/dist/assets/Ck2agw-s.js.gz +0 -0
- package/dashboard/dist/assets/CxQ08qFN.js +0 -9
- package/dashboard/dist/assets/CxQ08qFN.js.br +0 -0
- package/dashboard/dist/assets/CxQ08qFN.js.gz +0 -0
- package/dashboard/dist/assets/D2CH1H6k.js +0 -1
- package/dashboard/dist/assets/D2CH1H6k.js.br +0 -0
- package/dashboard/dist/assets/D2CH1H6k.js.gz +0 -0
- package/dashboard/dist/assets/D9esz7jd.js +0 -1
- package/dashboard/dist/assets/D9esz7jd.js.br +0 -0
- package/dashboard/dist/assets/D9esz7jd.js.gz +0 -0
- package/dashboard/dist/assets/DCP-C7fn.js.br +0 -0
- package/dashboard/dist/assets/DCP-C7fn.js.gz +0 -0
- package/dashboard/dist/assets/DJASCd69.js +0 -1
- package/dashboard/dist/assets/DJASCd69.js.br +0 -0
- package/dashboard/dist/assets/DJASCd69.js.gz +0 -0
- package/dashboard/dist/assets/Dm9AybAp.js +0 -1
- package/dashboard/dist/assets/Dm9AybAp.js.br +0 -0
- package/dashboard/dist/assets/Dm9AybAp.js.gz +0 -0
- package/dashboard/dist/assets/Du1wfrXa.js.br +0 -0
- package/dashboard/dist/assets/Du1wfrXa.js.gz +0 -0
- package/dashboard/dist/assets/beHYBbh6.js.br +0 -0
- package/dashboard/dist/assets/beHYBbh6.js.gz +0 -0
- package/dashboard/dist/assets/cNrhgGc1.js +0 -8
- package/dashboard/dist/assets/cNrhgGc1.js.br +0 -0
- package/dashboard/dist/assets/cNrhgGc1.js.gz +0 -0
- package/dashboard/dist/assets/tcEHYcbW.js.br +0 -0
- package/dashboard/dist/assets/tcEHYcbW.js.gz +0 -0
|
Binary file
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{r as g,j}from"./cNrhgGc1.js";import{n as _,e as De,m as $,s as z,h as Ps,j as Zi,k as Ji,l as Qi,p as Ss,q as Vt,u as to,v as eo,w as no,x as rn,y as so,z as Me,G as io,B as Vs,C as oo,D as ro,E as ao}from"./BJgZIVUQ.js";const wt=g.createContext({});function Z(t){const e=g.useRef(null);return e.current===null&&(e.current=t()),e.current}const Ht=g.createContext(null),Xt=g.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class lo extends g.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 uo({children:t,isPresent:e}){const n=g.useId(),s=g.useRef(null),i=g.useRef({width:0,height:0,top:0,left:0}),{nonce:r}=g.useContext(Xt);return g.useInsertionEffect(()=>{const{width:o,height:a,top:l,left:u}=i.current;if(e||!s.current||!o||!a)return;s.current.dataset.motionPopId=n;const c=document.createElement("style");return r&&(c.nonce=r),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`
|
|
2
|
-
[data-motion-pop-id="${n}"] {
|
|
3
|
-
position: absolute !important;
|
|
4
|
-
width: ${o}px !important;
|
|
5
|
-
height: ${a}px !important;
|
|
6
|
-
top: ${l}px !important;
|
|
7
|
-
left: ${u}px !important;
|
|
8
|
-
}
|
|
9
|
-
`),()=>{document.head.removeChild(c)}},[e]),j.jsx(lo,{isPresent:e,childRef:s,sizeRef:i,children:g.cloneElement(t,{ref:s})})}const co=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:r,mode:o})=>{const a=Z(ho),l=g.useId(),u=g.useCallback(h=>{a.set(h,!0);for(const f of a.values())if(!f)return;s&&s()},[a,s]),c=g.useMemo(()=>({id:l,initial:e,isPresent:n,custom:i,onExitComplete:u,register:h=>(a.set(h,!1),()=>a.delete(h))}),r?[Math.random(),u]:[n,u]);return g.useMemo(()=>{a.forEach((h,f)=>a.set(f,!1))},[n]),g.useEffect(()=>{!n&&!a.size&&s&&s()},[n]),o==="popLayout"&&(t=j.jsx(uo,{isPresent:n,children:t})),j.jsx(Ht.Provider,{value:c,children:t})};function ho(){return new Map}function ws(t=!0){const e=g.useContext(Ht);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,r=g.useId();g.useEffect(()=>{t&&i(r)},[t]);const o=g.useCallback(()=>t&&s&&s(r),[r,s,t]);return!n&&s?[!1,o]:[!0]}const Ft=t=>t.key||"";function an(t){const e=[];return g.Children.forEach(t,n=>{g.isValidElement(n)&&e.push(n)}),e}const Re=typeof window<"u",Yt=Re?g.useLayoutEffect:g.useEffect,Wu=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:r="sync",propagate:o=!1})=>{const[a,l]=ws(o),u=g.useMemo(()=>an(t),[t]),c=o&&!a?[]:u.map(Ft),h=g.useRef(!0),f=g.useRef(u),d=Z(()=>new Map),[p,m]=g.useState(u),[y,v]=g.useState(u);Yt(()=>{h.current=!1,f.current=u;for(let w=0;w<y.length;w++){const x=Ft(y[w]);c.includes(x)?d.delete(x):d.get(x)!==!0&&d.set(x,!1)}},[y,c.length,c.join("-")]);const T=[];if(u!==p){let w=[...u];for(let x=0;x<y.length;x++){const A=y[x],M=Ft(A);c.includes(M)||(w.splice(x,0,A),T.push(A))}r==="wait"&&T.length&&(w=T),v(an(w)),m(u);return}const{forceRender:P}=g.useContext(wt);return j.jsx(j.Fragment,{children:y.map(w=>{const x=Ft(w),A=o&&!a?!1:u===y||c.includes(x),M=()=>{if(d.has(x))d.set(x,!0);else return;let V=!0;d.forEach(F=>{F||(V=!1)}),V&&(P==null||P(),v(f.current),o&&(l==null||l()),s&&s())};return j.jsx(co,{isPresent:A,initial:!h.current||n?void 0:!1,custom:A?void 0:e,presenceAffectsLayout:i,mode:r,onExitComplete:A?void 0:M,children:w},x)})})},fo=g.createContext(null);function po(){const t=g.useRef(!1);return Yt(()=>(t.current=!0,()=>{t.current=!1}),[]),t}const mo={useManualTiming:!1};function go(t){let e=new Set,n=new Set,s=!1,i=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(u){r.has(u)&&(l.schedule(u),t()),u(o)}const l={schedule:(u,c=!1,h=!1)=>{const d=h&&s?e:n;return c&&r.add(u),d.has(u)||d.add(u),u},cancel:u=>{n.delete(u),r.delete(u)},process:u=>{if(o=u,s){i=!0;return}s=!0,[e,n]=[n,e],e.forEach(a),e.clear(),s=!1,i&&(i=!1,l.process(u))}};return l}const Bt=["read","resolveKeyframes","update","preRender","render","postRender"],yo=40;function As(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Bt.reduce((v,T)=>(v[T]=go(r),v),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:f}=o,d=()=>{const v=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(v-i.timestamp,yo),1),i.timestamp=v,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),f.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(d))},p=()=>{n=!0,s=!0,i.isProcessing||t(d)};return{schedule:Bt.reduce((v,T)=>{const P=o[T];return v[T]=(w,x=!1,A=!1)=>(n||p(),P.schedule(w,x,A)),v},{}),cancel:v=>{for(let T=0;T<Bt.length;T++)o[Bt[T]].cancel(v)},state:i,steps:o}}const{schedule:C,cancel:H,state:E,steps:se}=As(typeof requestAnimationFrame<"u"?requestAnimationFrame:_,!0);function vo(){const t=po(),[e,n]=g.useState(0),s=g.useCallback(()=>{t.current&&n(e+1)},[e]);return[g.useCallback(()=>C.postRender(s),[s]),e]}const xo=t=>!t.isLayoutDirty&&t.willUpdate(!1);function ln(){const t=new Set,e=new WeakMap,n=()=>t.forEach(xo);return{add:s=>{t.add(s),e.set(s,s.addEventListener("willUpdate",n))},remove:s=>{t.delete(s);const i=e.get(s);i&&(i(),e.delete(s)),n()},dirty:n}}const Cs=t=>t===!0,To=t=>Cs(t===!0)||t==="id",Gu=({children:t,id:e,inherit:n=!0})=>{const s=g.useContext(wt),i=g.useContext(fo),[r,o]=vo(),a=g.useRef(null),l=s.id||i;a.current===null&&(To(n)&&l&&(e=e?l+"-"+e:l),a.current={id:e,group:Cs(n)&&s.group||ln()});const u=g.useMemo(()=>({...a.current,forceRender:r}),[o]);return j.jsx(wt.Provider,{value:u,children:t})},bs=g.createContext({strict:!1}),un={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"]},ht={};for(const t in un)ht[t]={isEnabled:e=>un[t].some(n=>!!e[n])};function Po(t){for(const e in t)ht[e]={...ht[e],...t[e]}}const So=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 Nt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||So.has(t)}let Ds=t=>!Nt(t);function Vo(t){t&&(Ds=e=>e.startsWith("on")?!Nt(e):t(e))}try{Vo(require("@emotion/is-prop-valid").default)}catch{}function wo(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Ds(i)||n===!0&&Nt(i)||!e&&!Nt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function Ao(t){if(typeof Proxy>"u")return t;const e=new Map,n=(...s)=>t(...s);return new Proxy(n,{get:(s,i)=>i==="create"?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}const qt=g.createContext({});function At(t){return typeof t=="string"||Array.isArray(t)}function Zt(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const Ee=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Le=["initial",...Ee];function Jt(t){return Zt(t.animate)||Le.some(e=>At(t[e]))}function Ms(t){return!!(Jt(t)||t.variants)}function Co(t,e){if(Jt(t)){const{initial:n,animate:s}=t;return{initial:n===!1||At(n)?n:void 0,animate:At(s)?s:void 0}}return t.inherit!==!1?e:{}}function bo(t){const{initial:e,animate:n}=Co(t,g.useContext(qt));return g.useMemo(()=>({initial:e,animate:n}),[cn(e),cn(n)])}function cn(t){return Array.isArray(t)?t.join(" "):t}const Do=Symbol.for("motionComponentSymbol");function rt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Mo(t,e,n){return g.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):rt(n)&&(n.current=s))},[e])}const Fe=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ro="framerAppearId",Rs="data-"+Fe(Ro),{schedule:Be}=As(queueMicrotask,!1),Es=g.createContext({});function Eo(t,e,n,s,i){var r,o;const{visualElement:a}=g.useContext(qt),l=g.useContext(bs),u=g.useContext(Ht),c=g.useContext(Xt).reducedMotion,h=g.useRef(null);s=s||l.renderer,!h.current&&s&&(h.current=s(t,{visualState:e,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c}));const f=h.current,d=g.useContext(Es);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&Lo(h.current,n,i,d);const p=g.useRef(!1);g.useInsertionEffect(()=>{f&&p.current&&f.update(n,u)});const m=n[Rs],y=g.useRef(!!m&&!(!((r=window.MotionHandoffIsComplete)===null||r===void 0)&&r.call(window,m))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,m)));return Yt(()=>{f&&(p.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Be.render(f.render),y.current&&f.animationState&&f.animationState.animateChanges())}),g.useEffect(()=>{f&&(!y.current&&f.animationState&&f.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,m)}),y.current=!1))}),f}function Lo(t,e,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Ls(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&rt(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,layoutScroll:l,layoutRoot:u})}function Ls(t){if(t)return t.options.allowProjection!==!1?t.projection:Ls(t.parent)}function Fo({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){var r,o;t&&Po(t);function a(u,c){let h;const f={...g.useContext(Xt),...u,layoutId:Bo(u)},{isStatic:d}=f,p=bo(u),m=s(u,d);if(!d&&Re){ko();const y=jo(f);h=y.MeasureLayout,p.visualElement=Eo(i,m,f,e,y.ProjectionNode)}return j.jsxs(qt.Provider,{value:p,children:[h&&p.visualElement?j.jsx(h,{visualElement:p.visualElement,...f}):null,n(i,u,Mo(m,p.visualElement,c),m,d,p.visualElement)]})}a.displayName=`motion.${typeof i=="string"?i:`create(${(o=(r=i.displayName)!==null&&r!==void 0?r:i.name)!==null&&o!==void 0?o:""})`}`;const l=g.forwardRef(a);return l[Do]=i,l}function Bo({layoutId:t}){const e=g.useContext(wt).id;return e&&t!==void 0?e+"-"+t:t}function ko(t,e){g.useContext(bs).strict}function jo(t){const{drag:e,layout:n}=ht;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}const Io=["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 ke(t){return typeof t!="string"||t.includes("-")?!1:!!(Io.indexOf(t)>-1||/[A-Z]/u.test(t))}function hn(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function je(t,e,n,s){if(typeof e=="function"){const[i,r]=hn(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=hn(s);e=e(n!==void 0?n:t.custom,i,r)}return e}const me=t=>Array.isArray(t),Oo=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),Uo=t=>me(t)?t[t.length-1]||0:t,L=t=>!!(t&&t.getVelocity);function It(t){const e=L(t)?t.get():t;return Oo(e)?e.toValue():e}function No({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:n},s,i,r){const o={latestValues:_o(s,i,r,t),renderState:e()};return n&&(o.onMount=a=>n({props:s,current:a,...o}),o.onUpdate=a=>n(a)),o}const Fs=t=>(e,n)=>{const s=g.useContext(qt),i=g.useContext(Ht),r=()=>No(t,e,s,i);return n?r():Z(r)};function _o(t,e,n,s){const i={},r=s(t,{});for(const f in r)i[f]=It(r[f]);let{initial:o,animate:a}=t;const l=Jt(t),u=Ms(t);e&&u&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const h=c?a:o;if(h&&typeof h!="boolean"&&!Zt(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d<f.length;d++){const p=je(t,f[d]);if(p){const{transitionEnd:m,transition:y,...v}=p;for(const T in v){let P=v[T];if(Array.isArray(P)){const w=c?P.length-1:0;P=P[w]}P!==null&&(i[T]=P)}for(const T in m)i[T]=m[T]}}}return i}const pt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],it=new Set(pt),Bs=t=>e=>typeof e=="string"&&e.startsWith(t),ks=Bs("--"),Ko=Bs("var(--"),Ie=t=>Ko(t)?Wo.test(t.split("/*")[0].trim()):!1,Wo=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,js=(t,e)=>e&&typeof t=="number"?e.transform(t):t,X=(t,e,n)=>n>e?e:n<t?t:n,mt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Ct={...mt,transform:t=>X(0,1,t)},kt={...mt,default:1},Mt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Y=Mt("deg"),K=Mt("%"),S=Mt("px"),Go=Mt("vh"),$o=Mt("vw"),fn={...K,parse:t=>K.parse(t)/100,transform:t=>K.transform(t*100)},zo={borderWidth:S,borderTopWidth:S,borderRightWidth:S,borderBottomWidth:S,borderLeftWidth:S,borderRadius:S,radius:S,borderTopLeftRadius:S,borderTopRightRadius:S,borderBottomRightRadius:S,borderBottomLeftRadius:S,width:S,maxWidth:S,height:S,maxHeight:S,top:S,right:S,bottom:S,left:S,padding:S,paddingTop:S,paddingRight:S,paddingBottom:S,paddingLeft:S,margin:S,marginTop:S,marginRight:S,marginBottom:S,marginLeft:S,backgroundPositionX:S,backgroundPositionY:S},Ho={rotate:Y,rotateX:Y,rotateY:Y,rotateZ:Y,scale:kt,scaleX:kt,scaleY:kt,scaleZ:kt,skew:Y,skewX:Y,skewY:Y,distance:S,translateX:S,translateY:S,translateZ:S,x:S,y:S,z:S,perspective:S,transformPerspective:S,opacity:Ct,originX:fn,originY:fn,originZ:S},dn={...mt,transform:Math.round},Oe={...zo,...Ho,zIndex:dn,size:S,fillOpacity:Ct,strokeOpacity:Ct,numOctaves:dn},Xo={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Yo=pt.length;function qo(t,e,n){let s="",i=!0;for(let r=0;r<Yo;r++){const o=pt[r],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=js(a,Oe[o]);if(!l){i=!1;const c=Xo[o]||o;s+=`${c}(${u}) `}n&&(e[o]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Ue(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const u=e[l];if(it.has(l)){o=!0;continue}else if(ks(l)){i[l]=u;continue}else{const c=js(u,Oe[l]);l.startsWith("origin")?(a=!0,r[l]=c):s[l]=c}}if(e.transform||(o||n?s.transform=qo(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=r;s.transformOrigin=`${l} ${u} ${c}`}}const Zo={offset:"stroke-dashoffset",array:"stroke-dasharray"},Jo={offset:"strokeDashoffset",array:"strokeDasharray"};function Qo(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?Zo:Jo;t[r.offset]=S.transform(-s);const o=S.transform(e),a=S.transform(n);t[r.array]=`${o} ${a}`}function pn(t,e,n){return typeof t=="string"?t:S.transform(e+n*t)}function tr(t,e,n){const s=pn(e,t.x,t.width),i=pn(n,t.y,t.height);return`${s} ${i}`}function Ne(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:r,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(Ue(t,u,h),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:d,dimensions:p}=t;f.transform&&(p&&(d.transform=f.transform),delete f.transform),p&&(i!==void 0||r!==void 0||d.transform)&&(d.transformOrigin=tr(p,i!==void 0?i:.5,r!==void 0?r:.5)),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),s!==void 0&&(f.scale=s),o!==void 0&&Qo(f,o,a,l,!1)}const _e=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Is=()=>({..._e(),attrs:{}}),Ke=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Os(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const r in n)t.style.setProperty(r,n[r])}const Us=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 Ns(t,e,n,s){Os(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Us.has(i)?i:Fe(i),e.attrs[i])}const _t={};function er(t){Object.assign(_t,t)}function _s(t,{layout:e,layoutId:n}){return it.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!_t[t]||t==="opacity")}function We(t,e,n){var s;const{style:i}=t,r={};for(const o in i)(L(i[o])||e.style&&L(e.style[o])||_s(o,t)||((s=n==null?void 0:n.getValue(o))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(r[o]=i[o]);return r}function Ks(t,e,n){const s=We(t,e,n);for(const i in t)if(L(t[i])||L(e[i])){const r=pt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}function nr(t,e){try{e.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{e.dimensions={x:0,y:0,width:0,height:0}}}const mn=["x","y","width","height","cx","cy","r"],sr={useVisualState:Fs({scrapeMotionValuesFromProps:Ks,createRenderState:Is,onUpdate:({props:t,prevProps:e,current:n,renderState:s,latestValues:i})=>{if(!n)return;let r=!!t.drag;if(!r){for(const a in i)if(it.has(a)){r=!0;break}}if(!r)return;let o=!e;if(e)for(let a=0;a<mn.length;a++){const l=mn[a];t[l]!==e[l]&&(o=!0)}o&&C.read(()=>{nr(n,s),C.render(()=>{Ne(s,i,Ke(n.tagName),t.transformTemplate),Ns(n,s)})})}})},ir={useVisualState:Fs({scrapeMotionValuesFromProps:We,createRenderState:_e})};function Ws(t,e,n){for(const s in e)!L(e[s])&&!_s(s,n)&&(t[s]=e[s])}function or({transformTemplate:t},e){return g.useMemo(()=>{const n=_e();return Ue(n,e,t),Object.assign({},n.vars,n.style)},[e])}function rr(t,e){const n=t.style||{},s={};return Ws(s,n,t),Object.assign(s,or(t,e)),s}function ar(t,e){const n={},s=rr(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}function lr(t,e,n,s){const i=g.useMemo(()=>{const r=Is();return Ne(r,e,Ke(s),t.transformTemplate),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};Ws(r,t.style,t),i.style={...r,...i.style}}return i}function ur(t=!1){return(n,s,i,{latestValues:r},o)=>{const l=(ke(n)?lr:ar)(s,r,o,n),u=wo(s,typeof n=="string",t),c=n!==g.Fragment?{...u,...l,ref:i}:{},{children:h}=s,f=g.useMemo(()=>L(h)?h.get():h,[h]);return g.createElement(n,{...c,children:f})}}function cr(t,e){return function(s,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...ke(s)?sr:ir,preloadedFeatures:t,useRender:ur(i),createVisualElement:e,Component:s};return Fo(o)}}function Gs(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 Qt(t,e,n){const s=t.getProps();return je(s,e,n!==void 0?n:s.custom,t)}const $s=new Set(["width","height","top","left","right","bottom",...pt]);let Ot;function hr(){Ot=void 0}const W={now:()=>(Ot===void 0&&W.set(E.isProcessing||mo.useManualTiming?E.timestamp:performance.now()),Ot),set:t=>{Ot=t,queueMicrotask(hr)}};function Ge(t,e){t.indexOf(e)===-1&&t.push(e)}function $e(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function fr([...t],e,n){const s=e<0?t.length+e:e;if(s>=0&&s<t.length){const i=n<0?t.length+n:n,[r]=t.splice(e,1);t.splice(i,0,r)}return t}class ze{constructor(){this.subscriptions=[]}add(e){return Ge(this.subscriptions,e),()=>$e(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 r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function zs(t,e){return e?t*(1e3/e):0}const gn=30,dr=t=>!isNaN(parseFloat(t)),vt={current:void 0};class pr{constructor(e,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,i=!0)=>{const r=W.now();this.updatedAt!==r&&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.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=W.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=dr(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new ze);const s=this.events[e].add(n);return e==="change"?()=>{s(),C.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 vt.current&&vt.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=W.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>gn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,gn);return zs(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 ft(t,e){return new pr(t,e)}function mr(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,ft(n))}function gr(t,e){const n=Qt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=Uo(r[o]);mr(t,o,a)}}function yr(t){return!!(L(t)&&t.add)}function ge(t,e){const n=t.getValue("willChange");if(yr(n))return n.add(e)}function Hs(t){return t.props[Rs]}const Xs=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,vr=1e-7,xr=12;function Tr(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=Xs(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>vr&&++a<xr);return o}function Rt(t,e,n,s){if(t===e&&n===s)return _;const i=r=>Tr(r,0,1,t,n);return r=>r===0||r===1?r:Xs(i(r),e,s)}const Ys=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,qs=t=>e=>1-t(1-e),Zs=Rt(.33,1.53,.69,.99),He=qs(Zs),Js=Ys(He),Qs=t=>(t*=2)<1?.5*He(t):.5*(2-Math.pow(2,-10*(t-1))),Xe=t=>1-Math.sin(Math.acos(t)),ti=qs(Xe),ei=Ys(Xe),ni=t=>/^0[^.\s]+$/u.test(t);function Pr(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||ni(t):!0}const xt=t=>Math.round(t*1e5)/1e5,Ye=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Sr(t){return t==null}const Vr=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,qe=(t,e)=>n=>!!(typeof n=="string"&&Vr.test(n)&&n.startsWith(t)||e&&!Sr(n)&&Object.prototype.hasOwnProperty.call(n,e)),si=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(Ye);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},wr=t=>X(0,255,t),ie={...mt,transform:t=>Math.round(wr(t))},nt={test:qe("rgb","red"),parse:si("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+ie.transform(t)+", "+ie.transform(e)+", "+ie.transform(n)+", "+xt(Ct.transform(s))+")"};function Ar(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 ye={test:qe("#"),parse:Ar,transform:nt.transform},at={test:qe("hsl","hue"),parse:si("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+K.transform(xt(e))+", "+K.transform(xt(n))+", "+xt(Ct.transform(s))+")"},B={test:t=>nt.test(t)||ye.test(t)||at.test(t),parse:t=>nt.test(t)?nt.parse(t):at.test(t)?at.parse(t):ye.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?nt.transform(t):at.transform(t)},Cr=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function br(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Ye))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(Cr))===null||n===void 0?void 0:n.length)||0)>0}const ii="number",oi="color",Dr="var",Mr="var(",yn="${}",Rr=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function bt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(Rr,l=>(B.test(l)?(s.color.push(r),i.push(oi),n.push(B.parse(l))):l.startsWith(Mr)?(s.var.push(r),i.push(Dr),n.push(l)):(s.number.push(r),i.push(ii),n.push(parseFloat(l))),++r,yn)).split(yn);return{values:n,split:a,indexes:s,types:i}}function ri(t){return bt(t).values}function ai(t){const{split:e,types:n}=bt(t),s=e.length;return i=>{let r="";for(let o=0;o<s;o++)if(r+=e[o],i[o]!==void 0){const a=n[o];a===ii?r+=xt(i[o]):a===oi?r+=B.transform(i[o]):r+=i[o]}return r}}const Er=t=>typeof t=="number"?0:t;function Lr(t){const e=ri(t);return ai(t)(e.map(Er))}const q={test:br,parse:ri,createTransformer:ai,getAnimatableNone:Lr},Fr=new Set(["brightness","contrast","saturate","opacity"]);function Br(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Ye)||[];if(!s)return t;const i=n.replace(s,"");let r=Fr.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const kr=/\b([a-z-]*)\(.*?\)/gu,ve={...q,getAnimatableNone:t=>{const e=t.match(kr);return e?e.map(Br).join(" "):t}},jr={...Oe,color:B,backgroundColor:B,outlineColor:B,fill:B,stroke:B,borderColor:B,borderTopColor:B,borderRightColor:B,borderBottomColor:B,borderLeftColor:B,filter:ve,WebkitFilter:ve},Ze=t=>jr[t];function li(t,e){let n=Ze(t);return n!==ve&&(n=q),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ir=new Set(["auto","none","0"]);function Or(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!Ir.has(r)&&bt(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=li(n,i)}const vn=t=>t===mt||t===S,xn=(t,e)=>parseFloat(t.split(", ")[e]),Tn=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return xn(i[1],e);{const r=s.match(/^matrix\((.+)\)$/u);return r?xn(r[1],t):0}},Ur=new Set(["x","y","z"]),Nr=pt.filter(t=>!Ur.has(t));function _r(t){const e=[];return Nr.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:Tn(4,13),y:Tn(5,14)};dt.translateX=dt.x;dt.translateY=dt.y;const st=new Set;let xe=!1,Te=!1;function ui(){if(Te){const t=Array.from(st).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=_r(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(([r,o])=>{var a;(a=s.getValue(r))===null||a===void 0||a.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Te=!1,xe=!1,st.forEach(t=>t.complete()),st.clear()}function ci(){st.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Te=!0)})}function Kr(){ci(),ui()}class Je{constructor(e,n,s,i,r,o=!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=r,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(st.add(this),xe||(xe=!0,C.read(ci),C.resolveKeyframes(ui))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;for(let r=0;r<e.length;r++)if(e[r]===null)if(r===0){const o=i==null?void 0:i.get(),a=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const l=s.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),i&&o===void 0&&i.set(e[0])}else e[r]=e[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),st.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,st.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const hi=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Wr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Gr(t){const e=Wr.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function fi(t,e,n=1){const[s,i]=Gr(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return hi(o)?parseFloat(o):o}return Ie(i)?fi(i,e,n+1):i}const di=t=>e=>e.test(t),$r={test:t=>t==="auto",parse:t=>t},pi=[mt,S,K,Y,$o,Go,$r],Pn=t=>pi.find(di(t));class mi extends Je{constructor(e,n,s,i,r){super(e,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let u=e[l];if(typeof u=="string"&&(u=u.trim(),Ie(u))){const c=fi(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!$s.has(s)||e.length!==2)return;const[i,r]=e,o=Pn(i),a=Pn(r);if(o!==a)if(vn(o)&&vn(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)Pr(e[i])&&s.push(i);s.length&&Or(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!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||!n.current)return;const r=n.getValue(s);r&&r.jump(this.measuredOrigin,!1);const o=i.length-1,a=i[o];i[o]=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,u])=>{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const Sn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(q.test(t)||t==="0")&&!t.startsWith("url("));function zr(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 Hr(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=Sn(i,e),a=Sn(r,e);return!o||!a?!1:zr(t)||(n==="spring"||De(n))&&s}const Xr=t=>t!==null;function te(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(Xr),r=e&&n!=="loop"&&e%2===1?0:i.length-1;return!r||s===void 0?i[r]:s}const Yr=40;class gi{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=W.now(),this.options={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>Yr?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Kr(),this._resolved}onKeyframesResolved(e,n){this.resolvedAt=W.now(),this.hasAttemptedResolve=!0;const{name:s,type:i,velocity:r,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!Hr(e,s,i,r))if(o)this.options.duration=0;else{l&&l(te(e,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const c=this.initPlayback(e,n);c!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const b=(t,e,n)=>t+(e-t)*n;function oe(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 qr({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=oe(l,a,t+1/3),r=oe(l,a,t),o=oe(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function Kt(t,e){return n=>n>0?e:t}const re=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Zr=[ye,nt,at],Jr=t=>Zr.find(e=>e.test(t));function Vn(t){const e=Jr(t);if(!e)return!1;let n=e.parse(t);return e===at&&(n=qr(n)),n}const wn=(t,e)=>{const n=Vn(t),s=Vn(e);if(!n||!s)return Kt(t,e);const i={...n};return r=>(i.red=re(n.red,s.red,r),i.green=re(n.green,s.green,r),i.blue=re(n.blue,s.blue,r),i.alpha=b(n.alpha,s.alpha,r),nt.transform(i))},Qr=(t,e)=>n=>e(t(n)),Et=(...t)=>t.reduce(Qr),Pe=new Set(["none","hidden"]);function ta(t,e){return Pe.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function ea(t,e){return n=>b(t,e,n)}function Qe(t){return typeof t=="number"?ea:typeof t=="string"?Ie(t)?Kt:B.test(t)?wn:ia:Array.isArray(t)?yi:typeof t=="object"?B.test(t)?wn:na:Kt}function yi(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>Qe(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function na(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=Qe(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function sa(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const o=e.types[r],a=t.indexes[o][i[o]],l=(n=t.values[a])!==null&&n!==void 0?n:0;s[r]=l,i[o]++}return s}const ia=(t,e)=>{const n=q.createTransformer(e),s=bt(t),i=bt(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?Pe.has(t)&&!i.values.length||Pe.has(e)&&!s.values.length?ta(t,e):Et(yi(sa(s,i),i.values),n):Kt(t,e)};function vi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?b(t,e,n):Qe(t)(t,e)}const oa=5;function xi(t,e,n){const s=Math.max(e-oa,0);return zs(n-t(s),e-s)}const D={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},ae=.001;function ra({duration:t=D.duration,bounce:e=D.bounce,velocity:n=D.velocity,mass:s=D.mass}){let i,r,o=1-e;o=X(D.minDamping,D.maxDamping,o),t=X(D.minDuration,D.maxDuration,$(t)),o<1?(i=u=>{const c=u*o,h=c*t,f=c-n,d=Se(u,o),p=Math.exp(-h);return ae-f/d*p},r=u=>{const h=u*o*t,f=h*n+n,d=Math.pow(o,2)*Math.pow(u,2)*t,p=Math.exp(-h),m=Se(Math.pow(u,2),o);return(-i(u)+ae>0?-1:1)*((f-d)*p)/m}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-ae+c*h},r=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=la(i,r,a);if(t=z(t),isNaN(l))return{stiffness:D.stiffness,damping:D.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:t}}}const aa=12;function la(t,e,n){let s=n;for(let i=1;i<aa;i++)s=s-t(s)/e(s);return s}function Se(t,e){return t*Math.sqrt(1-e*e)}const ua=["duration","bounce"],ca=["stiffness","damping","mass"];function An(t,e){return e.some(n=>t[n]!==void 0)}function ha(t){let e={velocity:D.velocity,stiffness:D.stiffness,damping:D.damping,mass:D.mass,isResolvedFromDuration:!1,...t};if(!An(t,ca)&&An(t,ua))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*X(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:D.mass,stiffness:i,damping:r}}else{const n=ra(t);e={...e,...n,mass:D.mass},e.isResolvedFromDuration=!0}return e}function Ti(t=D.visualDuration,e=D.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:u,mass:c,duration:h,velocity:f,isResolvedFromDuration:d}=ha({...n,velocity:-$(n.velocity||0)}),p=f||0,m=u/(2*Math.sqrt(l*c)),y=o-r,v=$(Math.sqrt(l/c)),T=Math.abs(y)<5;s||(s=T?D.restSpeed.granular:D.restSpeed.default),i||(i=T?D.restDelta.granular:D.restDelta.default);let P;if(m<1){const x=Se(v,m);P=A=>{const M=Math.exp(-m*v*A);return o-M*((p+m*v*y)/x*Math.sin(x*A)+y*Math.cos(x*A))}}else if(m===1)P=x=>o-Math.exp(-v*x)*(y+(p+v*y)*x);else{const x=v*Math.sqrt(m*m-1);P=A=>{const M=Math.exp(-m*v*A),V=Math.min(x*A,300);return o-M*((p+m*v*y)*Math.sinh(V)+x*y*Math.cosh(V))/x}}const w={calculatedDuration:d&&h||null,next:x=>{const A=P(x);if(d)a.done=x>=h;else{let M=0;m<1&&(M=x===0?z(p):xi(P,x,A));const V=Math.abs(M)<=s,F=Math.abs(o-A)<=i;a.done=V&&F}return a.value=a.done?o:A,a},toString:()=>{const x=Math.min(Ps(w),Zi),A=Ji(M=>w.next(x*M).value,x,30);return x+"ms "+A}};return w}function Cn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},d=V=>a!==void 0&&V<a||l!==void 0&&V>l,p=V=>a===void 0?l:l===void 0||Math.abs(a-V)<Math.abs(l-V)?a:l;let m=n*e;const y=h+m,v=o===void 0?y:o(y);v!==y&&(m=v-h);const T=V=>-m*Math.exp(-V/s),P=V=>v+T(V),w=V=>{const F=T(V),O=P(V);f.done=Math.abs(F)<=u,f.value=f.done?v:O};let x,A;const M=V=>{d(f.value)&&(x=V,A=Ti({keyframes:[f.value,p(f.value)],velocity:xi(P,V,f.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return M(0),{calculatedDuration:null,next:V=>{let F=!1;return!A&&x===void 0&&(F=!0,w(V),M(V)),x!==void 0&&V>=x?A.next(V-x):(!F&&w(V),f)}}}const fa=Rt(.42,0,1,1),da=Rt(0,0,.58,1),Pi=Rt(.42,0,.58,1),pa=t=>Array.isArray(t)&&typeof t[0]!="number",ma={linear:_,easeIn:fa,easeInOut:Pi,easeOut:da,circIn:Xe,circInOut:ei,circOut:ti,backIn:He,backInOut:Js,backOut:Zs,anticipate:Qs},bn=t=>{if(Qi(t)){Ss(t.length===4);const[e,n,s,i]=t;return Rt(e,n,s,i)}else if(typeof t=="string")return ma[t];return t};function ga(t,e,n){const s=[],i=n||vi,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||_:e;a=Et(l,a)}s.push(a)}return s}function Si(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(Ss(r===e.length),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=ga(e,s,i),l=a.length,u=c=>{if(o&&c<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const f=Vt(t[h],t[h+1],c);return a[h](f)};return n?c=>u(X(t[0],t[r-1],c)):u}function ya(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Vt(0,e,s);t.push(b(n,1,i))}}function va(t){const e=[0];return ya(e,t.length-1),e}function xa(t,e){return t.map(n=>n*e)}function Ta(t,e){return t.map(()=>e||Pi).splice(0,t.length-1)}function Wt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=pa(s)?s.map(bn):bn(s),r={done:!1,value:e[0]},o=xa(n&&n.length===e.length?n:va(e),t),a=Si(o,e,{ease:Array.isArray(i)?i:Ta(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const Pa=t=>{const e=({timestamp:n})=>t(n);return{start:()=>C.update(e,!0),stop:()=>H(e),now:()=>E.isProcessing?E.timestamp:W.now()}},Sa={decay:Cn,inertia:Cn,tween:Wt,keyframes:Wt,spring:Ti},Va=t=>t/100;class tn extends gi{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:s,element:i,keyframes:r}=this.options,o=(i==null?void 0:i.KeyframeResolver)||Je,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new o(r,a,n,s,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=this.options,a=De(n)?n:Sa[n]||Wt;let l,u;a!==Wt&&typeof e[0]!="number"&&(l=Et(Va,vi(e[0],e[1])),e=[0,100]);const c=a({...this.options,keyframes:e});r==="mirror"&&(u=a({...this.options,keyframes:[...e].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=Ps(c));const{calculatedDuration:h}=c,f=h+i,d=f*(s+1)-i;return{generator:c,mirroredGenerator:u,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:V}=this.options;return{done:!0,value:V[V.length-1]}}const{finalKeyframe:i,generator:r,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:h}=s;if(this.startTime===null)return r.next(0);const{delay:f,repeat:d,repeatType:p,repeatDelay:m,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/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 v=this.currentTime-f*(this.speed>=0?1:-1),T=this.speed>=0?v<0:v>c;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let P=this.currentTime,w=r;if(d){const V=Math.min(this.currentTime,c)/h;let F=Math.floor(V),O=V%1;!O&&V>=1&&(O=1),O===1&&F--,F=Math.min(F,d+1),!!(F%2)&&(p==="reverse"?(O=1-O,m&&(O-=m/h)):p==="mirror"&&(w=o)),P=X(0,1,O)*h}const x=T?{done:!1,value:l[0]}:w.next(P);a&&(x.value=a(x.value));let{done:A}=x;!T&&u!==null&&(A=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return M&&i!==void 0&&(x.value=te(l,this.options,i)),y&&y(x.value),M&&this.finish(),x}get duration(){const{resolved:e}=this;return e?$(e.calculatedDuration):0}get time(){return $(this.currentTime)}set time(e){e=z(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=$(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=Pa,onPlay:n,startTime:s}=this.options;this.driver||(this.driver=e(r=>this.tick(r))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=s??this.calcStartTime(),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 wa=new Set(["opacity","clipPath","filter","transform"]);function Aa(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=to(a,i);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:s,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"})}const Ca=eo(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Gt=10,ba=2e4;function Da(t){return De(t.type)||t.type==="spring"||!so(t.ease)}function Ma(t,e){const n=new tn({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let r=0;for(;!s.done&&r<ba;)s=n.sample(r),i.push(s.value),r+=Gt;return{times:void 0,keyframes:i,duration:r-Gt,ease:"linear"}}const Vi={anticipate:Qs,backInOut:Js,circInOut:ei};function Ra(t){return t in Vi}class Dn extends gi{constructor(e){super(e);const{name:n,motionValue:s,element:i,keyframes:r}=this.options;this.resolver=new mi(r,(o,a)=>this.onKeyframesResolved(o,a),n,s,i),this.resolver.scheduleResolve()}initPlayback(e,n){let{duration:s=300,times:i,ease:r,type:o,motionValue:a,name:l,startTime:u}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof r=="string"&&no()&&Ra(r)&&(r=Vi[r]),Da(this.options)){const{onComplete:h,onUpdate:f,motionValue:d,element:p,...m}=this.options,y=Ma(e,m);e=y.keyframes,e.length===1&&(e[1]=e[0]),s=y.duration,i=y.times,r=y.ease,o="keyframes"}const c=Aa(a.owner.current,l,e,{...this.options,duration:s,times:i,ease:r});return c.startTime=u??this.calcStartTime(),this.pendingTimeline?(rn(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:h}=this.options;a.set(te(e,this.options,n)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:s,times:i,type:o,ease:r,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return $(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return $(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=z(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}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:n}=e;return n.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return _;const{animation:s}=n;rn(s,e)}return _}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;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:s,duration:i,type:r,ease:o,times:a}=e;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:c,onComplete:h,element:f,...d}=this.options,p=new tn({...d,keyframes:s,duration:i,type:r,ease:o,times:a,isGenerator:!0}),m=z(this.time);u.setWithVelocity(p.sample(m-Gt).value,p.sample(m).value,Gt)}const{onStop:l}=this.options;l&&l(),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:r,damping:o,type:a}=e;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=n.owner.getProps();return Ca()&&s&&wa.has(s)&&!l&&!u&&!i&&r!=="mirror"&&o!==0&&a!=="inertia"}}const Ea={type:"spring",stiffness:500,damping:25,restSpeed:10},La=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Fa={type:"keyframes",duration:.8},Ba={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ka=(t,{keyframes:e})=>e.length>2?Fa:it.has(t)?t.startsWith("scale")?La(e[1]):Ea:Ba;function ja({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const en=(t,e,n,s={},i,r)=>o=>{const a=Me(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-z(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};ja(a)||(c={...c,...ka(t,c)}),c.duration&&(c.duration=z(c.duration)),c.repeatDelay&&(c.repeatDelay=z(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(h=!0)),h&&!r&&e.get()!==void 0){const f=te(c.keyframes,a);if(f!==void 0)return C.update(()=>{c.onUpdate(f),c.onComplete()}),new io([])}return!r&&Dn.supports(c)?new Dn(c):new tn(c)};function Ia({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function wi(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var r;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=e;s&&(o=s);const u=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const h in l){const f=t.getValue(h,(r=t.latestValues[h])!==null&&r!==void 0?r:null),d=l[h];if(d===void 0||c&&Ia(c,h))continue;const p={delay:n,...Me(o||{},h)};let m=!1;if(window.MotionHandoffAnimation){const v=Hs(t);if(v){const T=window.MotionHandoffAnimation(v,h,C);T!==null&&(p.startTime=T,m=!0)}}ge(t,h),f.start(en(h,f,d,t.shouldReduceMotion&&$s.has(h)?{type:!1}:p,t,m));const y=f.animation;y&&u.push(y)}return a&&Promise.all(u).then(()=>{C.update(()=>{a&&gr(t,a)})}),u}function Ve(t,e,n={}){var s;const i=Qt(t,e,n.type==="exit"?(s=t.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:r=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);const o=i?()=>Promise.all(wi(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:f}=r;return Oa(t,e,c+u,h,f,n)}:()=>Promise.resolve(),{when:l}=r;if(l){const[u,c]=l==="beforeChildren"?[o,a]:[a,o];return u().then(()=>c())}else return Promise.all([o(),a(n.delay)])}function Oa(t,e,n=0,s=0,i=1,r){const o=[],a=(t.variantChildren.size-1)*s,l=i===1?(u=0)=>u*s:(u=0)=>a-u*s;return Array.from(t.variantChildren).sort(Ua).forEach((u,c)=>{u.notify("AnimationStart",e),o.push(Ve(u,e,{...r,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(o)}function Ua(t,e){return t.sortNodePosition(e)}function Na(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>Ve(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=Ve(t,e,n);else{const i=typeof e=="function"?Qt(t,e,n.custom):e;s=Promise.all(wi(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const _a=Le.length;function Ai(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Ai(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<_a;n++){const s=Le[n],i=t.props[s];(At(i)||i===!1)&&(e[s]=i)}return e}const Ka=[...Ee].reverse(),Wa=Ee.length;function Ga(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Na(t,n,s)))}function $a(t){let e=Ga(t),n=Mn(),s=!0;const i=l=>(u,c)=>{var h;const f=Qt(t,c,l==="exit"?(h=t.presenceContext)===null||h===void 0?void 0:h.custom:void 0);if(f){const{transition:d,transitionEnd:p,...m}=f;u={...u,...m,...p}}return u};function r(l){e=l(t)}function o(l){const{props:u}=t,c=Ai(t.parent)||{},h=[],f=new Set;let d={},p=1/0;for(let y=0;y<Wa;y++){const v=Ka[y],T=n[v],P=u[v]!==void 0?u[v]:c[v],w=At(P),x=v===l?T.isActive:null;x===!1&&(p=y);let A=P===c[v]&&P!==u[v]&&w;if(A&&s&&t.manuallyAnimateOnMount&&(A=!1),T.protectedKeys={...d},!T.isActive&&x===null||!P&&!T.prevProp||Zt(P)||typeof P=="boolean")continue;const M=za(T.prevProp,P);let V=M||v===l&&T.isActive&&!A&&w||y>p&&w,F=!1;const O=Array.isArray(P)?P:[P];let ot=O.reduce(i(v),{});x===!1&&(ot={});const{prevResolvedValues:sn={}}=T,qi={...sn,...ot},on=k=>{V=!0,f.has(k)&&(F=!0,f.delete(k)),T.needsAnimating[k]=!0;const G=t.getValue(k);G&&(G.liveStyle=!1)};for(const k in qi){const G=ot[k],ee=sn[k];if(d.hasOwnProperty(k))continue;let ne=!1;me(G)&&me(ee)?ne=!Gs(G,ee):ne=G!==ee,ne?G!=null?on(k):f.add(k):G!==void 0&&f.has(k)?on(k):T.protectedKeys[k]=!0}T.prevProp=P,T.prevResolvedValues=ot,T.isActive&&(d={...d,...ot}),s&&t.blockInitialAnimation&&(V=!1),V&&(!(A&&M)||F)&&h.push(...O.map(k=>({animation:k,options:{type:v}})))}if(f.size){const y={};f.forEach(v=>{const T=t.getBaseTarget(v),P=t.getValue(v);P&&(P.liveStyle=!0),y[v]=T??null}),h.push({animation:y})}let m=!!h.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(m=!1),s=!1,m?e(h):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=t.variantChildren)===null||c===void 0||c.forEach(f=>{var d;return(d=f.animationState)===null||d===void 0?void 0:d.setActive(l,u)}),n[l].isActive=u;const h=o(l);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n,reset:()=>{n=Mn(),s=!0}}}function za(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Gs(e,t):!1}function Q(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Mn(){return{animate:Q(!0),whileInView:Q(),whileHover:Q(),whileTap:Q(),whileDrag:Q(),whileFocus:Q(),exit:Q()}}class J{constructor(e){this.isMounted=!1,this.node=e}update(){}}class Ha extends J{constructor(e){super(e),e.animationState||(e.animationState=$a(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Zt(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let Xa=0;class Ya extends J{constructor(){super(...arguments),this.id=Xa++}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 qa={animation:{Feature:Ha},exit:{Feature:Ya}};function Dt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function Lt(t){return{point:{x:t.pageX,y:t.pageY}}}const Za=t=>e=>Vs(e)&&t(e,Lt(e));function Tt(t,e,n,s){return Dt(t,e,Za(n),s)}const Rn=(t,e)=>Math.abs(t-e);function Ja(t,e){const n=Rn(t.x,e.x),s=Rn(t.y,e.y);return Math.sqrt(n**2+s**2)}class Ci{constructor(e,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=ue(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,d=Ja(h.offset,{x:0,y:0})>=3;if(!f&&!d)return;const{point:p}=h,{timestamp:m}=E;this.history.push({...p,timestamp:m});const{onStart:y,onMove:v}=this.handlers;f||(y&&y(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=le(f,this.transformPagePoint),C.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:d,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=ue(h.type==="pointercancel"?this.lastMoveEventInfo:le(f,this.transformPagePoint),this.history);this.startEvent&&d&&d(h,y),p&&p(h,y)},!Vs(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const o=Lt(e),a=le(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=E;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=n;c&&c(e,ue(a,this.history)),this.removeListeners=Et(Tt(this.contextWindow,"pointermove",this.handlePointerMove),Tt(this.contextWindow,"pointerup",this.handlePointerUp),Tt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),H(this.updatePoint)}}function le(t,e){return e?{point:e(t.point)}:t}function En(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ue({point:t},e){return{point:t,delta:En(t,bi(e)),offset:En(t,Qa(e)),velocity:tl(e,.1)}}function Qa(t){return t[0]}function bi(t){return t[t.length-1]}function tl(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=bi(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>z(e)));)n--;if(!s)return{x:0,y:0};const r=$(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const Di=1e-4,el=1-Di,nl=1+Di,Mi=.01,sl=0-Mi,il=0+Mi;function I(t){return t.max-t.min}function ol(t,e,n){return Math.abs(t-e)<=n}function Ln(t,e,n,s=.5){t.origin=s,t.originPoint=b(e.min,e.max,t.origin),t.scale=I(n)/I(e),t.translate=b(n.min,n.max,t.origin)-t.originPoint,(t.scale>=el&&t.scale<=nl||isNaN(t.scale))&&(t.scale=1),(t.translate>=sl&&t.translate<=il||isNaN(t.translate))&&(t.translate=0)}function Pt(t,e,n,s){Ln(t.x,e.x,n.x,s?s.originX:void 0),Ln(t.y,e.y,n.y,s?s.originY:void 0)}function Fn(t,e,n){t.min=n.min+e.min,t.max=t.min+I(e)}function rl(t,e,n){Fn(t.x,e.x,n.x),Fn(t.y,e.y,n.y)}function Bn(t,e,n){t.min=e.min-n.min,t.max=t.min+I(e)}function St(t,e,n){Bn(t.x,e.x,n.x),Bn(t.y,e.y,n.y)}function al(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?b(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?b(n,t,s.max):Math.min(t,n)),t}function kn(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 ll(t,{top:e,left:n,bottom:s,right:i}){return{x:kn(t.x,n,i),y:kn(t.y,e,s)}}function jn(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 ul(t,e){return{x:jn(t.x,e.x),y:jn(t.y,e.y)}}function cl(t,e){let n=.5;const s=I(t),i=I(e);return i>s?n=Vt(e.min,e.max-s,t.min):s>i&&(n=Vt(t.min,t.max-i,e.min)),X(0,1,n)}function hl(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 we=.35;function fl(t=we){return t===!1?t=0:t===!0&&(t=we),{x:In(t,"left","right"),y:In(t,"top","bottom")}}function In(t,e,n){return{min:On(t,e),max:On(t,n)}}function On(t,e){return typeof t=="number"?t:t[e]||0}const Un=()=>({translate:0,scale:1,origin:0,originPoint:0}),lt=()=>({x:Un(),y:Un()}),Nn=()=>({min:0,max:0}),R=()=>({x:Nn(),y:Nn()});function N(t){return[t("x"),t("y")]}function Ri({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function dl({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function pl(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 ce(t){return t===void 0||t===1}function Ae({scale:t,scaleX:e,scaleY:n}){return!ce(t)||!ce(e)||!ce(n)}function tt(t){return Ae(t)||Ei(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Ei(t){return _n(t.x)||_n(t.y)}function _n(t){return t&&t!=="0%"}function $t(t,e,n){const s=t-n,i=e*s;return n+i}function Kn(t,e,n,s,i){return i!==void 0&&(t=$t(t,i,s)),$t(t,n,s)+e}function Ce(t,e=0,n=1,s,i){t.min=Kn(t.min,e,n,s,i),t.max=Kn(t.max,e,n,s,i)}function Li(t,{x:e,y:n}){Ce(t.x,e.translate,e.scale,e.originPoint),Ce(t.y,n.translate,n.scale,n.originPoint)}const Wn=.999999999999,Gn=1.0000000000001;function ml(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const{visualElement:l}=r.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&ct(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,Li(t,o)),s&&tt(r.latestValues)&&ct(t,r.latestValues))}e.x<Gn&&e.x>Wn&&(e.x=1),e.y<Gn&&e.y>Wn&&(e.y=1)}function ut(t,e){t.min=t.min+e,t.max=t.max+e}function $n(t,e,n,s,i=.5){const r=b(t.min,t.max,i);Ce(t,e,n,r,s)}function ct(t,e){$n(t.x,e.x,e.scaleX,e.scale,e.originX),$n(t.y,e.y,e.scaleY,e.scale,e.originY)}function Fi(t,e){return Ri(pl(t.getBoundingClientRect(),e))}function gl(t,e,n){const s=Fi(t,n),{scroll:i}=e;return i&&(ut(s.x,i.offset.x),ut(s.y,i.offset.y)),s}const Bi=({current:t})=>t?t.ownerDocument.defaultView:null,yl=new WeakMap;class vl{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=R(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Lt(c).point)},r=(c,h)=>{const{drag:f,dragPropagation:d,onDragStart:p}=this.getProps();if(f&&!d&&(this.openDragLock&&this.openDragLock(),this.openDragLock=oo(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),N(y=>{let v=this.getAxisMotionValue(y).get()||0;if(K.test(v)){const{projection:T}=this.visualElement;if(T&&T.layout){const P=T.layout.layoutBox[y];P&&(v=I(P)*(parseFloat(v)/100))}}this.originPoint[y]=v}),p&&C.postRender(()=>p(c,h)),ge(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},o=(c,h)=>{const{dragPropagation:f,dragDirectionLock:d,onDirectionLock:p,onDrag:m}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:y}=h;if(d&&this.currentDirection===null){this.currentDirection=xl(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",h.point,y),this.updateAxis("y",h.point,y),this.visualElement.render(),m&&m(c,h)},a=(c,h)=>this.stop(c,h),l=()=>N(c=>{var h;return this.getAnimationState(c)==="paused"&&((h=this.getAxisMotionValue(c).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Ci(e,{onSessionStart:i,onStart:r,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Bi(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&C.postRender(()=>r(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!jt(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=al(o,this.constraints[e],this.elastic[e])),r.set(o)}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,r=this.constraints;n&&rt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=ll(i.layoutBox,n):this.constraints=!1,this.elastic=fl(s),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&N(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=hl(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!rt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=gl(s,i.root,this.visualElement.getTransformPagePoint());let o=ul(i.layout.layoutBox,r);if(n){const a=n(dl(o));this.hasMutatedConstraints=!!a,a&&(o=Ri(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=N(c=>{if(!jt(c,n,this.currentDirection))return;let h=l&&l[c]||{};o&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,p={type:"inertia",velocity:s?e[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return ge(this.visualElement,e),s.start(en(e,s,0,n,this.visualElement,!1))}stopAnimation(){N(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){N(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){N(n=>{const{drag:s}=this.getProps();if(!jt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];r.set(e[n]-b(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!rt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};N(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=cl({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),N(o=>{if(!jt(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(b(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;yl.set(this.visualElement,this);const e=this.visualElement.current,n=Tt(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();rt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,r=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),C.read(s);const o=Dt(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(N(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=l[c].translate,h.set(h.get()+l[c].translate))}),this.visualElement.render())}));return()=>{o(),n(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=we,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function jt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function xl(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Tl extends J{constructor(e){super(e),this.removeGroupControls=_,this.removeListeners=_,this.controls=new vl(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||_}unmount(){this.removeGroupControls(),this.removeListeners()}}const zn=t=>(e,n)=>{t&&C.postRender(()=>t(e,n))};class Pl extends J{constructor(){super(...arguments),this.removePointerDownListener=_}onPointerDown(e){this.session=new Ci(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Bi(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:zn(e),onStart:zn(n),onMove:s,onEnd:(r,o)=>{delete this.session,i&&C.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=Tt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ut={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Hn(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const gt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(S.test(t))t=parseFloat(t);else return t;const n=Hn(t,e.target.x),s=Hn(t,e.target.y);return`${n}% ${s}%`}},Sl={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=q.parse(t);if(i.length>5)return s;const r=q.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const u=b(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),r(i)}};class Vl extends g.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;er(wl),r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),Ut.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,o=s.projection;return o&&(o.isPresent=r,i||e.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||C.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Be.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 ki(t){const[e,n]=ws(),s=g.useContext(wt);return j.jsx(Vl,{...t,layoutGroup:s,switchLayoutGroup:g.useContext(Es),isPresent:e,safeToRemove:n})}const wl={borderRadius:{...gt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:gt,borderTopRightRadius:gt,borderBottomLeftRadius:gt,borderBottomRightRadius:gt,boxShadow:Sl};function Al(t,e,n){const s=L(t)?t:ft(t);return s.start(en("",s,e,n)),s.animation}function Cl(t){return t instanceof SVGElement&&t.tagName!=="svg"}const bl=(t,e)=>t.depth-e.depth;class Dl{constructor(){this.children=[],this.isDirty=!1}add(e){Ge(this.children,e),this.isDirty=!0}remove(e){$e(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(bl),this.isDirty=!1,this.children.forEach(e)}}function Ml(t,e){const n=W.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(H(s),t(r-e))};return C.read(s,!0),()=>H(s)}const ji=["TopLeft","TopRight","BottomLeft","BottomRight"],Rl=ji.length,Xn=t=>typeof t=="string"?parseFloat(t):t,Yn=t=>typeof t=="number"||S.test(t);function El(t,e,n,s,i,r){i?(t.opacity=b(0,n.opacity!==void 0?n.opacity:1,Ll(s)),t.opacityExit=b(e.opacity!==void 0?e.opacity:1,0,Fl(s))):r&&(t.opacity=b(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let o=0;o<Rl;o++){const a=`border${ji[o]}Radius`;let l=qn(e,a),u=qn(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Yn(l)===Yn(u)?(t[a]=Math.max(b(Xn(l),Xn(u),s),0),(K.test(u)||K.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=b(e.rotate||0,n.rotate||0,s))}function qn(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Ll=Ii(0,.5,ti),Fl=Ii(.5,.95,_);function Ii(t,e,n){return s=>s<t?0:s>e?1:n(Vt(t,e,s))}function Zn(t,e){t.min=e.min,t.max=e.max}function U(t,e){Zn(t.x,e.x),Zn(t.y,e.y)}function Jn(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Qn(t,e,n,s,i){return t-=e,t=$t(t,1/n,s),i!==void 0&&(t=$t(t,1/i,s)),t}function Bl(t,e=0,n=1,s=.5,i,r=t,o=t){if(K.test(e)&&(e=parseFloat(e),e=b(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=b(r.min,r.max,s);t===r&&(a-=e),t.min=Qn(t.min,e,n,a,i),t.max=Qn(t.max,e,n,a,i)}function ts(t,e,[n,s,i],r,o){Bl(t,e[n],e[s],e[i],e.scale,r,o)}const kl=["x","scaleX","originX"],jl=["y","scaleY","originY"];function es(t,e,n,s){ts(t.x,e,kl,n?n.x:void 0,s?s.x:void 0),ts(t.y,e,jl,n?n.y:void 0,s?s.y:void 0)}function ns(t){return t.translate===0&&t.scale===1}function Oi(t){return ns(t.x)&&ns(t.y)}function ss(t,e){return t.min===e.min&&t.max===e.max}function Il(t,e){return ss(t.x,e.x)&&ss(t.y,e.y)}function is(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Ui(t,e){return is(t.x,e.x)&&is(t.y,e.y)}function os(t){return I(t.x)/I(t.y)}function rs(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Ol{constructor(){this.members=[]}add(e){Ge(this.members,e),e.scheduleRender()}remove(e){if($e(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 r=this.members[i];if(r.isPresent!==!1){s=r;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 Ul(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:f,skewX:d,skewY:p}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),d&&(s+=`skewX(${d}deg) `),p&&(s+=`skewY(${p}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 et={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},yt=typeof window<"u"&&window.MotionDebug!==void 0,he=["","X","Y","Z"],Nl={visibility:"hidden"},as=1e3;let _l=0;function fe(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Ni(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Hs(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",C,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&Ni(s)}function _i({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=_l++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,yt&&(et.totalNodes=et.resolvedTargetDeltas=et.recalculatedProjection=0),this.nodes.forEach(Gl),this.nodes.forEach(Yl),this.nodes.forEach(ql),this.nodes.forEach($l),yt&&window.MotionDebug.record(et)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Dl)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new ze),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Cl(o),this.instance=o;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),t){let h;const f=()=>this.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=Ml(f,250),Ut.hasAnimatedSinceResize&&(Ut.hasAnimatedSinceResize=!1,this.nodes.forEach(us))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeTargetChanged:d,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||eu,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=c.getProps(),T=!this.targetLayout||!Ui(this.targetLayout,p)||d,P=!f&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||P||f&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,P);const w={...Me(m,"layout"),onPlay:y,onComplete:v};(c.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w)}else f||us(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,H(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(Zl),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ni(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];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 u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ls);return}this.isUpdating||this.nodes.forEach(Hl),this.isUpdating=!1,this.nodes.forEach(Xl),this.nodes.forEach(Kl),this.nodes.forEach(Wl),this.clearAllSnapshots();const a=W.now();E.delta=X(0,1e3/60,a-E.timestamp),E.timestamp=a,E.isProcessing=!0,se.update.process(E),se.preRender.process(E),se.render.process(E),E.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Be.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(zl),this.sharedNodes.forEach(Jl)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,C.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){C.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 o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=R(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Oi(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&(a||tt(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),nu(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:a}=this.options;if(!a)return R();const l=a.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(su))){const{scroll:c}=this.root;c&&(ut(l.x,c.offset.x),ut(l.y,c.offset.y))}return l}removeElementScroll(o){var a;const l=R();if(U(l,o),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:h,options:f}=c;c!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&U(l,o),ut(l.x,h.offset.x),ut(l.y,h.offset.y))}return l}applyTransform(o,a=!1){const l=R();U(l,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&ct(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),tt(c.latestValues)&&ct(l,c.latestValues)}return tt(this.latestValues)&&ct(l,this.latestValues),l}removeTransform(o){const a=R();U(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!tt(u.latestValues))continue;Ae(u.latestValues)&&u.updateSnapshot();const c=R(),h=u.measurePageBox();U(c,h),es(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return tt(this.latestValues)&&es(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==E.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:f}=this.options;if(!(!this.layout||!(h||f))){if(this.resolvedRelativeTargetAt=E.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=R(),this.relativeTargetOrigin=R(),St(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),U(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=R(),this.targetWithTransforms=R()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),rl(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):U(this.target,this.layout.layoutBox),Li(this.target,this.targetDelta)):U(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=R(),this.relativeTargetOrigin=R(),St(this.relativeTargetOrigin,this.target,d.target),U(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}yt&&et.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Ae(this.parent.latestValues)||Ei(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===E.timestamp&&(u=!1),u)return;const{layout:c,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||!(c||h))return;U(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;ml(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=R());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Jn(this.prevProjectionDelta.x,this.projectionDelta.x),Jn(this.prevProjectionDelta.y,this.projectionDelta.y)),Pt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!rs(this.projectionDelta.x,this.prevProjectionDelta.x)||!rs(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),yt&&et.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=lt(),this.projectionDelta=lt(),this.projectionDeltaWithTransform=lt()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=lt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=R(),d=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=d!==p,y=this.getStack(),v=!y||y.members.length<=1,T=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(tu));this.animationProgress=0;let P;this.mixTargetDelta=w=>{const x=w/1e3;cs(h.x,o.x,x),cs(h.y,o.y,x),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(St(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Ql(this.relativeTarget,this.relativeTargetOrigin,f,x),P&&Il(this.relativeTarget,P)&&(this.isProjectionDirty=!1),P||(P=R()),U(P,this.relativeTarget)),m&&(this.animationValues=c,El(c,u,this.latestValues,x,T,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=x},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(H(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=C.update(()=>{Ut.hasAnimatedSinceResize=!0,this.currentAnimation=Al(0,as,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(as),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&Ki(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||R();const h=I(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=I(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}U(a,l),ct(a,c),Pt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Ol),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&fe("z",o,u,this.animationValues);for(let c=0;c<he.length;c++)fe(`rotate${he[c]}`,o,u,this.animationValues),fe(`skew${he[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}getProjectionStyles(o){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Nl;const u={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=It(o==null?void 0:o.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=It(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!tt(this.latestValues)&&(m.transform=c?c({},""):"none",this.hasProjected=!1),m}const f=h.animationValues||h.latestValues;this.applyTransformsToTarget(),u.transform=Ul(this.projectionDeltaWithTransform,this.treeScale,f),c&&(u.transform=c(f,u.transform));const{x:d,y:p}=this.projectionDelta;u.transformOrigin=`${d.origin*100}% ${p.origin*100}% 0`,h.animationValues?u.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:u.opacity=h===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const m in _t){if(f[m]===void 0)continue;const{correct:y,applyTo:v}=_t[m],T=u.transform==="none"?f[m]:y(f[m],h);if(v){const P=v.length;for(let w=0;w<P;w++)u[v[w]]=T}else u[m]=T}return this.options.layoutId&&(u.pointerEvents=h===this?It(o==null?void 0:o.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(ls),this.root.sharedNodes.clear()}}}function Kl(t){t.updateLayout()}function Wl(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:r}=t.options,o=n.source!==t.layout.source;r==="size"?N(h=>{const f=o?n.measuredBox[h]:n.layoutBox[h],d=I(f);f.min=s[h].min,f.max=f.min+d}):Ki(r,n.layoutBox,s)&&N(h=>{const f=o?n.measuredBox[h]:n.layoutBox[h],d=I(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=lt();Pt(a,s,n.layoutBox);const l=lt();o?Pt(l,t.applyTransform(i,!0),n.measuredBox):Pt(l,s,n.layoutBox);const u=!Oi(a);let c=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const p=R();St(p,n.layoutBox,f.layoutBox);const m=R();St(m,s,d.layoutBox),Ui(p,m)||(c=!0),h.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=p,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Gl(t){yt&&et.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 $l(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function zl(t){t.clearSnapshot()}function ls(t){t.clearMeasurements()}function Hl(t){t.isLayoutDirty=!1}function Xl(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function us(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Yl(t){t.resolveTargetDelta()}function ql(t){t.calcProjection()}function Zl(t){t.resetSkewAndRotation()}function Jl(t){t.removeLeadSnapshot()}function cs(t,e,n){t.translate=b(e.translate,0,n),t.scale=b(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function hs(t,e,n,s){t.min=b(e.min,n.min,s),t.max=b(e.max,n.max,s)}function Ql(t,e,n,s){hs(t.x,e.x,n.x,s),hs(t.y,e.y,n.y,s)}function tu(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const eu={duration:.45,ease:[.4,0,.1,1]},fs=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ds=fs("applewebkit/")&&!fs("chrome/")?Math.round:_;function ps(t){t.min=ds(t.min),t.max=ds(t.max)}function nu(t){ps(t.x),ps(t.y)}function Ki(t,e,n){return t==="position"||t==="preserve-aspect"&&!ol(os(e),os(n),.2)}function su(t){var e;return t!==t.root&&((e=t.scroll)===null||e===void 0?void 0:e.wasRoot)}const iu=_i({attachResizeListener:(t,e)=>Dt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),de={current:void 0},Wi=_i({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!de.current){const t=new iu({});t.mount(window),t.setOptions({layoutScroll:!0}),de.current=t}return de.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),ou={pan:{Feature:Pl},drag:{Feature:Tl,ProjectionNode:Wi,MeasureLayout:ki}};function ms(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=s[i];r&&C.postRender(()=>r(e,Lt(e)))}class ru extends J{mount(){const{current:e}=this.node;e&&(this.unmount=ro(e,n=>(ms(this.node,n,"Start"),s=>ms(this.node,s,"End"))))}unmount(){}}class au extends J{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=Et(Dt(this.node.current,"focus",()=>this.onFocus()),Dt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function gs(t,e,n){const{props:s}=t;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),r=s[i];r&&C.postRender(()=>r(e,Lt(e)))}class lu extends J{mount(){const{current:e}=this.node;e&&(this.unmount=ao(e,n=>(gs(this.node,n,"Start"),(s,{success:i})=>gs(this.node,s,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const be=new WeakMap,pe=new WeakMap,uu=t=>{const e=be.get(t.target);e&&e(t)},cu=t=>{t.forEach(uu)};function hu({root:t,...e}){const n=t||document;pe.has(n)||pe.set(n,{});const s=pe.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(cu,{root:t,...e})),s[i]}function fu(t,e,n){const s=hu(e);return be.set(t,n),s.observe(t),()=>{be.delete(t),s.unobserve(t)}}const du={some:0,all:1};class pu extends J{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:r}=e,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:du[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,r&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=u?c:h;f&&f(l)};return fu(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(mu(e,n))&&this.startObserver()}unmount(){}}function mu({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const gu={inView:{Feature:pu},tap:{Feature:lu},focus:{Feature:au},hover:{Feature:ru}},yu={layout:{ProjectionNode:Wi,MeasureLayout:ki}},zt={current:null},nn={current:!1};function Gi(){if(nn.current=!0,!!Re)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>zt.current=t.matches;t.addListener(e),e()}else zt.current=!1}const vu=[...pi,B,q],xu=t=>vu.find(di(t)),ys=new WeakMap;function Tu(t,e,n){for(const s in e){const i=e[s],r=n[s];if(L(i))t.addValue(s,i);else if(L(r))t.addValue(s,ft(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,ft(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const vs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Pu{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Je,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=W.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,C.render(this.render,!1,!0))};const{latestValues:l,renderState:u,onUpdate:c}=o;this.onUpdate=c,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=Jt(n),this.isVariantNode=Ms(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const p=f[d];l[d]!==void 0&&L(p)&&p.set(l[d],!1)}}mount(e){this.current=e,ys.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)),nn.current||Gi(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:zt.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){ys.delete(this.current),this.projection&&this.projection.unmount(),H(this.notifyUpdate),H(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=it.has(e),i=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&C.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),r=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in ht){const n=ht[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):R()}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<vs.length;s++){const i=vs[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=Tu(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const 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=ft(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"&&(hi(i)||ni(i))?i=parseFloat(i):!xu(i)&&q.test(n)&&(i=li(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 o=je(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[e])}if(s&&i!==void 0)return i;const r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!L(r)?r:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new ze),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class $i extends Pu{constructor(){super(...arguments),this.KeyframeResolver=mi}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]}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}`)}))}}function Su(t){return window.getComputedStyle(t)}class Vu extends $i{constructor(){super(...arguments),this.type="html",this.renderInstance=Os}readValueFromInstance(e,n){if(it.has(n)){const s=Ze(n);return s&&s.default||0}else{const s=Su(e),i=(ks(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Fi(e,n)}build(e,n,s){Ue(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return We(e,n,s)}}class wu extends $i{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=R}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(it.has(n)){const s=Ze(n);return s&&s.default||0}return n=Us.has(n)?n:Fe(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Ks(e,n,s)}build(e,n,s){Ne(e,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,n,s,i){Ns(e,n,s,i)}mount(e){this.isSVGTag=Ke(e.tagName),super.mount(e)}}const Au=(t,e)=>ke(t)?new wu(e):new Vu(e,{allowProjection:t!==g.Fragment}),Cu=cr({...qa,...gu,...ou,...yu},Au),zi=Ao(Cu);function Hi(t){const e=Z(()=>ft(t)),{isStatic:n}=g.useContext(Xt);if(n){const[,s]=g.useState(t);g.useEffect(()=>e.on("change",s),[])}return e}function Xi(t,e){const n=Hi(e()),s=()=>n.set(e());return s(),Yt(()=>{const i=()=>C.preRender(s,!1,!0),r=t.map(o=>o.on("change",i));return()=>{r.forEach(o=>o()),H(s)}}),n}const bu=t=>t&&typeof t=="object"&&t.mix,Du=t=>bu(t)?t.mix:void 0;function Mu(...t){const e=!Array.isArray(t[0]),n=e?0:-1,s=t[0+n],i=t[1+n],r=t[2+n],o=t[3+n],a=Si(i,r,{mixer:Du(r[0]),...o});return e?a(s):a}function Ru(t){vt.current=[],t();const e=Xi(vt.current,t);return vt.current=void 0,e}function Eu(t,e,n,s){if(typeof t=="function")return Ru(t);const i=typeof e=="function"?e:Mu(e,n,s);return Array.isArray(t)?xs(t,i):xs([t],([r])=>i(r))}function xs(t,e){const n=Z(()=>[]);return Xi(t,()=>{n.length=0;const s=t.length;for(let i=0;i<s;i++)n[i]=t[i].get();return e(n)})}function zu(){!nn.current&&Gi();const[t]=g.useState(zt.current);return t}class Lu{constructor(){this.componentControls=new Set}subscribe(e){return this.componentControls.add(e),()=>this.componentControls.delete(e)}start(e,n){this.componentControls.forEach(s=>{s.start(e.nativeEvent||e,n)})}}const Fu=()=>new Lu;function Hu(){return Z(Fu)}const Yi=g.createContext(null);function Bu(t,e,n,s){if(!s)return t;const i=t.findIndex(c=>c.value===e);if(i===-1)return t;const r=s>0?1:-1,o=t[i+r];if(!o)return t;const a=t[i],l=o.layout,u=b(l.min,l.max,.5);return r===1&&a.layout.max+n>u||r===-1&&a.layout.min+n<u?fr(t,i,i+r):t}function ku({children:t,as:e="ul",axis:n="y",onReorder:s,values:i,...r},o){const a=Z(()=>zi[e]),l=[],u=g.useRef(!1),c={axis:n,registerItem:(h,f)=>{const d=l.findIndex(p=>h===p.value);d!==-1?l[d].layout=f[n]:l.push({value:h,layout:f[n]}),l.sort(Iu)},updateOrder:(h,f,d)=>{if(u.current)return;const p=Bu(l,h,f,d);l!==p&&(u.current=!0,s(p.map(ju).filter(m=>i.indexOf(m)!==-1)))}};return g.useEffect(()=>{u.current=!1}),j.jsx(a,{...r,ref:o,ignoreStrict:!0,children:j.jsx(Yi.Provider,{value:c,children:t})})}const Xu=g.forwardRef(ku);function ju(t){return t.value}function Iu(t,e){return t.layout.min-e.layout.min}function Ts(t,e=0){return L(t)?t:Hi(e)}function Ou({children:t,style:e={},value:n,as:s="li",onDrag:i,layout:r=!0,...o},a){const l=Z(()=>zi[s]),u=g.useContext(Yi),c={x:Ts(e.x),y:Ts(e.y)},h=Eu([c.x,c.y],([m,y])=>m||y?1:"unset"),{axis:f,registerItem:d,updateOrder:p}=u;return j.jsx(l,{drag:f,...o,dragSnapToOrigin:!0,style:{...e,x:c.x,y:c.y,zIndex:h},layout:r,onDrag:(m,y)=>{const{velocity:v}=y;v[f]&&p(n,c[f].get(),v[f]),i&&i(m,y)},onLayoutMeasure:m=>d(n,m),ref:a,ignoreStrict:!0,children:t})}const Yu=g.forwardRef(Ou);export{Wu as A,Gu as L,Xu as R,Yu as a,Hu as b,zi as m,zu as u};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as l,j as e}from"./cNrhgGc1.js";import{e as r,y as u,E as j,r as f}from"./Bp3N-QL5.js";import"./C-KIc3Wc.js";import"./BJgZIVUQ.js";import"./CxQ08qFN.js";function c(a){if(!a)return"unknown";try{return f(a)}catch{return"unknown"}}function k({open:a,onClose:o,outbox:t,onOpenSettings:p,onRefresh:m}){const[x,d]=l.useState(!1),h=l.useMemo(()=>Object.entries(t.pendingByQueue??{}).filter(([,s])=>typeof s=="number"&&s>0).sort((s,b)=>b[1]-s[1]),[t.pendingByQueue]),n=l.useMemo(()=>t.replayStatus==="error"?r.red:t.pendingTotal>0?r.amber:r.textMuted,[t.pendingTotal,t.replayStatus]),y=async()=>{try{await navigator.clipboard.writeText(JSON.stringify(t,null,2)),d(!0),setTimeout(()=>d(!1),1200)}catch{}};return e.jsx(u,{open:a,onClose:o,maxWidth:"max-w-3xl",fitContent:!0,children:e.jsxs("div",{className:"flex w-full flex-col",children:[e.jsxs("div",{className:"border-b border-subtle px-5 pt-5 pb-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("h3",{className:"inline-flex items-center gap-2 text-heading font-semibold text-white",children:[e.jsx(j,{type:"outbox",size:14}),e.jsx("span",{className:"truncate",children:"Outbox"}),e.jsx("span",{className:"rounded-full border px-2 py-0.5 text-caption font-semibold",style:{borderColor:`${n}30`,backgroundColor:`${n}14`,color:n},children:t.pendingTotal})]}),e.jsx("p",{className:"mt-1 text-body leading-relaxed text-secondary",children:"Buffered updates queued for replay to OrgX when connectivity is healthy."})]}),e.jsx("button",{type:"button",onClick:o,className:"rounded-md border border-strong bg-white/[0.03] px-2.5 py-1.5 text-caption text-primary transition-colors hover:bg-white/[0.08]","aria-label":"Close outbox modal",children:"Close"})]}),e.jsxs("div",{className:"mt-3 grid grid-cols-1 gap-2 sm:grid-cols-2",children:[e.jsxs("div",{className:"rounded-xl border border-white/[0.08] bg-white/[0.02] px-3 py-2",children:[e.jsx("p",{className:"text-micro uppercase tracking-[0.12em] text-secondary",children:"Replay status"}),e.jsx("p",{className:"mt-1 text-body font-semibold",style:{color:n},children:t.replayStatus}),t.lastReplayError&&t.replayStatus==="error"&&e.jsx("p",{className:"mt-1 line-clamp-2 text-caption text-red-200/75",children:t.lastReplayError})]}),e.jsxs("div",{className:"rounded-xl border border-white/[0.08] bg-white/[0.02] px-3 py-2",children:[e.jsx("p",{className:"text-micro uppercase tracking-[0.12em] text-secondary",children:"Window"}),e.jsxs("p",{className:"mt-1 text-caption text-primary",children:["Oldest: ",e.jsx("span",{className:"font-semibold text-white",children:c(t.oldestEventAt)})]}),e.jsxs("p",{className:"mt-0.5 text-caption text-primary",children:["Newest: ",e.jsx("span",{className:"font-semibold text-white",children:c(t.newestEventAt)})]})]})]})]}),e.jsx("div",{className:"px-5 py-4",children:t.pendingTotal===0?e.jsx("div",{className:"rounded-xl border border-subtle bg-white/[0.02] p-4 text-body text-secondary",children:"Outbox is empty."}):e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("p",{className:"text-caption font-semibold uppercase tracking-[0.12em] text-secondary",children:"Queues"}),e.jsx("button",{type:"button",onClick:y,className:"rounded-md border border-strong bg-white/[0.03] px-2.5 py-1.5 text-caption text-secondary transition-colors hover:bg-white/[0.08]",children:x?"Copied":"Copy JSON"})]}),e.jsx("div",{className:"space-y-1.5",children:h.map(([i,s])=>e.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-xl border border-white/[0.08] bg-white/[0.02] px-3 py-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-body font-medium text-white",children:i}),e.jsxs("p",{className:"mt-0.5 text-micro text-secondary",children:[s," event",s===1?"":"s"]})]}),e.jsx("span",{className:"rounded-full border px-2 py-0.5 text-caption font-semibold",style:{borderColor:`${r.amber}30`,backgroundColor:`${r.amber}14`,color:r.amber},children:s})]},i))}),e.jsx("div",{className:"rounded-xl border border-subtle bg-white/[0.02] px-3 py-2 text-caption text-secondary",children:"Replay is handled automatically by the OrgX sync service. If events stay queued, check Settings for API key and last replay errors."})]})}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-subtle px-5 py-3",children:[e.jsx("button",{type:"button",onClick:m,className:"rounded-md border border-strong bg-white/[0.03] px-3 py-1.5 text-caption text-primary transition-colors hover:bg-white/[0.08]",children:"Refresh"}),e.jsx("button",{type:"button",onClick:p,className:"rounded-md border border-lime/25 bg-lime/10 px-3 py-1.5 text-caption font-semibold text-lime transition-colors hover:bg-lime/20",children:"Open settings"})]})]})})}export{k as BulkOutboxModal};
|
|
Binary file
|
|
Binary file
|