/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */
import{focusElements as a}from"./p-vXpMhGrs.js";import{j as i,e as r}from"./p-C8IsBmNU.js";const e=(a,i=0)=>new Promise((r=>{t(a,i,r)})),t=(a,i=0,r)=>{let e,t;const n={passive:!0},o=()=>{e&&e()},s=i=>{void 0!==i&&a!==i.target||(o(),r(i))};return a&&(a.addEventListener("webkitTransitionEnd",s,n),a.addEventListener("transitionend",s,n),t=setTimeout(s,i+500),e=()=>{void 0!==t&&(clearTimeout(t),t=void 0),a.removeEventListener("webkitTransitionEnd",s,n),a.removeEventListener("transitionend",s,n)}),o},n=(a,i)=>{a.componentOnReady?a.componentOnReady().then((a=>i(a))):p((()=>i(a)))},o=a=>void 0!==a.componentOnReady,s=(a,i=[])=>{const r={};return i.forEach((i=>{a.hasAttribute(i)&&(null!==a.getAttribute(i)&&(r[i]=a.getAttribute(i)),a.removeAttribute(i))})),r},l=["role","aria-activedescendant","aria-atomic","aria-autocomplete","aria-braillelabel","aria-brailleroledescription","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colindextext","aria-colspan","aria-controls","aria-current","aria-describedby","aria-description","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowindextext","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"],u=a=>s(a,l),c=(a,i,r,e)=>a.addEventListener(i,r,e),d=(a,i,r,e)=>a.removeEventListener(i,r,e),m=(a,i=a)=>a.shadowRoot||i,p=a=>"function"==typeof __zone_symbol__requestAnimationFrame?__zone_symbol__requestAnimationFrame(a):"function"==typeof requestAnimationFrame?requestAnimationFrame(a):setTimeout(a),f=a=>!!a.shadowRoot&&!!a.attachShadow,b=i=>{if(i.focus(),i.classList.contains("ion-focusable")){const e=r.get("appRootSelector","ion-app"),t=i.closest(e);t&&("ion-app"===e?t.setFocus([i]):requestAnimationFrame((()=>{a([i])})))}},v=(a,i,r,e,t)=>{{let a=i.querySelector("input.aux-input");a||(a=i.ownerDocument.createElement("input"),a.type="hidden",a.classList.add("aux-input"),i.appendChild(a)),a.disabled=t,a.name=r,a.value=e||""}},w=(a,i,r)=>Math.max(a,Math.min(i,r)),x=(a,r)=>{if(!a){const a="ASSERT: "+r;throw i(a),new Error(a)}},h=a=>{if(a){const i=a.changedTouches;if(i&&i.length>0){const a=i[0];return{x:a.clientX,y:a.clientY}}if(void 0!==a.pageX)return{x:a.pageX,y:a.pageY}}return{x:0,y:0}},y=a=>{const i="rtl"===document.dir;switch(a){case"start":return i;case"end":return!i;default:throw new Error(`"${a}" is not a valid value for [side]. Use "start" or "end" instead.`)}},_=(a,i)=>{const r=a._original||a;return{_original:a,emit:T(r.emit.bind(r),i)}},T=(a,i=0)=>{let r;return(...e)=>{clearTimeout(r),r=setTimeout(a,i,...e)}},q=(a,i)=>{if(null!=a||(a={}),null!=i||(i={}),a===i)return!0;const r=Object.keys(a);if(r.length!==Object.keys(i).length)return!1;for(const e of r){if(!(e in i))return!1;if(a[e]!==i[e])return!1}return!0},j=a=>"number"==typeof a&&!isNaN(a)&&isFinite(a);export{v as a,s as b,n as c,_ as d,w as e,c as f,m as g,o as h,u as i,j,f as k,x as l,d as m,b as n,y as o,T as p,h as q,p as r,q as s,e as t}