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