window.isMobile=!1;if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){window.isMobile=!0}
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 t959__init(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t959');if(!container)return;t959__updateLazyLoad(recId);t959_unifyHeights(recId);window.addEventListener('resize',t_throttle(function(){t959_unifyHeights(recId)}));window.addEventListener('load',function(){t959_unifyHeights(recId)});container.addEventListener('displayChanged',t_throttle(function(){t959_unifyHeights(recId)}));t_onFuncLoad('t_card__moveClickOnCard',function(){t_card__moveClickOnCard(recId)});t_onFuncLoad('t_card__addFocusOnTab',function(){t_card__addFocusOnTab(recId)})}
function t959__updateLazyLoad(recId){var allRecords=document.getElementById('allrecords');var container=document.querySelector('#rec'+recId+' .t959__container_mobile-flex');var mode=allRecords.getAttribute('data-tilda-mode');if(container&&mode!=='edit'&&mode!=='preview'&&window.isMobile){if(window.lazy==='y'||allRecords.getAttribute('data-tilda-lazy')==='yes'){t_onFuncLoad('t_lazyload_update',function(){container.addEventListener('touchmove',t_throttle(function(){t_lazyload_update()}))})}}}
function t959_unifyHeights(recId){var rec=document.getElementById('rec'+recId);if(!rec)return;var main=rec.querySelector('.t959');if(!main)return;var containers=main.querySelectorAll('.t959__container');for(var i=0;i<containers.length;i++){var container=containers[i];var cardsContent=container.querySelectorAll('.t959__card-content');var cards=container.querySelectorAll('.t959__card-inner');if(!cards.length){return}
var cardStyle=getComputedStyle(cards[0],null);var cardPaddingLeft=parseInt(cardStyle.paddingLeft)||0;var cardPaddingRight=parseInt(cardStyle.paddingRight)||0;var cardWidth=cards[0].clientWidth-(cardPaddingLeft+cardPaddingRight);var maxHeight=0;var ratio=container.getAttribute('data-ratio');var minHeightFromRatio=0;switch(ratio){case '16_9':minHeightFromRatio=cardWidth*0.5625;break;case '4_3':minHeightFromRatio=cardWidth*0.75;break;case '3_2':minHeightFromRatio=cardWidth*0.6666;break;case '1_1':minHeightFromRatio=cardWidth;break;case '2_3':minHeightFromRatio=cardWidth*1.5;break;case '3_4':minHeightFromRatio=cardWidth*1.3333;break;case '9_16':minHeightFromRatio=cardWidth*1.7777;break}
for(var j=0;j<cardsContent.length;j++){var cardContent=cardsContent[j];var titleHeight=t959_outerHeight(cardContent.querySelector('.t-card__title'));var descHeight=t959_outerHeight(cardContent.querySelector('.t-card__descr'));var colHeight=titleHeight+descHeight;if(colHeight>maxHeight)maxHeight=colHeight}
if(maxHeight>minHeightFromRatio){for(var j=0;j<cards.length;j++){cards[j].style.paddingBottom=maxHeight+'px'}}else{for(var j=0;j<cards.length;j++){cards[j].style.paddingBottom=null}}}}
function t959_outerHeight(element){if(!element)return 0;var height=element.offsetHeight;var style=getComputedStyle(element);height+=parseInt(style.marginTop)+parseInt(style.marginBottom);return height}
function t823_onSuccess(form){t_onFuncLoad('t_forms__onSuccess',function(){t_forms__onSuccess(form)})}