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Q,EAAE,OAAO;MAAEtB,GAAG,EAAEJ,OAAO;MAAEG,GAAG,EAAEA,GAAG;MAAEN,MAAM,EAAEA,MAAM;MAAEE,OAAO,EAAEG,SAAS;MAAEyB,IAAI,EAAE,OAAO;MAAEH,SAAS,EAAEI,WAAW,CAACJ,SAAS;IAAE,CAAC,CAAC,CAAC;EAC7L;EACA,IAAIhB,EAAEA,CAAA,EAAG;IAAE,OAAOxB,qDAAU,CAAC,IAAI,CAAC;EAAE;EACpC,WAAW6C,QAAQA,CAAA,EAAG;IAAE,OAAO;MAC7B,KAAK,EAAE,CAAC,YAAY;IACtB,CAAC;EAAE;AACL,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMD,WAAW,GAAIJ,SAAS,IAAK;EACjC,QAAQA,SAAS;IACf,KAAK,MAAM;MACT,OAAO,IAAI;IACb,KAAK,OAAO;MACV,OAAO,KAAK;IACd;MACE,OAAOvB,SAAS;EAAC;AAEvB,CAAC;AACDX,GAAG,CAACwC,KAAK,GAAGzC,MAAM","sources":["./node_modules/@ionic/core/dist/esm/ion-img.entry.js"],"sourcesContent":["/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { r as registerInstance, d as createEvent, h, H as Host, f as getElement } from './index-428032e5.js';\nimport { b as getIonMode } from './ionic-global-84a10cad.js';\nimport { k as inheritAttributes } from './helpers-c8b0fe32.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.inheritedAttributes = {};\n this.onLoad = () => {\n this.ionImgDidLoad.emit();\n };\n this.onError = () => {\n this.ionError.emit();\n };\n this.loadSrc = undefined;\n this.loadError = undefined;\n this.alt = undefined;\n this.src = undefined;\n }\n srcChanged() {\n this.addIO();\n }\n componentWillLoad() {\n this.inheritedAttributes = inheritAttributes(this.el, ['draggable']);\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 /**\n * On slower devices, it is possible for an intersection observer entry to contain multiple\n * objects in the array. This happens when quickly scrolling an image into view and then out of\n * view. In this case, the last object represents the current state of the component.\n */\n if (data[data.length - 1].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 const { loadSrc, alt, onLoad, loadError, inheritedAttributes } = this;\n const { draggable } = inheritedAttributes;\n return (h(Host, { class: getIonMode(this) }, h(\"img\", { decoding: \"async\", src: loadSrc, alt: alt, onLoad: onLoad, onError: loadError, part: \"image\", draggable: isDraggable(draggable) })));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"src\": [\"srcChanged\"]\n }; }\n};\n/**\n * Enumerated strings must be set as booleans\n * as Stencil will not render 'false' in the DOM.\n * The need to explicitly render draggable=\"true\"\n * as only certain elements are draggable by default.\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/draggable.\n */\nconst isDraggable = (draggable) => {\n switch (draggable) {\n case 'true':\n return true;\n case 'false':\n return false;\n default:\n return undefined;\n }\n};\nImg.style = imgCss;\n\nexport { Img as ion_img };\n"],"names":["r","registerInstance","d","createEvent","h","H","Host","f","getElement","b","getIonMode","k","inheritAttributes","imgCss","Img","constructor","hostRef","ionImgWillLoad","ionImgDidLoad","ionError","inheritedAttributes","onLoad","emit","onError","loadSrc","undefined","loadError","alt","src","srcChanged","addIO","componentWillLoad","el","componentDidLoad","window","IntersectionObserverEntry","prototype","removeIO","io","IntersectionObserver","data","length","isIntersecting","load","observe","setTimeout","disconnect","render","draggable","class","decoding","part","isDraggable","watchers","style","ion_img"],"sourceRoot":"webpack:///","x_google_ignoreList":[0]}