"use strict";(self.blocksyJsonP=self.blocksyJsonP||[]).push([[167],{1167:function(t,e,n){n.r(e),n.d(e,{mount:function(){return O}});var i={};n.r(i),n.d(i,{D:function(){return E}});var r=n(2194),o=n.n(r);function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function l(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:null;if(!t)return null;if(t.getBoundingClientRect&&!t.firstElementChild)return t.getBoundingClientRect();e||(e=t);let{top:n,left:i,right:r,width:o,height:s}=t.getBoundingClientRect(),l=window.getComputedStyle(e).transform.split(/\(|,|\)/).slice(1,-1).map((function(t){return parseFloat(t)}));if(6!=l.length)return t.getBoundingClientRect();var a=l;let u=a[0]*a[3]-a[1]*a[2];return{width:o/a[0],height:s/a[3],left:(i*a[3]-n*a[2]+a[2]*a[5]-a[4]*a[3])/u,right:(r*a[3]-n*a[2]+a[2]*a[5]-a[4]*a[3])/u,top:(-i*a[1]+n*a[0]+a[4]*a[1]-a[0]*a[5])/u}},h=function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0},m=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?1:-1,n=100*Math.round(100*t.state.positionX/f(p(t.sliderContainer.firstElementChild,t.options.nullifyTransformEl),t)/100)*f(p(t.sliderContainer.firstElementChild,t.options.nullifyTransformEl),t)/100+f(p(t.sliderContainer.firstElementChild,t.options.nullifyTransformEl),t)*e;t.state=l(l({},t.state),{},{positionTarget:n})};let y=null;function g(t,e){const n=function(i){i.target===t&&(t.removeEventListener("transitionend",n),e())};return t.addEventListener("transitionend",n),function(){t.removeEventListener("transitionend",n)}}function v(t){return null==t||t.matches("html")?null:t.scrollHeight>t.clientHeight?t:v(t.parentNode)}const C="__DESTROYED__";class E{constructor(t){var e=this;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var i;u(this,"getDefaultState",(function(){return{elementsOnBehind:1,positionSnapshot:0,positionX:0,positionTarget:0,velocity:0,containerInnerWidth:e.sliderContainer?f(p(e.sliderContainer,e.nullifyTransformEl),e):0,slideWidth:e.sliderContainer?f(p(e.sliderContainer.firstElementChild,e.sliderContainer),e):0,previousCurrentIndex:0,startX:0,endX:0,mouseDown:!1,recalculationScheduled:!1,lastTimeAnimated:1/0}})),u(this,"state",this.getDefaultState()),u(this,"options",{onDragStart:function(){},onSlideChange:function(){},autoplay:!1,scaleRotateEffect:!1,pillsContainerSelector:null,pillsFlexyInstance:null,flexyAttributeEl:null,initialDragEvent:null,wrapAroundMode:"container",orientation:"horizontal",nullifyTransformEl:null,elementsThatDoNotStartDrag:[],hasDragAndDrop:!0}),u(this,"sliderContainer",null),u(this,"drawLoop",(function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e.state.sliderActivated===C)return;let n=t?1/0:e.state.positionX;(e.state.containerInnerWidth!==p(e.sliderContainer,e.nullifyTransformEl).width||e.state.recalculationScheduled)&&e.refreshActivation();let i=e.state,r={};if(e.state.sliderActivated){let t=i.velocity+(e.state.mouseDown?e.state.positionSnapshot+(e.state.endX-e.state.startX)-e.state.positionX-e.state.velocity:.02*(e.state.positionTarget-e.state.positionX));r.velocity=.72*t,r.positionX=e.state.positionX+t}if(e.state.sliderActivated&&(Math.abs(e.state.containerInnerWidth-f(p(e.sliderContainer,e.nullifyTransformEl),e))>1||e.state.recalculationScheduled)&&(r.positionX=Math.round(f(p(e.sliderContainer.firstElementChild,e.options.nullifyTransformEl),e)*(100*Math.round(e.state.positionX/e.state.slideWidth))/100),r.positionTarget=Math.round(f(p(e.sliderContainer.firstElementChild,e.options.nullifyTransformEl),e)*(100*Math.round(e.state.positionX/e.state.slideWidth))/100),r.recalculationScheduled=!1),r.scrollPosition={x:window.pageXOffset,y:window.pageYOffset},r.containerInnerWidth=f(p(e.sliderContainer,e.nullifyTransformEl),e),r.slideWidth=f(p(e.sliderContainer.firstElementChild,e.options.nullifyTransformEl),e),e.state=l(l({},e.state),r),(n!==e.state.positionX||Math.abs(e.state.positionX-e.state.positionTarget)>.1)&&!t&&e.state.sliderActivated){let{relativeDelta:t,elementsOnBehind:n}=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"container";const r=t.sliderContainer;let o=0;if("left"===n){let n=[...r.children].reduce((function(e,n){let i=c(p(e,t.options.nullifyTransformEl),t);return c(p(n,t.options.nullifyTransformEl),t)("container"===i?c(p(r,t.options.nullifyTransformEl),t):0)&&(o=-1*f(p(r.firstElementChild,t.options.nullifyTransformEl),t),e=e===r.children.length?1:e+1)}if("right"===n){let n=[...r.children].reduce((function(e,n){return d(p(e,t.options.nullifyTransformEl),t)>d(p(n,t.options.nullifyTransformEl),t)?e:n}),{getBoundingClientRect:function(){return{left:-1,bottom:-9999999999999,top:-1,right:-1}}});d(p(n,t.options.nullifyTransformEl),t)<("container"===i?d(p(r,t.options.nullifyTransformEl),t):window.innerWidth)&&(o=f(p(r.firstElementChild,t.options.nullifyTransformEl),t),e=1===e?r.children.length:e-1)}return{relativeDelta:o,elementsOnBehind:e}}(e,e.state.elementsOnBehind,e.state.mouseDown?e.state.endX<=e.state.startX?"right":"left":e.state.positionX>=e.state.positionTarget?"right":"left",e.options.wrapAroundMode);e.state=l(l({},e.state),{},{elementsOnBehind:n,positionTarget:e.state.positionTarget+t,positionX:e.state.positionX+t,positionSnapshot:e.state.positionSnapshot+t})}if(e.options.autoplay&&e.state.sliderActivated&&Math.abs(e.state.positionX-e.state.positionTarget)<.5&&(new Date).getTime()/1e3-e.state.lastTimeAnimated/1e3>(parseFloat(e.options.autoplay,10)?parseFloat(e.options.autoplay,10):3)&&(e.state=l(l({},e.state),{},{positionTarget:e.state.positionX-f(p(e.sliderContainer.firstElementChild,e.options.nullifyTransformEl),e)})),!e.state.mouseDown&&e.state.sliderActivated){Math.abs(e.state.positionX-e.state.positionTarget)<.2&&(e.state=l(l({},e.state),{},{positionX:e.state.positionTarget,velocity:0}));let t=e.state.previousCurrentIndex;e.state=l(l({},e.state),{},{previousCurrentIndex:(o=e.state.elementsOnBehind>Math.round(Math.abs(e.state.positionTarget)/f(p(e.sliderContainer.firstElementChild,e.options.nullifyTransformEl),e))?Math.round(Math.abs(e.state.positionTarget)/f(p(e.sliderContainer.firstElementChild,e.options.nullifyTransformEl),e))+(e.sliderContainer.children.length-e.state.elementsOnBehind):Math.abs(Math.round(Math.abs(e.state.positionTarget)/f(p(e.sliderContainer.firstElementChild,e.options.nullifyTransformEl),e))-e.state.elementsOnBehind),s=0,a=e.sliderContainer.children.length-1,Math.min(Math.max(o,s),a))}),t!==e.state.previousCurrentIndex&&(!function(t){if(t.options.pillsContainerSelector&&(t.options.pillsContainerSelector.querySelector(".active")&&t.options.pillsContainerSelector.querySelector(".active").classList.remove("active"),t.options.pillsContainerSelector.children[t.state.previousCurrentIndex].classList.add("active"),t.options.pillsFlexyInstance)){let e=t.options.pillsFlexyInstance.flexy,n=[...t.options.pillsContainerSelector.children],i=[...e.sliderContainer.children].indexOf([...e.sliderContainer.children].reduce((function(t,n){let i=c(p(t,e.options.nullifyTransformEl),e),r=c(p(n,e.options.nullifyTransformEl),e);return Math.abs(r-c(p(e.sliderContainer,e.options.nullifyTransformEl),e))=o?i>r?1:-1:i>r?-1:1),u=100*Math.round(100*e.state.positionX/f(p(e.sliderContainer.firstElementChild,e.options.nullifyTransformEl),e)/100)*f(p(e.sliderContainer.firstElementChild,e.options.nullifyTransformEl),e)/100+f(p(e.sliderContainer.firstElementChild,e.options.nullifyTransformEl),e)*a;e.state=l(l({},e.state),{},{positionTarget:u})}}(e),e.options.onSlideChange(e,{currentIndex:e.state.previousCurrentIndex,previousIndex:t}))}var o,s,a,u;e.state.positionX!==n&&e.state.sliderActivated&&(e.state.positionX===e.state.positionTarget||e.options.flexyAttributeEl.hasAttribute("data-flexy-moving")||(u=e,y&&(console.log("setContainerHeightFor: cancelling ongoing transition end event"),y(),u.sliderContainer.parentNode.style.setProperty("--flexy-view-height",u.sliderContainer.parentNode.flexyPreviousHeight)),u.sliderContainer.parentNode.style.setProperty("--flexy-view-height",u.sliderContainer.parentNode.getBoundingClientRect().height+"px"),e.options.flexyAttributeEl.dataset.flexyMoving=""),i.positionX!==i.positionTarget&&e.state.positionX===e.state.positionTarget&&(e.options.flexyAttributeEl.removeAttribute("data-flexy-moving"),function(t){t.sliderContainer.parentNode.flexyPreviousHeight=t.sliderContainer.parentNode.style.getPropertyValue("--flexy-view-height"),t.sliderContainer.parentNode.style.setProperty("--flexy-view-height",t.sliderContainer.getBoundingClientRect().height+"px"),y=g(t.sliderContainer.parentNode,(function(){console.log("here animation finished"),t.sliderContainer.parentNode.removeAttribute("style"),y=null}))}(e)),e.render(),e.state=l(l({},e.state),{},{lastTimeAnimated:(new Date).getTime()})),requestAnimationFrame((function(){return e.drawLoop()}))})),this.options=l(l({},this.options),{},{flexyAttributeEl:t,nullifyTransformEl:t},n),this.sliderContainer=t,function(t){const e=new IntersectionObserver((function(t){t.map((function(t){let{target:e,isIntersecting:n,intersectionRatio:i}=t;e.classList.remove("flexy-item-is-visible"),n&&e.classList.add("flexy-item-is-visible")}))}),{});[...t.sliderContainer.children].forEach((function(t){t.getBoundingClientRect().height>10&&t.classList.add("flexy-item-is-visible"),e.observe(t)}))}(this),function(t){if(!t.options.pillsContainerSelector)return;let e=[...t.options.pillsContainerSelector.children];const n=function(n){let i=[...t.sliderContainer.children].indexOf([...t.sliderContainer.children].reduce((function(e,n){let i=c(p(e,t.options.nullifyTransformEl),t),r=c(p(n,t.options.nullifyTransformEl),t);return Math.abs(r-c(p(t.sliderContainer,t.options.nullifyTransformEl),t))=o?i>r?1:-1:i>r?-1:1),u=100*Math.round(100*t.state.positionX/f(p(t.sliderContainer.firstElementChild,t.options.nullifyTransformEl),t)/100)*f(p(t.sliderContainer.firstElementChild,t.options.nullifyTransformEl),t)/100+f(p(t.sliderContainer.firstElementChild,t.options.nullifyTransformEl),t)*a;t.state=l(l({},t.state),{},{positionTarget:u})};t.options.initialDragEvent&&t.options.initialDragEvent.target.closest(".flexy-pills > * > *")&&setTimeout((function(){n(t.options.initialDragEvent.target.closest(".flexy-pills > * > *"))})),e.map((function(t){return t.addEventListener("click",(function(e){n(t),e.preventDefault()}))}))}(this),(i=this).options.leftArrow&&i.options.leftArrow.addEventListener("click",(function(t){t.preventDefault(),m(i,!0)})),i.options.rightArrow&&i.options.rightArrow.addEventListener("click",(function(t){t.preventDefault(),m(i)})),function(t){const e=t.sliderContainer;if(!t.options.autoplay)return;const n=function(){t.state.sliderActivated&&(t.options=l(l({},t.options),{},{autoplay:!1,_autoplay:t.options.autoplay}))},i=function(){t.state.sliderActivated&&(t.options=l(l({},t.options),{},{autoplay:t.options._autoplay,_autoplay:!1}),t.state=l(l({},t.state),{},{lastTimeAnimated:(new Date).getTime()}))};e.addEventListener("mouseenter",n),e.addEventListener("mouseleave",i),new IntersectionObserver((function(e){e.map((function(e){let{target:r,isIntersecting:o,intersectionRatio:s}=e;if(o){if(!Object.keys(t.options).includes("_autoplay"))return;i()}o||n()}))}),{}).observe(e)}(this),function(t,e,n){if(!t.options.hasDragAndDrop)return;const i=t.sliderContainer,r=function(r){if(!e().sliderActivated)return;if(t.options.elementsThatDoNotStartDrag.reduce((function(t,e){return!!t||r.target.matches(e)||r.target.closest(e)}),!1))return;const o=r.type;r.stopPropagation(),"touchstart"!==r.type&&r.preventDefault();let s=!1;n(l(l({},e()),{},"touchstart"===o?{startX:r.pageX||r.touches[0].pageX,endX:r.pageX||r.touches[0].pageX}:{startX:r.pageX||r.touches[0].pageX,endX:r.pageX||r.touches[0].pageX,mouseDown:!0,downScrollPosition:{x:window.pageXOffset,y:window.pageYOffset},positionSnapshot:e().positionX}));const a=function(r){let s=!0;if("touchstart"===o&&(s=!1,e().mouseDown&&(s=!0),!e().mouseDown)){let{pageX:t}=r;!t&&r.touches[0]&&(t=r.touches[0].pageX),t||(t=e().startX),Math.abs(t-e().startX)<=3&&(s=!0)}if(!s)return;r.stopPropagation(),n(l(l({},e()),{},{mouseDown:!1})),document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",a),document.removeEventListener("touchmove",u),document.removeEventListener("touchend",a),document.removeEventListener("scroll",d),v(r.target)&&v(r.target).removeEventListener("scroll",d);let c=e(),f=100*c.positionX/p(i.firstElementChild,t.options.nullifyTransformEl).width;n(l(l({},e()),{},{positionTarget:p(i.firstElementChild,t.options.nullifyTransformEl).width*(Math.abs(c.endX-c.startX)>50?c.endX-c.startX<0?100*Math.floor(f/100):100*Math.ceil(f/100):100*Math.round(f/100))/100}))},u=function(i){let{pageX:r}=i;if(r||(r=i.touches[0].pageX),s)return void a(i);if("touchstart"===o&&!e().mouseDown)return void(Math.abs(r-e().startX)>3&&(t.options.onDragStart(i),n(l(l({},e()),{},{startX:i.pageX||i.touches[0].pageX,endX:i.pageX||i.touches[0].pageX,mouseDown:!0,positionSnapshot:e().positionX})),s=!1,document.removeEventListener("scroll",d),v(i.target)&&v(i.target).removeEventListener("scroll",d)));i.preventDefault();let u=e();n(l(l({},u),{},{endX:r}))},d=function(t){s=!0};document.addEventListener(h()?"touchmove":"mousemove",u,{passive:!1}),document.addEventListener(h()?"touchend":"mouseup",a,{passive:!1}),document.addEventListener("scroll",d),v(r.target)&&v(r.target).addEventListener("scroll",d)};i.addEventListener(h()?"touchstart":"mousedown",r,{passive:!1}),t.options.initialDragEvent&&!t.options.initialDragEvent.target.closest(".flexy-pills > * > *")&&requestAnimationFrame((function(){r(t.options.initialDragEvent)}))}(this,(function(){return e.state}),(function(t){return e.state=t})),[...this.sliderContainer.children].map((function(t){return t.addEventListener("click",(function(t){Math.abs(e.state.startX-e.state.endX)>3&&t.preventDefault()}))}));let r=1,o=1,s=getComputedStyle(this.options.flexyAttributeEl);s.getPropertyValue("--current-item")&&(o=parseInt(s.getPropertyValue("--current-item")),r=this.sliderContainer.children.length),this.state=l(l({},this.state),{},{elementsOnBehind:r,positionX:f(p(this.sliderContainer.firstElementChild,this.options.nullifyTransformEl),this)*o*-1,positionTarget:f(p(this.sliderContainer.firstElementChild,this.options.nullifyTransformEl),this)*o*-1,containerInnerWidth:f(p(this.sliderContainer,this.nullifyTransformEl),this),slideWidth:f(p(this.sliderContainer.firstElementChild,this.options.nullifyTransformEl),this)}),this.refreshActivation(),requestAnimationFrame((function(){return e.drawLoop(!0)}))}destroy(){this.state=l(l({},this.state),{},{sliderActivated:C})}scheduleSliderRecalculation(){this.state=l(l({},this.state),{},{recalculationScheduled:!0})}refreshActivation(){let t=f(p(this.sliderContainer.children[0],this.options.nullifyTransformEl)||{width:0,height:0},this)*this.sliderContainer.children.length,e=!1;this.sliderContainer&&(e=-1===getComputedStyle(this.sliderContainer,":after").content.indexOf("no-flexy")&&t>f(p("vertical"===this.options.orientation?this.sliderContainer.parentNode:this.sliderContainer,this.options.nullifyTransformEl),this)+10),this.state=l(l({},this.state),{},{sliderActivated:e}),this.state.sliderActivated?this.options.flexyAttributeEl.dataset.flexy="":(this.options.flexyAttributeEl.removeAttribute("data-flexy"),[...this.sliderContainer.children].map((function(t){return t.removeAttribute("style")})))}render(){var t=this;[...this.sliderContainer.children].map((function(e){"vertical"===t.options.orientation?e.style.transform=`translate3d(0, ${t.state.positionX}px, 0)`:e.style.transform=`translate3d(${t.state.positionX}px, 0, 0)`})),this.state.mouseDown?this.options.flexyAttributeEl.dataset.flexyDragging="":this.options.flexyAttributeEl.removeAttribute("data-flexy-dragging"),this.state.elementsOnBehind>0?([...this.sliderContainer.children].slice(0,-1*this.state.elementsOnBehind).map((function(t){return t.style.order=2})),[...this.sliderContainer.children].slice(-1*this.state.elementsOnBehind).map((function(t){return t.style.order=1}))):[...this.sliderContainer.children].map((function(t){return t.style.order=1}))}}var b=n(1601),w=n.n(b),x=n(6130);function T(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function X(t){for(var e=1;e-1&&parseInt(t.dataset.autoplay,10))&&t.dataset.autoplay},t.querySelector(".flexy-pills")?{pillsContainerSelector:t.querySelector(".flexy-pills").firstElementChild}:{}),{},{leftArrow:i,rightArrow:r,scaleRotateEffect:!1,onDragStart:function(t){t.target.closest(".flexy-items")&&Array.from(t.target.closest(".flexy-items").querySelectorAll(".zoomImg")).map((function(t){o()(t).stop().fadeTo(120,0)}))},wrapAroundMode:"viewport"===t.dataset.wrap?"viewport":"container"},n?{pillsFlexyInstance:n}:{}),{},{onSlideChange:function(t,e){w().trigger("blocksy:frontend:flexy:slide-change",{instance:t,payload:e})}}));if(n){const t=new E(n,X({elementsThatDoNotStartDrag:[".twentytwenty-handle"],wrapAroundMode:"viewport"===n.dataset.wrap?"viewport":"container",leftArrow:n.parentNode.querySelector(".flexy-arrow-prev"),rightArrow:n.parentNode.querySelector(".flexy-arrow-next"),hasDragAndDrop:!1},n.closest(".thumbs-left")&&"mobile"!==(0,x.C)({withTablet:!0})?{orientation:"vertical"}:{}));n.flexy=t}t.flexy=l};w().on("ct:flexy:update-height",(function(){[...document.querySelectorAll(".flexy-container")].map((function(t){t.flexy&&(0,i.adjustContainerHeightFor)(t.flexy)}))}))}}]);