import{Z as B,R as L,aV as M,aW as U,Y as q,u as P,aX as Y,aY as Z,aZ as j,ai as G,B as K,a_ as F,a$ as S}from"./Dpn8_Hnn.mjs";import{a as V}from"./B4YZClIG.mjs";const X=()=>performance.now(),w={tick:t=>requestAnimationFrame(t),now:()=>X(),tasks:new Set};function W(){const t=w.now();w.tasks.forEach(a=>{a.c(t)||(w.tasks.delete(a),a.f())}),w.tasks.size!==0&&w.tick(W)}function D(t){let a;return w.tasks.size===0&&w.tick(W),{promise:new Promise(r=>{w.tasks.add(a={c:t,f:r})}),abort(){w.tasks.delete(a)}}}function x(t,a){S(()=>{t.dispatchEvent(new CustomEvent(a))})}function H(t){if(t==="float")return"cssFloat";if(t==="offset")return"cssOffset";if(t.startsWith("--"))return t;const a=t.split("-");return a.length===1?a[0]:a[0]+a.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("")}function O(t){const a={},r=t.split(";");for(const e of r){const[u,i]=e.split(":");if(!u||i===void 0)break;const h=H(u.trim());a[h]=i.trim()}return a}const J=t=>t;function ta(t,a,r,e){var b,g;var u=(t&Z)!==0,i=(t&j)!==0,h=u&&i,f=(t&Y)!==0,y=h?"both":u?"in":"out",c,p=a.inert,v=a.style.overflow,o,n;function m(){return S(()=>{var _;return c!=null?c:c=r()(a,(_=e==null?void 0:e())!=null?_:{},{direction:y})})}var l={is_global:f,in(){var _;if(a.inert=p,!u){n==null||n.abort(),(_=n==null?void 0:n.reset)==null||_.call(n);return}i||o==null||o.abort(),o=k(a,m(),n,1,()=>{x(a,"introstart")},()=>{x(a,"introend"),o==null||o.abort(),o=c=void 0,a.style.overflow=v})},out(_){if(!i){_==null||_(),c=void 0;return}a.inert=!0,n=k(a,m(),o,0,()=>{x(a,"outrostart")},()=>{x(a,"outroend"),_==null||_()})},stop:()=>{o==null||o.abort(),n==null||n.abort()}},d=B;if(((g=(b=d.nodes).t)!=null?g:b.t=[]).push(l),u&&V){var s=f;if(!s){for(var $=d.parent;$&&($.f&L)!==0;)for(;($=$.parent)&&($.f&M)===0;);s=!$||($.f&U)!==0}s&&q(()=>{P(()=>l.in())})}}function k(t,a,r,e,u,i){var h=e===1;if(G(a)){var f,y=!1;return K(()=>{if(!y){var s=a({direction:h?"in":"out"});f=k(t,s,r,e,u,i)}}),{abort:()=>{y=!0,f==null||f.abort()},deactivate:()=>f.deactivate(),reset:()=>f.reset(),t:()=>f.t()}}if(r==null||r.deactivate(),!(a!=null&&a.duration)&&!(a!=null&&a.delay))return u(),i(),{abort:F,deactivate:F,reset:F,t:()=>e};const{delay:c=0,css:p,tick:v,easing:o=J}=a;var n=[];if(h&&r===void 0&&(v&&v(0,1),p)){var m=O(p(0,1));n.push(m,m)}var l=()=>1-e,d=t.animate(n,{duration:c,fill:"forwards"});return d.onfinish=()=>{var I;d.cancel(),u();var s=(I=r==null?void 0:r.t())!=null?I:1-e;r==null||r.abort();var $=e-s,b=a.duration*Math.abs($),g=[];if(b>0){var _=!1;if(p)for(var A=Math.ceil(b/16.666666666666668),N=0;N<=A;N+=1){var C=s+$*o(N/A),E=O(p(C,1-C));g.push(E),_||(_=E.overflow==="hidden")}_&&(t.style.overflow="hidden"),l=()=>{var T=d.currentTime;return s+$*o(T/b)},v&&D(()=>{if(d.playState!=="running")return!1;var T=l();return v(T,1-T),!0})}d=t.animate(g,{duration:b,fill:"forwards"}),d.onfinish=()=>{l=()=>e,v==null||v(e,1-e),i()}},{abort:()=>{d&&(d.cancel(),d.effect=null,d.onfinish=F)},deactivate:()=>{i=F},reset:()=>{e===0&&(v==null||v(1,0))},t:()=>l()}}function z(t){const a=t-1;return a*a*a+1}function R(t){const a=typeof t=="string"&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return a?[parseFloat(a[1]),a[2]||"px"]:[t,"px"]}function ra(t,{delay:a=0,duration:r=400,easing:e=z,x:u=0,y:i=0,opacity:h=0}={}){const f=getComputedStyle(t),y=+f.opacity,c=f.transform==="none"?"":f.transform,p=y*(1-h),[v,o]=R(u),[n,m]=R(i);return{delay:a,duration:r,easing:e,css:(l,d)=>`
			transform: ${c} translate(${(1-l)*v}${o}, ${(1-l)*n}${m});
			opacity: ${y-p*d}`}}function ia(t,{delay:a=0,duration:r=400,easing:e=z,axis:u="y"}={}){const i=getComputedStyle(t),h=+i.opacity,f=u==="y"?"height":"width",y=parseFloat(i[f]),c=u==="y"?["top","bottom"]:["left","right"],p=c.map(s=>`${s[0].toUpperCase()}${s.slice(1)}`),v=parseFloat(i[`padding${p[0]}`]),o=parseFloat(i[`padding${p[1]}`]),n=parseFloat(i[`margin${p[0]}`]),m=parseFloat(i[`margin${p[1]}`]),l=parseFloat(i[`border${p[0]}Width`]),d=parseFloat(i[`border${p[1]}Width`]);return{delay:a,duration:r,easing:e,css:s=>`overflow: hidden;opacity: ${Math.min(s*20,1)*h};${f}: ${s*y}px;padding-${c[0]}: ${s*v}px;padding-${c[1]}: ${s*o}px;margin-${c[0]}: ${s*n}px;margin-${c[1]}: ${s*m}px;border-${c[0]}-width: ${s*l}px;border-${c[1]}-width: ${s*d}px;min-${f}: 0`}}export{ra as f,D as l,w as r,ia as s,ta as t};
