1function 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__updateSectio …Длинные строки сокращены. Полная версия доступна по ссылке «Полный текст».