<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">import"./disclose-version.Bg9kRutz.js";import{ar as U,a9 as h,aw as w,I as L,d as t,i as A,v as o,u as p,e as B,p as C,f as O,a as P,n as k}from"./runtime.tNT4sv2R.js";import{e as T,a as _}from"./utils.CGPKWrMe.js";import{a as c,i as D}from"./preload-helper.C_8Av4pz.js";import{s as j}from"./utils.DzoJwAa-.js";import{b as v}from"./use-id.BZhXR1Up.js";function q(n){U().then(n)}function z(n,r){const a=v(n);function i(e){return r[a.current][e]??a.current}return{state:a,dispatch:e=&gt;{a.current=i(e)}}}function M(n,r,a={}){let i=h(c(n.current)),s=!1;return w(()=&gt;{L(()=&gt;{t(i)===n.current||!a.immediate||a.once&amp;&amp;s||(r(n.current,A(()=&gt;t(i))),A(()=&gt;o(i,c(n.current))),s=!0)}),p(()=&gt;{t(i)===n.current||a.immediate||a.once&amp;&amp;s||(r(n.current,A(()=&gt;t(i))),A(()=&gt;o(i,c(n.current))),s=!0)})})}function F(n,r){let a=h(c({})),i=h("none");const s=n.current?"mounted":"unmounted";let e=h(null);p(()=&gt;{r.current&amp;&amp;n.current&amp;&amp;q(()=&gt;{o(e,c(document.getElementById(r.current)))})});const{state:d,dispatch:f}=z(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});M(n,(u,m)=&gt;{if(t(e)||o(e,c(document.getElementById(r.current))),!t(e)||!(u!==m))return;const S=t(i),I=g(t(e));u?f("MOUNT"):I==="none"||t(a).display==="none"?f("UNMOUNT"):f(m&amp;&amp;S!==I?"ANIMATION_OUT":"UNMOUNT")});function N(u){if(t(e)||o(e,c(document.getElementById(r.current))),!t(e))return;const m=g(t(e)),l=m.includes(u.animationName)||m==="none";u.target===t(e)&amp;&amp;l&amp;&amp;f("ANIMATION_END")}function E(u){t(e)||o(e,c(document.getElementById(r.current))),t(e)&amp;&amp;u.target===t(e)&amp;&amp;o(i,c(g(t(e))))}M(d,()=&gt;{if(t(e)||o(e,c(document.getElementById(r.current))),!t(e))return;const u=g(t(e));o(i,c(d.current==="mounted"?u:"none"))}),p(()=&gt;{if(t(e))return o(a,c(getComputedStyle(t(e)))),t(e).addEventListener("animationstart",E),t(e).addEventListener("animationcancel",N),t(e).addEventListener("animationend",N),()=&gt;{var u,m,l;(u=t(e))==null||u.removeEventListener("animationstart",E),(m=t(e))==null||m.removeEventListener("animationcancel",N),(l=t(e))==null||l.removeEventListener("animationend",N)}});const y=B(()=&gt;["mounted","unmountSuspended"].includes(d.current));return{get current(){return t(y)}}}function g(n){return n&amp;&amp;getComputedStyle(n).animationName||"none"}function W(n,r){C(r,!0);const a=F(v.with(()=&gt;r.present),v.with(()=&gt;r.id));var i=T(),s=O(i);D(s,()=&gt;r.forceMount||r.present||a.current,e=&gt;{var d=T(),f=O(d);j(f,()=&gt;r.presence??k,()=&gt;({present:a})),_(e,d)}),_(n,i),P()}export{W as P,q as a,z as u};
</pre></body></html>