@dss-kit/ui-kit 0.1.29 → 0.1.30

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.
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../src/components/builders/Modal/Modal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEL,KAAK,iBAAiB,EAGvB,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAIjD,MAAM,WAAW,UAAW,SAAQ,iBAAiB;IACnD,mCAAmC;IACnC,MAAM,EAAE,OAAO,CAAC;IAEhB,4CAA4C;IAC5C,yBAAyB;IACzB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,6BAA6B;IAC7B,oBAAoB;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC,CAAC;IAElC,yCAAyC;IACzC,oBAAoB;IACpB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B,mCAAmC;IACnC,oBAAoB;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,kCAAkC;IAClC,yBAAyB;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,0CAA0C;IAC1C,yBAAyB;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,4CAA4C;IAC5C,qBAAqB;IACrB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B,0FAA0F;IAC1F,qBAAqB;IACrB,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AAED,QAAA,MAAM,KAAK,mFAoGV,CAAC;AAGF,OAAO,EAAE,KAAK,EAAE,CAAC"}
1
+ {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../src/components/builders/Modal/Modal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEL,KAAK,iBAAiB,EAGvB,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAIjD,MAAM,WAAW,UAAW,SAAQ,iBAAiB;IACnD,mCAAmC;IACnC,MAAM,EAAE,OAAO,CAAC;IAEhB,4CAA4C;IAC5C,yBAAyB;IACzB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB,6BAA6B;IAC7B,oBAAoB;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC,CAAC;IAElC,yCAAyC;IACzC,oBAAoB;IACpB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B,mCAAmC;IACnC,oBAAoB;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,kCAAkC;IAClC,yBAAyB;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,0CAA0C;IAC1C,yBAAyB;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,4CAA4C;IAC5C,qBAAqB;IACrB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B,0FAA0F;IAC1F,qBAAqB;IACrB,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AAED,QAAA,MAAM,KAAK,mFAqGV,CAAC;AAGF,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -9,7 +9,7 @@
9
9
  to {
10
10
  opacity: 1;
11
11
  }
12
- `,jl=M.css({pointerEvents:"auto",animation:`${Ll} 0.2s ease-out`,backgroundColor:"var(--fill-bg-primary)",borderRadius:"var(--corner-md)",boxShadow:"0 4px 20px 0 var(--shadow-accent-secondary)"}),$l=({children:e,content:t,isOpen:n,onOpenChange:i,placement:s="bottom",trigger:o="click",offset:r=12,closeOnClickOutside:a=!0,closeOnEsc:l=!0,className:u,contentClassName:c,style:d,disabled:f=!1,openDelay:h=200,closeDelay:p=200,zIndex:g=1,popoverContentComponent:x=Il})=>{const[w,C]=v.useState(!1),y=n!==void 0,S=y?n:w,_=v.useRef(null),b=v.useRef(null),E=v.useRef(),R=v.useRef(),[I,A]=v.useState({top:0,left:0}),[z,J]=v.useState(s),N=v.useCallback(P=>{f||(y||C(P),i?.(P))},[f,y,i]),ee=v.useCallback(()=>{if(typeof window>"u")return s;const P=_.current?.getBoundingClientRect();if(!P)return s;const L=b.current?.getBoundingClientRect();if(!L)return s;const oe=P.top,W=window.innerHeight-P.bottom,U=P.left,ye=window.innerWidth-P.right;if(s.startsWith("top")){if(oe<L.height+r&&W>L.height+r)return s.replace("top","bottom")}else if(s.startsWith("bottom")&&W<L.height+r&&oe>L.height+r)return s.replace("bottom","top");if(s.startsWith("left")){if(U<L.width+r&&ye>L.width+r)return s.replace("left","right")}else if(s.startsWith("right")&&ye<L.width+r&&U>L.width+r)return s.replace("right","left");return s},[r,s]),te=v.useCallback(()=>{if(!_.current||!b.current||typeof window>"u")return;const P=_.current.getBoundingClientRect(),L=b.current.getBoundingClientRect(),oe=ee();J(oe);let W=0,U=0;switch(oe){case"top":W=P.top-L.height-r,U=P.left+P.width/2-L.width/2;break;case"top-start":W=P.top-L.height-r,U=P.left;break;case"top-end":W=P.top-L.height-r,U=P.right-L.width;break;case"bottom":W=P.bottom+r,U=P.left+P.width/2-L.width/2;break;case"bottom-start":W=P.bottom+r,U=P.left;break;case"bottom-end":W=P.bottom+r,U=P.right-L.width;break;case"left":W=P.top+P.height/2-L.height/2,U=P.left-L.width-r;break;case"left-start":W=P.top,U=P.left-L.width-r;break;case"left-end":W=P.bottom-L.height,U=P.left-L.width-r;break;case"right":W=P.top+P.height/2-L.height/2,U=P.right+r;break;case"right-start":W=P.top,U=P.right+r;break;case"right-end":W=P.bottom-L.height,U=P.right+r;break}W+=window.scrollY,U+=window.scrollX;const ye=r,je=window.scrollY+ye,$e=window.scrollY+window.innerHeight-ye,Oe=window.scrollX+ye,_e=window.scrollX+window.innerWidth-ye;U<Oe&&(U=Oe),U+L.width>_e&&(U=_e-L.width),W<je&&(W=je),W+L.height>$e&&(W=$e-L.height),A({top:W,left:U})},[r,ee]);v.useLayoutEffect(()=>{if(!S||typeof window>"u")return;te();const P=()=>te(),L=()=>{if(!_.current||!b.current)return;ee()!==z&&te()};window.addEventListener("resize",P),window.addEventListener("scroll",L,!0);const oe=new ResizeObserver(te);return _.current&&oe.observe(_.current),()=>{window.removeEventListener("resize",P),window.removeEventListener("scroll",L,!0),oe.disconnect()}},[S,te,z,ee]),v.useEffect(()=>{if(!S||!a||typeof document>"u")return;const P=L=>{const oe=L.target;_.current?.contains(oe)||b.current?.contains(oe)||N(!1)};return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[S,a,N]),v.useEffect(()=>{if(!S||!l||typeof document>"u")return;const P=L=>{L.key==="Escape"&&N(!1)};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[S,l,N]);const se=v.useCallback(()=>{o==="click"&&N(!S)},[o,S,N]),$=v.useCallback(()=>{o==="hover"&&(R.current&&clearTimeout(R.current),E.current=setTimeout(()=>{N(!0)},h))},[o,h,N]),K=v.useCallback(()=>{o==="hover"&&(E.current&&clearTimeout(E.current),R.current=setTimeout(()=>{N(!1)},p))},[o,p,N]),ne=v.useCallback(()=>{o==="focus"&&N(!0)},[o,N]),j=v.useCallback(()=>{o==="focus"&&N(!1)},[o,N]);v.useEffect(()=>()=>{E.current&&clearTimeout(E.current),R.current&&clearTimeout(R.current)},[]);const H=v.cloneElement(e,{ref:_,onClick:P=>{e.props.onClick?.(P),se()},onMouseEnter:P=>{e.props.onMouseEnter?.(P),$()},onMouseLeave:P=>{e.props.onMouseLeave?.(P),K()},onFocus:P=>{e.props.onFocus?.(P),ne()},onBlur:P=>{e.props.onBlur?.(P),j()},"aria-describedby":S?"popover-content":void 0,"aria-expanded":S});return m.jsxs(m.Fragment,{children:[H,S&&m.jsx(Zt,{children:m.jsx(V,{ref:b,id:"popover-content",role:"tooltip",className:M.cx(jl,u),style:{...d,position:"absolute",top:`${I.top}px`,left:`${I.left}px`,zIndex:g},onMouseEnter:o==="hover"?$:void 0,onMouseLeave:o==="hover"?K:void 0,children:m.jsx(x,{className:c,children:t})})})]})},Ol={sm:28,md:32,lg:40},li=v.forwardRef(({label:e,color:t="primary",size:n="md",onClick:i,onDelete:s,avatar:o,icon:r,disabled:a,className:l},u)=>{const c=v.useRef(null),d=v.useMemo(()=>{switch(t){case"primary":return{bg:"var(--status-neutral-tint-low)",color:"var(--text-primary)"};case"accent":return{bg:"var(--status-accent-tint-low)",color:"var(--text-accent)"};case"warning":return{bg:"var(--status-warning-tint-low)",color:"var(--text-warning)"};case"positive":return{bg:"var(--status-positive-tint-low)",color:"var(--text-positive)"};case"negative":return{bg:"var(--status-negative-tint-low)",color:"var(--text-negative)"};default:return{bg:"var(--status-neutral-tint-low)",color:"var(--text-primary)"}}},[t]),f=M.css({cursor:a?"not-allowed":i?"pointer":"default",opacity:a?.5:1,userSelect:"none",position:"relative",transition:"background-color 0.2s, opacity 0.2s","&:hover":a?void 0:{backgroundColor:d.bg}}),h=M.css({cursor:"pointer",opacity:.6,"&:hover":{opacity:1}});return m.jsxs(V,{ref:p=>{c.current=p,typeof u=="function"?u(p):u&&(u.current=p)},row:!0,alignItems:"center",gap:6,px:10,py:4,h:Ol[n],maxWidth:196,overflow:"hidden",borderRadius:"var(--corner-sm)",backgroundColor:d.bg,color:d.color,onClick:i,className:M.cx(f,l),children:[i&&m.jsx(st,{}),o&&m.jsx(V,{w:20,h:20,borderRadius:"50%",overflow:"hidden",children:o}),r&&m.jsx(V,{children:r}),typeof e=="string"?m.jsx(B,{variant:"caption-1",colorName:t,textOverflow:"ellipsis",overflow:"hidden",children:e}):e,s&&!a&&m.jsx(B,{className:h,colorName:t,onClick:p=>{p.stopPropagation(),s(p)},children:"×"})]})});li.displayName="Tag";const zl="_modal_1irhv_8",Bl="_closeButton_1irhv_24",Nl="_size_lg_1irhv_31",Hl="_size_md_1irhv_34",Gl="_size_sm_1irhv_37",fn={modal:zl,"modal-animation":"_modal-animation_1irhv_1",closeButton:Bl,size_lg:Nl,size_md:Hl,size_sm:Gl},Vo=v.forwardRef(({isOpen:e=!1,onClose:t,overlayClassName:n,modalClassName:i,size:s="md",closeOnBackdropClick:o=!0,closeOnEsc:r=!0,disableBodyScroll:a=!0,showAbsoluteCloseButton:l=!1,children:u},c)=>{v.useEffect(()=>{if(a&&e&&typeof window<"u"&&typeof document<"u"){const h=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=h}}},[e,a]);const d=v.useCallback(h=>{h.key==="Escape"&&t&&t()},[t]);v.useEffect(()=>{if(typeof window<"u"&&typeof document<"u"&&r&&e)return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[e,r,d]);const f=v.useCallback(h=>{h.target===h.currentTarget&&o&&t&&t()},[o,t]);return e?m.jsx(Zt,{children:m.jsx(V,{row:!0,absoluteFill:!0,center:!0,flex:1,onClick:f,display:e?"flex":"none",backgroundColor:"var(--fill-bg-overlay-primary)",className:n,children:m.jsxs(V,{ref:c,className:M.cx(fn.modal,fn[`size_${s}`],i),relative:!0,children:[l&&m.jsx(wt,{className:fn.closeButton,onClick:t,color:"neutral",children:m.jsx(To,{})}),u]})})}):null});Vo.displayName="Modal";const ui=v.createContext({});function ci(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}const di=typeof window<"u",Ao=di?v.useLayoutEffect:v.useEffect,Jt=v.createContext(null);function fi(e,t){e.indexOf(t)===-1&&e.push(t)}function hi(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Me=(e,t,n)=>n>t?t:n<e?e:n;function In(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let ot=()=>{},Te=()=>{};process.env.NODE_ENV!=="production"&&(ot=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(In(t,n))},Te=(e,t,n)=>{if(!e)throw new Error(In(t,n))});const Ee={},Do=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Fo(e){return typeof e=="object"&&e!==null}const ko=e=>/^0[^.\s]+$/u.test(e);function gi(e){let t;return()=>(t===void 0&&(t=e()),t)}const ve=e=>e,Wl=(e,t)=>n=>t(e(n)),Pt=(...e)=>e.reduce(Wl),xt=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i};class pi{constructor(){this.subscriptions=[]}add(t){return fi(this.subscriptions,t),()=>hi(this.subscriptions,t)}notify(t,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,i);else for(let o=0;o<s;o++){const r=this.subscriptions[o];r&&r(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ce=e=>e*1e3,me=e=>e/1e3;function Io(e,t){return t?e*(1e3/t):0}const ts=new Set;function mi(e,t,n){e||ts.has(t)||(console.warn(In(t,n)),ts.add(t))}const Lo=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Ul=1e-7,Kl=12;function ql(e,t,n,i,s){let o,r,a=0;do r=t+(n-t)/2,o=Lo(r,i,s)-e,o>0?n=r:t=r;while(Math.abs(o)>Ul&&++a<Kl);return r}function Mt(e,t,n,i){if(e===t&&n===i)return ve;const s=o=>ql(o,0,1,e,n);return o=>o===0||o===1?o:Lo(s(o),t,i)}const jo=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,$o=e=>t=>1-e(1-t),Oo=Mt(.33,1.53,.69,.99),vi=$o(Oo),zo=jo(vi),Bo=e=>(e*=2)<1?.5*vi(e):.5*(2-Math.pow(2,-10*(e-1))),yi=e=>1-Math.sin(Math.acos(e)),No=$o(yi),Ho=jo(yi),Xl=Mt(.42,0,1,1),Yl=Mt(0,0,.58,1),Go=Mt(.42,0,.58,1),Zl=e=>Array.isArray(e)&&typeof e[0]!="number",Wo=e=>Array.isArray(e)&&typeof e[0]=="number",ns={linear:ve,easeIn:Xl,easeInOut:Go,easeOut:Yl,circIn:yi,circInOut:Ho,circOut:No,backIn:vi,backInOut:zo,backOut:Oo,anticipate:Bo},Jl=e=>typeof e=="string",is=e=>{if(Wo(e)){Te(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,i,s]=e;return Mt(t,n,i,s)}else if(Jl(e))return Te(ns[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),ns[e];return e},Vt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Ql(e,t){let n=new Set,i=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){r.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,d=!1,f=!1)=>{const p=f&&s?n:i;return d&&r.add(c),p.has(c)||p.add(c),c},cancel:c=>{i.delete(c),r.delete(c)},process:c=>{if(a=c,s){o=!0;return}s=!0,[n,i]=[i,n],n.forEach(l),n.clear(),s=!1,o&&(o=!1,u.process(c))}};return u}const eu=40;function Uo(e,t){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=Vt.reduce((y,S)=>(y[S]=Ql(o),y),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:h,postRender:p}=r,g=()=>{const y=Ee.useManualTiming?s.timestamp:performance.now();n=!1,Ee.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(y-s.timestamp,eu),1)),s.timestamp=y,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),c.process(s),d.process(s),f.process(s),h.process(s),p.process(s),s.isProcessing=!1,n&&t&&(i=!1,e(g))},x=()=>{n=!0,i=!0,s.isProcessing||e(g)};return{schedule:Vt.reduce((y,S)=>{const _=r[S];return y[S]=(b,E=!1,R=!1)=>(n||x(),_.schedule(b,E,R)),y},{}),cancel:y=>{for(let S=0;S<Vt.length;S++)r[Vt[S]].cancel(y)},state:s,steps:r}}const{schedule:q,cancel:Fe,state:re,steps:hn}=Uo(typeof requestAnimationFrame<"u"?requestAnimationFrame:ve,!0);let $t;function tu(){$t=void 0}const de={now:()=>($t===void 0&&de.set(re.isProcessing||Ee.useManualTiming?re.timestamp:performance.now()),$t),set:e=>{$t=e,queueMicrotask(tu)}},Ko=e=>t=>typeof t=="string"&&t.startsWith(e),wi=Ko("--"),nu=Ko("var(--"),xi=e=>nu(e)?iu.test(e.split("/*")[0].trim()):!1,iu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,rt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ct={...rt,transform:e=>Me(0,1,e)},At={...rt,default:1},ht=e=>Math.round(e*1e5)/1e5,Ci=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function su(e){return e==null}const ou=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Si=(e,t)=>n=>!!(typeof n=="string"&&ou.test(n)&&n.startsWith(e)||t&&!su(n)&&Object.prototype.hasOwnProperty.call(n,t)),qo=(e,t,n)=>i=>{if(typeof i!="string")return i;const[s,o,r,a]=i.match(Ci);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},ru=e=>Me(0,255,e),gn={...rt,transform:e=>Math.round(ru(e))},He={test:Si("rgb","red"),parse:qo("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+gn.transform(e)+", "+gn.transform(t)+", "+gn.transform(n)+", "+ht(Ct.transform(i))+")"};function au(e){let t="",n="",i="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,i+=i,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const Ln={test:Si("#"),parse:au,transform:He.transform},Tt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ae=Tt("deg"),be=Tt("%"),k=Tt("px"),lu=Tt("vh"),uu=Tt("vw"),ss={...be,parse:e=>be.parse(e)/100,transform:e=>be.transform(e*100)},Xe={test:Si("hsl","hue"),parse:qo("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+be.transform(ht(t))+", "+be.transform(ht(n))+", "+ht(Ct.transform(i))+")"},Q={test:e=>He.test(e)||Ln.test(e)||Xe.test(e),parse:e=>He.test(e)?He.parse(e):Xe.test(e)?Xe.parse(e):Ln.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?He.transform(e):Xe.transform(e),getAnimatableNone:e=>{const t=Q.parse(e);return t.alpha=0,Q.transform(t)}},cu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function du(e){return isNaN(e)&&typeof e=="string"&&(e.match(Ci)?.length||0)+(e.match(cu)?.length||0)>0}const Xo="number",Yo="color",fu="var",hu="var(",os="${}",gu=/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 St(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const a=t.replace(gu,l=>(Q.test(l)?(i.color.push(o),s.push(Yo),n.push(Q.parse(l))):l.startsWith(hu)?(i.var.push(o),s.push(fu),n.push(l)):(i.number.push(o),s.push(Xo),n.push(parseFloat(l))),++o,os)).split(os);return{values:n,split:a,indexes:i,types:s}}function Zo(e){return St(e).values}function Jo(e){const{split:t,types:n}=St(e),i=t.length;return s=>{let o="";for(let r=0;r<i;r++)if(o+=t[r],s[r]!==void 0){const a=n[r];a===Xo?o+=ht(s[r]):a===Yo?o+=Q.transform(s[r]):o+=s[r]}return o}}const pu=e=>typeof e=="number"?0:Q.test(e)?Q.getAnimatableNone(e):e;function mu(e){const t=Zo(e);return Jo(e)(t.map(pu))}const ke={test:du,parse:Zo,createTransformer:Jo,getAnimatableNone:mu};function pn(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function vu({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let s=0,o=0,r=0;if(!t)s=o=r=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=pn(l,a,e+1/3),o=pn(l,a,e),r=pn(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:i}}function Ht(e,t){return n=>n>0?t:e}const Y=(e,t,n)=>e+(t-e)*n,mn=(e,t,n)=>{const i=e*e,s=n*(t*t-i)+i;return s<0?0:Math.sqrt(s)},yu=[Ln,He,Xe],wu=e=>yu.find(t=>t.test(e));function rs(e){const t=wu(e);if(ot(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Xe&&(n=vu(n)),n}const as=(e,t)=>{const n=rs(e),i=rs(t);if(!n||!i)return Ht(e,t);const s={...n};return o=>(s.red=mn(n.red,i.red,o),s.green=mn(n.green,i.green,o),s.blue=mn(n.blue,i.blue,o),s.alpha=Y(n.alpha,i.alpha,o),He.transform(s))},jn=new Set(["none","hidden"]);function xu(e,t){return jn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Cu(e,t){return n=>Y(e,t,n)}function _i(e){return typeof e=="number"?Cu:typeof e=="string"?xi(e)?Ht:Q.test(e)?as:bu:Array.isArray(e)?Qo:typeof e=="object"?Q.test(e)?as:Su:Ht}function Qo(e,t){const n=[...e],i=n.length,s=e.map((o,r)=>_i(o)(o,t[r]));return o=>{for(let r=0;r<i;r++)n[r]=s[r](o);return n}}function Su(e,t){const n={...e,...t},i={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(i[s]=_i(e[s])(e[s],t[s]));return s=>{for(const o in i)n[o]=i[o](s);return n}}function _u(e,t){const n=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],r=e.indexes[o][i[o]],a=e.values[r]??0;n[s]=a,i[o]++}return n}const bu=(e,t)=>{const n=ke.createTransformer(t),i=St(e),s=St(t);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?jn.has(e)&&!s.values.length||jn.has(t)&&!i.values.length?xu(e,t):Pt(Qo(_u(i,s),s.values),n):(ot(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Ht(e,t))};function er(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Y(e,t,n):_i(e)(e,t)}const Ru=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>q.update(t,n),stop:()=>Fe(t),now:()=>re.isProcessing?re.timestamp:de.now()}},tr=(e,t,n=10)=>{let i="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)i+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Gt=2e4;function bi(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<Gt;)t+=n,i=e.next(t);return t>=Gt?1/0:t}function Pu(e,t=100,n){const i=n({...e,keyframes:[0,t]}),s=Math.min(bi(i),Gt);return{type:"keyframes",ease:o=>i.next(s*o).value/t,duration:me(s)}}const Mu=5;function nr(e,t,n){const i=Math.max(t-Mu,0);return Io(n-e(i),t-i)}const X={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},vn=.001;function Tu({duration:e=X.duration,bounce:t=X.bounce,velocity:n=X.velocity,mass:i=X.mass}){let s,o;ot(e<=Ce(X.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-t;r=Me(X.minDamping,X.maxDamping,r),e=Me(X.minDuration,X.maxDuration,me(e)),r<1?(s=u=>{const c=u*r,d=c*e,f=c-n,h=$n(u,r),p=Math.exp(-d);return vn-f/h*p},o=u=>{const d=u*r*e,f=d*n+n,h=Math.pow(r,2)*Math.pow(u,2)*e,p=Math.exp(-d),g=$n(Math.pow(u,2),r);return(-s(u)+vn>0?-1:1)*((f-h)*p)/g}):(s=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-vn+c*d},o=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=Vu(s,o,a);if(e=Ce(e),isNaN(l))return{stiffness:X.stiffness,damping:X.damping,duration:e};{const u=Math.pow(l,2)*i;return{stiffness:u,damping:r*2*Math.sqrt(i*u),duration:e}}}const Eu=12;function Vu(e,t,n){let i=n;for(let s=1;s<Eu;s++)i=i-e(i)/t(i);return i}function $n(e,t){return e*Math.sqrt(1-t*t)}const Au=["duration","bounce"],Du=["stiffness","damping","mass"];function ls(e,t){return t.some(n=>e[n]!==void 0)}function Fu(e){let t={velocity:X.velocity,stiffness:X.stiffness,damping:X.damping,mass:X.mass,isResolvedFromDuration:!1,...e};if(!ls(e,Du)&&ls(e,Au))if(e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),s=i*i,o=2*Me(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:X.mass,stiffness:s,damping:o}}else{const n=Tu(e);t={...t,...n,mass:X.mass},t.isResolvedFromDuration=!0}return t}function Wt(e=X.visualDuration,t=X.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:s}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:h}=Fu({...n,velocity:-me(n.velocity||0)}),p=f||0,g=u/(2*Math.sqrt(l*c)),x=r-o,w=me(Math.sqrt(l/c)),C=Math.abs(x)<5;i||(i=C?X.restSpeed.granular:X.restSpeed.default),s||(s=C?X.restDelta.granular:X.restDelta.default);let y;if(g<1){const _=$n(w,g);y=b=>{const E=Math.exp(-g*w*b);return r-E*((p+g*w*x)/_*Math.sin(_*b)+x*Math.cos(_*b))}}else if(g===1)y=_=>r-Math.exp(-w*_)*(x+(p+w*x)*_);else{const _=w*Math.sqrt(g*g-1);y=b=>{const E=Math.exp(-g*w*b),R=Math.min(_*b,300);return r-E*((p+g*w*x)*Math.sinh(R)+_*x*Math.cosh(R))/_}}const S={calculatedDuration:h&&d||null,next:_=>{const b=y(_);if(h)a.done=_>=d;else{let E=_===0?p:0;g<1&&(E=_===0?Ce(p):nr(y,_,b));const R=Math.abs(E)<=i,I=Math.abs(r-b)<=s;a.done=R&&I}return a.value=a.done?r:b,a},toString:()=>{const _=Math.min(bi(S),Gt),b=tr(E=>S.next(_*E).value,_,30);return _+"ms "+b},toTransition:()=>{}};return S}Wt.applyToOptions=e=>{const t=Pu(e,100,Wt);return e.ease=t.ease,e.duration=Ce(t.duration),e.type="keyframes",e};function On({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},h=R=>a!==void 0&&R<a||l!==void 0&&R>l,p=R=>a===void 0?l:l===void 0||Math.abs(a-R)<Math.abs(l-R)?a:l;let g=n*t;const x=d+g,w=r===void 0?x:r(x);w!==x&&(g=w-d);const C=R=>-g*Math.exp(-R/i),y=R=>w+C(R),S=R=>{const I=C(R),A=y(R);f.done=Math.abs(I)<=u,f.value=f.done?w:A};let _,b;const E=R=>{h(f.value)&&(_=R,b=Wt({keyframes:[f.value,p(f.value)],velocity:nr(y,R,f.value),damping:s,stiffness:o,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:R=>{let I=!1;return!b&&_===void 0&&(I=!0,S(R),E(R)),_!==void 0&&R>=_?b.next(R-_):(!I&&S(R),f)}}}function ku(e,t,n){const i=[],s=n||Ee.mix||er,o=e.length-1;for(let r=0;r<o;r++){let a=s(e[r],e[r+1]);if(t){const l=Array.isArray(t)?t[r]||ve:t;a=Pt(l,a)}i.push(a)}return i}function Iu(e,t,{clamp:n=!0,ease:i,mixer:s}={}){const o=e.length;if(Te(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const r=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=ku(t,i,s),l=a.length,u=c=>{if(r&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);const f=xt(e[d],e[d+1],c);return a[d](f)};return n?c=>u(Me(e[0],e[o-1],c)):u}function Lu(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const s=xt(0,t,i);e.push(Y(n,1,s))}}function ju(e){const t=[0];return Lu(t,e.length-1),t}function $u(e,t){return e.map(n=>n*t)}function Ou(e,t){return e.map(()=>t||Go).splice(0,e.length-1)}function Ye({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const s=Zl(i)?i.map(is):is(i),o={done:!1,value:t[0]},r=$u(n&&n.length===t.length?n:ju(t),e),a=Iu(r,t,{ease:Array.isArray(s)?s:Ou(t,s)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const zu=e=>e!==null;function Ri(e,{repeat:t,repeatType:n="loop"},i,s=1){const o=e.filter(zu),a=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||i===void 0?o[a]:i}const Bu={decay:On,inertia:On,tween:Ye,keyframes:Ye,spring:Wt};function ir(e){typeof e.type=="string"&&(e.type=Bu[e.type])}class Pi{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Nu=e=>e/100;class Mi extends Pi{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==de.now()&&this.tick(de.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;ir(t);const{type:n=Ye,repeat:i=0,repeatDelay:s=0,repeatType:o,velocity:r=0}=t;let{keyframes:a}=t;const l=n||Ye;process.env.NODE_ENV!=="production"&&l!==Ye&&Te(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Ye&&typeof a[0]!="number"&&(this.mixKeyframes=Pt(Nu,er(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=bi(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:i,totalDuration:s,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return i.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:h,type:p,onUpdate:g,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const w=this.currentTime-u*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?w<0:w>s;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let y=this.currentTime,S=i;if(d){const R=Math.min(this.currentTime,s)/a;let I=Math.floor(R),A=R%1;!A&&R>=1&&(A=1),A===1&&I--,I=Math.min(I,d+1),!!(I%2)&&(f==="reverse"?(A=1-A,h&&(A-=h/a)):f==="mirror"&&(S=r)),y=Me(0,1,A)*a}const _=C?{done:!1,value:c[0]}:S.next(y);o&&(_.value=o(_.value));let{done:b}=_;!C&&l!==null&&(b=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&b);return E&&p!==On&&(_.value=Ri(c,this.options,x,this.speed)),g&&g(_.value),E&&this.finish(),_}then(t,n){return this.finished.then(t,n)}get duration(){return me(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+me(t)}get time(){return me(this.currentTime)}set time(t){t=Ce(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(de.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=me(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Ru,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(de.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Hu(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Ge=e=>e*180/Math.PI,zn=e=>{const t=Ge(Math.atan2(e[1],e[0]));return Bn(t)},Gu={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:zn,rotateZ:zn,skewX:e=>Ge(Math.atan(e[1])),skewY:e=>Ge(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Bn=e=>(e=e%360,e<0&&(e+=360),e),us=zn,cs=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ds=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Wu={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:cs,scaleY:ds,scale:e=>(cs(e)+ds(e))/2,rotateX:e=>Bn(Ge(Math.atan2(e[6],e[5]))),rotateY:e=>Bn(Ge(Math.atan2(-e[2],e[0]))),rotateZ:us,rotate:us,skewX:e=>Ge(Math.atan(e[4])),skewY:e=>Ge(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Nn(e){return e.includes("scale")?1:0}function Hn(e,t){if(!e||e==="none")return Nn(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Wu,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Gu,s=a}if(!s)return Nn(t);const o=i[t],r=s[1].split(",").map(Ku);return typeof o=="function"?o(r):r[o]}const Uu=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Hn(n,t)};function Ku(e){return parseFloat(e.trim())}const at=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],lt=new Set(at),fs=e=>e===rt||e===k,qu=new Set(["x","y","z"]),Xu=at.filter(e=>!qu.has(e));function Yu(e){const t=[];return Xu.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const We={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Hn(t,"x"),y:(e,{transform:t})=>Hn(t,"y")};We.translateX=We.x;We.translateY=We.y;const Ue=new Set;let Gn=!1,Wn=!1,Un=!1;function sr(){if(Wn){const e=Array.from(Ue).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const s=Yu(i);s.length&&(n.set(i,s),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([o,r])=>{i.getValue(o)?.set(r)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}Wn=!1,Gn=!1,Ue.forEach(e=>e.complete(Un)),Ue.clear()}function or(){Ue.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Wn=!0)})}function Zu(){Un=!0,or(),sr(),Un=!1}class Ti{constructor(t,n,i,s,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=s,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(Ue.add(this),Gn||(Gn=!0,q.read(or),q.resolveKeyframes(sr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:s}=this;if(t[0]===null){const o=s?.get(),r=t[t.length-1];if(o!==void 0)t[0]=o;else if(i&&n){const a=i.readValue(n,r);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=r),s&&o===void 0&&s.set(t[0])}Hu(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ue.delete(this)}cancel(){this.state==="scheduled"&&(Ue.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ju=e=>e.startsWith("--");function Qu(e,t,n){Ju(t)?e.style.setProperty(t,n):e.style[t]=n}const ec=gi(()=>window.ScrollTimeline!==void 0),tc={};function nc(e,t){const n=gi(e);return()=>tc[t]??n()}const rr=nc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ft=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,hs={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ft([0,.65,.55,1]),circOut:ft([.55,0,1,.45]),backIn:ft([.31,.01,.66,-.59]),backOut:ft([.33,1.53,.69,.99])};function ar(e,t){if(e)return typeof e=="function"?rr()?tr(e,t):"ease-out":Wo(e)?ft(e):Array.isArray(e)?e.map(n=>ar(n,t)||hs.easeOut):hs[e]}function ic(e,t,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=ar(a,s);Array.isArray(d)&&(c.easing=d);const f={delay:i,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(c,f)}function lr(e){return typeof e=="function"&&"applyToOptions"in e}function sc({type:e,...t}){return lr(e)&&rr()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class oc extends Pi{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:i,keyframes:s,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=t,Te(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=sc(t);this.animation=ic(n,i,s,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=Ri(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Qu(n,i,c),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return me(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+me(t)}get time(){return me(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ce(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&ec()?(this.animation.timeline=t,ve):n(this)}}const ur={anticipate:Bo,backInOut:zo,circInOut:Ho};function rc(e){return e in ur}function ac(e){typeof e.ease=="string"&&rc(e.ease)&&(e.ease=ur[e.ease])}const gs=10;class lc extends oc{constructor(t){ac(t),ir(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:s,element:o,...r}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Mi({...r,autoplay:!1}),l=Ce(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-gs).value,a.sample(l).value,gs),a.stop()}}const ps=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ke.test(e)||e==="0")&&!e.startsWith("url("));function uc(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function cc(e,t,n,i){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],r=ps(s,t),a=ps(o,t);return ot(r===a,`You are trying to animate ${t} from "${s}" to "${o}". "${r?o:s}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:uc(e)||(n==="spring"||lr(n))&&i}function Kn(e){e.duration=0,e.type="keyframes"}const dc=new Set(["opacity","clipPath","filter","transform"]),fc=gi(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function hc(e){const{motionValue:t,name:n,repeatDelay:i,repeatType:s,damping:o,type:r}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return fc()&&n&&dc.has(n)&&(n!=="transform"||!u)&&!l&&!i&&s!=="mirror"&&o!==0&&r!=="inertia"}const gc=40;class pc extends Pi{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=de.now();const f={autoplay:t,delay:n,type:i,repeat:s,repeatDelay:o,repeatType:r,name:l,motionValue:u,element:c,...d},h=c?.KeyframeResolver||Ti;this.keyframeResolver=new h(a,(p,g,x)=>this.onKeyframesResolved(p,g,f,!x),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,s){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:u,onUpdate:c}=i;this.resolvedAt=de.now(),cc(t,o,r,a)||((Ee.instantAnimations||!l)&&c?.(Ri(t,i,n)),t[0]=t[t.length-1],Kn(i),i.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>gc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},h=!u&&hc(f)?new lc({...f,element:f.motionValue.owner.current}):new Mi(f);h.finished.then(()=>this.notifyFinished()).catch(ve),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Zu()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const mc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function vc(e){const t=mc.exec(e);if(!t)return[,];const[,n,i,s]=t;return[`--${n??i}`,s]}const yc=4;function cr(e,t,n=1){Te(n<=yc,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,s]=vc(e);if(!i)return;const o=window.getComputedStyle(t).getPropertyValue(i);if(o){const r=o.trim();return Do(r)?parseFloat(r):r}return xi(s)?cr(s,t,n+1):s}function Ei(e,t){return e?.[t]??e?.default??e}const dr=new Set(["width","height","top","left","right","bottom",...at]),wc={test:e=>e==="auto",parse:e=>e},fr=e=>t=>t.test(e),hr=[rt,k,be,Ae,uu,lu,wc],ms=e=>hr.find(fr(e));function xc(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ko(e):!0}const Cc=new Set(["brightness","contrast","saturate","opacity"]);function Sc(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(Ci)||[];if(!i)return e;const s=n.replace(i,"");let o=Cc.has(t)?1:0;return i!==n&&(o*=100),t+"("+o+s+")"}const _c=/\b([a-z-]*)\(.*?\)/gu,qn={...ke,getAnimatableNone:e=>{const t=e.match(_c);return t?t.map(Sc).join(" "):e}},vs={...rt,transform:Math.round},bc={rotate:Ae,rotateX:Ae,rotateY:Ae,rotateZ:Ae,scale:At,scaleX:At,scaleY:At,scaleZ:At,skew:Ae,skewX:Ae,skewY:Ae,distance:k,translateX:k,translateY:k,translateZ:k,x:k,y:k,z:k,perspective:k,transformPerspective:k,opacity:Ct,originX:ss,originY:ss,originZ:k},Vi={borderWidth:k,borderTopWidth:k,borderRightWidth:k,borderBottomWidth:k,borderLeftWidth:k,borderRadius:k,radius:k,borderTopLeftRadius:k,borderTopRightRadius:k,borderBottomRightRadius:k,borderBottomLeftRadius:k,width:k,maxWidth:k,height:k,maxHeight:k,top:k,right:k,bottom:k,left:k,padding:k,paddingTop:k,paddingRight:k,paddingBottom:k,paddingLeft:k,margin:k,marginTop:k,marginRight:k,marginBottom:k,marginLeft:k,backgroundPositionX:k,backgroundPositionY:k,...bc,zIndex:vs,fillOpacity:Ct,strokeOpacity:Ct,numOctaves:vs},Rc={...Vi,color:Q,backgroundColor:Q,outlineColor:Q,fill:Q,stroke:Q,borderColor:Q,borderTopColor:Q,borderRightColor:Q,borderBottomColor:Q,borderLeftColor:Q,filter:qn,WebkitFilter:qn},gr=e=>Rc[e];function pr(e,t){let n=gr(e);return n!==qn&&(n=ke),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Pc=new Set(["auto","none","0"]);function Mc(e,t,n){let i=0,s;for(;i<e.length&&!s;){const o=e[i];typeof o=="string"&&!Pc.has(o)&&St(o).values.length&&(s=e[i]),i++}if(s&&n)for(const o of t)e[o]=pr(n,s)}class Tc extends Ti{constructor(t,n,i,s,o){super(t,n,i,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),xi(u))){const c=cr(u,n.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!dr.has(i)||t.length!==2)return;const[s,o]=t,r=ms(s),a=ms(o);if(r!==a)if(fs(r)&&fs(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else We[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let s=0;s<t.length;s++)(t[s]===null||xc(t[s]))&&i.push(s);i.length&&Mc(t,i,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=We[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(i,s).jump(s,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=i.length-1,r=i[o];i[o]=We[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{t.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function Ec(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const s=n?.[e]??i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}const mr=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function vr(e){return Fo(e)&&"offsetHeight"in e}const ys=30,Vc=e=>!isNaN(parseFloat(e));class Ac{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const s=de.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=de.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Vc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&mi(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new pi);const i=this.events[t].add(n);return t==="change"?()=>{i(),q.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=de.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ys)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ys);return Io(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function nt(e,t){return new Ac(e,t)}const{schedule:Ai}=Uo(queueMicrotask,!1),xe={x:!1,y:!1};function yr(){return xe.x||xe.y}function Dc(e){return e==="x"||e==="y"?xe[e]?null:(xe[e]=!0,()=>{xe[e]=!1}):xe.x||xe.y?null:(xe.x=xe.y=!0,()=>{xe.x=xe.y=!1})}function wr(e,t){const n=Ec(e),i=new AbortController,s={passive:!0,...t,signal:i.signal};return[n,s,()=>i.abort()]}function ws(e){return!(e.pointerType==="touch"||yr())}function Fc(e,t,n={}){const[i,s,o]=wr(e,n),r=a=>{if(!ws(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const c=d=>{ws(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,s)};return i.forEach(a=>{a.addEventListener("pointerenter",r,s)}),o}const xr=(e,t)=>t?e===t?!0:xr(e,t.parentElement):!1,Di=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,kc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ic(e){return kc.has(e.tagName)||e.tabIndex!==-1}const Ot=new WeakSet;function xs(e){return t=>{t.key==="Enter"&&e(t)}}function yn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Lc=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=xs(()=>{if(Ot.has(n))return;yn(n,"down");const s=xs(()=>{yn(n,"up")}),o=()=>yn(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function Cs(e){return Di(e)&&!yr()}function jc(e,t,n={}){const[i,s,o]=wr(e,n),r=a=>{const l=a.currentTarget;if(!Cs(a))return;Ot.add(l);const u=t(l,a),c=(h,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Ot.has(l)&&Ot.delete(l),Cs(h)&&typeof u=="function"&&u(h,{success:p})},d=h=>{c(h,l===window||l===document||n.useGlobalTarget||xr(l,h.target))},f=h=>{c(h,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",f,s)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,s),vr(a)&&(a.addEventListener("focus",u=>Lc(u,s)),!Ic(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Cr(e){return Fo(e)&&"ownerSVGElement"in e}function $c(e){return Cr(e)&&e.tagName==="svg"}const le=e=>!!(e&&e.getVelocity),Oc=[...hr,Q,ke],zc=e=>Oc.find(fr(e)),Fi=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Ss(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Bc(...e){return t=>{let n=!1;const i=e.map(s=>{const o=Ss(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<i.length;s++){const o=i[s];typeof o=="function"?o():Ss(e[s],null)}}}}function Nc(...e){return T.useCallback(Bc(...e),e)}class Hc extends T.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const i=n.offsetParent,s=vr(i)&&i.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=s-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Gc({children:e,isPresent:t,anchorX:n,root:i}){const s=v.useId(),o=v.useRef(null),r=v.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=v.useContext(Fi),l=Nc(o,e?.ref);return v.useInsertionEffect(()=>{const{width:u,height:c,top:d,left:f,right:h}=r.current;if(t||!o.current||!u||!c)return;const p=n==="left"?`left: ${f}`:`right: ${h}`;o.current.dataset.motionPopId=s;const g=document.createElement("style");a&&(g.nonce=a);const x=i??document.head;return x.appendChild(g),g.sheet&&g.sheet.insertRule(`
12
+ `,jl=M.css({pointerEvents:"auto",animation:`${Ll} 0.2s ease-out`,backgroundColor:"var(--fill-bg-primary)",borderRadius:"var(--corner-md)",boxShadow:"0 4px 20px 0 var(--shadow-accent-secondary)"}),$l=({children:e,content:t,isOpen:n,onOpenChange:i,placement:s="bottom",trigger:o="click",offset:r=12,closeOnClickOutside:a=!0,closeOnEsc:l=!0,className:u,contentClassName:c,style:d,disabled:f=!1,openDelay:h=200,closeDelay:p=200,zIndex:g=1,popoverContentComponent:x=Il})=>{const[w,C]=v.useState(!1),y=n!==void 0,S=y?n:w,_=v.useRef(null),b=v.useRef(null),E=v.useRef(),R=v.useRef(),[I,A]=v.useState({top:0,left:0}),[z,J]=v.useState(s),N=v.useCallback(P=>{f||(y||C(P),i?.(P))},[f,y,i]),ee=v.useCallback(()=>{if(typeof window>"u")return s;const P=_.current?.getBoundingClientRect();if(!P)return s;const L=b.current?.getBoundingClientRect();if(!L)return s;const oe=P.top,W=window.innerHeight-P.bottom,U=P.left,ye=window.innerWidth-P.right;if(s.startsWith("top")){if(oe<L.height+r&&W>L.height+r)return s.replace("top","bottom")}else if(s.startsWith("bottom")&&W<L.height+r&&oe>L.height+r)return s.replace("bottom","top");if(s.startsWith("left")){if(U<L.width+r&&ye>L.width+r)return s.replace("left","right")}else if(s.startsWith("right")&&ye<L.width+r&&U>L.width+r)return s.replace("right","left");return s},[r,s]),te=v.useCallback(()=>{if(!_.current||!b.current||typeof window>"u")return;const P=_.current.getBoundingClientRect(),L=b.current.getBoundingClientRect(),oe=ee();J(oe);let W=0,U=0;switch(oe){case"top":W=P.top-L.height-r,U=P.left+P.width/2-L.width/2;break;case"top-start":W=P.top-L.height-r,U=P.left;break;case"top-end":W=P.top-L.height-r,U=P.right-L.width;break;case"bottom":W=P.bottom+r,U=P.left+P.width/2-L.width/2;break;case"bottom-start":W=P.bottom+r,U=P.left;break;case"bottom-end":W=P.bottom+r,U=P.right-L.width;break;case"left":W=P.top+P.height/2-L.height/2,U=P.left-L.width-r;break;case"left-start":W=P.top,U=P.left-L.width-r;break;case"left-end":W=P.bottom-L.height,U=P.left-L.width-r;break;case"right":W=P.top+P.height/2-L.height/2,U=P.right+r;break;case"right-start":W=P.top,U=P.right+r;break;case"right-end":W=P.bottom-L.height,U=P.right+r;break}W+=window.scrollY,U+=window.scrollX;const ye=r,je=window.scrollY+ye,$e=window.scrollY+window.innerHeight-ye,Oe=window.scrollX+ye,_e=window.scrollX+window.innerWidth-ye;U<Oe&&(U=Oe),U+L.width>_e&&(U=_e-L.width),W<je&&(W=je),W+L.height>$e&&(W=$e-L.height),A({top:W,left:U})},[r,ee]);v.useLayoutEffect(()=>{if(!S||typeof window>"u")return;te();const P=()=>te(),L=()=>{if(!_.current||!b.current)return;ee()!==z&&te()};window.addEventListener("resize",P),window.addEventListener("scroll",L,!0);const oe=new ResizeObserver(te);return _.current&&oe.observe(_.current),()=>{window.removeEventListener("resize",P),window.removeEventListener("scroll",L,!0),oe.disconnect()}},[S,te,z,ee]),v.useEffect(()=>{if(!S||!a||typeof document>"u")return;const P=L=>{const oe=L.target;_.current?.contains(oe)||b.current?.contains(oe)||N(!1)};return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[S,a,N]),v.useEffect(()=>{if(!S||!l||typeof document>"u")return;const P=L=>{L.key==="Escape"&&N(!1)};return document.addEventListener("keydown",P),()=>document.removeEventListener("keydown",P)},[S,l,N]);const se=v.useCallback(()=>{o==="click"&&N(!S)},[o,S,N]),$=v.useCallback(()=>{o==="hover"&&(R.current&&clearTimeout(R.current),E.current=setTimeout(()=>{N(!0)},h))},[o,h,N]),K=v.useCallback(()=>{o==="hover"&&(E.current&&clearTimeout(E.current),R.current=setTimeout(()=>{N(!1)},p))},[o,p,N]),ne=v.useCallback(()=>{o==="focus"&&N(!0)},[o,N]),j=v.useCallback(()=>{o==="focus"&&N(!1)},[o,N]);v.useEffect(()=>()=>{E.current&&clearTimeout(E.current),R.current&&clearTimeout(R.current)},[]);const H=v.cloneElement(e,{ref:_,onClick:P=>{e.props.onClick?.(P),se()},onMouseEnter:P=>{e.props.onMouseEnter?.(P),$()},onMouseLeave:P=>{e.props.onMouseLeave?.(P),K()},onFocus:P=>{e.props.onFocus?.(P),ne()},onBlur:P=>{e.props.onBlur?.(P),j()},"aria-describedby":S?"popover-content":void 0,"aria-expanded":S});return m.jsxs(m.Fragment,{children:[H,S&&m.jsx(Zt,{children:m.jsx(V,{ref:b,id:"popover-content",role:"tooltip",className:M.cx(jl,u),style:{...d,position:"absolute",top:`${I.top}px`,left:`${I.left}px`,zIndex:g},onMouseEnter:o==="hover"?$:void 0,onMouseLeave:o==="hover"?K:void 0,children:m.jsx(x,{className:c,children:t})})})]})},Ol={sm:28,md:32,lg:40},li=v.forwardRef(({label:e,color:t="primary",size:n="md",onClick:i,onDelete:s,avatar:o,icon:r,disabled:a,className:l},u)=>{const c=v.useRef(null),d=v.useMemo(()=>{switch(t){case"primary":return{bg:"var(--status-neutral-tint-low)",color:"var(--text-primary)"};case"accent":return{bg:"var(--status-accent-tint-low)",color:"var(--text-accent)"};case"warning":return{bg:"var(--status-warning-tint-low)",color:"var(--text-warning)"};case"positive":return{bg:"var(--status-positive-tint-low)",color:"var(--text-positive)"};case"negative":return{bg:"var(--status-negative-tint-low)",color:"var(--text-negative)"};default:return{bg:"var(--status-neutral-tint-low)",color:"var(--text-primary)"}}},[t]),f=M.css({cursor:a?"not-allowed":i?"pointer":"default",opacity:a?.5:1,userSelect:"none",position:"relative",transition:"background-color 0.2s, opacity 0.2s","&:hover":a?void 0:{backgroundColor:d.bg}}),h=M.css({cursor:"pointer",opacity:.6,"&:hover":{opacity:1}});return m.jsxs(V,{ref:p=>{c.current=p,typeof u=="function"?u(p):u&&(u.current=p)},row:!0,alignItems:"center",gap:6,px:10,py:4,h:Ol[n],maxWidth:196,overflow:"hidden",borderRadius:"var(--corner-sm)",backgroundColor:d.bg,color:d.color,onClick:i,className:M.cx(f,l),children:[i&&m.jsx(st,{}),o&&m.jsx(V,{w:20,h:20,borderRadius:"50%",overflow:"hidden",children:o}),r&&m.jsx(V,{children:r}),typeof e=="string"?m.jsx(B,{variant:"caption-1",colorName:t,textOverflow:"ellipsis",overflow:"hidden",children:e}):e,s&&!a&&m.jsx(B,{className:h,colorName:t,onClick:p=>{p.stopPropagation(),s(p)},children:"×"})]})});li.displayName="Tag";const zl="_modal_1irhv_8",Bl="_closeButton_1irhv_24",Nl="_size_lg_1irhv_31",Hl="_size_md_1irhv_34",Gl="_size_sm_1irhv_37",fn={modal:zl,"modal-animation":"_modal-animation_1irhv_1",closeButton:Bl,size_lg:Nl,size_md:Hl,size_sm:Gl},Vo=v.forwardRef(({isOpen:e=!1,onClose:t,overlayClassName:n,modalClassName:i,size:s="md",closeOnBackdropClick:o=!0,closeOnEsc:r=!0,disableBodyScroll:a=!0,showAbsoluteCloseButton:l=!1,children:u},c)=>{v.useEffect(()=>{if(a&&e&&typeof window<"u"&&typeof document<"u"){const h=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=h}}},[e,a]);const d=v.useCallback(h=>{h.key==="Escape"&&t&&t()},[t]);v.useEffect(()=>{if(typeof window<"u"&&typeof document<"u"&&r&&e)return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[e,r,d]);const f=v.useCallback(h=>{h.target===h.currentTarget&&o&&t&&t()},[o,t]);return e?m.jsx(Zt,{children:m.jsx(V,{row:!0,absoluteFill:!0,center:!0,flex:1,onClick:f,display:e?"flex":"none",backgroundColor:"var(--fill-bg-overlay-primary)",className:n,zIndex:1,children:m.jsxs(V,{ref:c,className:M.cx(fn.modal,fn[`size_${s}`],i),relative:!0,children:[l&&m.jsx(wt,{className:fn.closeButton,onClick:t,color:"neutral",children:m.jsx(To,{})}),u]})})}):null});Vo.displayName="Modal";const ui=v.createContext({});function ci(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}const di=typeof window<"u",Ao=di?v.useLayoutEffect:v.useEffect,Jt=v.createContext(null);function fi(e,t){e.indexOf(t)===-1&&e.push(t)}function hi(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Me=(e,t,n)=>n>t?t:n<e?e:n;function In(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let ot=()=>{},Te=()=>{};process.env.NODE_ENV!=="production"&&(ot=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(In(t,n))},Te=(e,t,n)=>{if(!e)throw new Error(In(t,n))});const Ee={},Do=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Fo(e){return typeof e=="object"&&e!==null}const ko=e=>/^0[^.\s]+$/u.test(e);function gi(e){let t;return()=>(t===void 0&&(t=e()),t)}const ve=e=>e,Wl=(e,t)=>n=>t(e(n)),Pt=(...e)=>e.reduce(Wl),xt=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i};class pi{constructor(){this.subscriptions=[]}add(t){return fi(this.subscriptions,t),()=>hi(this.subscriptions,t)}notify(t,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,i);else for(let o=0;o<s;o++){const r=this.subscriptions[o];r&&r(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ce=e=>e*1e3,me=e=>e/1e3;function Io(e,t){return t?e*(1e3/t):0}const ts=new Set;function mi(e,t,n){e||ts.has(t)||(console.warn(In(t,n)),ts.add(t))}const Lo=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Ul=1e-7,Kl=12;function ql(e,t,n,i,s){let o,r,a=0;do r=t+(n-t)/2,o=Lo(r,i,s)-e,o>0?n=r:t=r;while(Math.abs(o)>Ul&&++a<Kl);return r}function Mt(e,t,n,i){if(e===t&&n===i)return ve;const s=o=>ql(o,0,1,e,n);return o=>o===0||o===1?o:Lo(s(o),t,i)}const jo=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,$o=e=>t=>1-e(1-t),Oo=Mt(.33,1.53,.69,.99),vi=$o(Oo),zo=jo(vi),Bo=e=>(e*=2)<1?.5*vi(e):.5*(2-Math.pow(2,-10*(e-1))),yi=e=>1-Math.sin(Math.acos(e)),No=$o(yi),Ho=jo(yi),Xl=Mt(.42,0,1,1),Yl=Mt(0,0,.58,1),Go=Mt(.42,0,.58,1),Zl=e=>Array.isArray(e)&&typeof e[0]!="number",Wo=e=>Array.isArray(e)&&typeof e[0]=="number",ns={linear:ve,easeIn:Xl,easeInOut:Go,easeOut:Yl,circIn:yi,circInOut:Ho,circOut:No,backIn:vi,backInOut:zo,backOut:Oo,anticipate:Bo},Jl=e=>typeof e=="string",is=e=>{if(Wo(e)){Te(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,i,s]=e;return Mt(t,n,i,s)}else if(Jl(e))return Te(ns[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),ns[e];return e},Vt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Ql(e,t){let n=new Set,i=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){r.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,d=!1,f=!1)=>{const p=f&&s?n:i;return d&&r.add(c),p.has(c)||p.add(c),c},cancel:c=>{i.delete(c),r.delete(c)},process:c=>{if(a=c,s){o=!0;return}s=!0,[n,i]=[i,n],n.forEach(l),n.clear(),s=!1,o&&(o=!1,u.process(c))}};return u}const eu=40;function Uo(e,t){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=Vt.reduce((y,S)=>(y[S]=Ql(o),y),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:h,postRender:p}=r,g=()=>{const y=Ee.useManualTiming?s.timestamp:performance.now();n=!1,Ee.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(y-s.timestamp,eu),1)),s.timestamp=y,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),c.process(s),d.process(s),f.process(s),h.process(s),p.process(s),s.isProcessing=!1,n&&t&&(i=!1,e(g))},x=()=>{n=!0,i=!0,s.isProcessing||e(g)};return{schedule:Vt.reduce((y,S)=>{const _=r[S];return y[S]=(b,E=!1,R=!1)=>(n||x(),_.schedule(b,E,R)),y},{}),cancel:y=>{for(let S=0;S<Vt.length;S++)r[Vt[S]].cancel(y)},state:s,steps:r}}const{schedule:q,cancel:Fe,state:re,steps:hn}=Uo(typeof requestAnimationFrame<"u"?requestAnimationFrame:ve,!0);let $t;function tu(){$t=void 0}const de={now:()=>($t===void 0&&de.set(re.isProcessing||Ee.useManualTiming?re.timestamp:performance.now()),$t),set:e=>{$t=e,queueMicrotask(tu)}},Ko=e=>t=>typeof t=="string"&&t.startsWith(e),wi=Ko("--"),nu=Ko("var(--"),xi=e=>nu(e)?iu.test(e.split("/*")[0].trim()):!1,iu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,rt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ct={...rt,transform:e=>Me(0,1,e)},At={...rt,default:1},ht=e=>Math.round(e*1e5)/1e5,Ci=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function su(e){return e==null}const ou=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Si=(e,t)=>n=>!!(typeof n=="string"&&ou.test(n)&&n.startsWith(e)||t&&!su(n)&&Object.prototype.hasOwnProperty.call(n,t)),qo=(e,t,n)=>i=>{if(typeof i!="string")return i;const[s,o,r,a]=i.match(Ci);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},ru=e=>Me(0,255,e),gn={...rt,transform:e=>Math.round(ru(e))},He={test:Si("rgb","red"),parse:qo("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+gn.transform(e)+", "+gn.transform(t)+", "+gn.transform(n)+", "+ht(Ct.transform(i))+")"};function au(e){let t="",n="",i="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,i+=i,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const Ln={test:Si("#"),parse:au,transform:He.transform},Tt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ae=Tt("deg"),be=Tt("%"),k=Tt("px"),lu=Tt("vh"),uu=Tt("vw"),ss={...be,parse:e=>be.parse(e)/100,transform:e=>be.transform(e*100)},Xe={test:Si("hsl","hue"),parse:qo("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+be.transform(ht(t))+", "+be.transform(ht(n))+", "+ht(Ct.transform(i))+")"},Q={test:e=>He.test(e)||Ln.test(e)||Xe.test(e),parse:e=>He.test(e)?He.parse(e):Xe.test(e)?Xe.parse(e):Ln.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?He.transform(e):Xe.transform(e),getAnimatableNone:e=>{const t=Q.parse(e);return t.alpha=0,Q.transform(t)}},cu=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function du(e){return isNaN(e)&&typeof e=="string"&&(e.match(Ci)?.length||0)+(e.match(cu)?.length||0)>0}const Xo="number",Yo="color",fu="var",hu="var(",os="${}",gu=/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 St(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const a=t.replace(gu,l=>(Q.test(l)?(i.color.push(o),s.push(Yo),n.push(Q.parse(l))):l.startsWith(hu)?(i.var.push(o),s.push(fu),n.push(l)):(i.number.push(o),s.push(Xo),n.push(parseFloat(l))),++o,os)).split(os);return{values:n,split:a,indexes:i,types:s}}function Zo(e){return St(e).values}function Jo(e){const{split:t,types:n}=St(e),i=t.length;return s=>{let o="";for(let r=0;r<i;r++)if(o+=t[r],s[r]!==void 0){const a=n[r];a===Xo?o+=ht(s[r]):a===Yo?o+=Q.transform(s[r]):o+=s[r]}return o}}const pu=e=>typeof e=="number"?0:Q.test(e)?Q.getAnimatableNone(e):e;function mu(e){const t=Zo(e);return Jo(e)(t.map(pu))}const ke={test:du,parse:Zo,createTransformer:Jo,getAnimatableNone:mu};function pn(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function vu({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let s=0,o=0,r=0;if(!t)s=o=r=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=pn(l,a,e+1/3),o=pn(l,a,e),r=pn(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:i}}function Ht(e,t){return n=>n>0?t:e}const Y=(e,t,n)=>e+(t-e)*n,mn=(e,t,n)=>{const i=e*e,s=n*(t*t-i)+i;return s<0?0:Math.sqrt(s)},yu=[Ln,He,Xe],wu=e=>yu.find(t=>t.test(e));function rs(e){const t=wu(e);if(ot(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Xe&&(n=vu(n)),n}const as=(e,t)=>{const n=rs(e),i=rs(t);if(!n||!i)return Ht(e,t);const s={...n};return o=>(s.red=mn(n.red,i.red,o),s.green=mn(n.green,i.green,o),s.blue=mn(n.blue,i.blue,o),s.alpha=Y(n.alpha,i.alpha,o),He.transform(s))},jn=new Set(["none","hidden"]);function xu(e,t){return jn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Cu(e,t){return n=>Y(e,t,n)}function _i(e){return typeof e=="number"?Cu:typeof e=="string"?xi(e)?Ht:Q.test(e)?as:bu:Array.isArray(e)?Qo:typeof e=="object"?Q.test(e)?as:Su:Ht}function Qo(e,t){const n=[...e],i=n.length,s=e.map((o,r)=>_i(o)(o,t[r]));return o=>{for(let r=0;r<i;r++)n[r]=s[r](o);return n}}function Su(e,t){const n={...e,...t},i={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(i[s]=_i(e[s])(e[s],t[s]));return s=>{for(const o in i)n[o]=i[o](s);return n}}function _u(e,t){const n=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],r=e.indexes[o][i[o]],a=e.values[r]??0;n[s]=a,i[o]++}return n}const bu=(e,t)=>{const n=ke.createTransformer(t),i=St(e),s=St(t);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?jn.has(e)&&!s.values.length||jn.has(t)&&!i.values.length?xu(e,t):Pt(Qo(_u(i,s),s.values),n):(ot(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Ht(e,t))};function er(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Y(e,t,n):_i(e)(e,t)}const Ru=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>q.update(t,n),stop:()=>Fe(t),now:()=>re.isProcessing?re.timestamp:de.now()}},tr=(e,t,n=10)=>{let i="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)i+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Gt=2e4;function bi(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<Gt;)t+=n,i=e.next(t);return t>=Gt?1/0:t}function Pu(e,t=100,n){const i=n({...e,keyframes:[0,t]}),s=Math.min(bi(i),Gt);return{type:"keyframes",ease:o=>i.next(s*o).value/t,duration:me(s)}}const Mu=5;function nr(e,t,n){const i=Math.max(t-Mu,0);return Io(n-e(i),t-i)}const X={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},vn=.001;function Tu({duration:e=X.duration,bounce:t=X.bounce,velocity:n=X.velocity,mass:i=X.mass}){let s,o;ot(e<=Ce(X.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-t;r=Me(X.minDamping,X.maxDamping,r),e=Me(X.minDuration,X.maxDuration,me(e)),r<1?(s=u=>{const c=u*r,d=c*e,f=c-n,h=$n(u,r),p=Math.exp(-d);return vn-f/h*p},o=u=>{const d=u*r*e,f=d*n+n,h=Math.pow(r,2)*Math.pow(u,2)*e,p=Math.exp(-d),g=$n(Math.pow(u,2),r);return(-s(u)+vn>0?-1:1)*((f-h)*p)/g}):(s=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-vn+c*d},o=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=Vu(s,o,a);if(e=Ce(e),isNaN(l))return{stiffness:X.stiffness,damping:X.damping,duration:e};{const u=Math.pow(l,2)*i;return{stiffness:u,damping:r*2*Math.sqrt(i*u),duration:e}}}const Eu=12;function Vu(e,t,n){let i=n;for(let s=1;s<Eu;s++)i=i-e(i)/t(i);return i}function $n(e,t){return e*Math.sqrt(1-t*t)}const Au=["duration","bounce"],Du=["stiffness","damping","mass"];function ls(e,t){return t.some(n=>e[n]!==void 0)}function Fu(e){let t={velocity:X.velocity,stiffness:X.stiffness,damping:X.damping,mass:X.mass,isResolvedFromDuration:!1,...e};if(!ls(e,Du)&&ls(e,Au))if(e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),s=i*i,o=2*Me(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:X.mass,stiffness:s,damping:o}}else{const n=Tu(e);t={...t,...n,mass:X.mass},t.isResolvedFromDuration=!0}return t}function Wt(e=X.visualDuration,t=X.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:s}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:h}=Fu({...n,velocity:-me(n.velocity||0)}),p=f||0,g=u/(2*Math.sqrt(l*c)),x=r-o,w=me(Math.sqrt(l/c)),C=Math.abs(x)<5;i||(i=C?X.restSpeed.granular:X.restSpeed.default),s||(s=C?X.restDelta.granular:X.restDelta.default);let y;if(g<1){const _=$n(w,g);y=b=>{const E=Math.exp(-g*w*b);return r-E*((p+g*w*x)/_*Math.sin(_*b)+x*Math.cos(_*b))}}else if(g===1)y=_=>r-Math.exp(-w*_)*(x+(p+w*x)*_);else{const _=w*Math.sqrt(g*g-1);y=b=>{const E=Math.exp(-g*w*b),R=Math.min(_*b,300);return r-E*((p+g*w*x)*Math.sinh(R)+_*x*Math.cosh(R))/_}}const S={calculatedDuration:h&&d||null,next:_=>{const b=y(_);if(h)a.done=_>=d;else{let E=_===0?p:0;g<1&&(E=_===0?Ce(p):nr(y,_,b));const R=Math.abs(E)<=i,I=Math.abs(r-b)<=s;a.done=R&&I}return a.value=a.done?r:b,a},toString:()=>{const _=Math.min(bi(S),Gt),b=tr(E=>S.next(_*E).value,_,30);return _+"ms "+b},toTransition:()=>{}};return S}Wt.applyToOptions=e=>{const t=Pu(e,100,Wt);return e.ease=t.ease,e.duration=Ce(t.duration),e.type="keyframes",e};function On({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},h=R=>a!==void 0&&R<a||l!==void 0&&R>l,p=R=>a===void 0?l:l===void 0||Math.abs(a-R)<Math.abs(l-R)?a:l;let g=n*t;const x=d+g,w=r===void 0?x:r(x);w!==x&&(g=w-d);const C=R=>-g*Math.exp(-R/i),y=R=>w+C(R),S=R=>{const I=C(R),A=y(R);f.done=Math.abs(I)<=u,f.value=f.done?w:A};let _,b;const E=R=>{h(f.value)&&(_=R,b=Wt({keyframes:[f.value,p(f.value)],velocity:nr(y,R,f.value),damping:s,stiffness:o,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:R=>{let I=!1;return!b&&_===void 0&&(I=!0,S(R),E(R)),_!==void 0&&R>=_?b.next(R-_):(!I&&S(R),f)}}}function ku(e,t,n){const i=[],s=n||Ee.mix||er,o=e.length-1;for(let r=0;r<o;r++){let a=s(e[r],e[r+1]);if(t){const l=Array.isArray(t)?t[r]||ve:t;a=Pt(l,a)}i.push(a)}return i}function Iu(e,t,{clamp:n=!0,ease:i,mixer:s}={}){const o=e.length;if(Te(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const r=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=ku(t,i,s),l=a.length,u=c=>{if(r&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);const f=xt(e[d],e[d+1],c);return a[d](f)};return n?c=>u(Me(e[0],e[o-1],c)):u}function Lu(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const s=xt(0,t,i);e.push(Y(n,1,s))}}function ju(e){const t=[0];return Lu(t,e.length-1),t}function $u(e,t){return e.map(n=>n*t)}function Ou(e,t){return e.map(()=>t||Go).splice(0,e.length-1)}function Ye({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const s=Zl(i)?i.map(is):is(i),o={done:!1,value:t[0]},r=$u(n&&n.length===t.length?n:ju(t),e),a=Iu(r,t,{ease:Array.isArray(s)?s:Ou(t,s)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const zu=e=>e!==null;function Ri(e,{repeat:t,repeatType:n="loop"},i,s=1){const o=e.filter(zu),a=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||i===void 0?o[a]:i}const Bu={decay:On,inertia:On,tween:Ye,keyframes:Ye,spring:Wt};function ir(e){typeof e.type=="string"&&(e.type=Bu[e.type])}class Pi{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const Nu=e=>e/100;class Mi extends Pi{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==de.now()&&this.tick(de.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;ir(t);const{type:n=Ye,repeat:i=0,repeatDelay:s=0,repeatType:o,velocity:r=0}=t;let{keyframes:a}=t;const l=n||Ye;process.env.NODE_ENV!=="production"&&l!==Ye&&Te(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Ye&&typeof a[0]!="number"&&(this.mixKeyframes=Pt(Nu,er(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=bi(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:i,totalDuration:s,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return i.next(0);const{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:h,type:p,onUpdate:g,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const w=this.currentTime-u*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?w<0:w>s;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let y=this.currentTime,S=i;if(d){const R=Math.min(this.currentTime,s)/a;let I=Math.floor(R),A=R%1;!A&&R>=1&&(A=1),A===1&&I--,I=Math.min(I,d+1),!!(I%2)&&(f==="reverse"?(A=1-A,h&&(A-=h/a)):f==="mirror"&&(S=r)),y=Me(0,1,A)*a}const _=C?{done:!1,value:c[0]}:S.next(y);o&&(_.value=o(_.value));let{done:b}=_;!C&&l!==null&&(b=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&b);return E&&p!==On&&(_.value=Ri(c,this.options,x,this.speed)),g&&g(_.value),E&&this.finish(),_}then(t,n){return this.finished.then(t,n)}get duration(){return me(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+me(t)}get time(){return me(this.currentTime)}set time(t){t=Ce(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(de.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=me(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Ru,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(de.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Hu(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Ge=e=>e*180/Math.PI,zn=e=>{const t=Ge(Math.atan2(e[1],e[0]));return Bn(t)},Gu={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:zn,rotateZ:zn,skewX:e=>Ge(Math.atan(e[1])),skewY:e=>Ge(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Bn=e=>(e=e%360,e<0&&(e+=360),e),us=zn,cs=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ds=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Wu={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:cs,scaleY:ds,scale:e=>(cs(e)+ds(e))/2,rotateX:e=>Bn(Ge(Math.atan2(e[6],e[5]))),rotateY:e=>Bn(Ge(Math.atan2(-e[2],e[0]))),rotateZ:us,rotate:us,skewX:e=>Ge(Math.atan(e[4])),skewY:e=>Ge(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Nn(e){return e.includes("scale")?1:0}function Hn(e,t){if(!e||e==="none")return Nn(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Wu,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Gu,s=a}if(!s)return Nn(t);const o=i[t],r=s[1].split(",").map(Ku);return typeof o=="function"?o(r):r[o]}const Uu=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Hn(n,t)};function Ku(e){return parseFloat(e.trim())}const at=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],lt=new Set(at),fs=e=>e===rt||e===k,qu=new Set(["x","y","z"]),Xu=at.filter(e=>!qu.has(e));function Yu(e){const t=[];return Xu.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const We={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Hn(t,"x"),y:(e,{transform:t})=>Hn(t,"y")};We.translateX=We.x;We.translateY=We.y;const Ue=new Set;let Gn=!1,Wn=!1,Un=!1;function sr(){if(Wn){const e=Array.from(Ue).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const s=Yu(i);s.length&&(n.set(i,s),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([o,r])=>{i.getValue(o)?.set(r)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}Wn=!1,Gn=!1,Ue.forEach(e=>e.complete(Un)),Ue.clear()}function or(){Ue.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Wn=!0)})}function Zu(){Un=!0,or(),sr(),Un=!1}class Ti{constructor(t,n,i,s,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=s,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(Ue.add(this),Gn||(Gn=!0,q.read(or),q.resolveKeyframes(sr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:s}=this;if(t[0]===null){const o=s?.get(),r=t[t.length-1];if(o!==void 0)t[0]=o;else if(i&&n){const a=i.readValue(n,r);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=r),s&&o===void 0&&s.set(t[0])}Hu(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ue.delete(this)}cancel(){this.state==="scheduled"&&(Ue.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ju=e=>e.startsWith("--");function Qu(e,t,n){Ju(t)?e.style.setProperty(t,n):e.style[t]=n}const ec=gi(()=>window.ScrollTimeline!==void 0),tc={};function nc(e,t){const n=gi(e);return()=>tc[t]??n()}const rr=nc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ft=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,hs={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ft([0,.65,.55,1]),circOut:ft([.55,0,1,.45]),backIn:ft([.31,.01,.66,-.59]),backOut:ft([.33,1.53,.69,.99])};function ar(e,t){if(e)return typeof e=="function"?rr()?tr(e,t):"ease-out":Wo(e)?ft(e):Array.isArray(e)?e.map(n=>ar(n,t)||hs.easeOut):hs[e]}function ic(e,t,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=ar(a,s);Array.isArray(d)&&(c.easing=d);const f={delay:i,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(c,f)}function lr(e){return typeof e=="function"&&"applyToOptions"in e}function sc({type:e,...t}){return lr(e)&&rr()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class oc extends Pi{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:i,keyframes:s,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=t,Te(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=sc(t);this.animation=ic(n,i,s,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=Ri(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Qu(n,i,c),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return me(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+me(t)}get time(){return me(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ce(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&ec()?(this.animation.timeline=t,ve):n(this)}}const ur={anticipate:Bo,backInOut:zo,circInOut:Ho};function rc(e){return e in ur}function ac(e){typeof e.ease=="string"&&rc(e.ease)&&(e.ease=ur[e.ease])}const gs=10;class lc extends oc{constructor(t){ac(t),ir(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:s,element:o,...r}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Mi({...r,autoplay:!1}),l=Ce(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-gs).value,a.sample(l).value,gs),a.stop()}}const ps=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ke.test(e)||e==="0")&&!e.startsWith("url("));function uc(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function cc(e,t,n,i){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],r=ps(s,t),a=ps(o,t);return ot(r===a,`You are trying to animate ${t} from "${s}" to "${o}". "${r?o:s}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:uc(e)||(n==="spring"||lr(n))&&i}function Kn(e){e.duration=0,e.type="keyframes"}const dc=new Set(["opacity","clipPath","filter","transform"]),fc=gi(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function hc(e){const{motionValue:t,name:n,repeatDelay:i,repeatType:s,damping:o,type:r}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return fc()&&n&&dc.has(n)&&(n!=="transform"||!u)&&!l&&!i&&s!=="mirror"&&o!==0&&r!=="inertia"}const gc=40;class pc extends Pi{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:u,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=de.now();const f={autoplay:t,delay:n,type:i,repeat:s,repeatDelay:o,repeatType:r,name:l,motionValue:u,element:c,...d},h=c?.KeyframeResolver||Ti;this.keyframeResolver=new h(a,(p,g,x)=>this.onKeyframesResolved(p,g,f,!x),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,s){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:u,onUpdate:c}=i;this.resolvedAt=de.now(),cc(t,o,r,a)||((Ee.instantAnimations||!l)&&c?.(Ri(t,i,n)),t[0]=t[t.length-1],Kn(i),i.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>gc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},h=!u&&hc(f)?new lc({...f,element:f.motionValue.owner.current}):new Mi(f);h.finished.then(()=>this.notifyFinished()).catch(ve),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Zu()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const mc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function vc(e){const t=mc.exec(e);if(!t)return[,];const[,n,i,s]=t;return[`--${n??i}`,s]}const yc=4;function cr(e,t,n=1){Te(n<=yc,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[i,s]=vc(e);if(!i)return;const o=window.getComputedStyle(t).getPropertyValue(i);if(o){const r=o.trim();return Do(r)?parseFloat(r):r}return xi(s)?cr(s,t,n+1):s}function Ei(e,t){return e?.[t]??e?.default??e}const dr=new Set(["width","height","top","left","right","bottom",...at]),wc={test:e=>e==="auto",parse:e=>e},fr=e=>t=>t.test(e),hr=[rt,k,be,Ae,uu,lu,wc],ms=e=>hr.find(fr(e));function xc(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ko(e):!0}const Cc=new Set(["brightness","contrast","saturate","opacity"]);function Sc(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(Ci)||[];if(!i)return e;const s=n.replace(i,"");let o=Cc.has(t)?1:0;return i!==n&&(o*=100),t+"("+o+s+")"}const _c=/\b([a-z-]*)\(.*?\)/gu,qn={...ke,getAnimatableNone:e=>{const t=e.match(_c);return t?t.map(Sc).join(" "):e}},vs={...rt,transform:Math.round},bc={rotate:Ae,rotateX:Ae,rotateY:Ae,rotateZ:Ae,scale:At,scaleX:At,scaleY:At,scaleZ:At,skew:Ae,skewX:Ae,skewY:Ae,distance:k,translateX:k,translateY:k,translateZ:k,x:k,y:k,z:k,perspective:k,transformPerspective:k,opacity:Ct,originX:ss,originY:ss,originZ:k},Vi={borderWidth:k,borderTopWidth:k,borderRightWidth:k,borderBottomWidth:k,borderLeftWidth:k,borderRadius:k,radius:k,borderTopLeftRadius:k,borderTopRightRadius:k,borderBottomRightRadius:k,borderBottomLeftRadius:k,width:k,maxWidth:k,height:k,maxHeight:k,top:k,right:k,bottom:k,left:k,padding:k,paddingTop:k,paddingRight:k,paddingBottom:k,paddingLeft:k,margin:k,marginTop:k,marginRight:k,marginBottom:k,marginLeft:k,backgroundPositionX:k,backgroundPositionY:k,...bc,zIndex:vs,fillOpacity:Ct,strokeOpacity:Ct,numOctaves:vs},Rc={...Vi,color:Q,backgroundColor:Q,outlineColor:Q,fill:Q,stroke:Q,borderColor:Q,borderTopColor:Q,borderRightColor:Q,borderBottomColor:Q,borderLeftColor:Q,filter:qn,WebkitFilter:qn},gr=e=>Rc[e];function pr(e,t){let n=gr(e);return n!==qn&&(n=ke),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Pc=new Set(["auto","none","0"]);function Mc(e,t,n){let i=0,s;for(;i<e.length&&!s;){const o=e[i];typeof o=="string"&&!Pc.has(o)&&St(o).values.length&&(s=e[i]),i++}if(s&&n)for(const o of t)e[o]=pr(n,s)}class Tc extends Ti{constructor(t,n,i,s,o){super(t,n,i,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),xi(u))){const c=cr(u,n.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!dr.has(i)||t.length!==2)return;const[s,o]=t,r=ms(s),a=ms(o);if(r!==a)if(fs(r)&&fs(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else We[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let s=0;s<t.length;s++)(t[s]===null||xc(t[s]))&&i.push(s);i.length&&Mc(t,i,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=We[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(i,s).jump(s,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=i.length-1,r=i[o];i[o]=We[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{t.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function Ec(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const s=n?.[e]??i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}const mr=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function vr(e){return Fo(e)&&"offsetHeight"in e}const ys=30,Vc=e=>!isNaN(parseFloat(e));class Ac{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const s=de.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=de.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Vc(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&mi(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new pi);const i=this.events[t].add(n);return t==="change"?()=>{i(),q.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=de.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ys)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ys);return Io(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function nt(e,t){return new Ac(e,t)}const{schedule:Ai}=Uo(queueMicrotask,!1),xe={x:!1,y:!1};function yr(){return xe.x||xe.y}function Dc(e){return e==="x"||e==="y"?xe[e]?null:(xe[e]=!0,()=>{xe[e]=!1}):xe.x||xe.y?null:(xe.x=xe.y=!0,()=>{xe.x=xe.y=!1})}function wr(e,t){const n=Ec(e),i=new AbortController,s={passive:!0,...t,signal:i.signal};return[n,s,()=>i.abort()]}function ws(e){return!(e.pointerType==="touch"||yr())}function Fc(e,t,n={}){const[i,s,o]=wr(e,n),r=a=>{if(!ws(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const c=d=>{ws(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,s)};return i.forEach(a=>{a.addEventListener("pointerenter",r,s)}),o}const xr=(e,t)=>t?e===t?!0:xr(e,t.parentElement):!1,Di=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,kc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ic(e){return kc.has(e.tagName)||e.tabIndex!==-1}const Ot=new WeakSet;function xs(e){return t=>{t.key==="Enter"&&e(t)}}function yn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Lc=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=xs(()=>{if(Ot.has(n))return;yn(n,"down");const s=xs(()=>{yn(n,"up")}),o=()=>yn(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function Cs(e){return Di(e)&&!yr()}function jc(e,t,n={}){const[i,s,o]=wr(e,n),r=a=>{const l=a.currentTarget;if(!Cs(a))return;Ot.add(l);const u=t(l,a),c=(h,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Ot.has(l)&&Ot.delete(l),Cs(h)&&typeof u=="function"&&u(h,{success:p})},d=h=>{c(h,l===window||l===document||n.useGlobalTarget||xr(l,h.target))},f=h=>{c(h,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",f,s)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,s),vr(a)&&(a.addEventListener("focus",u=>Lc(u,s)),!Ic(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Cr(e){return Fo(e)&&"ownerSVGElement"in e}function $c(e){return Cr(e)&&e.tagName==="svg"}const le=e=>!!(e&&e.getVelocity),Oc=[...hr,Q,ke],zc=e=>Oc.find(fr(e)),Fi=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Ss(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Bc(...e){return t=>{let n=!1;const i=e.map(s=>{const o=Ss(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<i.length;s++){const o=i[s];typeof o=="function"?o():Ss(e[s],null)}}}}function Nc(...e){return T.useCallback(Bc(...e),e)}class Hc extends T.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const i=n.offsetParent,s=vr(i)&&i.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=s-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Gc({children:e,isPresent:t,anchorX:n,root:i}){const s=v.useId(),o=v.useRef(null),r=v.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=v.useContext(Fi),l=Nc(o,e?.ref);return v.useInsertionEffect(()=>{const{width:u,height:c,top:d,left:f,right:h}=r.current;if(t||!o.current||!u||!c)return;const p=n==="left"?`left: ${f}`:`right: ${h}`;o.current.dataset.motionPopId=s;const g=document.createElement("style");a&&(g.nonce=a);const x=i??document.head;return x.appendChild(g),g.sheet&&g.sheet.insertRule(`
13
13
  [data-motion-pop-id="${s}"] {
14
14
  position: absolute !important;
15
15
  width: ${u}px !important;