/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */
System.register(["./p-b0da91c5.system.js","./p-18c85d0f.system.js","./p-bc15f4eb.system.js"],(function(t){"use strict";var i,e,o,n,r,s;return{setters:[function(t){i=t.r;e=t.f;o=t.i;n=t.H;r=t.j},function(t){s=t.g},function(){}],execute:function(){var c=":host{display:block;-o-object-fit:contain;object-fit:contain}img{display:block;width:100%;height:100%;-o-object-fit:inherit;object-fit:inherit;-o-object-position:inherit;object-position:inherit}";var d=t("ion_img",function(){function t(t){var o=this;i(this,t);this.ionImgWillLoad=e(this,"ionImgWillLoad",7);this.ionImgDidLoad=e(this,"ionImgDidLoad",7);this.ionError=e(this,"ionError",7);this.onLoad=function(){o.ionImgDidLoad.emit()};this.onError=function(){o.ionError.emit()};this.loadSrc=undefined;this.loadError=undefined;this.alt=undefined;this.src=undefined}t.prototype.srcChanged=function(){this.addIO()};t.prototype.componentDidLoad=function(){this.addIO()};t.prototype.addIO=function(){var t=this;if(this.src===undefined){return}if(typeof window!=="undefined"&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"isIntersecting"in window.IntersectionObserverEntry.prototype){this.removeIO();this.io=new IntersectionObserver((function(i){if(i[i.length-1].isIntersecting){t.load();t.removeIO()}}));this.io.observe(this.el)}else{setTimeout((function(){return t.load()}),200)}};t.prototype.load=function(){this.loadError=this.onError;this.loadSrc=this.src;this.ionImgWillLoad.emit()};t.prototype.removeIO=function(){if(this.io){this.io.disconnect();this.io=undefined}};t.prototype.render=function(){return o(n,{class:s(this)},o("img",{decoding:"async",src:this.loadSrc,alt:this.alt,onLoad:this.onLoad,onError:this.loadError,part:"image"}))};Object.defineProperty(t.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{src:["srcChanged"]}},enumerable:false,configurable:true});return t}());d.style=c}}}));