1 2/** 3 * @param fn 4 */ 5function docReady(fn) { 6 if (document.readyState != 'loading') { 7 fn(); 8 } else { 9 document.addEventListener('DOMContentLoaded', fn); 10 } 11} 12 13/** 14 * @param fnc 15 * @param delay 16 * @returns {Function} 17 */ 18const debounce = function (fnc, delay) { 19 var delayed = undefined; 20 return function (e) { 21 clearTimeout(delayed); 22 delayed = setTimeout((function () { 23 fnc(e); 24 }), delay); 25 }; 26}; 27 28/** 29 * @param offset 30 * @param callback 31 */ 32const scrollTo = function (offset, callback) { 33 const onScroll = function () { 34 const scrollTop = window.scrollTop || window.pageYOffset; 35 36 if (scrollTop === offset) { 37 window.removeEventListener('scroll', onScroll); 38 if (callback) callback(); 39 } 40 }; 41 window.addEventListener('scroll', onScroll); 42 onScroll(); 43 window.scrollTo({ 44 top: offset, 45 behavior: 'smooth' 46 }) 47}; 48 49/** 50 * @param el 51 */ 52function getOffset(el) { 53 const rect = el.getBoundingClientRect(); 54 return { 55 left: rect.left + window.scrollX, 56 top: rect.top + window.scrollY 57 }; 58} 59 60// https://tc39.github.io/ecma262/#sec-array.prototype.find 61if (!Array.prototype.find) { 62 Object.defineProperty(Array.prototype, 'find', { 63 value: function(predicate) { 64 // 1. Let O be ? ToObject(this value). 65 if (this == null) { 66 throw TypeError('"this" is null or not defined'); 67 } 68 69 var o = Object(this); 70 71 // 2. Let len be ? ToLength(? Get(O, "length")). 72 var len = o.length >>> 0; 73 74 // 3. If IsCallable(predicate) is false, throw a TypeError exception. 75 if (typeof predicate !== 'function') { 76 throw TypeError('predicate must be a function'); 77 } 78 79 // 4. If thisArg was supplied, let T be thisArg; else let T be undefined. 80 var thisArg = arguments[1]; 81 82 // 5. Let k be 0. 83 var k = 0; 84 85 // 6. Repeat, while k < len 86 while (k < len) { 87 // a. Let Pk be ! ToString(k). 88 // b. Let kValue be ? Get(O, Pk). 89 // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)). 90 // d. If testResult is true, return kValue. 91 var kValue = o[k]; 92 if (predicate.call(thisArg, kValue, k, o)) { 93 return kValue; 94 } 95 // e. Increase k by 1. 96 k++; 97 } 98 99 // 7. Return undefined. 100 return undefined; 101 }, 102 configurable: true, 103 writable: true 104 }); 105} 106 107// Polyfill for NodeList.forEach 108if ('NodeList' in window && !NodeList.prototype.forEach) { 109 NodeList.prototype.forEach = function (callback, thisArg) { 110 thisArg = thisArg || window; 111 for (var i = 0; i < this.length; i++) { 112 callback.call(thisArg, this[i], i, this); 113 } 114 }; 115} 116 117// Polyfill for HTMLCollection.forEach 118if ('HTMLCollection' in window && !HTMLCollection.prototype.forEach) { 119 HTMLCollection.prototype.forEach = function (callback, thisArg) { 120 thisArg = thisArg || window; 121 for (var i = 0; i < this.length; i++) { 122 callback.call(thisArg, this[i], i, this); 123 } 124 }; 125} 126 127// Element.closest() polyfill 128if (!Element.prototype.matches) { 129 Element.prototype.matches = 130 Element.prototype.msMatchesSelector || 131 Element.prototype.webkitMatchesSelector; 132} 133 134if (!Element.prototype.closest) { 135 Element.prototype.closest = function(s) { 136 var el = this; 137 138 do { 139 if (Element.prototype.matches.call(el, s)) return el; 140 el = el.parentElement || el.parentNode; 141 } while (el !== null && el.nodeType === 1); 142 return null; 143 }; 144} 145 146/** 147 * Object.entriesFrom() polyfill 148 * @author Chris Ferdinandi 149 * @license MIT 150 */ 151if (!Object.fromEntries) { 152 Object.fromEntries = function (entries){ 153 if (!entries || !entries[Symbol.iterator]) { throw new Error('Object.fromEntries() requires a single iterable argument'); } 154 let obj = {};
155 for (let [key, value] of entries) { 156 obj[key] = value; 157 } 158 return obj; 159 }; 160} 161 162/** 163 * Object.entries() polyfill 164 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries 165 */ 166if (!Object.entries) { 167 Object.entries = function (obj){ 168 var ownProps = Object.keys(obj), 169 i = ownProps.length, 170 resArray = new Array(i); // preallocate the Array 171 172 while (i--) 173 resArray[i] = [ownProps[i], obj[ownProps[i]]]; 174 175 return resArray; 176 177 }; 178} 179 180/** 181 * @param breakpointWidth 182 */ 183const checkIfMobile = function (breakpointWidth) { 184 breakpointWidth = breakpointWidth || '991px'; // 61.938rem == 991px : rem has issues with mobile safari init 185 const mediaquery = window.matchMedia('(max-width: ' + breakpointWidth + ')'); 186 return mediaquery.matches; 187}; 188 189/** 190 * trigger an event 191 * 192 * @param el 193 * @param eventName 194 */ 195const triggerEvent = function (el,eventName){ 196 var event; 197 if(document.createEvent){ 198 event = document.createEvent('HTMLEvents'); 199 event.initEvent(eventName,true,true); 200 }else if(document.createEventObject){// IE < 9 201 event = document.createEventObject(); 202 event.eventType = eventName; 203 } 204 event.eventName = eventName; 205 if(el.dispatchEvent){ 206 el.dispatchEvent(event); 207 }else if(el.fireEvent && htmlEvents['on'+eventName]){// IE < 9 208 el.fireEvent('on'+event.eventType,event);// can trigger only real event (e.g. 'click') 209 }else if(el[eventName]){ 210 el[eventName](); 211 }else if(el['on'+eventName]){ 212 el['on'+eventName](); 213 } 214}; 215 216const addEvent = function (el,type,handler){ 217 if(el.addEventListener){ 218 el.addEventListener(type,handler,false); 219 }else if(el.attachEvent && htmlEvents['on'+type]){// IE < 9 220 el.attachEvent('on'+type,handler); 221 }else{ 222 el['on'+type]=handler; 223 } 224}; 225 226const removeEvent = function (el,type,handler){ 227 if(el.removeventListener){ 228 el.removeEventListener(type,handler,false); 229 }else if(el.detachEvent && htmlEvents['on'+type]){// IE < 9 230 el.detachEvent('on'+type,handler); 231 }else{ 232 el['on'+type]=null; 233 } 234}; 235 236/** 237 * convert object to url helper 238 */ 239const convertObjectToUrl = function (urlObject) { 240 var url = ""; 241 242 for (let key in urlObject) { 243 if (url != "") url += "&"; 244 245 if (urlObject[ key ] && Array.isArray(urlObject[ key ])) { 246 // remove empty elements from array 247 urlObject[ key ] = urlObject[ key ].filter(Boolean); 248 249 // iterate through items and set the specific value 250 urlObject[ key ].forEach(function (value, index) { 251 // check if entry is not last element 252 let urlParam = ""; 253 if (urlObject[ key ].length - 1 > index) urlParam = "&"; 254 let decodedValue = decodeURIComponent(decodeURIComponent(value)); 255 url += key + "[" + index + "]" + "=" + decodedValue.replace('&', '%26') + urlParam; 256 }); 257 } else { 258 url += key + "=" + encodeURIComponent(urlObject[ key ]); 259 } 260 } 261 return url; 262}; 263 264// get top position of an element 265function getTopPosition(elem) { 266 var box = elem.getBoundingClientRect(); 267 return { 268 top: box.top + pageYOffset, 269 }; 270} 271 272/** 273 * Get param helper 274 */ 275const getAllUrlParams = function (url) { 276 // get query string from url (optional) or window 277 var queryString = url ? url.split('?')[ 1 ] : window.location.search.slice(1); 278 queryString = decodeURI(queryString); 279 280 // we'll store the parameters here 281 var obj = {}; 282 283 // if query string exists 284 if (queryString) { 285 286 // stuff after # is not part of query string, so get rid of it 287 queryString = queryString.split('#')[ 0 ]; 288 289 // split our query string into its component parts 290 var arr = queryString.split('&'); 291 292 for (var i = 0; i < arr.length; i++) { 293 // separate the keys and the values 294 var a = arr[ i ].split('='); 295 296 // set parameter name and value (use 'true' if empty) 297 var paramName = a[ 0 ]; 298 var paramValue = typeof (a[ 1 ]) === 'undefined' ? true : a[ 1 ]; 299 300 // (optional) keep case consistent 301 paramName = paramName.toLowerCase(); 302 // remove transforming value to lowercase 303 //if (typeof paramValue === 'string') paramValue = paramValue.toLowerCase(); 304 305 // if the paramName ends with square brackets, e.g. colors[] or colors[2] 306 if (paramName.match(/\[(\d+)?\]$/)) { 307 // create key if it doesn't exist 308 var key = paramName.replace(/\[(\d+)?\]/, ''); 309 if (!obj[ key ]) obj[ key ] = []; 310 311 // if it's an indexed array e.g. colors[2] 312 if (paramName.match(/\[\d+\]$/)) { 313 // get the index value and add the entry at the appropriate position 314 var index = /\[(\d+)\]/.exec(paramName)[ 1 ]; 315 obj[ key ][ index ] = paramValue; 316 // filter out empty values from array
317 obj[ key ] = obj[ key ].filter(Boolean); 318 } else { 319 // otherwise add the value to the end of the array 320 obj[ key ].push(paramValue); 321 } 322 } else { 323 // we're dealing with a string 324 if (!obj[ paramName ]) { 325 // if it doesn't exist, create property 326 obj[ paramName ] = paramValue; 327 } else if (obj[ paramName ] && typeof obj[ paramName ] === 'string') { 328 // if property does exist and it's a string, convert it to an array 329 obj[ paramName ] = [ obj[ paramName ] ]; 330 obj[ paramName ].push(paramValue); 331 } else { 332 // otherwise add the property 333 obj[ paramName ].push(paramValue); 334 } 335 } 336 } 337 } 338 339 return obj; 340}; 341 342"use strict";!function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.ResizeSensor=t()}("undefined"!=typeof window?window:this,function(){if("undefined"==typeof window)return null;var e="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),t=e.requestAnimationFrame||e.mozRequestAnimationFrame||e.webkitRequestAnimationFrame||function(t){return e.setTimeout(t,20)};function n(e,t){var n=Object.prototype.toString.call(e),i="[object Array]"===n||"[object NodeList]"===n||"[object HTMLCollection]"===n||"[object Object]"===n||"undefined"!=typeof jQuery&&e instanceof jQuery||"undefined"!=typeof Elements&&e instanceof Elements,o=0,r=e.length;if(i)for(;o<r;o++)t(e[o]);else t(e)}function i(e){if(!e.getBoundingClientRect)return{width:e.offsetWidth,height:e.offsetHeight};var t=e.getBoundingClientRect();return{width:Math.round(t.width),height:Math.round(t.height)}}function o(e,t){Object.keys(t).forEach(function(n){e.style[n]=t[n]})}var r=function(e,s){function d(){var e,t,n=[];this.add=function(e){n.push(e)},this.call=function(i){for(e=0,t=n.length;e<t;e++)n[e].call(this,i)},this.remove=function(i){var o=[];for(e=0,t=n.length;e<t;e++)n[e]!==i&&o.push(n[e]);n=o},this.length=function(){return n.length}}function a(e,n){if(e)if(e.resizedAttached)e.resizedAttached.add(n);else{e.resizedAttached=new d,e.resizedAttached.add(n),e.resizeSensor=document.createElement("div"),e.resizeSensor.dir="ltr",e.resizeSensor.className="resize-sensor";var r={pointerEvents:"none",position:"absolute",left:"0px",top:"0px",right:"0px",bottom:"0px",overflow:"hidden",zIndex:"-1",visibility:"hidden",maxWidth:"100%"},s={position:"absolute",left:"0px",top:"0px",transition:"0s"};o(e.resizeSensor,r);var a=document.createElement("div");a.className="resize-sensor-expand",o(a,r);var c=document.createElement("div");o(c,s),a.appendChild(c);var f=document.createElement("div");f.className="resize-sensor-shrink",o(f,r);var h=document.createElement("div");o(h,s),o(h,{width:"200%",height:"200%"}),f.appendChild(h),e.resizeSensor.appendChild(a),e.resizeSensor.appendChild(f),e.appendChild(e.resizeSensor);var u,l,p=window.getComputedStyle(e),v=p?p.getPropertyValue("position"):null;"absolute"!==v&&"relative"!==v&&"fixed"!==v&&(e.style.position="relative");var m=i(e),z=0,w=0,g=!0,y=0,S=function(){if(g){if(0===e.offsetWidth&&0===e.offsetHeight)return void(y||(y=t(function(){y=0,S()})));g=!1}var n,i;n=e.offsetWidth,i=e.offsetHeight,c.style.width=n+10+"px",c.style.height=i+10+"px",a.scrollLeft=n+10,a.scrollTop=i+10,f.scrollLeft=n+10,f.scrollTop=i+10};e.resizeSensor.resetSensor=S;var b=function(){l=0,u&&(z=m.width,w=m.height,e.resizedAttached&&e.resizedAttached.call(m))},x=function(){m=i(e),(u=m.width!==z||m.height!==w)&&!l&&(l=t(b)),S()},A=function(e,t,n){e.attachEvent?e.attachEvent("on"+t,n):e.addEventListener(t,n)};A(a,"scroll",x),A(f,"scroll",x),t(S)}}n(e,function(e){a(e,s)}),this.detach=function(t){r.detach(e,t)},this.reset=function(){e.resizeSensor.resetSensor()}};if(r.reset=function(e){n(e,function(e){e.resizeSensor.resetSensor()})},r.detach=function(e,t){n(e,function(e){e&&(e.resizedAttached&&"function"==typeof t&&(e.resizedAttached.remove(t),e.resizedAttached.length())||e.resizeSensor&&(e.contains(e.resizeSensor)&&e.removeChild(e.resizeSensor),delete e.resizeSensor,delete e.resizedAttached))})},"undefined"!=typeof MutationObserver){var s=new MutationObserver(function(e){for(var t in e)if(e.hasOwnProperty(t))for(var n=e[t].addedNodes,i=0;i<n.length;i++)n[i].resizeSensor&&r.reset(n[i])});document.addEventListener("DOMContentLoaded",function(e){s.observe(document.body,{childList:!0,subtree:!0})})}return r}); 343 344document.addEventListener("DOMContentLoaded",function(){var f=false,e=["input:not([type])","input[type=text]","input[type=number]","input[type=date]","input[type=time]","input[type=datetime]","textarea","[role=textbox]","[supports-modality=keyboard]"].join(","),a,d=(function(){var g=document.body;if(g.matchesSelector){return g.matchesSelector}if(g.webkitMatchesSelector){return g.webkitMatchesSelector}if(g.mozMatchesSelector){return g.mozMatchesSelector}
344if(g.msMatchesSelector){return g.msMatchesSelector}console.error("Couldn't find any matchesSelector method on document.body.")}()),b=function(){var h="body:not([modality=keyboard]) :focus { outline: none; }",g=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css";i.id="disable-focus-ring";if(i.styleSheet){i.styleSheet.cssText=h}else{i.appendChild(document.createTextNode(h))}g.insertBefore(i,g.firstChild)},c=function(h){var g=false;if(d){g=d.call(h,e)&&d.call(h,":not([readonly]")}return g};b();document.body.addEventListener("keydown",function(){f=true;if(a){clearTimeout(a)}a=setTimeout(function(){f=false},100)},true);document.body.addEventListener("focus",function(g){if(f||c(g.target)){document.body.setAttribute("modality","keyboard")}},true);document.body.addEventListener("blur",function(){document.body.removeAttribute("modality")},true)}); 345var Raphael = Raphael || {}; 346Raphael.Draco = Raphael.Draco || {}; 347Raphael.Draco.Menu = Raphael.Draco.Menu || {}; 348 349Raphael.Draco.Menu.MainMenuController = function () { 350 const $overlay = document.createElement('div'); 351 $overlay.classList.add('overlay'); 352 const $body = document.querySelector('body'); 353 const $desktopMenuToggleButton = document.getElementById('js-main-nav-close-desktop'); 354 const $mobileMenuToggleButton = document.getElementById('js-main-nav-toggle-mobile'); 355 const $mobileHighlightNavToggleButton = document.getElementById('js-highlight-nav-toggle'); 356 const _this = this; 357 let lastViewPortMobile = checkIfMobile(); 358 359 this.getChildren = function (n, skipMe) { 360 let r = []; 361 for (; n; n = n.nextSibling) 362 if (n.nodeType == 1 && n != skipMe) 363 r.push(n); 364 return r; 365 }; 366 367 this.getSiblings = function (n) { 368 return _this.getChildren(n.parentNode.firstChild, n); 369 }; 370 371 this.addOverlay = function () { 372 if (!$body.classList.contains('overlay-open')) { 373 $body.classList.add('overlay-open'); 374 $body.insertBefore($overlay, $body.firstChild); 375 376 // register click listener for overlay 377 $overlay.addEventListener('click', function () { 378 // check if mobile or desktop 379 if (checkIfMobile()) { 380 _this.closeSubNavigationMobile(); 381 } else { 382 _this.closeSubNavigationDesktop(); 383 } 384 }); 385 } 386 }; 387 388 this.removeOverlay = function () { 389 let $overlay = document.querySelector('.overlay'); 390 if ($overlay) { 391 $body.classList.remove('overlay-open'); 392 $body.removeChild($overlay); 393 } 394 }; 395 396 /** 397 * @param event 398 */ 399 this.openSubNavigationDesktop = function (event) { 400 event.preventDefault(); 401 // check if clicked submenu is already open => close it and do nothing else 402 if (event.target.parentNode.classList.contains('main-nav-list__item--open')) { 403 _this.closeSubNavigationDesktop(true); 404 } else { 405 const $openSubNavigation = document.querySelector('.main-nav-list__item.main-nav-list__item--open'); 406 407 // check if other submenus are open => close them 408 if ($openSubNavigation) { 409 _this.closeSubNavigationDesktop(false); 410 } 411 412 // open clicked submenu 413 event.target.parentNode.classList.add('main-nav-list__item--open'); 414 415 // add overlay 416 _this.addOverlay(); 417 } 418 }; 419 420 this.closeSubNavigationDesktop = function (closeOverlay) { 421 if (closeOverlay === null || closeOverlay === undefined) { 422 closeOverlay = true; 423 } 424 $openedDesktopItem = document.querySelector('.main-nav-list__item.main-nav-list__item--open'); 425 if ($openedDesktopItem) { 426 document.querySelector('.main-nav-list__item.main-nav-list__item--open').classList.remove('main-nav-list__item--open'); 427 if (closeOverlay) { 428 _this.removeOverlay(); 429 } 430 } 431 }; 432 433 this.initDesktop = function () { 434 // click event registrieren 435 let $toggleButtons = document.querySelectorAll('.main-nav-list__item.main-nav-list__item--has-sub > a.main-nav-list__item-link, .main-nav-list__item.main-nav-list__item--has-sub > button.main-nav-list__item-button'); 436 437 // forEach support for older browsers 438 $toggleButtons.forEach(function ($toggleElement) { 439 $toggleElement.addEventListener('click', _this.openSubNavigationDesktop); 440 441 // disable focus on links, focus on arrowToggle is sufficient 442 if ($toggleElement.tagName == 'A') { 443 $toggleElement.tabIndex = "-1"; 444 } 445 }); 446 447 // closeButton 448 if ($desktopMenuToggleButton) { 449 $desktopMenuToggleButton.addEventListener('click', _this.closeSubNavigationDesktop); 450 } 451 }; 452 453 this.destroyDesktop = function () { 454 // close menu first 455 _this.closeSubNavigationDesktop(); 456 457 // remove click events 458 let $toggleButtons = document.querySelectorAll('.main-nav-list__item.main-nav-list__item--has-sub > a.main-nav-list__item-link, .main-nav-list__item.main-nav-list__item--has-sub > button.main-nav-list__item-button'); 459 460 // forEach support for older browsers 461 $toggleButtons.forEach(function ($toggleElement) { 462 $toggleElement.removeEventListener('click', _this.openSubNavigationDesktop); 463 464 if ($toggleElement.tagName == 'A') { 465 $toggleElement.removeAttribute('tabindex'); // set back to default 466 } 467 }); 468 469 if ($desktopMenuToggleButton) { 470 $desktopMenuToggleButton.removeEventListener('click', _this.closeSubNavigationMobile); 471 } 472 }; 473 474 this.openNavigationLayerMobile = function () { 475 const $headerContent = document.querySelector('.header__content'); 476 477 // check if content is visible 478 if ($headerContent.classList.contains('header__content--visible')) { 479 // close content 480 _this.closeSubNavigationMobile(); 481 } else { 482 // add overlay 483 _this.addOverlay(); 484 485 // show content 486 $headerContent.classList.add('header__content--visible'); 487 } 488 }; 489 490 this.closeSubNavigationMobile = function () { 491 $openedHeaderContent = document.querySelector('.header__content--visible'); 492 $openedMainListItems = document.querySelectorAll('.main-nav-list__item.main-nav-list__item--open'); 493 $openedMobileSearchFilters = document.querySelector('.overlay-filter-open'); 494
495 // close mobile search filters if open 496 if ($openedMobileSearchFilters) { 497 $openedMobileSearchFilters.classList.remove('overlay-filter-open') 498 } 499 500 // if header__content is visible => close it 501 if ($openedHeaderContent) { 502 $openedHeaderContent.classList.remove('header__content--visible') 503 } 504 505 if ($openedMainListItems.length > 0) { 506 // iterate through opened items => close them 507 $openedMainListItems.forEach(function ($listElement) { 508 $listElement.classList.remove('main-nav-list__item--open'); 509 }); 510 } 511 512 // finally remove overlay 513 _this.removeOverlay(); 514 }; 515 516 517 /** 518 * @param event 519 */ 520 this.openSubNavigationMobile = function (event) { 521 522 // clicked item is already open 523 if (event.target.parentNode.classList.contains('main-nav-list__item--open')) { 524 525 // 1st level clicked 526 if (event.target.parentNode.parentNode.classList.contains('main-nav-list--lvl-1')) { 527 // check if deeper item is open and close 528 let openDeeperItem = document.querySelector('.main-nav-list.main-nav-list--lvl-2 .main-nav-list__item--open'); 529 if (openDeeperItem) { 530 openDeeperItem.classList.remove('main-nav-list__item--open'); 531 } 532 } 533 534 // close item 535 event.target.parentNode.classList.remove('main-nav-list__item--open'); 536 } else { 537 538 // 1st level clicked 539 if (event.target.parentNode.parentNode.classList.contains('main-nav-list--lvl-1')) { 540 541 // check if deeper item is open and close 542 // in case other 1st lvl is open, close there child 543 let openDeeperItem = document.querySelector('.main-nav-list.main-nav-list--lvl-2 .main-nav-list__item--open'); 544 if (openDeeperItem) { 545 openDeeperItem.classList.remove('main-nav-list__item--open'); 546 } 547 548 // get 1st lvl sibling 549 siblings = _this.getSiblings(event.target.parentNode); 550 551 // find other open 1st lvl sibling 552 const otherOpenFirstLevel = siblings.find(function (element) { 553 return element.classList.contains('main-nav-list__item--open'); 554 }); 555 556 // close open sibling 557 if (otherOpenFirstLevel) { 558 otherOpenFirstLevel.classList.remove('main-nav-list__item--open'); 559 } 560 } 561 562 // 2nd level clicked 563 if (event.target.parentNode.classList.contains('main-nav-list__lvl-2-wrap')) { 564 565 // get siblings 566 directSiblings = _this.getSiblings(event.target.parentNode); 567 offSiblings = _this.getSiblings(event.target.parentNode.parentNode); 568 569 // find open direct sibling 570 const openDirectSiblings = directSiblings.find(function (element) { 571 return element.classList.contains('main-nav-list__item--open'); 572 }); 573 574 // close direct sibling 575 if (openDirectSiblings) { 576 openDirectSiblings.classList.remove('main-nav-list__item--open'); 577 } 578 579 // cycle trough all off childs and close if open 580 offSiblings.forEach(function (item) { 581 let children = item.children; 582 583 for (let i = 0; i < children.length; i++) { 584 let child = children[i]; 585 586 if (child.classList.contains('main-nav-list__item--open')) { 587 child.classList.remove('main-nav-list__item--open'); 588 } 589 } 590 }); 591 } 592 593 // open clicked submenu 594 event.target.parentNode.classList.add('main-nav-list__item--open'); 595 } 596 }; 597 598 this.openCurrentNavigationMobile = function () { 599 $currentNavItem = document.querySelector('.main-nav-list__lvl-2-wrap--has-sub.main-nav-list__lvl-2-wrap--active'); 600 601 if ($currentNavItem) { 602 let firstActiveLvl = document.querySelector('.main-nav-list--lvl-1 > .main-nav-list__item.main-nav-list__item--active'); 603 if (firstActiveLvl) { 604 firstActiveLvl.classList.add('main-nav-list__item--open'); 605 606 let secondActiveWrap = document.querySelector('.main-nav-list__lvl-2-wrap.main-nav-list__lvl-2-wrap--active'); 607 if (secondActiveWrap) { 608 secondActiveWrap.classList.add('main-nav-list__item--open'); 609 } 610 } 611 } 612 }; 613 614 this.toggleHighlightNavigationMobile = function (event) { 615 const parent = event.target.parentNode.parentNode, 616 classNamenIfClosed = 'highlight-nav-list__wrapper--closed'; 617 618 // clicked item is closed 619 if (parent.classList.contains(classNamenIfClosed)) { 620 parent.classList.remove(classNamenIfClosed); 621 } 622 else { 623 parent.classList.add(classNamenIfClosed); 624 } 625 }; 626 627 this.initMobile = function () { 628 // check if mobile toggle is available => return 629 if (!$mobileMenuToggleButton) return; 630 631 // click event for mobile toggle 632 $mobileMenuToggleButton.addEventListener('click', _this.openNavigationLayerMobile); 633 634 // click event registrieren 635 let $toggleButtons = document.querySelectorAll('.main-nav-list__item.main-nav-list__item--has-sub button, .main-nav-list__item.main-nav-list__item--has-sub .main-nav-list__title'); 636 637 // forEach support for older browsers 638 $toggleButtons.forEach(function ($toggleElement) { 639 $toggleElement.addEventListener('click', _this.openSubNavigationMobile); 640 }); 641 642 // open current/active navPoint 643 _this.openCurrentNavigationMobile(); 644 645 // closeButton 646 if ($desktopMenuToggleButton) { 647 $desktopMenuToggleButton.addEventListener('click', _this.closeSubNavigationMobile); 648 } 649 650 // highlight nav 651 if ($mobileHighlightNavToggleButton) { 652 $mobileHighlightNavToggleButton.addEventListener('click', _this.toggleHighlightNavigationMobile); 653 } 654 }; 655 656 this.destroyMobile = function () { 657 // close menu mobile first 658 _this.closeSubNavigationMobile(); 659 660 // remove eventlistener from toggleButton if exist 661 if (!$mobileMenuToggleButton) return; 662 $mobileMenuToggleButton.removeEventListener('click', _this.openNavigationLayerMobile); 663 664 // click event registrieren 665 let $toggleButtons = document.querySelectorAll('.main-nav-list__item.main-nav-list__item--has-sub button, .main-nav-list__item.main-nav-list__item--has-sub .main-nav-list__title'); 666 667 // forEach support for older browsers 668 $toggleButtons.forEach(function ($toggleElement) { 669 $toggleElement.removeEventListener('click', _this.openSubNavigationMobile); 670 }); 671 }; 672 673 this.resetMenusOnResize = function () { 674 if (checkIfMobile() !== lastViewPortMobile) { 675 if (!lastViewPortMobile) { 676 _this.destroyDesktop(); 677 _this.initMobile(); 678 } else { 679 _this.destroyMobile(); 680 _this.initDesktop(); 681 } 682 lastViewPortMobile = checkIfMobile(); 683 } 684 }; 685 686 this.initKeyboardClose = function () { 687 // listen to 'esc' to close menu 688 document.addEventListener('keyup', function (e) { 689 if (e.key === 'Escape') { 690 if(checkIfMobile()) { 691 _this.closeSubNavigationMobile(); 692 } else { 693 _this.closeSubNavigationDesktop(); 694 } 695 } 696 }); 697 }; 698 699 this.mainInit = function () { 700 // check if mobile or desktop 701 if (checkIfMobile()) { 702 _this.initMobile(); 703 } else { 704 _this.initDesktop(); 705 } 706 _this.initKeyboardClose(); 707 708 window.addEventListener('resize', _this.resetMenusOnResize); 709 }; 710}; 711 712const CLASS_HIDDEN = "header--hidden"; 713 714docReady(function () { 715 const header = document.getElementById("header"); 716 const banner = document.getElementById("js-banner"); 717 718 if (!header) return; 719 720 let headerHeight = header.clientHeight; 721 let bannerHeight = banner ? banner.clientHeight : 0; 722 let scrollPos = 0; 723 724 const headerResizeObserver = new ResizeObserver(([entry]) => { 725 headerHeight = entry.contentRect.height; 726 }); 727 728 headerResizeObserver.observe(header); 729 730 if (banner) { 731 const bannerResizeObserver = new ResizeObserver(([entry]) => { 732 bannerHeight = entry.contentRect.height; 733 }); 734 735 bannerResizeObserver.observe(banner); 736 } 737 738 checkPosition(); 739 740 function checkPosition() { 741 const offset = headerHeight + bannerHeight; 742 743 const windowY = window.scrollY; 744 if (windowY < scrollPos) { 745 // scrolling up 746 header.classList.remove(CLASS_HIDDEN); 747 } else if (windowY > scrollPos && windowY > offset) { 748 // scrolling down 749 header.classList.add(CLASS_HIDDEN); 750 } 751 scrollPos = windowY; 752 } 753 754 window.addEventListener( 755 "scroll", 756 debounce(function () { 757 checkPosition(); 758 }, 15) 759 ); 760}); 761 762docReady(function () { 763 var scrolltop = document.querySelector("#btt-button"); 764 765 function scrollToTop() { 766 // Scroll to top on click 767 scrolltop.addEventListener("click", function (e) { 768 window.scrollTo({ 769 top: 0, 770 behavior: 'smooth' 771 }) 772 return false;
773 }, false); 774 } 775 776 scrollToTop(); 777}); 778 779docReady(function () { 780 const openAccordeonOnHash = function () { 781 var $targetElement = document.getElementById(location.hash.replace('#', '')); 782 if ($targetElement !== null) { 783 var $parentElement = $targetElement.parentNode; 784 // check if element is in accordion 785 if ($parentElement.classList.contains("accordion__panel")) { 786 var $targetButton = document.getElementById($parentElement.id + '_trigger'); 787 788 // open accordion 789 $targetButton.click(); 790 } 791 } 792 } 793 794 if (location.hash !== '') { 795 openAccordeonOnHash(); 796 } 797 798 window.addEventListener( 799 'hashchange', 800 () => { 801 openAccordeonOnHash(); 802 }, 803 false, 804 ); 805}); 806 807docReady(function () { 808 var $body = document.body; 809 var $openSearchOverlay = document.getElementById("open-search"); 810 var $openSearchOverlayMobile = document.getElementById("open-search-mobile"); 811 var $closeSearchOverlay = document.getElementById("close-search"); 812 var $searchOverlay = document.getElementById("search-overlay"); 813 var $searchForm = document.querySelector(".search-container__form"); 814 var $searchInput = document.getElementById("search-site"); 815 // var $searchButtonShowAll = document.getElementById("search-show-all"); 816 var $searchClear = document.getElementById("search-clear"); 817 var $suggestionList = document.querySelector(".search-suggestions"); 818 var $searchError = $searchForm ? $searchForm.querySelector(".search-form__error") : null; 819 820 // reserve the width of the scrollbar the lock removes, else the page jumps sideways 821 function lockBodyScroll() { 822 var $html = document.documentElement; 823 var widthBeforeLock = $html.clientWidth; 824 825 $body.classList.add("body--no-scroll"); 826 827 var scrollbarWidth = $html.clientWidth - widthBeforeLock; 828 if (scrollbarWidth > 0) { 829 $html.style.paddingRight = scrollbarWidth + "px"; 830 } 831 } 832 833 function unlockBodyScroll() { 834 $body.classList.remove("body--no-scroll"); 835 document.documentElement.style.paddingRight = ""; 836 } 837 838 function resetSearchValidation() { 839 if ($searchError !== null) { 840 $searchError.hidden = true; 841 } 842 843 $searchInput.classList.remove("search-sword__input--error"); 844 } 845 846 // open search layer 847 $openSearchOverlay.addEventListener("click", function (e) { 848 lockBodyScroll(); 849 $searchOverlay.classList.add("search-overlay--open"); 850 resetSearchValidation(); 851 $searchInput.focus(); 852 }, false); 853 854 // open search layer (mobile) 855 $openSearchOverlayMobile.addEventListener("click", function (e) { 856 lockBodyScroll(); 857 $searchOverlay.classList.add("search-overlay--open"); 858 resetSearchValidation(); 859 $searchInput.focus(); 860 }, false); 861 862 // close search layer 863 $closeSearchOverlay.addEventListener("click", function (e) { 864 unlockBodyScroll(); 865 $searchOverlay.classList.remove("search-overlay--open"); 866 resetSearchValidation(); 867 }, false); 868 869 // empty search phrase 870 $searchClear.addEventListener("click", function (e) { 871 e.preventDefault(); 872 $suggestionList.classList.remove("search-suggestions--visible"); 873 // $searchButtonShowAll.classList.remove("search-container__btn-show-all--visible"); 874 $searchInput.value = ""; 875 resetSearchValidation(); 876 $searchInput.focus(); 877 $searchClear.classList.remove("search-sword__clear--visible"); 878 }, false); 879 880 // function to check the number of typed in characters 881 function trueWhenReachedMaxChars(inputfield, maxChars) { 882 if (inputfield.length >= maxChars) { 883 return true; 884 } 885 return false; 886 } 887 888 $searchInput.onkeyup = function () { 889 // hide/show X 890 if (trueWhenReachedMaxChars(this.value, 1)) { 891 $searchClear.classList.add("search-sword__clear--visible"); 892 } else { 893 $searchClear.classList.remove("search-sword__clear--visible"); 894 } 895 896 // hide/show button 897 /* 898 if (trueWhenReachedMaxChars(this.value, 2)) { 899 $searchButtonShowAll.classList.add("search-container__btn-show-all--visible"); 900 } else { 901 $searchButtonShowAll.classList.remove("search-container__btn-show-all--visible"); 902 } 903 */ 904 } 905 906 // close overlay on escape 907 document.onkeydown = function (evt) { 908 evt = evt || window.event; 909 if (evt.keyCode === 27 && $searchOverlay.classList.contains("search-overlay--open")) { 910 $searchOverlay.classList.remove("search-overlay--open"); 911 unlockBodyScroll(); 912 resetSearchValidation(); 913 } 914 }; 915}); 916 917var Raphael = Raphael || {}; 918Raphael.Draco = Raphael.Draco || {}; 919Raphael.Draco.Search = Raphael.Draco.Search || {}; 920 921Raphael.Draco.Search.SuggestController = function () { 922 const _this = this; 923 924 /** 925 * Fire a autocomplete function when the user is finished typing. 926 * @param el 927 * @param timeout (milliseconds) 928 * @param functionName 929 * @return Object 930 */ 931 this.hasFinishedTyping = function(el, timeout, functionName) { 932 let timeoutID = undefined; 933 934 el.addEventListener('keyup', function (e) { 935 if (typeof timeoutID === "undefined") { 936 timeoutID = setTimeout(function () { 937 functionName(e); 938 }, timeout); 939 } 940 }); 941 942 el.addEventListener('keydown', function (e) { 943 if (typeof timeoutID !== "undefined") { 944 clearTimeout(timeoutID); 945 timeoutID = undefined; 946 } 947 }); 948 949 return el; 950 }; 951 952 // prepare the params for suggestions
953 this.getSuggestions = function(selector) { 954 const searchword = selector.value; 955 let ajaxParams = { 956 type: 7384, 957 'tx_draco_suggest[queryString]': searchword 958 }; 959 960 this.processServerResponse('suggestion', selector, searchword, ajaxParams); 961 }; 962 963 // prepare the params for completions 964 this.getCompletions = function(selector) { 965 const searchword = selector.value; 966 967 let type = selector.dataset.autosuggesttype; 968 let ajaxParams = { 969 type: type, 970 'q': searchword 971 }; 972 973 this.processServerResponse('completion', selector, searchword, ajaxParams); 974 }; 975 976 // prepare the params for categorized suggestions 977 this.getCategories = function(selector) { 978 const searchword = selector.value; 979 let ajaxParams = { 980 type: 7385, 981 'tx_draco_categorysuggest[queryString]': searchword 982 }; 983 984 this.processServerResponse('categories', selector, searchword, ajaxParams); 985 }; 986 987 this.prepareCategorizedSuggestions = function(results) { 988 const categoryOrder = [ 989 'tx_dracocartproducts_domain_model_product', 990 'tx_dracocartevents_domain_model_event', 991 'pages', 992 'tx_dracopricecheck_domain_model_product', 993 'tx_news_domain_model_news', 994 'tx_dracoalternativeproducts_domain_model_cluster_product' 995 ]; 996 const knownCategorySet = new Set(categoryOrder); 997 const knownCategoryEntries = categoryOrder 998 .filter(categoryName => Object.prototype.hasOwnProperty.call(results, categoryName)) 999 .map(categoryName => [categoryName, results[categoryName]]); 1000 const unknownCategoryEntries = Object.entries(results) 1001 .filter(([categoryName]) => !knownCategorySet.has(categoryName)); 1002 const sortedCategoryEntries = knownCategoryEntries.concat(unknownCategoryEntries); 1003 const categoryCounter = sortedCategoryEntries.length; 1004 const $btn = document.getElementById('search-show-all'); 1005 1006 // keep the configured order, append unknown categories and show max. four categories 1007 results = Object.fromEntries(sortedCategoryEntries.slice(0, 4)); 1008 1009 if ($btn !== null) { 1010 if (categoryCounter >= 1) { 1011 $btn.classList.add('search-container__btn-show-all--visible'); 1012 } 1013 else { 1014 $btn.classList.remove('search-container__btn-show-all--visible'); 1015 } 1016 } 1017 1018 for (let result in results) { 1019 let categoryName = result, 1020 categoryItems = results[result]; 1021 1022 let parentContainer = document.querySelector('.search-container__category[data-type="' + categoryName + '"]'); 1023 if (parentContainer !== null) { 1024 let parentList = parentContainer.querySelector('ul'); 1025 1026 if (parentList !== null && categoryItems.length > 0) { 1027 // show container 1028 parentContainer.style.display = 'block'; 1029 parentContainer.dataset.itemCount = categoryItems.length; 1030 1031 // generate li and a 1032 categoryItems.forEach(function(item) { 1033 let listItem = document.createElement('li'); 1034 listItem.className = 'search-suggestions__item'; 1035 // create the link 1036 let link = document.createElement('a'); 1037 link.href = item.url; 1038 link.innerHTML = item.title; 1039 1040 if (item.isSubscriptionRequired_boolS || item.wplusIcon_boolS) { 1041 link.className = 'search-suggestions__link search-suggestions__link--wundeplus-badge'; 1042 } 1043 else { 1044 link.className = 'search-suggestions__link'; 1045 } 1046 1047 listItem.appendChild(link); 1048 parentList.appendChild(listItem); 1049 }); 1050 } 1051 else { 1052 // hide the whole container 1053 parentContainer.style.display = 'none'; 1054 } 1055 } 1056 } 1057 }; 1058 1059 // hide and clear all category blocks 1060 this.clearCategoryBlocks = function() { 1061 const categoryBlocks = document.querySelectorAll('.search-container__category[data-type]'); 1062 1063 categoryBlocks.forEach(function(categoryBlock) { 1064 categoryBlock.style.display = 'none'; 1065 let categoryList = categoryBlock.querySelector('ul'); 1066 1067 while (categoryList.firstChild) { 1068 categoryList.removeChild(categoryList.firstChild); 1069 } 1070 }); 1071 1072 $btn = document.getElementById('search-show-all'); 1073 if ($btn !== null) { 1074 $btn.classList.remove('search-container__btn-show-all--visible'); 1075 } 1076 }; 1077 1078 // hide and clear the suggestion box 1079 this.clearResultList = function(results, resultList) { 1080 // clear the list 1081 resultList.innerHTML = ''; 1082 1083 // only show suggestions if there are some to show 1084 if (Object.keys(results).length > 0) { 1085 resultList.classList.add('search-suggestions--visible'); 1086 } 1087 else { 1088 resultList.classList.remove('search-suggestions--visible'); 1089 } 1090 }; 1091 1092 // prepare the response 1093 this.prepareResults = function(response) { 1094 // get the results from the request or create an empty object 1095 let results = response.suggestions; 1096 1097 // Catch IE11 and parse the response explicitly 1098 if (!!window.MSInputMethodContext && !!document.documentMode) { 1099 results = JSON.parse(this.response).suggestions; 1100 } 1101 1102 // catch illegal responses 1103 if (typeof results === 'undefined') { 1104 results = {}; 1105 } 1106 1107 return results; 1108 } 1109 1110 // generate the suggestion list 1111 this.generateSuggestionList = function(results, resultList, searchword, uri) { 1112 const regex = new RegExp('(' + searchword + ')', 'gi'); 1113 1114 // cycle all suggestions (if there are any) 1115 for (let result in results) { 1116 // highlight result 1117 let result_link = result; 1118 // replace see searchword
1119 let resultHighlight = result.replace(regex, '</span>' + searchword + '<span class="highlight">'); 1120 // create the listitem 1121 let listItem = document.createElement('li'); 1122 listItem.className = 'search-suggestions__item'; 1123 // create the link 1124 let link = document.createElement('a'); 1125 link.href = uri + '?tx_solr[q]=' + result_link; 1126 link.className = 'search-suggestions__link'; 1127 link.innerHTML = resultHighlight; 1128 listItem.appendChild(link); 1129 resultList.appendChild(listItem); 1130 } 1131 }; 1132 1133 // generate the completion list 1134 this.generateCompletionList = function(results, resultList) { 1135 // completions 1136 for (let result of results) { 1137 // create the listitem 1138 let listItem = document.createElement('li'); 1139 listItem.className = 'search-suggestions__item'; 1140 // create the link 1141 let link = document.createElement('a'); 1142 link.href = result.url; 1143 link.className = 'search-suggestions__link'; 1144 if (result.type === 'pricecheck') { 1145 link.innerHTML = result.title + '<br><em>Preisvergleich</em>'; 1146 } 1147 else { 1148 link.innerHTML = result.title + '<br><em>PZN: ' + result.pzn + '</em>'; 1149 } 1150 listItem.appendChild(link); 1151 resultList.appendChild(listItem); 1152 } 1153 }; 1154 1155 this.processServerResponse = function(context, selector, searchword, ajaxParams) { 1156 const form = selector.closest('form'); 1157 const uri = form.getAttribute('action'); 1158 const resultList = form.querySelector('.search-suggestions'); 1159 const pageId = form.getAttribute('data-solr-pageid'); 1160 1161 if (searchword.length >= 2) { 1162 // fire the autosuggest on a special page if data-attribute is set in the <form> 1163 if (pageId) { 1164 ajaxParams.id = pageId; 1165 } 1166 1167 let queryString = '/?' + Object.keys(ajaxParams).map(function (key) { 1168 return encodeURIComponent(key) + '=' + encodeURIComponent(ajaxParams[key]) 1169 }).join('&'), 1170 xhr = new XMLHttpRequest(); 1171 1172 xhr.open('GET', queryString); 1173 xhr.responseType = 'json'; 1174 xhr.send(); 1175 1176 xhr.onload = function () { 1177 if (this.status === 200) { 1178 let results = _this.prepareResults(this.response); 1179 1180 switch (context) { 1181 case 'suggestion': 1182 _this.clearResultList(results, resultList); 1183 _this.generateSuggestionList(results, resultList, searchword, uri); 1184 break; 1185 case 'completion': 1186 _this.clearResultList(results, resultList); 1187 _this.generateCompletionList(results, resultList); 1188 break; 1189 case 'categories': 1190 _this.clearCategoryBlocks(); 1191 _this.prepareCategorizedSuggestions(results); 1192 break; 1193 default: 1194 } 1195 } 1196 }; 1197 } else { 1198 // clear the list 1199 resultList.innerHTML = ''; 1200 resultList.classList.remove("search-suggestions--visible"); 1201 1202 _this.clearCategoryBlocks(); 1203 } 1204 }; 1205 1206 /** 1207 * main initialization fn 1208 */ 1209 this.init = function () { 1210 let SuggestController = this; 1211 const autocompleteSelectors = document.querySelectorAll('.tx-solr-autocomplete[name="tx_solr[q]"]'); 1212 const suggestionSelectors = document.querySelectorAll('.tx-solr-suggest[name="tx_solr[q]"]'); 1213 1214 if (autocompleteSelectors !== null) { 1215 autocompleteSelectors.forEach(function(currentSelector) { 1216 SuggestController.hasFinishedTyping(currentSelector, 100, function (e) { 1217 SuggestController.getCompletions(currentSelector); 1218 }); 1219 }); 1220 } 1221 1222 if (suggestionSelectors !== null) {
1223 suggestionSelectors.forEach(function(currentSelector) { 1224 SuggestController.hasFinishedTyping(currentSelector, 300, function (e) { 1225 SuggestController.getSuggestions(currentSelector); 1226 SuggestController.getCategories(currentSelector); 1227 }); 1228 }); 1229 } 1230 }; 1231}; 1232 1233!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){"use strict";var e=window.Slick||{};(e=function(){var e=0;return function(t,o){var s,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(t),appendDots:i(t),arrows:!0,asNavFor:null,prevArrow:'<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',nextArrow:'<button class="slick-next" aria-label="Next" type="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i('<button type="button" />').text(t+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,focusOnChange:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},n.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},i.extend(n,n.initials),n.activeBreakpoint=null,n.animType=null,n.animProp=null,n.breakpoints=[],n.breakpointSettings=[],n.cssTransitions=!1,n.focussed=!1,n.interrupted=!1,n.hidden="hidden",n.paused=!0,n.positionProp=null,n.respondTo=null,n.rowCount=1,n.shouldClick=!0,n.$slider=i(t),n.$slidesCache=null,n.transformType=null,n.transitionType=null,n.visibilityChange="visibilitychange",n.windowWidth=0,n.windowTimer=null,s=i(t).data("slick")||{},n.options=i.extend({},n.defaults,o,s),n.currentSlide=n.options.initialSlide,n.originalSettings=n.options,void 0!==document.mozHidden?(n.hidden="mozHidden",n.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(n.hidden="webkitHidden",n.visibilityChange="webkitvisibilitychange"),n.autoPlay=i.proxy(n.autoPlay,n),n.autoPlayClear=i.proxy(n.autoPlayClear,n),n.autoPlayIterator=i.proxy(n.autoPlayIterator,n),n.changeSlide=i.proxy(n.changeSlide,n),n.clickHandler=i.proxy(n.clickHandler,n),n.selectHandler=i.proxy(n.selectHandler,n),n.setPosition=i.proxy(n.setPosition,n),n.swipeHandler=i.proxy(n.swipeHandler,n),n.dragHandler=i.proxy(n.dragHandler,n),n.keyHandler=i.proxy(n.keyHandler,n),n.instanceUid=e++,n.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,n.registerBreakpoints(),n.init(!0)}}()).prototype.activateADA=function(){this.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},e.prototype.addSlide=e.prototype.slickAdd=function(e,t,o){var s=this;if("boolean"==typeof t)o=t,t=null;else if(t<0||t>=s.slideCount)return!1;s.unload(),"number"==typeof t?0===t&&0===s.$slides.length?i(e).appendTo(s.$slideTrack):o?i(e).insertBefore(s.$slides.eq(t)):i(e).insertAfter(s.$slides.eq(t)):!0===o?i(e).prependTo(s.$slideTrack):i(e).appendTo(s.$slideTrack),s.$slides=s.$slideTrack.children(this.options.slide),s.$slideTrack.children(this.options.slide).detach(),s.$slideTrack.append(s.$slides),s.$slides.each(function(e,t){i(t).attr("data-slick-index",e)}),s.$slidesCache=s.$slides,s.reinit()},e.prototype.animateHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.animate({height:e},i.options.speed)}},e.prototype.animateSlide=function(e,t){var o={},s=this;s.animateHeight(),!0===s.options.rtl&&!1===s.options.vertical&&(e=-e),!1===s.transformsEnabled?!1===s.options.vertical?s.$slideTrack.animate({left:e},s.options.speed,s.options.easing,t):s.$slideTrack.animate({top:e},s.options.speed,s.options.easing,t):!1===s.cssTransitions?(!0===s.options.rtl&&(s.currentLeft=-s.currentLeft),i({animStart:s.currentLeft}).animate({animStart:e},{duration:s.options.speed,easing:s.options.easing,step:function(i){i=Math.ceil(i),!1===s.options.vertical?(o[s.animType]="translate("+i+"px, 0px)",s.$slideTrack.css(o)):(o[s.animType]="translate(0px,"+i+"px)",s.$slideTrack.css(o))},complete:function(){t&&t.call()}})):(s.applyTransition(),e=Math.ceil(e),!1===s.options.vertical?o[s.animType]="translate3d("+e+"px, 0px, 0px)":o[s.animType]="translate3d(0px,"+e+"px, 0px)",s.$slideTrack.css(o),t&&setTimeout(function(){s.disableTransition(),t.call()},s.options.speed))},e.prototype.getNavTarget=function(){var e=this.options.asNavFor;return e&&null!==e&&(e=i(e).not(this.$slider)),e},e.prototype.asNavFor=function(e){var t=this.getNavTarget();null!==t&&"object"==typeof t&&t.each(function(){var t=i(this).slick("getSlick");t.unslicked||t.slideHandler(e,!0)})},e.prototype.applyTransition=function(i){var e=this,t={};!1===e.options.fade?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.autoPlay=function(){var i=this;i.autoPlayClear(),i.slideCount>i.options.slidesToShow&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},e.prototype.autoPlayClear=function(){this.autoPlayTimer&&clearInterval(this.autoPlayTimer)},e.prototype.autoPlayIterator=function(){var i=this,e=i.currentSlide+i.options.slidesToScroll;i.paused||i.interrupted||i.focussed||(!1===i.options.infinite&&(1===i.direction&&i.currentSlide+1===i.slideCount-1?i.direction=0:0===i.direction&&(e=i.currentSlide-i.options.slidesToScroll,i.currentSlide-1==0&&(i.direction=1))),i.slideHandler(e))},e.prototype.buildArrows=function(){var e=this;!0===e.options.arrows&&(e.$prevArrow=i(e.options.prevArrow).addClass("slick-arrow"),e.$nextArrow=i(e.options.nextArrow).addClass("slick-arrow"),e.slideCount>e.options.slidesToShow?(e.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.prependTo(e.options.appendArrows),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.appendTo(e.options.appendArrows),!0!==e.options.infinite&&e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):e.$prevArrow.add(e.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},e.prototype.buildDots=function(){var e,t,o=this;if(!0===o.options.dots&&o.slideCount>o.options.slidesToShow){for(o.$slider.addClass("slick-dotted"),t=i("<ul />").addClass(o.options.dotsClass),e=0;e<=o.getDotCount();e+=1)t.append(i("<li />").append(o.options.customPaging.call(this,o,e)));o.$dots=t.appendTo(o.options.appendDots),o.$dots.find("li").first().addClass("slick-active")}},e.prototype.buildOut=function(){var e=this;e.$slides=e.$slider.children(e.options.slide+":not(.slick-cloned)").addClass("slick-slide"),e.slideCount=e.$slides.length,e.$slides.each(function(e,t){i(t).attr("data-slick-index",e).data("originalStyling",i(t).attr("style")||"")}),e.$slider.addClass("slick-slider"),e.$slideTrack=0===e.slideCount?i('<div class="slick-track"/>').appendTo(e.$slider):e.$slides.wrapAll('<div class="slick-track"/>').parent(),e.$list=e.$slideTrack.wrap('<div class="slick-list"/>').parent(),e.$slideTrack.css("opacity",0),!0!==e.options.centerMode&&!0!==e.options.swipeToSlide||(e.options.slidesToScroll=1),i("img[data-lazy]",e.$slider).not("[src]").addClass("slick-loading"),e.setupInfinite(),e.buildArrows(),e.buildDots(),e.updateDots(),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),!0===e.options.draggable&&e.$list.addClass("draggable")},e.prototype.buildRows=function(){var i,e,t,o,s,n,r,l=this;if(o=document.createDocumentFragment(),n=l.$slider.children(),l.o
1233ptions.rows>0){for(r=l.options.slidesPerRow*l.options.rows,s=Math.ceil(n.length/r),i=0;i<s;i++){var d=document.createElement("div");for(e=0;e<l.options.rows;e++){var a=document.createElement("div");for(t=0;t<l.options.slidesPerRow;t++){var c=i*r+(e*l.options.slidesPerRow+t);n.get(c)&&a.appendChild(n.get(c))}d.appendChild(a)}o.appendChild(d)}l.$slider.empty().append(o),l.$slider.children().children().children().css({width:100/l.options.slidesPerRow+"%",display:"inline-block"})}},e.prototype.checkResponsive=function(e,t){var o,s,n,r=this,l=!1,d=r.$slider.width(),a=window.innerWidth||i(window).width();if("window"===r.respondTo?n=a:"slider"===r.respondTo?n=d:"min"===r.respondTo&&(n=Math.min(a,d)),r.options.responsive&&r.options.responsive.length&&null!==r.options.responsive){for(o in s=null,r.breakpoints)r.breakpoints.hasOwnProperty(o)&&(!1===r.originalSettings.mobileFirst?n<r.breakpoints[o]&&(s=r.breakpoints[o]):n>r.breakpoints[o]&&(s=r.breakpoints[o]));null!==s?null!==r.activeBreakpoint?(s!==r.activeBreakpoint||t)&&(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=r.originalSettings,!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e),l=s),e||!1===l||r.$slider.trigger("breakpoint",[r,l])}},e.prototype.changeSlide=function(e,t){var o,s,n=this,r=i(e.currentTarget);switch(r.is("a")&&e.preventDefault(),r.is("li")||(r=r.closest("li")),o=n.slideCount%n.options.slidesToScroll!=0?0:(n.slideCount-n.currentSlide)%n.options.slidesToScroll,e.data.message){case"previous":s=0===o?n.options.slidesToScroll:n.options.slidesToShow-o,n.slideCount>n.options.slidesToShow&&n.slideHandler(n.currentSlide-s,!1,t);break;case"next":s=0===o?n.options.slidesToScroll:o,n.slideCount>n.options.slidesToShow&&n.slideHandler(n.currentSlide+s,!1,t);break;case"index":var l=0===e.data.index?0:e.data.index||r.index()*n.options.slidesToScroll;n.slideHandler(n.checkNavigable(l),!1,t),r.children().trigger("focus");break;default:return}},e.prototype.checkNavigable=function(i){var e,t;if(t=0,i>(e=this.getNavigableIndexes())[e.length-1])i=e[e.length-1];else for(var o in e){if(i<e[o]){i=t;break}t=e[o]}return i},e.prototype.cleanUpEvents=function(){var e=this;e.options.dots&&null!==e.$dots&&(i("li",e.$dots).off("click.slick",e.changeSlide).off("mouseenter.slick",i.proxy(e.interrupt,e,!0)).off("mouseleave.slick",i.proxy(e.interrupt,e,!1)),!0===e.options.accessibility&&e.$dots.off("keydown.slick",e.keyHandler)),e.$slider.off("focus.slick blur.slick"),!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow&&e.$prevArrow.off("click.slick",e.changeSlide),e.$nextArrow&&e.$nextArrow.off("click.slick",e.changeSlide),!0===e.options.accessibility&&(e.$prevArrow&&e.$prevArrow.off("keydown.slick",e.keyHandler),e.$nextArrow&&e.$nextArrow.off("keydown.slick",e.keyHandler))),e.$list.off("touchstart.slick mousedown.slick",e.swipeHandler),e.$list.off("touchmove.slick mousemove.slick",e.swipeHandler),e.$list.off("touchend.slick mouseup.slick",e.swipeHandler),e.$list.off("touchcancel.slick mouseleave.
1233slick",e.swipeHandler),e.$list.off("click.slick",e.clickHandler),i(document).off(e.visibilityChange,e.visibility),e.cleanUpSlideEvents(),!0===e.options.accessibility&&e.$list.off("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().off("click.slick",e.selectHandler),i(window).off("orientationchange.slick.slick-"+e.instanceUid,e.orientationChange),i(window).off("resize.slick.slick-"+e.instanceUid,e.resize),i("[draggable!=true]",e.$slideTrack).off("dragstart",e.preventDefault),i(window).off("load.slick.slick-"+e.instanceUid,e.setPosition)},e.prototype.cleanUpSlideEvents=function(){var e=this;e.$list.off("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.off("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.cleanUpRows=function(){var i,e=this;e.options.rows>0&&((i=e.$slides.children().children()).removeAttr("style"),e.$slider.empty().append(i))},e.prototype.clickHandler=function(i){!1===this.shouldClick&&(i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault())},e.prototype.destroy=function(e){var t=this;t.autoPlayClear(),t.touchObject={},t.cleanUpEvents(),i(".slick-cloned",t.$slider).detach(),t.$dots&&t.$dots.remove(),t.$prevArrow&&t.$prevArrow.length&&(t.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove()),t.$nextArrow&&t.$nextArrow.length&&(t.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove()),t.$slides&&(t.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){i(this).attr("style",i(this).data("originalStyling"))}),t.$slideTrack.children(this.options.slide).detach(),t.$slideTrack.detach(),t.$list.detach(),t.$slider.append(t.$slides)),t.cleanUpRows(),t.$slider.removeClass("slick-slider"),t.$slider.removeClass("slick-initialized"),t.$slider.removeClass("slick-dotted"),t.unslicked=!0,e||t.$slider.trigger("destroy",[t])},e.prototype.disableTransition=function(i){var e=this,t={};t[e.transitionType]="",!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.fadeSlide=function(i,e){var t=this;!1===t.cssTransitions?(t.$slides.eq(i).css({zIndex:t.options.zIndex}),t.$slides.eq(i).animate({opacity:1},t.options.speed,t.options.easing,e)):(t.applyTransition(i),t.$slides.eq(i).css({opacity:1,zIndex:t.options.zIndex}),e&&setTimeout(function(){t.disableTransition(i),e.call()},t.options.speed))},e.prototype.fadeSlideOut=function(i){var e=this;!1===e.cssTransitions?e.$slides.eq(i).animate({opacity:0,zIndex:e.options.zIndex-2},e.options.speed,e.options.easing):(e.applyTransition(i),e.$slides.eq(i).css({opacity:0,zIndex:e.options.zIndex-2}))},e.prototype.filterSlides=e.prototype.slickFilter=function(i){var e=this;null!==i&&(e.$slidesCache=e.$slides,e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(i).appendTo(e.$slideTrack),e.reinit())},e.prototype.focusHandler=function(){var e=this;e.$slider.off("focus.slick blur.slick").on("focus.slick","*",function(t){var o=i(this);setTimeout(function(){e.options.pauseOnFocus&&o.is(":focus")&&(e.focussed=!0,e.autoPlay())},0)}).on("blur.slick","*",function(t){i(this);e.options.pauseOnFocus&&(e.focussed=!1,e.autoPlay())})},e.prototype.getCurrent=e.prototype.slickCurrentSlide=function(){return this.currentSlide},e.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(!0===i.options.infinite)if(i.slideCount<=i.options.slidesToShow)++o;else for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else if(!0===i.options.centerMode)o=i.slideCount;else if(i.options.asNavFor)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else o=1+Math.ceil((i.slideCount-i.options.slidesToShow)/i.options.slidesToScroll);return o-1},e.prototype.getLeft=function(i){var e,t,o,s,n=this,r=0;return n.slideOffset=0,t=n.$slides.first().outerHeight(!0),!0===n.options.infinite?(n.slideCount>n.options.slidesToShow&&(n.slideOffset=n.slideWidth*n.options.slidesToShow*-1,s=-1,!0===n.options.vertical&&!0===n.options.centerMode&&(2===n.options.slidesToShow?s=-1.5:1===n.options.slidesToShow&&(s=-2)),r=t*n.options.slidesToShow*s),n.slideCount%n.options.slidesToScroll!=0&&i+n.options.slidesToScroll>n.slideCount&&n.slideCount>n.options.slidesToShow&&(i>n.slideCount?(n.slideOffset=(n.options.slidesToShow-(i-n.slideCount))*n.slideWidth*-1,r=(n.options.slidesToShow-(i-n.slideCount))*t*-1):(n.slideOffset=n.slideCount%n.options.slidesToScroll*n.slideWidth*-1,r=n.slideCount%n.options.slidesToScroll*t*-1))):i+n.options.slidesToShow>n.slideCount&&(n.slideOffset=(i+n.options.slidesToShow-n.slideCount)*n.slideWidth,r=(i+n.options.slidesToShow-n.slideCount)*t),n.slideCount<=n.options.slidesToShow&&(n.slideOffset=0,r=0),!0===n.options.centerMode&&n.slideCount<=n.options.slidesToShow?n.slideOffset=n.slideWidth*Math.floor(n.options.slidesToShow)/2-n.slideWidth*n.slideCount/2:!0===n.options.centerMode&&!0===n.options.infinite?n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)-n.slideWidth:!0===n.options.centerMode&&(n.slideOffset=0,n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)),e=!1===n.options.vertical?i*n.slideWidth*-1+n.slideOffset:i*t*-1+r,!0===n.options.variableWidth&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,!0===n.options.centerMode&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow+1),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,e+=(n.$list.width()-o.outerWidth())/2)),e},e.prototype.getOption=e.prototype.slickGetOption=function(i){return this.options[i]},e.prototype.getNavigableIndexes=function(){var i,e=this,t=0,o=0,s=[];for(!1===e.options.infinite?i=e.slideCount:(t=-1*e.options.slidesToScroll,o=-1*e.options.slidesToScroll,i=2*e.slideCount);t<i;)s.push(t),t=o+e.options.slidesToScroll,o+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;return s},e.prototype.getSlick=function(){return this},e.prototype.getSlideCount=function(){var e,t,o,s=this;return o=!0===s.options.centerMode?Math.floor(s.$list.width()/2):0,t=-1*s.swipeLeft+o,!0===s.options.swipeToSlide?(s.$slideTrack.find(".slick-slide").each(function(o,n){var r,l;if(r=i(n).outerWidth(),l=n.offsetLeft,!0!==s.options.centerMode&&(l+=r/2),t<l+r)return e=n,!1}),Math.abs(i(e).attr("data-slick-index")-s.currentSlide)||1):s.options.slidesToScroll},e.prototype.goTo=e.prototype.slickGoTo=function(i,e){this.changeSlide({data:{message:"index",index:
1233parseInt(i)}},e)},e.prototype.init=function(e){var t=this;i(t.$slider).hasClass("slick-initialized")||(i(t.$slider).addClass("slick-initialized"),t.buildRows(),t.buildOut(),t.setProps(),t.startLoad(),t.loadSlider(),t.initializeEvents(),t.updateArrows(),t.updateDots(),t.checkResponsive(!0),t.focusHandler()),e&&t.$slider.trigger("init",[t]),!0===t.options.accessibility&&t.initADA(),t.options.autoplay&&(t.paused=!1,t.autoPlay())},e.prototype.initADA=function(){var e=this,t=Math.ceil(e.slideCount/e.options.slidesToShow),o=e.getNavigableIndexes().filter(function(i){return i>=0&&i<e.slideCount});e.$slides.add(e.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),null!==e.$dots&&(e.$slides.not(e.$slideTrack.find(".slick-cloned")).each(function(t){var s=o.indexOf(t);if(i(this).attr({role:"tabpanel",id:"slick-slide"+e.instanceUid+t,tabindex:-1}),-1!==s){var n="slick-slide-control"+e.instanceUid+s;i("#"+n).length&&i(this).attr({"aria-describedby":n})}}),e.$dots.attr("role","tablist").find("li").each(function(s){var n=o[s];i(this).attr({role:"presentation"}),i(this).find("button").first().attr({role:"tab",id:"slick-slide-control"+e.instanceUid+s,"aria-controls":"slick-slide"+e.instanceUid+n,"aria-label":s+1+" of "+t,"aria-selected":null,tabindex:"-1"})}).eq(e.currentSlide).find("button").attr({"aria-selected":"true",tabindex:"0"}).end());for(var s=e.currentSlide,n=s+e.options.slidesToShow;s<n;s++)e.options.focusOnChange?e.$slides.eq(s).attr({tabindex:"0"}):e.$slides.eq(s).removeAttr("tabindex");e.activateADA()},e.prototype.initArrowEvents=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},i.changeSlide),i.$nextArrow.off("click.slick").on("click.slick",{message:"next"},i.changeSlide),!0===i.options.accessibility&&(i.$prevArrow.on("keydown.slick",i.keyHandler),i.$nextArrow.on("keydown.slick",i.keyHandler)))},e.prototype.initDotEvents=function(){var e=this;!0===e.options.dots&&e.slideCount>e.options.slidesToShow&&(i("li",e.$dots).on("click.slick",{message:"index"},e.changeSlide),!0===e.options.accessibility&&e.$dots.on("keydown.slick",e.keyHandler)),!0===e.options.dots&&!0===e.options.pauseOnDotsHover&&e.slideCount>e.options.slidesToShow&&i("li",e.$dots).on("mouseenter.slick",i.proxy(e.interrupt,e,!0)).on("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.initSlideEvents=function(){var e=this;e.options.pauseOnHover&&(e.$list.on("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.on("mouseleave.slick",i.proxy(e.interrupt,e,!1)))},e.prototype.initializeEvents=function(){var e=this;e.initArrowEvents(),e.initDotEvents(),e.initSlideEvents(),e.$list.on("touchstart.slick mousedown.slick",{action:"start"},e.swipeHandler),e.$list.on("touchmove.slick mousemove.slick",{action:"move"},e.swipeHandler),e.$list.on("touchend.slick mouseup.slick",{action:"end"}
1233,e.swipeHandler),e.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},e.swipeHandler),e.$list.on("click.slick",e.clickHandler),i(document).on(e.visibilityChange,i.proxy(e.visibility,e)),!0===e.options.accessibility&&e.$list.on("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),i(window).on("orientationchange.slick.slick-"+e.instanceUid,i.proxy(e.orientationChange,e)),i(window).on("resize.slick.slick-"+e.instanceUid,i.proxy(e.resize,e)),i("[draggable!=true]",e.$slideTrack).on("dragstart",e.preventDefault),i(window).on("load.slick.slick-"+e.instanceUid,e.setPosition),i(e.setPosition)},e.prototype.initUI=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.show()},e.prototype.keyHandler=function(i){var e=this;i.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===i.keyCode&&!0===e.options.accessibility?e.changeSlide({data:{message:!0===e.options.rtl?"next":"previous"}}):39===i.keyCode&&!0===e.options.accessibility&&e.changeSlide({data:{message:!0===e.options.rtl?"previous":"next"}}))},e.prototype.lazyLoad=function(){var e,t,o,s=this;function n(e){i("img[data-lazy]",e).each(function(){var e=i(this),t=i(this).attr("data-lazy"),o=i(this).attr("data-srcset"),n=i(this).attr("data-sizes")||s.$slider.attr("data-sizes"),r=document.createElement("img");r.onload=function(){e.animate({opacity:0}
vendor: 5,592 bytes, line 1233
1233,100,function(){o&&(e.attr("srcset",o),n&&e.attr("sizes",n)),e.attr("src",t).animate({opacity:1},200,function(){e.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")}),s.$slider.trigger("lazyLoaded",[s,e,t])})},r.onerror=function(){e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),s.$slider.trigger("lazyLoadError",[s,e,t])},r.src=t})}if(!0===s.options.centerMode?!0===s.options.infinite?o=(t=s.currentSlide+(s.options.slidesToShow/2+1))+s.options.slidesToShow+2:(t=Math.max(0,s.currentSlide-(s.options.slidesToShow/2+1)),o=s.options.slidesToShow/2+1+2+s.currentSlide):(t=s.options.infinite?s.options.slidesToShow+s.currentSlide:s.currentSlide,o=Math.ceil(t+s.options.slidesToShow),!0===s.options.fade&&(t>0&&t--,o<=s.slideCount&&o++)),e=s.$slider.find(".slick-slide").slice(t,o),"anticipated"===s.options.lazyLoad)for(var r=t-1,l=o,d=s.$slider.find(".slick-slide"),a=0;a<s.options.slidesToScroll;a++)r<0&&(r=s.slideCount-1),e=(e=e.add(d.eq(r))).add(d.eq(l)),r--,l++;n(e),s.slideCount<=s.options.slidesToShow?n(s.$slider.find(".slick-slide")):s.currentSlide>=s.slideCount-s.options.slidesToShow?n(s.$slider.find(".slick-cloned").slice(0,s.options.slidesToShow)):0===s.currentSlide&&n(s.$slider.find(".slick-cloned").slice(-1*s.options.slidesToShow))},e.prototype.loadSlider=function(){var i=this;i.setPosition(),i.$slideTrack.css({opacity:1}),i.$slider.removeClass("slick-loading"),i.initUI(),"progressive"===i.options.lazyLoad&&i.progressiveLazyLoad()},e.prototype.next=e.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},e.prototype.orientationChange=function(){this.checkResponsive(),this.setPosition()},e.prototype.pause=e.prototype.slickPause=function(){this.autoPlayClear(),this.paused=!0},e.prototype.play=e.prototype.slickPlay=function(){var i=this;i.autoPlay(),i.options.autoplay=!0,i.paused=!1,i.focussed=!1,i.interrupted=!1},e.prototype.postSlide=function(e){var t=this;t.unslicked||(t.$slider.trigger("afterChange",[t,e]),t.animating=!1,t.slideCount>t.options.slidesToShow&&t.setPosition(),t.swipeLeft=null,t.options.autoplay&&t.autoPlay(),!0===t.options.accessibility&&(t.initADA(),t.options.focusOnChange&&i(t.$slides.get(t.currentSlide)).attr("tabindex",0).focus()))},e.prototype.prev=e.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},e.prototype.preventDefault=function(i){i.preventDefault()},e.prototype.progressiveLazyLoad=function(e){e=e||1;var t,o,s,n,r,l=this,d=i("img[data-lazy]",l.$slider);d.length?(t=d.first(),o=t.attr("data-lazy"),s=t.attr("data-srcset"),n=t.attr("data-sizes")||l.$slider.attr("data-sizes"),(r=document.createElement("img")).onload=function(){s&&(t.attr("srcset",s),n&&t.attr("sizes",n)),t.attr("src",o).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),!0===l.options.adaptiveHeight&&l.setPosition(),l.$slider.trigger("lazyLoaded",[l,t,o]),l.progressiveLazyLoad()},r.onerror=function(){e<3?setTimeout(function(){l.progressiveLazyLoad(e+1)},500):(t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),l.$slider.trigger("lazyLoadError",[l,t,o]),l.progressiveLazyLoad())},r.src=o):l.$slider.trigger("allImagesLoaded",[l])},e.prototype.refresh=function(e){var t,o,s=this;o=s.slideCount-s.options.slidesToShow,!s.options.infinite&&s.currentSlide>o&&(s.currentSlide=o),s.slideCount<=s.options.slidesToShow&&(s.currentSlide=0),t=s.currentSlide,s.destroy(!0),i.extend(s,s.initials,{currentSlide:t}),s.init(),e||s.changeSlide({data:{message:"index",index:t}},!1)},e.prototype.registerBreakpoints=function(){var e,t,o,s=this,n=s.options.responsive||null;if("array"===i.type(n)&&n.length){for(e in s.respondTo=s.options.respondTo||"window",n)if(o=s.breakpoints.length-1,n.hasOwnProperty(e)){for(t=n[e].breakpoint;o>=0;)s.breakpoints[o]&&s.breakpoints[o]===t&&s.breakpoints.splice(o,1),o--;s.breakpoints.push(t),s.breakpointSettings[t]=n[e].settings}s.breakpoints.sort(function(i,e){return s.options.mobileFirst?i-e:e-i})}},e.prototype.reinit=function(){var e=this;e.$slides=e.$slideTrack.children(e.options.slide).addClass("slick-slide"),e.slideCount=e.$slides.length,e.currentSlide>=e.slideCount&&0!==e.currentSlide&&(e.currentSlide=e.currentSlide-e.options.slidesToScroll),e.slideCount<=e.options.slidesToShow&&(e.currentSlide=0),e.registerBreakpoints(),e.setProps(),e.setupInfinite(),e.buildArrows(),e.updateArrows(),e.initArrowEvents(),e.buildDots(),e.updateDots(),e.initDotEvents(),e.cleanUpSlideEvents(),e.initSlideEvents(),e.checkResponsive(!1,!0),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),e.setPosition(),e.focusHandler(),e.paused=!e.options.autoplay,e.autoPlay(),e.$slider.trigger("reInit",[e])},e.prototype.resize=function(){var e=this;i(window).width()!==e.windowWidth&&(clearTimeout(e.windowDelay),e.windowDelay=window.setTimeout(function(){e.windowWidth=i(window).width(),e.checkResponsive(),e.unslicked||e.setPosition()},50))},e.prototype.removeSlide=e.prototype.slickRemove=function(i,e,t){var o=this;if(i="boolean"==typeof i?!0===(e=i)?0:o.slideCount-1:!0===e?--i:i,o.slideCount<1||i<0||i>o.slideCount-1)return!1;o.unload(),!0===t?o.$slideTrack.children().remove():o.$slideTrack.children(this.options.slide).eq(i).remove(),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slidesCache=o.$slides,o.reinit()},e.prototype.setCSS=function(i){var e,t,o=this,s={};
1233!0===o.options.rtl&&(i=-i),e="left"==o.positionProp?Math.ceil(i)+"px":"0px",t="top"==o.positionProp?Math.ceil(i)+"px":"0px",s[o.positionProp]=i,!1===o.transformsEnabled?o.$slideTrack.css(s):(s={},!1===o.cssTransitions?(s[o.animType]="translate("+e+", "+t+")",o.$slideTrack.css(s)):(s[o.animType]="translate3d("+e+", "+t+", 0px)",o.$slideTrack.css(s)))},e.prototype.setDimensions=function(){var i=this;!1===i.options.vertical?!0===i.options.centerMode&&i.$list.css({padding:"0px "+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),!0===i.options.centerMode&&i.$list.css({padding:i.options.centerPadding+" 0px"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),!1===i.options.vertical&&!1===i.options.variableWidth?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(".slick-slide").length))):!0===i.options.variableWidth?i.$slideTrack.width(5e3*i.slideCount):(i.slideWidth=Math.ceil(i.listWidth),i.$slideTrack.height(Math.ceil(i.$slides.first().outerHeight(!0)*i.$slideTrack.children(".slick-slide").length)));var e=i.$slides.first().outerWidth(!0)-i.$slides.first().width();!1===i.options.variableWidth&&i.$slideTrack.children(".slick-slide").width(i.slideWidth-e)},e.prototype.setFade=function(){var e,t=this;t.$slides.each(function(o,s){e=t.slideWidth*o*-1,!0===t.options.rtl?i(s).css({position:"relative",right:e,top:0,zIndex:t.options.zIndex-2,opacity:0}
1233):i(s).css({position:"relative",left:e,top:0,zIndex:t.options.zIndex-2,opacity:0})}),t.$slides.eq(t.currentSlide).css({zIndex:t.options.zIndex-1,opacity:1})},e.prototype.setHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.css("height",e)}},e.prototype.setOption=e.prototype.slickSetOption=function(){var e,t,o,s,n,r=this,l=!1;if("object"===i.type(arguments[0])?(o=arguments[0],l=arguments[1],n="multiple"):"string"===i.type(arguments[0])&&(o=arguments[0],s=arguments[1],l=arguments[2],"responsive"===arguments[0]&&"array"===i.type(arguments[1])?n="responsive":void 0!==arguments[1]&&(n="single")),"single"===n)r.options[o]=s;else if("multiple"===n)i.each(o,function(i,e){r.options[i]=e});else if("responsive"===n)for(t in s)if("array"!==i.type(r.options.responsive))r.options.responsive=[s[t]];else{for(e=r.options.responsive.length-1;e>=0;)r.options.responsive[e].breakpoint===s[t].breakpoint&&r.options.responsive.splice(e,1),e--;r.options.responsive.push(s[t])}l&&(r.unload(),r.reinit())},e.prototype.setPosition=function(){var i=this;i.setDimensions(),i.setHeight(),!1===i.options.fade?i.setCSS(i.getLeft(i.currentSlide)):i.setFade(),i.$slider.trigger("setPosition",[i])},e.prototype.setProps=function(){var i=this,e=document.body.style;i.positionProp=!0===i.options.vertical?"top":"left","top"===i.positionProp?i.$slider.addClass("slick-vertical"):i.$slider.removeClass("slick-vertical"),void 0===e.WebkitTransition&&void 0===e.MozTransition&&void 0===e.msTransition||!0===i.options.useCSS&&(i.cssTransitions=!0),i.options.fade&&("number"==typeof i.options.zIndex?i.options.zIndex<3&&(i.options.zIndex=3):i.options.zIndex=i.defaults.zIndex),void 0!==e.OTransform&&(i.animType="OTransform",i.transformType="-o-transform",i.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.MozTransform&&(i.animType="MozTransform",i.transformType="-moz-transform",i.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(i.animType=!1)),void 0!==e.webkitTransform&&(i.animType="webkitTransform",i.transformType="-webkit-transform",i.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.msTransform&&(i.animType="msTransform",i.transformType="-ms-transform",i.transitionType="msTransition",void 0===e.msTransform&&(i.animType=!1)),void 0!==e.transform&&!1!==i.animType&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&!1!==i.animType},e.prototype.setSlideClasses=function(i){var e,t,o,s,n=this;if(t=n.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),n.$slides.eq(i).addClass("slick-current"),!0===n.options.centerMode){var r=n.options.slidesToShow%2==0?1:0;e=Math.floor(n.options.slidesToShow/2),!0===n.options.infinite&&(i>=e&&i<=n.slideCount-1-e?n.$slides.slice(i-e+r,i+e+1).addClass("slick-active").attr("aria-hidden","false"):(o=n.options.slidesToShow+i,t.slice(o-e+1+r,o+e+2).addClass("slick-active").attr("aria-hidden","false")),0===i?t.eq(n.options.slidesToShow+n.slideCount+1).addClass("slick-center"):i===n.slideCount-1&&t.eq(n.options.slidesToShow).addClass("slick-center")),n.$slides.eq(i).addClass("slick-center")}else i>=0&&i<=n.slideCount-n.options.slidesToShow?n.$slides.slice(i,i+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):t.length<=n.options.slidesToShow?t.addClass("slick-active").attr("aria-hidden","false"):(s=n.slideCount%n.options.slidesToShow,o=!0===n.options.infinite?n.options.slidesToShow+i:i,n.options.slidesToShow==n.options.slidesToScroll&&n.slideCount-i<n.options.slidesToShow?t.slice(o-(n.options.slidesToShow-s),o+s).addClass("slick-active").attr("aria-hidden","false"):t.slice(o,o+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"));"ondemand"!==n.options.lazyLoad&&"anticipated"!==n.options.lazyLoad||n.lazyLoad()},e.prototype.setupInfinite=function(){var e,t,o,s=this;if(!0===s.options.fade&&(s.options.centerMode=!1),!0===s.options.infinite&&!1===s.options.fade&&(t=null,s.slideCount>s.options.slidesToShow)){for(o=!0===s.options.centerMode?s.options.slidesToShow+1:s.options.slidesToShow,e=s.slideCount;e>s.slideCount-o;e-=1)t=e-1,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t-s.slideCount).prependTo(s.$slideTrack).addClass("slick-cloned");for(e=0;e<o+s.slideCount;e+=1)t=e,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t+s.slideCount).appendTo(s.$slideTrack).addClass("slick-cloned");s.$slideTrack.find(".slick-cloned").find("[id]").each(function(){i(this).attr("id","")})}},e.prototype.interrupt=function(i){i||this.autoPlay(),this.interrupted=i},e.prototype.selectHandler=function(e){var t=this,o=i(e.target).is(".slick-slide")?i(e.target):i(e.target).parents(".slick-slide"),s=parseInt(o.attr("data-slick-index"));s||(s=0),t.slideCount<=t.options.slidesToShow?t.slideHandler(s,!1,!0):t.slideHandler(s)},e.prototype.slideHandler=function(i,e,t){var o,s,n,r,l,d,a=this;if(e=e||!1,!(!0===a.animating&&!0===a.options.waitForAnimate||!0===a.options.fade&&a.currentSlide===i))if(!1===e&&a.asNavFor(i),o=i,l=a.getLeft(o),r=a.getLeft(a.currentSlide),a.currentLeft=null===a.swipeLeft?r:a.swipeLeft,!1===a.options.infinite&&!1===a.options.centerMode&&(i<0||i>a.getDotCount()*a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t&&a.slideCount>a.options.slidesToShow?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else if(!1===a.options.infinite&&!0===a.options.centerMode&&(i<0||i>a.slideCount-a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t&&a.slideCount>a.options.slidesToShow?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else{if(a.options.autoplay&&clearInterval(a.autoPlayTimer),s=o<0?a.slideCount%a.options.slidesToScroll!=0?a.slideCount-a.slideCount%a.options.slidesToScroll:a.slideCount+
1233o:o>=a.slideCount?a.slideCount%a.options.slidesToScroll!=0?0:o-a.slideCount:o,a.animating=!0,a.$slider.trigger("beforeChange",[a,a.currentSlide,s]),n=a.currentSlide,a.currentSlide=s,a.setSlideClasses(a.currentSlide),a.options.asNavFor&&(d=(d=a.getNavTarget()).slick("getSlick")).slideCount<=d.options.slidesToShow&&d.setSlideClasses(a.currentSlide),a.updateDots(),a.updateArrows(),!0===a.options.fade)return!0!==t?(a.fadeSlideOut(n),a.fadeSlide(s,function(){a.postSlide(s)})):a.postSlide(s),void a.animateHeight();!0!==t&&a.slideCount>a.options.slidesToShow?a.animateSlide(l,function(){a.postSlide(s)}):a.postSlide(s)}},e.prototype.startLoad=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.hide(),i.$slider.addClass("slick-loading")},e.prototype.swipeDirection=function(){var i,e,t,o,s=this;return i=s.touchObject.startX-s.touchObject.curX,e=s.touchObject.startY-s.touchObject.curY,t=Math.atan2(e,i),(o=Math.round(180*t/Math.PI))<0&&(o=360-Math.abs(o)),o<=45&&o>=0?!1===s.options.rtl?"left":"right":o<=360&&o>=315?!1===s.options.rtl?"left":"right":o>=135&&o<=225?!1===s.options.rtl?"right":"left":!0===s.options.verticalSwiping?o>=35&&o<=135?"down":"up":"vertical"},e.prototype.swipeEnd=function(i){var e,t,o=this;if(o.dragging=!1,o.swiping=!1,o.scrolling)return o.scrolling=!1,!1;if(o.interrupted=!1,o.shouldClick=!(o.touchObject.swipeLength>10),void 0===o.touchObject.curX)return!1;if(!0===o.touchObject.edgeHit&&o.$slider.trigger("edge",[o,o.swipeDirection()]),o.touchObject.swipeLength>=o.touchObject.minSwipe){switch(t=o.swipeDirection()){case"left":case"down":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide+o.getSlideCount()):o.currentSlide+o.getSlideCount(),o.currentDirection=0;break;case"right":case"up":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide-o.getSlideCount()):o.currentSlide-o.getSlideCount(),o.currentDirection=1}"vertical"!=t&&(o.slideHandler(e),o.touchObject={},o.$slider.trigger("swipe",[o,t]))}else o.touchObject.startX!==o.touchObject.curX&&(o.slideHandler(o.currentSlide),o.touchObject={})},e.prototype.swipeHandler=function(i){var e=this;if(!(!1===e.options.swipe||"ontouchend"in document&&!1===e.options.swipe||!1===e.options.draggable&&-1!==i.type.indexOf("mouse")))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,!0===e.options.verticalSwiping&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),i.data.action){case"start":e.swipeStart(i);break;case"move":e.swipeMove(i);break;case"end":e.swipeEnd(i)}},e.prototype.swipeMove=function(i){var e,t,o,s,n,r,l=this;return n=void 0!==i.originalEvent?i.originalEvent.touches:null,!(!l.dragging||l.scrolling||n&&1!==n.length)&&(e=l.getLeft(l.currentSlide),l.touchObject.curX=void 0!==n?n[0].pageX:i.clientX,l.touchObject.curY=void 0!==n?n[0].pageY:i.clientY,l.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(l.touchObject.curX-l.touchObject.startX,2))),r=Math.round(Math.sqrt(Math.pow(l.touchObject.curY-l.touchObject.startY,2))),!l.options.verticalSwiping&&!l.swiping&&r>4?(l.scrolling=!0,!1):(!0===l.options.verticalSwiping&&(l.touchObject.swipeLength=r),t=l.swipeDirection(),void 0!==i.originalEvent&&l.touchObject.swipeLength>4&&(l.swiping=!0,i.preventDefault()),s=(!1===l.options.rtl?1:-1)*(l.touchObject.curX>l.touchObject.startX?1:-1),!0===l.options.verticalSwiping&&(s=l.touchObject.curY>l.touchObject.startY?1:-1),o=l.touchObject.swipeLength,l.touchObject.edgeHit=!1,!1===l.options.infinite&&(0===l.currentSlide&&"right"===t||l.currentSlide>=l.getDotCount()&&"left"===t)&&(o=l.touchObject.swipeLength*l.options.edgeFriction,l.touchObject.edgeHit=!0),!1===l.options.vertical?l.swipeLeft=e+o*s:l.swipeLeft=e+o*(l.$list.height()/l.listWidth)*s,!0===l.options.verticalSwiping&&(l.swipeLeft=e+o*s),!0!==l.options.fade&&!1!==l.options.touchMove&&(!0===l.animating?(l.swipeLeft=null,!1):void l.setCSS(l.swipeLeft))))},e.prototype.swipeStart=function(i){var e,t=this;if(t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow)return t.touchObject={},!1;void 0!==i.originalEvent&&void 0!==i.originalEvent.touches&&(e=i.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==e?e.pageX:i.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==e?e.pageY:i.clientY,t.dragging=!0},e.prototype.unfilterSlides=e.prototype.slickUnfilter=function(){var i=this;null!==i.$slidesCache&&(i.unload(),i.$slideTrack.children(this.options.slide).detach(),i.$slidesCache.appendTo(i.$slideTrack),i.reinit())},e.prototype.unload=function(){var e=this;i(".slick-cloned",e.$slider).remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove(),e.$nextArrow&&e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove(),e.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")}
1233,e.prototype.unslick=function(i){var e=this;e.$slider.trigger("unslick",[e,i]),e.destroy()},e.prototype.updateArrows=function(){var i=this;Math.floor(i.options.slidesToShow/2),!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&!i.options.infinite&&(i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===i.currentSlide?(i.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-i.options.slidesToShow&&!1===i.options.centerMode?(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-1&&!0===i.options.centerMode&&(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},e.prototype.updateDots=function(){var i=this;null!==i.$dots&&(i.$dots.find("li").removeClass("slick-active").end(),i.$dots.find("li").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass("slick-active"))},e.prototype.visibility=function(){var i=this;i.options.autoplay&&(document[i.hidden]?i.interrupted=!0:i.interrupted=!1)},i.fn.slick=function(){var i,t,o=this,s=arguments[0],n=Array.prototype.slice.call(arguments,1),r=o.length;for(i=0;i<r;i++)if("object"==typeof s||void 0===s?o[i].slick=new e(o[i],s):t=o[i].slick[s].apply(o[i].slick,n),void 0!==t)return t;return o}}); 1234 1235docReady(function () { 1236 var sliderElement = document.querySelector('.product-detail__slider-stage'); 1237 var productSliderElementV1 = document.querySelector('.product-slider__slider-stage--v1'); 1238 var productSliderElementV2 = document.querySelector('.product-slider__slider-stage--v2'); 1239 var eventSliderElementV1 = document.querySelector('.event-slider__slider-stage--v1'); 1240 var eventSliderElementV2 = document.querySelector('.event-slider__slider-stage--v2'); 1241 var eventSliderElementV3 = document.querySelector('.event-slider__slider-stage--v3'); 1242 var articlePageSliderElement = document.querySelector('.articlepage-slider__slider-stage'); 1243 var shortsSliderElement = document.querySelector('.shorts-slider__slider-stage'); 1244 1245 // change current date-badge if event is today 1246 let eventSliderDateBadges = document.querySelectorAll('.eventteaser__date-badge--date'); 1247 if(eventSliderDateBadges !== null) { 1248 // format date to j.n.Y 1249 let today = new Date().toLocaleDateString("de-DE", {timeZone: "Europe/Berlin"}); 1250 eventSliderDateBadges.forEach(function (eventSliderDateBadge) { 1251 if(today == eventSliderDateBadge.dataset.date) { 1252 eventSliderDateBadge.innerHTML = "Heute"; 1253 } 1254 }); 1255 } 1256 1257 // change current news date-badge if event is today 1258 let newsDateBadges = document.querySelectorAll('.news-teaser-item__date'); 1259 if(newsDateBadges !== null) { 1260 let referenceDate = new Date(), 1261 day = referenceDate.getUTCDate(), 1262 month = referenceDate.getUTCMonth() + 1, 1263 today = new Date().toLocaleDateString("de-DE", {timeZone: "Europe/Berlin"}); // format date to j.n.Y 1264 1265 // Add leading zeros if necessary 1266 day = day.toString().padStart(2, '0'); 1267 month = month.toString().padStart(2, '0'); 1268 1269 newsDateBadges.forEach(function (newsDateBadge) { 1270 if(today == newsDateBadge.dataset.date) { 1271 newsDateBadge.innerHTML = "Heute, " + day + "." + month + "."; 1272 } 1273 }); 1274 } 1275 1276 // product detail page 1277 if (sliderElement !== null) { 1278 $('.product-detail__slider-stage').slick({ 1279 slidesToShow: 1, 1280 slidesToScroll: 1, 1281 arrows: false, 1282 fade: true, 1283 autoplay: true, 1284 autoplaySpeed: 2000, 1285 focusOnSelect: true, 1286 pauseOnFocus: true, 1287 pauseOnHover: true, 1288 adaptiveHeight: false, 1289 asNavFor: '.product-detail__slider-nav', 1290 responsive: [ 1291 { 1292 breakpoint: 768, 1293 settings: { 1294 arrows: true, 1295 infinite: true, 1296 adaptiveHeight: false 1297 } 1298 } 1299 ] 1300 }); 1301 1302 $('.product-detail__slider-nav').slick({ 1303 slidesToShow: 3, 1304 slidesToScroll: 1, 1305 asNavFor: '.product-detail__slider-stage', 1306 focusOnSelect: true 1307 }); 1308 1309 // pause autoplay after click 1310 let $productsliderImages = document.querySelectorAll('.product-detail__slider-stage a.lightbox, .product-detail__slider-nav img, .product-detail__slider-nav .slick-arrow, .product-detail__slider-stage .slick-arrow');
1311 $productsliderImages.forEach(function ($productsliderImage) { 1312 $productsliderImage.addEventListener('click', function (e) { 1313 $('.product-detail__slider-stage').slick('slickSetOption', 'autoplay', false).slick('slickPause'); 1314 }); 1315 }); 1316 1317 // pause autoplay after swipe 1318 $('.product-detail__slider-stage').on('swipe', function(event, slick, direction){ 1319 $('.product-detail__slider-stage').slick('slickSetOption', 'autoplay', false).slick('slickPause'); 1320 }); 1321 } 1322 1323 // product-slider ce (without info-text) --> takes effect on the mediaslider, too 1324 if (productSliderElementV1 !== null) { 1325 $('.product-slider__slider-stage--v1').slick({ 1326 slidesToShow: 4, 1327 slidesToScroll: 1, 1328 arrows: true, 1329 infinite: false, 1330 responsive: [ 1331 { 1332 breakpoint: 992, 1333 settings: { 1334 slidesToShow: 3 1335 } 1336 }, 1337 { 1338 breakpoint: 768, 1339 settings: { 1340 arrows: false, 1341 slidesToShow: 1.5, 1342 } 1343 } 1344 ] 1345 }); 1346 } 1347 1348 // product-slider ce (with info-text) 1349 if (productSliderElementV2 !== null) { 1350 $('.product-slider__slider-stage--v2').slick({ 1351 slidesToShow: 2.5, 1352 slidesToScroll: 1, 1353 arrows: true, 1354 variableWidth: false, 1355 infinite: false, 1356 responsive: [ 1357 { 1358 breakpoint: 992, 1359 settings: { 1360 slidesToShow: 1.5 1361 } 1362 }, 1363 { 1364 breakpoint: 768, 1365 settings: { 1366 slidesToShow: 1.5, 1367 arrows: false 1368 } 1369 } 1370 ] 1371 }); 1372 } 1373 1374 // event-slider ce (without info-text) 1375 if (eventSliderElementV1 !== null) { 1376 $('.event-slider__slider-stage--v1').slick({ 1377 slidesToShow: 3, 1378 slidesToScroll: 1, 1379 arrows: true, 1380 infinite: false, 1381 responsive: [ 1382 { 1383 breakpoint: 992, 1384 settings: { 1385 slidesToShow: 2 1386 } 1387 }, 1388 { 1389 breakpoint: 576, 1390 settings: { 1391 slidesToShow: 1, 1392 arrows: true 1393 } 1394 } 1395 ] 1396 }); 1397 } 1398 1399 // event-slider ce (with info-text) 1400 if (eventSliderElementV2 !== null) { 1401 $('.event-slider__slider-stage--v2').slick({ 1402 slidesToShow: 2, 1403 slidesToScroll: 1, 1404 arrows: true, 1405 infinite: false, 1406 responsive: [ 1407 { 1408 breakpoint: 992, 1409 settings: { 1410 slidesToShow: 2 1411 } 1412 }, 1413 { 1414 breakpoint: 576, 1415 settings: { 1416 slidesToShow: 1, 1417 arrows: true 1418 } 1419 } 1420 ] 1421 }); 1422 } 1423 1424 // event-slider ce (appointment slider) 1425 if (eventSliderElementV3 !== null) { 1426 $('.event-slider__slider-stage--v3').slick({ 1427 slidesToShow: 2, 1428 slidesToScroll: 1, 1429 arrows: true, 1430 infinite: false, 1431 responsive: [ 1432 { 1433 breakpoint: 992, 1434 settings: { 1435 slidesToShow: 1 1436 } 1437 }, 1438 { 1439 breakpoint: 576, 1440 settings: { 1441 slidesToShow: 1 1442 } 1443 } 1444 ] 1445 }); 1446 } 1447 // Update WebinarStatus 1448 function updateWebinarStatus($allWebinars) { 1449 // check for events of type 'webinar' and take care for countdown and live badge
1450 $allWebinars.forEach(element => { 1451 let $eventBadge = element.querySelector(".eventteaser__category-badge"), 1452 _now = Math.floor(new Date().getTime() / 1000); 1453 const eventStart = parseInt(element.dataset.startdate); 1454 const eventDuration = parseInt(element.dataset.duration) * 60 || 7200; // duration in minutes * 60 to get seconds || default 7200 seconds => 2h 1455 1456 // one hour before event start --> countdown 1457 if (_now >= (eventStart - 3600) && _now <= eventStart) { 1458 $eventBadge.innerHTML = "Start in " + Math.ceil(((eventStart - _now) / 60)) + " Min."; 1459 } 1460 1461 // on event start + duration --> live badge 1462 if (_now <= (eventStart + eventDuration) && _now >= eventStart) { 1463 $eventBadge.classList.add("eventteaser__category-badge--live"); 1464 $eventBadge.innerHTML = "Jetzt LIVE!"; 1465 } 1466 }); 1467 } 1468 1469 let $allWebinars = document.querySelectorAll('.eventteaser[data-document-type="webinar"]'); 1470 1471 if ($allWebinars.length > 0) { 1472 // Initial update 1473 updateWebinarStatus($allWebinars); 1474 setInterval(updateWebinarStatus, 60000, $allWebinars); 1475 } 1476 1477 // articlepage-slider ce 1478 if (articlePageSliderElement !== null) { 1479 $('.articlepage-slider__slider-stage').slick({ 1480 slidesToShow: 4, 1481 slidesToScroll: 1, 1482 arrows: true, 1483 infinite: false, 1484 responsive: [ 1485 { 1486 breakpoint: 992, 1487 settings: { 1488 slidesToShow: 3 1489 } 1490 }, 1491 { 1492 breakpoint: 768, 1493 settings: { 1494 arrows: true, 1495 slidesToShow: 1, 1496 } 1497 } 1498 ] 1499 }); 1500 } 1501 1502 // shorts-slider ce 1503 if (shortsSliderElement !== null) { 1504 $('.shorts-slider__slider-stage').slick({ 1505 slidesToShow: 4, 1506 slidesToScroll: 1, 1507 arrows: true, 1508 infinite: false, 1509 responsive: [ 1510 { 1511 breakpoint: 992, 1512 settings: { 1513 slidesToShow: 3 1514 } 1515 }, 1516 { 1517 breakpoint: 768, 1518 settings: { 1519 slidesToShow: 1.5, 1520 } 1521 } 1522 ] 1523 }); 1524 } 1525 1526 // bigteaserslider ce 1527 var bigteasersliderElements = document.querySelectorAll('.bigteaserslider__stage'); 1528 bigteasersliderElements.forEach(function(bigteasersliderElement) { 1529 var slideCount = parseInt(bigteasersliderElement.closest('.bigteaserslider').dataset.slideCount, 10) || 1; 1530 var initialSlide = 0; 1531 1532 // cookie-based start slide 1533 var visitCountMatch = document.cookie.match(/(^| )dw_visit_count=([^;]+)/); 1534 if (visitCountMatch && slideCount > 1) { 1535 var visitCount = parseInt(visitCountMatch[2], 10); 1536 initialSlide = ((visitCount - 1) % slideCount + slideCount) % slideCount; 1537 } 1538 1539 if (slideCount > 1) { 1540 var $slider = $(bigteasersliderElement); 1541 1542 $slider.slick({ 1543 slidesToShow: 1, 1544 slidesToScroll: 1, 1545 arrows: true, 1546 prevArrow: '<button type="button" class="bigteaserslider__arrow bigteaserslider__arrow--prev" aria-label="Zurück"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M7 13L2 8M2 8L7 3M2 8H14" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg></button>', 1547 nextArrow: '<button type="button" class="bigteaserslider__arrow bigteaserslider__arrow--next" aria-label="Weiter"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M9 3L14 8M14 8L9 13M14 8H2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg></button>', 1548 dots: false, 1549 infinite: true, 1550 initialSlide: initialSlide, 1551 swipe: true, 1552 swipeToSlide: true, 1553 touchMove: true, 1554 adaptiveHeight: false 1555 }); 1556 1557 // custom in-slide dots: set initial active state
1558 $slider.find('.bigteaserslider__dot[data-slide-index="' + initialSlide + '"]').addClass('bigteaserslider__dot--active'); 1559 1560 // manage dot tabindex: only active slide's dots are tabbable, and only when in viewport 1561 var bigteasersliderContainer = bigteasersliderElement.closest('.bigteaserslider'); 1562 var isSliderInViewport = false; 1563 1564 function updateDotTabindex() { 1565 bigteasersliderContainer.querySelectorAll('.bigteaserslider__dot').forEach(function(dot) { 1566 dot.setAttribute('tabindex', '-1'); 1567 }); 1568 if (isSliderInViewport) { 1569 var activeSlide = bigteasersliderContainer.querySelector('.slick-active'); 1570 if (activeSlide) { 1571 activeSlide.querySelectorAll('.bigteaserslider__dot').forEach(function(dot) { 1572 dot.setAttribute('tabindex', '0'); 1573 }); 1574 } 1575 } 1576 } 1577 1578 var observer = new IntersectionObserver(function(entries) { 1579 entries.forEach(function(entry) { 1580 isSliderInViewport = entry.isIntersecting; 1581 updateDotTabindex(); 1582 }); 1583 }, { threshold: 0 }); 1584 observer.observe(bigteasersliderContainer); 1585 1586 // sync dots on slide change 1587 $slider.on('afterChange', function(event, slick, currentSlide) { 1588 $slider.find('.bigteaserslider__dot').removeClass('bigteaserslider__dot--active'); 1589 $slider.find('.bigteaserslider__dot[data-slide-index="' + currentSlide + '"]').addClass('bigteaserslider__dot--active'); 1590 updateDotTabindex(); 1591 }); 1592 1593 // dot click handler with stopPropagation to prevent parent link navigation 1594 $slider.on('click', '.bigteaserslider__dot', function(e) { 1595 e.preventDefault(); 1596 e.stopPropagation(); 1597 var index = parseInt($(this).data('slide-index'), 10); 1598 $slider.slick('slickGoTo', index); 1599 }); 1600 } 1601 }); 1602 1603 //Tracking 1604 const trackingDataSlider = document.querySelectorAll('.slider--tracking-data'); 1605 const trackingDataTeaser = document.querySelectorAll('.productteaser__tracking'); 1606 1607 let trackingItems = []; 1608 trackingDataSlider.forEach(function (trackingDataElement) { 1609 const jsonData = trackingDataElement.dataset.tracking; 1610 if (jsonData.length > 0) { 1611 const items = JSON.parse(jsonData) 1612 items.forEach(function (item) {trackingItems.push(item)}); 1613 } 1614 }); 1615 1616 trackingDataTeaser.forEach(function (trackingDataElement) { 1617 const jsonData = trackingDataElement.dataset.tracking; 1618 if (jsonData.length > 0) { 1619 trackingItems.push(JSON.parse(jsonData)); 1620 } 1621 }); 1622 1623 if (trackingItems.length > 0) { 1624 window.dataLayer = window.dataLayer || []; 1625 window.dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object 1626 window.dataLayer.push({ 1627 event: 'view_item_list', 1628 ecommerce: { 1629 item_list_name: document.title, // Page title 1630 item_list_id: location.pathname, // URL Slug 1631 items: trackingItems 1632 } 1633 }); 1634 } 1635}); 1636 1637function replaceRecursively(element) { 1638 let children = element.children; 1639 children.forEach(function (child) { 1640 if (child.children.length > 0) { 1641 replaceRecursively(child); 1642 } else { 1643 child.innerHTML = replaceWundePlus(child); 1644 } 1645 }); 1646} 1647 1648function replaceWundePlus(element, bold = true) { 1649 if (bold) { 1650 return element.innerHTML.replace(/wunde\+/gi, "<strong>WUNDEâº</strong>"); 1651 } else { 1652 return element.innerHTML.replace(/wunde\+/gi, "WUNDEâº"); 1653 } 1654} 1655 1656docReady(function () { 1657 // As we cant just replace the whole innerHTML of the body - as it would remove all event listeners for example 1658 // and probably cause other issues as well - we need to do it recursively 1659 1660 // Replace in elements in the body 1661 let body = document.querySelector("body"); 1662 if (body) { 1663 replaceRecursively(body); 1664 } 1665 1666 // Replace in title 1667 let title = document.querySelector("title"); 1668 if (title) { 1669 title.innerHTML = replaceWundePlus(title, false); 1670 } 1671 1672}); 1673 1674 1675 1676var Raphael = Raphael || {}; 1677Raphael.Draco = Raphael.Draco || {}; 1678Raphael.Draco.Menu = Raphael.Draco.Menu || {}; 1679 1680Raphael.Draco.Menu.FlyoutMenuController = function () { 1681 const _this = this; 1682 const $toggleProfilemenuFlyout = document.querySelector('.js-toggle-profile-menu-flyout'); 1683 const $profilemenuFlyout = document.getElementById('js-profile-menu-flyout'); 1684 let showProfileFlyout = false;
1685 1686 this.isFlyoutActive = function () { 1687 if (window.innerWidth > 991 || (window.innerWidth <= 991 && $profilemenuFlyout.classList.contains('header__flyout-container--logged-out'))) { 1688 showProfileFlyout = true; 1689 } else { 1690 showProfileFlyout = false; 1691 } 1692 } 1693 1694 this.focusFirst = function () { 1695 setTimeout(function () { 1696 const focusable = $profilemenuFlyout.querySelector( 1697 'a, button, input, [tabindex]:not([tabindex="-1"])' 1698 ); 1699 if (focusable) { 1700 focusable.focus(); 1701 } 1702 }, 50); 1703 }; 1704 1705 this.toggle = function (event) { 1706 $profilemenuFlyout.classList.toggle("header__flyout-container--visible"); 1707 if ($profilemenuFlyout.classList.contains("header__flyout-container--visible")) { 1708 _this.focusFirst(); 1709 } 1710 }; 1711 1712 this.open = function (event) { 1713 $profilemenuFlyout.classList.add("header__flyout-container--visible"); 1714 _this.focusFirst(); 1715 }; 1716 1717 this.close = function (event) { 1718 $profilemenuFlyout.classList.remove("header__flyout-container--visible"); 1719 }; 1720 1721 this.handleOutsideClick = function(event) { 1722 if (showProfileFlyout && 1723 $profilemenuFlyout && 1724 $profilemenuFlyout.classList.contains("header__flyout-container--visible") && 1725 !$profilemenuFlyout.contains(event.target) && 1726 !$toggleProfilemenuFlyout.contains(event.target)) { 1727 _this.close(); 1728 } 1729 }; 1730 1731 this.handleEscapeKey = function(event) { 1732 if (event.key === 'Escape' && 1733 showProfileFlyout && 1734 $profilemenuFlyout && 1735 $profilemenuFlyout.classList.contains("header__flyout-container--visible")) { 1736 _this.close(); 1737 } 1738 }; 1739 1740 this.mainInit = function () { 1741 // on page load 1742 _this.isFlyoutActive(); 1743 1744 const $flyoutLinks = $profilemenuFlyout.querySelectorAll('.header__flyout-headline .js-flyout-login-link, .header__flyout-content .js-flyout-register-link'); 1745 const currentUrl = window.location.href; 1746 $flyoutLinks.forEach(function (link) { 1747 const href = link.getAttribute('href'); 1748 if (href) { 1749 const separator = href.includes('?') ? '&' : '?'; 1750 link.setAttribute('href', href + separator + 'referrer=' + encodeURIComponent(currentUrl)); 1751 } 1752 }); 1753 1754 // on window resize 1755 window.addEventListener("resize", debounce((function () { 1756 _this.isFlyoutActive(); 1757 }), 30)); 1758 1759 // on click 1760 if ($toggleProfilemenuFlyout !== null) { 1761 $toggleProfilemenuFlyout.addEventListener("click", function (e) { 1762 if (showProfileFlyout === true) { 1763 e.preventDefault(); 1764 _this.toggle(); 1765 } 1766 }, false); 1767 } 1768 1769 // close on outside click and escape 1770 document.addEventListener('click', _this.handleOutsideClick); 1771 document.addEventListener('keydown', _this.handleEscapeKey); 1772 }; 1773}; 1774 1775var Raphael = Raphael || {}; 1776Raphael.Draco = Raphael.Draco || {}; 1777Raphael.Draco.Page = Raphael.Draco.Page || {}; 1778 1779Raphael.Draco.Page.ZoomController = function () { 1780 const statusTexts = { 1781 success: "Jetzt teilnehmen", 1782 error: "Leider ist etwas schiefgelaufen. Bitte versuchen Sie es später erneut.", 1783 bookedOut: "Bereits ausgebucht", 1784 unregisterSuccess: "Sie wurden erfolgreich abgemeldet." 1785 }; 1786 1787 let url = new URL(window.location.href); 1788 1789 let webinar = document.getElementsByClassName('event-detail--webinar')[0]; 1790 if (webinar && webinar.getAttribute("data-registered") === "true") { 1791 if (url.searchParams.get('registration_complete') === '1') { 1792 let modal = $('.form-message'); 1793 let messageTimeout = modal.data('ajax-message-timeout'); 1794 1795 modal.show().delay(messageTimeout).fadeOut("slow"); 1796 1797 modal.find('.form-message__close').on('click', function (){ 1798 modal.hide(); 1799 }); 1800 } 1801 } 1802 1803 1804 this.registration = function (trigger, addressId, noSample) { 1805 let ajaxParams = {}, 1806 zoomId = trigger.getAttribute("data-zoomid"), 1807 queryString = '', 1808 xhr = new XMLHttpRequest(); 1809 1810 ajaxParams = { 1811 type: 9752, 1812 action: "register", 1813 zoomid: zoomId, 1814 }; 1815 1816 // set the addressid for the request (only when samples are requested) 1817 if (addressId !== null) { 1818 ajaxParams.addressid = addressId; 1819 } 1820 1821 // add the sample choice: 1 = wants sample, 0 = no sample 1822 ajaxParams.sampleChoice = noSample ? 0 : 1; 1823 1824 // loading-spinner on registration with address-data 1825 if (trigger.id === 'js-zoom-registration') { 1826 trigger.disabled = true; 1827 } 1828 1829 queryString = '/?' + this._serialize(ajaxParams); 1830 1831 xhr.open("POST", queryString); 1832 xhr.responseType = "json"; 1833 xhr.send(); 1834 1835 xhr.onload = function () { 1836 let apiResponse = document.querySelector(".event-detail__apiresponse"); 1837 1838 if (this.response.success) { 1839 window.location.search = "registration_complete=1" 1840 } else { 1841 if (trigger.id =='js-open-profile-layer') { 1842 // error in Reprofiling 1843 // find the loading div that is currently shown (display:flex set by fireCustomEventByLayerType) 1844 let layerLoadingDiv = document.querySelector('.profile-layer__form__loading[style*="flex"]') 1845 || document.querySelector('.profile-layer__form:last-of-type .profile-layer__form__loading'); 1846 layerLoadingDiv.innerText = statusTexts.error; 1847 layerLoadingDiv.style.color = "#a5160f"; 1848 setTimeout(function () { 1849 location.reload(); 1850 }, 2000); 1851 } else { 1852 trigger.disabled = false;
1853 apiResponse.innerText = statusTexts.error; 1854 apiResponse.style.color = "#a5160f"; 1855 apiResponse.style.paddingTop = "20px"; 1856 } 1857 } 1858 }; 1859 }; 1860 1861 this.unregister = function (trigger) { 1862 // loading-spinner 1863 trigger.style.width = trigger.offsetWidth+"px"; 1864 trigger.disabled = true; 1865 1866 let zoomId = trigger.getAttribute("data-zoomid"), 1867 ajaxParams = { 1868 type: 9752, 1869 action: "unregister", 1870 zoomid: zoomId, 1871 }, 1872 queryString = "/?" + this._serialize(ajaxParams), 1873 xhr = new XMLHttpRequest(); 1874 1875 xhr.open("POST", queryString); 1876 xhr.responseType = "json"; 1877 xhr.send(); 1878 1879 xhr.onload = function () { 1880 const unregisterLayer = document.getElementById("js-unregister-layer").querySelector(".layer__container"); 1881 const headline = document.createElement("h3"); 1882 1883 if (this.response.success) { 1884 headline.className = "h1-style webinar-unregister-layer__success-response"; 1885 headline.innerText = statusTexts.unregisterSuccess; 1886 } else { 1887 headline.className = "h1-style webinar-unregister-layer__error-response"; 1888 headline.innerText = statusTexts.error; 1889 } 1890 1891 unregisterLayer.innerText = ""; 1892 unregisterLayer.appendChild(headline); 1893 1894 setTimeout(function () { 1895 location.reload(); 1896 }, 2000); 1897 }; 1898 }; 1899 1900 // check the availability of this webinar 1901 this.availability = function (trigger, triggerFormOnSuccess = false) { 1902 let zoomId = trigger.getAttribute("data-zoomid"), 1903 ajaxParams = { 1904 type: 9752, 1905 action: "availability", 1906 zoomid: zoomId, 1907 }, 1908 queryString = "/?" + this._serialize(ajaxParams), 1909 xhr = new XMLHttpRequest(); 1910 1911 xhr.open("POST", queryString); 1912 xhr.responseType = "json"; 1913 xhr.send(); 1914 xhr.onload = function () { 1915 let response = null, 1916 apiResponseContainer = document.querySelector('.event-detail__apiresponse'), 1917 eventActionsContainer = document.getElementById('js-event-actions'); 1918 1919 try { 1920 response = JSON.parse(this.response); 1921 } catch (e) { 1922 response = this.response; 1923 } 1924 1925 if (response.success) { 1926 let availability = response.data[0]; 1927 1928 if (availability === true) { 1929 if(triggerFormOnSuccess === true) { 1930 $("[data-ajax='1']").submit(); 1931 } else { 1932 eventActionsContainer.style.display = 'block'; 1933 trigger.style.display = 'none'; 1934 } 1935 } 1936 else { 1937 trigger.disabled = true; 1938 trigger.innerText = statusTexts.bookedOut; 1939 trigger.value = statusTexts.bookedOut; 1940 } 1941 } else { 1942 apiResponseContainer.innerText = statusTexts.error; 1943 apiResponseContainer.style.color = "#a5160f"; 1944 } 1945 }; 1946 }; 1947 1948 // check the availability of this webinar 1949 this.availabilityOnCheckout = function (trigger, triggerFormOnSuccess = false) { 1950 const zoomIds = document.querySelectorAll('[data-zoomid]'); 1951 if(zoomIds.length > 0) { 1952 var availabilityCheck = false; 1953 for (let i = 0; i < zoomIds.length; i++) { 1954 var limitedAvailable = zoomIds[i].getAttribute('data-limitedavailability'); 1955 if (limitedAvailable == 1) { 1956 availabilityCheck = true; 1957 let zoomId = zoomIds[i].getAttribute('data-zoomid'), 1958 ajaxParams = { 1959 type: 9752, 1960 action: "availability", 1961 zoomid: zoomId, 1962 }, 1963 queryString = "/?" + this._serialize(ajaxParams), 1964 xhr = new XMLHttpRequest(); 1965 1966 xhr.open("POST", queryString); 1967 xhr.responseType = "json"; 1968 xhr.send(); 1969 xhr.onload = function () { 1970 let response = null, 1971 apiResponseContainer = document.querySelector('[data-zoomid="'+zoomId+'"] .shopping-cart__product-infos .product-title'); 1972 1973 try { 1974 response = JSON.parse(this.response); 1975 } catch (e) { 1976 response = this.response; 1977 } 1978 1979 if (response.success) { 1980 let availability = response.data[0]; 1981 if (availability === true) { 1982 if(triggerFormOnSuccess === true) { 1983 $('#form-order').submit(); 1984 } else { 1985 trigger.style.display = 'none'; 1986 } 1987 } 1988 else { 1989 const errortext = document.createElement('span'); 1990 errortext.classList.add('error'); 1991 errortext.innerText = 'Webinar leider ausgebucht.'; 1992 apiResponseContainer.after(errortext); 1993 trigger.disabled = true; 1994 trigger.innerText = statusTexts.bookedOut; 1995 trigger.value = statusTexts.bookedOut; 1996 1997 } 1998 } else { 1999 apiResponseContainer.innerText = statusTexts.error; 2000 apiResponseContainer.style.color = "#a5160f"; 2001 } 2002 }; 2003 } 2004 } 2005 if (!availabilityCheck) { 2006 $("#form-order").submit(); 2007 } 2008 } else { 2009 $("#form-order").submit(); 2010 } 2011 }; 2012 2013 this._serialize = function (obj, prefix) { 2014 var str = [], 2015 p, 2016 _this = this; 2017 for (p in obj) { 2018 if (obj.hasOwnProperty(p)) { 2019 var k = prefix ? prefix + "[" + p + "]" : p, 2020 v = obj[p]; 2021 str.push( 2022 v !== null && typeof v === "object" 2023 ? _this._serialize(v, k) 2024 : encodeURIComponent(k) + "=" + encodeURIComponent(v) 2025 ); 2026 } 2027 } 2028 return str.join("&"); 2029 }; 2030}; 2031 2032var Raphael = Raphael || {}; 2033Raphael.Draco = Raphael.Draco || {}; 2034Raphael.Draco.Page = Raphael.Draco.Page || {}; 2035 2036Raphael.Draco.Page.ProfileLayerController = function () { 2037 const layer = document.getElementById('js-profile-layer'); 2038 const _this = this; 2039 const formSelectorPrefix = 'profilelayer-form-'; 2040 const loadingLayerTexts = { 2041 zoom: 'Ihre Webinaranmeldung läuft, bitte warten.' 2042 }; 2043 let layerType = ''; 2044 let webinarSampleSelected = true; // default: Ja (samples will be sent) 2045 2046 if (layer !== null) { 2047 layerType = layer.getAttribute('data-type'); 2048 } 2049 2050 this.changeToNextStep = function (currentStep, nextStep) { 2051 if (nextStep !== null) { 2052 let stepListItems = layer.querySelectorAll('.profile-layer__step-list li'), 2053 nextStepName = nextStep.getAttribute('id'); 2054 2055 // hide the current form 2056 currentStep.style.display = 'none'; 2057 2058 // display the next form 2059 nextStep.style.display = 'block'; 2060 2061 // change step indicator
2062 stepListItems.forEach(function (step) { 2063 if (step.getAttribute('data-name') === nextStepName) { 2064 step.classList.add('active'); 2065 2066 _this.validateFormFields(document.getElementById(nextStepName).querySelector('form'), true); 2067 } 2068 else { 2069 step.classList.remove('active'); 2070 } 2071 }); 2072 } else { 2073 _this.fireCustomEventByLayerType(currentStep); 2074 } 2075 }; 2076 2077 // show/hide step 3 and update the personal-data button text based on sample choice 2078 this.updateSampleStepVisibility = function () { 2079 const step3ListItem = layer.querySelector('.profile-layer__step-list li[data-name="professional-data"]'); 2080 const step2ListItem = layer.querySelector('.profile-layer__step-list li[data-name="personal-data"]'); 2081 2082 const personalDataForm = layer.querySelector('#personal-data'); 2083 2084 // toggle step 3 2085 if (step3ListItem) { 2086 if (webinarSampleSelected) { 2087 step3ListItem.style.visibility = ''; 2088 step2ListItem.classList.remove('is-last'); 2089 } else { 2090 step3ListItem.style.visibility = 'hidden'; 2091 step2ListItem.classList.add('is-last'); 2092 } 2093 } 2094 2095 // swap the submit button text in the personal-data step 2096 if (personalDataForm) { 2097 const submitBtn = personalDataForm.querySelector('form [type=submit]'); 2098 if (submitBtn) { 2099 const textSample = (submitBtn.dataset.textSample || '').trim(); 2100 const textNoSample = (submitBtn.dataset.textNoSample || '').trim(); 2101 if (webinarSampleSelected && textSample) { 2102 submitBtn.textContent = textSample; 2103 } else if (!webinarSampleSelected && textNoSample) { 2104 submitBtn.textContent = textNoSample; 2105 } 2106 } 2107 } 2108 }; 2109 2110 // get the address id of the selected address 2111 this.getCurrentAddressId = function () { 2112 let addressIdField = document.getElementById('currentAddressId'); 2113 2114 if (addressIdField !== null) { 2115 return addressIdField.value; 2116 } 2117 2118 return null; 2119 }; 2120 2121 // set the address id 2122 this.setCurrentAddressId = function (addressId) { 2123 let addressIdField = document.getElementById('currentAddressId'); 2124 2125 addressIdField.value = addressId; 2126 }; 2127 2128 this.fireCustomEventByLayerType = function (currentStep) { 2129 if (layerType === 'webinar') { 2130 let trigger = document.getElementById('js-open-profile-layer'), 2131 addressId = webinarSampleSelected ? _this.getCurrentAddressId() : null, 2132 loadingLayer = currentStep.querySelector('.profile-layer__form__loading'); 2133 2134 loadingLayer.innerHTML = loadingLayerTexts.zoom; 2135 loadingLayer.style.display = 'flex'; 2136 zoomController.registration(trigger, addressId, !webinarSampleSelected); 2137 } 2138 }; 2139 2140 // process the return value and do something with it 2141 this.processReturnValues = function (method, stepName, response) { 2142 // return values are important for new data only 2143 if (method !== 'post') { 2144 return; 2145 } 2146 2147 // get the address id for a newly created address 2148 if (stepName === 'professional-data' && response.fieldsToSet['addressId']) { 2149 _this.setCurrentAddressId(response.fieldsToSet['addressId']); 2150 } 2151 }; 2152 2153 this.initChangeDetection = function (form) { 2154 for (var i = 0; i < form.length; i++) { 2155 var el = form[i]; 2156 el.dataset.origValue = el.value; 2157 } 2158 }; 2159 2160 this.formHasChanges = function (form) { 2161 for (var i = 0; i < form.length; i++) { 2162 var el = form[i]; 2163 if ('origValue' in el.dataset && el.dataset.origValue !== el.value) { 2164 return true; 2165 } 2166 } 2167 return false; 2168 }; 2169 2170 this.areAllFormFieldsValid = function (form) { 2171 for (var i = 0; i < form.length; i++) { 2172 // Check if this is a postal code field 2173 if (form[i].id && form[i].id.startsWith('professionalDataAddressZip')) { 2174 const postalCode = form[i].value; 2175 const zipField = form[i]; 2176 2177 // Only validate if postal code has exactly 5 characters 2178 if (postalCode.length === 5) { 2179 // Check if we already validated this postal code or if a request is pending
2180 const lastValidatedZip = zipField.dataset.lastValidatedZip || ''; 2181 const isValidating = zipField.dataset.isValidating === 'true'; 2182 2183 // Only start new request if postal code changed and no request is pending 2184 if (postalCode !== lastValidatedZip && !isValidating) { 2185 // Mark as validating to prevent duplicate requests 2186 zipField.dataset.isValidating = 'true'; 2187 2188 // AJAX request to validate German postal code 2189 let xhr = new XMLHttpRequest(); 2190 const apiUrl = 'https://openplzapi.org/de/Localities?postalCode=' + encodeURIComponent(postalCode); 2191 2192 xhr.open('GET', apiUrl); 2193 xhr.responseType = 'json'; 2194 xhr.send(); 2195 2196 xhr.onload = function () { 2197 if (this.status === 200) { 2198 if (Array.isArray(this.response) && this.response.length === 0) { 2199 // Empty array means postal code is invalid 2200 zipField.setCustomValidity('Die eingegebene Postleitzahl ist ungültig.'); 2201 document.querySelector('.profile-layer__form__error__zip').style.display = 'block'; 2202 } else { 2203 // Non-empty array means postal code is valid 2204 zipField.setCustomValidity(''); 2205 document.querySelector('.profile-layer__form__error__zip').style.display = 'none'; 2206 } 2207 } else { 2208 // Status code is not 200, mark as valid to not block the process 2209 zipField.setCustomValidity(''); 2210 document.querySelector('.profile-layer__form__error__zip').style.display = 'none'; 2211 } 2212 2213 // Mark validation as complete 2214 zipField.dataset.isValidating = 'false'; 2215 zipField.dataset.lastValidatedZip = postalCode; 2216 2217 // Update button state without re-triggering validation 2218 let submitButton = form.querySelector('[type=submit]'); 2219 let isValid = zipField.checkValidity(); 2220 2221 // Check all other fields 2222 let allValid = true; 2223 for (var j = 0; j < form.length; j++) { 2224 if (!form[j].checkValidity()) { 2225 allValid = false; 2226 break; 2227 } 2228 } 2229 submitButton.disabled = !allValid; 2230 }; 2231 2232 xhr.onerror = function () { 2233 // Network error, mark as valid to not block the process 2234 zipField.setCustomValidity(''); 2235 document.querySelector('.profile-layer__form__error__zip').style.display = 'none'; 2236 zipField.dataset.isValidating = 'false'; 2237 zipField.dataset.lastValidatedZip = postalCode; 2238 2239 // Update button state 2240 let submitButton = form.querySelector('[type=submit]'); 2241 let allValid = true; 2242 for (var j = 0; j < form.length; j++) { 2243 if (!form[j].checkValidity()) { 2244 allValid = false; 2245 break; 2246 } 2247 } 2248 submitButton.disabled = !allValid; 2249 }; 2250 } 2251 } 2252 2253 // Check current validity (will use setCustomValidity if set) 2254 if (form[i].checkValidity() === false) { 2255 return false;
2256 } 2257 } else if(form[i].checkValidity() === false){ 2258 return false; 2259 } 2260 } 2261 2262 return true; 2263 } 2264 2265 this.validateFormFields = function (form, initialCheck) { 2266 let submitButton = form.querySelector('[type=submit]'), 2267 fields = form.querySelectorAll('select, input:not([type=submit])'); 2268 2269 for (var i = 0; i < form.length; i++) { 2270 if (initialCheck) { 2271 let otherFieldsValid = _this.areAllFormFieldsValid(form); 2272 submitButton.disabled = !otherFieldsValid; 2273 } 2274 2275 form[i].addEventListener('input', function (e) { 2276 let otherFieldsValid = _this.areAllFormFieldsValid(form); 2277 submitButton.disabled = !otherFieldsValid; 2278 }); 2279 2280 form[i].addEventListener('change', function (e) { 2281 let otherFieldsValid = _this.areAllFormFieldsValid(form); 2282 submitButton.disabled = !otherFieldsValid; 2283 }); 2284 } 2285 }; 2286 2287 this.saveData = function (form) { 2288 let parent = form.parentNode, 2289 method = form.getAttribute('data-method'), 2290 pushToServer = false, 2291 fields = {}, 2292 stepName, 2293 currentStep, 2294 nextStep, 2295 loadingLayer; 2296 2297 // get the proper step name and not the form name 2298 if (parent.classList.contains('profile-layer__form__edit') || parent.classList.contains('profile-layer__form__new')) { 2299 stepName = parent.parentNode.getAttribute('id'); 2300 } 2301 else { 2302 stepName = parent.getAttribute('id'); 2303 } 2304 currentStep = document.querySelector('div[id="' + stepName + '"]'); 2305 nextStep = currentStep.nextElementSibling; 2306 loadingLayer = currentStep.querySelector('.profile-layer__form__loading'); 2307 2308 // When the user does not want a sample, personal-data is the last step 2309 // skip the professional-data (address) step and go straight to registration. 2310 if (stepName === 'personal-data' && !webinarSampleSelected) { 2311 nextStep = null; 2312 } 2313 2314 if (stepName === 'intro') { 2315 // skip the saving stuff 2316 _this.changeToNextStep(currentStep, nextStep); 2317 return; 2318 } 2319 2320 // update data only if form has changed 2321 if (_this.formHasChanges(form)) { 2322 pushToServer = true; 2323 } 2324 2325 if (pushToServer) { 2326 // prepare the form fields 2327 form.querySelectorAll('select, input:not([type=submit])').forEach(function (el) { 2328 let type = el.getAttribute('type'), 2329 name = el.getAttribute('name'); 2330 2331 // only add checked checkboxes or radio buttons 2332 if (type !== 'checkbox' && type !== 'radio' || (type === 'checkbox' && el.checked === true) || (type === 'radio' && el.checked === true)) { 2333 fields[name] = el.value; 2334 } 2335 }); 2336 2337 let ajaxParams = { 2338 type: 9000, 2339 name: stepName, 2340 method: method, 2341 fields: fields 2342 }, 2343 2344 queryString = '/?' + this._serialize(ajaxParams), 2345 xhr = new XMLHttpRequest(); 2346 2347 xhr.open('POST', queryString); 2348 xhr.responseType = 'json'; 2349 xhr.send(); 2350 2351 loadingLayer.style.display = 'flex'; 2352 2353 xhr.onload = function () { 2354 if (this.response.success) { 2355 _this.processReturnValues(method, stepName, this.response); 2356 _this.changeToNextStep(currentStep, nextStep); 2357 } else { 2358 // Show the error message 2359 currentStep.querySelector('.profile-layer__form__error').style.display = 'block'; 2360 } 2361 2362 // last step triggers page/reload 2363 if (nextStep !== null) { 2364 loadingLayer.style.display = 'none'; 2365 } 2366 }; 2367 } else { 2368 _this.changeToNextStep(currentStep, nextStep); 2369 // last step triggers page/reload 2370 if (nextStep !== null) { 2371 loadingLayer.style.display = 'none'; 2372 } 2373 } 2374 }; 2375 2376 this.showAddressForm = function (target) { 2377 let form = document.getElementById(formSelectorPrefix + target), 2378 formParent = form.parentNode; 2379 2380 // show the target form 2381 form.style.display = 'block'; 2382 form.classList.remove('remove-in-edit-mode'); 2383 2384 // remove all other unwanted elements 2385 formParent.querySelectorAll('.remove-in-edit-mode').forEach(function(el) { 2386 el.remove(); 2387 }); 2388 }; 2389 2390 this.init = function () { 2391 layer.querySelectorAll('form').forEach(function (form) { 2392 _this.initChangeDetection(form); 2393 _this.validateFormFields(form); 2394 2395 form.addEventListener('submit', function (e) { 2396 e.preventDefault(); 2397 2398 _this.saveData(this); 2399 }); 2400 }); 2401 2402 // Radio buttons in the intro step 2403 const sampleRadios = layer.querySelectorAll('#intro input[name="webinar-sample"]'); 2404 sampleRadios.forEach(function (radio) { 2405 radio.addEventListener('change', function () { 2406 webinarSampleSelected = this.value === '1'; 2407 _this.updateSampleStepVisibility(); 2408 }); 2409 }); 2410 // Sync initial state 2411 const checkedRadio = layer.querySelector('#intro input[name="webinar-sample"]:checked'); 2412 if (checkedRadio) { 2413 webinarSampleSelected = checkedRadio.value === '1'; 2414 _this.updateSampleStepVisibility(); 2415 } 2416 2417 layer.querySelectorAll('button[data-open-form]').forEach(function (el) { 2418 el.addEventListener('click', function (e) { 2419 e.preventDefault(); 2420 2421 const target = this.getAttribute('data-open-form') 2422 _this.showAddressForm(target); 2423 }); 2424 }); 2425 }; 2426 2427 this._serialize = function (obj, prefix) { 2428 var str = [], 2429 p, 2430 _this = this; 2431 for (p in obj) { 2432 if (obj.hasOwnProperty(p)) { 2433 var k = prefix ? prefix + "[" + p + "]" : p, 2434 v = obj[p]; 2435 str.push((v !== null && typeof v === "object") ? 2436 _this._serialize(v, k) : 2437 encodeURIComponent(k) + "=" + encodeURIComponent(v)); 2438 } 2439 } 2440 return str.join("&"); 2441 }; 2442}; 2443 2444var Raphael = Raphael || {}; 2445Raphael.Draco = Raphael.Draco || {}; 2446Raphael.Draco.Page = Raphael.Draco.Page || {}; 2447 2448Raphael.Draco.Page.LayerController = function () { 2449 const _this = this; 2450 const $html = document.querySelector('html'); 2451 const $body = document.querySelector('body'); 2452 const $checkoutAddress = document.getElementById('checkout-step-shipping-address'); 2453 2454 $layerButtons = document.getElementsByClassName('js-open-layer'); 2455 $closeButtons = document.getElementsByClassName('js-layer__close'); 2456 2457 for (i = 0; i < $layerButtons.length; i++) { 2458 $layerButton = $layerButtons[i]; 2459 2460 $layerButton.addEventListener('click', function (event) { 2461 event.preventDefault(); 2462 _this.open(this); 2463 }); 2464 } 2465 2466 for (i = 0; i < $closeButtons.length; i++) { 2467 $closeButton = $closeButtons[i]; 2468 2469 $closeButton.addEventListener('click', function (event) { 2470 event.preventDefault(); 2471 _this.close(event); 2472 }); 2473 } 2474 2475 this.open = function (event) { 2476 document.getElementById(event.getAttribute('data-target')).classList.add('layer--is-open'); 2477 2478 const widthBeforeLock = $html.clientWidth; 2479 2480 $html.classList.add('layer-open--html'); 2481 $body.classList.add('layer-open'); 2482 2483 // reserve the width of the scrollbar the lock removed, else the page jumps sideways 2484 const scrollbarWidth = $html.clientWidth - widthBeforeLock; 2485 if (scrollbarWidth > 0) { 2486 $html.style.paddingRight = scrollbarWidth + 'px'; 2487 } 2488 }; 2489 2490 this.close = function (event) { 2491 event.target.closest(".layer").classList.remove('layer--is-open'); 2492 2493 $html.classList.remove('layer-open--html'); 2494 $body.classList.remove('layer-open'); 2495 $html.style.paddingRight = ''; 2496 2497 if ($checkoutAddress) { 2498 $checkoutAddress.scrollIntoView(); 2499 } 2500 } 2501}; 2502 2503docReady(function () { 2504 let $allToolTips = document.querySelectorAll('.tooltip'); 2505 let $allDeliverableTriggers = document.querySelectorAll('.product-detail__deliverable-trigger'); 2506 2507 // check if closable tooltips are available 2508 if(typeof($allToolTips) != 'undefined' && $allToolTips != null) { 2509 for (let i = 0; i < $allToolTips.length; i++) {
2510 let $this = $allToolTips[i]; 2511 2512 $this.addEventListener('click', function (e) { 2513 if ($this.classList.contains('tooltip--active')) { 2514 $this.classList.remove('tooltip--active'); 2515 } else { 2516 $this.classList.add('tooltip--active'); 2517 } 2518 }, false); 2519 2520 $this.querySelector('span').addEventListener('click', function (e) { 2521 $parent = this.parentNode; 2522 if ($parent.classList.contains('tooltip--active')) { 2523 $parent.classList.remove('tooltip--active'); 2524 } else { 2525 $parent.classList.add('tooltip--active'); 2526 } 2527 }, false); 2528 } 2529 } 2530 2531 if(typeof($allDeliverableTriggers) != 'undefined' && $allDeliverableTriggers != null) { 2532 $allDeliverableTriggers.forEach(function (item) { 2533 item.addEventListener('click', function (e) { 2534 if (e.target.closest('.tooltip')) { 2535 return; 2536 } 2537 2538 let $tooltip = item.querySelector('.tooltip'); 2539 2540 if (!$tooltip) { 2541 return; 2542 } 2543 2544 if ($tooltip.classList.contains('tooltip--active')) { 2545 $tooltip.classList.remove('tooltip--active'); 2546 } else { 2547 $tooltip.classList.add('tooltip--active'); 2548 } 2549 }); 2550 }); 2551 } 2552}); 2553 2554docReady(function () { 2555 let $allInlineToolTips = document.querySelectorAll('.inline-tooltip'); 2556 2557 // check if closable tooltips are available 2558 if(typeof($allInlineToolTips) != 'undefined' && $allInlineToolTips != null) { 2559 $allInlineToolTips.forEach(function (item) { 2560 item.addEventListener('click', function () { 2561 if (this.classList.contains('inline-tooltip--active')) { 2562 this.classList.remove('inline-tooltip--active'); 2563 } else { 2564 $allInlineToolTips.forEach(function (item) { 2565 item.classList.remove('inline-tooltip--active'); 2566 }); 2567 this.classList.add('inline-tooltip--active'); 2568 } 2569 }); 2570 2571 item.querySelector('.tooltip__content > span').addEventListener('click', function (e) { 2572 $parent = this.parentNode; 2573 if ($parent.classList.contains('inline-tooltip--active')) { 2574 $parent.classList.remove('inline-tooltip--active'); 2575 } else { 2576 $parent.classList.add('inline-tooltip--active'); 2577 } 2578 }); 2579 }); 2580 } 2581}); 2582 2583!function(){"use strict";function t(t,e){t&&(this.el=t,this.tabTriggers=this.el.getElementsByClassName("js-tabs-trigger"),this.tabPanels=this.el.getElementsByClassName("js-tabs-panel"),this.accordionTriggers=this.el.getElementsByClassName("js-accordion-trigger"),this.options=this._extend({breakpoint:640,tabsAllowed:!0,selectedTab:0,startCollapsed:!1},e),"true"==t.getAttribute("data-tabs-allowed")?this.options.tabsAllowed=!0:"false"==t.getAttribute("data-tabs-allowed")&&(this.options.tabsAllowed=!1),t.getAttribute("data-breakpoint")&&(this.options.breakpoint=parseInt(t.getAttribute("data-breakpoint"))),t.getAttribute("data-selected-tab")&&(this.options.selectedTab=parseInt(t.getAttribute("data-selected-tab"))),"true"==t.getAttribute("data-start-collapsed")?this.options.startCollapsed=!0:"false"==t.getAttribute("data-start-collapsed")&&(this.options.startCollapsed=!1),0!==this.tabTriggers.length&&this.tabTriggers.length===this.tabPanels.length&&this._init())}t.prototype._init=function(){var t=this;this.tabTriggersLength=this.tabTriggers.length,this.accordionTriggersLength=this.accordionTriggers.length,this.selectedTab=0,this.prevSelectedTab=null,this.clickListener=this._clickEvent.bind(this),this.keydownListener=this._keydownEvent.bind(this),this.keys={prev:37,next:39,space:32,enter:13},window.innerWidth>=this.options.breakpoint&&this.options.tabsAllowed?this.isAccordion=!1:this.isAccordion=!0;for(var e=0;e<this.tabTriggersLength;e++)this.tabTriggers[e].index=e,this.tabTriggers[e].addEventListener("click",this.clickListener,!1),this.tabTriggers[e].addEventListener("keydown",this.keydownListener,!1),this.tabTriggers[e].classList.contains("is-selected")&&(this.selectedTab=e),this._hide(e);for(e=0;e<this.accordionTriggersLength;e++)this.accordionTriggers[e].index=e,this.accordionTriggers[e].addEventListener("click",this.clickListener,!1),this.accordionTriggers[e].addEventListener("keydown",this.keydownListener,!1),this.accordionTriggers[e].classList.contains("is-selected")&&(this.selectedTab=e);isNaN(this.options.selectedTab)||(this.selectedTab=this.options.selectedTab<this.tabTriggersLength?this.options.selectedTab:this.tabTriggersLength-1),this.el.classList.add("is-initialized"),this.options.tabsAllowed&&this.el.classList.add("tabs-allowed"),this.options.startCollapsed&&this.isAccordion||this.selectTab(this.selectedTab,!1);var s=this._debounce(function(){window.innerWidth>=t.options.breakpoint&&t.options.tabsAllowed?(t.isAccordion=!1,t.options.tabsAllowed&&t.el.classList.add("tabs-allowed"),t.selectTab(t.selectedTab)):(t.isAccordion=!0,t.el.classList.remove("tabs-allowed"),t.options.startCollapsed||t.selectTab(t.selectedTab))},50);window.addEventListener("resize",s)},t.prototype._clickEvent=function(t){t.preventDefault();var e=this._getClosest(t.target,".js-tabs-trigger"),s=0;null==e?(e=this._getClosest(t.target,".js-accordion-trigger"),s=this._getClosest(e,".js-tabs-panel"),this.isAccordion=!0):this.isAccordion=!1;var i=null!=t.target.index?t.target.index:s.index;(i!==this.selectedTab||this.isAccordion)&&this.selectTab(i,!0)},t.prototype._keydownEvent=function(t){var e;if(t.keyCode===this.keys.prev||t.keyCode===this.keys.next||t.keyCode===this.keys.space||t.keyCode===this.keys.enter){if(t.preventDefault(),t.keyCode===this.keys.prev&&t.target.index>0&&!this.isAccordion)e=t.target.index-1;else if(t.keyCode===this.keys.next&&t.target.index<this.tabTriggersLength-1&&!this.isAccordion)e=t.target.index+1;else{if(t.keyCode!==this.keys.space&&t.keyCode!==this.keys.enter)return;e=t.target.index}this.selectTab(e,!0)}},t.prototype._show=function(t,e){this.tabPanels[t].removeAttribute("tabindex"),this.tabTriggers[t].removeAttribute("tabindex"),this.tabTriggers[t].classList.add("is-selected"),this.tabTriggers[t].setAttribute("aria-selected",!0),this.accordionTriggers[t].setAttribute("aria-expanded",!0);var s=this.tabPanels[t].getElementsByClassName("content")[0];s.setAttribute("aria-hidden",!1),s.classList.remove("accordion-tabs--is-hidden"),s.classList.add("accordion-tabs--is-open"),this.tabPanels[t].classList.remove("accordion-tabs--is-hidden"),this.tabPanels[t].classList.add("accordion-tabs--is-open"),e&&this.tabTriggers[t].focus()},t.prototype._hide=function(t){this.tabTriggers[t].classList.remove("is-selected"),this.tabTriggers[t].setAttribute("aria-selected",!1),this.accordionTriggers[t].setAttribute("aria-expanded",!1);var e=this.tabPanels[t].getElementsByClassName("content")[0];e.setAttribute("aria-hidden",!0),e.classList.remove("accordion-tabs--is-open"),e.classList.add("accordion-tabs--is-hidden"),this.tabPanels[t].classList.remove("accordion-tabs--is-open"),this.tabPanels[t].classList.add("accordion-tabs--is-hidden"),this.tabPanels[t].setAttribute("tabindex",-1)},t.prototype.selectTab=function(t,e){if(null===t){if(this.isAccordion)return;t=0}if(!this.tabPanels[t].classList.contains("accordion-tabs--is-hidden")&&e)return t===this.selectedTab?this.selectedTab=null:(this.selectedTab=null,this.prevSelectedTab=t),void this._hide(t);if(this.isAccordion)this.prevSelectedTab=this.selectedTab,this.selectedTab=t;else{if(null!==this.prevSelectedTab&&this.isAccordion)this._hide(this.selectedTab);else for(var s=0;s<this.tabTriggersLength;s++)s!==t&&this._hide(s);this.prevSelectedTab=this.selectedTab,this.selectedTab=t}this._show(this.selectedTab,e)},t.prototype.destroy=function(){for(var t=0;t<this.tabTriggersLength;t++)this.tabTriggers[t].classList.remove("is-selected"),this.tabTriggers[t].removeAttribute("aria-selected"),this.tabTriggers[t].removeAttribute("tabindex"),this.tabPanels[t].classList.remove("accordion-tabs--is-hidden"),this.tabPanels[t].removeAttribute("aria-hidden"),this.tabPanels[t].removeAttribute("tabindex"),this.tabTriggers[t].removeEventListener("click",this.clickListener,!1),this.tabTriggers[t].removeEventListener("keydown",this.keydownListener,!1),delete this.tabTriggers[t].index;this.el.classList.remove("is-initialized")},t.prototype._getClosest=function(t,e){for(Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(t){for(var e=(this.document||this.ownerDocument).querySelectorAll(t),s=e.length;--s>=0&&e.item(s)!==this;);return s>-1});t&&t!==document;t=t.parentNode)if(t.matches(e))return t;return null},t.prototype._extend=function(){var t={},e=!1,s=0,i=arguments.length;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(e=arguments[0],s++);for(var a=function(s){for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(e&&"[object Object]"===Object.prototype.toString.call(s[i])?t[i]=extend(!0,t[i],s[i]):t[i]=s[i])};s<i;s++){a(arguments[s])}return t},t.prototype._debounce=function(t,e,s){var i;return function(){var a=this,r=arguments,o=s&&!i;
2583clearTimeout(i),i=setTimeout(function(){i=null,s||t.apply(a,r)},e),o&&t.apply(a,r)}};var e=Array.prototype.slice;function s(){var s,i;(s=".js-tabs",e.call((i||document).querySelectorAll(s))).forEach(function(e){new t(e)})}"undefined"!=typeof Document&&("loading"!==document.readyState?s():document.addEventListener("DOMContentLoaded",s)),"undefined"!=typeof self&&(self.AccordionTabs=t),"object"==typeof module&&module.exports&&(module.exports=t)}(); 2584 2585var Raphael = Raphael || {}; 2586Raphael.Draco = Raphael.Draco || {}; 2587 2588Raphael.Draco.RegistrationConversionController = class { 2589 constructor() { 2590 this.cookieName = 'draco_conv_user_registration'; 2591 window.dataLayer = window.dataLayer || []; 2592 } 2593 2594 init() { 2595 this.checkAndPushRegistrationConversion(); 2596 } 2597 2598 checkAndPushRegistrationConversion() { 2599 const referrerLink = this.getCookieValue(this.cookieName); 2600 2601 if (referrerLink) { 2602 this.pushRegistrationConversion(referrerLink); 2603 this.deleteCookie(this.cookieName); 2604 } 2605 } 2606 2607 pushRegistrationConversion(referrerLink) { 2608 dataLayer.push({ ecommerce: null }); 2609 dataLayer.push({ 2610 event: 'conv_userRegistration', 2611 page_location: referrerLink 2612 }); 2613 } 2614 2615 getCookieValue(name) { 2616 const regex = new RegExp(`(^| )${name}=([^;]+)`); 2617 const match = document.cookie.match(regex); 2618 return match ? decodeURIComponent(match[2]) : null; 2619 } 2620 2621 deleteCookie(name) { 2622 const domain = window.location.hostname; 2623 const rootDomain = '.' + domain.split('.').slice(-2).join('.'); 2624 2625 document.cookie = `${name}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=${rootDomain}; secure`; 2626 } 2627}; 2628 2629docReady(function() { 2630 const registrationConversionController = new Raphael.Draco.RegistrationConversionController(); 2631 registrationConversionController.init(); 2632}); 2633 2634!function(t,e,a){"use strict";var r={};t.ARIAaccordion=r,r.NS="ARIAaccordion",r.AUTHOR="Scott O'Hara",r.VERSION="3.2.1",r.LICENSE="https://github.com/scottaohara/accessible_accordions/blob/master/LICENSE";var i="accordion",l=i+"__trigger",n=i+"__panel",o="[data-aria-accordion-heading]",d="[data-aria-accordion-panel]",c=0;r.create=function(){var t,a,s,u,A,g,h="none",b=e.querySelectorAll("[data-aria-accordion]");for(c+=1,g=0;g<b.length;g++){var f;if((t=b[g]).hasAttribute("id")||(t.id="acc_"+c+"-"+g),t.classList.add(i),e.querySelectorAll("#"+t.id+"> li").length?(a=e.querySelectorAll("#"+t.id+" li > "+d),s=e.querySelectorAll("#"+t.id+" li > "+o)):(a=e.querySelectorAll("#"+t.id+" > "+d),s=e.querySelectorAll("#"+t.id+" > "+o)),t.hasAttribute("data-default")&&(h=t.getAttribute("data-default")),A=t.hasAttribute("data-constant"),t.hasAttribute("data-multi"),t.hasAttribute("data-transition")){var y=t.querySelectorAll(d);for(f=0;f<y.length;f++)y[f].classList.add(n+"--transition")}for(r.setupPanels(t.id,a,h,A),r.setupHeadingButton(s,A),u=e.querySelectorAll("#"+t.id+"> li").length?e.querySelectorAll("#"+t.id+" li > "+o+" ."+l):e.querySelectorAll("#"+t.id+" > "+o+" ."+l),f=0;f<u.length;f++)u[f].addEventListener("click",r.actions),u[f].addEventListener("keydown",r.keytrolls)}},r.setupPanels=function(t,e,a,r){var i,l,o,d,c;for(i=0;i<e.length;i++)o=t+"_panel_"+(i+1),d=a,c=r,(l=e[i]).setAttribute("id",o),s(e[0],!0),l.classList.add(n),"none"!==d&&NaN!==parseInt(d)&&(d<=1?s(e[0],!1):d-1>=e.length?s(e[e.length-1],!1):s(e[d-1],!1)),(c&&"none"===d||NaN===parseInt(d))&&s(e[0],!1)},r.setupHeadingButton=function(t,a){var r,i,n,o,d,c;for(c=0;c<t.length;c++)i=(r=t[c]).nextElementSibling.id,n=e.getElementById(i).getAttribute("aria-hidden"),o=e.createElement("button"),d=r.textContent,r.innerHTML="",r.classList.add("accordion__heading"),o.setAttribute("type","button"),o.setAttribute("aria-controls",i),o.setAttribute("id",i+"_trigger"),o.classList.add(l),"false"===n?(u(o,!0),g(o,!0),a&&o.setAttribute("aria-disabled","true")):(u(o,!1),g(o,!1)),r.appendChild(o),o.appendChild(e.createTextNode(d))},r.actions=function(t){var a,i=this.id.replace(/_panel.*$/g,""),n=e.getElementById(this.getAttribute("aria-controls"));a=e.querySelectorAll("#"+i+"> li").length?e.querySelectorAll("#"+i+" li > "+o+" ."+l):e.querySelectorAll("#"+i+" > "+o+" ."+l),t.preventDefault(),r.togglePanel(t,i,n,a)},r.togglePanel=function(t,a,r,i){var l,n,o=t.target;if("true"!==o.getAttribute("aria-disabled")&&(l=o.getAttribute("aria-controls"),g(o,"true"),"true"===o.getAttribute("aria-expanded")?(u(o,"false"),s(r,"true")):(u(o,"true"),s(r,"false"),e.getElementById(a).hasAttribute("data-constant")&&A(
2634o,"true")),e.getElementById(a).hasAttribute("data-constant")||!e.getElementById(a).hasAttribute("data-multi")))for(n=0;n<i.length;n++)o!==i[n]&&(g(i[n],"false"),l=i[n].getAttribute("aria-controls"),A(i[n],"false"),u(i[n],"false"),s(e.getElementById(l),"true"))},r.keytrolls=function(t){if(t.target.classList.contains(l)){var a,r=t.keyCode||t.which,i=this.id.replace(/_panel.*$/g,"");switch(a=e.querySelectorAll("#"+i+"> li").length?e.querySelectorAll("#"+i+" li > "+o+" ."+l):e.querySelectorAll("#"+i+" > "+o+" ."+l),r){case 35:t.preventDefault(),a[a.length-1].focus();break;case 36:t.preventDefault(),a[0].focus()}}},r.init=function(){r.create()};var s=function(t,e){t.setAttribute("aria-hidden",e)},u=function(t,e){t.setAttribute("aria-expanded",e)},A=function(t,e){t.setAttribute("aria-disabled",e)},g=function(t,e){t.setAttribute("data-current",e)};r.init()}(window,document);
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.