function t975_init(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var tildaCopy=document.getElementById('tildacopy');var menu=rec.querySelector('.t975');t_onFuncLoad('t_menu__highlightActiveLinks',function(){t_menu__highlightActiveLinks('.t975__list-item a')});if(menu)menu.classList.remove('t975__beforeready');t975_checkAnchorLinks(recid,'.t975__list-item a');var isIphone=t975_detectIphone();var scrollHeight=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight);if(menu&&menu.getAttribute('data-hidemenuonscroll')||isIphone){t975_handleScroll(menu,tildaCopy)}
if(tildaCopy&&scrollHeight>document.documentElement.clientHeight){t975_addCopyrightMargin(menu,tildaCopy);t975_handleScroll(menu,tildaCopy)}
window.addEventListener('resize',function(){t975_changeCopyrightMargin(menu,tildaCopy)})}
function t975_addCopyrightMargin(menu,tildaCopy){if(!tildaCopy||!menu)return;var paddingElement=document.createElement('div');paddingElement.style.backgroundColor='#000';paddingElement.style.height=menu.offsetHeight+'px';paddingElement.classList.add('t-tildalabel-padding');document.body.appendChild(paddingElement)}
function t975_changeCopyrightMargin(menu,tildaCopy){var paddingElement=document.querySelector('.t-tildalabel-padding');if(!paddingElement||!tildaCopy||!menu)return;paddingElement.style.height=menu.offsetHeight+'px'}
function t975_detectIphone(){var isIphone=/iPhone/.test(navigator.userAgent)&&!window.MSStream;var aspect=window.screen.width/window.screen.height;var iphoneAspect='0.462';if(isIphone&&aspect.toFixed(3)===iphoneAspect){return!0}}
function t975_checkAnchorLinks(recid,selector){var rec=document.getElementById('rec'+recid);var anchorSelector=selector+'[href*="#"]:not(.tooltipstered)';var navLinks=rec?rec.querySelectorAll(anchorSelector):[];if(navLinks.length){t_onFuncLoad('t_menu__updateActiveLinks',function(){t_menu__updateActiveLinks(navLinks,selector)})}}
function t975_handleScroll(menu){var lastScrollTop=0;var delta=5;var timerID;var diff;window.addEventListener('scroll',function(){var scrollHeight=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight);var isClicked=menu?menu.getAttribute('data-clicked-link'):'';var currentScrollTop=window.pageYOffset;if(Math.abs(lastScrollTop-currentScrollTop)<=delta||window.pageYOffset<0||window.pageYOffset>scrollHeight-window.innerHeight){return}
if(menu&&menu.getAttribute('data-hidemenuonscroll')&&!isClicked){var menuHeight=menu.offsetHeight;var currentTransformValue=menu.style.transform;if(currentScrollTop>lastScrollTop&&window.pageYOffset<=scrollHeight-(window.innerHeight+menuHeight)){diff=0;if(currentTransformValue){diff=parseInt(currentTransformValue.replace('translateY(',''),10)}
clearInterval(timerID);timerID=setInterval(function(){menu.style.transform='translateY('+diff+'px)';diff+=menuHeight/50;if(diff>=menuHeight){menu.style.transform='translateY('+menuHeight+'px)';clearInterval(timerID)}})}else{diff=menuHeight;if(currentTransformValue){diff=parseInt(currentTransformValue.replace('translateY(',''),10)}
clearInterval(timerID);timerID=setInterval(function(){menu.style.transform='translateY('+diff+'px)';diff-=menuHeight/50;if(diff<=0){menu.style.transform='translateY(0px)';clearInterval(timerID)}})}}
lastScrollTop=currentScrollTop})}
function t635_init(recid,textColor,cursorColor){var rec=document.getElementById('rec'+recid);if(!rec)return;var textHolder=rec.querySelector('.t635__textholder');if(!textHolder)return;var typingRecIdList=textHolder.getAttribute('data-recid').split(',');if(typingRecIdList.length===0)return;t635_processCursorAndTextColor(rec,typingRecIdList,textColor,cursorColor);typingRecIdList.forEach(function(animRecId){var animBlock=document.getElementById('rec'+animRecId);if(!animBlock)return;var screenMin=parseInt(animBlock.getAttribute('data-screen-min'),10);var screenMax=parseInt(animBlock.getAttribute('data-screen-max'),10);if(isNaN(screenMax)&&isNaN(screenMin)){t635_startType(animRecId,textHolder)}else if(!isNaN(screenMax)&&!isNaN(screenMin)){if(window.innerWidth>=screenMin&&window.innerWidth<=screenMax){t635_startType(animRecId,textHolder)}}else if(!isNaN(screenMax)){if(window.innerWidth<=screenMax){t635_startType(animRecId,textHolder)}}else if(!isNaN(screenMin)){if(window.innerWidth>=screenMin){t635_startType(animRecId,textHolder)}}})}
function t635_processCursorAndTextColor(rec,typingRecIdList,textColor,cursorColor){if(!textColor&&!cursorColor)return;var style=document.createElement('style');var styleContent='';typingRecIdList.forEach(function(animRecId){var animBlock=document.getElementById('rec'+animRecId);if(!animBlock)return;if(textColor)styleContent+='#rec'+animRecId+' .t635__typing-text{color: '+textColor+';}';if(cursorColor)styleContent+='#rec'+animRecId+' .typed-cursor{color: '+cursorColor+';}'});if(!styleContent)return;style.textContent=styleContent;rec.appendChild(style)}
function t635_startType(animRecId,textHolder){var animText=t635_findAnimElem(animRecId);if(!animText)return;t635_wrapTypingTextSpan(animText);t635_updateAnimTextLimits(animRecId);t635_updateAnimTextLimitsOnResize(animRecId);t_onFuncLoad('Typed',function(){t635_updateTypingOnFuncLoad(animRecId,textHolder)})}
function t635_updateTypingOnFuncLoad(animRecId,textHolder){var phrasesList=[];for(var i=0;i<=5;i+=1){var currentPhrase=textHolder.getAttribute('data-text'+i);if(typeof currentPhrase==='string')phrasesList.push(currentPhrase.slice(0,80))}
if(!phrasesList.length)return;var animSpeed=parseInt(textHolder.getAttribute('data-speed'),10);var backspaceDelay=parseInt(textHolder.getAttribute('data-backspacing-delay'),10);var isTypingLoopDisabled=textHolder.getAttribute('data-loop')==='false';var animBlock=document.getElementById('rec'+animRecId);var animatedText=animBlock.querySelector('.t635__typing-text');if(!animatedText)return;var currentStateObj=t635_getCurrentScrollStateObj(animatedText);var isZeroBlock=animatedText.closest('.t396__elem');var isSBSAnimation=isZeroBlock&&isZeroBlock.getAttribute('data-animate-sbs-event');var typedInstance=t635_animateText(animRecId,phrasesList,animSpeed,isTypingLoopDisabled,backspaceDelay);if(currentStateObj.animTextBottom<currentStateObj.windowTop||currentStateObj.animTextTop>currentStateObj.windowBottom){t635_updatetypedInstance(typedInstance,'stop',!0)}
if('IntersectionObserver' in window&&!isSBSAnimation){var observer=new IntersectionObserver(function(entries){entries.forEach(function(entry){t635_processObservedTyping(entry,isTypingLoopDisabled,typedInstance)})});t635_processIntersectionObserver(function(){observer.observe(animatedText)})}else{var timerID=0;window.addEventListener('scroll',function(){if(timerID)return;timerID=setTimeout(function(){var currentStateObj=t635_getCurrentScrollStateObj(animatedText);var isOutside=currentStateObj.animTextBottom<currentStateObj.windowTop;if(!isOutside)isOutside=currentStateObj.animTextTop>currentStateObj.windowBottom;if(!isTypingLoopDisabled&&isOutside){t635_updatetypedInstance(typedInstance,'stop',!0)}else{t635_updatetypedInstance(typedInstance,'start',!1)}
clearTimeout(timerID);timerID=0},700)})}
if(isZeroBlock){var event=document.createEvent('HTMLEvents');event.initEvent('animationInited',!0,!1);window.dispatchEvent(event)}}
function t635_updatetypedInstance(typedInstance,action,resetFlag){if(resetFlag&&action==='stop')typedInstance.reset();typedInstance[action]()}
function t635_getCurrentScrollStateObj(animatedText){var animTextTop=animatedText.getAttribute('data-top-limit');var animTextBottom=animatedText.getAttribute('data-bottom-limit');var windowTop=window.pageYOffset;var windowBottom=windowTop+window.innerHeight;return{animTextTop:animTextTop,animTextBottom:animTextBottom,windowTop:windowTop,windowBottom:windowBottom,}}
function t635_wrapTypingTextSpan(animText){var animTextHtml=animText.innerHTML;var animTextSplitted=animTextHtml.split('|');animText.innerHTML=animTextSplitted[0]+'<span class="t635__typing-text"></span>'+animTextSplitted[1]}
function t635_processIntersectionObserver(callback){var recT809=document.querySelector('[data-record-type="809"]');if(!recT809){callback()}else{if(recT809.getAttribute('data-replacement-completed')==='yes'){callback()}else{document.addEventListener('replacingCompletedT809',function(){callback()})}}}
function t635_processObservedTyping(entry,isTypingLoopDisabled,typedInstance){if(!entry.isIntersecting&&isTypingLoopDisabled)return;if(entry.isIntersecting){var isTypeInited=Boolean(entry.target.typeInited);if(isTypeInited){t635_updatetypedInstance(typedInstance,'start',!1)}else{setTimeout(function(){t635_updatetypedInstance(typedInstance,'start',!1);entry.target.typeInited=!0},1000)}}else if(!isTypingLoopDisabled){t635_updatetypedInstance(typedInstance,'stop',!1)}}
function t635_findAnimElem(animRecId){var animBlock=document.getElementById('rec'+animRecId);if(!animBlock)return null;var possibleAnimElems=Array.prototype.slice.call(animBlock.querySelectorAll('h1, h2, h3, div'));if(!possibleAnimElems.length)return null;possibleAnimElems=possibleAnimElems.filter(function(elem){var elemHTML=elem.innerHTML;return elemHTML.indexOf('|')!==-1&&elemHTML.indexOf('t-map')===-1});return possibleAnimElems.length?possibleAnimElems[possibleAnimElems.length-1]:null}
function t635_updateAnimTextLimits(animRecId){var animBlock=document.getElementById('rec'+animRecId);var animText=animBlock?animBlock.querySelector('.t635__typing-text'):null;if(!animText)return;var topLimit=animText.getBoundingClientRect().top+window.pageYOffset;var bottomLimit=animBlock.getBoundingClientRect().top+window.pageYOffset+animBlock.clientHeight;animText.setAttribute('data-top-limit',topLimit.toString());animText.setAttribute('data-bottom-limit',bottomLimit.toString())}
function t635_updateAnimTextLimitsOnResize(animRecId){var timerID=0;var isTouchDevice=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);if(!isTouchDevice)isTouchDevice='ontouchend' in document&&navigator.userAgent.indexOf('AppleWebKit')!==-1;window.addEventListener(isTouchDevice?'orientationchange':'resize',function(){if(timerID)return;timerID=setTimeout(function(){t635_updateAnimTextLimits(animRecId);clearTimeout(timerID);timerID=0},600)})}
function t635_animateText(animRecId,phrasesList,animSpeed,isTypingLoopDisabled,backspaceDelay){if(!animSpeed||animSpeed<0)animSpeed=40;if(!backspaceDelay||backspaceDelay<0)backspaceDelay=800;var animRec='#rec'+animRecId+' .t635__typing-text';return new Typed(animRec,{strings:phrasesList,typeSpeed:animSpeed,startDelay:600,backDelay:backspaceDelay,loop:!isTypingLoopDisabled,})}