function t_menu__highlightActiveLinks(t){var e=window.location.href,n,r=window.location.pathname;"/"===e[e.length-1]&&(n=e.slice(0,-1)),"/"===r[r.length-1]&&(r=r.slice(0,-1)),"/"===r[0]&&(r=r.slice(1)),""===r&&(r="/");var i=document.querySelectorAll(t);Array.prototype.forEach.call(i,(function(t){var i=t.getAttribute("href");if(i){var o=t.href,a="/"===i[0]?i.slice(1):i,l;-1!==r.indexOf("tpost")&&(l="/"+r.slice(0,r.indexOf("tpost"))),o!==e&&o!==r&&i!==e&&i!==r&&a!==r&&n!==e&&n!==r&&i!==l||t.classList.add("t-active")}}))}function t_menu__findAnchorLinks(t,e){var n=document.getElementById("rec"+t);if(n&&t_menu__isBlockVisible(n)){var r=e+'[href*="#"]:not(.tooltipstered)',i=n?n.querySelectorAll(r):[];i.length&&t_menu__updateActiveLinks(i,e)}}function t_menu__updateActiveLinks(t,e){var n=e.slice(2);n=".t"+(n=parseInt(n,10)),t=Array.prototype.slice.call(t);var r=null,i=[],o={};(t=t.reverse()).forEach((function(t){var e=t_menu__getSectionByHref(t);e&&e.id&&(i.push(e),o[e.id]=t)})),t_menu__updateSectionsOffsets(i),i.sort((function(t,e){var n=parseInt(t.getAttribute("data-offset-top"),10)||0,r;return(parseInt(e.getAttribute("data-offset-top"),10)||0)-n})),window.addEventListener("resize",t_throttle((function(){t_menu__updateSectionsOffsets(i)}),200));var a=document.querySelectorAll(n);Array.prototype.forEach.call(a,(function(t){t.addEventListener("displayChanged",(function(){t_menu__updateSectionsOffsets(i)}))})),t_menu__highlightNavLinks(t,i,o,r),t.forEach((function(e,n){e.addEventListener("click",(function(){var i=t_menu__getSectionByHref(e);!e.classList.contains("tooltipstered")&&i&&i.id&&(t.forEach((function(t,e){e===n?t.classList.add("t-active"):t.classList.remove("t-active")})),r=i.id)}))})),window.addEventListener("scroll",t_throttle((function(){r=t_menu__highlightNavLinks(t,i,o,r)}),100)),"ResizeObserver"in window&&setTimeout((function(){var t;new ResizeObserver((function(){t_menu__updateSectionsOffsets(i)})).observe(document.body)}),500)}function t_menu__updateSectionsOffsets(t){t.forEach((function(t){var e=t.getBoundingClientRect().top+window.pageYOffset;t.getAttribute("data-offset-top")!==e.toString()&&t.setAttribute("data-offset-top",e)}))}function t_menu__getSectionByHref(t){if(t){var e=t.getAttribute("href"),n=e?e.replace(/\s+/g,""):"";if(0===n.indexOf("/")&&(n=n.slice(1)),e&&t.matches('[href*="#rec"]'))return n=n.replace(/.*#/,""),document.getElementById(n);var r=e?e.trim():"",i=-1!==r.indexOf("#")&&r.indexOf("#");("number"==typeof i||"number"==typeof(i=-1!==r.indexOf("/")&&r.indexOf("/")))&&(r=r.slice(i+1));var o='a[name="'+r+'"]',a=document.querySelector(o);if(!a)return null;var l=a.closest('.r[data-record-type="215"], .r[data-parenttplid="215"]');if(l)return l;var s=document.querySelector(o+"+ .r");return s?(a.id=s?s.id+"_"+r:"",a):null}}function t_menu__highlightNavLinks(t,e,n,r){if(document.documentElement.classList.contains("t-body_scroll-locked"))return null;var i=window.pageYOffset,o=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),a=r,l=e.length?e[e.length-1]:null,s=l&&parseInt(l.getAttribute("data-offset-top"),10)||0;if(e.length&&null===r&&s>i+300)return t.forEach((function(t){t.classList.remove("t-active")})),null;for(var u=0;u=c||0===u&&i>=o-window.innerHeight){null===r&&d&&!d.classList.contains("t-active")?(t.forEach((function(t){t.classList.remove("t-active")})),d&&d.classList.add("t-active"),a=null):null!==r&&e[u].id&&r===e[u].id&&(a=null);break}}return a}function t_menu__setBGcolor(t,e){var n=document.querySelectorAll(e);Array.prototype.forEach.call(n,(function(t){window.innerWidth>980?"yes"===t.getAttribute("data-bgcolor-setbyscript")&&(t.style.backgroundColor=t.getAttribute("data-bgcolor-rgba")):(t.style.backgroundColor=t.getAttribute("data-bgcolor-hex"),t.setAttribute("data-bgcolor-setbyscript","yes"),t.style.transform&&(t.style.transform=""),t.style.opacity&&(t.style.opacity=""))}))}function t_menu__showFixedMenu(t,e){var n,r=[".t280",".t282",".t450",".t451",".t466",".t453"].some((function(t){return t===e}));if(!(window.innerWidth<=980)||r){var i=document.getElementById("rec"+t);if(!i)return!1;var o=i.querySelectorAll(e);Array.prototype.forEach.call(o,(function(t){var e=t.getAttribute("data-appearoffset");if(e){-1!==e.indexOf("vh")&&(e=Math.floor(window.innerHeight*(parseInt(e)/100))),e=parseInt(e,10);var n=t.clientHeight;"number"==typeof e&&window.pageYOffset>=e?t.style.transform==="translateY(-"+n+"px)"&&t_menu__slideElement(t,n,"toBottom"):"translateY(0px)"===t.style.transform?t_menu__slideElement(t,n,"toTop"):(t.style.transform="translateY(-"+n+"px)",t.style.opacity="0")}}))}}function t_menu__changeBgOpacity(t,e){var n,r=["t280","t282","t451","t466"].some((function(t){return-1!==e.indexOf(t)}));if(!(window.innerWidth<=980)||r){var i=document.getElementById("rec"+t);if(!i)return!1;var o=i.querySelectorAll(e);Array.prototype.forEach.call(o,(function(t){var e=t.getAttribute("data-bgcolor-rgba"),n=t.getAttribute("data-bgcolor-rgba-afterscroll"),r=t.getAttribute("data-bgopacity"),i=t.getAttribute("data-bgopacity-two"),o=parseInt(t.getAttribute("data-menushadow"),10)||0;o/=100;var a=t.getAttribute("data-menushadow-css");t.style.backgroundColor=window.pageYOffset>20?n:e,window.pageYOffset>20&&"0"===i||window.pageYOffset<=20&&("0.0"===r||"0"===r)||!o&&!a?t.style.boxShadow="none":a?t.style.boxShadow=a:o&&(t.style.boxShadow="0px 1px 3px rgba(0,0,0,"+o+")")}))}}function t_menu__createMobileMenu(t,e){var n=document.getElementById("rec"+t);if(n){var r=n.querySelector(e),i=r?r.getAttribute("data-mobile-burgerhook"):"",o=n.querySelector(e+"__mobile"),a=o||n.querySelector(".tmenu-mobile"),l=o?e.slice(1)+"_opened":"tmenu-mobile_opened",s="t-menuburger-opened";if(a)if(r&&r.classList.contains(e.slice(1)+"__mobile_burgerhook")&&i){if(a.querySelector(".tmenu-mobile__burger"))var u=a.querySelector(".tmenu-mobile__burger");else if(a.querySelector(".t-menuburger"))var u=a.querySelector(".t-menuburger");if(u){var c=u.parentElement,d=document.createElement("a");d.href=i,c&&(d.appendChild(u),c.appendChild(d))}}else{var u=a.querySelector(".t-menuburger");a.addEventListener("click",(function(n){if(!n.target.closest("a")){if(a.classList.contains(l))t_menu__FadeOut(r,300),a.classList.remove(l),u.classList.remove(s),u.setAttribute("aria-expanded","false");else if(t_menu__fadeIn(r,300,(function(){r.style.transform&&(r.style.transform=""),r.style.opacity&&(r.style.opacity="")})),a.classList.add(l),u.classList.add(s),u.setAttribute("aria-expanded","true"),r.classList.contains("tmenu-mobile__menucontent_fixed")){var i=getComputedStyle(a).height,o=getComputedStyle(a).borderBottom||0;r.style.top=i+o}t_menu_checkOverflow(t,e)}}))}screen.width<980&&n.addEventListener("click",(function(n){var i;if(r&&r.classList.contains("tmenu-mobile__menucontent_fixed")){var o=null==(i=r.closest(".r"))?void 0:i.querySelector(".tmenu-mobile_positionfixed"),c=(null==o?void 0:o.offsetHeight)||0;c&&(r.style.top=c+"px");var d=n.target.closest(".t-menu__link-item, .t978__submenu-link, .t978__innermenu-link, .t966__menu-link, .t-menusub__link-item, .t-btn, .t794__link"),f,m;if(d)["t978__menu-link_hook","t978__tm-link","t966__tm-link","t794__tm-link","t-menusub__target-link"].some((function(t){return d.classList.contains(t)}))?r.addEventListener("menuOverflow",(function(){t_menu_checkOverflow(t,e)})):(t_menu__FadeOut(r,300),a&&a.classList.remove(l),a&&u.classList.remove(s))}})),window.addEventListener("resize",t_throttle((function(){if(window.innerWidth>980){if(r&&(r.style.opacity=""),r&&(r.style.display=""),r){var n=r.getAttribute("data-top")||"";r.style.top=n}a&&a.classList.remove(l)}t_menu_checkOverflow(t,e)}),200))}}function t_menu_checkOverflow(t,e){var n=document.getElementById("rec"+t),r=n?n.querySelector(e):null;if(r){var i=n.querySelector(e+"__mobile"),o=i||n.querySelector(".tmenu-mobile");if(o){var a=o.offsetHeight,l=document.documentElement.clientHeight,s=r.style.position||window.getComputedStyle(r).position,u=r.offsetHeight;"fixed"===s&&u>l-a&&(r.style.overflow="auto",r.style.maxHeight="calc(100% - "+a+"px)")}}}function t_menu__FadeOut(t,e,n){if(!t)return!1;var r=1;e=parseInt(e,10);var i,o=setInterval((function(){t.style.opacity=r,(r-=.1)<=.1&&(t.style.opacity="0",t.style.display="none","function"==typeof n&&n(),clearInterval(o))}),e>0?e/10:40)}function t_menu__fadeIn(t,e,n){if(!t)return!1;if(("1"===getComputedStyle(t).opacity||""===getComputedStyle(t).opacity)&&"none"!==getComputedStyle(t).display)return!1;var r=0,i=(e=parseInt(e,10))>0?e/10:40;t.style.opacity=r,t.style.display="block";var o=setInterval((function(){t.style.opacity=r,(r+=.1)>=1&&(t.style.opacity="1","function"==typeof n&&n(),clearInterval(o))}),i)}function t_menu__slideElement(t,e,n){var r="toTop"===n?0:e,i="toTop"===n?1:0,o=setInterval((function(){t.style.transform="translateY(-"+r+"px)",t.style.opacity=i.toString(),i="toTop"===n?i-.1:i+.1,r="toTop"===n?r+e/20:r-e/20,"toTop"===n&&r>=e&&(t.style.transform="translateY(-"+e+"px)",t.style.opacity="0",clearInterval(o)),"toBottom"===n&&r<=0&&(t.style.transform="translateY(0px)",t.style.opacity="1",clearInterval(o))}),10)}function t_menu__interactFromKeyboard(t){var e=document.getElementById("rec"+t);if(e){var n=e.querySelectorAll(".t-menu__list > li > a"),r=e.querySelectorAll(".t-menu__list > li li"),i=9,o=13,a=27,l=32,s=0,u,c=function t(e){e===n.length?e=0:e<0&&(e=n.length-1),n[e].focus(),s=e},d=function t(e,n){var r=e.querySelectorAll("a");n==r.length?n=0:n<0&&(n=r.length-1),r[n].focus(),u=n},f=function t(e){e.addEventListener("keydown",(function(t){var e=this.parentNode.querySelector(".t-menusub__list");switch(t.keyCode){case i:if(!t.shiftKey&&s<=n.length-2)c(s+1);else{if(!(t.shiftKey&&s>0))return;c(s-1)}break;case o:case l:if(!e)return;this.click(),u=0,d(e,0)}t.preventDefault()}))},m=function t(e){e.addEventListener("focus",(function(){u=0}))},_=function t(e){var n=e.parentNode.querySelector(".t-menusub__menu");e.addEventListener("click",(function(t){if("false"==this.getAttribute("aria-expanded")||null==this.getAttribute("aria-expanded")){this.setAttribute("aria-expanded","true");var r=e.nextElementSibling,i=r?r.getAttribute("data-submenu-margin"):0;t_menusub__showSubmenu(e,n,i)}else this.setAttribute("aria-expanded","false");return t.preventDefault(),!1}))},p=function t(e){var r=e.closest(".t-menusub__menu"),f=!1;e.addEventListener("keydown",(function(t){var e=this.parentNode;switch(t.keyCode){case i:f=!0;var m=e.querySelectorAll(".t-menusub__link-item").length;if(t.shiftKey)0===u?(c(s),t_menusub__hideSubmenu(r)):d(e,u-1);else if(u===m-1){if(t_menusub__hideSubmenu(r),s===n.length-1)return;c(s+1)}else d(e,u+1);break;case o:case l:f=!1,t_menusub__hideSubmenu(r);break;case a:f=!0,c(s),t_menusub__hideSubmenu(r)}f&&(t.preventDefault(),t.stopPropagation())}))};Array.prototype.forEach.call(n,(function(t){var e;m(t),f(t),!t.parentNode.querySelector(".t-menusub__menu")||window.isMobile||"ontouchend"in document||_(t)})),Array.prototype.forEach.call(r,(function(t){p(t)}))}}function t_menu__isBlockVisible(t){var e=window.innerWidth,n=t.getAttribute("data-screen-min"),r=t.getAttribute("data-screen-max");return!(n&&eparseInt(r,10))}