/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */
import{g as t,c as e}from"./p-40ff71fd.js";const o=t=>i(t),n=(t,e)=>("string"==typeof t&&(e=t,t=void 0),o(t).includes(e)),i=(t=window)=>{if(void 0===t)return[];t.Ionic=t.Ionic||{};let e=t.Ionic.platforms;return null==e&&(e=t.Ionic.platforms=r(t),e.forEach((e=>t.document.documentElement.classList.add(`plt-${e}`)))),e},r=t=>Object.keys(h).filter((e=>h[e](t))),s=t=>!!l(t,/iPad/i)||!(!l(t,/Macintosh/i)||!a(t)),c=t=>l(t,/android|sink/i),a=t=>m(t,"(any-pointer:coarse)"),d=t=>p(t)||u(t),p=t=>!!(t.cordova||t.phonegap||t.PhoneGap),u=t=>{const e=t.Capacitor;return!(!e||!e.isNative)},l=(t,e)=>e.test(t.navigator.userAgent),m=(t,e)=>t.matchMedia(e).matches,h={ipad:s,iphone:t=>l(t,/iPhone/i),ios:t=>l(t,/iPhone|iPod/i)||s(t),android:c,phablet:t=>{const e=t.innerWidth,o=t.innerHeight,n=Math.min(e,o),i=Math.max(e,o);return n>390&&n<520&&i>620&&i<800},tablet:t=>{const e=t.innerWidth,o=t.innerHeight,n=Math.min(e,o),i=Math.max(e,o);return s(t)||(t=>c(t)&&!l(t,/mobile/i))(t)||n>460&&n<820&&i>780&&i<1400},cordova:p,capacitor:u,electron:t=>l(t,/electron/i),pwa:t=>!(!t.matchMedia("(display-mode: standalone)").matches&&!t.navigator.standalone),mobile:a,mobileweb:t=>a(t)&&!d(t),desktop:t=>!a(t),hybrid:d};class b{constructor(){this.m=new Map}reset(t){this.m=new Map(Object.entries(t))}get(t,e){const o=this.m.get(t);return void 0!==o?o:e}getBoolean(t,e=!1){const o=this.m.get(t);return void 0===o?e:"string"==typeof o?"true"===o:!!o}getNumber(t,e){const o=parseFloat(this.m.get(t));return isNaN(o)?void 0!==e?e:NaN:o}set(t,e){this.m.set(t,e)}}const f=new b,w="ionic:",g="ionic-persist-config";let O;const j=e=>e&&t(e)||O,v=(t={})=>{if("undefined"==typeof window)return;const o=window.document,r=window,s=r.Ionic=r.Ionic||{};i(r);const c=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(t=>{try{const e=t.sessionStorage.getItem(g);return null!==e?JSON.parse(e):{}}catch(e){return{}}})(r)),{persistConfig:!1}),s.config),(t=>{const e={};return t.location.search.slice(1).split("&").map((t=>t.split("="))).map((([t,e])=>[decodeURIComponent(t),decodeURIComponent(e)])).filter((([t])=>{return t.substr(0,(e=w).length)===e;var e})).map((([t,e])=>[t.slice(w.length),e])).forEach((([t,o])=>{e[t]=o})),e})(r)),t);f.reset(c),f.getBoolean("persistConfig")&&((t,e)=>{try{t.sessionStorage.setItem(g,JSON.stringify(e))}catch(o){return}})(r,c),s.config=f,s.mode=O=f.get("mode",o.documentElement.getAttribute("mode")||(n(r,"ios")?"ios":"md")),f.set("mode",O),o.documentElement.setAttribute("mode",O),o.documentElement.classList.add(O),f.getBoolean("_testing")&&f.set("animated",!1);const a=t=>t.tagName&&t.tagName.startsWith("ION-"),d=t=>["ios","md"].includes(t);e((t=>{for(;t;){const e=t.mode||t.getAttribute("mode");if(e){if(d(e))return e;a(t)&&console.warn('Invalid ionic mode: "'+e+'", expected: "ios" or "md"')}t=t.parentElement}return O}))};export{n as a,j as b,f as c,o as g,v as i}