{"version":3,"sources":["directives/lazyload.js"],"names":["angular","module","directive","intObsSrv","restrict","replace","link","scope","el","attrs","preloadImage","element","kids","children","forEach","kid","dataset","src","srcset","subscribe"],"mappings":";;AAAC,aAAW;AAERA,EAAAA,OAAO,CAACC,MAAR,CAAe,UAAf,EAA2B,EAA3B,EACKC,SADL,CACe,UADf,EAC2B,CAAC,+BAAD,EAAkC,UAASC,SAAT,EAAoB;AACzE,WAAO;AACHC,MAAAA,QAAQ,EAAE,GADP;AAEHC,MAAAA,OAAO,EAAE,KAFN;AAGHC,MAAAA,IAAI,EAAE,cAASC,KAAT,EAAgBC,EAAhB,EAAoBC,KAApB,EAA2B;AAC7B,YAAIC,YAAY,GAAG,SAAfA,YAAe,CAASC,OAAT,EAAkB;AACjC,cAAIC,IAAI,GAAGZ,OAAO,CAACW,OAAR,CAAgBA,OAAhB,EAAyBE,QAAzB,EAAX;AACAb,UAAAA,OAAO,CAACc,OAAR,CAAgBF,IAAhB,EAAsB,UAASG,GAAT,EAAc;AAChC,gBAAGA,GAAG,CAACC,OAAJ,IAAeD,GAAG,CAACC,OAAJ,CAAYC,GAA9B,EAAmC;AAC/BF,cAAAA,GAAG,CAACE,GAAJ,GAAUF,GAAG,CAACC,OAAJ,CAAYC,GAAtB;AACH;;AACD,gBAAGF,GAAG,CAACC,OAAJ,IAAeD,GAAG,CAACC,OAAJ,CAAYE,MAA9B,EAAsC;AAClCH,cAAAA,GAAG,CAACG,MAAJ,GAAaH,GAAG,CAACC,OAAJ,CAAYE,MAAzB;AACH;AACJ,WAPD;AASH,SAXD;;AAaAf,QAAAA,SAAS,CAACgB,SAAV,CAAoBX,EAApB,EAAwB,kBAAxB,EAA4CE,YAA5C;AACH;AAlBE,KAAP;AAoBH,GArBsB,CAD3B;AAuBH,CAzBA,GAAD","sourcesContent":["(function() {\r\n\r\n angular.module('lazyload', [])\r\n .directive('lazyload', ['ngIntersectionObserverService', function(intObsSrv) {\r\n return {\r\n restrict: 'A',\r\n replace: false,\r\n link: function(scope, el, attrs) {\r\n var preloadImage = function(element) {\r\n var kids = angular.element(element).children();\r\n angular.forEach(kids, function(kid) {\r\n if(kid.dataset && kid.dataset.src) {\r\n kid.src = kid.dataset.src;\r\n }\r\n if(kid.dataset && kid.dataset.srcset) {\r\n kid.srcset = kid.dataset.srcset;\r\n }\r\n });\r\n\r\n };\r\n\r\n intObsSrv.subscribe(el, 'lazyloadObserver', preloadImage);\r\n }\r\n };\r\n }]);\r\n}());"],"file":"../../directives/lazyload.js"}