"use strict";(globalThis.blocksyJsonP=globalThis.blocksyJsonP||[]).push([[71],{3071:function(t,e,n){n.d(e,{r:function(){return w}});var i=n(3986),o=n(4705);const r=["style"];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 a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach(function(e){(0,o.A)(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function l(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const u=function(){return"rtl"===document.querySelector("html").dir},d=function(t){let e=arguments.length>1&&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:o,width:r,height:s}=t.getBoundingClientRect(),a=window.getComputedStyle(e).transform.split(/\(|,|\)/).slice(1,-1).map(function(t){return parseFloat(t)});if(6!=a.length)return t.getBoundingClientRect();var l=a;let u=l[0]*l[3]-l[1]*l[2];return{width:r/l[0],height:s/l[3],left:(i*l[3]-n*l[2]+l[2]*l[5]-l[4]*l[3])/u,right:(o*l[3]-n*l[2]+l[2]*l[5]-l[4]*l[3])/u,top:(-i*l[1]+n*l[0]+l[4]*l[1]-l[0]*l[5])/u}},c=function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0},h=function(t){return t?t&&"[object Function]"==={}.toString.call(t)?t():t:null},p=function(t){if(!t.options.pillsContainerSelector)return;const e=t.options.pillsContainerSelector.querySelector(".active");e&&e.classList.remove("active"),t.options.pillsContainerSelector.children[t.state.previousCurrentIndex].classList.add("active"),t.options.pillsFlexyInstance&&function(t){const e=t.options.pillsFlexyInstance.flexy,n=h(e.sliderContainer);if(!n||!n.firstElementChild)return;const i=t.state.previousCurrentIndex,o=e.state.slideWidth,r=e.state.containerInnerWidth,s=e.state.positionX,l="vertical"===(e.options.orientation||"horizontal");if(o<=0||r<=0)return;if(Math.round(r/o)<=0)return;const c=n.children.length,p=d(n,h(e.options.nullifyTransformEl)),f=[...n.children].map(function(t){return d(t,h(e.options.nullifyTransformEl))}),m=[];for(let t=0;t<c;t++){const e=f[t];(l?e.bottom>p.top+5&&e.top<p.bottom-5:e.right>p.left+5&&e.left<p.right-5)&&m.push(t)}if(0===m.length)return;const g=m.map(function(t){return{i:t,pos:l?f[t].top:f[t].left}}).sort(function(t,e){return t.pos-e.pos}),v=g.findIndex(function(t){return t.i===i});if(-1===v){const t=g[0].i,n=g[g.length-1].i;let r;r=(i-n+c)%c<=(t-i+c)%c?1:-1;const d=o*r*(l?-1:u()?1:-1),h=Math.round(s/o)*o+d;return void(e.state=a(a({},e.state),{},{positionTarget:h}))}if(v===g.length-1){const t=o*(l?-1:u()?1:-1),n=Math.round(s/o)*o+t;return void(e.state=a(a({},e.state),{},{positionTarget:n}))}if(0===v){const t=-o*(l?-1:u()?1:-1),n=Math.round(s/o)*o+t;e.state=a(a({},e.state),{},{positionTarget:n})}}(t)};class f{constructor(t,e){var n=this;l(this,"options",{mountListeners:!0}),l(this,"flexyInstance",null),l(this,"navigate",function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"right";const e=n.flexyInstance,i="left"===t?1:-1,o=e.state.slideWidth;let r=100*Math.round(100*e.state.positionX/o/100)*o/100+o*i;e.state=a(a({},e.state),{},{positionTarget:r})}),this.flexyInstance=t,this.options=a(a({},this.options),e),this.options.mountListeners&&this.mountArrowsListeners()}mountArrowsListeners(){var t=this;if(!this.options.mountListeners)return;const e=this.flexyInstance.options.leftArrow,n=this.flexyInstance.options.rightArrow;e&&e.addEventListener("click",function(e){e.preventDefault(),t.navigate("left")}),n&&n.addEventListener("click",function(e){e.preventDefault(),t.navigate("right")})}}const m=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e=a({rootEl:null},e),e.rootEl&&t.el!==e.rootEl&&t.elComputed.minHeight&&parseFloat(t.elComputed.minHeight)===t.height)return 0;const n=t.childrenHeight.reduce(function(e,n,i){let o=parseFloat(t.childrenComputed[i].marginTop);return"auto"===t.childrenComputed[i].getPropertyValue("--card-element-margin-start")&&(o=0),e+n+o+parseFloat(t.childrenComputed[i].marginBottom)},0)+parseFloat(t.elComputed.paddingTop)+parseFloat(t.elComputed.paddingBottom);return t.totalChildrenHeight>=t.height?0:t.height-n},g=function(t){return t.childrenHeight.every(function(e,n){return e>=t.height}),0},v=function(t){const e=h(t.sliderContainer);h(t.options.flexyAttributeEl);const n=Math.round(t.state.containerInnerWidth/t.state.slideWidth);let i=[...e.children],o=i.slice(t.state.previousCurrentIndex,t.state.previousCurrentIndex+n);o.length<n&&i.length>n&&(o=[...o,...i.slice(0,n-o.length)]);const r=o.map(function(t,e){const n=t.getBoundingClientRect().height,i=function(t){const e=t;if(!t)return 0;const n=[t,...t.querySelectorAll("*")].map(function(t){let e=[...t.children].map(function(t){const e=t.getBoundingClientRect();return{el:t,elComputed:window.getComputedStyle(t),rect:e,height:e.height}});const n=e.filter(function(t){return"absolute"===t.elComputed.position});e=e.filter(function(t){return"absolute"!==t.elComputed.position&&0!==t.rect.height});let i="row";if(e.length>1){const t=e[0];e[1].rect.left>=t.rect.right&&(i="column")}const o=window.getComputedStyle(t),r=parseFloat(o.borderTopWidth)+parseFloat(o.borderBottomWidth);return{el:t,elComputed:o,height:t.getBoundingClientRect().height-r,orientation:i,absoluteChildrenComputed:n.map(function(t){let{elComputed:e}=t;return e}),absoluteChildrenHeight:n.map(function(t){let{height:e}=t;return e}),childrenComputed:e.map(function(t){let{elComputed:e}=t;return e}),childrenHeight:e.map(function(t){let{height:e}=t;return e})}}),i=n.filter(function(t){return 0!==t.childrenComputed.length&&(!n.find(function(e){return"column"===e.orientation&&e.el.contains(t.el)&&e.el!==t.el})&&(!t.absoluteChildrenHeight.find(function(e){return Math.round(e)===Math.round(t.height)})&&("absolute"!==t.elComputed.position&&!t.childrenComputed.some(function(t){return"inline"===t.display&&"absolute"!==t.position}))))}).map(function(t){return a(a({},t),{},{voidSpace:Math.round("row"===t.orientation?m(t,{rootEl:e}):g(t))})}).filter(function(t){return t.voidSpace>0});return 1===i.length?i.reduce(function(t,e){return t+e.voidSpace},0):0}(t);return n-i}),s=Math.round(Math.max(...r)),l=Math.round(parseFloat(e.parentNode.style.getPropertyValue("--flexy-view-height")));l&&s!==l&&e.parentNode.style.setProperty("--flexy-view-height",s+"px")},y=function(t,e){return"vertical"===e.options.orientation?t.height:t.width},C=function(t,e){let n="pageX";"vertical"===e.options.orientation&&(n="pageY");let i=t[n];return!i&&t.touches&&t.touches[0]&&(i=t.touches[0][n]),i};function b(t){return null==t||t.matches("html")?null:t.scrollHeight>t.clientHeight?t:b(t.parentNode)}class E{constructor(t){var e=this;l(this,"options",{mountDragAndDropEventListener:!0}),l(this,"flexyInstance",null),l(this,"getState",function(){}),l(this,"setState",function(){}),l(this,"handleDown",function(t){if(!e.getState().sliderActivated)return;const n=h(e.flexyInstance.sliderContainer);if(e.flexyInstance.options.elementsThatDoNotStartDrag.reduce(function(e,n){return!!e||(t.target.matches(n)||t.target.closest(n))},!1))return;const i=t.type;e.options.mountDragAndDropEventListener&&(t.stopPropagation(),"touchstart"!==t.type&&t.preventDefault());let o=!1;"touchstart"===i?e.setState(a(a({},e.getState()),{},{startX:C(t,e.flexyInstance),endX:C(t,e.flexyInstance)})):e.setState(a(a({},e.getState()),{},{startX:C(t,e.flexyInstance),endX:C(t,e.flexyInstance),mouseDown:!0,positionSnapshot:e.getState().positionX}));const r=function(t){let o=!0;if("touchstart"===i&&(o=!1,e.getState().mouseDown&&(o=!0),!e.getState().mouseDown)){let n=C(t,e.flexyInstance);n||(n=e.getState().startX),Math.abs(n-e.getState().startX)<=3&&(o=!0)}if(!o)return;t.stopPropagation(),e.setState(a(a({},e.getState()),{},{mouseDown:!1})),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",r),document.removeEventListener("touchmove",s),document.removeEventListener("touchend",r),document.removeEventListener("scroll",l),b(t.target)&&b(t.target).removeEventListener("scroll",l);let u=e.getState();const c=y(d(n.firstElementChild,h(e.flexyInstance.options.nullifyTransformEl)),e.flexyInstance);let p=100*u.positionX/c;e.setState(a(a({},e.getState()),{},{positionTarget:c*(Math.abs(u.endX-u.startX)>50?u.endX-u.startX<0?100*Math.floor(p/100):100*Math.ceil(p/100):100*Math.round(p/100))/100}))},s=function(t){let n=C(t,e.flexyInstance);if(o)return void r(t);if("touchstart"===i&&!e.getState().mouseDown)return void(Math.abs(n-e.getState().startX)>3&&(e.flexyInstance.options.onDragStart(t),e.setState(a(a({},e.getState()),{},{startX:C(t,e.flexyInstance),endX:C(t,e.flexyInstance),mouseDown:!0,positionSnapshot:e.getState().positionX})),o=!1,document.removeEventListener("scroll",l),b(t.target)&&b(t.target).removeEventListener("scroll",l)));t.preventDefault();let s=e.getState();e.setState(a(a({},s),{},{endX:n}))},l=function(t){o=!0};document.addEventListener(c()?"touchmove":"mousemove",s,{passive:!1}),document.addEventListener(c()?"touchend":"mouseup",r,{passive:!1}),document.addEventListener("scroll",l),b(t.target)&&b(t.target).addEventListener("scroll",l)}),this.options=a(a({},this.options),t)}handleDragFor(t,e,n){var i=this;if(!t.options.hasDragAndDrop)return;this.flexyInstance=t,this.getState=e,this.setState=n;const o=h(t.sliderContainer);this.options.mountDragAndDropEventListener&&o.addEventListener(c()?"touchstart":"mousedown",this.handleDown,{passive:!1}),t.options.initialDragEvent&&requestAnimationFrame(function(){i.handleDown(t.options.initialDragEvent)})}}const x="__DESTROYED__";class w{constructor(t){var e=this;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};l(this,"getDefaultState",function(){return{elementsOnBehind:1,positionSnapshot:0,positionX:0,positionTarget:0,velocity:0,containerInnerWidth:e.sliderContainer?y(d(h(e.sliderContainer),h(e.nullifyTransformEl)),e):0,slideWidth:e.sliderContainer?y(d(e.sliderContainer.firstElementChild,e.sliderContainer),e):0,previousCurrentIndex:0,startX:0,endX:0,mouseDown:!1,recalculationScheduled:!1,lastTimeAnimated:1/0}}),l(this,"state",this.getDefaultState()),l(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,onRender:function(){},dragAndDropOptions:{},arrowsOptions:{}}),l(this,"sliderContainer",null),l(this,"dragAndDrop",null),l(this,"sliderArrows",null),l(this,"drawLoop",function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e.state.sliderActivated===x)return;if(!h(e.sliderContainer))return void requestAnimationFrame(function(){return e.drawLoop()});const n=y(d(h(e.sliderContainer).firstElementChild,h(e.options.nullifyTransformEl)),e);if(!n||n<=0)return void requestAnimationFrame(function(){return e.drawLoop()});let i=t?1/0:e.state.positionX;(e.state.containerInnerWidth!==d(h(e.sliderContainer),h(e.nullifyTransformEl)).width||e.state.recalculationScheduled)&&e.refreshActivation();let o=e.state,r={};if(e.state.sliderActivated){let t=o.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-y(d(h(e.sliderContainer),h(e.nullifyTransformEl)),e))>1||e.state.recalculationScheduled)&&(r.positionX=Math.round(y(d(h(e.sliderContainer).firstElementChild,h(e.options.nullifyTransformEl)),e)*(100*Math.round(e.state.positionX/e.state.slideWidth))/100),r.positionTarget=Math.round(y(d(h(e.sliderContainer).firstElementChild,h(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=y(d(h(e.sliderContainer),h(e.nullifyTransformEl)),e),r.slideWidth=n,e.state=a(a({},e.state),r),(i!==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 o=h(t.sliderContainer),r=h(t.options.nullifyTransformEl);"horizontal"===t.options.orientation&&u()&&(n="left"===n?"right":"left");const s=[...o.children].map(function(t){return d(t,r)});let a=null,l=null;if("horizontal"===t.options.orientation){const t=Math.min(...s.map(function(t){return t.left})),e=Math.max(...s.map(function(t){return t.right})),n=s.find(function(e){let{left:n}=e;return n===t}),i=s.find(function(t){let{right:n}=t;return n===e});a=u()?i:n,l=u()?n:i}if("vertical"===t.options.orientation){const t=Math.min(...s.map(function(t){return t.top})),e=Math.max(...s.map(function(t){return t.bottom}));a=s.find(function(e){let{top:n}=e;return n===t}),l=s.find(function(t){let{bottom:n}=t;return n===e})}const c=d(o,r);let p=0;if("left"===n){let n=!1;"horizontal"===t.options.orientation&&(n=a.left>0,u()&&(n=a.right<window.innerWidth),"container"===i&&(n=a.left>c.left,u()&&(n=a.right<c.right))),"vertical"===t.options.orientation&&(n=a.top>0,"container"===i&&(n=a.top>c.top)),n&&(p=-1*t.state.slideWidth,"horizontal"===t.options.orientation&&u()&&(p*=-1),e=e===o.children.length?1:e+1)}if("right"===n){let n=!1;"horizontal"===t.options.orientation&&(n=l.right<window.innerWidth,u()&&(n=l.left>0),"container"===i&&(n=l.right<c.right,u()&&(n=l.left>c.left))),"vertical"===t.options.orientation&&(n=l.bottom<window.innerHeight,"container"===i&&(n=l.bottom<c.bottom)),n&&(p=t.state.slideWidth,"horizontal"===t.options.orientation&&u()&&(p*=-1),e=1===e?o.children.length:e-1)}return{relativeDelta:p,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=a(a({},e.state),{},{elementsOnBehind:n,positionTarget:e.state.positionTarget+t,positionX:e.state.positionX+t,positionSnapshot:e.state.positionSnapshot+t})}let s=e.state.previousCurrentIndex;var l,c,f;if(!e.state.mouseDown&&e.state.sliderActivated&&(Math.abs(e.state.positionX-e.state.positionTarget)<.2&&(e.state=a(a({},e.state),{},{positionX:e.state.positionTarget,velocity:0})),e.state=a(a({},e.state),{},{previousCurrentIndex:(l=e.state.elementsOnBehind>Math.round(Math.abs(e.state.positionTarget)/y(d(h(e.sliderContainer).firstElementChild,h(e.options.nullifyTransformEl)),e))?Math.round(Math.abs(e.state.positionTarget)/y(d(h(e.sliderContainer).firstElementChild,h(e.options.nullifyTransformEl)),e))+(h(e.sliderContainer).children.length-e.state.elementsOnBehind):Math.abs(Math.round(Math.abs(e.state.positionTarget)/y(d(h(e.sliderContainer).firstElementChild,h(e.options.nullifyTransformEl)),e))-e.state.elementsOnBehind),c=0,f=h(e.sliderContainer).children.length-1,Math.min(Math.max(l,c),f))})),e.state.positionX!==i&&e.state.sliderActivated&&(e.state.positionX===e.state.positionTarget||h(e.options.flexyAttributeEl).hasAttribute("data-flexy-moving")||(!function(t){const e=h(t.sliderContainer),n=e.parentNode.getBoundingClientRect().height;e.parentNode.style.setProperty("--flexy-view-height",n+"px")}(e),h(e.options.flexyAttributeEl).dataset.flexyMoving=""),e.render(),o.positionX!==o.positionTarget&&e.state.positionX===e.state.positionTarget&&(h(e.options.flexyAttributeEl).removeAttribute("data-flexy-moving"),h(e.sliderContainer).parentNode.removeAttribute("style")),e.state=a(a({},e.state),{},{lastTimeAnimated:(new Date).getTime()})),!e.state.mouseDown&&e.state.sliderActivated&&s!==e.state.previousCurrentIndex&&(p(e),e.options.onSlideChange(e,{currentIndex:e.state.previousCurrentIndex,previousIndex:s}),v(e)),e.options.autoplay&&e.state.sliderActivated){const t=parseFloat(e.options.autoplay,10)||3;if(Math.abs(e.state.positionX-e.state.positionTarget)<.5){((new Date).getTime()-e.state.lastTimeAnimated)/1e3>t&&(e.state=a(a({},e.state),{},{positionTarget:e.state.positionX-y(d(h(e.sliderContainer).firstElementChild,h(e.options.nullifyTransformEl)),e)}))}}requestAnimationFrame(function(){return e.drawLoop()})}),this.options=a(a({},this.options),{},{flexyAttributeEl:t,nullifyTransformEl:t},n),this.sliderContainer=t,this.sliderArrows=new f(this,this.options.arrowsOptions),function(t){if(!t.options.pillsContainerSelector)return;let e=[...t.options.pillsContainerSelector.children];const n=h(t.sliderContainer),i=h(t.options.nullifyTransformEl),o=function(o){[...n.children].map(function(t){return d(t,i)});let r=t.state.previousCurrentIndex,s=e.indexOf(o);t.options.pillsContainerSelector.querySelector(".active")&&t.options.pillsContainerSelector.querySelector(".active").classList.remove("active"),o.classList.add("active");const l=Math.abs(s-r),c=Math.min(r,s)+(e.length-Math.max(r,s)),h=Math.min(l,c);let p=r>s?-1:1;c>=l&&(p=r>s?1:-1),u()&&(p*=-1);let f=100*Math.round(100*t.state.positionX/t.state.slideWidth/100)*t.state.slideWidth/100+t.state.slideWidth*(h*p);t.state=a(a({},t.state),{},{positionTarget:f})};t.options.initialDragEvent&&t.options.initialDragEvent.target.closest(".flexy-pills > * > *")&&setTimeout(function(){o(t.options.initialDragEvent.target.closest(".flexy-pills > * > *"))}),e.map(function(t){return t.addEventListener("click",function(e){setTimeout(function(){e.defaultPrevented||o(t),e.preventDefault()})})})}(this),function(t){const e=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(n=t)&&"[object Function]"==={}.toString.call(n)?t(e):t;var n}(t.sliderContainer);if(!t.options.autoplay)return;const n=function(){t.state.sliderActivated&&(t.options=a(a({},t.options),{},{autoplay:!1,_autoplay:t.options.autoplay}))},i=function(){t.state.sliderActivated&&(t.options=a(a({},t.options),{},{autoplay:t.options._autoplay,_autoplay:!1}),t.state=a(a({},t.state),{},{lastTimeAnimated:(new Date).getTime()}))};e.addEventListener("mouseenter",n),e.addEventListener("mouseleave",i),new IntersectionObserver(function(e){e.map(function(e){let{target:o,isIntersecting:r,intersectionRatio:s}=e;if(r){if(!Object.keys(t.options).includes("_autoplay"))return;i()}r||n()})},{}).observe(e)}(this),this.dragAndDrop=new E(this.options.dragAndDropOptions),this.dragAndDrop.handleDragFor(this,function(){return e.state},function(t){return e.state=t}),[...h(this.sliderContainer).children].map(function(t){return t.addEventListener("click",function(t){Math.abs(e.state.startX-e.state.endX)>3&&t.preventDefault()})});let i=1,o=1,r=getComputedStyle(h(this.options.flexyAttributeEl));r.getPropertyValue("--current-item")&&(o=parseInt(r.getPropertyValue("--current-item")),i=h(this.sliderContainer).children.length);const s=u()?1:-1,c=y(d(h(this.sliderContainer).firstElementChild,h(this.options.nullifyTransformEl)),this);this.state=a(a({},this.state),{},{elementsOnBehind:i,slideWidth:c,positionX:c*o*s,positionTarget:c*o*s,containerInnerWidth:y(d(h(this.sliderContainer),h(this.nullifyTransformEl)),this)}),this.refreshActivation(),requestAnimationFrame(function(){return e.drawLoop(!0)})}destroy(){this.state=a(a({},this.state),{},{sliderActivated:x})}scheduleSliderRecalculation(){this.state=a(a({},this.state),{},{recalculationScheduled:!0})}refreshActivation(){var t=this;if(!h(this.sliderContainer))return;const e=this.state.sliderActivated===x;let n=y(d(h(this.sliderContainer).children[0],h(this.options.nullifyTransformEl))||{width:0,height:0},this)*h(this.sliderContainer).children.length,i=!1;h(this.sliderContainer)&&(i=-1===getComputedStyle(h(this.sliderContainer),":after").content.indexOf("no-flexy")&&n>y(d("vertical"===this.options.orientation?h(this.sliderContainer).parentNode:h(this.sliderContainer),h(this.options.nullifyTransformEl)),this)+10),this.state=a(a({},this.state),{},{sliderActivated:i}),this.retrieveSliderAttributes(),(!e&&!this.state.sliderActivated||this.state.recalculationScheduled)&&this.render(function(){const e=h(t.options.flexyAttributeEl);e&&(t.state.sliderActivated?e.dataset.flexy="":(e.removeAttribute("data-flexy"),[...h(t.sliderContainer).children].map(function(t){return t.removeAttribute("style")})))}),e&&this.drawLoop()}retrieveSliderAttributes(){var t=this;const e=h(this.sliderContainer),n=[...e.children].map(function(t,e){return{el:t,index:e,attr:{}}});let o=n;if(this.state.elementsOnBehind>0){const t=n.slice(-1*this.state.elementsOnBehind),e=n.slice(0,-1*this.state.elementsOnBehind);o=[...t.map(function(t){return a(a({},t),{},{attr:{style:{order:1}}})}),...e.map(function(t){return a(a({},t),{},{attr:{style:{order:2}}})})]}else o=o.map(function(t){return a(a({},t),{},{attr:{style:{order:2}}})});o=o.map(function(n,i){let o=i*t.state.slideWidth,r=o+t.state.slideWidth,s=!1;const l={left:Math.abs(t.state.positionX),right:Math.abs(t.state.positionX)+t.state.containerInnerWidth};if("viewport"===t.options.wrapAroundMode){const n=d(e,h(t.options.nullifyTransformEl));l.left=l.left-n.left,l.right=l.right+(window.innerWidth-n.right)}o-l.left>3&&l.right-o>3&&(s=!0),r-l.left>3&&l.right-r>3&&(s=!0),Math.abs(o-l.left)<3&&Math.abs(r-l.right)<3&&(s=!0);let u=`translate3d(${t.state.positionX}px, 0, 0)`;return"vertical"===t.options.orientation&&(u=`translate3d(0, ${t.state.positionX}px, 0)`),a(a({},n),{},{fits:s,attr:a(a({},n.attr),{},{className:s?"flexy-item-is-visible":"",style:a(a({},n.attr.style),{},{transform:u})})})});let s={};return this.state.mouseDown&&(s["data-flexy-dragging"]=""),this.state.sliderActivated&&(s["data-flexy"]=""),this.state.sliderActivated||(o=o.map(function(t){const e=t.attr,{style:n}=e,o=(0,i.A)(e,r);return a(a({},t),{},{attr:o})})),{elementsDescriptor:o.sort(function(t,e){return t.index-e.index}),flexyAttributeElAttr:s}}render(){var t=this;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};const n=this.retrieveSliderAttributes();this.options.onRender(this,n);const i=h(this.sliderContainer);n.elementsDescriptor.map(function(t){const e=i.children[t.index];e.classList.remove("flexy-item-is-visible"),t.fits&&e.classList.add("flexy-item-is-visible"),t.attr&&t.attr.style&&Object.keys(t.attr.style).map(function(n){e.style[n]=t.attr.style[n]})}),h(this.options.flexyAttributeEl).removeAttribute("data-flexy-dragging"),Object.keys(n.flexyAttributeElAttr).map(function(e){h(t.options.flexyAttributeEl).setAttribute(e,n.flexyAttributeElAttr[e])}),e()}}}}]);