PageSourceSearch

https://gutscheine.greenpick.ch/reactapp/build/static/js/13.fe778fb2.chunk.js

js greenpick.ch collected 2026-10-04 03:00:58 UTC 32,153 bytes, 2 lines download raw bytes

1(this.webpackJsonpreactapp=this.webpackJsonpreactapp||[]).push([[13],{172:function(e,t,n){"use strict";var a=n(15),r=n.n(a),i=n(17),c=n(8),s=n(170),o=["body"];t.a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.body,a=Object(s.a)(t,o),l={"Content-Type":"application/json"},d=Object(c.a)(Object(c.a)({method:n?"POST":"GET",credentials:"same-origin"},a),{},{headers:Object(c.a)(Object(c.a)({},l),a.headers)});if(n){if("object"!==typeof n)throw new Error("Body muss ein Objekt sein");d.body=JSON.stringify(n)}var u=window.rejectDebug||!1;return u?Promise.reject("Rejecting for debugging"):window.fetch(e,d).then(function(){var e=Object(i.a)(r.a.mark((function e(t){var n;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.json();case 2:if(n=e.sent,!t.ok){e.next=7;break}return e.abrupt("return",n);case 7:return e.abrupt("return",Promise.reject(n));case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return x})),n.d(t,"b",(function(){return k}));var a,r,i=n(8),c=n(170),s=n(5),o=n(174),l=n.n(o),d=["title","titleId"];function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},u.apply(this,arguments)}function h(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},i=Object.keys(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function p(e,t){var n=e.title,i=e.titleId,c=h(e,d);return s.createElement("svg",u({width:24,height:24,stroke:"#fff",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":i},c),n?s.createElement("title",{id:i},n):null,a||(a=s.createElement("style",null,".spinner_V8m1{transform-origin:center;animation:spinner_zKoa 2s linear infinite}.spinner_V8m1 circle{stroke-linecap:round;animation:spinner_YpZS 1.5s ease-in-out infinite}@keyframes spinner_zKoa{100%{transform:rotate(360deg)}}@keyframes spinner_YpZS{0%{stroke-dasharray:0 150;stroke-dashoffset:0}47.5%{stroke-dasharray:42 150;stroke-dashoffset:-16}
195%,100%{stroke-dasharray:42 150;stroke-dashoffset:-59}}")),r||(r=s.createElement("g",{className:"spinner_V8m1"},s.createElement("circle",{cx:12,cy:12,r:9.5,fill:"none",strokeWidth:3}))))}var m=s.forwardRef(p),j=(n.p,n(2)),b=function(){return Object(j.jsx)(m,{})},f=(n(175),["children"]),g=["children"],v="primary",y="secondary",O=function(e){var t=e.children,n=e.variant,a=e.as,r=void 0===a?"button":a,i=e.href,c=void 0===i?null:i,s=e.type,o=void 0===s?"button":s,d=e.onClick,u=e.fullWidth,h=void 0!==u&&u,p=e.style,m=e.loading,f=e.disabled,g=void 0!==f&&f,O=l()("button-default",{"button-primary":n===v,"button-secondary":n===y,"button-fullwidth":h}),x=r;return Object(j.jsxs)(x,{type:"button"===r?o:null,href:c,className:O,onClick:d,style:p,disabled:m||g,children:[m&&Object(j.jsx)("span",{className:"spinner",children:Object(j.jsx)(b,{})}),Object(j.jsx)("span",{className:m?"button-children-loading":void 0,children:t})]})},x=function(e){var t=e.children,n=Object(c.a)(e,f);return Object(j.jsx)(O,Object(i.a)(Object(i.a)({variant:v},n),{},{children:t}))},k=function(e){var t=e.children,n=Object(c.a)(e,g);return Object(j.jsx)(O,Object(i.a)(Object(i.a)({variant:y},n),{},{children:t}))}},175:function(e,t,n){},195:function(e,t,n){"use strict";n(5);var a=n(183),r=n(2);t.a=function(e){var t=e.message;return Object(r.jsx)(a.Element,{name:"error",children:Object(r.jsx)("div",{className:"common_error-text",style:{marginTop:20,marginBottom:0},role:"alert",children:t})})}},208:function(e,t,n){"use strict";n(240),n(241),n(242),n(243),n(244)},209:function(e,t,n){"use strict";var a=n(10),r=n(13),i=n(18),c=n(19),s=n(5),o=n.n(s),l=n(2),d=window.egumaReact,u=function(e){Object(i.a)(n,e);var t=Object(c.a)(n);function n(e){var r;return Object(a.a)(this,n),(r=t.call(this,e)).state={note:d.noteValue},r}return Object(r.a)(n,[{key:"getNote",value:function(){return this.state.note}},{key:"renderInput",value:function(){var e=this;if("6634c62a973b9316789d21a6"===d.eventId){var t=["I already knew it","Recommendation from friends/acquaintances","Instagram","TripAdvisor","LinkedIn","Newspaper article / Blog","Google","Guide Michelin","Gault&Millau","Other"];return"de"===d.lang?t=["Kannte ich bereits","Empfehlung durch Freunde/Bekannte","Instagram","TripAdvisor","LinkedIn","Zeitungsartikel / Blog","Google","Guide Michelin","Gault&Millau","Sonstiges"]:"fr"===d.lang&&(t=["Je connaissais d\xe9j\xe0","Recommandation de connaissances","Instagram","TripAdvisor","LinkedIn","Article de journal / Blog","Google","Guide Michelin","Gault&Millau","Autre"]),Object(l.jsxs)("select",{value:this.state.note,onChange:function(t){return e.setState({note:t.target.value})},style:{padding:"5px",marginTop:3},children:[Object(l.jsx)("option",{value:""}),t.map((function(e,t){return Object(l.jsx)("option",{value:e,children:e},t)}))]})}return Object(l.jsx)("textarea",{className:"event-details-note",value:this.state.note,onChange:function(t){return e.setState({note:t.target.value})},cols:"41",rows:"3",style:{height:50}})}},{key:"render",value:function(){return d.noteEnabled?Object(l.jsxs)("div",{style:{marginTop:30},children:[Object(l.jsx)("div",{className:"event-details-note-name",children:d.noteFieldName}),this.renderInput()]}):Object(l.jsx)("div",{})}}]),n}(o.a.Component);t.a=u},210:function(e,t,n){"use strict";var a=n(15),r=n.n(a),i=n(17),c=n(31),s=n(8),o=n(5),l=n(173),d=n(30),u=n.n(d),h=n(172),p=n(2),m=window.egumaReact,j=new u.a({phrases:m.translations}),b="setPromocode",f="resetPromocode",g="setError",v="resetError",y=function(e,t){switch(t.type){case b:return Object(s.a)(Object(s.a)({},e),{},{promoCode:t.promoCode});case f:return Object(s.a)(Object(s.a)({},e),{},{promoCode:""});case g:return Object(s.a)(Object(s.a)({},e),{},{error:t.error});case v:return Object(s.a)(Object(s.a)({},e),{},{error:!1});default:throw new Error("Action not implemented")}};t.a=function(e){var t=e.callback,n=void 0===t?function(){}:t,a=e.selectedDate,s=void 0===a?null:a,d=Object(o.useReducer)(y,{promoCode:"",error:!1}),u=Object(c.a)(d,2),v=u[0],O=u[1],x=v.error,k=v.promoCode,S=function(){var e=Object(i.a)(r.a.mark((function e(){var t,a;return r.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,console.log(s),!("5dd287746588552984d8e8eb"===m.eventId&&null!==s&&s>
1=Date.parse("2024-01-27")&&s<Date.parse("2024-02-26"))){e.next=5;break}return alert("Der Promo-Code ist f\xfcr das gew\xe4hlte Datum nicht g\xfcltig."),e.abrupt("return");case 5:return t={eventId:m.eventId,code:k},e.next=8,Object(h.a)("/api/".concat(m.mandantId,"/").concat(m.lang,"/addpromocode"),{body:t});case 8:if((a=e.sent).success){e.next=12;break}return O({type:g,error:a.message||j.t(a.messageLabel)}),e.abrupt("return");case 12:O({type:f}),n(a.newTickets),e.next=20;break;case 16:e.prev=16,e.t0=e.catch(0),console.log(e.t0),O({type:g,error:j.t("Promocode.Message.ErrorAddingPromocode")});case 20:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(){return e.apply(this,arguments)}}();return Object(p.jsxs)("div",{style:{marginTop:70},children:[Object(p.jsx)("div",{className:"row",children:Object(p.jsx)("div",{id:"ticketing-add-promocode-label",className:"col-md-12",style:{marginBottom:16},children:j.t("Promocode.Message.DoYouHaveAPromocode")})}),Object(p.jsxs)("div",{className:"row",children:[Object(p.jsx)("div",{className:"col-md-6",style:{marginBottom:16},children:Object(p.jsx)("input",{type:"text",id:"promocode",name:"code",placeholder:j.t("Common.Code"),value:k,onChange:function(e){return O({type:b,promoCode:e.target.value})},autoComplete:"off"})}),Object(p.jsx)("div",{className:"col-md-6",style:{marginBottom:16},children:Object(p.jsx)(l.b,{fullWidth:!0,onClick:S,children:j.t("Shop.Action.ApplyPromocode")})})]}),x&&Object(p.jsx)("div",{id:"promocode-msg",className:"alert alert-warning",style:{marginBottom:0},role:"alert",dangerouslySetInnerHTML:{__html:x}})]})}},213:function(e,t){var n,a,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:i}catch(e){n=i}try{a="function"===typeof clearTimeout?clearTimeout:c}catch(e){a=c}}();var o,l=[],d=!1,u=-1;function h(){d&&o&&(d=!1,o.length?l=o.concat(l):u=-1,l.length&&p())}function p(){if(!d){var e=s(h);d=!0;for(var t=l.length;t;){for(o=l,l=[];++u<t;)o&&o[u].run();u=-1,t=l.length}o=null,d=!1,function(e){if(a===clearTimeout)return clearTimeout(e);if((a===c||!a)&&clearTimeout)return a=clearTimeout,clearTimeout(e);try{a(e)}catch(t){try{return a.call(null,e)}catch(t){return a.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function j(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new m(e,t)),1!==l.length||d||s(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=j,r.addListener=j,r.once=j,r.off=j,r.removeListener=j,r.removeAllListeners=j,r.emit=j,r.prependListener=j,r.prependOnceListener=j,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},496:function(e,t,n){},497:function(e,t,n){},523:function(e,t,n){"use strict";n.r(t);var a=n(7),r=n(8),i=n(15),c=n.n(i),s=n(1),o=n(31),l=n(17),d=n(10),u=n(13),h=n(18),p=n(19),m=n(5),j=n.n(m),b=n(226),f=n(183),g=n(195),v=n(168),y=n.n(v),O=(n(208),n(245),n(247),n(496),n(508)),x=n(30),k=n.n(x),S=n(2),T=window.egumaReact,w=new k.a({phrases:T.translations});var C=function(e){var t=e.handleChange,n=e.selectedTickets,a=e.tickets;return 0===a.length?null:Object(S.jsxs)("table",{className:"table",style:{marginTop:20},children:[Object(S.jsx)("thead",{children:Object(S.jsxs)("tr",{style:{height:25},children:[Object(S.jsx)("th",{children:Object(S.jsx)("strong",{children:Object(S.jsx)("span",{id:"event-details-ticket-type-title",children:w.t("Common.Category")})})}),Object(S.jsx)("th",{className:"event-ticket-price-column",style:{textAlign:"right",minWidth:96},children:Object(S.jsxs)("span",{className:"event-details-price",style:{display:"inline-flex",flexDirection:"column"},children:[Object(S.jsx)("strong",{children:w.t("Common.Price")}),Object(S.jsx)("span",{style:{fontSize:"0.7em",lineHeight:1.2},children:w.t("Bill.VatIncluded")})]})}),Object(S.jsx)("th",{style:{textAlign:"right"},children:Object(S.jsx)("strong",{children:w.t("Common.Quantity")})})]})}),Object(S.jsx)("tbody",{children:a.map((function(e){return Object(S.jsxs)("tr",{style:{height:45},className:e.isUnlockedByPromoCode?"ticket-type-unlocked":"",children:[Object(S.jsxs)("td",{children:[Object(S.jsx)("div",{dangerouslySetInnerHTML:{__html:e.name}}),Object(S.jsx)("div",{id:"ticket-type-description",style:{marginTop:4,fontSize:"0.8em"},dangerouslySetInnerHTML:{__html:e.description}}),Object(S.jsx)("div",{className:"event-ticket-mobile-price",children:Object(S.jsxs)("span",{className:"event-details-price",style:{display:"inline-flex",flexDirection:"column"},children:[Object(S.jsx)("span",{className:"event-ticket-mobile-price-value",children:e.priceFormatted}),Object(S.jsx)("span",{className:"event-ticket-mobile-price-vat",children:w.t("Bill.VatIncluded")})]})}
1),e.isUnlockedByPromoCode&&Object(S.jsxs)("span",{className:"ticket-type-unlocked-badge",children:[Object(S.jsx)("i",{className:"fa-solid fa-unlock","aria-hidden":"true"})," ",w.t("Promocode.TicketType.Unlocked")]})]}),Object(S.jsx)("td",{className:"text-right text-nowrap event-ticket-price-cell",children:Object(S.jsx)("span",{className:"event-details-price",children:e.priceFormatted})}),Object(S.jsx)("td",{className:"text-right",children:e.isSoldOut?Object(S.jsx)("span",{style:{color:"#da3856"},children:Object(S.jsx)("strong",{children:w.t("Common.SoldOut")})}):Object(S.jsx)("select",{id:e.id,name:e.nameForSelectTag,onChange:function(n){return t(e.id,n.target.value)},style:{height:34,width:"auto",minWidth:53},value:n[e.id],children:e.quantities.map((function(e){return Object(S.jsx)("option",{value:e,children:e},"ticket_option_"+e)}))})})]},e.id)}))})]})},D=n(250),N=n(251),I=(n(497),window.egumaReact),M=new k.a({phrases:I.translations}),P=function(e){var t=e.handleChange,n=e.selectedTickets,a=e.tickets,r=e.groups;if(0===a.length)return null;var i=function(e,t){var n={};return t.forEach((function(e){return n[e.id]={group:e,tickets:[]}})),e.forEach((function(e){return n[e.group].tickets.push(e)})),Object.values(n)}(a,r);return Object(S.jsxs)(m.Fragment,{children:[Object(S.jsx)("div",{className:"ticket-groups-title",children:M.t("Common.Selection")}),i.map((function(e){return e.tickets.length>0&&Object(S.jsx)("div",{className:"product-ticket-group border-color",children:Object(S.jsxs)(D.a,{defaultActiveKey:e.group.isOpenInShop?"0":null,children:[Object(S.jsxs)(D.a.Toggle,{as:N.a.Header,eventKey:"0",className:"product-ticket-group-header button-secondary-background-color button-secondary-color",children:[Object(S.jsx)("i",{className:"fa-solid fa-angle-down","aria-hidden":"true"})," ",Object(S.jsx)("span",{dangerouslySetInnerHTML:{__html:e.group.name}})]}),Object(S.jsx)(D.a.Collapse,{eventKey:"0",children:Object(S.jsxs)("div",{children:[e.group.description&&Object(S.jsx)("div",{className:"ticket-group-description",dangerouslySetInnerHTML:{__html:e.group.description}}),Object(S.jsx)("div",{className:"product-ticket-group-content",children:Object(S.jsxs)("table",{className:"table",style:{marginTop:0,marginBottom:0},children:[Object(S.jsx)("thead",{children:Object(S.jsxs)("tr",{style:{height:25},children:[Object(S.jsx)("th",{children:Object(S.jsx)("strong",{children:Object(S.jsx)("span",{id:"event-details-ticket-type-title",children:M.t("Common.Category")})})}),Object(S.jsx)("th",{className:"event-ticket-price-column",style:{textAlign:"right",minWidth:96},children:Object(S.jsxs)("span",{className:"event-details-price",style:{display:"inline-flex",flexDirection:"column"},children:[Object(S.jsx)("strong",{children:M.t("Common.Price")}),Object(S.jsx)("span",{style:{fontSize:"0.7em",lineHeight:1.2},children:M.t("Bill.VatIncluded")})]})}),Object(S.jsx)("th",{style:{textAlign:"right"},children:Object(S.jsx)("strong",{children:M.t("Common.Quantity")})})]})}),Object(S.jsx)("tbody",{children:e.tickets.map((function(e){return Object(S.jsxs)("tr",{style:{height:45},className:e.isUnlockedByPromoCode?"ticket-type-unlocked":"",children:[Object(S.jsxs)("td",{children:[Object(S.jsx)("div",{dangerouslySetInnerHTML:{__html:e.name}}),Object(S.jsx)("div",{id:"ticket-type-description",style:{marginTop:4,fontSize:"0.8em"},dangerouslySetInnerHTML:{__html:e.description}}),Object(S.jsx)("div",{className:"event-ticket-mobile-price",children:Object(S.jsxs)("span",{className:"event-details-price",style:{display:"inline-flex",flexDirection:"column"},children:[Object(S.jsx)("span",{className:"event-ticket-mobile-price-value",children:e.priceFormatted}),Object(S.jsx)("span",{className:"event-ticket-mobile-price-vat",children:M.t("Bill.VatIncluded")})]})}),e.isUnlockedByPromoCode&&Object(S.jsxs)("span",{className:"ticket-type-unlocked-badge",children:[Object(S.jsx)("i",{className:"fa-solid fa-unlock","aria-hidden":"true"})," ",M.t("Promocode.TicketType.Unlocked")]})]}),Object(S.jsx)("td",{className:"text-right text-nowrap event-ticket-price-cell",children:Object(S.jsx)("span",{className:"event-details-price",children:e.priceFormatted})}),Object(S.jsx)("td",{className:"text-right",children:e.isSoldOut?Object(S.jsx)("span",{style:{color:"#da3856"},children:Object(S.jsx)("strong",{children:M.t("Common.SoldOut")})}):Object(S.jsx)("select",{id:e.id,name:e.nameForSelectTag,onChange:function(n){return t(e.id,n.target.value)},style:{height:34,width:"auto",minWidth:53},value:n[e.id],children:e.quantities.map((function(e){return Object(S.jsx)("option",{value:e,children:e},"ticket_option_"+e)}))})})]},e.id)}))})]})})]})})]})},"group_"+e.group.id)}))]})},_=window.egumaReact,B=new k.a({phrases:_.translations});var A=function(e){var t=e.hasPromocodeForm,n=e.currentDate,a=e.onSelect,r=e.selectedTimeSlot,i=e.timeSlots;return!n||_.isAllDay?null:i&&0!==i.length?Object(S.jsx)(f.Element,{name:"timeSlots",children:Object(S.jsx)("div",{style:{marginTop:30},children:Object(S.jsxs)("div",{children:[B.t("Backend.Ticketing.Calendar.PleaseChooseTime"),Object(S.jsx)("div",{style:{display:"flex",flexWrap:"wrap",marginTop:10},children:i.map((function(e,t){var n=e.id,i=e.time,c=e.enabled,s=e.isFullyBooked,o=e.capacity;return Object(S.jsx)("div",{onClick:function(){return c?a({slotId:n}):null},children:Object(S.jsxs)("div",{className:"calendar--timeslot".concat(c?" calendar--timeslot-enabled":" calendar--timeslot-disabled").concat(r&&r===n?" calendar--timeslot-selected":""),children:[i,_.showAvailability&&Object(S.jsxs)(m.Fragment,{children:[Object(S.jsx)("br",{}),Object(S.jsx)("div",{className:"calendar--timeslot-available",children:c?B.t("Shop.Calendar.TicketAmountAvailable",{capacity:o}):s?B.t("Common.SoldOut"):B.t("Common.SaleClosed")})]})]})},t)}))})]})})}):Object(S.jsx)(f.Element,{name:"timeSlots",children:Object(S.jsx)("div",{style:{marginTop:30},children:t?B.t("Shop.Error.NoTicketsAvailablePromocode"):B.t("Shop.Error.NoTicketsAvailable")})})},E=window.egumaReact,Y=new k.a({phrases:E.translations});var L=function(e){var t=e.capacities,n=e.selectedCapacity,a=e.selectedTimeSlot,r=e.onSelect;return!a||!E.hasMultipleCapacities||t.length<=1?null:Object(S.jsx)(f.Element,{name:"capacities",children:Object(S.jsx)("div",{style:{marginTop:30},children:Object(S.jsxs)("div",{children:[Y.t("Backend.Ticketing.Calendar.PleaseChooseCapacity"),Object(S.jsx)("div",{style:{display:"flex",flexWrap:"wrap",marginTop:10},children:t.map((function(e,t){var i=e.id,c=e.enabled,s=e.title,o=e.capacity;return Object(S.jsx)("div",{onClick:function(){return c?r({slotId:a,capacityId:i}
1):null},children:Object(S.jsxs)("div",{className:"calendar--timeslot".concat(c?" calendar--timeslot-enabled":" calendar--timeslot-disabled").concat(n&&n===i?" calendar--timeslot-selected":""),children:[s,E.showAvailability&&Object(S.jsxs)(m.Fragment,{children:[Object(S.jsx)("br",{}),Object(S.jsx)("div",{className:"calendar--timeslot-available",children:c?Y.t("Shop.Calendar.TicketAmountAvailable",{capacity:o}):Y.t("Common.SoldOut")})]})]})},t)}))})]})})})},F=n(209),R=n(210),W=n(173),H=n(172),V=window.egumaReact,G=new k.a({phrases:V.translations}),K=function(e){Object(h.a)(n,e);var t=Object(p.a)(n);function n(e){var a;return Object(d.a)(this,n),(a=t.call(this,e)).componentDidMount=function(){null!==a.state.date&&a.onChangeDate(a.state.date,!1)},a.onMonthChange=function(e){a.setState({selectedMonth:e,blockedDayNotice:null},(function(){a.getDates()}))},a.getDates=Object(l.a)(c.a.mark((function e(){var t,n,r,i,l,d,u,h,p,m;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.setState({fetchingDates:!0}),t={shortId:V.shortId,dateTime:a.state.selectedMonth.toISOString()},n="/api/".concat(V.mandantId,"/").concat(V.lang,"/get_dates"),e.prev=3,r=Object(H.a)(n,{body:t}),e.next=7,Promise.all([r,new Promise((function(e){return setTimeout((function(){return e()}),500)}))]);case 7:i=e.sent,l=Object(o.a)(i,1),d=l[0],u=d.availableDates,h=d.entirelyBookedDates,p=d.purchaseClosedDates,m=d.preSaleDates,a.setState({availableDates:new Set([].concat(Object(s.a)(u),Object(s.a)(a.state.availableDates))),entirelyBookedDates:new Set([].concat(Object(s.a)(h),Object(s.a)(a.state.entirelyBookedDates))),purchaseClosedDates:new Set(Object(s.a)(p||[])),preSaleDates:new Set(Object(s.a)(m||[])),fetchingDates:!1}),e.next=21;break;case 17:e.prev=17,e.t0=e.catch(3),console.log(e.t0),a.setState({fetchingDates:!1});case 21:case"end":return e.stop()}}),e,null,[[3,17]])}))),a.showDayNotice=function(e,t){e.preventDefault(),e.stopPropagation(),a.setState((function(e){return{blockedDayNotice:t,blockedDayNoticeKey:e.blockedDayNoticeKey+1,date:null,error:null,selectedTimeSlot:null,selectedCapacity:null,selectedTickets:{},tickets:[],timeSlots:[],capacities:[],groups:[],newTickets:[]}}),(function(){var e=new URL(window.location.href);e.searchParams.delete("date"),window.history.replaceState({date:null},"",e.toString())}))},a.onChangeDate=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];a.setState({date:e,error:null,blockedDayNotice:null},(function(){a.getTimeSlots(t);var n=new URL(window.location.href),r=y()(e).format("DD-MM-YYYY");n.searchParams.set("date",r),window.history.replaceState({date:r},"",n.toString())}))},a.getTickets=function(){var e=Object(l.a)(c.a.mark((function e(t){var n,r,i,s,o,l,d,u,h,p,m,j,b=arguments;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.slotId,r=t.capacityId,i=void 0===r?null:r,s=t.resetNewTickets,o=void 0!==s&&s,l=!(b.length>1&&void 0!==b[1])||b[1],a.setState({error:null,fetchingTickets:!0,selectedTimeSlot:n,selectedCapacity:i,selectedTickets:{},tickets:[]}),d={shortId:V.shortId,slotId:n,capacityId:i},u="/api/".concat(V.mandantId,"/").concat(V.lang,"/get_ticket_types"),e.prev=5,e.next=8,Object(H.a)(u,{body:d});case 8:h=e.sent,p=h.tickets,m=h.groups,j={},p.forEach((function(e){e.quantities.length>0&&e.quantities[0]>0&&(j[e.id]=e.quantities[0])})),a.setState({selectedTickets:j,groups:m}),a.setState({fetchingTickets:!1,tickets:p},(function(){l&&f.scroller.scrollTo("tickets",{duration:300,smooth:!0,offset:-20})})),o&&a.setState({newTickets:[]}),e.next=22;break;case 18:e.prev=18,e.t0=e.catch(5),console.log(e.t0),a.setState({fetchingTickets:!1,tickets:[]});case 22:case"end":return e.stop()}}),e,null,[[5,18]])})));return function(t){return e.apply(this,arguments)}}(),a.getCapacities=function(){var e=Object(l.a)(c.a.mark((function e(t){var n,r,i,s,o,l,d=arguments;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.slotId,r=!(d.length>1&&void 0!==d[1])||d[1],a.setState({error:null,fetchingTickets:!0,selectedTimeSlot:n,selectedTickets:{},tickets:[],selectedCapacity:null}),i={slotId:n,shortId:V.shortId},s="/api/".concat(V.mandantId,"/").concat(V.lang,"/get_capacities"),e.prev=5,e.next=8,Object(H.a)(s,{body:i});case 8:o=e.sent,1===(l=o.capacities).length&&(a.setState({selectedCapacity:l[0].id}),a.getTickets({slotId:n,capacityId:l[0].id},r)),a.setState({capacities:l},(function(){r&&f.scroller.scrollTo("capacities",{duration:300,smooth:!0,offset:-20})})),e.next=18;break;case 14:e.prev=14,e.t0=e.catch(5),console.log(e.t0),a.setState({fetchingTickets:!1,tickets:[]});case 18:case"end":return e.stop()}}),e,null,[[5,14]])}
1)));return function(t){return e.apply(this,arguments)}}(),a.getTimeSlots=Object(l.a)(c.a.mark((function e(){var t,n,r,i,s,o,l=arguments;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=!(l.length>0&&void 0!==l[0])||l[0],a.setState({error:null,fetchingTimeSlots:!0,selectedTimeSlot:null,timeSlots:[],tickets:[]}),n={shortId:V.shortId,date:a.state.date.format("YYYY-MM-DD")},r="/api/".concat(V.mandantId,"/").concat(V.lang,"/get_time_slots"),e.prev=4,e.next=7,Object(H.a)(r,{body:n});case 7:i=e.sent,s=i.timeSlots,o=i.isPurchaseClosed,a.setState({fetchingTimeSlots:!1,timeSlots:s},(function(){return V.isAllDay&&!V.hasMultipleCapacities?0===s.length?void a.setState({error:!o&&V.userCanEnterPromocode?G.t("Shop.Error.NoTicketsAvailablePromocode"):G.t("Shop.Calendar.NoTicketsAvailableForThisDay")},(function(){f.scroller.scrollTo("error",{duration:300,smooth:!0,offset:-20})})):(a.getTickets({slotId:s[0].id,capacityId:s[0].capacities[0]},t),void a.setState({selectedTimeSlot:s[0].id})):V.isAllDay&&V.hasMultipleCapacities?(a.getCapacities({slotId:s[0].id},t),void a.setState({selectedTimeSlot:s[0].id})):void(t&&f.scroller.scrollTo("timeSlots",{duration:300,smooth:!0,offset:-20}))})),e.next=17;break;case 13:e.prev=13,e.t0=e.catch(4),console.log(e.t0),a.setState({fetchingTimeSlots:!1});case 17:case"end":return e.stop()}}
1),e,null,[[4,13]])}))),a.onContinue=function(){var e=Object(l.a)(c.a.mark((function e(t){var n,r,i,s;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.preventDefault(),a.setState({newTickets:[]}),!((n=Object.keys(a.state.selectedTickets)).length<=0)){e.next=6;break}return a.setState({error:G.t("Shop.Error.NoTicketSelected")},(function(){f.scroller.scrollTo("error",{duration:300,smooth:!0,offset:-20})})),e.abrupt("return");case 6:if(a.runCustomValidator()){e.next=8;break}return e.abrupt("return");case 8:if(r=a.refNote.current.getNote(),!V.noteEnabled||!V.noteMandatory||""!==r){e.next=12;break}return a.setState({error:V.noteMandatoryMessage},(function(){f.scroller.scrollTo("error",{duration:300,smooth:!0,offset:-20})})),e.abrupt("return");case 12:return i={eventId:V.eventId,slotId:a.state.selectedTimeSlot,capacityId:a.state.selectedCapacity,tickets:n.map((function(e){return{id:e,quantity:a.state.selectedTickets[e]}})),note:r},e.next=15,Object(H.a)("/api/".concat(V.mandantId,"/").concat(V.lang,"/add_time_slot_tickets"),{body:i});case 15:(s=e.sent).success?window.location.href=s.redirect:a.setState({error:s.message,newTickets:[]},(function(){f.scroller.scrollTo("error",{duration:300,smooth:!0,offset:-20})}));case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),a.onTicketTypeChange=function(e,t){var n=Object(r.a)({},a.state.selectedTickets);parseInt(t,10)<=0?delete n[e]:n[e]=t,a.setState({selectedTickets:n})},a.appliedPromocode=function(){var e=Object(l.a)(c.a.mark((function e(t){return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a.state.selectedCapacity){e.next=5;break}return e.next=3,a.getTickets({slotId:a.state.selectedTimeSlot,capacityId:a.state.selectedCapacity});case 3:e.next=17;break;case 5:if(!a.state.selectedTimeSlot){e.next=10;break}return e.next=8,a.getCapacities({slotId:a.state.selectedTimeSlot});case 8:e.next=17;break;case 10:if(!a.state.date){e.next=15;break}return e.next=13,a.getTimeSlots();case 13:e.next=17;break;case 15:return e.next=17,a.getDates();case 17:a.setState({newTickets:t});case 18:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y.a.updateLocale("en",{week:{dow:1}}),y.a.locale(V.lang),a.refNote=j.a.createRef(),a.state={availableDates:new Set(Object(s.a)(V.availableDates)),preSaleDates:new Set(Object(s.a)(V.preSaleDates||[])),purchaseClosedDates:new Set(Object(s.a)(V.purchaseClosedDates||[])),preSaleWeeks:V.preSaleWeeks||null,selectedMonth:function(){var e=new Set(Object(s.a)(V.availableDates));return e.size>0?y()(e.values().next().value):y()()}(),date:null!==V.date?y()(V.date,"DD-MM-YYYY"):null,error:null,blockedDayNotice:null,blockedDayNoticeKey:0,entirelyBookedDates:new Set(Object(s.a)(V.entirelyBookedDates)),fetchingDates:!1,fetchingTickets:!1,fetchingTimeSlots:!1,fetchingCapacities:!1,selectedTickets:{},groups:[],selectedTimeSlot:null,tickets:[],timeSlots:[],capacities:[],selectedCapacity:null,newTickets:[]},a}return Object(u.a)(n,[{key:"runCustomValidator",value:function(){try{if("undefined"!==typeof window.onCalendarValidate){var e,t=[],n=Object(a.a)(this.state.tickets);try{for(n.s();!(e=n.n()).done;){var r=e.value;if(void 0!==this.state.selectedTickets[r.id]){var i=parseInt(this.state.selectedTickets[r.id],10);i>0&&t.push({id:r.id,name:r.name,qty:i})}}}catch(c){n.e(c)}finally{n.f()}return window.onCalendarValidate(V.eventId,t)}}catch(s){return console.error(s),alert("Es ist ein Fehler aufgetreten."),!1}return!0}},{key:"render",value:function(){var e=this,t=this.state,n=t.availableDates,a=t.entirelyBookedDates,r=t.fetchingDates,i=t.fetchingTimeSlots,c=t.fetchingCapacities,s=t.selectedTickets,o=t.tickets,l=t.groups,d=t.date,u=V.isWaitingList&&V.isAllDay;return Object(S.jsx)(j.a.Fragment,{children:Object(S.jsx)("div",{className:"row",children:Object(S.jsxs)("div",{className:"col-lg-10",children:[Object(S.jsx)("div",{id:"select-date",style:{marginTop:30,marginBottom:20},children:G.t("Backend.Ticketing.Calendar.PleaseChooseDate")}),Object(S.jsxs)("div",{style:{position:"relative",width:"fit-content"},children:[r&&Object(S.jsx)("div",{style:{position:"absolute",zIndex:100,display:"flex",justifyContent:"center",alignItems:"center",top:0,left:0,bottom:0,right:0,backgroundColor:"rgba(255, 255, 255, 0.7)"},children:Object(S.jsx)(O.a,{size:70,color:"rgba(55, 55, 55, 0.9)",loading:!0})}),Object(S.jsx)(b.DayPickerSingleDateController,{focused:!0,initialVisibleMonth:function(){return e.state.selectedMonth},date:d,onDateChange:this.onChangeDate,isOutsideRange:function(e){return!n.has(e.format("YYYY-MM-DD"))},isDayBlocked:function(e){return!u&&a.has(e.format("YYYY-MM-DD"))},isDayHighlighted:function(e){return!1},onNextMonthClick:this.onMonthChange,onPrevMonthClick:this.onMonthChange,renderDayContents:function(t){var r=t.format("YYYY-MM-DD"),i=t.isBefore(y()(),"day"),c=a.has(r),s=!u&&c,o=e.state.preSaleDates.has(r),l=e.state.purchaseClosedDates.has(r),d=u&&c&&!i&&!l&&!o,h=!n.has(r)&&!s&&!o&&!l,p=i||s||h||l,m=o?G.t("Shop.Calendar.PreSaleNotYetAvailable",{date:t.clone().subtract(7*e.state.preSaleWeeks,"days").format("LL")}):"";return Object(S.jsx)("div",{onClick:function(t){if(i)return t.preventDefault(),void t.stopPropagation();s?e.showDayNotice(t,G.t("Shop.Calendar.SelectedDayFullyBooked")):l?e.showDayNotice(t,G.t("Shop.Calendar.PurchaseClosed")):o?e.showDayNotice(t,m):h&&e.showDayNotice(t,G.t("Shop.Calendar.NoSlotsAvailable"))},className:d?"calendar--day-sold-out-waiting-list":"",style:{position:"relative",textDecoration:p?"line-through":"none"},children:t.date()})}})]}),this.state.blockedDayNotice&&Object(S.jsx)("div",{className:"calendar-day-notice",style:{marginTop:24,marginBottom:8,padding:"14px 18px",color:"var(--global-text-color)",backgroundColor:"var(--global-background-color)",border:"1px solid var(--border-color)",borderRadius:6},children:Object(S.jsx)("strong",{children:this.state.blockedDayNotice})},this.state.blockedDayNoticeKey),!i&&Object(S.jsx)(A,{currentDate:this.state.date,onSelect:this.getCapacities,selectedTimeSlot:this.state.selectedTimeSlot,timeSlots:this.state.timeSlots,hasPromocodeForm:V.userCanEnterPromocode}),!c&&Object(S.jsx)(L,{capacities:this.state.capacities,selectedTimeSlot:this.state.selectedTimeSlot,selectedCapacity:this.state.selectedCapacity,onSelect:this.getTickets}),this.state.date&&u&&a.has(this.state.date.format("YYYY-MM-DD"))?Object(S.jsx)("div",{className:"border-color",style:{borderStyle:"solid",borderWidth:2,fontWeight:"bold",padding:10,marginTop:20,marginBottom:0},children:Object(S.jsx)("span",{dangerouslySetInnerHTML:{__html:G.t("Shop.Ticketing.WaitingListIsAvailable.HintCalendar",{link:"".concat(window.location.pathname,"/waitinglist?slotId=").concat(this.state.selectedTimeSlot)})}})}):Object(S.jsxs)("form",{onSubmit:this.onContinue,children:[Object(S.jsxs)(f.Element,{name:"tickets",children:[this.state.error&&Object(S.jsx)(g.a,{message:this.state.error}),0===l.length?Object(S.jsx)(C,{handleChange:this.onTicketTypeChange,selectedTickets:s,tickets:o}):Object(S.jsx)(P,{handleChange:this.onTicketTypeChange,selectedTickets:s,tickets:o,groups:l})]}),this.state.tickets.length>0&&Object(S.jsx)(F.a,{ref:this.refNote}
1),V.userCanEnterPromocode&&Object(S.jsx)(R.a,{callback:this.appliedPromocode}),this.state.tickets.length>0&&Object(S.jsx)(W.a,{fullWidth:!0,style:{marginTop:40},type:"submit",children:G.t("Shop.Action.Next")})]})]})})})}}]),n}(j.a.Component);t.default=K}}]);
2//# sourceMappingURL=13.fe778fb2.chunk.js.map

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.