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