1(()=>{"use strict";var e={857:e=>{var t=function(e){var t;return!!e&&"object"==typeof e&&"[object RegExp]"!==(t=Object.prototype.toString.call(e))&&"[object Date]"!==t&&e.$$typeof!==n},n="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(e,t){return!1!==t.clone&&t.isMergeableObject(e)?r(Array.isArray(e)?[]:{},e,t):e}function a(e,t,n){return e.concat(t).map(function(e){return i(e,n)})}function o(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function s(e,t){try{return t in e}catch(e){return!1}}function r(e,n,l){(l=l||{}).arrayMerge=l.arrayMerge||a,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=i;var c,d,u=Array.isArray(n);return u!==Array.isArray(e)?i(n,l):u?l.arrayMerge(e,n,l):(d={},(c=l).isMergeableObject(e)&&o(e).forEach(function(t){d[t]=i(e[t],c)}),o(n).forEach(function(t){(!s(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(s(e,t)&&c.isMergeableObject(n[t])?d[t]=(function(e,t){if(!t.customMerge)return r;var n=t.customMerge(e);return"function"==typeof n?n:r})(t,c)(e[t],n[t],c):d[t]=i(n[t],c))}),d)}r.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,n){return r(e,n,t)},{})},e.exports=r}},t={};function n(i){var a=t[i];if(void 0!==a)return a.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,n),o.exports}(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t}})(),(()=>{n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{var e=n(857),t=n.n(e);class i{static ucFirst(e){return e.charAt(0).toUpperCase()+e.slice(1)}static lcFirst(e){return e.charAt(0).toLowerCase()+e.slice(1)}static toDashCase(e){return e.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(e,t){let n=i.toUpperCamelCase(e,t);return i.lcFirst(n)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>i.ucFirst(e.toLowerCase())).join(""):i.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}class a{static isNode(e){return"object"==typeof e&&null!==e&&(e===document||e===window||e instanceof Node)}static hasAttribute(e,t){if(!a.isNode(e))throw Error("The element must be a valid HTML Node!");return"function"==typeof e.hasAttribute&&e.hasAttribute(t)}static getAttribute(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(n&&!1===a.hasAttribute(e,t))throw Error('The required property "'.concat(t,'" does not exist!'));if("function"!=typeof e.getAttribute){if(n)throw Error("This node doesn't support the getAttribute function!");return}return e.getAttribute(t)}static getDataAttribute(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],o=t.replace(/^data(|-)/,""),s=i.toLowerCamelCase(o,"-");if(!a.isNode(e)){if(n)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===e.dataset){if(n)throw Error("This node doesn't support the dataset attribute!");return}let r=e.dataset[s];if(void 0===r){if(n)throw Error('The required data attribute "'.concat(t,'" does not exist on ').concat(e,"!"));return r}return i.parsePrimitive(r)}static querySelector(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(n&&!a.isNode(e))throw Error("The parent node is not a valid HTML Node!");let i=e.querySelector(t)||!1;if(n&&!1===i)throw Error('The required element "'.concat(t,'" does not exist in parent node!'));return i}static querySelectorAll(e,t){let n=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(n&&!a.isNode(e))throw Error("The parent node is not a valid HTML Node!");let i=e.querySelectorAll(t);if(0===i.length&&(i=!1),n&&!1===i)throw Error('At least one item of "'.concat(t,'" must exist in parent node!'));return i}static getFocusableElements(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return e.querySelectorAll('\n input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]),\n select:not([tabindex^="-"]):not([disabled]),\n textarea:not([tabindex^="-"]):not([disabled]),\n button:not([tabindex^="-"]):not([disabled]),\n a[href]:not([tabindex^="-"]):not([disabled]),\n [tabindex]:not
1([tabindex^="-"]):not([disabled])\n ')}static getFirstFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(e)[0]}static getLastFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=this.getFocusableElements(e);return t[t.length-1]}}class o{publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new CustomEvent(e,{detail:t,cancelable:n});return this.el.dispatchEvent(i),i}subscribe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this,a=e.split("."),o=n.scope?t.bind(n.scope):t;if(n.once&&!0===n.once){let t=o;o=function(n){i.unsubscribe(e),t(n)}}return this.el.addEventListener(a[0],o),this.listeners.push({splitEventName:a,opts:n,cb:o}),!0}unsubscribe(e){let t=e.split(".");return this.listeners=this.listeners.reduce((e,n)=>([...n.splitEventName].sort().toString()===t.sort().toString()?this.el.removeEventListener(n.splitEventName[0],n.cb):e.push(n),e),[]),!0}reset(){return this.listeners.forEach(e=>{this.el.removeEventListener(e.splitEventName[0],e.cb)}),this.listeners=[],!0}get el(){return this._el}set el(e){this._el=e}get listeners(){return this._listeners}set listeners(e){this._listeners=e}constructor(e=document){this._el=e,e.$emitter=this,this._listeners=[]}}class s{init(){throw Error('The "init" method for the plugin "'.concat(this._pluginName,'" is not defined.'))}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(e){let n=i.toDashCase(this._pluginName),o=a.getDataAttribute(this.el,"data-".concat(n,"-config"),!1),s=a.getAttribute(this.el,"data-".concat(n,"-options"),!1),r=[this.constructor.options,this.options,e];o&&r.push(window.PluginConfigManager.get(this._pluginName,o));try{s&&r.push(JSON.parse(s))}catch(e){throw console.error(this.el),Error('The data attribute "data-'.concat(n,'-options" could not be parsed to json: ').concat(e.message))}return t().all(r.filter(e=>e instanceof Object&&!(e instanceof Array)).map(e=>e||{}))}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(e){return e||(e=this.constructor.name),e}constructor(e,t={},n=!1){if(!a.isNode(e))throw Error("There is no valid element given.");this.el=e,this.$emitter=new o(this.el),this._pluginName=this._getPluginName(n),this.options=this._mergeOptions(t),this._initialized=!1,this._registerInstance(),this._init()}}function r(e,t,n){let i=n?"; expires="+new Date(Date.now()+864e5*n).toUTCString():"";document.cookie=e+"="+encodeURIComponent(t)+i+"; path=/"}function l(e){return document.cookie.split("; ").reduce((t,n)=>{let i=n.split("=");return i[0]===e?decodeURIComponent(i[1]):t},"")}function c(e){let t=document.createElement("div");t.id="overlay-cartTimerNotice";let n=document.createElement("div");n.id="modal-cartTimerNotice";let i=window.router["frontend.checkout.cart.page"],a=window.router["frontend.ms.checkout.confirm.page"];window.router["frontend.home.page"];let o="\n <h2>"+window.ms_translations["cart_modal.cartTimerTitle"]+'</h2>\n <a class="ms-btn-secondary" tabindex="0" href="" aria-label="closeBox" id="closeTimeoutModal">\n <svg width="12" height="12" viewBox="0 0 12 12" fill="none"\n xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M6.7946 6.001L11.8571 0.9385L11.0616 0.143005L5.99911 5.20551L0.936608 0.143005L0.141113 0.9385L5.20361 6.001L0.141113 11.0635L0.936608 11.859L5.99911 6.7965L11.0616 11.859L11.8571 11.0635L6.7946 6.001Z"\n fill="black"/>\n </svg>\n </a>\n <p style="margin-bottom:10px !important;">'+window.ms_translations["cart_modal.cartTimerNotice"]+'</p>\n <div style="display:flex; flex-direction: column;">\n <!-- <a class="btn ms-btn-primary" tabindex="0" href="'.concat(i,'" id="goToCart">')+window.ms_translations["cart_modal.toCart"]+'</a> -->\n <a role="button" class="btn ms-btn-primary ms-red-button-background" tabindex="0" href="'.concat(a,'" id="goToCheckout">')+window.ms_translations["cart_modal.instantToCheckout"]+'</a>\n <a role="button" class="btn ms-btn-primary " tabindex="0" href="" id="closeModal" aria-label="Close">
1'+window.ms_translations["cart_modal.seeMore"]+"</a>\n </div>\n \n ";n.innerHTML=o,n.querySelector("#closeModal").addEventListener("click",e=>{e.preventDefault();let t=document.getElementById("overlay-cartTimerNotice");t&&t.remove()}),n.querySelector("#closeTimeoutModal").addEventListener("click",e=>{e.preventDefault();let t=document.getElementById("overlay-cartTimerNotice");t&&t.remove()}),t.appendChild(n),t.querySelectorAll(".btn").forEach(e=>{}),document.body.appendChild(t),document.getElementById("goToCheckout").focus()}let d=/^(\d{4}-\d{2}-\d{2})/,u=/[+-]\d{2}:?\d{2}$/;function m(e){if("string"==typeof e){let t=d.exec(e);if(t&&(10===e.length||u.test(e)))return t[1]}let t=new Intl.DateTimeFormat("en-GB",{timeZone:"Europe/Vienna",year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(e instanceof Date?e:new Date(e)).reduce((e,t)=>(e[t.type]=t.value,e),{});return"".concat(t.year,"-").concat(t.month,"-").concat(t.day)}class h{show(e){let t=new Date(this.clickedDate.date);null===this.container&&(this.container=document.getElementById("slot-select")),this.container.innerHTML=this.generateHTML(t,e);let n=this.container.querySelector("#ms-slot-header"),i={weekday:"short",year:"numeric",month:"2-digit",day:"2-digit",timeZone:"Europe/Vienna"};return"booking"===this.type?n.innerHTML=window.ms_translations["buy_widget.dateSelectedBooking"]+" "+t.toLocaleDateString(window.locale,i):n.innerHTML=window.ms_translations["buy_widget.dateSelected"]+" "+t.toLocaleDateString(window.locale,i),this.bindToggleDescriptions(this.container),this.container.style.display="block",this.container.scrollIntoView({block:"start",behavior:"smooth"}),this.container.innerHTML}generateLanguageImage(e,t){if("1"===t.hideLanguage||"true"===t.hideLanguage||!0===t.hideLanguage)return"";let n={de:"Flag_of_Germany.png",en:"Flag_of_the_United_Kingdom.png",fr:"fr.png",it:"Flag_of_Italy.svg",es:"es.png",cs:"Flag_of_the_Czech_Republic.svg",hu:"hu.png",sk:"sk.png",si:"Flag_of_Slovenia.svg"}[e.language];return n?'<img width="25" height="25" style="border-radius: 50%;" src="/images/flags/'.concat(n,'" title="').concat(window.ms_translations["buy_widget.flag".concat(e.language)],'" alt="').concat(window.ms_translations["buy_widget.flag".concat(e.language)],'">'):""}formatTime(e){let t=new Date(e),n={hour:"2-digit",minute:"2-digit",timeZone:"Europe/Vienna"};return"de-DE"===window.locale?(n.hour12=!1,t.toLocaleTimeString(window.locale,n)+""):(n.hour12=!0,t.toLocaleTimeString(window.locale,n).replace(" "," "))}toggleDescription(e){let t=e.currentTarget.closest(".ms-slot-single"),n=t.querySelector(".ms-slot-single>.ms-extended-description"),i=t.querySelector(".ms-slot-single-inner>.ms-extended-description"),a=t.querySelector(".ms-dropdown-icon");a&&a.classList.toggle("ms-rotate"),n&&(n.style.display="none"===n.style.display?"block":"none"),i&&(i.style.display="none"===i.style.display?"block":"none")}bindToggleDescriptions(e){e.querySelectorAll(".ms-extended-title").forEach(e=>{e.addEventListener("click",this.toggleDescription),e.addEventListener("keydown",e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),this.toggleDescription(e))})})}getExtendedWebTarifListing(e,t){let n="",i="";if((null==t?void 0:t.webtariflisting)==="extended"&&(null==t?void 0:t.text)&&void 0!==t.text[e.vk_inquiry_id]){let a=t.text[e.vk_inquiry_id],o="en-GB"===window.locale?a.title_en:a.fancy_titel,s=("en-GB"===window.locale?a.teaser_en:a.teaser)||"",r="en-GB"===window.locale&&a.lecturer_en||a.lecturer_de||"",l=s.length>0||r.length>0,c="";if(l&&(c='\n <div class="ms-info-icon">\n <svg role="presentation" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-down ms-dropdown-icon" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708"/>\n </svg>\n </div>\n '),n='<i tabindex="0" role="button" class="ms-extended-title">'.concat(o,"\n ").concat(c,"\n </i>"),l){let e=r.length>0?'<div class="ms-extended-lecturer">'.concat(r,"</div>"):"";i='<div style="display:none;" class="ms-extended-description">'.concat(s).concat(e,"</div>")}}return{webtariflisting:n,webtariflistingDescription:i}}generateHTML(e,t){let n='<div class="ms-slot-select"><h3 class="ms-slot-header" id="ms-slot-header"></h3><div class="ms-slot-select-inner" id="slot-list">';
1return this.slots.forEach((e,i)=>{let a=this.formatTime(e.start),o=this.formatTime(e.end),s=this.generateLanguageImage(e,t),r=m(this.clickedDate.date),l='<div style="min-width: 250px;"> </div>';"en-GB"===window.locale&&(l='<div style="min-width: 165px;"> </div>'),0!==e.open_slots&&(l='\n <a class="btn ms-btn-primary">\n <div class="btn btn-normal btn-normal-right">\n <p style="color:white;">'.concat(window.ms_translations["buy_widget.selectSlotButton"],'</p>\n <svg class="arrow-right-long" viewBox="0 0 40 40" aria-hidden="true">\n <title>Pfeil</title>\n <circle class="fill-current" r="20" cy="20" cx="20"></circle>\n <path class="arrow-head-long" fill="#000" d="M22.615 14.293a1 1 0 00-1.414 1.414l4.225 4.326-4.225 4.26a1 1 0 001.414 1.414l5-5a1 1 0 000-1.414l-5-5z" clip-rule="evenodd" fill-rule="evenodd"></path>\n <path class="arrow-line-long" fill="#000" d="M24.46 18.981H11.964a1 1 0 100 2H24.46c1.397-.018 1.384-1.984 0-2z" clip-rule="evenodd" fill-rule="evenodd"></path>\n </svg>\n </div>\n </a>\n '));let{webtariflisting:c,webtariflistingDescription:d}=this.getExtendedWebTarifListing(e,t);n+='\n <div class="ms-slot-single" data-key="'.concat(i,'" data-slotstart="').concat(a,'" data-slotend="').concat(o,'" data-slotlang="').concat(e.language,'" data-slotid="').concat(e.id,'" data-date="').concat(r,'">\n <div class="ms-slot-single-inner ').concat((null==t?void 0:t.text)&&void 0!==t.text[e.vk_inquiry_id]?"additionalInfo":"",'">\n <div class="ms-slot-single-time ').concat("1"===t.showFromToTime||!0===t.showFromToTime?"large-datum":"",'">\n <div class="subdatum "><span class="uhrzeit fw-bold">').concat(a,"\n ").concat("1"===t.showFromToTime||!0===t.showFromToTime?" - "+o:""," \n ").concat("de-DE"===window.locale||"de"===window.locale?"Uhr":"","\n </span></div>\n ").concat(s,"\n ").concat(c,"\n \n </div>\n ").concat(d,'\n \n \n <div class="ms-slot-single-slots">\n ').concat(e.open_slots<=150?"".concat(window.ms_translations["buy_widget.freeSlots"]," ").concat(e.open_slots):window.ms_translations["buy_widget.enoughSlotsFree"],'\n </div>\n <div role="button" class="ms-slot-single-action" data-available-slots="').concat(e.open_slots,'" tabindex="0" aria-label="').concat(window.ms_translations["buy_widget.selectSlotButton"],'">\n ').concat(l,"\n </div>\n \n </div>\n \n \n ").concat(d,"\n \n </div>\n ")}),n+="</div></div>"}constructor(e,t,n=null){this.slots=e.slots,this.clickedDate=e,this.type=t,this.container=n}}function p(){return{narrenturm:{id:"2c89a859-ae05-7507-6dcb-6390735b7806",standort:"1732150597762"},nhm:{id:"50862f97-9c6a-fe8d-6007-6220c1439556",standort:"1732150597761"}}}function g(e){let t=document.createElement("div");t.id="overlay-addtoCart";let n=document.createElement("div");n.id="modal-addtoCart";let i=document.querySelector("[data-productfiltertype]"),a="";if(i){if(void 0!==i.dataset.personaliceconfig&&""!==i.dataset.personaliceconfig){let e=document.querySelector(".heromodulesub-title h1").textContent.trim(),t=window.ms_translations["cart_modal.buyTicketAgain"];t=t.replace("##",e),a='<a role="button" class="btn ms-btn-primary ms-red-button-background" tabindex="0" href="" aria-label="'.concat(t,'" id="goToSameTicket">')+t+"</a>"}i=i.dataset.productfiltertype}let o="",s="",r="",l="";window.activeSlotDate&&(l="?date="+window.activeSlotDate);let c=!1;if("01978265fabf7a1eb1fd7d90e546f626"===window.salesChannelId&&(c=!0),("Eintrittstickets"===i||"entrance tickets"===i)&&""==a&&
1!1==c){let t="";window.activeSlotDate&&(t="?datum_von="+window.activeSlotDate+"&dateMode=day&data=prev"),t=function(e){let t=p(),n="",i=window.mainLocation.split(","),a=i.length>1&&i.includes(t.narrenturm.id)&&i.includes(t.nhm.id)?"".concat(t.nhm.standort,"%2C").concat(t.narrenturm.standort):window.mainLocation===t.narrenturm.id?t.narrenturm.standort:t.nhm.standort,o=e.length>0?"&":"?";return window.mainLocation===t.narrenturm.id&&(n+="&dateMode=month&data=current"),e+"".concat(o,"standort_id=").concat(a)+n}(t),o="de"===e?"https://www.nhm.at/veranstaltungskalender":"https://www.nhm.at/en/monthly_program",s='<a role="button" class="btn ms-btn-primary ms-red-button-background" tabindex="0" href="'.concat(o+t,'" aria-label="').concat(window.ms_translations["cart_modal.hompageWithGuidedTourFilter"],'" id="goToDynamicUrl">')+window.ms_translations["cart_modal.hompageWithGuidedTourFilter"]+"</a>"}else if("Führungs- & Showtickets"===i||"tour and show tickets"===i){let e="?date="+window.activeSlotDate;o=window.router["frontend.detail.page.nhm.ticket"]+e,"2c89a859-ae05-7507-6dcb-6390735b7806"===window.mainLocation&&(o=window.router["frontend.detail.page.narrenturm.ticket"]+e),r='<p class="" style="margin-top: 10px !important;">'+window.ms_translations["cart_modal.needEntranceTicketText"]+"</p>",s='<a role="button" class="btn ms-btn-primary ms-red-button-background" tabindex="0" href="'.concat(o,'" aria-label="').concat(window.ms_translations["cart_modal.entryTicket"],'" id="goToDynamicUrl">')+window.ms_translations["cart_modal.entryTicket"]+"</a>","1"===window.popupnoticketlink&&(s="",r="")}
1else("Gutscheine"===i||"vouchers"===i)&&(a='<a role="button" class="btn ms-btn-primary ms-red-button-background" tabindex="0" href="" aria-label="'.concat(window.ms_translations["cart_modal.buyVoucherAgain"],'" id="goToSameTicket">')+window.ms_translations["cart_modal.buyVoucherAgain"]+"</a>");let d=window.router["frontend.checkout.cart.page"],u=window.router["frontend.ms.checkout.confirm.page"],m=window.router["frontend.home.page"];(function(e){let t=p();if(!window.msCart)return[];"ticket"===e?e="booking":"booking"===e&&(e="ticket");let n=window.msCart||{};return n&&Array.isArray(n)?n.filter(n=>{var i,a;let o=((i=n.payload.slot_data)===null||void 0===i?void 0:i.ticket_type)||!1,s=((a=n.payload.slot_data)===null||void 0===a?void 0:a.date)||!1,r=Object.values(n.payload.slot_data||{});if("object"==typeof n.payload.slot_data&&null!==n.payload.slot_data&&r.length>0&&r[0]&&void 0!==r[0].ticket_type&&(o=r[0].ticket_type,s=r[0].date),(!n||!n.payload||!n.payload.slot_data||o!==e)&&t.nhm.id===window.mainLocation)return!1;let l=!1;console.log(n.payload.propertiesLocation),n.payload.propertiesLocation&&(l=Object.values(n.payload.propertiesLocation).some(t=>t&&t.customFields&&window.mainLocation.includes(t.customFields["crm-id"])&&n.payload.crm_type===e));let c=!window.activeSlotDate||window.activeSlotDate===s;return t.narrenturm.id===window.mainLocation&&(c=!0),c&&l}):[]})(document.querySelector("[data-type]").dataset.type).length>0&&(r="",s="");let h="\n <h2>"+window.ms_translations["cart_modal.addedToCart"]+'</h2>\n <a role="button" class="ms-btn-secondary " tabindex="0" href="'.concat(l).concat("",'" aria-label="closeBox" id="closeSuccessModal">\n <svg width="12" height="12" viewBox="0 0 12 12" fill="none" role="presentation"\n xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M6.7946 6.001L11.8571 0.9385L11.0616 0.143005L5.99911 5.20551L0.936608 0.143005L0.141113 0.9385L5.20361 6.001L0.141113 11.0635L0.936608 11.859L5.99911 6.7965L11.0616 11.859L11.8571 11.0635L6.7946 6.001Z"\n fill="black"/>\n </svg>\n </a>\n ').concat(r,'\n <div style="display:flex; flex-direction: column;">\n <!-- <a class="btn ms-btn-primary" tabindex="0" href="').concat(d,'" aria-label="').concat(window.ms_translations["cart_modal.toCart"],'" id="goToCart">')+window.ms_translations["cart_modal.toCart"]+'</a> -->\n <a role="button" class="btn ms-btn-primary " tabindex="0" href="'.concat(u,'" aria-label="').concat(window.ms_translations["cart_modal.instantToCheckout"],'" id="goToCheckout">')+window.ms_translations["cart_modal.instantToCheckout"]+"</a>\n ".concat(s,"\n ").concat(a,'\n <a role="button" class="btn ms-btn-primary " tabindex="0" href="').concat(m,'" id="continueShopping" aria-label="').concat(window.ms_translations["cart_modal.seeMore"],'">')+window.ms_translations["cart_modal.seeMore"]+"</a>\n </div>\n \n ";n.innerHTML=h,t.appendChild(n),document.body.appendChild(t),document.getElementById("goToCheckout").focus(),fetch(window.router["frontend.checkout.info"],{method:"GET",headers:{"sw-access-key":window.SHOPWAREKEY}}).then(e=>e.text()).then(e=>{document.querySelector("[data-cart-widget]").innerHTML=e})}function y(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=document.querySelector(".error-message"),i="";n||((n=document.createElement("div")).classList.add("error-message"),n.classList.add("alert")),n.textContent=e,n.classList.add("error-message"),n.style.color="red",n.style.fontWeight="bold",n.style.display="block",t?i=document.querySelector(".ms-replacement-container"):(i=document.querySelector(".ms-rates-header").parentElement)&&i.classList.contains("ms-rates-inline")&&"none"===window.getComputedStyle(i).display&&(i=Array.from(document.querySelectorAll(".ms-rates-inline")).find(e=>"block"===window.getComputedStyle(e).display)),i.prepend(n),n.scrollIntoView({behavior:"smooth",block:"center"})}class w{toggleDiscountPanel(e){let t=e.nextElementSibling;t?"none"===t.style.display?t.style.display="block":t.style.display="none":console.error("No next sibling found for the element")}checkifMaxOrderReached(){let e=!1;for(let t in window.quantities)if(window.quantities[t].quantity>=this.ratesData.max_total_order_count&&0!==this.ratesData.max_total_order_count){e=!0;let n=document.querySelector(".ms-rates-single-multi").parentElement;if(n&&n.classList.contains("ms-rates-inline")&&"none"===window.getComputedStyle(n).display&&(n=Array.from(document.querySelectorAll(".ms-rates-inline")).find(e=>"block"===window.getComputedStyle(e).display)),n.querySelector(".ms-rates-single-multi").querySelector(".ms-rates-groupinfo"));else{let e="de"===this.localeShort?this.ratesData.group_special_rate_de:this.ratesData.group_special_rate_en,t=document.createElement("div");t.innerHTML='<div class="ms-rates-single ms-rates-groupinfo splash-animation redSplash" >\n <div class="ms-rates-single-text">\n <div class="text-black">\n '.concat(e,"\n </div>\n </div>\n </div>"),0===this.personaliceconfig.length&&(n.querySelector(".ms-rates-single-multi").appendChild(t.firstChild),n.querySelector(".ms-rates-groupinfo").scrollIntoView({block:"center",behavior:"smooth"}))}
1document.querySelectorAll(".quantity-input-field").forEach(e=>{e.closest(".ms-rates-single").dataset.ratesid===t&&(e.disabled=!0)})}else document.querySelectorAll(".quantity-input-field").forEach(e=>{e.closest(".ms-rates-single").dataset.ratesid===t&&e.removeAttribute("disabled")});return e||document.querySelectorAll(".ms-rates-inline").forEach(e=>{let t=e.querySelector(".ms-rates-groupinfo.splash-animation");t&&t.remove()}),!1}getNameById(e,t,n){let i=e.find(e=>e.id===t);return i?"de"===n?i.name_de:i.name_en:""}createLineItemHTML(e,t){let n="";t.has_quotas_per_rate&&(n='\n <div class="ms-rates-single-free-places">\n '.concat(window.ms_translations["buy_widget.freeSlots"],": ").concat(e.open_slots,"\n </div>\n "));let i="de"===this.localeShort?e.name_de:e.name_en,a="de"===this.localeShort?e.shop_hover_information_de:e.shop_hover_information_en,o=t.has_quotas_per_rate?"space-between":"space-end";return'\n <div class="ms-rates-single" data-group-price="'.concat(e.minimum_price,'" data-group-max-size="').concat(e.minimum_price_person_count,'" data-ratesid="').concat(e.id,'" data-priceperitem="').concat(parseFloat(e.price).toFixed(2),'">\n <div class="ms-rates-single-text">\n ').concat(i," (").concat(parseFloat(e.price).toFixed(2).replace(".",",")," â¬) ").concat(a?' <i tabindex="0" class="ms-info-icon" data-ms-toggle="tooltip" data-bs-placement="left" title="'.concat(a,'"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-info-circle" viewBox="0 0 16 16"><path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"/><path d="m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0"/></svg></i>'):"",'\n \n <div class="text-black">\n <div class="ms-discounts"></div>\n <div class="ms-discounts-text"></div>\n </div>\n </div>\n <div class="ms-rates-single-price ').concat(o,'">\n ').concat(n,'\n <span class="ms-rates-full-price" style="display:none;">\n ').concat(parseFloat(e.price).toFixed(2).replace(".",","),' â¬\n </span>\n <div class="">\n <button data-id="decrease-quantity" id="decrease-quantity')+e.id+'" title="'+window.ms_translations["buy_widget.quantityDown"]+'" aria-label="'+window.ms_translations["buy_widget.quantityDown"]+'" class="ms-btn quantity-changer-button">\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="215.101 168.177 8.308 1.694" width="8.308px" height="2px">\n <rect x="215.101" y="168.177" width="8.308" height="1.694" style="fill: rgb(255, 255, 255); stroke: rgb(255, 255, 255);"/>\n </svg>\n </button>\n <input type="number" id="quantity-value'+e.id+'" data-id="quantity-value" title="'+window.ms_translations["buy_widget.quantityEnter"]+'" aria-label="'+window.ms_translations["buy_widget.quantityEnter"]+'" value="0" min="0" maxlength="3" data-vv-as=""Menge"" class="quantity-input-field" aria-required="true" aria-invalid="false">\n <button id="increase-quantity'+e.id+'" data-id="increase-quantity" title="'+window.ms_translations["buy_widget.quantityUp"]+'" aria-label="'+window.ms_translations["buy_widget.quantityUp"]+'" class="ms-btn quantity-changer-button">\n <svg width="12" height="12" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M7.5625 6.4375V0.25H6.4375V6.4375H0.25V7.5625H6.4375V13.75H7.5625V7.5625H13.75V6.4375H7.5625Z" fill="white" stroke="white"/>\n </svg>\n \n </button>\n </div>\n </div>\n </div>\n '}recaltulatePrice(e){let t=0;for(let n in window.quantities){let i=window.quantities[n].quantity,a=window.quantities[n].discount||[],o=this.ratesData.rates.find(e=>e.id===n),s=parseFloat(o.price),r=0;if("1"===o.flat_rate)i>0&&(r=a.length>0?a[0].price:s);else if(0==o.minimum_price&&0==o.minimum_price_person_count)for(let e=0;e<i;e++)a[e]?r+=a[e].price:r+=s;else if(i>0){r=o.minimum_price;let e=i-o.minimum_price_person_count;for(let t=0;t<e;t++)a[t]?r+=a[t].price:r+=s}let l=e.querySelector('[data-ratesid="'.concat(n,'"] .ms-rates-full-price'));i>0?(l.style.display="block",l.innerHTML=r.toFixed(2).replace(".",",")+" â¬"):l.style.display="none",t+=r}return e.querySelector(".ms-rates-price-price span").textContent=t.toFixed(2).replace(".",","),t}bindQuantityButtons(e){e.querySelectorAll(".quantity-changer-button").forEach(t=>{t.addEventListener("click",t=>{let n=t.currentTarget.parentElement.querySelector(".quantity-input-field");parseFloat(t.currentTarget.parentElement.previousElementSibling.textContent);let i=t.currentTarget.closest(".ms-rates-single").dataset.ratesid,a=t.currentTarget.closest(".ms-rates-single").dataset.groupMaxSize||0;if("increase-quantity"===t.currentTarget.dataset.id){let e=0;for(let t in window.quantities)e=window.quantities[t].quantity;if(n.value<a&&a>0&&(n.value=a-1),void 0!==this.ratesData.open_slots){if(e<this.ratesData.open_slots){if(this.checkifMaxOrderReached())return;n.disabled||(n.value=parseInt(n.value)+1)}}else{if(this.checkifMaxOrderReached())return;n.disabled||(n.value=parseInt(n.value)+1)}}else if("decrease-quantity"===t.currentTarget.dataset.id){let e=parseInt(a,10)||0;(parseInt(n.value,10)||0)>e?(n.value=parseInt(n.value)-1,window.quantities[i].discount&&window.quantities[i].discount.length>n.value&&(window.quantities[i].discount.length=n.value)):n.value=0}if("combi"===document.querySelector(".ms-product-info-container").dataset.tickettype){let e=document.querySelector(".ms-replacement-container").querySelector(".error-message.alert");e&&e.remove()}
1else document.querySelectorAll(".ms-rates-inline").forEach(e=>{let t=e.querySelector(".error-message.alert");t&&t.remove()});window.quantities[i]||(window.quantities[i]={}),window.quantities[i].quantity=parseInt(n.value),this.checkifMaxOrderReached(),this.recaltulatePrice(e)})}),e.querySelectorAll(".quantity-input-field").forEach(t=>{t.addEventListener("input",t=>{let n=t.target.closest(".ms-rates-single").dataset.ratesid,i=parseInt(t.target.closest(".ms-rates-single").dataset.groupMaxSize||0)||0;i>0&&parseInt(t.target.value)<=i&&(t.target.value=i);let a=parseInt(t.target.value)||0;if(a=Math.max(0,a),0!==this.ratesData.max_total_order_count&&0+a>this.ratesData.max_total_order_count){let e=Math.max(0,this.ratesData.max_total_order_count-0);a=e,t.target.value=e}if(0!==a){if("combi"===document.querySelector(".ms-product-info-container").dataset.tickettype){let e=document.querySelector(".ms-replacement-container").querySelector(".error-message.alert");e&&e.remove()}else document.querySelectorAll(".ms-rates-inline").forEach(e=>{let t=e.querySelector(".error-message.alert");t&&t.remove()})}window.quantities[n]||(window.quantities[n]={}),window.quantities[n].quantity=a,this.checkifMaxOrderReached(),this.recaltulatePrice(e)})})}renderFormFields(e){let t=document.createElement("div");if(t)return t.classList.add("ms-shop-forms"),t.classList.add("form-check"),e.forEach(e=>{let n=document.createElement("div");n.className="ms-shop-form-row black-white";let i=document.createElement("div");i.className="ms-input-group-column";let a=document.createElement("div");a.className="ms-shop-form-floating-input";let o=document.createElement("input");o.type="email"===e.validation?"email":"text",o.name=e.field_name,o.id=e.field_name,o.classList.add("form-control"),o.placeholder=" ",e.required&&(o.required=!0);let s=document.createElement("label");s.htmlFor=e.field_name,s.className="ms-label";let r="de-DE"===window.locale?e.name_de:e.name_en;s.innerHTML="".concat(r).concat(e.required?' <span style="color:red;">*</span>':""),a.append(o,s),i.append(a),n.append(i),t.append(n)}),t}getClassNameContainer(){return"ms-rates-inline"}getRatesEndpoint(e){return"".concat(this.shopware_url,"/store-api/rates?crm_id=").concat(this.crm_id,"&type=").concat(this.type)+"&date=".concat(this.slotData.date,"&slot_id=").concat(this.slotData.slotid)+e}async generateHTML(){let e="";document.querySelector("a[data-ms-b2b-crm-account-id]")&&(e="&b2b_account_id="+document.querySelector("a[data-ms-b2b-crm-account-id]").dataset.msB2bCrmAccountId);let t='<div class="ms-rates-header"></div>',n=document.referrer,i="/";if(n){let e=new URL(n);i=e.search?"/"+e.search:"javascript:history.back();"}let a=await fetch(this.getRatesEndpoint(e),this.options),o=await a.json();this.ratesData=o.data,t+='\n <div class="ms-rates-single-multi-header">\n <div>'.concat(window.ms_translations["buy_widget.quantityAndType"],"</div> \n <!-- ").concat(this.ratesData.open_slots?"<div>".concat(this.ratesData.open_slots," ").concat(window.ms_translations["buy_widget.freeSlots"],"</div>"):"",'-->\n </div>\n\n <div class="ms-rates-single-multi">
1'),o.data.rates.forEach(e=>{t+=this.createLineItemHTML(e,this.ratesData)}),t+="</div>";let s="de"===this.localeShort?this.ratesData.shop_rate_info:this.ratesData.shop_rate_info_en;s&&(t+='<div class="ms-rates-info">'.concat(s,"</div>")),t+='\n\n <div class="ms-rates-price-wrapper">\n <div class="ms-rates-price-inner">\n <h2 class="ms-rates-price-price"><span>0,00</span> â¬</h2>\n <span>'+window.ms_translations["buy_widget.inclTax"]+'</span>\n </div>\n </div>\n\n <div class="ms-rates-footer">\n <div class="ms-rates-footer-inner">\n <a class="btn ms-btn-primary" id="backButton" tabindex="0" aria-label="'+window.ms_translations["buy_widget.backButton"]+'" title="'+window.ms_translations["buy_widget.backButton"]+'" href="'+i+'">\n <!--TYPO3SEARCH_begin-->\n <div class="btn btn-normal btn-normal-left">\n <!--TYPO3SEARCH_end-->\n <p>'+window.ms_translations["buy_widget.backButton"]+'</p>\n <svg class="arrow-left-long" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" aria-hidden="true">\n <title>Pfeil</title>\n <!--TYPO3SEARCH_begin-->\n <circle class="fill-current" r="20" cy="20" cx="20"></circle>\n <path class="arrow-head-long" fill="#000" d="M22.615 14.293a1 1 0 00-1.414 1.414l4.225 4.326-4.225 4.26a1 1 0 001.414 1.414l5-5a1 1 0 000-1.414l-5-5z" clip-rule="evenodd" fill-rule="evenodd"></path>\n <path class="arrow-line-long" fill="#000" d="M24.46 18.981H11.964a1 1 0 100 2H24.46c1.397-.018 1.384-1.984 0-2z" clip-rule="evenodd" fill-rule="evenodd"></path>\n </svg>\n </div>\n <!--TYPO3SEARCH_end-->\n </a>\n <a class="btn ms-btn-primary" id="addToCart" tabindex="0" aria-label="'+window.ms_translations["buy_widget.addToCartButton"]+'" title="'+window.ms_translations["buy_widget.addToCartButton"]+'">\n <!--TYPO3SEARCH_begin-->\n <div class="btn btn-normal btn-normal-right">\n <!--TYPO3SEARCH_end-->\n <p>'+window.ms_translations["buy_widget.addToCartButton"]+'</p>\n <svg class="arrow-right-long" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" aria-hidden="true">\n <title>Pfeil</title>\n <!--TYPO3SEARCH_begin-->\n <circle class="fill-current" r="20" cy="20" cx="20"></circle>\n <path class="arrow-head-long" fill="#000" d="M22.615 14.293a1 1 0 00-1.414 1.414l4.225 4.326-4.225 4.26a1 1 0 001.414 1.414l5-5a1 1 0 000-1.414l-5-5z" clip-rule="evenodd" fill-rule="evenodd"></path>\n <path class="arrow-line-long" fill="#000" d="M24.46 18.981H11.964a1 1 0 100 2H24.46c1.397-.018 1.384-1.984 0-2z" clip-rule="evenodd" fill-rule="evenodd"></path>\n </svg>\n </div>\n <!--TYPO3SEARCH_end-->\n </a>\n </div>\n </div>';let r={type:"ms_custom_product",id:this.product_uid,crm_id:this.crm_id,slot_data:this.slotData,locale:window.locale,quantity:1,msCustomProduct:window.quantities},l=document.createElement("div");l.className=this.getClassNameContainer(),l.innerHTML=t,this.bindQuantityButtons(l),l.querySelector("#addToCart").addEventListener("click",async()=>{this.addCustomProductToCart(r,this.ratesData.has_quotas_per_rate)}),l.querySelector("#addToCart").addEventListener("keydown",async e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),this.addCustomProductToCart(r,this.ratesData.has_quotas_per_rate))}),l.querySelectorAll(".toggle-discount").forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),this.toggleDiscountPanel(e.target)})});let c=document.querySelector("#loading-overlay");if(c&&c.remove(),void 0!==this.personaliceconfig&&this.personaliceconfig.length>0){this.ratesData.max_total_order_count=1;let e=l.querySelectorAll(".ms-rates-single");if(this.personaliceconfig.length>0&&1===e.length){let t=e[0];l.querySelector(".ms-rates-single-multi-header").style.display="none",l.querySelector(".ms-rates-single").style.display="none";let n=t.dataset.ratesid;window.quantities[n]={quantity:1,discount:[]};let i=t.querySelector(".quantity-input-field");i.value="1",i.disabled=!0,t.querySelectorAll(".quantity-changer-button").forEach(e
1=>e.disabled=!0),this.recaltulatePrice(l)}let t=this.personaliceconfig;"string"==typeof t&&(t=JSON.parse(t));let n=this.renderFormFields(t);l.querySelector(".ms-rates-single-multi").append(n)}return l}makeTooltipClickableOnMobile(){let e=document.querySelectorAll('i[data-ms-toggle="tooltip"]'),t=this;e.forEach(e=>{e.addEventListener("keydown",function(n){("Enter"===n.key||" "===n.key)&&t.showToolTip(n,this,e)}),e.addEventListener("click",function(n){t.showToolTip(n,this,e)})})}showToolTip(e,t,n){e.preventDefault();let i=t.getAttribute("title"),a=document.querySelector(".custom-tooltip");a&&a.remove();let o=document.createElement("div");o.className="custom-tooltip",o.textContent=i,o.style.position="absolute",o.style.backgroundColor="black",o.style.color="white",o.style.padding="5px",o.style.borderRadius="5px",o.style.zIndex="1000";let s=t.getBoundingClientRect();o.style.top="".concat(s.bottom+window.scrollY+5,"px");let r=s.left+window.scrollX;document.body.append(o),r+o.offsetWidth>window.innerWidth?o.style.left="".concat(s.left/2,"px"):o.style.left="".concat(r-o.offsetWidth/2+s.width/2,"px"),document.addEventListener("click",function e(t){t.target===n||t.target===o||n.contains(t.target)||o.contains(t.target)||(o.remove(),document.removeEventListener("click",e))}),document.addEventListener("keydown",function e(t){"Escape"===t.key&&(o.remove(),document.removeEventListener("click",e),document.removeEventListener("keydown",e))})}validateAndAddCustomForm(e){if(this.personaliceconfig.length>0){let t="string"==typeof this.personaliceconfig?JSON.parse(this.personaliceconfig):this.personaliceconfig,n=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,i=!0,a=t.map(e=>{let t=document.querySelector('input[name="'.concat(e.field_name,'"]')),a=t.value.trim();return t.classList.remove("is-invalid"),e.required&&!a&&(i=!1,t.classList.add("is-invalid")),"email"===e.validation&&a&&!n.test(a)&&(i=!1,t.classList.add("is-invalid")),{...e,value:a}});if(!i)return y(window.ms_translations["buy_widget.errorRequiredField"]),!1;e.personalizedData=a}return e}addCustomProductToCart(e,t){if(!1===(e=this.validateAndAddCustomForm(e)))return;let n=window.router["frontend.custom-product.add"],i=document.querySelector("#addToCart");if(i.classList.contains("disabled"))return;i&&i.classList.add("disabled"),this.shopware_url=window.location.origin;let a=this.shopware_url+n;t&&(a=this.shopware_url+window.router["frontend.custom-product.add-quotas"]);let o=document.getElementById("caid");o&&e.personalizedData.push({field_name:"caid",value:o.value}),fetch(a,{method:"POST",headers:{"sw-access-key":window.SHOPWAREKEY},body:JSON.stringify(e)}).then(e=>e.json()).then(async e=>{if("error"===e.status){if("reload"==e.message){window.location.reload();return}i.classList.remove("disabled"),y(e.message);return}sessionStorage.removeItem(this.getStorageKey()),g(this.localeShort)})}constructor(e,t,n,i,a,o){this.getStorageKey=()=>{let e=document.querySelector("[data-productcrmid]");return"msActiveDate_"+btoa(escape((e?e.dataset.productcrmid:"null")||"null"))},this.slotData=e,this.type=t,this.shopware_url=n,this.crm_id=i,this.product_uid=a,this.personaliceconfig=o,this.ratesData={},this.options={method:"GET",headers:{"sw-access-key":window.SHOPWAREKEY},cache:"no-cache"},window.quantities={},this.localeShort="de","de-DE"!==window.locale&&(this.localeShort="en");let s=document.createElement("div");s.style.position="absolute",s.style.top=0,s.style.left=0,s.style.right=0,s.style.bottom=0,s.style.backgroundColor="rgba(0, 0, 0, 0.1)",s.style.display="flex",s.style.justifyContent="center",s.style.alignItems="center",s.innerHTML='<img width="150" src="/images/frontend/ms_loading.gif" alt="Loading...">',s.id="loading-overlay",document.querySelector(".ms-replacement-container")&&(document.querySelector(".ms-replacement-container").style.position="relative",document.querySelector(".ms-replacement-container").appendChild(s))}}class f extends h{formatDate(e){let t=new Date(e),n=String(t.getDate()).padStart(2,"0"),i=String(t.getMonth()+1).padStart(2,"0"),a=t.getFullYear();return"".concat(n,".").concat(i,".").concat(a)}generateHTML(e,t){let n='<div class="ms-slot-select special-dropdown"><div class="ms-slot-select-inner" id="slot-list">',i=!1;for(let a in e.data.dates){let o=e.data.dates[a];if(!1!==o.available||void 0===o.slots||0!==o.slots.length)for(let e in o.slots){let a=o.slots[e];if("object"!=typeof a)continue;this.formatDate(a.start);let s={weekday:"short",year:"numeric",month:"2-digit",day:"2-digit",timeZone:"Europe/Vienna"},r=new Date(a.start).toLocaleDateString(window.locale,s),l=this.formatTime(a.start),c=this.formatTime(a.end),d=this.generateLanguageImage(a,t),{webtariflisting:u,webtariflistingDescription:h}
1=this.getExtendedWebTarifListing(a,t),p=m(a.start),g='<div style="min-width: 250px;"> </div>';"en-GB"===window.locale&&(g='<div style="min-width: 165px;"> </div>'),i=!0,g=0!==a.open_slots?'\n <a class="btn ms-btn-primary" role="button" tabindex="0" aria-label="'.concat(window.ms_translations["buy_widget.selectSlotButton"],'" >\n <div class="btn btn-normal btn-normal-right">\n <p style="color:white;">').concat(window.ms_translations["buy_widget.selectSlotButton"],'</p>\n <svg class="arrow-right-long" viewBox="0 0 40 40" aria-hidden="true">\n <title>Pfeil</title>\n <circle class="fill-current" r="20" cy="20" cx="20"></circle>\n <path class="arrow-head-long" fill="#000" d="M22.615 14.293a1 1 0 00-1.414 1.414l4.225 4.326-4.225 4.26a1 1 0 001.414 1.414l5-5a1 1 0 000-1.414l-5-5z" clip-rule="evenodd" fill-rule="evenodd"></path>\n <path class="arrow-line-long" fill="#000" d="M24.46 18.981H11.964a1 1 0 100 2H24.46c1.397-.018 1.384-1.984 0-2z" clip-rule="evenodd" fill-rule="evenodd"></path>\n </svg>\n </div>\n </a>\n '):'\n <div class="btn ms-btn-primary event-card-booked" >\n <div class="btn btn-normal">\n <p style="color:white;">'.concat(window.ms_translations["event.booked"],"</p>\n </div>\n </div>"),n+='\n <div class="ms-slot-single" data-key="'.concat(e,'" data-slotstart="').concat(l,'" data-slotend="').concat(c,'" data-slotlang="').concat(a.language,'" data-slotid="').concat(a.id,'" data-date="').concat(p,'">\n <div class="ms-slot-single-inner ').concat(void 0!==t.text[a.vk_inquiry_id]?"additionalInfo":"",'">\n <div class="ms-slot-single-time">\n <div class="subdatum"><span class="uhrzeit fw-bold">').concat(r,' </span></div>\n <div class="long-time"><span class=" fw-bold">').concat(l,"</span> ").concat("1"===t.showFromToTime?' - <span class=" fw-bold"> '+c+"</span>":""," ").concat("de-DE"===window.locale||"de"===window.locale?"Uhr":""," </div>\n ").concat(d,"\n ").concat(u,"\n </div>\n ").concat(h,'\n <div class="ms-slot-single-slots">\n ').concat(a.open_slots<=150?"".concat(window.ms_translations["buy_widget.freeSlots"]," ").concat(a.open_slots):window.ms_translations["buy_widget.enoughSlotsFree"],'\n </div>\n <div role="button" class="ms-slot-single-action" data-available-slots="').concat(a.open_slots,'" tabindex="0" aria-label="').concat(window.ms_translations["buy_widget.selectSlotButton"],'">\n ').concat(g,"\n </div>\n </div>\n \n ").concat(h,"\n </div>\n ")}}return!1===i&&(n+='<div class="ms-no-slots-available">'.concat(window.ms_translations["buy_widget.noSlotsAvailable"],"</div>
1")),n+="</div></div>"}}class b{debounce(e,t){let n;return function(){for(var i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];clearTimeout(n),n=setTimeout(()=>{clearTimeout(n),e(...a)},t)}}async loadTimeTickets(){let e=new w({date:!1},this.type,this.shopware_url,this.product_crm_id,this.product_uid,this.personaliceconfig),t=await e.generateHTML(),n=this.root;n.innerHTML="",n.append(t),e.makeTooltipClickableOnMobile();let i=new URLSearchParams(window.location.search).get("caid");if("ticket"===this.type&&"year"===this.tickettype&&null!==i){let e={method:"GET",headers:{"sw-access-key":this.shopware_apikey}};fetch("".concat(this.shopware_url,"/store-api/validate-year-ticket-data/?caid=").concat(i),e).then(e=>e.json()).then(e=>{if(!1===e.data.error){for(let[t,n]of Object.entries({email:e.data.card.email_address,first_name:e.data.card.first_name,last_name:e.data.card.last_name})){let e=document.getElementById("".concat(t));e&&(e.value=n)}let t=document.createElement("input");t.type="hidden",t.name="caid",t.value=i,t.id="caid",document.querySelector(".ms-shop-forms").appendChild(t)}})}}start(){if(document.querySelector(".ms-description").style.display="block","calendar"===this.dateType){this.addMonth();let e=this.root.querySelector(".action-arrow-right"),t=this.root.querySelector(".action-arrow-left");e.addEventListener("click",()=>this.nextMonth()),t.addEventListener("click",()=>this.previousMonth()),e.addEventListener("keydown",e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),this.nextMonth())}),t.addEventListener("keydown",e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),this.previousMonth())}),this.load()}else"dropdown"===this.dateType?this.loadDropDownTickets():(this.msProductInfo={crm_id:this.product_crm_id,product_uid:this.product_uid,hideLanguage:this.hideLanguage,showFromToTime:this.showFromToTime,personaliceconfig:this.personaliceconfig,webtariflisting:this.webtariflisting},this.loadTimeTickets())}async loadDropDownTickets(){if(this.loading)return;this.loading=!0;let e=document.createElement("div");e.className="overlay",e.innerHTML='<div class="loader"><img width="75" alt="loading" title="loading" src="/images/frontend/ms_loading.gif"></div>';let t=this.root.querySelector(".ms-kalender-frame");t.appendChild(e);let n="".concat(this.currentYear,"-").concat(this.currentMonth.toString().padStart(2,"0"),"-01"),i=new Date(this.currentYear,this.currentMonth+12).toISOString().split("T")[0],a={method:"GET",headers:{"sw-access-key":this.shopware_apikey}},o=this;fetch("".concat(this.shopware_url,"/store-api/kalender/?product=").concat(this.product_crm_id,"&from=").concat(n,"&to=").concat(i,"&full=1&type=").concat(this.type),a).then(e=>e.json()).then(n=>{t.removeChild(e),this.msProductInfo=n.data.data,this.msProductInfo.product_uid=this.product_uid,this.msProductInfo.hideLanguage=this.hideLanguage,this.msProductInfo.showFromToTime=this.showFromToTime,this.msProductInfo.personaliceconfig=this.personaliceconfig,this.msProductInfo.webtariflisting=this.webtariflisting;let i=new f(!1,this.type,o.root);if(null===o.root.querySelector(".ms-kalender-wrapper")){let e=document.createElement("div");e.className="ms-kalender-wrapper",o.root.appendChild(e)}o.root.querySelector(".ms-kalender-wrapper").innerHTML='\n <div class="ms-slot-select-group">\n <h2 class="" style="font-weight: bold;">'.concat(window.ms_translations["buy_widget.selectAppointment"],"</h2>\n ")+i.generateHTML(n.data,this.msProductInfo)+" \n </div>\n ",i.bindToggleDescriptions(o.root.querySelector(".ms-slot-select-group"));let a=o.root.querySelectorAll(".ms-slot-single-action");if(a.forEach(e=>{0!==parseInt(e.dataset.availableSlots)&&(e.addEventListener("click",this.handleSlotClick.bind(this)),e.addEventListener("keydown",e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),this.handleSlotClick(e))}))}),1===a.length)a[0]&&a[0].dispatchEvent(new MouseEvent("click",{}));else{let e=new URLSearchParams(window.location.search),t=e.get("date"),n=e.get("time");if(t&&n){let e=document.querySelector("[data-date='".concat(t,"']"));if(n){let i=n.slice(0,-2)+":"+n.slice(-2),a=new Date("".concat(t,"T").concat(i,":00Z")).toLocaleTimeString("en-GB",{timeZone:"Europe/Vienna",hour:"2-digit",minute:"2-digit",hour12:!1}),o="[data-date='".concat(t,"'][data-slotstart='").concat(a,"']"),s=document.querySelector(o);null!==s&&(e=s)}let i=e.querySelector(".ms-slot-single-action");i&&i.dispatchEvent(new MouseEvent("click",{}))}}this.loading=!1})}load(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.loading)return;this.loading=!0;let t=document.createElement("div");t.className="overlay",t.innerHTML='<div class="loader"><img width="75" alt="loading" title="loading" src="/images/frontend/ms_loading.gif"></div>';let n=this.root.querySelector(".ms-kalender-frame");n.appendChild(t);let i="".concat(this.currentYear,"-").concat(this.currentMonth.toString().padStart(2,"0"),"-01"),a=new Date(this.currentYear,this.currentMonth,0).getDate(),o="".concat(this.currentYear,"-").concat(this.currentMonth.toString().padStart(2,"0"),"-").concat(a);this.currentKalenderYear=this.currentYear;let s=new URLSearchParams(window.location.search),r=s.get("date"),l=sessionStorage.getItem(this.getStorageKey());
1if(l&&"null"!==l){let e=new Date(new Date(l).toLocaleString("en-US",{timeZone:"Europe/Vienna"})),t=new Date(new Date().toLocaleString("en-US",{timeZone:"Europe/Vienna"}));t.setHours(0,0,0,0),e.setHours(0,0,0,0),e>=t&&(r=l)}if(s.get("date")&&(r=s.get("date")),r&&!e){let[e,t]=r.split("-"),n=Number(e),a=Number(t);if(this.currentKalenderYear=n,n!==this.currentYear||a!==this.currentMonth.toString().padStart(2,"0")){let e="".concat(n,"-").concat(String(a).padStart(2,"0"),"-01"),t=new Date(n,a,0).getDate(),s="".concat(n,"-").concat(String(a).padStart(2,"0"),"-").concat(t);i=e,o=s}}let c={method:"GET",headers:{"sw-access-key":this.shopware_apikey}};fetch("".concat(this.shopware_url,"/store-api/kalender/?product=").concat(this.product_crm_id,"&from=").concat(i,"&to=").concat(o,"&full=1&type=").concat(this.type),c).then(e=>e.json()).then(e=>{n.removeChild(t),this.msProductInfo=e.data.data,this.msProductInfo.product_uid=this.product_uid,this.msProductInfo.hideLanguage=this.hideLanguage,this.msProductInfo.showFromToTime=this.showFromToTime,this.msProductInfo.personaliceconfig=this.personaliceconfig,this.msProductInfo.webtariflisting=this.webtariflisting,this.buildKalender(e.data.data),this.loading=!1})}nextMonth(){this.loading||(12===this.currentMonth?(this.currentMonth=1,this.currentYear+=1):this.currentMonth+=1,this.addMonth(),this.debouncedLoad(!0))}previousMonth(){this.loading||(1===this.currentMonth?(this.currentMonth=12,this.currentYear-=1):this.currentMonth-=1,this.addMonth(),this.debouncedLoad(!0))}addMonth(){let e=new Date(this.currentYear,this.currentMonth-1).toLocaleString(window.locale,{month:"long",year:"numeric"});this.root.querySelector("#ms-kalender-month").innerHTML=e}
1async handleSlotClick(e){let t=e.target.closest(".ms-slot-single"),n=e.target.closest(".ms-btn-primary");if(null===n&&(n=e.target.querySelector(".ms-btn-primary")),n){if(n.classList.contains("selectedSlot"))return;document.querySelectorAll(".ms-slot-single-action .ms-btn-primary").forEach(e=>{e.classList.add("ms-outline")}),n.classList.remove("ms-outline");let e=document.querySelector(".selectedSlot");e&&(e.classList.remove("selectedSlot"),e.querySelector("p").innerHTML=window.ms_translations["buy_widget.selectSlotButton"]),n.classList.add("selectedSlot"),n.querySelector("p").innerHTML=window.ms_translations["buy_widget.selectedSlotButton"]}if(t){let n=t.dataset;if(window.activeSlotDate=n.date,"only_timeslot"===this.eventType);else{let e=new w(n,this.type,this.shopware_url,this.product_crm_id,this.product_uid,this.personaliceconfig);window.activeSlotTime=t.dataset.slotstart.replace(":","");let i=await e.generateHTML();document.querySelectorAll(".ms-rates-inline").forEach(e=>e.style.display="none");let a=t.querySelector(".ms-rates-inline");a?a.replaceWith(i):t.append(i),e.makeTooltipClickableOnMobile()}0!==parseInt(document.querySelector(".ms-specialinfo").dataset.length)?(document.querySelector(".ms-specialinfo").style.display="block",document.querySelector(".ms-specialinfo").scrollIntoView({behavior:"smooth"})):e.target.closest(".ms-slot-single").scrollIntoView({behavior:"smooth"})}}async handleAvailableDateClick(e){let t=e.target.textContent,n=this.msProductInfo.dates.find(e=>new Date(new Date(e.date).toLocaleString("en-US",{timeZone:"Europe/Vienna"})).getDate()===Number(t));if(void 0===n)return;window.activeSlotDate=n.date,sessionStorage.setItem(this.getStorageKey(),n.date);let i=this.root.querySelector(".active-date");i&&i.classList.remove("active-date");let a=e.target;if("A"===a.tagName&&(a=a.parentNode),a.classList.contains("green")){e.preventDefault();return}if(a.classList.add("active-date"),n&&("booking"===this.type||"ticket"===this.type)){let e=new h(n,this.type,this.root.querySelector("#slot-select"));if(this.root.querySelector("#slot-list").innerHTML=e.show(this.msProductInfo),this.root.querySelectorAll(".ms-slot-single-action").forEach(e=>{0!==parseInt(e.dataset.availableSlots)&&(e.addEventListener("click",this.handleSlotClick.bind(this)),e.addEventListener("keydown",e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),this.handleSlotClick(e))}))}),1===n.slots.length){let e=this.root.querySelector(".ms-slot-single-action");e&&e.dispatchEvent(new MouseEvent("click",{}))}else{let e=new URLSearchParams(window.location.search),t=e.get("date"),n=e.get("time");if(t&&n){let e=document.querySelector("[data-date='".concat(t,"']"));if(n){let i=n.slice(0,-2)+":"+n.slice(-2),a=new Date("".concat(t,"T").concat(i,":00Z")).toLocaleTimeString("en-GB",{timeZone:"Europe/Vienna",hour:"2-digit",minute:"2-digit",hour12:!1}),o="[data-date='".concat(t,"'][data-slotstart='").concat(a,"']"),s=document.querySelector(o);null!==s&&(e=s)}let i=e.querySelector(".ms-slot-single-action");i&&i.dispatchEvent(new MouseEvent("click",{}))}}}}buildKalender(e){if(this.root.querySelector("#slot-select").style.display="none",void 0===e||0===e.dates.length)return;if(void 0!==e.closed_info){let t=this.root.querySelector(".ms-kalender-closed-info");t.style.display="block",t.innerHTML="de-DE"===window.locale?e.closed_info.de:e.closed_info.en}else this.root.querySelector(".ms-kalender-closed-info").style.display="none";this.root.querySelector("#ms-slot-legend").querySelectorAll(".dynamic-color").forEach(e=>e.remove()),this.msProductInfo.dates.filter(e=>e.special&&Object.keys(e.special).length>0).forEach(e=>{let t=e.special,n=document.createElement("li");n.className="list-group-item border-0 dynamic-color",n.style.setProperty("--special-color",t.special_day_shop_color),n.innerHTML="de-DE"===window.locale?t.special_day_shop_description_de:t.special_day_shop_description_en,this.root.querySelector("#ms-slot-legend").append(n)});let t=new Date(new Date(e.dates[0].date).toLocaleString("en-US",{timeZone:"Europe/Vienna"}));this.currentMonth=t.getMonth()+1,this.currentYear=t.getFullYear(),this.currentKalenderYear=this.currentYear;
1let n=t.toLocaleString(window.locale,{month:"long",year:"numeric"});this.root.querySelector("#ms-kalender-month").innerHTML=n;let i="";for(let e=2;e<=8;e++){let t=new Date(2022,0,e+1).toLocaleString(window.locale,{weekday:"short"});t=t.slice(0,2),i+='<th class="day fw-bold" role="rowheader">'.concat(t,"</th>")}let a='<tr role="row">'.concat(i,"</tr>"),o='\n\n <table class="days-table w-100" role="grid">\n <tbody>\n '.concat(a,'\n </tbody>\n </table>\n <div class="frame" style="border: solid 1px black;padding: 10px;border-radius: 10px;">\n <table class="dates-table w-100" role="presentation">\n <tbody class="tbody">\n <tr class="table-row" role="navigation" aria-label="Woche 1" >\n '),s=new Date(new Date("".concat(t.getFullYear(),"-").concat((t.getMonth()+1).toString().padStart(2,"0"),"-01")).toLocaleString("en-US",{timeZone:"Europe/Vienna"})).getDay()-1;-1===s&&(s=6);for(let e=0;e<s;e++)o+='<td class="table-date nil"></td>';let r=2;e.dates.forEach((e,t)=>{(t+s)%7==0&&0!==t&&(o+='<tr class="table-row" role="navigation" aria-label="Woche '+r+'" >',r++);let n="table-date";e.available?n+=" available":n+=" gray";let i="";e.special&&Object.keys(e.special).length>0&&(n+=" special",i="--special-day: "+e.special.special_day_shop_color+";");let a=new Date(new Date(e.date).toLocaleString("en-US",{timeZone:"Europe/Vienna"})),l=a.toLocaleDateString(window.locale,{day:"numeric",month:"long",year:"numeric"}),c=a.getDate();o+='<td class="'.concat(n,'" tabindex="0" aria-label="').concat(l,'" style="').concat(i,'"><a role="button" onclick="return 0;">').concat(c,"</a></td>"),(t+s)%7==6&&(o+="</tr>")});let l=new Date(new Date(e.dates[e.dates.length-1].date).toLocaleString("en-US",{timeZone:"Europe/Vienna"})).getDay()-1;-1===l&&(l=6);let c=6-l;for(let e=0;e<c;e++)o+='<td class="table-date nil"></td>';c>0&&(o+="</tr>"),o+="</tbody></table></div>",this.root.querySelector(".ms-kalender-frame").innerHTML=o;let d=new URLSearchParams(window.location.search).get("date"),u=null,m=null,h=null;null!==sessionStorage.getItem(this.getStorageKey())&&"null"!==sessionStorage.getItem(this.getStorageKey())&&([h,m,u]=sessionStorage.getItem(this.getStorageKey()).split("-")),d&&([h,m,u]=d.split("-")),this.root.querySelectorAll(".table-date.available, .table-date.green.available").forEach(e=>{e.addEventListener("click",this.handleAvailableDateClick.bind(this)),e.addEventListener("keydown",e=>{if("Enter"===e.key||" "===e.key){e.preventDefault(),this.handleAvailableDateClick(e);let t=this.root.querySelector(".ms-slot-single-action");t&&t.focus()}}),m==this.currentMonth&&h==this.currentKalenderYear&&e.querySelector("a").text.padStart(2,"0")===u&&e.click()})}constructor(e,t,n,i,a,o,s,r,l,c,d,u,m,h,p,g){this.getStorageKey=()=>{let e=document.querySelector("[data-productcrmid]");return"msActiveDate_"+btoa(escape((e?e.dataset.productcrmid:"null")||"null"))},this.viennaDate=new Date(new Date().toLocaleString("en-US",{timeZone:"Europe/Vienna"})),this.shopware_apikey=e,this.shopware_url=g,this.product_uid=t,this.product_crm_id=n,this.webtariflisting=u,this.type=i,this.dateType=o,this.tickettype=a,this.personaliceconfig=d,this.currentMonth=this.viennaDate.getMonth()+1,this.currentYear=this.viennaDate.getFullYear(),this.eventType=s,this.producttype=r,this.hideLanguage=l,this.showFromToTime=c,window.mainLocation=m,window.popupnoticketlink=h,this.slotstartdate=p,this.msProductInfo={};let y=document.getElementById("ms-kalender-template").content.cloneNode(!0),w=document.querySelector(".ms-replacement-container"),f=document.createElement("div");if(f.classList.add("ms-product-frame","ms-product-"+this.product_crm_id),f.appendChild(y),w.appendChild(f),this.root=f,this.loading=!1,this.debouncedLoad=this.debounce(this.load.bind(this),800),this.slotstartdate.length>0&&(sessionStorage.getItem(null===this.getStorageKey()),1)){let e=new Date(new Date(this.slotstartdate).toLocaleString("en-US",{timeZone:"Europe/Vienna"}));this.currentMonth=e.getMonth()+1,this.currentYear=e.getFullYear()}}}let v="ms-kombi-slot-changed",S=/^\d{4}-\d{2}-\d{2}$/;function _(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.kombiSlotData,t=Object.values(e||{}).map(e=>e&&e.date).filter(e=>"string"==typeof e&&S.test(e));return[...new Set(t)].sort()}
1class k extends b{async handleSlotClick(e){var t;let n=e.target.closest(".ms-btn-primary");if(null===n&&(n=e.target.querySelector(".ms-btn-primary")),n){if(n.classList.contains("selectedSlot"))return;this.root.querySelectorAll(".ms-slot-single-action .ms-btn-primary").forEach(e=>{e.classList.add("ms-outline")}),n.classList.remove("ms-outline");let e=this.root.querySelector(".selectedSlot");e&&(e.classList.remove("selectedSlot"),e.querySelector("p").innerHTML=window.ms_translations["buy_widget.selectSlotButton"]),n.classList.add("selectedSlot"),n.querySelector("p").innerHTML=window.ms_translations["buy_widget.selectedSlotButton"],document.querySelector(".ms-rates-inline")&&(document.querySelector(".ms-rates-inline").style.display="block",document.querySelector(".ms-rates-inline").scrollIntoView({block:"center",behavior:"smooth"}))}window.kombiSlotData[this.product.crm_id]=e.target.closest(".ms-slot-single").dataset||{},t=this.product.crm_id,document.dispatchEvent(new CustomEvent(v,{detail:{crmId:t}}))}async getHeadline(){let{name:e,customFields:t}=this.product,n='<div class="ms-kombi-ticket-headline">';return e&&(n+="<h2>".concat(e,"</h2>")),t&&t.description_rates&&(n+="<h3>".concat(t.description_rates,"</h3>
1")),n+="</div>"}async loadTimeTickets(){let e=this.root;document.querySelector(".ms-kombi-ticket-headline"),e.innerHTML=await this.getHeadline()}async loadDropDownTickets(){super.loadDropDownTickets(),this.root.innerHTML=await this.getHeadline()}async load(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];super.load(e);let t=this.root;if(null==document.querySelector(".ms-kombi-ticket-headline")){let e=await this.getHeadline();t.insertAdjacentHTML("afterbegin",e)}}constructor(e,t,n,i,a,o,s,r,l,c,d,u,m,h,p,g,y){super(e,t,n,i,a,o,s,r,l,c,d,u,m,h,p,g),this.product=y;let w=()=>{if(!1===this.loading){let e=document.querySelector(".ms-rates-inline");if(!e){setTimeout(w,200);return}document.querySelector(".active-date")||document.querySelector(".selectedSlot")||Object.keys(window.kombiSlotData||{}).length>0||(e.style.display="none")}else setTimeout(w,200)};setTimeout(w,1e3)}}class q extends w{getClassNameContainer(){return"ms-rates-inline kombi-rates"}getRatesEndpoint(e){let t=_();this.pricedDatesKey=t.join(",");let n=t.length?"&dates=".concat(t.join(",")):"&date=false";return"".concat(this.shopware_url,"/store-api/rates?crm_id=").concat(this.crm_id,"&type=").concat(this.type)+n+e}subscribeToSlotChanges(){this.slotChangeHandler||(this.slotChangeHandler=()=>this.refresh(),document.addEventListener(v,this.slotChangeHandler))}async refresh(){if(this.refreshing){this.refreshPending=!0;return}if(_().join(",")===this.pricedDatesKey)return;this.refreshing=!0;let e=document.querySelector(".ms-replacement-container"),t=e?e.querySelector(".kombi-rates"):null,n=null;try{if(!t)return;this.lockAddToCart(t,!0),n=this.snapshotState(),this.showLoading(t);let i=await this.generateHTML();if(!this.ratesData||!this.ratesData.rates||0===this.ratesData.rates.length){this.ratesData=n.ratesData,this.pricedDatesKey="",this.showNotice(t,"buy_widget.kombiNoRatesForDate");return}this.restoreState(i,n),i.style.display=t.style.display;let a=e.querySelector(":scope > .error-message.alert");a&&a.remove(),t.replaceWith(i),this.makeTooltipClickableOnMobile()}catch(e){console.error(e),n&&(this.ratesData=n.ratesData),this.pricedDatesKey="",t&&(this.showNotice(t,"buy_widget.kombiNoRatesForDate"),this.lockAddToCart(t,!1))}finally{this.refreshing=!1,this.hideLoading(),this.refreshPending&&(this.refreshPending=!1,await this.refresh())}}snapshotState(){let e={},t={};return(this.ratesData&&this.ratesData.rates?this.ratesData.rates:[]).forEach(n=>{t[n.rate_id]=parseFloat(n.price);let i=(window.quantities||{})[n.id];i&&i.quantity>0&&(e[n.rate_id]=i.quantity)}),{byRateId:e,priceByRateId:t,ratesData:this.ratesData}}restoreState(e,t){Object.keys(window.quantities).forEach(e=>delete window.quantities[e]);let n=parseInt(this.ratesData.max_total_order_count,10)||0,i=!1,a=0,o=!1;(this.ratesData.rates||[]).forEach(s=>{let r=t.priceByRateId[s.rate_id];void 0!==r&&r!==parseFloat(s.price)&&(i=!0);let l=t.byRateId[s.rate_id]||0;if(l<=0||(n>0&&a+l>n&&(l=Math.max(0,n-a),o=!0),l<=0))return;a+=l,window.quantities[s.id]={quantity:l,discount:[]};let c=e.querySelector("#quantity-value".concat(s.id));if(c&&(c.value=String(l)),n>0&&a>=n){let t=e.querySelector('[data-ratesid="'.concat(s.id,'"]'));t&&t.querySelectorAll(".quantity-input-field, .quantity-changer-button").forEach(e=>{e.disabled=!0})}}),Object.keys(window.quantities).length>0&&this.recaltulatePrice(e),(i||o)&&this.showNotice(e,"buy_widget.kombiPriceUpdated",this.ratesData.pricing_date)}lockAddToCart(e,t){if(!e)return;let n=e.querySelector("#addToCart");n&&(n.classList.toggle("disabled",t),n.style.pointerEvents=t?"none":"",n.style.opacity=t?"0.5":"",n.setAttribute("aria-disabled",t?"true":"false"),t?n.removeAttribute("tabindex"):n.setAttribute("tabindex","0")),e.querySelectorAll(".quantity-input-field, .quantity-changer-button").forEach(e=>{t?e.disabled||(e.dataset.msRefreshLock="1",e.disabled=!0):"1"===e.dataset.msRefreshLock&&(delete e.dataset.msRefreshLock,e.disabled=!1)})}showLoading(e){this.hideLoading();let t=e&&e.isConnected?e:document.querySelector(".ms-replacement-container");if(!t)return;let n=document.createElement("div");n.id="loading-overlay",n.style.position="absolute",n.style.top=0,n.style.left=0,n.style.right=0,n.style.bottom=0,n.style.backgroundColor="rgba(0, 0, 0, 0.1)",n.style.display="flex",n.style.justifyContent="center",n.style.alignItems="center",n.style.zIndex="10",n.innerHTML='<img width="150" src="/images/frontend/ms_loading.gif" alt="Loading...">',"static"===window.getComputedStyle(t).position&&(t.style.position="relative"),t.appendChild(n)}hideLoading(){let e=document.getElementById("loading-overlay");e&&e.remove()}showNotice(e,t,n){if(!e)return;let i=e.querySelector(".ms-rates-header");if(!i)return;let a=(window.ms_translations||{})[t];if(!a)return;let o="";if("string"==typeof n&&/^\d{4}-\d{2}-\d{2}$/.test(n)){let[e,t,i]=n.split("-").map(Number);o=new Date(e,t-1,i,12).toLocaleDateString(window.locale)}a=a.split("%date%").join(o);let s=i.querySelector(".ms-rates-notice");
1s||(i.innerHTML="",(s=document.createElement("div")).className="ms-rates-notice",i.appendChild(s)),s.style.color="buy_widget.kombiNoRatesForDate"===t?"red":"",s.style.fontWeight="bold",s.style.textAlign="center",s.textContent=a,s.isConnected&&s.scrollIntoView({behavior:"smooth",block:"center"})}addCustomProductToCart(e,t){if(!1===(e=this.validateAndAddCustomForm(e)))return;e.slot_data=window.kombiSlotData,e.kombiProducts=window.kombiProducts;let n=Object.values(window.kombiProductsFull).filter(e=>{let{dateselect:t,crm_type:n}=e.customFields;return("calendar"===t&&("booking"===n||"ticket"===n)||"dropdown"===t)&&!window.kombiSlotData[e.crm_id]}).map(e=>window.ms_translations["buy_widget.errorNoSlotForProduct"]+" ".concat(e.name));if(n.length>0){n.forEach(e=>y(e,!0));return}if(0===Object.keys(window.quantities).length){y(window.ms_translations["buy_widget.errorNoRateSelected"],!0);return}let i=window.router["frontend.custom-product.kombi"],a=document.querySelector("#addToCart");if(a.classList.contains("disabled"))return;a&&a.classList.add("disabled"),this.shopware_url=window.location.origin;let o=this.shopware_url+i;fetch(o,{method:"POST",headers:{"sw-access-key":window.SHOPWAREKEY},body:JSON.stringify(e)}).then(e=>e.json()).then(async e=>{if("error"===e.status){if("reload"===e.message){window.location.reload();return}a.classList.remove("disabled"),y(e.message,!0);return}g(this.localeShort)})}}class E{start(){document.querySelector(".ms-description").style.display="block",fetch("".concat(window.NHM_JSROUTER,"/store-api/kombiinfo?product=").concat(this.products,"&lang=").concat(window.locale),this.options).then(e=>e.json()).then(async e=>{let t=e.data,n=1;t.forEach(e=>{window.kombiProductsFull[e.crm_id]=e,e.name=n+++". "+e.name,new k(this.apiKey,e.shopware_id,e.crm_id,e.customFields.crm_type,e.customFields.crm_ticket_type,e.customFields.dateselect,e.customFields.event_type,e.customFields.product_type,e.customFields.hide_language,e.customFields.show_from_to_time,e.customFields.personalice_config,e.customFields.web_tarif_listing,document.querySelector("[data-mainlocation]").dataset.mainlocation,document.querySelector("[data-popupnoticketlink]").dataset.popupnoticketlink,e.customFields.slot_start_date,window.NHM_JSROUTER,e).start()});let i=new q({date:!1},document.querySelector("[data-type]").dataset.type,window.NHM_JSROUTER,document.querySelector("[data-productcrmid]").dataset.productcrmid,document.querySelector("[data-productid]").dataset.productid,document.querySelector("[data-personaliceconfig]").dataset.personaliceconfig);this.rates=i;let a=await i.generateHTML();document.querySelector(".ms-replacement-container").append(a),i.makeTooltipClickableOnMobile(),i.subscribeToSlotChanges(),await i.refresh()}).catch(e=>console.error(e))}constructor(e){this.viennaDate=new Date(new Date().toLocaleString("en-US",{timeZone:"Europe/Vienna"})),this.apiKey=document.querySelector("#ms-product-page").dataset.apiKey,this.products=e,this.options={method:"GET",headers:{"sw-access-key":this.apiKey}},window.kombiSlotData={},window.kombiProductsFull={},window.kombiProducts=this.products}}class L{static iterate(e,t){if(e instanceof Map||Array.isArray(e))return e.forEach(t);if(e instanceof FormData){for(var n of e.entries())t(n[1],n[0]);return}if(e instanceof NodeList)return e.forEach(t);if(e instanceof HTMLCollection)return Array.from(e).forEach(t);if(e instanceof Object)return Object.keys(e).forEach(n=>{t(e[n],n)});throw Error("The element type ".concat(typeof e," is not iterable!"))}}class T extends s{_init(){super._init(),this._validateMethods();let e=a.querySelector(document,this.options.parentFilterPanelSelector);this.listing=window.PluginManager.getPluginInstanceFromElement(e,"Listing"),this.listing.registerFilter(this),this._preventDropdownClose()}_preventDropdownClose(){let e=a.querySelector(this.el,this.options.dropdownSelector,!1);e&&e.addEventListener("click",e=>{e.stopPropagation()})}_validateMethods(){if("function"!=typeof this.getValues)throw Error("[".concat(this._pluginName,'] Needs the method "getValues"\''));if("function"!=typeof this.getLabels)throw Error("[".concat(this._pluginName,'] Needs the method "getLabels"\''));if("function"!=typeof this.reset)throw Error("[".concat(this._pluginName,'] Needs the method "reset"\''));if("function"!=typeof this.resetAll)throw Error("[".concat(this._pluginName,'] Needs the method "resetAll"\''))}}T.options={parentFilterPanelSelector:".cms-element-product-listing-wrapper",dropdownSelector:".filter-panel-item-dropdown"};class x extends T{init(){this.selection=[],this.counter=a.querySelector(this.el,this.options.countSelector),this.mainFilterButton=a.querySelector(this.el,this.options.mainFilterButtonSelector,!1),this._registerEvents()}_registerEvents(){let e=a.querySelectorAll(this.el,this.options.checkboxSelector);L.iterate(e,e=>{e.addEventListener("change",this._onChangeFilter.bind(this))})}getValues(){let e=a.querySelectorAll(this.el,"".concat(this.options.checkboxSelector,":checked"),!1),t=[];e?L.iterate(e,e=>{t.push(e.id)}):t=[],this.selection=t,this._updateCount();let n={};return n[this.options.name]=t,n}getLabels(){let e=a.querySelectorAll(this.el,"".concat(this.options.checkboxSelector,":checked"),!1),t=[];return e?L.iterate(e,e=>{t.push({label:e.dataset.label,id:e.id})}):t=[],t}setValuesFromUrl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=!1,n=e[this.options.name],i=n?n.split("|"):[],o=this.selection.filter(e=>!i.includes(e)),s=i.filter(e=>!this.selection.includes(e));return(o.length>0||s.length>
10)&&(t=!0),s.forEach(e=>{let t=a.querySelector(this.el,'[id="'.concat(e,'"]'),!1);t&&(t.checked=!0,this.selection.push(t.id))}),o.forEach(e=>{this.reset(e),this.selection=this.selection.filter(t=>t!==e)}),this._updateCount(),t}_onChangeFilter(){this.listing.changeListing(!0,{p:1})}reset(e){let t=a.querySelector(this.el,'[id="'.concat(e,'"]'),!1);t&&(t.checked=!1)}resetAll(){this.selection.filter=[];let e=a.querySelectorAll(this.el,"".concat(this.options.checkboxSelector,":checked"),!1);e&&L.iterate(e,e=>{e.checked=!1})}refreshDisabledState(e){let t=e[this.options.name];if(!t.entities||t.entities.length<1){this.disableFilter();return}this.enableFilter(),this._disableInactiveFilterOptions(t.entities.map(e=>e.id))}_disableInactiveFilterOptions(e){let t=a.querySelectorAll(this.el,this.options.checkboxSelector);L.iterate(t,t=>{!0!==t.checked&&(e.includes(t.id)?this.enableOption(t):this.disableOption(t))})}disableOption(e){let t=e.closest(this.options.listItemSelector);t.classList.add("disabled"),t.setAttribute("title",this.options.snippets.disabledFilterText),e.disabled=!0}enableOption(e){let t=e.closest(this.options.listItemSelector);t.removeAttribute("title"),t.classList.remove("disabled"),e.disabled=!1}enableAllOptions(){let e=a.querySelectorAll(this.el,this.options.checkboxSelector);L.iterate(e,e=>{this.enableOption(e)})}disableFilter(){let e=a.querySelector(this.el,this.options.mainFilterButtonSelector);e.classList.add("disabled"),e.setAttribute("disabled","disabled"),e.setAttribute("title",this.options.snippets.disabledFilterText)}enableFilter(){let e=a.querySelector(this.el,this.options.mainFilterButtonSelector);e.classList.remove("disabled"),e.removeAttribute("disabled"),e.removeAttribute("title")}_updateCount(){this.counter.textContent=this.selection.length?"(".concat(this.selection.length,")"):"",this._updateAriaLabel()}_updateAriaLabel(){if(this.options.snippets.ariaLabel){if(0===this.selection.length){this.mainFilterButton.setAttribute("aria-label",this.options.snippets.ariaLabel);return}this.mainFilterButton.setAttribute("aria-label","".concat(this.options.snippets.ariaLabel," (").concat(this.options.snippets.ariaLabelCount.replace("%count%",this.selection.length.toString()),")"))}}}x.options=t()(T.options,{checkboxSelector:".filter-multi-select-checkbox",countSelector:".filter-multi-select-count",listItemSelector:".filter-multi-select-list-item",snippets:{disabledFilterText:"Filter not active",ariaLabel:"",ariaLabelCount:""},mainFilterButtonSelector:".filter-panel-item-toggle"});class C extends x{getLabels(){let e=a.querySelectorAll(this.el,"".concat(this.options.checkboxSelector,":checked"),!1),t=[];return e?L.iterate(e,e=>{t.push({label:e.dataset.label,id:e.id,previewHex:e.dataset.previewHex,previewImageUrl:e.dataset.previewImageUrl})}):t=[],t}refreshDisabledState(e){if(""===this.options.propertyName)return;let t=[],n=e[this.options.name].entities;if(!n){this.disableFilter();return}let i=n.find(e=>e.translated.name===this.options.propertyName);if(i)t.push(...i.options);else{this.disableFilter();return}let a=this.getValues();if(t.length<1&&0===a.properties.length){this.disableFilter();return}this.enableFilter(),a.properties.length>0||this._disableInactiveFilterOptions(t.map(e=>e.id))}}C.options=t()(x.options,{propertyName:""});class D extends C{init(){super.init(),this.fuehrungsId="0196e76864be73f88aca8e0bb63b1efd"}_updateCount(){super._updateCount();let e=!1;Array.isArray(this.selection)&&this.selection.forEach(t=>{t===this.fuehrungsId&&(e=!0)});let t=document.querySelector(".to-calender-button");e?t.style.display="block":t.style.display="none"}_onChangeFilter(){super._onChangeFilter();let e=this.el;if(e){let t=bootstrap.Dropdown.getInstance(e.querySelector('[data-bs-toggle="dropdown"]'));t&&t.hide()}}}D.options=t()(C.options,{name:"properties"});let M=window.PluginManager;M.register("MsCartHeader",class extends s{init(){let e=document.querySelector("#ms-shopware-cart"),t=document.querySelector(".app-ms-shop-menunavigation .top-menu-right .top-shopping-cart");e&&t&&(t.appendChild(e),e.style.display="block",t.style.display="block")}}),M.register("MsCartLineItemPayload",class extends s{init(){document.querySelectorAll(".toggle-info").forEach(e
1=>{e.addEventListener("click",this.togglePopup),e.addEventListener("keydown",this.togglePopup)})}togglePopup(e){if("keydown"===e.type&&"Enter"!==e.key&&" "!==e.key)return;e.preventDefault();let t=e.target,n=t.nextElementSibling;"none"===n.style.display||""===n.style.display?(n.style.display="block",t.textContent=window.ms_translations["checkout.lessInfo"]):(n.style.display="none",t.textContent=window.ms_translations["checkout.moreInfo"])}},"[data-mslineitempayload-plugin]"),M.register("MsFrontendPlugin",class extends s{init(){window.selectizeOptions={onInitialize:function(){$(this)[0].$control.hasClass("has-items")&&$(this)[0].$control.parent().parent().children("label").addClass("active"),$(".inputs .selectize-input").click(function(e){e.stopPropagation()})},onFocus:function(){$(this)[0].$control.parent().parent().children("label").addClass("active")},onBlur:function(){$(this)[0].$control.hasClass("has-items")||$(this)[0].$control.parent().parent().children("label").removeClass("active")}},$("select[data-selectize='true']").selectize(window.selectizeOptions),window.msBreadcrumbMapping||window.msBreadcrumbMapping.length,fetch(window.router["frontend.checkout.info"],{method:"GET",headers:{"sw-access-key":window.SHOPWAREKEY}}).then(e=>e.text()).then(e=>{e.length>0&&(document.querySelector("[data-cart-widget]").innerHTML=e)});let e=document.getElementById("tos"),t=document.getElementById("acceptedDataProtection"),n=document.getElementById("confirmFormSubmit");n&&n.addEventListener("click",function(){t&&!t.checked?t.classList.add("is-invalid"):t&&t.classList.remove("is-invalid"),e&&!e.checked?e.classList.add("is-invalid"):e&&e.classList.remove("is-invalid")});let i=document.getElementById("JahresticketDataSelect");function a(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n="",i=document.getElementById("personalFirstName"),a=document.getElementById("personalLastName"),o=document.getElementById("personalMail");n=t?e.options[e.selectedIndex]:e.target.options[e.target.selectedIndex];let s="",r="",l="";void 0===n.dataset.placeholder&&(s=n.dataset.name,r=n.dataset.surname,l=n.dataset.mail),t||(i.value=s,a.value=r,o.hasAttribute("readonly")||(o.value=l))}i&&(i.addEventListener("change",a),a(i,!0));let o=document.getElementById("subscribeNewsletterMaster"),s=document.querySelector(".newsletter-options");function d(){o.checked?(s.style.display="",s.querySelectorAll('input[type="checkbox"]').forEach(e=>{void 0===e.attributes.checked&&(e.checked=!1)})):(s.style.display="none",s.querySelectorAll('input[type="checkbox"]').forEach(e=>{e.checked=!1,e.removeAttribute("checked")}))}function u(e){if(!document.querySelector("select#billingAddressAddressCountry.country-select").hasAttribute("required"))return document.querySelector("select#billingAddressAddressCountry.country-select").parentElement.classList.add("validated"),!0;let t=!1,n=document.querySelector("select#billingAddressAddressCountry.country-select option");return" "===n.value||""==n.value?document.querySelector("select#billingAddressAddressCountry.country-select").parentElement.classList.add(e):(document.querySelector("select#billingAddressAddressCountry.country-select").parentElement.classList.remove(e),document.querySelector("select#billingAddressAddressCountry.country-select").parentElement.classList.add("validated"),t=!0),t}o&&(o.addEventListener("change",d),d());let m=document.querySelector(".combinedFormForCheckout");m&&(m.addEventListener("submit",function(e){u("error")||e.preventDefault()}),document.querySelector("select#billingAddressAddressCountry.country-select").selectize.$input[0].onchange=function(){u("error")});let h=document.querySelector("[data-mstimer]");if(h&&h.dataset.mstimer>0&&"900"!==h.dataset.mstimer){let e=parseInt(h.dataset.mstimer,10);h.textContent=p(e);let t=Date.now(),n=e,i=setInterval(()=>{e<=0?(clearInterval(i),h.textContent="00:00"):(e--,h.textContent=p(e))},1e3);document.addEventListener("visibilitychange",()=>{document.hidden||((e=Math.max(0,n-Math.floor((Date.now()-t)/1e3)))<=0?(clearInterval(i),h.textContent="00:00"):h.textContent=p(e))})}function p(e){let t=Math.floor(e/60).toString().padStart(2,"0"),n=(e%60).toString().padStart(2,"0");return"".concat(t,":").concat(n)}let g=document.querySelector("[data-mstimer-global]");if(g){let e=parseInt(g.dataset.mstimerGlobal,10),t="ms_cart_timeout_alerted",n=Date.now(),i=e;if(!l(t)&&e<=300&&e>0&&(c(window.locale),r(t,"1",1)),g.dataset.mstimerGlobal>0){let a=setInterval(()=>{300!==e||l(t)||(c(window.locale),r(t,"1",1)),e<=0&&clearInterval(a),e--},1e3);document.addEventListener("visibilitychange",()=>{!document.hidden&&((e=Math.max(0,i-Math.floor((Date.now()-n)/1e3)))<=300&&e>0&&!l(t)&&(c(window.locale),r(t,"1",1)),e<=0&&clearInterval(a))})}}let y=document.querySelector(".scroll-info");if(y){let e=document.querySelector(".ms-replacement-container");e?new MutationObserver((t,n)=>{e.querySelector(".ms-slot-select-group")&&(n.disconnect(),w())}).observe(e,{childList:!0,subtree:!0}):w()}function w(){document.documentElement.scrollHeight<=window.innerHeight+50?y.style.display="none":(document.documentElement.scrollTop||document.body.scrollTop,0!=document.documentElement.scrollTop&&(y.style.display="none"),window.addEventListener("scroll",()=>{0!==(document.documentElement.scrollTop||document.body.scrollTop)&&(y.style.display="none")}))}document.querySelectorAll('select[data-selectize="true"][data-readonly="true"]').forEach(e
1=>{e.selectize&&(e.selectize.lock(),e.parentElement.style.backgroundColor="#e9ecef",e.parentElement.querySelector(".selectize-input").style.backgroundColor="#e9ecef")}),document.querySelectorAll("#personalMail, #personalMailConfirmation").forEach(e=>{e.setAttribute("autocomplete","new-password"),e.addEventListener("cut",e=>e.preventDefault()),e.addEventListener("copy",e=>e.preventDefault()),e.addEventListener("paste",e=>e.preventDefault()),e.addEventListener("contextmenu",e=>e.preventDefault()),e.addEventListener("dragstart",e=>e.preventDefault()),e.addEventListener("drop",e=>e.preventDefault())})}}),M.register("MsLanguageHeaderPlugin",class extends s{init(){let e=document.querySelector(".top-bar-language .language-form"),t=e.cloneNode(!0),n=t.querySelector("input");n&&n.remove();let i=document.querySelector("#desktop-language-menu"),a=document.querySelector("#mobile-language-menu");e&&i&&(i.appendChild(e),e.style.display="block"),t&&a&&(a.appendChild(t),t.style.display="block")}}),M.register("MsBarrierefreiheitPlugin",class extends s{init(){let e=document.querySelector("#desktop-language-menu .language-form"),t=document.querySelector("#mobile-language-menu .language-form");function n(e){e.querySelector(".top-bar-list-radio").click()}e.addEventListener("keydown",e=>{13==e.keyCode&&n(e.srcElement)}),t.addEventListener("keydown",e=>{13==e.keyCode&&n(e.srcElement)});let i=document.querySelector(".filter-panel-items-container");i&&i.querySelectorAll("input").forEach(e=>{e.addEventListener("keydown",e=>{13==e.keyCode&&e.srcElement.click()})});let a=document.querySelector(".checkout-aside-action"),o=document.querySelector("#addPromotionInput");a&&a.querySelectorAll("input").forEach(e=>{e.addEventListener("keydown",e=>{13==e.keyCode&&(e.preventDefault(),e.srcElement.click())})}),o&&o.addEventListener("keydown",e=>{13==e.keyCode&&(e.preventDefault(),e.srcElement.parentElement.querySelector("button").click())})}}),M.register("MsProductPagePlugin",class extends s{init(){let e=document.querySelector("#ms-product-page").dataset.apiKey,t=document.querySelector("[data-productid]").dataset.productid,n=document.querySelector("[data-productcrmid]").dataset.productcrmid,i=document.querySelector("[data-tickettype]").dataset.tickettype,a=document.querySelector("[data-type]").dataset.type,o=document.querySelector("[data-productdatetype]").dataset.productdatetype,s=document.querySelector("[data-eventtype]").dataset.eventtype,r=document.querySelector("[data-producttype]").dataset.producttype,l=document.querySelector("[data-hidelanguage]").dataset.hidelanguage,c=document.querySelector("[data-showfromtotime]").dataset.showfromtotime,d=document.querySelector("[data-personaliceconfig]").dataset.personaliceconfig,u=document.querySelector("[data-webtariflisting]").dataset.webtariflisting,m=document.querySelector("[data-combiconfig]").dataset.combiconfig,h=document.querySelector("[data-mainlocation]").dataset.mainlocation,p=document.querySelector("[data-popupnoticketlink]").dataset.popupnoticketlink,g=document.querySelector("[data-slotstartdate]").dataset.slotstartdate;"combi"==i?("string"==typeof m&&(m=JSON.parse(m)),new E(m.map(e=>e.cardtype_id||e.crm_id).filter(Boolean).join(",")).start()):new b(e,t,n,a,i,o,s,r,l,c,d,u,h,p,g,window.NHM_JSROUTER).start()}},"[data-product-kalender-plugin]"),M.register("MsPaymentSelect",class extends s{init(){var e=document.querySelectorAll(".payment-method-input"),t=document.createElement("select");t.name="paymentMethodId",t.id="paymentMethodId",t.setAttribute("aria-label",window.ms_translations["checkout.selectPayment"]);for(var n=0;n<e.length;n++){var i=document.createElement("option");i.value=e[n].value,i.text=e[n].nextElementSibling.querySelector(".payment-method-description strong").innerText,e[n].checked&&(i.selected=!0),t.appendChild(i)}document.getElementById("paymentSelectBox").appendChild(t),t.addEventListener("change",function(){var e=document.createElement("div");e.id="loading-overlay",e.style.display="block",e.style.position="fixed",e.style.left="0",e.style.top="0",e.style.width="100%",e.style.height="100%",e.style.backgroundColor="rgba(0,0,0,0.5)",e.style.zIndex="9999";var t=document.createElement("img");t.src="/images/frontend/ms_loading.gif",t.style.width="40px",t.style.height="40px",t.style.position="absolute",t.style.top="50%",t.style.left="50%",t.style.transform="translate(-50%, -50%)",e.appendChild(t),document.body.appendChild(e),document.getElementById("paymentMethod"+this.value).checked=!0;let n=document.getElementById("combinedFormForCheckout");n?n.submit():document.getElementById("changePaymentForm").submit()})}},"[data-mspayselect]"),M.register("MsCartHelpers",class extends s{init(){this.registerGlobalHelpers(),this.registerQuantityAutoSubmit()}getCheckoutForm(){return document.getElementById("combinedFormForCheckout")}registerGlobalHelpers(){window.deleteItem=e=>{let t=this.getCheckoutForm();if(!t)return;let n=document.createElement("input");n.type="hidden",n.name="delete",n.value=e,t.appendChild(n),t.submit()},window.checkVoucher=()=>{let e=this.getCheckoutForm();e&&e.submit()}}registerQuantityAutoSubmit(){let e=document.getElementsByClassName("line-item-quantity-group");for(let t=0;t<e.length;t++){let n=e[t].querySelector("input");if(!n||"true"===n.dataset.msQuantityBound)continue;n.dataset.msQuantityBound="true";let i=null;n.addEventListener("change",()=>{clearTimeout(i),i=setTimeout(()=>{let e=this.getCheckoutForm();e&&e.submit()},700)})}}},"[data-mscart-helpers]"),M.deregister("FilterPropertySelect","[data-filter-property-select]"),M.register("MsFilterPropertySelect",D,"[data-filter-property-select]"),M.deregister("OffCanvasCart","[data-off-canvas-cart]")})()})();
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.