(window.blocksyJsonP=window.blocksyJsonP||[]).push([[16],{49:function(e,t,n){"use strict";n.r(t);var i=n(3);function r(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){for(var n=0;n=5?5:r,a&&d){var b=0;b=r>0?s(.5,r):s(window.innerHeight/(a.clientHeight+window.innerHeight),r)-s(.5,r),b=2*Math.abs(b),n.parentNode.style.height=c?"calc(100% + ".concat(b,"px)"):"100%"}var g=u(a||n),v=g.top,O=g.height;return{parallaxBehavior:h,shouldSetHeightToIncrease:d,fitInsideContainer:a,el:n,top:pageYOffset+v,height:O,speed:r,isVisible:c}};function c(e){var t=e.getBoundingClientRect();return t.bottom>-450&&t.top-450<(window.innerHeight||document.documentElement.clientHeight)}function u(e){if(!e)return null;var t=e.getBoundingClientRect(),n=t.top,i=t.left,r=t.right,o=t.width,a=t.height,s=window.getComputedStyle(e).transform.split(/\(|,|\)/).slice(1,-1).map(function(e){return parseFloat(e)});if(6!=s.length)return e.getBoundingClientRect();var l=s,c=l[0]*l[3]-l[1]*l[2];return{width:o/l[0],height:a/l[3],left:(i*l[3]-n*l[2]+l[2]*l[5]-l[4]*l[3])/c,right:(r*l[3]-n*l[2]+l[2]*l[5]-l[4]*l[3])/c,top:(-i*l[1]+n*l[0]+l[4]*l[1]-l[0]*l[5])/c}}var f=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.blocks=[],this.oldPosY=!1,this.intersectionObserver=new IntersectionObserver(function(e){e.map(function(e){var n=e.target,r=e.isIntersecting;e.intersectionRatio;t.blocks.filter(function(e){var t=e.fitInsideContainer,i=e.el;return i.closest("svg")?i.closest("svg")===n:t===n||i===n}).map(function(e){e.isVisible=r&&e.parallaxBehavior.indexOf(Object(i.a)({withTablet:!0}))>-1,t.blocks=t.blocks.map(function(t){return t.el===e.el?e:t}),e.isVisible||e.el.removeAttribute("style")})})},{rootMargin:"450px"}),window.addEventListener("resize",function(){t.oldPosY=!1,t.blocks=t.blocks.map(function(e){return l(function(e){for(var t=1;t-1}))}),t.animate()}),this.update(),this.animate()}var t,n,f;return t=e,(n=[{key:"addEl",value:function(e){var t=e.el,n=e.speed,r=e.fitInsideContainer,o=void 0===r?null:r,a=e.shouldSetHeightToIncrease,s=void 0===a||a,u=e.parallaxBehavior,f=void 0===u?"desktop:tablet:mobile":u;o?this.intersectionObserver.observe(o):this.intersectionObserver.observe(t.closest("svg")?t.closest("svg"):t),this.blocks.push(l({el:t,speed:n,fitInsideContainer:o,isVisible:c(o||t)&&f.indexOf(Object(i.a)({withTablet:!0}))>-1,shouldSetHeightToIncrease:s,parallaxBehavior:f}))}},{key:"update",value:function(){this.oldPosY||0===this.oldPosY||this.animate(),this.setPosition()&&this.animate(),requestAnimationFrame(this.update.bind(this))}},{key:"setPosition",value:function(){if(0===this.blocks.length)return!1;var e=this.oldPosY;return this.oldPosY=pageYOffset,e!=pageYOffset}},{key:"animate",value:function(){this.blocks.map(function(e){if(e.isVisible){var t=(pageYOffset-e.top+window.innerHeight)/(e.height+window.innerHeight),n=u(e.fitInsideContainer?e.fitInsideContainer:e.el),i=n.top,r=n.height;r||(r=(e.fitInsideContainer?e.fitInsideContainer:e.el).getBoundingClientRect().height);var o=1-(i+(e.el.dataset.percentage&&0===parseInt(e.el.dataset.percentage,10)?0:r/2))/innerHeight,a=s(e.fitInsideContainer?t:o,e.speed)-s(e.el.dataset.percentage?parseInt(e.el.dataset.percentage,10):.5,e.speed);e.el.style.transform="translate3d(0, ".concat(a,"px, 0)")}else e.el.removeAttribute("style")})}}])&&a(t.prototype,n),f&&a(t,f),e}();n(2);function d(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"rel",function(){return h}),n.d(t,"mount",function(){return b});var h=new f,b=function(e){e.ctHasParallax||(e.ctHasParallax=!0,e.querySelector("figure .ct-image-container > img")?setTimeout(function(){h.addEl(function(e){for(var t=1;t img"),speed:-5,fitInsideContainer:e},e.dataset.parallax?{parallaxBehavior:e.dataset.parallax}:{}))},0):h.addEl({el:e,speed:+e.dataset.parallax,shouldSetHeightToIncrease:!1}))}}}]);