!function(){"use strict";function e(e){var t=e.querySelectorAll(".popup"),o=e.querySelectorAll(".popup-link"),n=e.querySelectorAll(".popup-close"),c=e.querySelectorAll(".popup form");if(t){var i=e=>{e.setAttribute("aria-selected","false"),e.classList.remove("active"),document.documentElement.style.overflow=""},l=()=>{t.forEach((e=>{i(e)}))};o.forEach((e=>{e.addEventListener("click",(function(o){o.preventDefault(),(e=>{var o=e.dataset.key;t.forEach((e=>{e.dataset.key===o?(e.setAttribute("aria-selected","true"),e.classList.add("active")):(e.setAttribute("aria-selected","false"),e.classList.remove("active"))})),document.documentElement.style.overflow="hidden"})(e)}))})),n.forEach((e=>{e.addEventListener("click",(function(t){t.preventDefault(),i(null===e||void 0===e?void 0:e.closest(".popup"))}))})),document.addEventListener("click",(function(e){e.target.closest(".popup-container")||e.target.closest(".popup-link")||l()})),document.addEventListener("keydown",(function(e){"Escape"!==e.key&&"Esc"!==e.key&&27!==e.keyCode||l()})),c.forEach((e=>{e.addEventListener("submit",(function(){i(null===e||void 0===e?void 0:e.closest(".popup"))}))}))}}window.initPopup=e;var t=e;document.addEventListener("DOMContentLoaded",(()=>{t(document)}))}(); //# sourceMappingURL=rte-blocks-frontend.js.map?ver=e56424ae8a44a9c363e8; "use strict" document.addEventListener('DOMContentLoaded', function () { // IE11 Support: https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach#Polyfill if ( window.NodeList && ! NodeList.prototype.forEach ) { NodeList.prototype.forEach = Array.prototype.forEach; } document.querySelectorAll('[data-gtm-on]').forEach(function (element) { var data = element.dataset, trigger = data.gtmOn; // Set the event listener. element.addEventListener(trigger, function () { // Check for custom variable. var variable = data.gtmVar || 'dataLayer', entry = {}; // Instantiate the dataLayer variable if it doesn't exist. window[variable] = window[variable] || []; data.gtmEvent && (entry.event = String(data.gtmEvent)); data.gtmCategory && (entry.category = String(data.gtmCategory)); data.gtmLabel && (entry.label = String(data.gtmLabel)); data.gtmValue && (entry.value = Number(data.gtmValue)); data.gtmFields && (entry.fields = JSON.parse(data.gtmFields)); // Push the entry onto the dataLayer. window[variable].push(entry); }); }); }); ;