UNPKG

test-isc

Version:

An Ionic component similar to Ionic Select, that allows to search items, including async search, group, add, edit, delete items, and much more.

1 lines 2.81 kB
import{g as t,s as o}from"./p-aa742337.js";const e=(t,o)=>{return"string"==typeof t&&(o=t,t=void 0),(e=t,n(e)).includes(o);var e},n=(t=window)=>{t.Ionic=t.Ionic||{};let o=t.Ionic.platforms;return null==o&&(o=t.Ionic.platforms=i(t),o.forEach(o=>t.document.documentElement.classList.add("plt-"+o))),o},i=t=>Object.keys(m).filter(o=>m[o](t)),r=t=>!!l(t,/iPad/i)||!(!l(t,/Macintosh/i)||!c(t)),s=t=>l(t,/android|sink/i),c=t=>u(t,"(any-pointer:coarse)"),a=t=>d(t)||p(t),d=t=>!!(t.cordova||t.phonegap||t.PhoneGap),p=t=>{const o=t.Capacitor;return!(!o||!o.isNative)},l=(t,o)=>o.test(t.navigator.userAgent),u=(t,o)=>t.matchMedia(o).matches,m={ipad:r,iphone:t=>l(t,/iPhone/i),ios:t=>l(t,/iPhone|iPod/i)||r(t),android:s,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 r(t)||(t=>s(t)&&!l(t,/mobile/i))(t)||n>460&&n<820&&i>780&&i<1400},cordova:d,capacitor:p,electron:t=>l(t,/electron/i),pwa:t=>!(!t.matchMedia("(display-mode: standalone)").matches&&!t.navigator.standalone),mobile:c,mobileweb:t=>c(t)&&!a(t),desktop:t=>!c(t),hybrid:a};class h{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 b=new h;let g;const f=o=>o&&t(o)||g,w=()=>{const t=document,i=window,r=i.Ionic=i.Ionic||{};n(i);const s=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(o){return{}}})(i)),{persistConfig:!1}),r.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})(i));b.reset(s),b.getBoolean("persistConfig")&&((t,o)=>{try{t.sessionStorage.setItem("ionic-persist-config",JSON.stringify(o))}catch(e){return}})(i,s),r.config=b,r.mode=g=b.get("mode",t.documentElement.getAttribute("mode")||(e(i,"ios")?"ios":"md")),b.set("mode",g),t.documentElement.setAttribute("mode",g),t.documentElement.classList.add(g),b.getBoolean("_testing")&&b.set("animated",!1);const c=t=>t.tagName&&t.tagName.startsWith("ION-"),a=t=>["ios","md"].includes(t);o(t=>{for(;t;){const o=t.mode||t.getAttribute("mode");if(o){if(a(o))return o;c(t)&&console.warn('Invalid ionic mode: "'+o+'", expected: "ios" or "md"')}t=t.parentElement}return g})};export{w as a,b as c,f as g,e as i}