/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */
import{g as o,c as s}from"./p-40ff71fd.js";import{s as e,c as i,a as t,b as d,d as n,i as c}from"./p-246d420d.js";let r;const a=s=>s&&o(s)||r,m=(o={})=>{if("undefined"==typeof window)return;const a=window.document,m=window,f=m.Ionic=m.Ionic||{};e(m);const p=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},i(m)),{persistConfig:!1}),f.config),t(m)),o);d.reset(p),d.getBoolean("persistConfig")&&n(m,p),f.config=d,f.mode=r=d.get("mode",a.documentElement.getAttribute("mode")||(c(m,"ios")?"ios":"md")),d.set("mode",r),a.documentElement.setAttribute("mode",r),a.documentElement.classList.add(r),d.getBoolean("_testing")&&d.set("animated",!1);const j=o=>o.tagName&&o.tagName.startsWith("ION-"),b=o=>["ios","md"].includes(o);s((o=>{for(;o;){const s=o.mode||o.getAttribute("mode");if(s){if(b(s))return s;j(o)&&console.warn('Invalid ionic mode: "'+s+'", expected: "ios" or "md"')}o=o.parentElement}return r}))};export{a as g,m as i}