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