text: /*!
   * (C) Ionic http://ionicframework.com - MIT License
   * Built with http://stenciljs.com
   */
  const{h:t}=window.Ionic;import{b as e}from"./chunk-8ef9ea06.js";import{d as s,e as n,f as i,g as o,h as a,i as r,j as c,k as h,l as p}from"./chunk-7badb76d.js";function l(t){t.passesTest=function(t){const s=[];if(t.mediaQuery&&s.push(p(t.win,t.mediaQuery)),t.size&&s.push(function(s,n){const i=t.size.replace(/\s/g,"").split(",");for(const t of i){const n=e[t];if(n&&p(s,n))return!0}return!1}(t.win)),t.mode&&s.push(function(e,s){const n=t.mode.replace(/\s/g,"").split(","),i=e.get("mode");return n.indexOf(i)>=0}(t.config)),t.platform){const e=t.calculatedPlatforms.map(t=>t.name);s.push(function(e,s){const n=t.platform.replace(/\s/g,"").split(",");for(const t of n)for(const s of e)if(t===s)return!0;return!1}(e))}var n,i;return t.orientation&&s.push((n=t.win,"portrait"===(i=t.orientation)?m(n):"landscape"===i&&!m(n))),!s.length||(1===s.length?s[0]:s.reduce((e,s)=>t.or?e||s:e&&s))}(t)}function m(t){return p(t,"(orientation: portrait)")}const u=[{name:"ipad",isMatch:a},{name:"iphone",isMatch:r},{name:"ios",isMatch:o},{name:"android",isMatch:s},{name:"phablet",isMatch:c},{name:"tablet",isMatch:h},{name:"cordova",isMatch:n},{name:"electron",isMatch:i}];function d(t,e){return e.filter(e=>e.isMatch(t))}class f{constructor(){this.or=!1,this.passesTest=!1}componentWillLoad(){this.calculatedPlatforms=d(this.win,u),this.onResize()}onResize(){l(this)}hostData(){return{class:{"show-content":!this.passesTest,"hide-content":this.passesTest}}}static get is(){return"ion-hide-when"}static get properties(){return{config:{context:"config"},element:{elementRef:!0},mediaQuery:{type:String,attr:"media-query"},mode:{type:String,attr:"mode"},or:{type:Boolean,attr:"or"},orientation:{type:String,attr:"orientation"},passesTest:{state:!0},platform:{type:String,attr:"platform"},size:{type:String,attr:"size"},win:{context:"window"}}}static get listeners(){return[{name:"window:resize",method:"onResize",passive:!0}]}static get style(){return"ion-hide-when.show-content{display:block}ion-hide-when.hide-content{display:none!important}"}}class g{constructor(){this.or=!1,this.passesTest=!1}componentWillLoad(){this.calculatedPlatforms=d(this.win,u),this.onResize()}onResize(){l(this)}hostData(){return{class:{"show-content":this.passesTest,"hide-content":!this.passesTest}}}static get is(){return"ion-show-when"}static get properties(){return{calculatedPlatforms:{context:"platforms"},config:{context:"config"},element:{elementRef:!0},mediaQuery:{type:String,attr:"media-query"},mode:{type:String,attr:"mode"},or:{type:Boolean,attr:"or"},orientation:{type:String,attr:"orientation"},passesTest:{state:!0},platform:{type:String,attr:"platform"},size:{type:String,attr:"size"},win:{context:"window"}}}static get listeners(){return[{name:"window:resize",method:"onResize",passive:!0}]}static get style(){return"ion-show-when.show-content{display:block}ion-show-when.hide-content{display:none!important}"}}export{f as IonHideWhen,g as IonShowWhen};