import{c as e}from"./p-6da8225a.js";
/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */const t=async(t,r,o,n,i,s)=>{if(t)return t.attachViewToDom(r,o,i,n);if(!(s||"string"==typeof o||o instanceof HTMLElement))throw new Error("framework delegate is missing");const a="string"==typeof o?r.ownerDocument&&r.ownerDocument.createElement(o):o;return n&&n.forEach((e=>a.classList.add(e))),i&&Object.assign(a,i),r.appendChild(a),await new Promise((t=>e(a,t))),a},r=(e,t)=>{if(t){if(e)return e.removeViewFromDom(t.parentElement,t);t.remove()}return Promise.resolve()},o=()=>{let t,r;return{attachViewToDom:async(o,n,i={},s=[])=>{if(t=o,n){const r="string"==typeof n?t.ownerDocument&&t.ownerDocument.createElement(n):n;s.forEach((e=>r.classList.add(e))),Object.assign(r,i),t.appendChild(r),await new Promise((t=>e(r,t)))}else if(t.children.length>0){const e=t.ownerDocument&&t.ownerDocument.createElement("div");s.forEach((t=>e.classList.add(t))),e.append(...t.children),t.appendChild(e)}const a=document.querySelector("ion-app")||document.body;return r=document.createComment("ionic teleport"),t.parentNode.insertBefore(r,t),a.appendChild(t),t},removeViewFromDom:()=>(t&&r&&(r.parentNode.insertBefore(t,r),r.remove()),Promise.resolve())}};export{o as C,t as a,r as d}