-
Notifications
You must be signed in to change notification settings - Fork 0
/
13-es5.js.map
1 lines (1 loc) · 4.56 KB
/
13-es5.js.map
1
{"version":3,"sources":["webpack:///node_modules/@ionic/core/dist/esm/ion-img.entry.js"],"names":["imgCss","Img","hostRef","ionImgWillLoad","ionImgDidLoad","ionError","onLoad","emit","onError","addIO","src","undefined","window","IntersectionObserverEntry","prototype","removeIO","io","IntersectionObserver","data","isIntersecting","load","observe","el","setTimeout","loadError","loadSrc","disconnect","decoding","alt","part","style"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;;AAGA,UAAMA,MAAM,GAAG,oMAAf;;AAEA,UAAMC,GAAG;AACP,qBAAYC,OAAZ,EAAqB;AAAA;;AAAA;;AACnB,uEAAiB,IAAjB,EAAuBA,OAAvB;AACA,eAAKC,cAAL,GAAsB,6DAAY,IAAZ,EAAkB,gBAAlB,EAAoC,CAApC,CAAtB;AACA,eAAKC,aAAL,GAAqB,6DAAY,IAAZ,EAAkB,eAAlB,EAAmC,CAAnC,CAArB;AACA,eAAKC,QAAL,GAAgB,6DAAY,IAAZ,EAAkB,UAAlB,EAA8B,CAA9B,CAAhB;;AACA,eAAKC,MAAL,GAAc,YAAM;AAClB,iBAAI,CAACF,aAAL,CAAmBG,IAAnB;AACD,WAFD;;AAGA,eAAKC,OAAL,GAAe,YAAM;AACnB,iBAAI,CAACH,QAAL,CAAcE,IAAd;AACD,WAFD;AAGD;;AAZM;AAAA;AAAA,uCAaM;AACX,iBAAKE,KAAL;AACD;AAfM;AAAA;AAAA,6CAgBY;AACjB,iBAAKA,KAAL;AACD;AAlBM;AAAA;AAAA,kCAmBC;AAAA;;AACN,gBAAI,KAAKC,GAAL,KAAaC,SAAjB,EAA4B;AAC1B;AACD;;AACD,gBAAI,OAAOC,MAAP,KAAkB,WAAlB,IACF,0BAA0BA,MADxB,IAEF,+BAA+BA,M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,CAAC,YAAD;AADsB,aAAP;AAEpB;AA7DG;;AAAA;AAAA,SAAT;;AA+DA5B,SAAG,CAAC6B,KAAJ,GAAY9B,MAAZ","file":"13-es5.js","sourcesContent":["import { r as registerInstance, e as createEvent, h, H as Host, i as getElement } from './index-e806d1f6.js';\nimport { b as getIonMode } from './ionic-global-9d5c8ee3.js';\n\nconst imgCss = \":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}\";\n\nconst Img = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionImgWillLoad = createEvent(this, \"ionImgWillLoad\", 7);\n this.ionImgDidLoad = createEvent(this, \"ionImgDidLoad\", 7);\n this.ionError = createEvent(this, \"ionError\", 7);\n this.onLoad = () => {\n this.ionImgDidLoad.emit();\n };\n this.onError = () => {\n this.ionError.emit();\n };\n }\n srcChanged() {\n this.addIO();\n }\n componentDidLoad() {\n this.addIO();\n }\n addIO() {\n if (this.src === undefined) {\n return;\n }\n if (typeof window !== 'undefined' &&\n 'IntersectionObserver' in window &&\n 'IntersectionObserverEntry' in window &&\n 'isIntersecting' in window.IntersectionObserverEntry.prototype) {\n this.removeIO();\n this.io = new IntersectionObserver(data => {\n // because there will only ever be one instance\n // of the element we are observing\n // we can just use data[0]\n if (data[0].isIntersecting) {\n this.load();\n this.removeIO();\n }\n });\n this.io.observe(this.el);\n }\n else {\n // fall back to setTimeout for Safari and IE\n setTimeout(() => this.load(), 200);\n }\n }\n load() {\n this.loadError = this.onError;\n this.loadSrc = this.src;\n this.ionImgWillLoad.emit();\n }\n removeIO() {\n if (this.io) {\n this.io.disconnect();\n this.io = undefined;\n }\n }\n render() {\n return (h(Host, { class: getIonMode(this) }, h(\"img\", { decoding: \"async\", src: this.loadSrc, alt: this.alt, onLoad: this.onLoad, onError: this.loadError, part: \"image\" })));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"src\": [\"srcChanged\"]\n }; }\n};\nImg.style = imgCss;\n\nexport { Img as ion_img };\n"]}