window.isSafari=!1;if(/^((?!chrome|android).)*safari/i.test(navigator.userAgent)){window.isSafari=!0}
window.isSafariVersion='';if(window.isSafari){var version=(navigator.appVersion).match(/Version\/(\d+)\.(\d+)\.?(\d+)? Safari/);if(version!==null){window.isSafariVersion=[parseInt(version[1],10),parseInt(version[2],10),parseInt(version[3]||0,10)]}}
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 t481_setWidth(recid){if(window.innerWidth<=980)return;var menuBlocks=document.querySelectorAll('.t481');Array.prototype.forEach.call(menuBlocks,function(menu){var alignment=menu.getAttribute('data-menu-items-align');var leftContainer=menu.querySelector('.t481__leftcontainer');var rightContainer=menu.querySelector('.t481__rightcontainer');var centerContainer=menu.querySelector('.t481__centercontainer');var mainContainer=menu.querySelector('.t481__maincontainer');var centerContainerList=centerContainer?centerContainer.querySelectorAll('li'):[];var maxWidth=Math.max(t481_getFullWidth(leftContainer),t481_getFullWidth(rightContainer));maxWidth=Math.ceil(maxWidth);var paddingWidth=40;var centerWidth=0;Array.prototype.forEach.call(centerContainerList,function(list){centerWidth+=t481_getFullWidth(list)});var leftSide=menu.querySelector('.t481__leftside');var rightSide=menu.querySelector('.t481__rightside');var mainContainerWidth=t481_getFullWidth(mainContainer);if(mainContainerWidth-(maxWidth*2+paddingWidth*2)>centerWidth+20){if(alignment==='center'||!alignment){if(leftSide)leftSide.style.minWidth=maxWidth+'px';if(rightSide)rightSide.style.minWidth=maxWidth+'px'}}else{if(leftSide)leftSide.style.minWidth='';if(rightSide)rightSide.style.minWidth=''}})}
function t481_getFullWidth(element){if(!element)return 0;var marginLeft=element.style.marginLeft||window.getComputedStyle(element).marginLeft;var marginRight=element.style.marginRight||window.getComputedStyle(element).marginRight;marginLeft=parseInt(marginLeft,10)||0;marginRight=parseInt(marginRight,10)||0;return element.offsetWidth+marginLeft+marginRight}
function t602_init(recid){var rec=document.getElementById('rec'+recid);if(!rec)return;var indicator=rec.querySelector('.t602__indicator');if(!indicator)return;window.addEventListener('scroll',t_throttle(function(){var documentHeight=document.body.clientHeight;var windowScrollTop=document.documentElement.scrollTop;var windowHeight=window.innerHeight;var scrollPercent=(windowScrollTop/(documentHeight-windowHeight))*100;indicator.style.width=scrollPercent+'%'},100))}
function t985_init(recid,searchVariants){var rec=document.querySelector('#rec'+recid);if(!rec)return;if(searchVariants.length>0){t985_addSearchVariants(recid,searchVariants)}
var searchWidgetIcon=rec.querySelectorAll('.t985__search-widget-icon');Array.prototype.forEach.call(searchWidgetIcon,function(widgetIcon){widgetIcon.addEventListener('click',function(){t985_showSearch(rec)})});var closeIcon=rec.querySelector('.t985__close-icon');if(closeIcon){closeIcon.addEventListener('click',function(){t985_hideSearch(rec)})}
var overlay=rec.querySelector('.t985__overlay');if(overlay){overlay.addEventListener('click',function(event){var target=event.target;var parentTarget=target.parentElement;if(!target.classList.contains('.t985__widgetheader')&&!parentTarget.classList.contains('.t985__widgetheader')){t985_hideSearch(rec)}})}}
function t985_addSearchVariants(recid,searchVariants){var rec=document.querySelector('#rec'+recid);if(!rec)return;var container=rec.querySelector('.t985__searchvariants');var cleanVariants=searchVariants.replace(/(<([^>]+)>)/gi,'')
var searchArray=cleanVariants.split(',');Array.prototype.forEach.call(searchArray,function(variant){container.innerHTML+='<div class="t985__searchvariant t-text t-text_xs">'+variant+'</div>'})}
function t985_showSearch(rec){rec.querySelector('.t985__overlay').style.display='block';rec.querySelector('.t985__search-widget-icon').style.display='none'}
function t985_hideSearch(rec){rec.querySelector('.t985__overlay').style.display='none';rec.querySelector('.t985__search-widget-icon').style.display='block'}
function t890_init(recId,offset){var rec=document.getElementById('rec'+recId);if(!rec)return;var container=rec.querySelector('.t890');if(!container)return;var windowOffset=offset||window.innerHeight;rec.setAttribute('data-animationappear','off');rec.style.opacity=1;window.addEventListener('scroll',t_throttle(function(){if(window.pageYOffset>windowOffset){container.style.display='block'}else{t890__fadeOut(container)}},200));var isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);rec.addEventListener('click',function(e){if(e.target.closest('.t890__arrow')){isSafari?t890__animateScrollPolyfill(0):t890__scrollToTop()}})}
function t890__fadeOut(el){if(el.style.display==='none')return;var opacity=1;var timer=setInterval(function(){el.style.opacity=opacity;opacity-=0.1;if(opacity<=0.1){clearInterval(timer);el.style.display='none';el.style.opacity=null}},20)}
function t890__scrollToTop(){if(window.isIE){window.scrollTo(0,0)}else{window.scrollTo({left:0,top:0,behavior:'smooth'})}}
function t890__animateScrollPolyfill(target){var documentHeight=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight);var bottomViewportPoint=documentHeight-document.documentElement.clientHeight;if(target>bottomViewportPoint)target=bottomViewportPoint;if(target===window.pageYOffset)return!1;var currentPosition=window.pageYOffset;var step=(target-currentPosition)/30;var difference=window.pageYOffset;var timerID=setInterval(function(){difference+=step;window.scrollTo(0,difference);document.body.setAttribute('data-scrollable','true');if((target-currentPosition<0&&window.pageYOffset<=target)||(target-currentPosition>0&&window.pageYOffset>=target)){clearInterval(timerID);document.body.removeAttribute('data-scrollable')}},10)}
function t992_init(recid){t992_highlight();t992_checkAnchorLinks(recid)}
function t992_highlight(){var url=window.location.href;var pathname=window.location.pathname;var hash=window.location.hash;if(url.substr(url.length-1)==='/'){url=url.slice(0,-1)}
if(pathname.substr(pathname.length-1)==='/'){pathname=pathname.slice(0,-1)}
if(pathname.charAt(0)==='/'){pathname=pathname.slice(1)}
if(pathname===''){pathname='/'}
var shouldBeActiveElements=document.querySelectorAll('.t992__list-item a[href=\''+url+'\'], '+'.t992__list-item a[href=\''+url+'/\'], '+'.t992__list-item a[href=\''+pathname+'\'], '+'.t992__list-item a[href=\'/'+pathname+'\'], '+'.t992__list-item a[href=\''+pathname+'/\'], '+'.t992__list-item a[href=\'/'+pathname+'/\'], '+'.t992__list-item a[href=\'/'+hash+'/\']');Array.prototype.forEach.call(shouldBeActiveElements,function(link){link.classList.add('t-active')})}
function t992_checkAnchorLinks(recid){var rec=document.getElementById('rec'+recid);if(!rec||window.innerWidth<980)return;var navLinks=rec.querySelectorAll('.t992__list-item a[href*=\'#\']');navLinks=Array.prototype.filter.call(navLinks,function(navLink){return!navLink.classList.contains('tooltipstered')});if(navLinks.length){t992_catchScroll(navLinks)}}
function t992_catchScroll(navLinks){var clickedSectionID=null;var sections=[];var sectionToNavigationLinkID={};var interval=100;var lastCall;var timeoutID;navLinks=navLinks.reverse();navLinks.forEach(function(link){var currentSection=t992_getSectionByHref(link);if(currentSection&&currentSection.id){sections.push(currentSection);sectionToNavigationLinkID[currentSection.id]=link}});t992_updateSectionsOffsets(sections);sections.sort(function(a,b){var firstTopOffset=parseInt(a.getAttribute('data-offset-top'),10)||0;var secondTopOffset=parseInt(b.getAttribute('data-offset-top'),10)||0;return secondTopOffset-firstTopOffset});window.addEventListener('resize',t_throttle(function(){t992_updateSectionsOffsets(sections)},200));if(typeof jQuery!=='undefined'){$('.t992').bind('displayChanged',function(){t992_updateSectionsOffsets(sections)})}else{var footerEls=document.querySelectorAll('.t992');Array.prototype.forEach.call(footerEls,function(footer){footer.addEventListener('displayChanged',function(){t992_updateSectionsOffsets(sections)})})}
var menuEls=document.querySelectorAll('.t992');Array.prototype.forEach.call(menuEls,function(menu){menu.addEventListener('displayChanged',function(){t992_updateSectionsOffsets(sections)})});setInterval(function(){t992_updateSectionsOffsets(sections)},5000);t992_highlightNavLinks(navLinks,sections,sectionToNavigationLinkID,clickedSectionID);navLinks.forEach(function(navLink,i){navLink.addEventListener('click',function(){var clickedSection=t992_getSectionByHref(navLink);if(!navLink.classList.contains('tooltipstered')&&clickedSection&&clickedSection.id){navLinks.forEach(function(link,index){if(index===i){link.classList.add('t-active')}else{link.classList.remove('t-active')}});clickedSectionID=clickedSection.id}})});window.addEventListener('scroll',function(){var dateNow=new Date().getTime();if(lastCall&&dateNow<lastCall+interval){clearTimeout(timeoutID);timeoutID=setTimeout(function(){lastCall=dateNow;clickedSectionID=t992_highlightNavLinks(navLinks,sections,sectionToNavigationLinkID,clickedSectionID)},interval-(dateNow-lastCall))}else{lastCall=dateNow;clickedSectionID=t992_highlightNavLinks(navLinks,sections,sectionToNavigationLinkID,clickedSectionID)}})}
function t992_updateSectionsOffsets(sections){sections.forEach(function(section){var sectionTopPos=section.getBoundingClientRect().top+window.pageYOffset;section.setAttribute('data-offset-top',sectionTopPos)})}
function t992_getSectionByHref(curlink){if(!curlink)return;var href=curlink.getAttribute('href');var curLinkValue=href?href.replace(/\s+/g,''):'';if(curLinkValue.indexOf('/')===0)curLinkValue=curLinkValue.slice(1);if(href&&curlink.matches('[href*="#rec"]')){curLinkValue=curLinkValue.replace(/.*#/,'');return document.getElementById(curLinkValue)}else{var selector=href?href.trim():'';var slashIndex=selector.indexOf('#')!==-1?selector.indexOf('#'):!1;if(typeof slashIndex==='number'){selector=selector.slice(slashIndex+1)}else{slashIndex=selector.indexOf('/')!==-1?selector.indexOf('/'):!1;if(typeof slashIndex==='number')selector=selector.slice(slashIndex+1)}
var fullSelector='.r[data-record-type="215"] a[name="'+selector+'"]';return document.querySelector(fullSelector)?document.querySelector(fullSelector).closest('.r'):null}}
function t992_highlightNavLinks(navLinks,sections,sectionToNavigationLinkID,clickedSectionID){var scrollPosition=window.pageYOffset;var scrollHeight=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight);var returnValue=clickedSectionID;var lastSection=sections.length?sections[sections.length-1]:null;var lastSectionTopPos=lastSection?lastSection.getAttribute('data-offset-top'):'0';lastSectionTopPos=parseInt(lastSectionTopPos,10)||0;if(sections.length&&clickedSectionID===null&&lastSectionTopPos>(scrollPosition+300)){navLinks.forEach(function(link){link.classList.remove('t-active')});return null}
for(var i=0;i<sections.length;i++){var sectionTopPos=sections[i].getAttribute('data-offset-top');var navLink=sections[i].id?sectionToNavigationLinkID[sections[i].id]:null;if(scrollPosition+300>=sectionTopPos||i===0&&scrollPosition>=scrollHeight-window.innerHeight){if(clickedSectionID===null&&navLink&&!navLink.classList.contains('t-active')){navLinks.forEach(function(link){link.classList.remove('t-active')});if(navLink)navLink.classList.add('t-active');returnValue=null}else if(clickedSectionID!==null&&sections[i].id&&clickedSectionID===sections[i].id){returnValue=null}
break}}
return returnValue}