{"version":3,"sources":["webpack:///./src/js/modules/blog-news-hero.js"],"names":["BlogNewsHero","this","dom","image","el","querySelector","setBackground","addEventListener","imageUrl","currentSrc","src","style","backgroundImage","Component"],"mappings":"8jDAEMA,E,sWACJ,WACEC,KAAKC,IAAM,CACTC,MAAOF,KAAKG,GAAGC,cAAc,2BAE/BJ,KAAKK,kB,0BAGP,WACML,KAAKC,IAAIC,OACXF,KAAKC,IAAIC,MAAMI,iBAAiB,OAAUN,KAAKK,cAA/C,KAA0CL,S,2BAI9C,WACE,IAAMO,EAAWP,KAAKC,IAAIC,MAAMM,YAAcR,KAAKC,IAAIC,MAAMO,IAC7DT,KAAKC,IAAIC,MAAMQ,MAAMC,gBAArB,eAA+CJ,EAA/C,W,8BAhBuBK,aAoBZb","file":"35.d7b63f267d3599d9f0ef.js","sourcesContent":["import { Component } from '@verndale/core';\n\nclass BlogNewsHero extends Component {\n setupDefaults() {\n this.dom = {\n image: this.el.querySelector('.blog-news-hero__image')\n };\n this.setBackground();\n }\n\n addListeners() {\n if (this.dom.image) {\n this.dom.image.addEventListener('load', ::this.setBackground);\n }\n }\n\n setBackground() {\n const imageUrl = this.dom.image.currentSrc || this.dom.image.src;\n this.dom.image.style.backgroundImage = `url(\"${imageUrl}\")`;\n }\n}\n\nexport default BlogNewsHero;\n"],"sourceRoot":""}