{"version":3,"file":"intersection.entry.a235718948c618509b0d.js","mappings":"MACA,IAAIA,EAAa,GAAGC,MAAMC,KAAKC,SAASC,iBAAiB,4BAGzD,IAAIC,EAAoB,IAAIC,sBAAqB,SAASC,EAASC,GAC/DD,EAAQE,SAAQ,SAASC,GACrB,GAAIA,EAAMC,kBAAoB,EAAG,CAC7B,IAAIC,EAAYF,EAAMG,OACtBD,EAAUE,IAAMF,EAAUG,QAAQD,IAClCF,EAAUI,UAAUC,OAAO,QAC3BZ,EAAkBa,UAAUN,EAChC,CACJ,GACJ,IAGAZ,EAAWS,SAAQ,SAASG,GACxBP,EAAkBc,QAAQP,EAC9B,G","sources":["webpack://ClientApi/./src/js/intersection.js"],"sourcesContent":["/** First we get all the non-loaded image elements **/\nvar lazyImages = [].slice.call(document.querySelectorAll(\".lazy-loaded-image.lazy\"));\n\n/** Then we set up a intersection observer watching over those images and whenever any of those becomes visible on the view then replace the placeholder image with actual one, remove the non-loaded class and then unobserve for that element **/\nlet lazyImageObserver = new IntersectionObserver(function(entries, observer) {\n entries.forEach(function(entry) {\n if (entry.intersectionRatio > 0) {\n let lazyImage = entry.target;\n lazyImage.src = lazyImage.dataset.src;\n lazyImage.classList.remove(\"lazy\");\n lazyImageObserver.unobserve(lazyImage);\n }\n });\n});\n\n/** Now observe all the non-loaded images using the observer we have setup above **/\nlazyImages.forEach(function(lazyImage) {\n lazyImageObserver.observe(lazyImage);\n});"],"names":["lazyImages","slice","call","document","querySelectorAll","lazyImageObserver","IntersectionObserver","entries","observer","forEach","entry","intersectionRatio","lazyImage","target","src","dataset","classList","remove","unobserve","observe"],"sourceRoot":""}