1/******/ (() => { // webpackBootstrap 2var __webpack_exports__ = {}; 3// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 4(() => { 5/*!********************************************************************************************************!*\ 6 !*** ./web/app/themes/topstar/js/_TOP-120-Development-of-a-new-website-navigation-menu-for-Topstar.js ***! 7 \********************************************************************************************************/ 8jQuery(document).ready(function ($) { 9 $('.et_pb_fullscreen_nav_container').on('click', 'li.top_star-menu.menu-item-has-children > a span', function (e) { 10 e.preventDefault(); 11 var $this_parent = $(this).closest('li'), 12 $this_arrow = $this_parent.find('>a .et_mobile_menu_arrow'), 13 $closest_submenu = $this_parent.find('>ul'), 14 is_opened_submenu = $this_arrow.hasClass('et_pb_submenu_opened'); 15 $this_arrow.toggleClass('et_pb_submenu_opened'); 16 if (is_opened_submenu) { 17 $closest_submenu.removeClass('et_pb_slide_dropdown_opened'); 18 $closest_submenu.slideToggle(700, 'easeInOutCubic'); 19 } else { 20 $closest_submenu.slideToggle(700, 'easeInOutCubic'); 21 $closest_submenu.addClass('et_pb_slide_dropdown_opened'); 22 } 23 return false; 24 }); 25 $('.et_pb_fullscreen_nav_container li.menu-item-has-children > a').on('click', function (e) { 26 if ($(e.target).is('span')) { 27 return; 28 } 29 e.preventDefault(); 30 var href = $(this).attr('href'); 31 if (href) { 32 window.location.href = href; 33 } 34 return false; 35 }); 36}); 37})(); 38 39// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 40(() => { 41/*!************************************************************************************!*\ 42 !*** ./web/app/themes/topstar/js/_TOP-147-news-box-module-in-a-neutral-version.js ***! 43 \************************************************************************************/ 44jQuery(document).ready(function ($) { 45 $(".dinited-category-filter a").first().addClass("WL-23-active"); 46}); 47})(); 48 49// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 50(() => { 51/*!*******************************************************!*\ 52 !*** ./web/app/themes/topstar/js/_TOP-22-download.js ***! 53 \*******************************************************/ 54jQuery(document).ready(function ($) { 55 $(".TOP-22-download .product-download-series").each(function (index) { 56 $(this).on("click", function (event) { 57 event.preventDefault(); 58 $(this).toggleClass("opened"); 59 $(this).next().toggle({ 60 duration: 200, 61 easing: 'swing' 62 }); 63 var sign = $(this).find(".product-download-dropdown").text(); 64 $(this).find(".product-download-dropdown").html(sign === "+" ? '−' : '+'); 65 }); 66 }); 67}); 68})(); 69 70// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 71(() => { 72/*!*********************************************************************!*\ 73 !*** ./web/app/themes/topstar/js/_TOP-26-productslider-in-frame.js ***! 74 \*********************************************************************/ 75function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } 76function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } 77function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } 78function onSwiperLoaded(slider) { 79 slider.params.breakpoints = { 80 1: { 81 slidesPerView: 1.5, 82 slidesPerGroup: 1 83 }, 84 768: { 85 slidesPerView: 2.5, 86 slidesPerGroup: 1 87 }, 88 981: { 89 slidesPerView: 4, 90 slidesPerGroup: 1 91 } 92 }; 93 slider.currentBreakpoint = false;
94 slider.update(); 95} 96function createObserver(slider) { 97 var observer = new MutationObserver(function (mutations) { 98 mutations.forEach(function (mutation) { 99 var swiperContainer = slider.querySelector('.swiper-container-initialized'); 100 if (swiperContainer) { 101 onSwiperLoaded(swiperContainer.swiper); 102 observer.disconnect(); 103 } 104 }); 105 }); 106 var config = { 107 childList: true, 108 subtree: true 109 }; 110 observer.observe(slider, config); 111} 112jQuery(document).ready(function ($) { 113 var sliders = document.getElementsByClassName("TOP-26-productslider"); 114 var _iterator = _createForOfIteratorHelper(sliders), 115 _step; 116 try { 117 for (_iterator.s(); !(_step = _iterator.n()).done;) { 118 var slider = _step.value; 119 createObserver(slider); 120 } 121 } catch (err) { 122 _iterator.e(err); 123 } finally { 124 _iterator.f(); 125 } 126}); 127})(); 128 129// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 130(() => { 131/*!*************************************************************!*\ 132 !*** ./web/app/themes/topstar/js/_TOP-76-dealer-locator.js ***! 133 \*************************************************************/ 134function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 135function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap;
vendor: 5,446 bytes, line 135
135 var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEac
135h(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } 136function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } 137function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } 138function waitForElm(selector) { 139 return new Promise(function (resolve) { 140 if (document.querySelector(selector)) { 141 return resolve(document.querySelector(selector)); 142 } 143 var observer = new MutationObserver(function (mutations) { 144 if (document.querySelector(selector)) { 145 resolve(document.querySelector(selector)); 146 observer.disconnect(); 147 } 148 }); 149 observer.observe(document.body, { 150 childList: true, 151 subtree: true 152 }); 153 }); 154} 155function observeElement(element, property, callback) { 156 var delay = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; 157 var elementPrototype = Object.getPrototypeOf(element); 158 if (elementPrototype.hasOwnProperty(property)) { 159 var descriptor = Object.getOwnPropertyDescriptor(elementPrototype, property); 160 Object.defineProperty(element, property, { 161 get: function get() { 162 return descriptor.get.apply(this, arguments); 163 }, 164 set: function set() { 165 var oldValue = this[property]; 166 descriptor.set.apply(this, arguments); 167 var newValue = this[property]; 168 if (typeof callback == "function") { 169 setTimeout(callback.bind(this, oldValue, newValue), delay); 170 } 171 return newValue; 172 } 173 }); 174 } 175} 176jQuery(document).ready( /*#__PURE__*/function () { 177 var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee($) { 178 var lang, h1Element, findDealer, spanElement, zipAddress, store_locator, data_table, wrapper, wrapperTo; 179 return _regeneratorRuntime().wrap(function _callee$(_context) { 180 while (1) switch (_context.prev = _context.next) { 181 case 0: 182 lang = null; 183 if ('en-US' === document.querySelector('html').lang) { 184 lang = 'en'; 185 } else if ('de-DE' === document.querySelector('html').lang) { 186 lang = 'de'; 187 } else { 188 lang = localStorage.getItem('currentLanguage'); 189 } 190 if (null === lang) { 191 lang = 'de'; 192 } 193 194 // This is the last element that will be loaded from the map. 195 // When the store locator is loaded, we know the whole map is loaded. 196 _context.next = 5; 197 return waitForElm(".wpgmza-modern-store-locator"); 198 case 5: 199 h1Element = document.createElement('h1'); 200 findDealer = 'en' === lang ? "Find a dealer nearby" : "Händler in der Nähe finden"; 201 h1Element.textContent = findDealer; 202 spanElement = document.createElement('span'); 203 spanElement.classList.add('form_label'); 204 zipAddress = 'en' === lang ? "ZIP / Address" : "PLZ / Adresse"; 205 spanElement.textContent = zipAddress; 206 207 //const category_filter = document.querySelector(".wpgmza-marker-listing-category-filter"); 208 store_locator = document.querySelector(".wpgmza-modern-store-locator"); 209 store_locator.insertBefore(spanElement, store_locator.firstChild); 210 store_locator.insertBefore(h1Element, store_locator.firstChild); 211 data_table = document.querySelector(".wpgmza_marker_holder"); 212 wrapper = document.createElement("div"); 213 wrapperTo = document.querySelector(".TOP-76-dealer-locator .et_pb_code_inner"); 214 wrapper.classList.add("TOP-76-dealer-wrapper"); 215 wrapperTo.insertBefore(wrapper, wrapperTo.firstChild); 216 wrapper.appendChild(store_locator); 217 //wrapper.appendChild(category_filter); 218 wrapper.appendChild(data_table); 219 case 22: 220 case "end": 221 return _context.stop(); 222 } 223 }, _callee); 224 })); 225 return function (_x) { 226 return _ref.apply(this, arguments); 227 }; 228}()); 229})(); 230 231// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 232(() => { 233/*!********************************************************!*\ 234 !*** ./web/app/themes/topstar/js/_TOP-consent-gate.js ***! 235 \********************************************************/ 236(function () { 237 function getRequiredConsents(gate) { 238 return (gate.getAttribute('data-dinited-consent-required') || '').split(',').map(function (consent) { 239 return consent.trim(); 240 }
240).filter(Boolean); 241 } 242 function hasConsent(consent) { 243 if (!window.Cookiebot || !window.Cookiebot.consent) { 244 return false; 245 } 246 if (consent === 'all') { 247 return window.Cookiebot.consent.preferences && window.Cookiebot.consent.statistics && window.Cookiebot.consent.marketing; 248 } 249 return Boolean(window.Cookiebot.consent[consent]); 250 } 251 function hasRequiredConsent(gate) { 252 var requiredConsents = getRequiredConsents(gate); 253 return requiredConsents.length > 0 && requiredConsents.every(hasConsent); 254 } 255 function unlockGate(gate) { 256 var content = gate.querySelector('.dinited-consent-content'); 257 var template = gate.querySelector('.dinited-consent-template'); 258 var blocker = gate.querySelector('.consent-blocker'); 259 if (!content || !template || content.getAttribute('data-dinited-consent-loaded') === '1') { 260 if (content) { 261 content.hidden = false; 262 } 263 if (blocker) { 264 blocker.hidden = true; 265 } 266 return; 267 } 268 content.appendChild(template.content.cloneNode(true)); 269 content.setAttribute('data-dinited-consent-loaded', '1'); 270 content.hidden = false; 271 if (blocker) { 272 blocker.hidden = true; 273 } 274 } 275 function lockGate(gate) { 276 var content = gate.querySelector('.dinited-consent-content'); 277 var blocker = gate.querySelector('.consent-blocker'); 278 if (content) { 279 content.hidden = true; 280 content.innerHTML = ''; 281 content.removeAttribute('data-dinited-consent-loaded'); 282 } 283 if (blocker) { 284 blocker.hidden = false; 285 } 286 } 287 function refreshConsentGates() { 288 document.querySelectorAll('.dinited-consent-gate').forEach(function (gate) { 289 if (hasRequiredConsent(gate)) { 290 unlockGate(gate); 291 } else { 292 lockGate(gate); 293 } 294 }); 295 } 296 function openCookieDialog(event) { 297 var trigger = event.target.closest('[data-dinited-consent-open]'); 298 if (!trigger) { 299 return; 300 } 301 event.preventDefault(); 302 if (window.Cookiebot && typeof window.Cookiebot.show === 'function') { 303 window.Cookiebot.show(); 304 } 305 } 306 document.addEventListener('click', openCookieDialog); 307 document.addEventListener('DOMContentLoaded', refreshConsentGates); 308 window.addEventListener('CookiebotOnAccept', refreshConsentGates); 309 window.addEventListener('CookiebotOnDecline', refreshConsentGates); 310 window.addEventListener('CookiebotOnConsentReady', refreshConsentGates); 311 window.addEventListener('CookiebotOnLoad', refreshConsentGates); 312})(); 313})(); 314 315// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 316(() => { 317/*!*******************************************************!*\ 318 !*** ./web/app/themes/topstar/js/_TOP-peek-slider.js ***! 319 \*******************************************************/ 320(function () { 321 var selector = '.TOP-peek-slider'; 322 function ready(callback) { 323 if (document.readyState === 'loading') { 324 document.addEventListener('DOMContentLoaded', callback); 325 return; 326 } 327 callback(); 328 } 329 function getRealSlides(track) { 330 return Array.prototype.slice.call(track.children).filter(function (slide) { 331 return slide.classList.contains('TOP-peek-slide') && !slide.hasAttribute('data-topstar-peek-clone'); 332 }); 333 } 334 function getAllSlides(track) { 335 return Array.prototype.slice.call(track.children).filter(function (slide) { 336 return slide.classList.contains('TOP-peek-slide'); 337 }); 338 } 339 function setTransition(track, enabled) { 340 track.style.transition = enabled ? 'transform 480ms cubic-bezier(0.4, 0, 0.2, 1)' : 'none'; 341 } 342 function prepareSlideImages(slide) { 343 Array.prototype.slice.call(slide.querySelectorAll('img')).forEach(function (image) { 344 image.loading = 'eager'; 345 image.decoding = 'async'; 346 if ('fetchPriority' in image) { 347 image.fetchPriority = 'high'; 348 } 349 if (image.decode) { 350 image.decode()["catch"](function () {}); 351 } 352 }); 353 } 354 function updateBoxPadding(slider, realSlides) { 355 var maxBoxHeight = 0; 356 realSlides.forEach(function (slide) { 357 var box = slide.querySelector('.TOP-peek-slide__box'); 358 if (box) { 359 maxBoxHeight = Math.max(maxBoxHeight, box.getBoundingClientRect().height); 360 } 361 }); 362 if (maxBoxHeight > 0) { 363 slider.style.setProperty('--topstar-peek-slider-box-offset', "".concat(Math.ceil(maxBoxHeight / 2 + 24), "px")); 364 slider.classList.add('TOP-peek-slider--has-box'); 365 return; 366 } 367 slider.style.setProperty('--topstar-peek-slider-box-offset', '0px'); 368 slider.classList.remove('TOP-peek-slider--has-box'); 369 } 370 function initSlider(slider) { 371 if (slider.hasAttribute('data-topstar-peek-slider-initialized')) { 372 return; 373 } 374 var viewport = slider.querySelector('.TOP-peek-slider__viewport'); 375 var track = slider.querySelector('.TOP-peek-slider__track'); 376 if (!viewport || !track) { 377 return; 378 } 379 var realSlides = getRealSlides(track); 380 if (!realSlides.length) { 381 return; 382 } 383 slider.setAttribute('data-topstar-peek-slider-initialized', '1'); 384 var slides = realSlides; 385 var physicalIndex = realSlides.length > 1 ? 1 : 0; 386 var isMoving = false;
387 var refreshFrame = null; 388 var fallbackMoveTimer = null; 389 realSlides.forEach(prepareSlideImages); 390 if (realSlides.length > 1) { 391 var firstClone = realSlides[0].cloneNode(true); 392 var lastClone = realSlides[realSlides.length - 1].cloneNode(true); 393 firstClone.setAttribute('data-topstar-peek-clone', 'first'); 394 firstClone.setAttribute('aria-hidden', 'true'); 395 lastClone.setAttribute('data-topstar-peek-clone', 'last'); 396 lastClone.setAttribute('aria-hidden', 'true'); 397 prepareSlideImages(firstClone); 398 prepareSlideImages(lastClone); 399 track.insertBefore(lastClone, realSlides[0]); 400 track.appendChild(firstClone); 401 slides = getAllSlides(track); 402 } else { 403 slider.classList.add('TOP-peek-slider--single'); 404 } 405 function getSlideWidth() { 406 return slides[physicalIndex] ? slides[physicalIndex].getBoundingClientRect().width : 0; 407 } 408 function getGapWidth() { 409 var trackStyles = window.getComputedStyle(track); 410 var columnGap = parseFloat(trackStyles.columnGap); 411 var gap = Number.isNaN(columnGap) ? parseFloat(trackStyles.gap) : columnGap; 412 return Number.isNaN(gap) ? 0 : gap; 413 } 414 function getReferenceRowGeometry() { 415 var sliderRect = slider.getBoundingClientRect(); 416 var viewportWidth = document.documentElement.clientWidth || window.innerWidth || sliderRect.width; 417 var sliderRow = slider.closest('.et_pb_row'); 418 var rows = Array.prototype.slice.call(document.querySelectorAll('.et_pb_row')); 419 var referenceRow = rows.find(function (row) { 420 var rowRect = row.getBoundingClientRect(); 421 return row !== sliderRow && !row.contains(slider) && rowRect.width > 0 && rowRect.width < viewportWidth - 2; 422 }); 423 if (referenceRow) { 424 var rowRect = referenceRow.getBoundingClientRect(); 425 return { 426 offset: Math.max(rowRect.left - sliderRect.left, 0), 427 width: rowRect.width 428 }; 429 } 430 var fallbackWidth = Math.min(viewportWidth * 0.8, 1080); 431 return { 432 offset: Math.max((sliderRect.width - fallbackWidth) / 2, 0), 433 width: fallbackWidth 434 }; 435 } 436 function getLogicalIndex(index) { 437 if (realSlides.length <= 1) { 438 return 0; 439 } 440 if (index === 0) { 441 return realSlides.length - 1; 442 } 443 if (index === realSlides.length + 1) { 444 return 0; 445 } 446 return index - 1; 447 } 448 function updateSlideState() { 449 slides.forEach(function (slide, index) { 450 var isActive = index === physicalIndex; 451 slide.classList.toggle('is-active', isActive); 452 slide.setAttribute('aria-hidden', isActive ? 'false' : 'true'); 453 }); 454 slider.setAttribute('data-active-slide', String(getLogicalIndex(physicalIndex))); 455 } 456 function render(animate) { 457 var rowGeometry = getReferenceRowGeometry(); 458 slider.style.setProperty('--topstar-peek-slider-slide-width', "".concat(rowGeometry.width, "px")); 459 var slideWidth = getSlideWidth(); 460 if (!slideWidth) { 461 return; 462 } 463 var gapWidth = realSlides.length > 1 ? getGapWidth() : 0; 464 var activeOffset = rowGeometry.offset; 465 var stepWidth = slideWidth + gapWidth; 466 setTransition(track, animate); 467 track.style.transform = "translate3d(".concat(activeOffset - physicalIndex * stepWidth, "px, 0, 0)"); 468 updateSlideState(); 469 updateBoxPadding(slider, realSlides); 470 if (!animate) { 471 track.offsetHeight; 472 setTransition(track, true); 473 } 474 } 475 function revealActiveBox() { 476 window.requestAnimationFrame(function () { 477 slider.classList.remove('TOP-peek-slider--is-moving'); 478 }); 479 } 480 function finishMove() { 481 if (realSlides.length <= 1) { 482 isMoving = false; 483 revealActiveBox(); 484 return; 485 } 486 if (physicalIndex === 0) { 487 physicalIndex = realSlides.length; 488 render(false); 489 } 490 if (physicalIndex === realSlides.length + 1) { 491 physicalIndex = 1; 492 render(false); 493 } 494 isMoving = false; 495 revealActiveBox(); 496 } 497 function move(direction) { 498 if (isMoving || realSlides.length <= 1) { 499 return; 500 } 501 isMoving = true; 502 slider.classList.add('TOP-peek-slider--is-moving'); 503 physicalIndex += direction; 504 render(true); 505 window.clearTimeout(fallbackMoveTimer); 506 fallbackMoveTimer = window.setTimeout(finishMove, 700); 507 } 508 function scheduleRefresh() { 509 if (refreshFrame) { 510 window.cancelAnimationFrame(refreshFrame); 511 } 512 refreshFrame = window.requestAnimationFrame(function () { 513 refreshFrame = null; 514 render(false); 515 }); 516 } 517 var previousArrow = slider.querySelector('.et-pb-arrow-prev'); 518 var nextArrow = slider.querySelector('.et-pb-arrow-next'); 519 if (previousArrow) { 520 previousArrow.addEventListener('click', function (event) { 521 event.preventDefault(); 522 move(-1); 523 }); 524 } 525 if (nextArrow) { 526 nextArrow.addEventListener('click', function (event) { 527 event.preventDefault(); 528 move(1); 529 }); 530 } 531 track.addEventListener('transitionend', function (event) { 532 if (event.target === track) { 533 window.clearTimeout(fallbackMoveTimer); 534 finishMove(); 535 } 536 }); 537 var pointerStartX = null; 538 viewport.addEventListener('pointerdown', function (event) { 539 if (!event.isPrimary) { 540 return; 541 } 542 pointerStartX = event.clientX; 543 }); 544 viewport.addEventListener('pointerup', function (event) { 545 if (pointerStartX === null || !event.isPrimary) { 546 return; 547 } 548 var delta = event.clientX - pointerStartX; 549 pointerStartX = null; 550 if (Math.abs(delta) < 45) { 551 return; 552 } 553 move(delta < 0 ? 1 : -1); 554 }); 555 viewport.addEventListener('pointercancel', function () { 556 pointerStartX = null; 557 }); 558 Array.prototype.slice.call(slider.querySelectorAll('img')).forEac
558h(function (image) { 559 if (!image.complete) { 560 image.addEventListener('load', scheduleRefresh, { 561 once: true 562 }); 563 } 564 }); 565 if ('ResizeObserver' in window) { 566 var resizeObserver = new ResizeObserver(scheduleRefresh); 567 resizeObserver.observe(slider); 568 } else { 569 window.addEventListener('resize', scheduleRefresh); 570 } 571 render(false); 572 window.setTimeout(scheduleRefresh, 100); 573 } 574 function initAll(context) { 575 var root = context || document; 576 if (root.matches && root.matches(selector)) { 577 initSlider(root); 578 } 579 Array.prototype.slice.call(root.querySelectorAll(selector)).forEach(initSlider); 580 } 581 ready(function () { 582 initAll(document); 583 if ('MutationObserver' in window) { 584 var observer = new MutationObserver(function (mutations) { 585 mutations.forEach(function (mutation) { 586 Array.prototype.slice.call(mutation.addedNodes).forEach(function (node) { 587 if (node.nodeType === 1) { 588 initAll(node); 589 } 590 }); 591 }); 592 }); 593 observer.observe(document.body, { 594 childList: true, 595 subtree: true 596 }); 597 } 598 window.topstarInitPeekSliders = initAll; 599 }); 600})(); 601})(); 602 603// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 604(() => { 605/*!*************************************************************!*\ 606 !*** ./web/app/themes/topstar/js/_TOP-sticky-anchor-nav.js ***! 607 \*************************************************************/ 608(function () { 609 var selector = '.TOP-sticky-anchor-nav'; 610 function ready(callback) { 611 if (document.readyState === 'loading') { 612 document.addEventListener('DOMContentLoaded', callback); 613 return; 614 } 615 callback(); 616 } 617 function getFixedTopOffset() { 618 var fixedElements = Array.prototype.slice.call(document.querySelectorAll('#wpadminbar, #top-header, #main-header')); 619 var offset = 0; 620 fixedElements.forEach(function (element) { 621 var styles = window.getComputedStyle(element); 622 if (styles.display === 'none' || styles.visibility === 'hidden' || styles.position !== 'fixed' && styles.position !== 'sticky') { 623 return; 624 } 625 var rect = element.getBoundingClientRect(); 626 if (rect.width > 0 && rect.height > 0) { 627 offset = Math.max(offset, rect.bottom); 628 } 629 }); 630 return Math.max(offset, 0); 631 } 632 function getAnchorId(anchor) { 633 var hashIndex = anchor.indexOf('#'); 634 if (hashIndex === -1) { 635 return anchor.trim(); 636 } 637 return anchor.slice(hashIndex + 1).trim(); 638 } 639 function getTarget(link) { 640 var anchor = link.getAttribute('data-anchor') || link.getAttribute('href') || ''; 641 var id = getAnchorId(anchor); 642 if (!id) { 643 return null; 644 } 645 try { 646 return document.getElementById(decodeURIComponent(id)); 647 } catch (error) { 648 return document.getElementById(id); 649 } 650 } 651 function getColor(link, attribute, cssVariable, fallback) { 652 var dataValue = link.getAttribute(attribute); 653 var cssValue = window.getComputedStyle(link).getPropertyValue(cssVariable); 654 return dataValue || cssValue || fallback; 655 } 656 function parseColor(color) { 657 var value = String(color || '').trim(); 658 if (value.charAt(0) === '#') { 659 var hex = value.slice(1); 660 var normalized = hex.length === 3 ? hex.split('').map(function (part) { 661 return part + part;
662 }).join('') : hex.slice(0, 6); 663 if (/^[0-9a-f]{6}$/i.test(normalized)) { 664 return { 665 r: parseInt(normalized.slice(0, 2), 16), 666 g: parseInt(normalized.slice(2, 4), 16), 667 b: parseInt(normalized.slice(4, 6), 16) 668 }; 669 } 670 } 671 var rgb = value.match(/rgba?\(\s*([0-9.]+)[,\s]+([0-9.]+)[,\s]+([0-9.]+)/i); 672 if (rgb) { 673 return { 674 r: parseFloat(rgb[1]), 675 g: parseFloat(rgb[2]), 676 b: parseFloat(rgb[3]) 677 }; 678 } 679 return null; 680 } 681 function getReadableTextColor(backgroundColor) { 682 var rgb = parseColor(backgroundColor); 683 if (!rgb) { 684 return '#111111'; 685 } 686 var brightness = (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000; 687 return brightness < 180 ? '#FFFFFF' : '#111111'; 688 } 689 function initNavigation(navigation) { 690 if (navigation.hasAttribute('data-topstar-sticky-anchor-nav-initialized')) { 691 return; 692 } 693 var bar = navigation.querySelector('.TOP-sticky-anchor-nav__bar'); 694 var items = navigation.querySelector('.TOP-sticky-anchor-nav__items'); 695 var links = Array.prototype.slice.call(navigation.querySelectorAll('.TOP-sticky-anchor-nav__link')); 696 var stackingContexts = [navigation.closest('.et_pb_column'), navigation.closest('.et_pb_row'), navigation.closest('.et_pb_section')].filter(function (element, index, elements) { 697 return element && elements.indexOf(element) === index; 698 }); 699 if (!bar || !links.length) { 700 return; 701 } 702 navigation.setAttribute('data-topstar-sticky-anchor-nav-initialized', '1'); 703 var updateFrame = null; 704 var horizontalScrollFrame = null; 705 var currentActiveLink = null; 706 function scrollActiveLinkIntoView(link, behavior) { 707 if (!items || !link || items.scrollWidth <= items.clientWidth) { 708 return; 709 } 710 if (horizontalScrollFrame) { 711 window.cancelAnimationFrame(horizontalScrollFrame); 712 } 713 horizontalScrollFrame = window.requestAnimationFrame(function () { 714 var item = link.closest('.TOP-sticky-anchor-nav__item') || link; 715 var itemsRect = items.getBoundingClientRect(); 716 var itemRect = item.getBoundingClientRect(); 717 var maxScrollLeft = items.scrollWidth - items.clientWidth; 718 var targetScrollLeft = items.scrollLeft + itemRect.left - itemsRect.left - (items.clientWidth - itemRect.width) / 2; 719 var scrollLeft = Math.max(0, Math.min(targetScrollLeft, maxScrollLeft)); 720 var reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches; 721 horizontalScrollFrame = null; 722 try { 723 items.scrollTo({ 724 left: scrollLeft, 725 behavior: reducedMotion ? 'auto' : behavior 726 }); 727 } catch (error) { 728 items.scrollLeft = scrollLeft; 729 } 730 }); 731 } 732 function setActiveLink(activeLink, options) { 733 var link = activeLink || links[0]; 734 var settings = options || {}; 735 if (!link) { 736 return; 737 } 738 var didChange = currentActiveLink !== link; 739 var backgroundColor = getColor(link, 'data-background-color', '--topstar-sticky-anchor-entry-bg', '#FFFFFF'); 740 var underlineColor = getColor(link, 'data-underline-color', '--topstar-sticky-anchor-entry-underline', '#919E88'); 741 currentActiveLink = link; 742 navigation.style.setProperty('--topstar-sticky-anchor-bg', backgroundColor.trim()); 743 navigation.style.setProperty('--topstar-sticky-anchor-text', getReadableTextColor(backgroundColor)); 744 navigation.style.setProperty('--topstar-sticky-anchor-underline', underlineColor.trim()); 745 links.forEach(function (candidate) { 746 var isActive = candidate === link; 747 candidate.classList.toggle('is-active', isActive); 748 if (isActive) { 749 candidate.setAttribute('aria-current', 'true'); 750 } else { 751 candidate.removeAttribute('aria-current'); 752 } 753 }); 754 if (didChange || settings.forceHorizontalScroll) { 755 scrollActiveLinkIntoView(link, settings.horizontalScrollBehavior || 'smooth'); 756 } 757 } 758 function getCurrentLink() { 759 var documentHeight = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight); 760 var isAtPageBottom = window.pageYOffset + window.innerHeight >= documentHeight - 2; 761 var topOffset = getFixedTopOffset(); 762 var activationPoint = window.pageYOffset + topOffset + bar.offsetHeight + 8; 763 var currentLink = links[0]; 764 var lastTargetLink = null; 765 links.forEach(function (link) { 766 var target = getTarget(link); 767 if (!target) { 768 return; 769 } 770 lastTargetLink = link; 771 var targetTop = target.getBoundingClientRect().top + window.pageYOffset; 772 if (targetTop <= activationPoint) { 773 currentLink = link; 774 } 775 }); 776 if (isAtPageBottom && lastTargetLink) { 777 return lastTargetLink; 778 } 779 return currentLink; 780 } 781 function updateNavigation() { 782 updateFrame = null; 783 var topOffset = getFixedTopOffset(); 784 var rect = navigation.getBoundingClientRect(); 785 var shouldStick = rect.top <= topOffset; 786 navigation.style.setProperty('--topstar-sticky-anchor-height', "".concat(Math.ceil(bar.offsetHeight), "px")); 787 navigation.style.setProperty('--topstar-sticky-anchor-top-offset', "".concat(topOffset, "px")); 788 navigation.style.setProperty('--topstar-sticky-anchor-left', "".concat(Math.max(rect.left, 0), "px")); 789 navigation.style.setProperty('--topstar-sticky-anchor-width', "".concat(rect.width, "px")); 790 navigation.classList.toggle('is-stuck', shouldStick);
791 stackingContexts.forEach(function (element) { 792 element.classList.toggle('TOP-sticky-anchor-nav-stacking-context', shouldStick); 793 }); 794 setActiveLink(getCurrentLink()); 795 } 796 function scheduleUpdate() { 797 if (updateFrame) { 798 return; 799 } 800 updateFrame = window.requestAnimationFrame(updateNavigation); 801 } 802 links.forEach(function (link) { 803 link.addEventListener('click', function (event) { 804 var target = getTarget(link); 805 if (!target) { 806 return; 807 } 808 event.preventDefault(); 809 setActiveLink(link, { 810 forceHorizontalScroll: true, 811 horizontalScrollBehavior: 'smooth' 812 }); 813 var targetTop = target.getBoundingClientRect().top + window.pageYOffset; 814 var scrollTop = Math.max(targetTop - getFixedTopOffset() - bar.offsetHeight - 16, 0); 815 var reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches; 816 try { 817 window.scrollTo({ 818 top: scrollTop, 819 behavior: reducedMotion ? 'auto' : 'smooth' 820 }); 821 } catch (error) { 822 window.scrollTo(0, scrollTop); 823 } 824 if (window.history && window.history.pushState) { 825 window.history.pushState(null, document.title, link.getAttribute('href')); 826 } 827 }); 828 }); 829 window.addEventListener('scroll', scheduleUpdate, { 830 passive: true 831 }); 832 window.addEventListener('resize', scheduleUpdate); 833 window.addEventListener('load', scheduleUpdate); 834 if ('ResizeObserver' in window) { 835 var resizeObserver = new ResizeObserver(scheduleUpdate); 836 resizeObserver.observe(navigation); 837 resizeObserver.observe(bar); 838 } 839 setActiveLink(getCurrentLink(), { 840 forceHorizontalScroll: true, 841 horizontalScrollBehavior: 'auto' 842 }); 843 scheduleUpdate(); 844 window.setTimeout(scheduleUpdate, 100); 845 } 846 function initAll(context) { 847 var root = context || document; 848 if (root.matches && root.matches(selector)) { 849 initNavigation(root); 850 } 851 Array.prototype.slice.call(root.querySelectorAll(selector)).forEach(initNavigation); 852 } 853 ready(function () { 854 initAll(document); 855 if ('MutationObserver' in window) { 856 var observer = new MutationObserver(function (mutations) { 857 mutations.forEach(function (mutation) { 858 Array.prototype.slice.call(mutation.addedNodes).forEach(function (node) { 859 if (node.nodeType === 1) { 860 initAll(node); 861 } 862 }); 863 }); 864 }); 865 observer.observe(document.body, { 866 childList: true, 867 subtree: true 868 }); 869 } 870 window.topstarInitStickyAnchorNav = initAll; 871 }); 872})(); 873})(); 874 875// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 876(() => { 877/*!*********************************************************!*\ 878 !*** ./web/app/themes/topstar/js/_TOP-video-gallery.js ***! 879 \*********************************************************/ 880(function (window, document) { 881 'use strict'; 882 883 var gallerySelector = '[data-topstar-video-gallery]'; 884 function ready(callback) { 885 if (document.readyState === 'loading') { 886 document.addEventListener('DOMContentLoaded', callback); 887 return; 888 } 889 callback(); 890 } 891 function getCategorySlugs(card) { 892 var inner = card.querySelector('[data-topstar-video-categories]'); 893 var value = inner ? inner.getAttribute('data-topstar-video-categories') : ''; 894 return String(value || '').split(',').map(function (category) { 895 return category.trim(); 896 }).filter(Boolean); 897 } 898 function hasVideoConsent(gallery) { 899 if (gallery.getAttribute('data-consent-bypass') === '1') { 900 return true; 901 } 902 return Boolean(window.Cookiebot && window.Cookiebot.consent && window.Cookiebot.consent.preferences && window.Cookiebot.consent.statistics && window.Cookiebot.consent.marketing); 903 } 904 function getFocusableElements(container) { 905 return Array.prototype.slice.call(container.querySelectorAll('a[href]:not([hidden]), button:not([disabled]):not([hidden]), iframe:not([hidden]), [tabindex]:not
905([tabindex="-1"]):not([hidden])')).filter(function (element) { 906 return element.offsetParent !== null; 907 }); 908 } 909 function initVideoGallery(gallery) { 910 if (!gallery || gallery.hasAttribute('data-topstar-video-gallery-initialized')) { 911 return; 912 } 913 var cards = Array.prototype.slice.call(gallery.querySelectorAll('.TOP-video-card')); 914 var filterButtons = Array.prototype.slice.call(gallery.querySelectorAll('[data-video-filter]')); 915 var status = gallery.querySelector('.TOP-video-gallery__status'); 916 var lightbox = gallery.querySelector('[data-topstar-video-lightbox]'); 917 var dialog = lightbox ? lightbox.querySelector('.TOP-video-gallery__lightbox-dialog') : null; 918 var player = lightbox ? lightbox.querySelector('[data-video-lightbox-player]') : null; 919 var consent = lightbox ? lightbox.querySelector('[data-video-lightbox-consent]') : null; 920 var lightboxTitle = lightbox ? lightbox.querySelector('[data-video-lightbox-title]') : null; 921 var closeTriggers = lightbox ? Array.prototype.slice.call(lightbox.querySelectorAll('[data-video-lightbox-close]')) : []; 922 var lightboxParent = lightbox ? lightbox.parentNode : null; 923 var lightboxNextSibling = lightbox ? lightbox.nextSibling : null; 924 var currentVideoId = ''; 925 var currentVideoTitle = ''; 926 var previouslyFocused = null; 927 gallery.setAttribute('data-topstar-video-gallery-initialized', '1'); 928 function updateStatus(visibleCount) { 929 if (!status) { 930 return; 931 } 932 var singular = gallery.getAttribute('data-video-singular') || 'video'; 933 var plural = gallery.getAttribute('data-video-plural') || 'videos'; 934 status.textContent = visibleCount + ' ' + (visibleCount === 1 ? singular : plural); 935 } 936 function setFilter(filter) { 937 var visibleCount = 0; 938 filterButtons.forEach(function (button) { 939 var active = button.getAttribute('data-video-filter') === filter; 940 button.classList.toggle('is-active', active); 941 button.setAttribute('aria-pressed', active ? 'true' : 'false'); 942 }); 943 cards.forEach(function (card) { 944 var visible = filter === 'all' || getCategorySlugs(card).indexOf(filter) !== -1; 945 card.hidden = !visible; 946 if (visible) { 947 visibleCount += 1; 948 } 949 }); 950 gallery.setAttribute('data-active-video-filter', filter); 951 updateStatus(visibleCount); 952 } 953 function removePlayer() { 954 if (player) { 955 player.innerHTML = ''; 956 player.hidden = true; 957 } 958 } 959 function mountLightbox() { 960 if (!lightbox || !document.body || lightbox.parentNode === document.body) { 961 return; 962 } 963 var activeColor = window.getComputedStyle(gallery).getPropertyValue('--topstar-video-gallery-active-color').trim(); 964 if (activeColor) { 965 lightbox.style.setProperty('--topstar-video-gallery-active-color', activeColor); 966 } 967 document.body.appendChild(lightbox); 968 } 969 function restoreLightbox() { 970 if (!lightbox || !lightboxParent || lightbox.parentNode === lightboxParent) { 971 return; 972 } 973 if (lightboxNextSibling && lightboxNextSibling.parentNode === lightboxParent) { 974 lightboxParent.insertBefore(lightbox, lightboxNextSibling); 975 return; 976 } 977 lightboxParent.appendChild(lightbox); 978 } 979 function showConsent() { 980 removePlayer(); 981 if (consent) { 982 consent.hidden = false; 983 } 984 } 985 function loadCurrentVideo() { 986 if (!player || !currentVideoId) { 987 return; 988 } 989 if (!hasVideoConsent(gallery)) { 990 showConsent(); 991 return; 992 } 993 if (consent) { 994 consent.hidden = true; 995 } 996 player.hidden = false; 997 player.innerHTML = ''; 998 var iframe = document.createElement('iframe'); 999 iframe.src = 'https://www.youtube-nocookie.com/embed/' + encodeURIComponent(currentVideoId) + '?autoplay=1&rel=0'; 1000 iframe.title = currentVideoTitle || 'YouTube video'; 1001 iframe.allow = 'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share'; 1002 iframe.allowFullscreen = true; 1003 iframe.setAttribute('referrerpolicy', 'strict-origin-when-cross-origin'); 1004 player.appendChild(iframe); 1005 } 1006 function openLightbox(trigger) { 1007 if (!lightbox || !dialog) { 1008 return; 1009 } 1010 currentVideoId = trigger.getAttribute('data-topstar-video-id') || ''; 1011 currentVideoTitle = trigger.getAttribute('data-topstar-video-title') || ''; 1012 if (!/^[A-Za-z0-9_-]{11}$/.test(currentVideoId)) { 1013 return; 1014 } 1015 previouslyFocused = document.activeElement; 1016 if (lightboxTitle) { 1017 lightboxTitle.textContent = currentVideoTitle; 1018 } 1019 mountLightbox(); 1020 lightbox.hidden = false;
1021 lightbox.classList.add('is-open'); 1022 document.body.classList.add('TOP-video-gallery-lightbox-open'); 1023 loadCurrentVideo(); 1024 window.requestAnimationFrame(function () { 1025 var closeButton = lightbox.querySelector('.TOP-video-gallery__lightbox-close'); 1026 (closeButton || dialog).focus(); 1027 }); 1028 } 1029 function closeLightbox() { 1030 if (!lightbox || lightbox.hidden) { 1031 return; 1032 } 1033 lightbox.classList.remove('is-open'); 1034 lightbox.hidden = true; 1035 currentVideoId = ''; 1036 currentVideoTitle = ''; 1037 removePlayer(); 1038 if (consent) { 1039 consent.hidden = true; 1040 } 1041 if (!document.querySelector('.TOP-video-gallery__lightbox.is-open')) { 1042 document.body.classList.remove('TOP-video-gallery-lightbox-open'); 1043 } 1044 restoreLightbox(); 1045 if (previouslyFocused && typeof previouslyFocused.focus === 'function') { 1046 previouslyFocused.focus(); 1047 } 1048 } 1049 function trapDialogFocus(event) { 1050 if (!lightbox || lightbox.hidden) { 1051 return; 1052 } 1053 if (event.key === 'Escape') { 1054 event.preventDefault(); 1055 closeLightbox(); 1056 return; 1057 } 1058 if (event.key !== 'Tab') { 1059 return; 1060 } 1061 var focusable = getFocusableElements(dialog); 1062 if (!focusable.length) { 1063 event.preventDefault(); 1064 dialog.focus(); 1065 return; 1066 } 1067 var first = focusable[0]; 1068 var last = focusable[focusable.length - 1]; 1069 if (event.shiftKey && document.activeElement === first) { 1070 event.preventDefault(); 1071 last.focus(); 1072 } else if (!event.shiftKey && document.activeElement === last) { 1073 event.preventDefault(); 1074 first.focus(); 1075 } 1076 } 1077 filterButtons.forEach(function (button) { 1078 button.addEventListener('click', function () { 1079 setFilter(button.getAttribute('data-video-filter') || 'all'); 1080 }); 1081 }); 1082 cards.forEach(function (card) { 1083 var trigger = card.querySelector('[data-topstar-video-id]'); 1084 if (trigger) { 1085 trigger.addEventListener('click', function () { 1086 openLightbox(trigger); 1087 }); 1088 } 1089 }); 1090 closeTriggers.forEach(function (trigger) { 1091 trigger.addEventListener('click', closeLightbox); 1092 }); 1093 if (lightbox) { 1094 lightbox.addEventListener('keydown', trapDialogFocus); 1095 } 1096 ['CookiebotOnAccept', 'CookiebotOnConsentReady', 'CookiebotOnLoad'].forEach(function (eventName) { 1097 window.addEventListener(eventName, function () { 1098 if (lightbox && !lightbox.hidden && currentVideoId && hasVideoConsent(gallery)) { 1099 loadCurrentVideo(); 1100 } 1101 }); 1102 }); 1103 setFilter('all'); 1104 } 1105 function initVideoGalleries(scope) { 1106 var root = scope && scope.querySelectorAll ? scope : document; 1107 var galleries = []; 1108 if (root.matches && root.matches(gallerySelector)) { 1109 galleries.push(root); 1110 } 1111 Array.prototype.push.apply(galleries, root.querySelectorAll(gallerySelector)); 1112 galleries.forEach(initVideoGallery); 1113 } 1114 window.topstarInitVideoGalleries = initVideoGalleries; 1115 ready(function () { 1116 initVideoGalleries(document); 1117 }); 1118})(window, document); 1119})(); 1120 1121// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 1122(() => { 1123/*!********************************************************!*\ 1124 !*** ./web/app/themes/topstar/js/_TOP-video-slider.js ***! 1125 \********************************************************/ 1126jQuery(document).ready(function ($) { 1127 function storeOriginalSrc($slider) { 1128 $slider.find('.et_pb_video_box iframe').each(function () { 1129 var $iframe = $(this); 1130 var src = $iframe.attr('src'); 1131 if (!$iframe.attr('data-dinited-original-src') && src && src !== 'about:blank') { 1132 $iframe.attr('data-dinited-original-src', src); 1133 } 1134 }); 1135 } 1136 function reloadActiveIframe($slider) { 1137 var $iframe = $slider.find('.et-pb-active-slide .et_pb_video_box iframe').first(); 1138 var originalSrc = $iframe.attr('data-dinited-original-src'); 1139 if (!$iframe.length || !$iframe.attr('data-dinited-reload-on-active') || !originalSrc) { 1140 return; 1141 } 1142 $iframe.removeAttr('data-dinited-reload-on-active'); 1143 window.setTimeout(function () { 1144 var $activeSlide = $iframe.closest('.et_pb_slide'); 1145 if (!$activeSlide.hasClass('et-pb-active-slide')) { 1146 return; 1147 } 1148 $iframe.attr('src', 'about:blank'); 1149 window.setTimeout(function () { 1150 if ($activeSlide.hasClass('et-pb-active-slide')) { 1151 $iframe.attr('src', originalSrc); 1152 } 1153 }, 0); 1154 }, 50); 1155 } 1156 $('.TOP-video-slider .et_pb_video_slider .et_pb_slider').each(function () { 1157 var $slider = $(this); 1158 storeOriginalSrc($slider); 1159 $slider.on('simple_slider_before_move_to', function () { 1160 $slider.find('.et-pb-active-slide .et_pb_video_box iframe').attr('data-dinited-reload-on-active', '1'); 1161 }); 1162 $slider.on('simple_slider_after_move_to', function () { 1163 storeOriginalSrc($slider); 1164 reloadActiveIframe($slider); 1165 }); 1166 }); 1167}); 1168})(); 1169 1170// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 1171(() => { 1172/*!*******************************************************!*\ 1173 !*** ./web/app/themes/topstar/js/_WL-126-agentmap.js ***! 1174 \*******************************************************/ 1175jQuery(document).ready(function ($) { 1176 // reset 1177 $(".sec_ap, .sec_ap *").removeClass("selected active"); 1178 $(".data__contactperson").hide(); 1179 1180 // onload 1181 $(".sec_ap").addClass("loaded"); 1182 $(".data__contactperson__wrapper").addClass("anim-fadein"); 1183 1184 // click event ⺠pin 1185 $('.map_ap__pin').click(function () { 1186 // reset map pin 1187 $('.map_ap__pin').removeClass('selected'); 1188 $('.data__contactperson').hide(); 1189 var activePin = $(this); 1190 activePin.addClass('selected'); 1191 var name = activePin.data('name') || ''; 1192 var identifier = activePin.data("plz") || ''; 1193 if (identifier && name) { 1194 console.log("identifie and name set");
1195 $('.data__plz__counter').html(name); 1196 $('.' + identifier).show(); 1197 var section = $('.sec_ap'); 1198 if (!section.hasClass('active open_infobox')) { 1199 // fade-in infobox 1200 section.addClass('active open_infobox'); 1201 // fix mobile infobox header 1202 setTimeout(function () { 1203 return $('.sec_ap').addClass('fixed'); 1204 }, 1500); 1205 } 1206 var counter = $('.data__contactperson:visible').length; 1207 var counterClass = 'show-scroll'; 1208 console.log(counter); 1209 if (counter >= 2) { 1210 section.addClass(counterClass); 1211 } else { 1212 section.removeClass(counterClass); 1213 } 1214 } 1215 }); 1216 // click event ⺠infobox header 1217 $(".infobox__mobile").click(function () { 1218 var section = $('.sec_ap'); 1219 var counterClass = 'show-scroll'; 1220 // infobox animation 1221 if (section.hasClass("open_infobox")) { 1222 section.removeClass("active open_infobox fixed"); 1223 section.removeClass(counterClass); 1224 } else { 1225 $(".sec_ap").addClass("open_infobox"); 1226 var counter = $('.data__contactperson:visible').length; 1227 console.log(counter); 1228 if (counter >= 2) { 1229 section.addClass(counterClass); 1230 } else { 1231 section.removeClass(counterClass); 1232 } 1233 // fix mobile infobox header 1234 setTimeout(function () { 1235 $(".sec_ap").addClass("fixed"); 1236 }, 1500); 1237 } 1238 }); 1239}); 1240})(); 1241 1242// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 1243(() => { 1244/*!***********************************************************!*\ 1245 !*** ./web/app/themes/topstar/js/_WL-129-slider-hover.js ***! 1246 \***********************************************************/ 1247jQuery(document).ready(function ($) { 1248 $(".product-link").each(function (index) { 1249 var linkElement = $(this).attr('href').split("/").reverse()[1]; 1250 var hoverImage = window.location.origin + "/wp-content/uploads/hover-".concat(linkElement, ".jpeg"); 1251 if (typeof linkElement === 'undefined' || typeof hoverImage === 'undefined') return; 1252 var imgElement = $(this).find('img').first(); 1253 if (typeof imgElement === 'undefined') return; 1254 var normalImage = imgElement.attr('src'); 1255 $(this).mouseenter(function () { 1256 console.log(hoverImage); 1257 $.ajax({ 1258 url: hoverImage, 1259 error: function error(request, status, _error) {}, 1260 success: function success() { 1261 imgElement.attr("src", hoverImage); 1262 } 1263 }); 1264 }).mouseleave(function () { 1265 imgElement.attr("src", normalImage); 1266 }); 1267 }); 1268}); 1269})(); 1270 1271// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 1272(() => { 1273/*!************************************************************************!*\ 1274 !*** ./web/app/themes/topstar/js/_WL-150-auto-height-on-html-patch.js ***! 1275 \************************************************************************/ 1276function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } 1277function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } 1278function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } 1279function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } 1280function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } 1281function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } 1282var Observe = function Observe(sel, opt, cb) { 1283 var Obs = new MutationObserver(function (m) { 1284 return _toConsumableArray(m).forEach(cb); 1285 }); 1286 document.querySelectorAll(sel).forEach(function (el) { 1287 return Obs.observe(el, opt); 1288 }); 1289}; 1290jQuery(document).ready(function ($) { 1291 Observe("html", { 1292 childList: false, 1293 subtree: false, 1294 characterDataOldValue: true, 1295 attributesList: ["style"], 1296 attributeOldValue: true 1297 }, function (m) { 1298 var _m$target$attributes; 1299 if ('style' === m.attributeName && 'height: auto;' === ((_m$target$attributes = m.target.attributes) === null || _m$target$attributes === void 0 || (_m$target$attributes = _m$target$attributes.style) === null || _m$target$attributes === void 0 ? void 0 : _m$target$attributes.nodeValue)) { 1300 $('html').css('height', ''); 1301 } 1302 }); 1303}); 1304})(); 1305 1306// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 1307(() => { 1308/*!***************************************************!*\ 1309 !*** ./web/app/themes/topstar/js/_WL-2-flyout.js ***! 1310 \***************************************************/ 1311jQuery(document).ready(function ($) { 1312 if (true) return; 1313 var backButtonText = function backButtonText($) { 1314 switch ($('form.et-search-form > input[name="lang"]').attr('value')) { 1315 case 'de': 1316 return 'Zurück'; 1317 case 'en': 1318 default: 1319 return 'Back'; 1320 } 1321 }; 1322 var backButton = function backButton($) { 1323 var element = $('<li></li>', { 1324 "class": 'menu-item menu-item-type-post_type menu-item-object-page menu-item-back' 1325 }).wrapInner(function () { 1326 return $('<a></a>', { 1327 // @todo: should be language aware 1328 text: backButtonText($), 1329 href: '#' 1330 }); 1331 }); 1332 element.on('click', function (event) { 1333 if (!($(event.target).is($(element)) || $(event.target).parent().is($(element)))) return; 1334 $('li.menu-item-back').trigger('menu:back', $(event.currentTarget).parent()); 1335 event.preventDefault(); 1336 }); 1337 return element; 1338 }; 1339 var setupMenuToggle = function setupMenuToggle($) { 1340 $('ul#mobile_menu_slide').on('menu:toggle', function (event, activeMenu) { 1341 $(activeMenu).parent().children('li').filter(function (_, element) { 1342 return !$(element).is($(activeMenu)); 1343 }).each(function (_, element) { 1344 return $(element).addClass('wl-2-hide'); 1345 }); 1346 if (0 === $(activeMenu).children('ul').children('li.menu-item-back').length) { 1347 var backButtonElement = backButton($);
1348 backButtonElement.prependTo($(activeMenu).parent()).first(); 1349 $(activeMenu).children('a').children('span').css('display', 'none'); 1350 backButtonElement.on('menu:back', function (event, activeMenu) { 1351 var dropdown = $('ul.et_pb_slide_dropdown_opened'); 1352 dropdown.slideToggle(1, 'easeInOutCubic'); 1353 $('li.menu-item-back').remove(); 1354 $(activeMenu).children('li').each(function (_, element) { 1355 return $(element).removeClass('wl-2-hide'); 1356 }); 1357 $('span.et_pb_submenu_opened').css('display', ''); 1358 dropdown.removeClass('et_pb_slide_dropdown_opened'); 1359 dropdown.css('display', ''); 1360 dropdown.parent().children('a').children('span').removeClass('et_pb_submenu_opened').addClass('et_mobile_menu_arrow'); 1361 $('li.menu-item-back').each(function (_, el) { 1362 return el.remove(); 1363 }); 1364 }); 1365 } 1366 }); 1367 $('li.menu-item-has-children').each(function (_, element) { 1368 $(element).on("click", function (event) { 1369 if (!($(event.target).is($(element)) || $(event.target).parent().is($(element)))) return; 1370 if ($(element).parent().children('.menu-item-back').length) { 1371 window.location.href = $(element).children('a').attr('href'); 1372 } 1373 $('ul#mobile_menu_slide').trigger('menu:toggle', $(element)); 1374 }); 1375 }); 1376 }; 1377 setupMenuToggle($); 1378}); 1379})(); 1380 1381// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 1382(() => { 1383/*!*********************************************************!*\ 1384 !*** ./web/app/themes/topstar/js/_WL-23-news-filter.js ***! 1385 \*********************************************************/ 1386// news filter 1387jQuery(document).ready(function ($) { 1388 $(".dinited-category-filter a").each(function (index) { 1389 $(this).on("click", function (event) { 1390 event.preventDefault(); 1391 $(".dinited-category-filter a.WL-23-active").removeClass("WL-23-active"); 1392 $(this).addClass("WL-23-active"); 1393 var href = $(this).attr('href'); 1394 $('.dsm-blog-carousel-item-filter').addClass('WL-23-hide').filter('.' + href).removeClass('WL-23-hide'); 1395 }); 1396 }); 1397}); 1398})(); 1399 1400// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 1401(() => { 1402/*!**********************************************************************!*\ 1403 !*** ./web/app/themes/topstar/js/_WL-314-block-fonts-google-maps.js ***! 1404 \**********************************************************************/ 1405jQuery(document).ready(function ($) { 1406 var head = document.getElementsByTagName('head')[0]; 1407 var insertBefore = head.insertBefore; 1408 head.insertBefore = function (newElement, referenceElement) { 1409 if (newElement.href && newElement.href.indexOf('//fonts.googleapis.com') > -1) { 1410 return; 1411 } 1412 insertBefore.call(head, newElement, referenceElement); 1413 }; 1414}); 1415})(); 1416 1417// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 1418(() => { 1419/*!**************************************************************!*\ 1420 !*** ./web/app/themes/topstar/js/_WL-38-mobile-accordeon.js ***! 1421 \**************************************************************/ 1422// accordeon functions on mobile devices 1423jQuery(document).ready(function ($) { 1424 $('.wl-38-footer-wrapper .menu-item-has-children a[href="#"]').each(function (_, element) { 1425 $(element).on('click', function (event) { 1426 event.preventDefault(); 1427 var parent = $(this).parent().find('.sub-menu'); 1428 parent.removeClass('wl-38-show'); 1429 parent.toggleClass('wl-38-show'); 1430 }); 1431 }); 1432}); 1433})(); 1434 1435// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules. 1436(() => { 1437/*!**********************************************!*\ 1438 !*** ./web/app/themes/topstar/js/nostick.js ***! 1439 \**********************************************/ 1440 1441})(); 1442 1443/******/ })() 1444;
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.