window.isMobile=!1;if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){window.isMobile=!0}
window.isIE=!!document.documentMode;function t_throttle(fn,threshhold,scope){var last;var deferTimer;threshhold||(threshhold=250);return function(){var context=scope||this;var now=+new Date();var args=arguments;if(last&&now<last+threshhold){clearTimeout(deferTimer);deferTimer=setTimeout(function(){last=now;fn.apply(context,args)},threshhold)}else{last=now;fn.apply(context,args)}}}
function t774_init(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t774');if(!container)return;t774_unifyHeights(recId);window.addEventListener('resize',t_throttle(function(){t774_unifyHeights(recId)},200));container.addEventListener('displayChanged',function(){t774_unifyHeights(recId)});window.addEventListener('load',function(){t774_unifyHeights(recId)});setTimeout(function(){t774__updateLazyLoad(recId)},500);t_onFuncLoad('t_card__moveClickOnCard',function(){t_card__moveClickOnCard(recId)});t_onFuncLoad('t_card__addFocusOnTab',function(){t_card__addFocusOnTab(recId)})}
function t774__updateLazyLoad(recId){var allRecords=document.getElementById('allrecords');var container=document.querySelector('#rec'+recId+' .t774__container_mobile-flex');if(!allRecords)return;var mode=allRecords.getAttribute('data-tilda-mode');if(container&&mode!=='edit'&&mode!=='preview'&&window.lazy==='y'){container.addEventListener('scroll',t_throttle(function(){if(window.lazy==='y'||(allRecords&&allRecords.getAttribute('data-tilda-lazy')==='yes')){t_onFuncLoad('t_lazyload_update',function(){t_lazyload_update()})}},500))}}
function t774_unifyHeights(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t774__container');if(!container)return;var attrPerRow=container.getAttribute('data-blocks-per-row');var contentsList=rec.querySelectorAll('.t774__content');var isInOneRowMobile=container.classList.contains('t774__container_mobile-flex');var contents=Array.prototype.slice.call(contentsList);if(window.innerWidth<=480&&!isInOneRowMobile){for(var i=0;i<contents.length;i++){contents[i].style.height='auto'}
return}
var countRow=+attrPerRow;if(window.innerWidth<=960&&isInOneRowMobile){countRow=contents.length}else if(window.innerWidth<=960){countRow=2}
for(var i=0;i<contents.length;i+=countRow){var maxHeight=0;var cols=contents.slice(i,i+countRow);for(var j=0;j<cols.length;j++){var col=cols[j];var textWrap=col.querySelector('.t774__textwrapper');var btns=col.querySelectorAll('.t-card__btn-wrapper, .t-card__btntext-wrapper');var colHeight=textWrap.offsetHeight+(btns[0]?btns[0].offsetHeight:0);if(colHeight>maxHeight)maxHeight=colHeight}
for(var j=0;j<cols.length;j++){cols[j].style.height=maxHeight+'px'}}}
function t1003_init(recId,angle){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t1003');if(!container)return;t1003_calc(rec,recId,angle);window.addEventListener('resize',t_throttle(function(){t1003_calc(rec,recId,angle)},300));window.addEventListener('load',function(){t1003_calc(rec,recId,angle)});container.addEventListener('displayChanged',function(){t1003_calc(rec,recId,angle);var content=container.querySelector('.t1003__content');var contentAnimName=content?window.getComputedStyle(content).animationName:'';if(!contentAnimName)return;content.style.animationName='';setTimeout(function(){content.style.animationName=contentAnimName})})}
function t1003_calc(rec,recId,angle){var wrapper=rec.querySelector('.t1003__wrapper');var contentWrapper=rec.querySelector('.t1003__content-wrapper');var content=rec.querySelector('.t1003__content');var items=content.querySelectorAll('.t1003__item');var img=items[0].querySelector('.t1003__bgimg');var index=0;if(img){for(var i=0;i<items.length;i++){if(items[i].querySelector('.t1003__bgimg').classList.contains('loaded')){index=i;break}}}
var itemWidth=items[index].offsetWidth;var windowWidth=window.innerWidth;var itemsToDisplay=parseInt(windowWidth/itemWidth)+3;var direction='';if(angle)t1003_calcRotatedWidth(rec,angle);if(wrapper.getAttribute('data-marquee-direction')==='opposite')direction='right';for(var i=1;i<items.length;i++){t1003__remove(items[i])}
for(var i=0;i<itemsToDisplay;i++){if(direction==='right'){content.insertBefore(items[index].cloneNode(!0),items[0])}else{content.insertBefore(items[index].cloneNode(!0),items[0].nextSibling)}}
t1003_anim(rec,itemWidth,recId,direction);content.style.animationName='t1003__anim-scrolling_'+recId;contentWrapper.style.opacity='1'}
function t1003_calcRotatedWidth(rec,angle){var outer=rec.querySelector('.t1003__outer');var wrapper=rec.querySelector('.t1003__wrapper');var wrapperOpacity=wrapper.style.opacity;wrapper.removeAttribute('style');angle=parseFloat(angle.replace('deg',''),10);var windowWidth=window.innerWidth;var angleRad=(angle*Math.PI)/180;var sin=Math.sin(angleRad);var paddingCoeff=Math.abs(Math.tan(angleRad)/2);var padding=windowWidth*paddingCoeff;var rotatedHeight=Math.abs(sin*windowWidth);wrapper.style.width='calc(100vw + '+padding+'px)';wrapper.style.padding='0 '+padding+'px';if(wrapperOpacity)wrapper.style.opacity=wrapperOpacity;var wrapperStyle=getComputedStyle(wrapper,null);var wrapperPaddingTop=parseInt(wrapperStyle.paddingTop)||0;var wrapperPaddingBottom=parseInt(wrapperStyle.paddingBottom)||0;var wrapperPaddingLeft=parseInt(wrapperStyle.paddingLeft)||0;var wrapperPaddingRight=parseInt(wrapperStyle.paddingRight)||0;var wrapperWidth=wrapper.clientWidth-(wrapperPaddingLeft+wrapperPaddingRight);var wrapperHeight=wrapper.clientHeight-(wrapperPaddingTop+wrapperPaddingBottom);var operator=(sin<0)?'':'-';outer.style.height=(rotatedHeight+wrapperHeight)+'px';if(window.isIE){wrapper.style.width='';wrapper.style.marginLeft='-'+wrapperWidth/2+'px';wrapper.style.marginTop=operator+wrapperHeight/2+'px'}}
function t1003_anim(rec,itemWidth,id,direction){var animationName='t1003__anim-scrolling_'+id;var speedAttr=rec.querySelector('.t1003__wrapper').getAttribute('data-marquee-speed');var start;var end;var speed;var seconds;var styleAnimation=rec.querySelector('#'+animationName);if(styleAnimation)t1003__remove(styleAnimation);if(!speedAttr)return;seconds=parseFloat(speedAttr.replace('s',''));speed=(itemWidth/100)*seconds;rec.querySelector('.t1003__content').style.animationDuration=speed+'s';if(direction==='right'){start=itemWidth*-1;end=0}else{start=0;end=itemWidth*-1}
var style=document.createElement('style');style.id=animationName;style.innerHTML='@keyframes '+animationName+'{'+'0% {'+'transform: translateX('+start+'px);'+'-webkit-transform: translateX('+start+'px);'+'}'+'100% {'+'transform: translateX('+end+'px);'+'-webkit-transform: translateX('+end+'px);'+'}'+'}';rec.appendChild(style)}
function t1003__remove(el){if(el&&el.parentNode){el.parentNode.removeChild(el)}}