1"use strict";(self.webpackChunkwip_frontend_framework=self.webpackChunkwip_frontend_framework||[]).push([[1175],{7572:(e,t,n)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r)}}function i(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:String(t)}function s(e,t,n){return t=u(t),function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,c()?Reflect.construct(t,n||[],u(e).constructor):t.apply(e,n))}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}function a(){return a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=u(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},a.apply(this,arguments)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}n.r(t),n.d(t,{default:()=>f});var f=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=s(this,t,[e])).compHeight=n.$component.offsetHeight,n.menuToggler=n.$component.querySelector(".program-menu__navbar__toggler"),n.menuTogglerText=n.menuToggler.querySelector(".program-menu__navbar__link"),n.menu=n.$component.querySelector(".program-menu__navbar"),n.menuItems=n.$component.querySelectorAll(".program-menu__navbar__item"),n.sections=document.querySelectorAll("[data-anchor]"),n.mobileTitle=n.$component.dataset.mobileTitle,n.mobileClose=n.$component.dataset.mobileClose,n.activeClass="program-menu__navbar__item--active",n.observer=null,n.firstObserver=null,n.hasBeenOpened=!1,n}var n,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(t,e),n=t,(r=[{key:"init",value:function(){a(u(t.prototype),"init",this).call(this),this.setActive(),this.listenScroll(),this.listenToggler(),this.listenClick()}},{key:"setActive",value:function(){var e=this.$component.querySelector(".program-menu__navbar__item--active");if(e){var t=e.querySelector("[data-link]");this.menuTogglerText.innerText=t.innerText}else this.menuTogglerText.innerText=this.mobileTitle}},{key:"listenToggler",value:function(){var e=this;this.menuToggler&&this.menuToggler.addEventListener("click",(function(){e.hasBeenOpened?e.closeMenu():e.openMenu()}))}},{key:"listenOpen",value:function(){var e=this;this.menuToggler.addEventListener("click",(function(){return e.openMenu()}))}},{key:"listenClick",value:function(){var e=this;this.menuItems.forEach((function(t){t.addEventListener("click",(function(n){e.menuItems.forEach((function(t){t.classList.remove(e.activeClass)})),t.classList.add(e.activeClass),e.closeMenu();var r=n.target.dataset.link;e.scrollToAnchor(n,r)}))}))}},{key:"listenClose",value:function(){var e=this;this.menuToggler.addEventListener("click",(function(){return e.closeMenu()}))}},{key:"listenScroll",value:function(){var e=this;this.observer=new IntersectionObserver((function(t){t.forEach((function(t){if(t.isIntersecting){var n=t.target.dataset.anchor;
1e.menuItems.forEach((function(t){t.querySelector("[data-link]").dataset.link===n?t.classList.add(e.activeClass):t.classList.remove(e.activeClass)})),e.menu.classList.contains("program-menu__navbar--closed")&&e.setActive()}}))}),{threshold:.5}),this.firstObserver=new IntersectionObserver((function(t){t.forEach((function(t){!t.isIntersecting&&t.boundingClientRect.top>0&&e.menuItems.forEach((function(t){t.classList.remove(e.activeClass),e.menu.classList.contains("program-menu__navbar--closed")&&e.setActive()}))}))})),this.firstObserver.observe(this.sections[0]),this.sections.forEach((function(t){e.observer.observe(t)}))}},{key:"scrollToAnchor",value:function(e,t){var n=this;e.preventDefault(),this.sections.forEach((function(e){n.observer.unobserve(e)}));var r=document.querySelector(".c-main-header").offsetHeight;this.sections.forEach((function(e){if(e.dataset.anchor===t){var o=e.offsetTop-r-n.compHeight;window.scrollTo({top:o,behavior:"smooth"}),setTimeout((function(){n.sections.forEach((function(e){n.observer.observe(e)}))}),1e3)}}))}},{key:"openMenu",value:function(){this.menu.classList.remove("program-menu__navbar--closed"),this.menuTogglerText.innerText=this.mobileClose,this.hasBeenOpened=!0}},{key:"closeMenu",value:function(){this.menu.classList.add("program-menu__navbar--closed"),this.setActive(),this.hasBeenOpened=!1}}])&&o(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}(n(81).A)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.