import{w as i,B as e}from"./p-9b6cc562.js";import{c as n,e as a}from"./p-8cd54418.js";
/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */const o="ionViewWillLeave",s="ionViewDidLeave",t="ionViewWillUnload",r=e=>new Promise(((n,a)=>{i((()=>{c(e),w(e).then((i=>{i.animation&&i.animation.destroy(),l(e),n(i)}),(i=>{l(e),a(i)}))}))})),c=i=>{const e=i.enteringEl,n=i.leavingEl;L(e,n,i.direction),i.showGoBack?e.classList.add("can-go-back"):e.classList.remove("can-go-back"),h(e,!1),e.style.setProperty("pointer-events","none"),n&&(h(n,!1),n.style.setProperty("pointer-events","none"))},w=async i=>{const n=await p(i);return n&&e.isBrowser?d(n,i):v(i)},l=i=>{const e=i.enteringEl,n=i.leavingEl;e.classList.remove("ion-page-invisible"),e.style.removeProperty("pointer-events"),void 0!==n&&(n.classList.remove("ion-page-invisible"),n.style.removeProperty("pointer-events"))},p=async i=>{if(i.leavingEl&&i.animated&&0!==i.duration)return i.animationBuilder?i.animationBuilder:"ios"===i.mode?(await import("./p-03250c75.js")).iosTransitionAnimation:(await import("./p-3a76b06d.js")).mdTransitionAnimation},d=async(i,e)=>{await m(e,!0);const n=i(e.baseEl,e);f(e.enteringEl,e.leavingEl);const a=await b(n,e);return e.progressCallback&&e.progressCallback(void 0),a&&g(e.enteringEl,e.leavingEl),{hasCompleted:a,animation:n}},v=async i=>{const e=i.enteringEl,n=i.leavingEl;return await m(i,!1),f(e,n),g(e,n),{hasCompleted:!0}},m=async(i,e)=>{const n=(void 0!==i.deepWait?i.deepWait:e)?[V(i.enteringEl),V(i.leavingEl)]:[P(i.enteringEl),P(i.leavingEl)];await Promise.all(n),await u(i.viewIsReady,i.enteringEl)},u=async(i,e)=>{i&&await i(e)},b=(i,e)=>{const n=e.progressCallback,a=new Promise((e=>{i.onFinish((i=>e(1===i)))}));return n?(i.progressStart(!0),n(i)):i.play(),a},f=(i,e)=>{y(e,"ionViewWillLeave"),y(i,"ionViewWillEnter")},g=(i,e)=>{y(i,"ionViewDidEnter"),y(e,"ionViewDidLeave")},y=(i,e)=>{if(i){const n=new CustomEvent(e,{bubbles:!1,cancelable:!1});i.dispatchEvent(n)}},P=i=>i?new Promise((e=>n(i,e))):Promise.resolve(),V=async i=>{const e=i;if(e){if(null!=e.componentOnReady){if(null!=await e.componentOnReady())return}else if(null!=e.__registerHost){const i=new Promise((i=>a(i)));return void await i}await Promise.all(Array.from(e.children).map(V))}},h=(i,e)=>{e?(i.setAttribute("aria-hidden","true"),i.classList.add("ion-page-hidden")):(i.hidden=!1,i.removeAttribute("aria-hidden"),i.classList.remove("ion-page-hidden"))},L=(i,e,n)=>{void 0!==i&&(i.style.zIndex="back"===n?"99":"101"),void 0!==e&&(e.style.zIndex="100")},j=i=>{if(i.classList.contains("ion-page"))return i;return i.querySelector(":scope > .ion-page, :scope > ion-nav, :scope > ion-tabs")||i};export{t as L,o as a,s as b,V as d,j as g,y as l,h as s,r as t}