{"version":3,"file":"app_src_js_img-load-watcher_js.c57d09338e40fb630dda.js","mappings":";;;;;;;;;;;;;;;;;;;IAAMA,WAAW;EACb,SAAAA,YAAYC,EAAE,EAAE;IAAAC,eAAA,OAAAF,WAAA;IAEZ;IACA,IAAI,CAACC,EAAE,GAAGA,EAAE;;IAEZ;IACA,IAAI,IAAI,CAACA,EAAE,CAACE,QAAQ,EAAE;MAClB,IAAI,CAACC,SAAS,CAAC,CAAC;IACpB,CAAC,MAAM;MACH,IAAIC,KAAK,GAAG,IAAI;MAChB,IAAI,CAACJ,EAAE,CAACK,gBAAgB,CAAC,MAAM,EAAE,YAAM;QACnCD,KAAK,CAACD,SAAS,CAAC,CAAC;MACrB,CAAC,EAAE;QAACG,IAAI,EAAE;MAAI,CAAC,CAAC;IACpB;EACJ;EAAC,OAAAC,YAAA,CAAAR,WAAA;IAAAS,GAAA;IAAAC,KAAA,EAED,SAAAN,SAASA,CAAA,EAAG;MACR,IAAI,CAACH,EAAE,CAACU,SAAS,CAACC,GAAG,CAAC,QAAQ,CAAC;IACnC;EAAC;AAAA,KAGL;AACO,SAASC,UAAUA,CAACC,QAAQ,EAAE;EACjCA,QAAQ,CAACC,OAAO,CAAC,UAACC,IAAI,EAAK;IACvB;IACA,IAAIA,IAAI,CAACC,QAAQ,KAAK,CAAC,EAAE;MACrB,IAAIjB,WAAW,CAACgB,IAAI,CAAC;IACzB;EACJ,CAAC,CAAC;AACN","sources":["webpack://WebpackConfig.Web/./app/src/js/img-load-watcher.js"],"sourcesContent":["class ImageLoader {\r\n constructor(el) {\r\n\r\n // store for later\r\n this.el = el;\r\n\r\n // add listeners etc\r\n if (this.el.complete) {\r\n this.hasLoaded();\r\n } else {\r\n let _this = this;\r\n this.el.addEventListener('load', () => {\r\n _this.hasLoaded();\r\n }, {once: true});\r\n }\r\n }\r\n\r\n hasLoaded() {\r\n this.el.classList.add('loaded');\r\n }\r\n}\r\n\r\n// export the default function to create\r\nexport function createFrom(wrappers) {\r\n wrappers.forEach((node) => {\r\n // if node is an element\r\n if (node.nodeType === 1) {\r\n new ImageLoader(node);\r\n }\r\n });\r\n}"],"names":["ImageLoader","el","_classCallCheck","complete","hasLoaded","_this","addEventListener","once","_createClass","key","value","classList","add","createFrom","wrappers","forEach","node","nodeType"],"sourceRoot":""}