@useorgx/openclaw-plugin 0.7.8 → 0.7.15
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/0RUEVzJa.js +1 -0
- package/dashboard/dist/assets/0RUEVzJa.js.br +0 -0
- package/dashboard/dist/assets/0RUEVzJa.js.gz +0 -0
- package/dashboard/dist/assets/3TtV4moZ.js +1 -0
- package/dashboard/dist/assets/3TtV4moZ.js.br +0 -0
- package/dashboard/dist/assets/3TtV4moZ.js.gz +0 -0
- package/dashboard/dist/assets/3VwNyxUf.js +1 -0
- package/dashboard/dist/assets/3VwNyxUf.js.br +0 -0
- package/dashboard/dist/assets/3VwNyxUf.js.gz +0 -0
- package/dashboard/dist/assets/{DpuQm1oF.js → 7DhYqBrM.js} +2 -2
- package/dashboard/dist/assets/7DhYqBrM.js.br +0 -0
- package/dashboard/dist/assets/7DhYqBrM.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/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/BVvffj0x.js +1 -0
- package/dashboard/dist/assets/BVvffj0x.js.br +0 -0
- package/dashboard/dist/assets/BVvffj0x.js.gz +0 -0
- package/dashboard/dist/assets/BiOgVMED.js +1 -0
- package/dashboard/dist/assets/BiOgVMED.js.br +0 -0
- package/dashboard/dist/assets/BiOgVMED.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/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/C91KLKit.js +1 -0
- package/dashboard/dist/assets/C91KLKit.js.br +0 -0
- package/dashboard/dist/assets/C91KLKit.js.gz +0 -0
- package/dashboard/dist/assets/{CnitK1MX.js → C9fvfXmS.js} +1 -1
- package/dashboard/dist/assets/C9fvfXmS.js.br +0 -0
- package/dashboard/dist/assets/C9fvfXmS.js.gz +0 -0
- package/dashboard/dist/assets/CFZ4Swr5.js +1 -0
- package/dashboard/dist/assets/CFZ4Swr5.js.br +0 -0
- package/dashboard/dist/assets/CFZ4Swr5.js.gz +0 -0
- package/dashboard/dist/assets/{77gGFBt6.js → CGj8kRhg.js} +1 -1
- package/dashboard/dist/assets/CGj8kRhg.js.br +0 -0
- package/dashboard/dist/assets/CGj8kRhg.js.gz +0 -0
- package/dashboard/dist/assets/CJjEAGFN.js +1 -0
- package/dashboard/dist/assets/CJjEAGFN.js.br +0 -0
- package/dashboard/dist/assets/CJjEAGFN.js.gz +0 -0
- package/dashboard/dist/assets/CKrH5fYO.js +1 -0
- package/dashboard/dist/assets/CKrH5fYO.js.br +0 -0
- package/dashboard/dist/assets/CKrH5fYO.js.gz +0 -0
- package/dashboard/dist/assets/CMTTPXch.js +1 -0
- package/dashboard/dist/assets/CMTTPXch.js.br +0 -0
- package/dashboard/dist/assets/CMTTPXch.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/CnPC783_.js +1 -0
- package/dashboard/dist/assets/CnPC783_.js.br +0 -0
- package/dashboard/dist/assets/CnPC783_.js.gz +0 -0
- package/dashboard/dist/assets/Ctw95IkC.js +1 -0
- package/dashboard/dist/assets/Ctw95IkC.js.br +0 -0
- package/dashboard/dist/assets/Ctw95IkC.js.gz +0 -0
- package/dashboard/dist/assets/DHz-aQPw.js +1 -0
- package/dashboard/dist/assets/DHz-aQPw.js.br +0 -0
- package/dashboard/dist/assets/DHz-aQPw.js.gz +0 -0
- package/dashboard/dist/assets/DNX2foSJ.css +1 -0
- package/dashboard/dist/assets/DNX2foSJ.css.br +0 -0
- package/dashboard/dist/assets/DNX2foSJ.css.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/DxUw4FMR.js +212 -0
- package/dashboard/dist/assets/DxUw4FMR.js.br +0 -0
- package/dashboard/dist/assets/DxUw4FMR.js.gz +0 -0
- package/dashboard/dist/assets/T2NFtzAv.js +1 -0
- package/dashboard/dist/assets/T2NFtzAv.js.br +0 -0
- package/dashboard/dist/assets/T2NFtzAv.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/{DxKG5zy8.js → gZr_xKlA.js} +2 -2
- package/dashboard/dist/assets/gZr_xKlA.js.br +0 -0
- package/dashboard/dist/assets/gZr_xKlA.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 +36 -0
- package/dist/http/helpers/auto-continue-engine.js +198 -75
- package/dist/http/helpers/autopilot-runtime.d.ts +1 -0
- package/dist/http/helpers/autopilot-runtime.js +31 -3
- package/dist/http/helpers/autopilot-slice-utils.d.ts +10 -0
- package/dist/http/helpers/autopilot-slice-utils.js +158 -54
- package/dist/http/helpers/hash-utils.d.ts +1 -1
- package/dist/http/helpers/hash-utils.js +1 -1
- package/dist/http/helpers/humanize-slice-failure.d.ts +35 -0
- package/dist/http/helpers/humanize-slice-failure.js +137 -0
- package/dist/http/helpers/mission-control.d.ts +1 -0
- package/dist/http/helpers/mission-control.js +73 -7
- 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/workspace-scope.js +4 -3
- package/dist/http/index.js +166 -63
- package/dist/http/routes/chat.js +1 -21
- package/dist/http/routes/live-misc.js +9 -2
- package/dist/http/routes/live-snapshot.js +14 -27
- package/dist/http/routes/mission-control-actions.js +7 -18
- package/dist/http/routes/mission-control-read.d.ts +1 -0
- package/dist/http/routes/mission-control-read.js +14 -56
- package/dist/index.d.ts +8 -1
- package/dist/index.js +21 -1
- 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/dist/tools/core-tools.d.ts +27 -0
- package/dist/tools/core-tools.js +89 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +3 -2
- package/dashboard/dist/assets/77gGFBt6.js.br +0 -0
- package/dashboard/dist/assets/77gGFBt6.js.gz +0 -0
- package/dashboard/dist/assets/BBpTN_SR.js +0 -1
- package/dashboard/dist/assets/BBpTN_SR.js.br +0 -0
- package/dashboard/dist/assets/BBpTN_SR.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/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/BVShoyjA.js +0 -1
- package/dashboard/dist/assets/BVShoyjA.js.br +0 -0
- package/dashboard/dist/assets/BVShoyjA.js.gz +0 -0
- package/dashboard/dist/assets/BgcAY5rE.js +0 -1
- package/dashboard/dist/assets/BgcAY5rE.js.br +0 -0
- package/dashboard/dist/assets/BgcAY5rE.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/C-PAoJF-.js +0 -1
- package/dashboard/dist/assets/C-PAoJF-.js.br +0 -0
- package/dashboard/dist/assets/C-PAoJF-.js.gz +0 -0
- package/dashboard/dist/assets/C0nA-iUG.js +0 -1
- package/dashboard/dist/assets/C0nA-iUG.js.br +0 -0
- package/dashboard/dist/assets/C0nA-iUG.js.gz +0 -0
- package/dashboard/dist/assets/C6GO-FKy.js +0 -1
- package/dashboard/dist/assets/C6GO-FKy.js.br +0 -0
- package/dashboard/dist/assets/C6GO-FKy.js.gz +0 -0
- package/dashboard/dist/assets/CFwPph5U.js +0 -1
- package/dashboard/dist/assets/CFwPph5U.js.br +0 -0
- package/dashboard/dist/assets/CFwPph5U.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/CPjsbbgZ.js +0 -212
- package/dashboard/dist/assets/CPjsbbgZ.js.br +0 -0
- package/dashboard/dist/assets/CPjsbbgZ.js.gz +0 -0
- package/dashboard/dist/assets/CSr2ZnTV.js +0 -1
- package/dashboard/dist/assets/CSr2ZnTV.js.br +0 -0
- package/dashboard/dist/assets/CSr2ZnTV.js.gz +0 -0
- package/dashboard/dist/assets/CgQDT6yL.js +0 -1
- package/dashboard/dist/assets/CgQDT6yL.js.br +0 -0
- package/dashboard/dist/assets/CgQDT6yL.js.gz +0 -0
- package/dashboard/dist/assets/CnitK1MX.js.br +0 -0
- package/dashboard/dist/assets/CnitK1MX.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/D7DHFX0D.js +0 -1
- package/dashboard/dist/assets/D7DHFX0D.js.br +0 -0
- package/dashboard/dist/assets/D7DHFX0D.js.gz +0 -0
- package/dashboard/dist/assets/DEip7uko.js +0 -1
- package/dashboard/dist/assets/DEip7uko.js.br +0 -0
- package/dashboard/dist/assets/DEip7uko.js.gz +0 -0
- package/dashboard/dist/assets/DHUSLc01.css +0 -1
- package/dashboard/dist/assets/DHUSLc01.css.br +0 -0
- package/dashboard/dist/assets/DHUSLc01.css.gz +0 -0
- package/dashboard/dist/assets/DOFL9l8s.js +0 -1
- package/dashboard/dist/assets/DOFL9l8s.js.br +0 -0
- package/dashboard/dist/assets/DOFL9l8s.js.gz +0 -0
- package/dashboard/dist/assets/DpuQm1oF.js.br +0 -0
- package/dashboard/dist/assets/DpuQm1oF.js.gz +0 -0
- package/dashboard/dist/assets/DxKG5zy8.js.br +0 -0
- package/dashboard/dist/assets/DxKG5zy8.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
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{r as g,j as I}from"./Dj2k1r16.js";const Vt=g.createContext({});function J(t){const e=g.useRef(null);return e.current===null&&(e.current=t()),e.current}const Zt=g.createContext(null),Jt=g.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class go 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 yo({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(Jt);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]),I.jsx(go,{isPresent:e,childRef:s,sizeRef:i,children:g.cloneElement(t,{ref:s})})}const vo=({children:t,initial:e,isPresent:n,onExitComplete:s,custom:i,presenceAffectsLayout:r,mode:o})=>{const a=J(xo),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=I.jsx(yo,{isPresent:n,children:t})),I.jsx(Zt.Provider,{value:c,children:t})};function xo(){return new Map}function ks(t=!0){const e=g.useContext(Zt);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 It=t=>t.key||"";function gn(t){const e=[];return g.Children.forEach(t,n=>{g.isValidElement(n)&&e.push(n)}),e}const Be=typeof window<"u",Qt=Be?g.useLayoutEffect:g.useEffect,ac=({children:t,custom:e,initial:n=!0,onExitComplete:s,presenceAffectsLayout:i=!0,mode:r="sync",propagate:o=!1})=>{const[a,l]=ks(o),u=g.useMemo(()=>gn(t),[t]),c=o&&!a?[]:u.map(It),h=g.useRef(!0),f=g.useRef(u),d=J(()=>new Map),[p,m]=g.useState(u),[y,v]=g.useState(u);Qt(()=>{h.current=!1,f.current=u;for(let b=0;b<y.length;b++){const x=It(y[b]);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 b=[...u];for(let x=0;x<y.length;x++){const w=y[x],M=It(w);c.includes(M)||(b.splice(x,0,w),T.push(w))}r==="wait"&&T.length&&(b=T),v(gn(b)),m(u);return}const{forceRender:P}=g.useContext(Vt);return I.jsx(I.Fragment,{children:y.map(b=>{const x=It(b),w=o&&!a?!1:u===y||c.includes(x),M=()=>{if(d.has(x))d.set(x,!0);else return;let A=!0;d.forEach(F=>{F||(A=!1)}),A&&(P==null||P(),v(f.current),o&&(l==null||l()),s&&s())};return I.jsx(vo,{isPresent:w,initial:!h.current||n?void 0:!1,custom:w?void 0:e,presenceAffectsLayout:i,mode:r,onExitComplete:w?void 0:M,children:b},x)})})},To=g.createContext(null);function Po(){const t=g.useRef(!1);return Qt(()=>(t.current=!0,()=>{t.current=!1}),[]),t}const j=t=>t;let Bs=j;function Ie(t){let e;return()=>(e===void 0&&(e=t()),e)}const ft=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},z=t=>t*1e3,H=t=>t/1e3,So={useManualTiming:!1};function Ao(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 jt=["read","resolveKeyframes","update","preRender","render","postRender"],bo=40;function Is(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=jt.reduce((v,T)=>(v[T]=Ao(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,bo),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:jt.reduce((v,T)=>{const P=o[T];return v[T]=(b,x=!1,w=!1)=>(n||p(),P.schedule(b,x,w)),v},{}),cancel:v=>{for(let T=0;T<jt.length;T++)o[jt[T]].cancel(v)},state:i,steps:o}}const{schedule:C,cancel:X,state:E,steps:ae}=Is(typeof requestAnimationFrame<"u"?requestAnimationFrame:j,!0);function wo(){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 Co=t=>!t.isLayoutDirty&&t.willUpdate(!1);function yn(){const t=new Set,e=new WeakMap,n=()=>t.forEach(Co);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 js=t=>t===!0,Vo=t=>js(t===!0)||t==="id",lc=({children:t,id:e,inherit:n=!0})=>{const s=g.useContext(Vt),i=g.useContext(To),[r,o]=wo(),a=g.useRef(null),l=s.id||i;a.current===null&&(Vo(n)&&l&&(e=e?l+"-"+e:l),a.current={id:e,group:js(n)&&s.group||yn()});const u=g.useMemo(()=>({...a.current,forceRender:r}),[o]);return I.jsx(Vt.Provider,{value:u,children:t})},Os=g.createContext({strict:!1}),vn={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"]},dt={};for(const t in vn)dt[t]={isEnabled:e=>vn[t].some(n=>!!e[n])};function Do(t){for(const e in t)dt[e]={...dt[e],...t[e]}}const Mo=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 Wt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Mo.has(t)}let Ns=t=>!Wt(t);function Ro(t){t&&(Ns=e=>e.startsWith("on")?!Wt(e):t(e))}try{Ro(require("@emotion/is-prop-valid").default)}catch{}function Eo(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Ns(i)||n===!0&&Wt(i)||!e&&!Wt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function Lo(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 te=g.createContext({});function Dt(t){return typeof t=="string"||Array.isArray(t)}function ee(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const je=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Oe=["initial",...je];function ne(t){return ee(t.animate)||Oe.some(e=>Dt(t[e]))}function Us(t){return!!(ne(t)||t.variants)}function Fo(t,e){if(ne(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Dt(n)?n:void 0,animate:Dt(s)?s:void 0}}return t.inherit!==!1?e:{}}function ko(t){const{initial:e,animate:n}=Fo(t,g.useContext(te));return g.useMemo(()=>({initial:e,animate:n}),[xn(e),xn(n)])}function xn(t){return Array.isArray(t)?t.join(" "):t}const Bo=Symbol.for("motionComponentSymbol");function at(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Io(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):at(n)&&(n.current=s))},[e])}const Ne=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),jo="framerAppearId",_s="data-"+Ne(jo),{schedule:Ue}=Is(queueMicrotask,!1),Ks=g.createContext({});function Oo(t,e,n,s,i){var r,o;const{visualElement:a}=g.useContext(te),l=g.useContext(Os),u=g.useContext(Zt),c=g.useContext(Jt).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(Ks);f&&!f.projection&&i&&(f.type==="html"||f.type==="svg")&&No(h.current,n,i,d);const p=g.useRef(!1);g.useInsertionEffect(()=>{f&&p.current&&f.update(n,u)});const m=n[_s],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 Qt(()=>{f&&(p.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Ue.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 No(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:Ws(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&at(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,layoutScroll:l,layoutRoot:u})}function Ws(t){if(t)return t.options.allowProjection!==!1?t.projection:Ws(t.parent)}function Uo({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){var r,o;t&&Do(t);function a(u,c){let h;const f={...g.useContext(Jt),...u,layoutId:_o(u)},{isStatic:d}=f,p=ko(u),m=s(u,d);if(!d&&Be){Ko();const y=Wo(f);h=y.MeasureLayout,p.visualElement=Oo(i,m,f,e,y.ProjectionNode)}return I.jsxs(te.Provider,{value:p,children:[h&&p.visualElement?I.jsx(h,{visualElement:p.visualElement,...f}):null,n(i,u,Io(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[Bo]=i,l}function _o({layoutId:t}){const e=g.useContext(Vt).id;return e&&t!==void 0?e+"-"+t:t}function Ko(t,e){g.useContext(Os).strict}function Wo(t){const{drag:e,layout:n}=dt;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 Go=["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 _e(t){return typeof t!="string"||t.includes("-")?!1:!!(Go.indexOf(t)>-1||/[A-Z]/u.test(t))}function Tn(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Ke(t,e,n,s){if(typeof e=="function"){const[i,r]=Tn(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]=Tn(s);e=e(n!==void 0?n:t.custom,i,r)}return e}const Te=t=>Array.isArray(t),$o=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),zo=t=>Te(t)?t[t.length-1]||0:t,L=t=>!!(t&&t.getVelocity);function Ut(t){const e=L(t)?t.get():t;return $o(e)?e.toValue():e}function Ho({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:n},s,i,r){const o={latestValues:Xo(s,i,r,t),renderState:e()};return n&&(o.onMount=a=>n({props:s,current:a,...o}),o.onUpdate=a=>n(a)),o}const Gs=t=>(e,n)=>{const s=g.useContext(te),i=g.useContext(Zt),r=()=>Ho(t,e,s,i);return n?r():J(r)};function Xo(t,e,n,s){const i={},r=s(t,{});for(const f in r)i[f]=Ut(r[f]);let{initial:o,animate:a}=t;const l=ne(t),u=Us(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"&&!ee(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d<f.length;d++){const p=Ke(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 b=c?P.length-1:0;P=P[b]}P!==null&&(i[T]=P)}for(const T in m)i[T]=m[T]}}}return i}const gt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ot=new Set(gt),$s=t=>e=>typeof e=="string"&&e.startsWith(t),zs=$s("--"),Yo=$s("var(--"),We=t=>Yo(t)?qo.test(t.split("/*")[0].trim()):!1,qo=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Hs=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Y=(t,e,n)=>n>e?e:n<t?t:n,yt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Mt={...yt,transform:t=>Y(0,1,t)},Ot={...yt,default:1},Lt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),q=Lt("deg"),W=Lt("%"),S=Lt("px"),Zo=Lt("vh"),Jo=Lt("vw"),Pn={...W,parse:t=>W.parse(t)/100,transform:t=>W.transform(t*100)},Qo={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},tr={rotate:q,rotateX:q,rotateY:q,rotateZ:q,scale:Ot,scaleX:Ot,scaleY:Ot,scaleZ:Ot,skew:q,skewX:q,skewY:q,distance:S,translateX:S,translateY:S,translateZ:S,x:S,y:S,z:S,perspective:S,transformPerspective:S,opacity:Mt,originX:Pn,originY:Pn,originZ:S},Sn={...yt,transform:Math.round},Ge={...Qo,...tr,zIndex:Sn,size:S,fillOpacity:Mt,strokeOpacity:Mt,numOctaves:Sn},er={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},nr=gt.length;function sr(t,e,n){let s="",i=!0;for(let r=0;r<nr;r++){const o=gt[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=Hs(a,Ge[o]);if(!l){i=!1;const c=er[o]||o;s+=`${c}(${u}) `}n&&(e[o]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function $e(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(ot.has(l)){o=!0;continue}else if(zs(l)){i[l]=u;continue}else{const c=Hs(u,Ge[l]);l.startsWith("origin")?(a=!0,r[l]=c):s[l]=c}}if(e.transform||(o||n?s.transform=sr(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 ir={offset:"stroke-dashoffset",array:"stroke-dasharray"},or={offset:"strokeDashoffset",array:"strokeDasharray"};function rr(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?ir:or;t[r.offset]=S.transform(-s);const o=S.transform(e),a=S.transform(n);t[r.array]=`${o} ${a}`}function An(t,e,n){return typeof t=="string"?t:S.transform(e+n*t)}function ar(t,e,n){const s=An(e,t.x,t.width),i=An(n,t.y,t.height);return`${s} ${i}`}function ze(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:r,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if($e(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=ar(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&&rr(f,o,a,l,!1)}const He=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Xs=()=>({...He(),attrs:{}}),Xe=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Ys(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 qs=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 Zs(t,e,n,s){Ys(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(qs.has(i)?i:Ne(i),e.attrs[i])}const Gt={};function lr(t){Object.assign(Gt,t)}function Js(t,{layout:e,layoutId:n}){return ot.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Gt[t]||t==="opacity")}function Ye(t,e,n){var s;const{style:i}=t,r={};for(const o in i)(L(i[o])||e.style&&L(e.style[o])||Js(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 Qs(t,e,n){const s=Ye(t,e,n);for(const i in t)if(L(t[i])||L(e[i])){const r=gt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}function ur(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 bn=["x","y","width","height","cx","cy","r"],cr={useVisualState:Gs({scrapeMotionValuesFromProps:Qs,createRenderState:Xs,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(ot.has(a)){r=!0;break}}if(!r)return;let o=!e;if(e)for(let a=0;a<bn.length;a++){const l=bn[a];t[l]!==e[l]&&(o=!0)}o&&C.read(()=>{ur(n,s),C.render(()=>{ze(s,i,Xe(n.tagName),t.transformTemplate),Zs(n,s)})})}})},hr={useVisualState:Gs({scrapeMotionValuesFromProps:Ye,createRenderState:He})};function ti(t,e,n){for(const s in e)!L(e[s])&&!Js(s,n)&&(t[s]=e[s])}function fr({transformTemplate:t},e){return g.useMemo(()=>{const n=He();return $e(n,e,t),Object.assign({},n.vars,n.style)},[e])}function dr(t,e){const n=t.style||{},s={};return ti(s,n,t),Object.assign(s,fr(t,e)),s}function pr(t,e){const n={},s=dr(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 mr(t,e,n,s){const i=g.useMemo(()=>{const r=Xs();return ze(r,e,Xe(s),t.transformTemplate),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};ti(r,t.style,t),i.style={...r,...i.style}}return i}function gr(t=!1){return(n,s,i,{latestValues:r},o)=>{const l=(_e(n)?mr:pr)(s,r,o,n),u=Eo(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 yr(t,e){return function(s,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={..._e(s)?cr:hr,preloadedFeatures:t,useRender:gr(i),createVisualElement:e,Component:s};return Uo(o)}}function ei(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 se(t,e,n){const s=t.getProps();return Ke(s,e,n!==void 0?n:s.custom,t)}const vr=Ie(()=>window.ScrollTimeline!==void 0);class xr{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>"finished"in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,n){for(let s=0;s<this.animations.length;s++)this.animations[s][e]=n}attachTimeline(e,n){const s=this.animations.map(i=>{if(vr()&&i.attachTimeline)return i.attachTimeline(e);if(typeof n=="function")return n(i)});return()=>{s.forEach((i,r)=>{i&&i(),this.animations[r].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Tr extends xr{then(e,n){return Promise.all(this.animations).then(e).catch(n)}}function qe(t,e){return t?t[e]||t.default||t:void 0}const Pe=2e4;function ni(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Pe;)e+=n,s=t.next(e);return e>=Pe?1/0:e}function Ze(t){return typeof t=="function"}function wn(t,e){t.timeline=e,t.onfinish=null}const Je=t=>Array.isArray(t)&&typeof t[0]=="number",Pr={linearEasing:void 0};function Sr(t,e){const n=Ie(t);return()=>{var s;return(s=Pr[e])!==null&&s!==void 0?s:n()}}const $t=Sr(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),si=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=t(ft(0,i-1,r))+", ";return`linear(${s.substring(0,s.length-2)})`};function ii(t){return!!(typeof t=="function"&&$t()||!t||typeof t=="string"&&(t in Se||$t())||Je(t)||Array.isArray(t)&&t.every(ii))}const xt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Se={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:xt([0,.65,.55,1]),circOut:xt([.55,0,1,.45]),backIn:xt([.31,.01,.66,-.59]),backOut:xt([.33,1.53,.69,.99])};function oi(t,e){if(t)return typeof t=="function"&&$t()?si(t,e):Je(t)?xt(t):Array.isArray(t)?t.map(n=>oi(n,e)||Se.easeOut):Se[t]}const K={x:!1,y:!1};function ri(){return K.x||K.y}function Ar(t,e,n){var s;if(t instanceof Element)return[t];if(typeof t=="string"){let i=document;const r=(s=void 0)!==null&&s!==void 0?s:i.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t)}function ai(t,e){const n=Ar(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Cn(t){return e=>{e.pointerType==="touch"||ri()||t(e)}}function br(t,e,n={}){const[s,i,r]=ai(t,n),o=Cn(a=>{const{target:l}=a,u=e(a);if(typeof u!="function"||!l)return;const c=Cn(h=>{u(h),l.removeEventListener("pointerleave",c)});l.addEventListener("pointerleave",c,i)});return s.forEach(a=>{a.addEventListener("pointerenter",o,i)}),r}const li=(t,e)=>e?t===e?!0:li(t,e.parentElement):!1,Qe=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,wr=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Cr(t){return wr.has(t.tagName)||t.tabIndex!==-1}const Tt=new WeakSet;function Vn(t){return e=>{e.key==="Enter"&&t(e)}}function le(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Vr=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Vn(()=>{if(Tt.has(n))return;le(n,"down");const i=Vn(()=>{le(n,"up")}),r=()=>le(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function Dn(t){return Qe(t)&&!ri()}function Dr(t,e,n={}){const[s,i,r]=ai(t,n),o=a=>{const l=a.currentTarget;if(!Dn(a)||Tt.has(l))return;Tt.add(l);const u=e(a),c=(d,p)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),!(!Dn(d)||!Tt.has(l))&&(Tt.delete(l),typeof u=="function"&&u(d,{success:p}))},h=d=>{c(d,n.useGlobalTarget||li(l,d.target))},f=d=>{c(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{!Cr(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0),(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),a.addEventListener("focus",u=>Vr(u,i),i)}),r}function Mr(t){return t==="x"||t==="y"?K[t]?null:(K[t]=!0,()=>{K[t]=!1}):K.x||K.y?null:(K.x=K.y=!0,()=>{K.x=K.y=!1})}const ui=new Set(["width","height","top","left","right","bottom",...gt]);let _t;function Rr(){_t=void 0}const G={now:()=>(_t===void 0&&G.set(E.isProcessing||So.useManualTiming?E.timestamp:performance.now()),_t),set:t=>{_t=t,queueMicrotask(Rr)}};function tn(t,e){t.indexOf(e)===-1&&t.push(e)}function en(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function Er([...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 nn{constructor(){this.subscriptions=[]}add(e){return tn(this.subscriptions,e),()=>en(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 ci(t,e){return e?t*(1e3/e):0}const Mn=30,Lr=t=>!isNaN(parseFloat(t)),St={current:void 0};class Fr{constructor(e,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,i=!0)=>{const r=G.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=G.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Lr(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 nn);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 St.current&&St.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=G.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Mn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Mn);return ci(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 pt(t,e){return new Fr(t,e)}function kr(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,pt(n))}function Br(t,e){const n=se(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=zo(r[o]);kr(t,o,a)}}function Ir(t){return!!(L(t)&&t.add)}function Ae(t,e){const n=t.getValue("willChange");if(Ir(n))return n.add(e)}function hi(t){return t.props[_s]}const fi=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,jr=1e-7,Or=12;function Nr(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=fi(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>jr&&++a<Or);return o}function Ft(t,e,n,s){if(t===e&&n===s)return j;const i=r=>Nr(r,0,1,t,n);return r=>r===0||r===1?r:fi(i(r),e,s)}const di=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,pi=t=>e=>1-t(1-e),mi=Ft(.33,1.53,.69,.99),sn=pi(mi),gi=di(sn),yi=t=>(t*=2)<1?.5*sn(t):.5*(2-Math.pow(2,-10*(t-1))),on=t=>1-Math.sin(Math.acos(t)),vi=pi(on),xi=di(on),Ti=t=>/^0[^.\s]+$/u.test(t);function Ur(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Ti(t):!0}const At=t=>Math.round(t*1e5)/1e5,rn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function _r(t){return t==null}const Kr=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,an=(t,e)=>n=>!!(typeof n=="string"&&Kr.test(n)&&n.startsWith(t)||e&&!_r(n)&&Object.prototype.hasOwnProperty.call(n,e)),Pi=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(rn);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Wr=t=>Y(0,255,t),ue={...yt,transform:t=>Math.round(Wr(t))},st={test:an("rgb","red"),parse:Pi("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+ue.transform(t)+", "+ue.transform(e)+", "+ue.transform(n)+", "+At(Mt.transform(s))+")"};function Gr(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 be={test:an("#"),parse:Gr,transform:st.transform},lt={test:an("hsl","hue"),parse:Pi("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+W.transform(At(e))+", "+W.transform(At(n))+", "+At(Mt.transform(s))+")"},k={test:t=>st.test(t)||be.test(t)||lt.test(t),parse:t=>st.test(t)?st.parse(t):lt.test(t)?lt.parse(t):be.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?st.transform(t):lt.transform(t)},$r=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function zr(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(rn))===null||e===void 0?void 0:e.length)||0)+(((n=t.match($r))===null||n===void 0?void 0:n.length)||0)>0}const Si="number",Ai="color",Hr="var",Xr="var(",Rn="${}",Yr=/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 Rt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(Yr,l=>(k.test(l)?(s.color.push(r),i.push(Ai),n.push(k.parse(l))):l.startsWith(Xr)?(s.var.push(r),i.push(Hr),n.push(l)):(s.number.push(r),i.push(Si),n.push(parseFloat(l))),++r,Rn)).split(Rn);return{values:n,split:a,indexes:s,types:i}}function bi(t){return Rt(t).values}function wi(t){const{split:e,types:n}=Rt(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===Si?r+=At(i[o]):a===Ai?r+=k.transform(i[o]):r+=i[o]}return r}}const qr=t=>typeof t=="number"?0:t;function Zr(t){const e=bi(t);return wi(t)(e.map(qr))}const Z={test:zr,parse:bi,createTransformer:wi,getAnimatableNone:Zr},Jr=new Set(["brightness","contrast","saturate","opacity"]);function Qr(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(rn)||[];if(!s)return t;const i=n.replace(s,"");let r=Jr.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const ta=/\b([a-z-]*)\(.*?\)/gu,we={...Z,getAnimatableNone:t=>{const e=t.match(ta);return e?e.map(Qr).join(" "):t}},ea={...Ge,color:k,backgroundColor:k,outlineColor:k,fill:k,stroke:k,borderColor:k,borderTopColor:k,borderRightColor:k,borderBottomColor:k,borderLeftColor:k,filter:we,WebkitFilter:we},ln=t=>ea[t];function Ci(t,e){let n=ln(t);return n!==we&&(n=Z),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const na=new Set(["auto","none","0"]);function sa(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!na.has(r)&&Rt(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=Ci(n,i)}const En=t=>t===yt||t===S,Ln=(t,e)=>parseFloat(t.split(", ")[e]),Fn=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return Ln(i[1],e);{const r=s.match(/^matrix\((.+)\)$/u);return r?Ln(r[1],t):0}},ia=new Set(["x","y","z"]),oa=gt.filter(t=>!ia.has(t));function ra(t){const e=[];return oa.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const mt={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:Fn(4,13),y:Fn(5,14)};mt.translateX=mt.x;mt.translateY=mt.y;const it=new Set;let Ce=!1,Ve=!1;function Vi(){if(Ve){const t=Array.from(it).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=ra(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)})}Ve=!1,Ce=!1,it.forEach(t=>t.complete()),it.clear()}function Di(){it.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ve=!0)})}function aa(){Di(),Vi()}class un{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?(it.add(this),Ce||(Ce=!0,C.read(Di),C.resolveKeyframes(Vi))):(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),it.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,it.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Mi=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),la=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ua(t){const e=la.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Ri(t,e,n=1){const[s,i]=ua(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return Mi(o)?parseFloat(o):o}return We(i)?Ri(i,e,n+1):i}const Ei=t=>e=>e.test(t),ca={test:t=>t==="auto",parse:t=>t},Li=[yt,S,W,q,Jo,Zo,ca],kn=t=>Li.find(Ei(t));class Fi extends un{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(),We(u))){const c=Ri(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!ui.has(s)||e.length!==2)return;const[i,r]=e,o=kn(i),a=kn(r);if(o!==a)if(En(o)&&En(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++)Ur(e[i])&&s.push(i);s.length&&sa(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=mt[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]=mt[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 Bn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Z.test(t)||t==="0")&&!t.startsWith("url("));function ha(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 fa(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=Bn(i,e),a=Bn(r,e);return!o||!a?!1:ha(t)||(n==="spring"||Ze(n))&&s}const da=t=>t!==null;function ie(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(da),r=e&&n!=="loop"&&e%2===1?0:i.length-1;return!r||s===void 0?i[r]:s}const pa=40;class ki{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=G.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>pa?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&aa(),this._resolved}onKeyframesResolved(e,n){this.resolvedAt=G.now(),this.hasAttemptedResolve=!0;const{name:s,type:i,velocity:r,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!fa(e,s,i,r))if(o)this.options.duration=0;else{l&&l(ie(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 V=(t,e,n)=>t+(e-t)*n;function ce(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 ma({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=ce(l,a,t+1/3),r=ce(l,a,t),o=ce(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function zt(t,e){return n=>n>0?e:t}const he=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ga=[be,st,lt],ya=t=>ga.find(e=>e.test(t));function In(t){const e=ya(t);if(!e)return!1;let n=e.parse(t);return e===lt&&(n=ma(n)),n}const jn=(t,e)=>{const n=In(t),s=In(e);if(!n||!s)return zt(t,e);const i={...n};return r=>(i.red=he(n.red,s.red,r),i.green=he(n.green,s.green,r),i.blue=he(n.blue,s.blue,r),i.alpha=V(n.alpha,s.alpha,r),st.transform(i))},va=(t,e)=>n=>e(t(n)),kt=(...t)=>t.reduce(va),De=new Set(["none","hidden"]);function xa(t,e){return De.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Ta(t,e){return n=>V(t,e,n)}function cn(t){return typeof t=="number"?Ta:typeof t=="string"?We(t)?zt:k.test(t)?jn:Aa:Array.isArray(t)?Bi:typeof t=="object"?k.test(t)?jn:Pa:zt}function Bi(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>cn(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function Pa(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=cn(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 Aa=(t,e)=>{const n=Z.createTransformer(e),s=Rt(t),i=Rt(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?De.has(t)&&!i.values.length||De.has(e)&&!s.values.length?xa(t,e):kt(Bi(Sa(s,i),i.values),n):zt(t,e)};function Ii(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?V(t,e,n):cn(t)(t,e)}const ba=5;function ji(t,e,n){const s=Math.max(e-ba,0);return ci(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},fe=.001;function wa({duration:t=D.duration,bounce:e=D.bounce,velocity:n=D.velocity,mass:s=D.mass}){let i,r,o=1-e;o=Y(D.minDamping,D.maxDamping,o),t=Y(D.minDuration,D.maxDuration,H(t)),o<1?(i=u=>{const c=u*o,h=c*t,f=c-n,d=Me(u,o),p=Math.exp(-h);return fe-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=Me(Math.pow(u,2),o);return(-i(u)+fe>0?-1:1)*((f-d)*p)/m}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-fe+c*h},r=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=Va(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 Ca=12;function Va(t,e,n){let s=n;for(let i=1;i<Ca;i++)s=s-t(s)/e(s);return s}function Me(t,e){return t*Math.sqrt(1-e*e)}const Da=["duration","bounce"],Ma=["stiffness","damping","mass"];function On(t,e){return e.some(n=>t[n]!==void 0)}function Ra(t){let e={velocity:D.velocity,stiffness:D.stiffness,damping:D.damping,mass:D.mass,isResolvedFromDuration:!1,...t};if(!On(t,Ma)&&On(t,Da))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*Y(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:D.mass,stiffness:i,damping:r}}else{const n=wa(t);e={...e,...n,mass:D.mass},e.isResolvedFromDuration=!0}return e}function Oi(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}=Ra({...n,velocity:-H(n.velocity||0)}),p=f||0,m=u/(2*Math.sqrt(l*c)),y=o-r,v=H(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=Me(v,m);P=w=>{const M=Math.exp(-m*v*w);return o-M*((p+m*v*y)/x*Math.sin(x*w)+y*Math.cos(x*w))}}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=w=>{const M=Math.exp(-m*v*w),A=Math.min(x*w,300);return o-M*((p+m*v*y)*Math.sinh(A)+x*y*Math.cosh(A))/x}}const b={calculatedDuration:d&&h||null,next:x=>{const w=P(x);if(d)a.done=x>=h;else{let M=0;m<1&&(M=x===0?z(p):ji(P,x,w));const A=Math.abs(M)<=s,F=Math.abs(o-w)<=i;a.done=A&&F}return a.value=a.done?o:w,a},toString:()=>{const x=Math.min(ni(b),Pe),w=si(M=>b.next(x*M).value,x,30);return x+"ms "+w}};return b}function Nn({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=A=>a!==void 0&&A<a||l!==void 0&&A>l,p=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let m=n*e;const y=h+m,v=o===void 0?y:o(y);v!==y&&(m=v-h);const T=A=>-m*Math.exp(-A/s),P=A=>v+T(A),b=A=>{const F=T(A),N=P(A);f.done=Math.abs(F)<=u,f.value=f.done?v:N};let x,w;const M=A=>{d(f.value)&&(x=A,w=Oi({keyframes:[f.value,p(f.value)],velocity:ji(P,A,f.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return M(0),{calculatedDuration:null,next:A=>{let F=!1;return!w&&x===void 0&&(F=!0,b(A),M(A)),x!==void 0&&A>=x?w.next(A-x):(!F&&b(A),f)}}}const Ea=Ft(.42,0,1,1),La=Ft(0,0,.58,1),Ni=Ft(.42,0,.58,1),Fa=t=>Array.isArray(t)&&typeof t[0]!="number",ka={linear:j,easeIn:Ea,easeInOut:Ni,easeOut:La,circIn:on,circInOut:xi,circOut:vi,backIn:sn,backInOut:gi,backOut:mi,anticipate:yi},Un=t=>{if(Je(t)){Bs(t.length===4);const[e,n,s,i]=t;return Ft(e,n,s,i)}else if(typeof t=="string")return ka[t];return t};function Ba(t,e,n){const s=[],i=n||Ii,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]||j:e;a=kt(l,a)}s.push(a)}return s}function Ui(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(Bs(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=Ba(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=ft(t[h],t[h+1],c);return a[h](f)};return n?c=>u(Y(t[0],t[r-1],c)):u}function Ia(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=ft(0,e,s);t.push(V(n,1,i))}}function ja(t){const e=[0];return Ia(e,t.length-1),e}function Oa(t,e){return t.map(n=>n*e)}function Na(t,e){return t.map(()=>e||Ni).splice(0,t.length-1)}function Ht({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Fa(s)?s.map(Un):Un(s),r={done:!1,value:e[0]},o=Oa(n&&n.length===e.length?n:ja(e),t),a=Ui(o,e,{ease:Array.isArray(i)?i:Na(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const Ua=t=>{const e=({timestamp:n})=>t(n);return{start:()=>C.update(e,!0),stop:()=>X(e),now:()=>E.isProcessing?E.timestamp:G.now()}},_a={decay:Nn,inertia:Nn,tween:Ht,keyframes:Ht,spring:Oi},Ka=t=>t/100;class hn extends ki{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)||un,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=Ze(n)?n:_a[n]||Ht;let l,u;a!==Ht&&typeof e[0]!="number"&&(l=kt(Ka,Ii(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=ni(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:A}=this.options;return{done:!0,value:A[A.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,b=r;if(d){const A=Math.min(this.currentTime,c)/h;let F=Math.floor(A),N=A%1;!N&&A>=1&&(N=1),N===1&&F--,F=Math.min(F,d+1),!!(F%2)&&(p==="reverse"?(N=1-N,m&&(N-=m/h)):p==="mirror"&&(b=o)),P=Y(0,1,N)*h}const x=T?{done:!1,value:l[0]}:b.next(P);a&&(x.value=a(x.value));let{done:w}=x;!T&&u!==null&&(w=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&w);return M&&i!==void 0&&(x.value=ie(l,this.options,i)),y&&y(x.value),M&&this.finish(),x}get duration(){const{resolved:e}=this;return e?H(e.calculatedDuration):0}get time(){return H(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=H(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=Ua,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 Ga(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=oi(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 $a=Ie(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Xt=10,za=2e4;function Ha(t){return Ze(t.type)||t.type==="spring"||!ii(t.ease)}function Xa(t,e){const n=new hn({...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<za;)s=n.sample(r),i.push(s.value),r+=Xt;return{times:void 0,keyframes:i,duration:r-Xt,ease:"linear"}}const _i={anticipate:yi,backInOut:gi,circInOut:xi};function Ya(t){return t in _i}class _n extends ki{constructor(e){super(e);const{name:n,motionValue:s,element:i,keyframes:r}=this.options;this.resolver=new Fi(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"&&$t()&&Ya(r)&&(r=_i[r]),Ha(this.options)){const{onComplete:h,onUpdate:f,motionValue:d,element:p,...m}=this.options,y=Xa(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=Ga(a.owner.current,l,e,{...this.options,duration:s,times:i,ease:r});return c.startTime=u??this.calcStartTime(),this.pendingTimeline?(wn(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:h}=this.options;a.set(ie(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 H(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return H(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 j;const{animation:s}=n;wn(s,e)}return j}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 hn({...d,keyframes:s,duration:i,type:r,ease:o,times:a,isGenerator:!0}),m=z(this.time);u.setWithVelocity(p.sample(m-Xt).value,p.sample(m).value,Xt)}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 $a()&&s&&Wa.has(s)&&!l&&!u&&!i&&r!=="mirror"&&o!==0&&a!=="inertia"}}const qa={type:"spring",stiffness:500,damping:25,restSpeed:10},Za=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Ja={type:"keyframes",duration:.8},Qa={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},tl=(t,{keyframes:e})=>e.length>2?Ja:ot.has(t)?t.startsWith("scale")?Za(e[1]):qa:Qa;function el({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 fn=(t,e,n,s={},i,r)=>o=>{const a=qe(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};el(a)||(c={...c,...tl(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=ie(c.keyframes,a);if(f!==void 0)return C.update(()=>{c.onUpdate(f),c.onComplete()}),new Tr([])}return!r&&_n.supports(c)?new _n(c):new hn(c)};function nl({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Ki(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&&nl(c,h))continue;const p={delay:n,...qe(o||{},h)};let m=!1;if(window.MotionHandoffAnimation){const v=hi(t);if(v){const T=window.MotionHandoffAnimation(v,h,C);T!==null&&(p.startTime=T,m=!0)}}Ae(t,h),f.start(fn(h,f,d,t.shouldReduceMotion&&ui.has(h)?{type:!1}:p,t,m));const y=f.animation;y&&u.push(y)}return a&&Promise.all(u).then(()=>{C.update(()=>{a&&Br(t,a)})}),u}function Re(t,e,n={}){var s;const i=se(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(Ki(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:f}=r;return sl(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 sl(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(il).forEach((u,c)=>{u.notify("AnimationStart",e),o.push(Re(u,e,{...r,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(o)}function il(t,e){return t.sortNodePosition(e)}function ol(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>Re(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=Re(t,e,n);else{const i=typeof e=="function"?se(t,e,n.custom):e;s=Promise.all(Ki(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const rl=Oe.length;function Wi(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Wi(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<rl;n++){const s=Oe[n],i=t.props[s];(Dt(i)||i===!1)&&(e[s]=i)}return e}const al=[...je].reverse(),ll=je.length;function ul(t){return e=>Promise.all(e.map(({animation:n,options:s})=>ol(t,n,s)))}function cl(t){let e=ul(t),n=Kn(),s=!0;const i=l=>(u,c)=>{var h;const f=se(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=Wi(t.parent)||{},h=[],f=new Set;let d={},p=1/0;for(let y=0;y<ll;y++){const v=al[y],T=n[v],P=u[v]!==void 0?u[v]:c[v],b=Dt(P),x=v===l?T.isActive:null;x===!1&&(p=y);let w=P===c[v]&&P!==u[v]&&b;if(w&&s&&t.manuallyAnimateOnMount&&(w=!1),T.protectedKeys={...d},!T.isActive&&x===null||!P&&!T.prevProp||ee(P)||typeof P=="boolean")continue;const M=hl(T.prevProp,P);let A=M||v===l&&T.isActive&&!w&&b||y>p&&b,F=!1;const N=Array.isArray(P)?P:[P];let rt=N.reduce(i(v),{});x===!1&&(rt={});const{prevResolvedValues:pn={}}=T,mo={...pn,...rt},mn=B=>{A=!0,f.has(B)&&(F=!0,f.delete(B)),T.needsAnimating[B]=!0;const $=t.getValue(B);$&&($.liveStyle=!1)};for(const B in mo){const $=rt[B],oe=pn[B];if(d.hasOwnProperty(B))continue;let re=!1;Te($)&&Te(oe)?re=!ei($,oe):re=$!==oe,re?$!=null?mn(B):f.add(B):$!==void 0&&f.has(B)?mn(B):T.protectedKeys[B]=!0}T.prevProp=P,T.prevResolvedValues=rt,T.isActive&&(d={...d,...rt}),s&&t.blockInitialAnimation&&(A=!1),A&&(!(w&&M)||F)&&h.push(...N.map(B=>({animation:B,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=Kn(),s=!0}}}function hl(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!ei(e,t):!1}function tt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Kn(){return{animate:tt(!0),whileInView:tt(),whileHover:tt(),whileTap:tt(),whileDrag:tt(),whileFocus:tt(),exit:tt()}}class Q{constructor(e){this.isMounted=!1,this.node=e}update(){}}class fl extends Q{constructor(e){super(e),e.animationState||(e.animationState=cl(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();ee(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 dl=0;class pl extends Q{constructor(){super(...arguments),this.id=dl++}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 ml={animation:{Feature:fl},exit:{Feature:pl}};function Et(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}function Bt(t){return{point:{x:t.pageX,y:t.pageY}}}const gl=t=>e=>Qe(e)&&t(e,Bt(e));function bt(t,e,n,s){return Et(t,e,gl(n),s)}const Wn=(t,e)=>Math.abs(t-e);function yl(t,e){const n=Wn(t.x,e.x),s=Wn(t.y,e.y);return Math.sqrt(n**2+s**2)}class Gi{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=pe(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,d=yl(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=de(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=pe(h.type==="pointercancel"?this.lastMoveEventInfo:de(f,this.transformPagePoint),this.history);this.startEvent&&d&&d(h,y),p&&p(h,y)},!Qe(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const o=Bt(e),a=de(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=E;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=n;c&&c(e,pe(a,this.history)),this.removeListeners=kt(bt(this.contextWindow,"pointermove",this.handlePointerMove),bt(this.contextWindow,"pointerup",this.handlePointerUp),bt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),X(this.updatePoint)}}function de(t,e){return e?{point:e(t.point)}:t}function Gn(t,e){return{x:t.x-e.x,y:t.y-e.y}}function pe({point:t},e){return{point:t,delta:Gn(t,$i(e)),offset:Gn(t,vl(e)),velocity:xl(e,.1)}}function vl(t){return t[0]}function $i(t){return t[t.length-1]}function xl(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=$i(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>z(e)));)n--;if(!s)return{x:0,y:0};const r=H(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 zi=1e-4,Tl=1-zi,Pl=1+zi,Hi=.01,Sl=0-Hi,Al=0+Hi;function O(t){return t.max-t.min}function bl(t,e,n){return Math.abs(t-e)<=n}function $n(t,e,n,s=.5){t.origin=s,t.originPoint=V(e.min,e.max,t.origin),t.scale=O(n)/O(e),t.translate=V(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Tl&&t.scale<=Pl||isNaN(t.scale))&&(t.scale=1),(t.translate>=Sl&&t.translate<=Al||isNaN(t.translate))&&(t.translate=0)}function wt(t,e,n,s){$n(t.x,e.x,n.x,s?s.originX:void 0),$n(t.y,e.y,n.y,s?s.originY:void 0)}function zn(t,e,n){t.min=n.min+e.min,t.max=t.min+O(e)}function wl(t,e,n){zn(t.x,e.x,n.x),zn(t.y,e.y,n.y)}function Hn(t,e,n){t.min=e.min-n.min,t.max=t.min+O(e)}function Ct(t,e,n){Hn(t.x,e.x,n.x),Hn(t.y,e.y,n.y)}function Cl(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?V(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?V(n,t,s.max):Math.min(t,n)),t}function Xn(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 Vl(t,{top:e,left:n,bottom:s,right:i}){return{x:Xn(t.x,n,i),y:Xn(t.y,e,s)}}function Yn(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 Dl(t,e){return{x:Yn(t.x,e.x),y:Yn(t.y,e.y)}}function Ml(t,e){let n=.5;const s=O(t),i=O(e);return i>s?n=ft(e.min,e.max-s,t.min):s>i&&(n=ft(t.min,t.max-i,e.min)),Y(0,1,n)}function Rl(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 Ee=.35;function El(t=Ee){return t===!1?t=0:t===!0&&(t=Ee),{x:qn(t,"left","right"),y:qn(t,"top","bottom")}}function qn(t,e,n){return{min:Zn(t,e),max:Zn(t,n)}}function Zn(t,e){return typeof t=="number"?t:t[e]||0}const Jn=()=>({translate:0,scale:1,origin:0,originPoint:0}),ut=()=>({x:Jn(),y:Jn()}),Qn=()=>({min:0,max:0}),R=()=>({x:Qn(),y:Qn()});function _(t){return[t("x"),t("y")]}function Xi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function Ll({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Fl(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 me(t){return t===void 0||t===1}function Le({scale:t,scaleX:e,scaleY:n}){return!me(t)||!me(e)||!me(n)}function et(t){return Le(t)||Yi(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Yi(t){return ts(t.x)||ts(t.y)}function ts(t){return t&&t!=="0%"}function Yt(t,e,n){const s=t-n,i=e*s;return n+i}function es(t,e,n,s,i){return i!==void 0&&(t=Yt(t,i,s)),Yt(t,n,s)+e}function Fe(t,e=0,n=1,s,i){t.min=es(t.min,e,n,s,i),t.max=es(t.max,e,n,s,i)}function qi(t,{x:e,y:n}){Fe(t.x,e.translate,e.scale,e.originPoint),Fe(t.y,n.translate,n.scale,n.originPoint)}const ns=.999999999999,ss=1.0000000000001;function kl(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&&ht(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,qi(t,o)),s&&et(r.latestValues)&&ht(t,r.latestValues))}e.x<ss&&e.x>ns&&(e.x=1),e.y<ss&&e.y>ns&&(e.y=1)}function ct(t,e){t.min=t.min+e,t.max=t.max+e}function is(t,e,n,s,i=.5){const r=V(t.min,t.max,i);Fe(t,e,n,r,s)}function ht(t,e){is(t.x,e.x,e.scaleX,e.scale,e.originX),is(t.y,e.y,e.scaleY,e.scale,e.originY)}function Zi(t,e){return Xi(Fl(t.getBoundingClientRect(),e))}function Bl(t,e,n){const s=Zi(t,n),{scroll:i}=e;return i&&(ct(s.x,i.offset.x),ct(s.y,i.offset.y)),s}const Ji=({current:t})=>t?t.ownerDocument.defaultView:null,Il=new WeakMap;class jl{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(Bt(c).point)},r=(c,h)=>{const{drag:f,dragPropagation:d,onDragStart:p}=this.getProps();if(f&&!d&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Mr(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),_(y=>{let v=this.getAxisMotionValue(y).get()||0;if(W.test(v)){const{projection:T}=this.visualElement;if(T&&T.layout){const P=T.layout.layoutBox[y];P&&(v=O(P)*(parseFloat(v)/100))}}this.originPoint[y]=v}),p&&C.postRender(()=>p(c,h)),Ae(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=Ol(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=()=>_(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 Gi(e,{onSessionStart:i,onStart:r,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Ji(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||!Nt(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=Cl(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&&at(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=Vl(i.layoutBox,n):this.constraints=!1,this.elastic=El(s),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&_(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Rl(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!at(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=Bl(s,i.root,this.visualElement.getTransformPagePoint());let o=Dl(i.layout.layoutBox,r);if(n){const a=n(Ll(o));this.hasMutatedConstraints=!!a,a&&(o=Xi(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=_(c=>{if(!Nt(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 Ae(this.visualElement,e),s.start(fn(e,s,0,n,this.visualElement,!1))}stopAnimation(){_(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){_(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=>{const{drag:s}=this.getProps();if(!Nt(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]-V(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!at(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};_(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=Ml({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(),_(o=>{if(!Nt(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(V(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;Il.set(this.visualElement,this);const e=this.visualElement.current,n=bt(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();at(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=Et(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(_(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=Ee,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Nt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Ol(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Nl extends Q{constructor(e){super(e),this.removeGroupControls=j,this.removeListeners=j,this.controls=new jl(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||j}unmount(){this.removeGroupControls(),this.removeListeners()}}const os=t=>(e,n)=>{t&&C.postRender(()=>t(e,n))};class Ul extends Q{constructor(){super(...arguments),this.removePointerDownListener=j}onPointerDown(e){this.session=new Gi(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ji(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:os(e),onStart:os(n),onMove:s,onEnd:(r,o)=>{delete this.session,i&&C.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=bt(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 Kt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function rs(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const vt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(S.test(t))t=parseFloat(t);else return t;const n=rs(t,e.target.x),s=rs(t,e.target.y);return`${n}% ${s}%`}},_l={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=Z.parse(t);if(i.length>5)return s;const r=Z.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=V(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 Kl extends g.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;lr(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()})),Kt.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(),Ue.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 Qi(t){const[e,n]=ks(),s=g.useContext(Vt);return I.jsx(Kl,{...t,layoutGroup:s,switchLayoutGroup:g.useContext(Ks),isPresent:e,safeToRemove:n})}const Wl={borderRadius:{...vt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:vt,borderTopRightRadius:vt,borderBottomLeftRadius:vt,borderBottomRightRadius:vt,boxShadow:_l};function Gl(t,e,n){const s=L(t)?t:pt(t);return s.start(fn("",s,e,n)),s.animation}function $l(t){return t instanceof SVGElement&&t.tagName!=="svg"}const zl=(t,e)=>t.depth-e.depth;class Hl{constructor(){this.children=[],this.isDirty=!1}add(e){tn(this.children,e),this.isDirty=!0}remove(e){en(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(zl),this.isDirty=!1,this.children.forEach(e)}}function Xl(t,e){const n=G.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(X(s),t(r-e))};return C.read(s,!0),()=>X(s)}const to=["TopLeft","TopRight","BottomLeft","BottomRight"],Yl=to.length,as=t=>typeof t=="string"?parseFloat(t):t,ls=t=>typeof t=="number"||S.test(t);function ql(t,e,n,s,i,r){i?(t.opacity=V(0,n.opacity!==void 0?n.opacity:1,Zl(s)),t.opacityExit=V(e.opacity!==void 0?e.opacity:1,0,Jl(s))):r&&(t.opacity=V(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let o=0;o<Yl;o++){const a=`border${to[o]}Radius`;let l=us(e,a),u=us(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||ls(l)===ls(u)?(t[a]=Math.max(V(as(l),as(u),s),0),(W.test(u)||W.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=V(e.rotate||0,n.rotate||0,s))}function us(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Zl=eo(0,.5,vi),Jl=eo(.5,.95,j);function eo(t,e,n){return s=>s<t?0:s>e?1:n(ft(t,e,s))}function cs(t,e){t.min=e.min,t.max=e.max}function U(t,e){cs(t.x,e.x),cs(t.y,e.y)}function hs(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function fs(t,e,n,s,i){return t-=e,t=Yt(t,1/n,s),i!==void 0&&(t=Yt(t,1/i,s)),t}function Ql(t,e=0,n=1,s=.5,i,r=t,o=t){if(W.test(e)&&(e=parseFloat(e),e=V(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=V(r.min,r.max,s);t===r&&(a-=e),t.min=fs(t.min,e,n,a,i),t.max=fs(t.max,e,n,a,i)}function ds(t,e,[n,s,i],r,o){Ql(t,e[n],e[s],e[i],e.scale,r,o)}const tu=["x","scaleX","originX"],eu=["y","scaleY","originY"];function ps(t,e,n,s){ds(t.x,e,tu,n?n.x:void 0,s?s.x:void 0),ds(t.y,e,eu,n?n.y:void 0,s?s.y:void 0)}function ms(t){return t.translate===0&&t.scale===1}function no(t){return ms(t.x)&&ms(t.y)}function gs(t,e){return t.min===e.min&&t.max===e.max}function nu(t,e){return gs(t.x,e.x)&&gs(t.y,e.y)}function ys(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function so(t,e){return ys(t.x,e.x)&&ys(t.y,e.y)}function vs(t){return O(t.x)/O(t.y)}function xs(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class su{constructor(){this.members=[]}add(e){tn(this.members,e),e.scheduleRender()}remove(e){if(en(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 iu(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 nt={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Pt=typeof window<"u"&&window.MotionDebug!==void 0,ge=["","X","Y","Z"],ou={visibility:"hidden"},Ts=1e3;let ru=0;function ye(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function io(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=hi(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&&io(s)}function oo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=ru++,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,Pt&&(nt.totalNodes=nt.resolvedTargetDeltas=nt.recalculatedProjection=0),this.nodes.forEach(uu),this.nodes.forEach(pu),this.nodes.forEach(mu),this.nodes.forEach(cu),Pt&&window.MotionDebug.record(nt)},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 Hl)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new nn),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=$l(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=Xl(f,250),Kt.hasAnimatedSinceResize&&(Kt.hasAnimatedSinceResize=!1,this.nodes.forEach(Ss))})}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()||Tu,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=c.getProps(),T=!this.targetLayout||!so(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 b={...qe(m,"layout"),onPlay:y,onComplete:v};(c.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b)}else f||Ss(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,X(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(gu),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&&io(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(Ps);return}this.isUpdating||this.nodes.forEach(fu),this.isUpdating=!1,this.nodes.forEach(du),this.nodes.forEach(au),this.nodes.forEach(lu),this.clearAllSnapshots();const a=G.now();E.delta=Y(0,1e3/60,a-E.timestamp),E.timestamp=a,E.isProcessing=!0,ae.update.process(E),ae.preRender.process(E),ae.render.process(E),E.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ue.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(hu),this.sharedNodes.forEach(yu)}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&&!no(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&(a||et(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)),Pu(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&&(ct(l.x,c.offset.x),ct(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),ct(l.x,h.offset.x),ct(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&&ht(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),et(c.latestValues)&&ht(l,c.latestValues)}return et(this.latestValues)&&ht(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||!et(u.latestValues))continue;Le(u.latestValues)&&u.updateSnapshot();const c=R(),h=u.measurePageBox();U(c,h),ps(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return et(this.latestValues)&&ps(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(),Ct(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(),wl(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):U(this.target,this.layout.layoutBox),qi(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(),Ct(this.relativeTargetOrigin,this.target,d.target),U(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Pt&&nt.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Le(this.parent.latestValues)||Yi(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;kl(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():(hs(this.prevProjectionDelta.x,this.projectionDelta.x),hs(this.prevProjectionDelta.y,this.projectionDelta.y)),wt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!xs(this.projectionDelta.x,this.prevProjectionDelta.x)||!xs(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),Pt&&nt.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=ut(),this.projectionDelta=ut(),this.projectionDeltaWithTransform=ut()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=ut();(!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(xu));this.animationProgress=0;let P;this.mixTargetDelta=b=>{const x=b/1e3;As(h.x,o.x,x),As(h.y,o.y,x),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ct(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),vu(this.relativeTarget,this.relativeTargetOrigin,f,x),P&&nu(this.relativeTarget,P)&&(this.isProjectionDirty=!1),P||(P=R()),U(P,this.relativeTarget)),m&&(this.animationValues=c,ql(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&&(X(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=C.update(()=>{Kt.hasAnimatedSinceResize=!0,this.currentAnimation=Gl(0,Ts,{...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(Ts),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&&ro(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||R();const h=O(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=O(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}U(a,l),ht(a,c),wt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new su),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&&ye("z",o,u,this.animationValues);for(let c=0;c<ge.length;c++)ye(`rotate${ge[c]}`,o,u,this.animationValues),ye(`skew${ge[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 ou;const u={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=Ut(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=Ut(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!et(this.latestValues)&&(m.transform=c?c({},""):"none",this.hasProjected=!1),m}const f=h.animationValues||h.latestValues;this.applyTransformsToTarget(),u.transform=iu(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 Gt){if(f[m]===void 0)continue;const{correct:y,applyTo:v}=Gt[m],T=u.transform==="none"?f[m]:y(f[m],h);if(v){const P=v.length;for(let b=0;b<P;b++)u[v[b]]=T}else u[m]=T}return this.options.layoutId&&(u.pointerEvents=h===this?Ut(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(Ps),this.root.sharedNodes.clear()}}}function au(t){t.updateLayout()}function lu(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"?_(h=>{const f=o?n.measuredBox[h]:n.layoutBox[h],d=O(f);f.min=s[h].min,f.max=f.min+d}):ro(r,n.layoutBox,s)&&_(h=>{const f=o?n.measuredBox[h]:n.layoutBox[h],d=O(s[h]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+d)});const a=ut();wt(a,s,n.layoutBox);const l=ut();o?wt(l,t.applyTransform(i,!0),n.measuredBox):wt(l,s,n.layoutBox);const u=!no(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();Ct(p,n.layoutBox,f.layoutBox);const m=R();Ct(m,s,d.layoutBox),so(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 uu(t){Pt&&nt.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 cu(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function hu(t){t.clearSnapshot()}function Ps(t){t.clearMeasurements()}function fu(t){t.isLayoutDirty=!1}function du(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ss(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function pu(t){t.resolveTargetDelta()}function mu(t){t.calcProjection()}function gu(t){t.resetSkewAndRotation()}function yu(t){t.removeLeadSnapshot()}function As(t,e,n){t.translate=V(e.translate,0,n),t.scale=V(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function bs(t,e,n,s){t.min=V(e.min,n.min,s),t.max=V(e.max,n.max,s)}function vu(t,e,n,s){bs(t.x,e.x,n.x,s),bs(t.y,e.y,n.y,s)}function xu(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Tu={duration:.45,ease:[.4,0,.1,1]},ws=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Cs=ws("applewebkit/")&&!ws("chrome/")?Math.round:j;function Vs(t){t.min=Cs(t.min),t.max=Cs(t.max)}function Pu(t){Vs(t.x),Vs(t.y)}function ro(t,e,n){return t==="position"||t==="preserve-aspect"&&!bl(vs(e),vs(n),.2)}function Su(t){var e;return t!==t.root&&((e=t.scroll)===null||e===void 0?void 0:e.wasRoot)}const Au=oo({attachResizeListener:(t,e)=>Et(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ve={current:void 0},ao=oo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ve.current){const t=new Au({});t.mount(window),t.setOptions({layoutScroll:!0}),ve.current=t}return ve.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),bu={pan:{Feature:Ul},drag:{Feature:Nl,ProjectionNode:ao,MeasureLayout:Qi}};function Ds(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,Bt(e)))}class wu extends Q{mount(){const{current:e}=this.node;e&&(this.unmount=br(e,n=>(Ds(this.node,n,"Start"),s=>Ds(this.node,s,"End"))))}unmount(){}}class Cu extends Q{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=kt(Et(this.node.current,"focus",()=>this.onFocus()),Et(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ms(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,Bt(e)))}class Vu extends Q{mount(){const{current:e}=this.node;e&&(this.unmount=Dr(e,n=>(Ms(this.node,n,"Start"),(s,{success:i})=>Ms(this.node,s,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ke=new WeakMap,xe=new WeakMap,Du=t=>{const e=ke.get(t.target);e&&e(t)},Mu=t=>{t.forEach(Du)};function Ru({root:t,...e}){const n=t||document;xe.has(n)||xe.set(n,{});const s=xe.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Mu,{root:t,...e})),s[i]}function Eu(t,e,n){const s=Ru(e);return ke.set(t,n),s.observe(t),()=>{ke.delete(t),s.unobserve(t)}}const Lu={some:0,all:1};class Fu extends Q{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:Lu[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 Eu(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(ku(e,n))&&this.startObserver()}unmount(){}}function ku({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Bu={inView:{Feature:Fu},tap:{Feature:Vu},focus:{Feature:Cu},hover:{Feature:wu}},Iu={layout:{ProjectionNode:ao,MeasureLayout:Qi}},qt={current:null},dn={current:!1};function lo(){if(dn.current=!0,!!Be)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>qt.current=t.matches;t.addListener(e),e()}else qt.current=!1}const ju=[...Li,k,Z],Ou=t=>ju.find(Ei(t)),Rs=new WeakMap;function Nu(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,pt(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,pt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Es=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Uu{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=un,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=G.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=ne(n),this.isVariantNode=Us(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,Rs.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)),dn.current||lo(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:qt.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Rs.delete(this.current),this.projection&&this.projection.unmount(),X(this.notifyUpdate),X(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=ot.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 dt){const n=dt[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<Es.length;s++){const i=Es[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=Nu(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=pt(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"&&(Mi(i)||Ti(i))?i=parseFloat(i):!Ou(i)&&Z.test(n)&&(i=Ci(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=Ke(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 nn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class uo extends Uu{constructor(){super(...arguments),this.KeyframeResolver=Fi}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 _u(t){return window.getComputedStyle(t)}class Ku extends uo{constructor(){super(...arguments),this.type="html",this.renderInstance=Ys}readValueFromInstance(e,n){if(ot.has(n)){const s=ln(n);return s&&s.default||0}else{const s=_u(e),i=(zs(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Zi(e,n)}build(e,n,s){$e(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Ye(e,n,s)}}class Wu extends uo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=R}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(ot.has(n)){const s=ln(n);return s&&s.default||0}return n=qs.has(n)?n:Ne(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Qs(e,n,s)}build(e,n,s){ze(e,n,this.isSVGTag,s.transformTemplate)}renderInstance(e,n,s,i){Zs(e,n,s,i)}mount(e){this.isSVGTag=Xe(e.tagName),super.mount(e)}}const Gu=(t,e)=>_e(t)?new Wu(e):new Ku(e,{allowProjection:t!==g.Fragment}),$u=yr({...ml,...Bu,...bu,...Iu},Gu),co=Lo($u);function ho(t){const e=J(()=>pt(t)),{isStatic:n}=g.useContext(Jt);if(n){const[,s]=g.useState(t);g.useEffect(()=>e.on("change",s),[])}return e}function fo(t,e){const n=ho(e()),s=()=>n.set(e());return s(),Qt(()=>{const i=()=>C.preRender(s,!1,!0),r=t.map(o=>o.on("change",i));return()=>{r.forEach(o=>o()),X(s)}}),n}const zu=t=>t&&typeof t=="object"&&t.mix,Hu=t=>zu(t)?t.mix:void 0;function Xu(...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=Ui(i,r,{mixer:Hu(r[0]),...o});return e?a(s):a}function Yu(t){St.current=[],t();const e=fo(St.current,t);return St.current=void 0,e}function qu(t,e,n,s){if(typeof t=="function")return Yu(t);const i=typeof e=="function"?e:Xu(e,n,s);return Array.isArray(t)?Ls(t,i):Ls([t],([r])=>i(r))}function Ls(t,e){const n=J(()=>[]);return fo(t,()=>{n.length=0;const s=t.length;for(let i=0;i<s;i++)n[i]=t[i].get();return e(n)})}function cc(){!dn.current&&lo();const[t]=g.useState(qt.current);return t}class Zu{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 Ju=()=>new Zu;function hc(){return J(Ju)}const po=g.createContext(null);function Qu(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=V(l.min,l.max,.5);return r===1&&a.layout.max+n>u||r===-1&&a.layout.min+n<u?Er(t,i,i+r):t}function tc({children:t,as:e="ul",axis:n="y",onReorder:s,values:i,...r},o){const a=J(()=>co[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(nc)},updateOrder:(h,f,d)=>{if(u.current)return;const p=Qu(l,h,f,d);l!==p&&(u.current=!0,s(p.map(ec).filter(m=>i.indexOf(m)!==-1)))}};return g.useEffect(()=>{u.current=!1}),I.jsx(a,{...r,ref:o,ignoreStrict:!0,children:I.jsx(po.Provider,{value:c,children:t})})}const fc=g.forwardRef(tc);function ec(t){return t.value}function nc(t,e){return t.layout.min-e.layout.min}function Fs(t,e=0){return L(t)?t:ho(e)}function sc({children:t,style:e={},value:n,as:s="li",onDrag:i,layout:r=!0,...o},a){const l=J(()=>co[s]),u=g.useContext(po),c={x:Fs(e.x),y:Fs(e.y)},h=qu([c.x,c.y],([m,y])=>m||y?1:"unset"),{axis:f,registerItem:d,updateOrder:p}=u;return I.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 dc=g.forwardRef(sc);export{ac as A,lc as L,fc as R,dc as a,hc as b,co as m,cc as u};
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as p,j as e}from"./
|
|
2
|
-
`):"No blockers found for selected sessions.";try{await navigator.clipboard.writeText(r),h("Copied blockers to clipboard.")}catch{h("Copy failed (clipboard unavailable).")}},$=async t=>{if(m===0||d)return;if(t==="cancel"){C({text:""});return}const r=u.filter(a=>w.has(a.id));h(null),k({action:t,processed:0,total:r.length});let s=0;const l=[];for(const a of r)try{await A(a,t)}catch(c){s+=1;const E=c instanceof Error?c.message:"unknown error";l.push(`${a.title||a.runId}: ${E}`)}finally{k(c=>c&&{...c,processed:Math.min(c.total,c.processed+1)})}const o=r.length-s;if(k(null),s>0){const a=l.length>0?` — ${l[0]}${l.length>1?` (+${l.length-1} more)`:""}`:"";h(`${t} finished: ${o} ok, ${s} failed.${a}`)}else h(`${t} finished: ${o} session${o===1?"":"s"}.`);try{await L()}catch{}t==="resume"?v(`Bulk resume requested: ${o} ok${s?`, ${s} failed`:""}.`):t==="pause"?v(`Bulk pause requested: ${o} ok${s?`, ${s} failed`:""}.`):t==="complete"&&v(`Bulk mark completed requested: ${o} ok${s?`, ${s} failed`:""}.`)},z=async()=>{if(!N||d||N.text.trim().toUpperCase()!=="CANCEL")return;const t=u.filter(a=>w.has(a.id));h(null),k({action:"cancel",processed:0,total:t.length}),C(null);let r=0;const s=[];for(const a of t)try{await A(a,"cancel")}catch(c){r+=1;const E=c instanceof Error?c.message:"unknown error";s.push(`${a.title||a.runId}: ${E}`)}finally{k(c=>c&&{...c,processed:Math.min(c.total,c.processed+1)})}const l=t.length-r;k(null);const o=s.length>0?` — ${s[0]}${s.length>1?` (+${s.length-1} more)`:""}`:"";h(`cancel finished: ${l} ok${r?`, ${r} failed`:""}.${o}`),v(`Bulk cancel requested: ${l} ok${r?`, ${r} failed`:""}.`);try{await L()}catch{}};return e.jsx(D,{open:n,onClose:b,maxWidth:"max-w-4xl",children:e.jsxs("div",{className:"flex h-full 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(W,{type:"session",size:14}),e.jsx("span",{className:"truncate",children:I}),e.jsx("span",{className:"rounded-full border border-strong bg-white/[0.04] px-2 py-0.5 text-caption font-semibold text-primary",children:g.total})]}),e.jsx("p",{className:"mt-1 text-body leading-relaxed text-secondary",children:P}),e.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-1.5",children:[e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-white/[0.1] bg-white/[0.03] px-2 py-0.5 text-micro text-secondary",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full",style:{backgroundColor:x.teal}}),"Total ",e.jsx("span",{className:"font-semibold text-white",children:g.total})]}),e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-white/[0.1] bg-white/[0.03] px-2 py-0.5 text-micro text-secondary",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full",style:{backgroundColor:g.active>0?x.lime:x.textMuted}}),"Active ",e.jsx("span",{className:"font-semibold text-white",children:g.active})]}),e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-white/[0.1] bg-white/[0.03] px-2 py-0.5 text-micro text-secondary",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full",style:{backgroundColor:g.blocked>0?x.red:x.textMuted}}),"Blocked ",e.jsx("span",{className:"font-semibold text-white",children:g.blocked})]}),e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-white/[0.1] bg-white/[0.03] px-2 py-0.5 text-micro text-secondary",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full",style:{backgroundColor:g.failed>0?x.red:x.textMuted}}),"Failed ",e.jsx("span",{className:"font-semibold text-white",children:g.failed})]})]})]}),e.jsx("button",{type:"button",onClick:b,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 bulk modal",children:"Close"})]}),e.jsxs("div",{className:"mt-4 flex flex-col gap-2 sm:flex-row sm:items-center",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("label",{className:"sr-only",htmlFor:"bulk-sessions-search",children:"Search sessions"}),e.jsx("input",{id:"bulk-sessions-search",value:S,onChange:t=>_(t.target.value),placeholder:"Search title, agent, run id…","data-modal-autofocus":"true",className:"w-full rounded-lg border border-strong bg-black/25 px-3 py-2 text-body text-white placeholder:text-muted focus:outline-none focus:ring-1 focus:ring-[#BFFF00]/35"})]}),e.jsx("button",{type:"button",onClick:R,disabled:u.length===0||!!d,className:"rounded-lg border border-strong bg-white/[0.03] px-3 py-2 text-caption text-primary transition-colors hover:bg-white/[0.08] disabled:opacity-45",children:T?"Clear all":`Select all (${u.length})`})]}),M&&e.jsx("div",{className:"mt-3 rounded-xl border border-white/[0.08] bg-white/[0.02] px-3 py-2 text-body text-secondary",children:M}),N&&e.jsxs("div",{className:"mt-3 rounded-xl border border-red-400/25 bg-red-500/[0.06] px-3 py-2.5",children:[e.jsxs("p",{className:"text-body font-semibold text-red-200",children:["Cancel ",m," session",m===1?"":"s","?"]}),e.jsxs("p",{className:"mt-1 text-caption text-red-200/70",children:["This is destructive. Type ",e.jsx("span",{className:"font-semibold",children:"CANCEL"})," to confirm."]}),e.jsxs("div",{className:"mt-2 flex flex-col gap-2 sm:flex-row sm:items-center",children:[e.jsx("input",{value:N.text,onChange:t=>C({text:t.target.value}),placeholder:"CANCEL",className:"flex-1 rounded-lg border border-red-300/25 bg-black/30 px-3 py-2 text-body text-white placeholder:text-muted focus:outline-none focus:ring-1 focus:ring-red-300/40"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{type:"button",onClick:()=>C(null),className:"rounded-lg border border-strong bg-white/[0.03] px-3 py-2 text-caption text-primary transition-colors hover:bg-white/[0.08]",children:"Back"}),e.jsx("button",{type:"button",onClick:z,disabled:N.text.trim().toUpperCase()!=="CANCEL",className:"rounded-lg border border-red-300/25 bg-red-500/15 px-3 py-2 text-caption font-semibold text-red-200 transition-colors hover:bg-red-500/20 disabled:opacity-45",children:"Confirm cancel"})]})]})]})]}),e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 py-4",children:u.length===0?e.jsx("div",{className:"rounded-xl border border-subtle bg-white/[0.02] p-4 text-body text-secondary",children:"No sessions match this view."}):e.jsx("div",{className:"space-y-2",children:u.map(t=>{const r=w.has(t.id),s=t.blockers??[],l=H(t.status??"",s.length),o=t.updatedAt??t.lastEventAt??t.startedAt,a=[(t.agentName??t.agentId??"").trim()||"Unknown agent",(t.status??"unknown").toLowerCase(),o?Q(o):null].filter(Boolean);return e.jsx("div",{className:"rounded-xl border border-white/[0.08] bg-white/[0.02] px-3 py-2.5 transition-colors hover:bg-white/[0.04]",style:{borderColor:r?`${x.lime}40`:"rgba(255,255,255,0.08)"},children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("input",{type:"checkbox",checked:r,onChange:()=>U(t.id),disabled:!!d,className:"mt-0.5 h-4 w-4 rounded border-white/20 bg-black/40 text-lime focus:ring-lime/40","aria-label":`Select session ${t.title}`}),e.jsx("button",{type:"button",onClick:()=>j(t),disabled:!!d,className:"min-w-0 flex-1 text-left",title:"Open session inspector",children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-body font-medium text-white",children:t.title}),e.jsx("p",{className:"mt-0.5 text-caption text-secondary",children:a.join(" · ")}),t.lastEventSummary&&e.jsx("p",{className:"mt-1 line-clamp-2 text-caption text-secondary",children:t.lastEventSummary}),s.length>0&&e.jsxs("p",{className:"mt-1 text-micro text-red-200/80",children:[s.length," blocker",s.length===1?"":"s"," · ",s[0]]})]}),e.jsx("span",{className:"shrink-0 rounded-full border px-2 py-0.5 text-micro font-semibold uppercase tracking-[0.08em]",style:{borderColor:`${l}30`,backgroundColor:`${l}14`,color:l},children:(t.status??"unknown").toUpperCase()})]})})]})},t.id)})})}),e.jsxs("div",{className:"flex flex-col gap-2 border-t border-subtle px-5 py-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2 text-caption text-secondary",children:[d?e.jsxs("span",{children:[d.action," ",d.processed,"/",d.total]}):e.jsx("span",{children:m>0?`${m} selected`:"No selection"}),i==="blocked"&&e.jsx("button",{type:"button",onClick:O,disabled:m===0||!!d,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] disabled:opacity-45",children:"Copy blockers"})]}),e.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>{const t=u.find(r=>w.has(r.id))??null;t&&j(t)},disabled:m!==1||!!d,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] disabled:opacity-45",children:"Open inspector"}),e.jsx("button",{type:"button",onClick:()=>void $("resume"),disabled:m===0||!!d,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 disabled:opacity-45",children:"Resume selected"}),e.jsx("button",{type:"button",onClick:()=>void $("complete"),disabled:m===0||!!d,className:"rounded-md border border-teal/25 bg-teal/10 px-3 py-1.5 text-caption font-semibold text-teal transition-colors hover:bg-teal/20 disabled:opacity-45",children:"Mark completed"}),e.jsx("button",{type:"button",onClick:()=>void $("pause"),disabled:m===0||!!d,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] disabled:opacity-45",children:"Pause selected"}),e.jsx("button",{type:"button",onClick:()=>void $("cancel"),disabled:m===0||!!d,className:"rounded-md border border-red-300/25 bg-red-500/10 px-3 py-1.5 text-caption font-semibold text-red-200 transition-colors hover:bg-red-500/15 disabled:opacity-45",children:"Cancel selected"})]})]})]})})}export{se as BulkSessionsModal};
|
|
1
|
+
import{r as p,j as e}from"./Dj2k1r16.js";import{y as D,E as W,e as m,r as Q}from"./DxUw4FMR.js";import"./BiOgVMED.js";import"./eeHXe_OQ.js";import"./cX2e-TLi.js";import"./BjK42gtU.js";import"./BV0BcV1u.js";const q={blocked:0,failed:1,running:2,active:2,queued:3,in_progress:3,pending:4,paused:5,cancelled:6,completed:7,archived:8};function Y(n){if(!n)return 0;const x=Date.parse(n);return Number.isFinite(x)?x:0}function F(n){return Y(n.updatedAt??n.lastEventAt??n.startedAt)}function G(n,x){const i=q[(n.status??"").toLowerCase()]??99,y=q[(x.status??"").toLowerCase()]??99;return i!==y?i-y:F(x)-F(n)}function H(n,x){const i=n.trim().toLowerCase();return i==="failed"?m.red:i==="blocked"||x>0?m.red:i==="running"||i==="active"||i==="in_progress"?m.lime:i==="queued"||i==="pending"?m.amber:i==="completed"?m.teal:m.textMuted}function J(n){switch(n){case"active":return{title:"Active Sessions",subtitle:"Running and queued work across agents."};case"blocked":return{title:"Blocked Sessions",subtitle:"Work that needs attention before it can proceed."};case"failed":return{title:"Failed Sessions",subtitle:"Runs that exited with an error and may need a retry."};default:return{title:"Sessions",subtitle:"All sessions visible to this dashboard."}}}function K(n,x){var j;const i=(x.status??"").toLowerCase(),y=((j=x.blockers)==null?void 0:j.length)??0;return n==="active"?["running","active","queued","pending","in_progress"].includes(i):n==="blocked"?i==="blocked"||y>0:n==="failed"?i==="failed":!0}function le({open:n,onClose:x,mode:i,sessions:y,onOpenSession:j,onRunAction:A,onRefetch:L,onSetNotice:v}){const{title:I,subtitle:P}=J(i),[S,_]=p.useState(""),[w,B]=p.useState(new Set),[d,k]=p.useState(null),[M,h]=p.useState(null),[N,C]=p.useState(null);p.useEffect(()=>{n&&(h(null),C(null))},[n]);const f=p.useMemo(()=>y.filter(t=>K(i,t)),[i,y]),g=p.useMemo(()=>{const t={};for(const o of f){const a=(o.status??"unknown").toLowerCase();t[a]=(t[a]??0)+1}const r=f.filter(o=>{var a;return(o.status??"").toLowerCase()==="blocked"||(((a=o.blockers)==null?void 0:a.length)??0)>0}).length,s=f.filter(o=>(o.status??"").toLowerCase()==="failed").length,l=f.filter(o=>["running","active","queued","pending","in_progress"].includes((o.status??"").toLowerCase())).length;return{total:f.length,active:l,blocked:r,failed:s,byStatus:t}},[f]),u=p.useMemo(()=>{const t=S.trim().toLowerCase(),r=[...f].sort(G);return t?r.filter(s=>[s.title,s.agentName,s.agentId,s.runId,s.lastEventSummary].filter(Boolean).join(" ").toLowerCase().includes(t)):r},[S,f]);p.useEffect(()=>{n&&B(t=>{const r=new Set(u.map(l=>l.id)),s=new Set;for(const l of t)r.has(l)&&s.add(l);return s})},[u,n]);const b=w.size,T=u.length>0&&u.every(t=>w.has(t.id)),R=()=>{d||B(t=>u.length===0?t:T?new Set:new Set(u.map(r=>r.id)))},U=t=>{d||B(r=>{const s=new Set(r);return s.has(t)?s.delete(t):s.add(t),s})},O=async()=>{if(b===0||d)return;const t=[];for(const s of u){if(!w.has(s.id))continue;const l=s.blockers??[];if(l.length!==0){t.push(`- ${s.title} (${l.length} blocker${l.length===1?"":"s"})`);for(const o of l)t.push(` - ${o}`)}}const r=t.length>0?t.join(`
|
|
2
|
+
`):"No blockers found for selected sessions.";try{await navigator.clipboard.writeText(r),h("Copied blockers to clipboard.")}catch{h("Copy failed (clipboard unavailable).")}},$=async t=>{if(b===0||d)return;if(t==="cancel"){C({text:""});return}const r=u.filter(a=>w.has(a.id));h(null),k({action:t,processed:0,total:r.length});let s=0;const l=[];for(const a of r)try{await A(a,t)}catch(c){s+=1;const E=c instanceof Error?c.message:"unknown error";l.push(`${a.title||a.runId}: ${E}`)}finally{k(c=>c&&{...c,processed:Math.min(c.total,c.processed+1)})}const o=r.length-s;if(k(null),s>0){const a=l.length>0?` — ${l[0]}${l.length>1?` (+${l.length-1} more)`:""}`:"";h(`${t} finished: ${o} ok, ${s} failed.${a}`)}else h(`${t} finished: ${o} session${o===1?"":"s"}.`);try{await L()}catch{}t==="resume"?v(`Bulk resume requested: ${o} ok${s?`, ${s} failed`:""}.`):t==="pause"?v(`Bulk pause requested: ${o} ok${s?`, ${s} failed`:""}.`):t==="complete"&&v(`Bulk mark completed requested: ${o} ok${s?`, ${s} failed`:""}.`)},z=async()=>{if(!N||d||N.text.trim().toUpperCase()!=="CANCEL")return;const t=u.filter(a=>w.has(a.id));h(null),k({action:"cancel",processed:0,total:t.length}),C(null);let r=0;const s=[];for(const a of t)try{await A(a,"cancel")}catch(c){r+=1;const E=c instanceof Error?c.message:"unknown error";s.push(`${a.title||a.runId}: ${E}`)}finally{k(c=>c&&{...c,processed:Math.min(c.total,c.processed+1)})}const l=t.length-r;k(null);const o=s.length>0?` — ${s[0]}${s.length>1?` (+${s.length-1} more)`:""}`:"";h(`cancel finished: ${l} ok${r?`, ${r} failed`:""}.${o}`),v(`Bulk cancel requested: ${l} ok${r?`, ${r} failed`:""}.`);try{await L()}catch{}};return e.jsx(D,{open:n,onClose:x,maxWidth:"max-w-4xl",children:e.jsxs("div",{className:"flex h-full 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(W,{type:"session",size:14}),e.jsx("span",{className:"truncate",children:I}),e.jsx("span",{className:"rounded-full border border-strong bg-white/[0.04] px-2 py-0.5 text-caption font-semibold text-primary",children:g.total})]}),e.jsx("p",{className:"mt-1 text-body leading-relaxed text-secondary",children:P}),e.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-1.5",children:[e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-white/[0.1] bg-white/[0.03] px-2 py-0.5 text-micro text-secondary",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full",style:{backgroundColor:m.teal}}),"Total ",e.jsx("span",{className:"font-semibold text-white",children:g.total})]}),e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-white/[0.1] bg-white/[0.03] px-2 py-0.5 text-micro text-secondary",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full",style:{backgroundColor:g.active>0?m.lime:m.textMuted}}),"Active ",e.jsx("span",{className:"font-semibold text-white",children:g.active})]}),e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-white/[0.1] bg-white/[0.03] px-2 py-0.5 text-micro text-secondary",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full",style:{backgroundColor:g.blocked>0?m.red:m.textMuted}}),"Blocked ",e.jsx("span",{className:"font-semibold text-white",children:g.blocked})]}),e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-white/[0.1] bg-white/[0.03] px-2 py-0.5 text-micro text-secondary",children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full",style:{backgroundColor:g.failed>0?m.red:m.textMuted}}),"Failed ",e.jsx("span",{className:"font-semibold text-white",children:g.failed})]})]})]}),e.jsx("button",{type:"button",onClick:x,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 bulk modal",children:"Close"})]}),e.jsxs("div",{className:"mt-4 flex flex-col gap-2 sm:flex-row sm:items-center",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("label",{className:"sr-only",htmlFor:"bulk-sessions-search",children:"Search sessions"}),e.jsx("input",{id:"bulk-sessions-search",value:S,onChange:t=>_(t.target.value),placeholder:"Search title, agent, run id…","data-modal-autofocus":"true",className:"w-full rounded-lg border border-strong bg-black/25 px-3 py-2 text-body text-white placeholder:text-muted focus:outline-none focus:ring-1 focus:ring-[#BFFF00]/35"})]}),e.jsx("button",{type:"button",onClick:R,disabled:u.length===0||!!d,className:"rounded-lg border border-strong bg-white/[0.03] px-3 py-2 text-caption text-primary transition-colors hover:bg-white/[0.08] disabled:opacity-45",children:T?"Clear all":`Select all (${u.length})`})]}),M&&e.jsx("div",{className:"mt-3 rounded-xl border border-white/[0.08] bg-white/[0.02] px-3 py-2 text-body text-secondary",children:M}),N&&e.jsxs("div",{className:"mt-3 rounded-xl border border-red-400/25 bg-red-500/[0.06] px-3 py-2.5",children:[e.jsxs("p",{className:"text-body font-semibold text-red-200",children:["Cancel ",b," session",b===1?"":"s","?"]}),e.jsxs("p",{className:"mt-1 text-caption text-red-200/70",children:["This is destructive. Type ",e.jsx("span",{className:"font-semibold",children:"CANCEL"})," to confirm."]}),e.jsxs("div",{className:"mt-2 flex flex-col gap-2 sm:flex-row sm:items-center",children:[e.jsx("input",{value:N.text,onChange:t=>C({text:t.target.value}),placeholder:"CANCEL",className:"flex-1 rounded-lg border border-red-300/25 bg-black/30 px-3 py-2 text-body text-white placeholder:text-muted focus:outline-none focus:ring-1 focus:ring-red-300/40"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{type:"button",onClick:()=>C(null),className:"rounded-lg border border-strong bg-white/[0.03] px-3 py-2 text-caption text-primary transition-colors hover:bg-white/[0.08]",children:"Back"}),e.jsx("button",{type:"button",onClick:z,disabled:N.text.trim().toUpperCase()!=="CANCEL",className:"rounded-lg border border-red-300/25 bg-red-500/15 px-3 py-2 text-caption font-semibold text-red-200 transition-colors hover:bg-red-500/20 disabled:opacity-45",children:"Confirm cancel"})]})]})]})]}),e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 py-4",children:u.length===0?e.jsx("div",{className:"rounded-xl border border-subtle bg-white/[0.02] p-4 text-body text-secondary",children:"No sessions match this view."}):e.jsx("div",{className:"space-y-2",children:u.map(t=>{const r=w.has(t.id),s=t.blockers??[],l=H(t.status??"",s.length),o=t.updatedAt??t.lastEventAt??t.startedAt,a=[(t.agentName??t.agentId??"").trim()||"Unknown agent",(t.status??"unknown").toLowerCase(),o?Q(o):null].filter(Boolean);return e.jsx("div",{className:"rounded-xl border border-white/[0.08] bg-white/[0.02] px-3 py-2.5 transition-colors hover:bg-white/[0.04]",style:{borderColor:r?`${m.lime}40`:"rgba(255,255,255,0.08)"},children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("input",{type:"checkbox",checked:r,onChange:()=>U(t.id),disabled:!!d,className:"mt-0.5 h-4 w-4 rounded border-white/20 bg-black/40 text-lime focus:ring-lime/40","aria-label":`Select session ${t.title}`}),e.jsx("button",{type:"button",onClick:()=>j(t),disabled:!!d,className:"min-w-0 flex-1 text-left",title:"Open session inspector",children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-body font-medium text-white",children:t.title}),e.jsx("p",{className:"mt-0.5 text-caption text-secondary",children:a.join(" · ")}),t.lastEventSummary&&e.jsx("p",{className:"mt-1 line-clamp-2 text-caption text-secondary",children:t.lastEventSummary}),s.length>0&&e.jsxs("p",{className:"mt-1 text-micro text-red-200/80",children:[s.length," blocker",s.length===1?"":"s"," · ",s[0]]})]}),e.jsx("span",{className:"shrink-0 rounded-full border px-2 py-0.5 text-micro font-semibold uppercase tracking-[0.08em]",style:{borderColor:`${l}30`,backgroundColor:`${l}14`,color:l},children:(t.status??"unknown").toUpperCase()})]})})]})},t.id)})})}),e.jsxs("div",{className:"flex flex-col gap-2 border-t border-subtle px-5 py-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2 text-caption text-secondary",children:[d?e.jsxs("span",{children:[d.action," ",d.processed,"/",d.total]}):e.jsx("span",{children:b>0?`${b} selected`:"No selection"}),i==="blocked"&&e.jsx("button",{type:"button",onClick:O,disabled:b===0||!!d,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] disabled:opacity-45",children:"Copy blockers"})]}),e.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[e.jsx("button",{type:"button",onClick:()=>{const t=u.find(r=>w.has(r.id))??null;t&&j(t)},disabled:b!==1||!!d,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] disabled:opacity-45",children:"Open inspector"}),e.jsx("button",{type:"button",onClick:()=>void $("resume"),disabled:b===0||!!d,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 disabled:opacity-45",children:"Resume selected"}),e.jsx("button",{type:"button",onClick:()=>void $("complete"),disabled:b===0||!!d,className:"rounded-md border border-teal/25 bg-teal/10 px-3 py-1.5 text-caption font-semibold text-teal transition-colors hover:bg-teal/20 disabled:opacity-45",children:"Mark completed"}),e.jsx("button",{type:"button",onClick:()=>void $("pause"),disabled:b===0||!!d,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] disabled:opacity-45",children:"Pause selected"}),e.jsx("button",{type:"button",onClick:()=>void $("cancel"),disabled:b===0||!!d,className:"rounded-md border border-red-300/25 bg-red-500/10 px-3 py-1.5 text-caption font-semibold text-red-200 transition-colors hover:bg-red-500/15 disabled:opacity-45",children:"Cancel selected"})]})]})]})})}export{le as BulkSessionsModal};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -10,13 +10,15 @@
|
|
|
10
10
|
<meta name="googlebot" content="noindex, nofollow, noarchive, nosnippet, noimageindex" />
|
|
11
11
|
<meta name="copyright" content="OrgX. All rights reserved." />
|
|
12
12
|
<title>OrgX Live Dashboard</title>
|
|
13
|
-
<script type="module" crossorigin src="/orgx/live/assets/
|
|
14
|
-
<link rel="modulepreload" crossorigin href="/orgx/live/assets/
|
|
15
|
-
<link rel="modulepreload" crossorigin href="/orgx/live/assets/
|
|
16
|
-
<link rel="modulepreload" crossorigin href="/orgx/live/assets/
|
|
17
|
-
<link rel="modulepreload" crossorigin href="/orgx/live/assets/
|
|
13
|
+
<script type="module" crossorigin src="/orgx/live/assets/DxUw4FMR.js"></script>
|
|
14
|
+
<link rel="modulepreload" crossorigin href="/orgx/live/assets/Dj2k1r16.js">
|
|
15
|
+
<link rel="modulepreload" crossorigin href="/orgx/live/assets/BiOgVMED.js">
|
|
16
|
+
<link rel="modulepreload" crossorigin href="/orgx/live/assets/eeHXe_OQ.js">
|
|
17
|
+
<link rel="modulepreload" crossorigin href="/orgx/live/assets/cX2e-TLi.js">
|
|
18
|
+
<link rel="modulepreload" crossorigin href="/orgx/live/assets/BjK42gtU.js">
|
|
19
|
+
<link rel="modulepreload" crossorigin href="/orgx/live/assets/BV0BcV1u.js">
|
|
18
20
|
<link rel="stylesheet" crossorigin href="/orgx/live/assets/qm8xLgv-.css">
|
|
19
|
-
<link rel="stylesheet" crossorigin href="/orgx/live/assets/
|
|
21
|
+
<link rel="stylesheet" crossorigin href="/orgx/live/assets/DNX2foSJ.css">
|
|
20
22
|
</head>
|
|
21
23
|
<body class="bg-[#080808] text-white antialiased">
|
|
22
24
|
<div id="root"></div>
|
|
Binary file
|
|
Binary file
|
package/dist/hash-utils.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export declare function stableHash(value: string): string;
|
|
2
|
+
export declare function deterministicActivityId(type: string, runId: string | null, timestamp: string, agentId: string | null, event: string | null): string;
|
|
2
3
|
export declare function idempotencyKey(parts: Array<string | null | undefined>): string;
|
package/dist/hash-utils.js
CHANGED
|
@@ -2,6 +2,10 @@ import { createHash } from "node:crypto";
|
|
|
2
2
|
export function stableHash(value) {
|
|
3
3
|
return createHash("sha256").update(value).digest("hex");
|
|
4
4
|
}
|
|
5
|
+
export function deterministicActivityId(type, runId, timestamp, agentId, event) {
|
|
6
|
+
const input = [type, runId ?? "", timestamp, agentId ?? "", event ?? ""].join("|");
|
|
7
|
+
return `act-${stableHash(input).slice(0, 32)}`;
|
|
8
|
+
}
|
|
5
9
|
export function idempotencyKey(parts) {
|
|
6
10
|
const raw = parts
|
|
7
11
|
.filter((part) => typeof part === "string" && part.length > 0)
|
|
@@ -204,6 +204,8 @@ export declare function createAutoContinueEngine(deps: CreateAutoContinueEngineD
|
|
|
204
204
|
scopeMilestoneIds: string[];
|
|
205
205
|
lastError: string | null;
|
|
206
206
|
isMockWorker: boolean;
|
|
207
|
+
cliSessionId: string | null;
|
|
208
|
+
resumedFromSessionId: string | null;
|
|
207
209
|
}>;
|
|
208
210
|
localInitiativeStatusOverrides: Map<string, {
|
|
209
211
|
status: string;
|
|
@@ -483,4 +485,38 @@ export declare function createAutoContinueEngine(deps: CreateAutoContinueEngineD
|
|
|
483
485
|
activeRunId: string | null;
|
|
484
486
|
activeTaskTokenEstimate: number | null;
|
|
485
487
|
}>;
|
|
488
|
+
workstreamSessionStore: Map<string, {
|
|
489
|
+
sessionId: string;
|
|
490
|
+
workstreamId: string;
|
|
491
|
+
initiativeId: string;
|
|
492
|
+
sourceClient: RuntimeSourceClient;
|
|
493
|
+
capturedAt: string;
|
|
494
|
+
fromRunId: string;
|
|
495
|
+
}>;
|
|
496
|
+
getWorkstreamSession: (workstreamId: string) => {
|
|
497
|
+
sessionId: string;
|
|
498
|
+
workstreamId: string;
|
|
499
|
+
initiativeId: string;
|
|
500
|
+
sourceClient: RuntimeSourceClient;
|
|
501
|
+
capturedAt: string;
|
|
502
|
+
fromRunId: string;
|
|
503
|
+
} | null;
|
|
504
|
+
setWorkstreamSession: (workstreamId: string, entry: {
|
|
505
|
+
sessionId: string;
|
|
506
|
+
workstreamId: string;
|
|
507
|
+
initiativeId: string;
|
|
508
|
+
sourceClient: RuntimeSourceClient;
|
|
509
|
+
capturedAt: string;
|
|
510
|
+
fromRunId: string;
|
|
511
|
+
}) => void;
|
|
512
|
+
clearWorkstreamSession: (initiativeId: string) => void;
|
|
513
|
+
listWorkstreamSessions: (initiativeId?: string) => {
|
|
514
|
+
sessionId: string;
|
|
515
|
+
workstreamId: string;
|
|
516
|
+
initiativeId: string;
|
|
517
|
+
sourceClient: RuntimeSourceClient;
|
|
518
|
+
capturedAt: string;
|
|
519
|
+
fromRunId: string;
|
|
520
|
+
}[];
|
|
521
|
+
sessionResumeEnabled: () => boolean;
|
|
486
522
|
};
|