text: (window.webpackJsonp=window.webpackJsonp||[]).push([[8],{14:function(e,t,n){"use strict";t.a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=window.scrollY||window.pageYOffset,o=e.getBoundingClientRect().top+n,i=n,r=n+window.innerHeight*t,a=o,s=o+e.clientHeight*t;return s>=i&&s<=r||a<=r&&a>=i}},27:function(e,t,n){"use strict";n.r(t);var o=n(11),i=(n(17),n(13)),r=n.n(i),a=n(14),s=n(6);function c(){var e=babelHelpers.taggedTemplateLiteral([":host{margin-bottom:5px;display:block;position:relative}:host .lazy-background-container{position:relative;display:block;width:100%}:host .lazy-background-container .lazy-background{position:absolute;top:0;left:0;width:100%;height:100%;background-repeat:no-repeat;opacity:0;z-index:1}:host .lazy-background-container .lazy-background.loaded{opacity:1;transition:opacity .3s}:host .bg-img{display:none}"]);return c=function(){return e},e}function l(){var e=babelHelpers.taggedTemplateLiteral(['<img class="bg-img" data-src="','">']);return l=function(){return e},e}function d(){var e=babelHelpers.taggedTemplateLiteral(['<img class="bg-img" data-sizes="auto" data-srcset="','">']);return d=function(){return e},e}function u(){var e=babelHelpers.taggedTemplateLiteral(['<div class="lazy-background-container" style="background-color:','"><div class="lazy-background" style="background-size:',";background-position:",'">',"</div><slot></slot></div>"]);return u=function(){return e},e}var g=function(e,t,n,o){var i,r=arguments.length,a=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===("undefined"==typeof Reflect?"undefined":babelHelpers.typeof(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(r<3?i(a):r>3?i(t,n,a):i(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a},b=function(e){function t(){var e;return babelHelpers.classCallCheck(this,t),(e=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(t).apply(this,arguments))).bg="",e.responsive=!1,e.position="center center",e.size="cover",e.color="#ccc",e}return babelHelpers.inherits(t,e),babelHelpers.createClass(t,[{key:"connectedCallback",value:function(){babelHelpers.get(babelHelpers.getPrototypeOf(t.prototype),"connectedCallback",this).call(this),this.responsive&&this.responsiveImgHandler(),this.styleContentWrap(),this.addEventListeners()}},{key:"disconnectedCallback",value:function(){this.removeEventListeners(),babelHelpers.get(babelHelpers.getPrototypeOf(t.prototype),"disconnectedCallback",this).call(this)}},{key:"addEventListeners",value:function(){var e=this;document.addEventListener("readystatechange",function(){var t=e.shadowRoot.querySelector("img");t.addEventListener("lazybeforeunveil",e.showImage(t),!0),t.addEventListener("load",function(t){var n=e.shadowRoot.querySelector(".lazy-background-container .lazy-background"),o=t.target;n.style.backgroundImage="url(".concat(o.currentSrc||o.src,")"),n.classList.add("loaded")},!0),window.addEventListener("scroll",function(){return window.requestAnimationFrame(function(){return e.showImage(t)})},!0),window.addEventListener("resize",function(){return window.requestAnimationFrame(function(){return e.showImage(t)})},!0)},!0)}},{key:"removeEventListeners",value:function(){document.removeEventListener("readystatechange",function(){return console.log("removed")},!0),window.removeEventListener("scroll",function(){return console.log("removed")},!0),window.removeEventListener("resize",function(){return console.log("removed")},!0)}},{key:"styleContentWrap",value:function(){var e=this.querySelector(".content");e&&(e.style.padding="30px",e.style.position="relative",e.style.zIndex=2)}},{key:"showImage",value:function(e){Object(a.a)(e,1.5)&&!this._isImageLoaded&&(this._isImageLoaded=!0,r.a.loader.unveil(e))}},{key:"responsiveImgHandler",value:function(){var e=this.bg.split("_");this.setImgRoot(e),e=e[2].split("."),this.setImgExt(e),this.setPixelRatio(),this.requestUpdate()}},{key:"setImgRoot",value:function(e){return this._imgRootUrl=e[0],this._imgRootUrl}},{key:"setImgExt",value:function(e){return this._imgExt=e[1],this._imgExt}},{key:"setPixelRatio",value:function(){return this._devicePixelRatio=window.devicePixelRatio>=2?2:1,this._devicePixelRatio}},{key:"render",value:function(){var e=this;return Object(o.d)(u(),this.color,this.size,this.position,this.responsive?Object(o.d)(d(),s.a.imageSizes.map(function(t,n){return"".concat(n>0?", ":"").concat(e._imgRootUrl,"_").concat(t,"w_").concat(e._devicePixelRatio,"x.").concat(e._imgExt," ").concat(t*e._devicePixelRatio,"w")})):Object(o.d)(l(),this.bg))}}],[{key:"styles",get:function(){return Object(o.b)(c())}}]),t}(o.a);g([Object(o.e)({type:String})],b.prototype,"bg",void 0),g([Object(o.e)({type:Boolean})],b.prototype,"responsive",void 0),g([Object(o.e)({type:String})],b.prototype,"position",void 0),g([Object(o.e)({type:String})],b.prototype,"size",void 0),g([Object(o.e)({type:String})],b.prototype,"color",void 0),b=g([Object(o.c)("lazy-background")],b),n.d(t,"LazyBackground",function(){return b})},6:function(e,t,n){"use strict";t.a={brandBlue:"rgb(12, 122, 192)",brandRed:"rgb(179, 32, 35)",brandYellow:"rgb(244, 167, 0)",brandGrey:"rgb(84, 106, 120)",primary:"rgb(12, 122, 192)",secondary:"rgb(84, 106, 120)",warning:"rgb(244, 167, 0)",danger:"rgb(179, 32, 35)",fontMono:"'Courier', monospace",fontSans:"'Open Sans', sans-serif",fontSerif:"'Bree Serif', 'Times', serif",baseFontColor:"rgb(84, 106, 120)",baseFontFamily:"'Source Sans Pro', 'Arial', sans-serif",baseFontSize:"16px",fontLight:300,fontNormal:400,fontBold:700,baseLineHeight:1.5,headings:"6 5 4 3 2 1",baseBorder:"1px solid rgb(84, 106, 120)",baseRadius:"0.25rem",baseBoxShadow:"rgba(42, 53, 60, 0.2) 0 0 5px",placeholderImg:"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",imageSizes:[1500,800,480,320],mediaQueries:["(min-width: 801px)","(min-width: 481px)","(min-width: 321px)","(max-width: 320px)"]}}}]);
  //# sourceMappingURL=8.bdf3024f.js.map