1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1536],{879:(e,t,a)=>{a.d(t,{f:()=>E});var s=a(60369),n=a(96717),r=a(71321),o=a(50637),i=a(77005),l=a(41189),c=a(69277),d=a(29479),u=a(69319),m=a(79497),g=a(16429),p=a(28669),y=a(17791),h=a(29649),f=a(45325),x=a(20761),S=a(66257),b=a(75791),v=a(64999),_=a(3261),w=a(24669),P=a(77251),D=a(27321),C=a(76085),k=a(83885),j=a(74472),I=a(21733),N=a(31661);let A="\n fragment BlockList on EditorBlock {\n ... on AcfStageteaser {\n stageModule {\n ...Stage\n }\n }\n ... on AcfTextteaser {\n textTeaserModule {\n ...TextTeaser\n }\n }\n ... on AcfImagetextteaser {\n imageTextTeaserModule {\n ...ImageTextTeaser\n }\n }\n ... on AcfBackgroundthreesmall {\n backgroundThreeSmallModule {\n ...BackgroundThreeSmall\n }\n }\n ... on AcfSlider {\n sliderModule {\n ...Slider\n }\n }\n ... on AcfAccordionteaser {\n accordionModule {\n ...AccordionTeaser\n }\n }\n ... on AcfSplittextteaser {\n splitTextModule {\n ...SplitTextTeaser\n }\n }\n ... on AcfStudiocapacity {\n capacityModule {\n ...StudioCapacity\n }\n }\n ... on AcfCourseplan {\n coursePlanModule {\n ...CoursePlan\n }\n }\n ... on AcfTextbackgroundteaser {\n textBackgroundModule {\n ...TextBackgroundTeaser\n }\n }\n ... on AcfFlipcardteaser {\n flipCardTeaserModule {\n ...FlipCardTeaser\n }\n }\n ... on AcfBanderole {\n moduleBanderole {\n ...Banderole\n }\n }
1\n ... on AcfCategoryteaser {\n moduleCategoryTeaser {\n ...CategoryTeaser\n }\n }\n ... on AcfShopthelook {\n moduleShopthelook {\n ...ShopTheLook\n }\n }\n ... on AcfFamilyteaser {\n familyTeaserModule {\n ...FamilyTeaser\n }\n }\n ... on AcfLogowall {\n moduleLogowall {\n ...Logowall\n }\n }\n ... on AcfOnebigthreesmall {\n obtsModule {\n ...OneBigThreeSmall\n }\n }\n ... on AcfWoosmap {\n woosmapModule {\n ...Woosmap\n }\n }\n ... on AcfStagewoosmap {\n moduleStageWoosmap {\n ...StageWoosmap\n }\n }\n ... on AcfGrid {\n gridModule {\n ...Grid\n }\n }\n ... on AcfJumpmark {\n jumpmarkModule {\n ...StickyNavi\n }\n }\n ... on AcfLocationgrid {\n locationGrid {\n ...LocationGrid\n }\n }\n ... on AcfLead {\n lead {\n ...LeadTeaser\n }\n }\n ... on AcfContractsmodule {\n contractsModule {\n ...ContractsModule\n }\n }\n ... on AcfRadioplayermodule {\n radioPlayerModule {\n ...RadioPlayerModule\n }\n }\n ... on AcfEntrymodule {\n entryModule {\n ...EntryModule\n }\n }\n ... on AcfStageteaserv2 {\n stageModuleV2 {\n ...StageV2\n }\n }
1\n ... on AcfDaypass {\n daypassModule {\n ...DayPass\n }\n }\n ... on AcfDaypassqrcode {\n daypassQrCode {\n ...DaypassQrCode\n }\n }\n}\n ".concat(s.H,"\n").concat(n._,"\n").concat(r.x,"\n").concat(o.k,"\n").concat(i.c,"\n").concat(l.h,"\n").concat(c.C,"\n").concat(d.j,"\n").concat(u.T,"\n").concat(m.c,"\n").concat(g.S,"\n").concat(p.T,"\n").concat(y.V,"\n").concat(h.x,"\n").concat("\n fragment FamilyTeaser on FamilyTeaserModule {\n __typename\n active\n background\n brands {\n background\n headline\n image\n imageAlt\n link\n linkText\n logoAlt\n logo\n placeholder\n subline\n sublineColor\n text\n video\n }\n depublishDate\n headline\n image\n imageCloudinary {\n node {\n sourceUrl\n }\n }\n imageAlt\n jumpmarkLabel\n moduleTitle\n releaseDate\n showJumpmark\n subline\n sublineColor\n text\n video\n placeholder\n}\n ","\n").concat(f.y,"\n").concat(x.q,"\n").concat(S.H,"\n").concat(b.r,"\n").concat(v.$,"\n").concat(_.K,"\n").concat(w.k,"\n").concat(P.v,"\n").concat(D.Q,"\n").concat(C.j,"\n").concat(k.l,"\n").concat(j.J,"\n").concat(I.r,"\n").concat(N.w),E="\n fragment Blocks on EditorBlock {\n name\n ...BlockList\n ... on CoreBlock {\n innerBlocks {\n ...BlockList\n }\n }\n}\n ".concat(A)},4954:(e,t,a)=>{a.d(t,{Bl:()=>u});var s=a(879),n=a(89894),r=a(37177),o=a(35447);function i(e,t,a,s){return async()=>e.request({document:t,variables:a,requestHeaders:s})}let l="\n query StudioById($id: ID!) {\n studio(id: $id, idType: DATABASE_ID) {\n databaseId\n slug\n status\n editorBlocks {\n ...Blocks\n }\n customPageSettings {\n ...PageSettings\n }\n seo {\n ...Seo\n }\n customStudioSettings {\n mlStudioID\n }\n translations {\n language {\n code\n }\n slug\n }\n }\n}\n ".concat(s.f,"\n").concat(n.h,"\n").concat(r.y),c=(e,t,a,s)=>(0,o.I)({queryKey:["StudioById",t],queryFn:i(e,l,t,s),...a});c.document=l,c.getKey=e=>["StudioById",e];let d="\n query StudioByIdAndLocale($id: ID!, $locale: LanguageCodeEnum!) {\n studio(id: $id, idType: DATABASE_ID) {\n databaseId\n slug\n status\n translation(language: $locale) {\n slug\n uri\n seo {\n ...Seo\n }\n editorBlocks {\n ...Blocks\n }\n customPageSettings {\n ...PageSettings\n }\n customStudioSettings {\n mlStudioID\n }\n }\n translations {\n language {\n code\n }\n slug\n uri\n }\n }\n}\n ".concat(r.y,"\n").concat(s.f,"\n").concat(n.h),u=(e,t,a,s)=>(0,o.I)({queryKey:["StudioByIdAndLocale",t],queryFn:i(e,d,t,s),...a});u.document=d,u.getKey=e=>["StudioByIdAndLocale",e];let m="\n query StudioPreviewById($id: ID!, $locale: LanguageCodeEnum!) {\n studio(id: $id, idType: DATABASE_ID) {\n translation(language: $locale) {\n databaseId\n slug\n status\n }\n }\n}\n ",g=(e,t,a,s)=>(0,o.I)({queryKey:["StudioPreviewById",t],queryFn:i(e,m,t,s),...a});g.document=m,g.getKey=e=>["StudioPreviewById",e];let p="\n query StudioPreviewBySlug($slug: ID!, $locale: LanguageCodeEnum!) {\n studio(id: $slug, idType: SLUG) {\n language {\n code\n }\n translations {\n language {\n code\n }\n }\n translation(language: $locale) {\n databaseId\n slug\n status\n language {\n code\n }\n }\n }\n}\n ",y=(e,t,a,s)=>(0,o.I)({queryKey:["StudioPreviewBySlug",t],queryFn:i(e,p,t,s),...a});y.document=p,y.getKey=e=>["StudioPreviewBySlug",e]},11536:(e,t,a)=>{a.r(t),a.d(t,{default:()=>Z});var s=a(60072),n=a(60004),r=a(94122),o=a(80230);let i=n.memo(function(e){var t;let{isMF:a,image:n,imageAlt:r}=e;return(null==n||null==(t=n.node)?void 0:t.sourceUrl)?(0,s.jsx)("div",{className:"daypass-image-container hidden lg:block flex-shrink-0",children:(0,s.jsx)(o.A,{src:n.node.sourceUrl,alt:r||"Gym interior",addClasses:"object-cover h-full w-full",deviceDpr:!0,enhanceCloudinary:!0,eager:!0})}):null});i.displayName="RightSideImage";let l=e=>{let{children:t}=e;return(0,s.jsx)("div",{className:"bg-white daypass-container min-h-screen",children:t})};var c=a(33785),d=a(62380),u=a(80087),m=a(58989),g=a(53307),p=a(65214),y=a(96792),h=a(30142),f=a(4493),x=a(92572),S=a(1004),b=a(76038);let v=e=>{let{transactionId:t,email:a,brand:o="mcfit",paymentMethod:i="paypal",originalPaymentMethod:l,amount:v,currency:_="EUR",doorsecureData:w,qrCodeUrl:P,qrCodeIdentifier:D,uuid:C}=e,{isMF:k=!1,isJR:j=!1,isGG:I=!1}=(0,n.useContext)(r._0)||{}
1,N=(0,f.G9c)(),A=N?"text-klub-neutral-700":"text-graphite",E=(0,n.useMemo)(()=>(0,b.M)(a),[a]);(0,S.aT)(t,E);let[q,T]=(0,n.useState)(P||""),[M,L]=(0,n.useState)(D||""),[F,R]=(0,n.useState)(!1),[B,U]=(0,n.useState)(!1),[O,Q]=(0,n.useState)(!1),[z,W]=(0,n.useState)(w||{}),[G,J]=(0,n.useState)(null),[V,K]=(0,n.useState)(C||""),[$,H]=(0,n.useState)(()=>x.DayPassSessionStorage.getAccessCode()||""),[Z]=(0,n.useState)(()=>"true"===new URLSearchParams(window.location.search).get("braze_success")),[Y]=(0,n.useState)(()=>"true"===new URLSearchParams(window.location.search).get("magicline_success"));(0,n.useEffect)(()=>{Z||C||console.log("â ï¸ Braze failed because Auth0 UUID was not available\n"),console.log("\n\uD83D\uDCCA [DayPassSuccess] Backend Integration Status:"),console.log(" - QR Code: â
Created (you're seeing this page)"),console.log(" - Magicline Lead: ".concat(Y?"â
Created":"â ï¸ Failed")),console.log(" - Auth0 User: ".concat(C?"â
Created/Retrieved":"â ï¸ Failed")),console.log(" - Braze Event: ".concat(Z?"â
Sent":"â ï¸ Failed").concat(Z||C?"":" (Auth0 required)")),console.log("\nâ¹ï¸ These values come from backend, not hardcoded!")},[Y,Z,C]),(0,n.useEffect)(()=>{!$&&t&&(console.log("\uD83D\uDD0D [DayPassSuccess] Access code not in session, fetching from backend..."),(async()=>{try{let e=window.location.origin,a=x.DayPassSessionStorage.getDetailsAccessToken(),s=new URLSearchParams({transaction_id:t}),n={};a&&(n.Authorization="Bearer ".concat(a));let r=await fetch("".concat(e,"/api/daypass-details?").concat(s.toString()),{credentials:"same-origin",headers:n});if(r.ok){let e=await r.json();e.accessCode&&(H(e.accessCode),x.DayPassSessionStorage.saveAccessCode(e.accessCode),console.log("â
[DayPassSuccess] Access code retrieved from backend"))}else console.warn("â ï¸ [DayPassSuccess] Failed to fetch access code from backend")}catch(e){console.error("â [DayPassSuccess] Error fetching access code:",e)}})())},[$,t]);
1let[X,ee]=(0,n.useState)(()=>!!t&&"true"===sessionStorage.getItem("datalayer_events_sent_".concat(t)));(0,n.useEffect)(()=>{let e=new URLSearchParams(window.location.search).get("qr_code_url");e&&!q&&T(e)},[q]),(0,n.useEffect)(()=>()=>{sessionStorage.removeItem("daypass_form_data"),sessionStorage.removeItem("daypass_payment_intent"),x.DayPassSessionStorage.clearAccessCode(),x.DayPassSessionStorage.clearCustomerNames()},[]),(0,n.useEffect)(()=>{sessionStorage.removeItem("daypass_form_data"),sessionStorage.removeItem("daypass_payment_intent"),x.DayPassSessionStorage.clearCustomerNames()},[]),(0,n.useEffect)(()=>{Z&&X&&!O&&!F&&(sessionStorage.removeItem("daypass_form_data"),sessionStorage.removeItem("daypass_payment_intent"),x.DayPassSessionStorage.clearCustomerNames(),(q||M)&&(console.log("â
[DayPassSuccess] QR code displayed successfully"),x.DayPassSessionStorage.clearAccessCode()))},[Z,X,O,F,q,M]);let et=(0,n.useCallback)(async e=>{if(!(null==w?void 0:w.daypassId)||Z)return;W(w);let t=w.qr_code_image||P,a=D||w.qr_code_identifier;if(!t&&a)try{let e=window.location.origin,s=await fetch("".concat(e,"/api/qr-code?qr_code_identifier=").concat(encodeURIComponent(a),"&format=json&size=300"));if(s.ok){let e=await s.json();e.success&&e.qr_code_image&&(t=e.qr_code_image,T(t))}}catch(e){}T(t),L(a),R(!1),console.log("â
[DayPassSuccess] Backend has already handled all business logic (Braze, Magicline, Auth0)")},[w,P,D,C,q,Y,Z]),ea=(0,n.useCallback)(async e=>{if("stripe"!==i&&"paypal"!==i||Z)return;let t=(0,y.tK)(),a=(0,y.gT)(t,i);if(!a)return;W(a);let s=P,n=D||a.qr_code_identifier;if(!s&&n){n=a.qr_code_identifier;try{let e=window.location.origin,t=await fetch("".concat(e,"/api/qr-code?qr_code_identifier=").concat(encodeURIComponent(n),"&format=json&size=300"));if(t.ok){let e=await t.json();e.success&&e.qr_code_image&&(s=e.qr_code_image,T(s))}}catch(e){}}T(s),L(n),R(!1);let r=await (0,h.z$)(async()=>{let t=window.location.origin,a=await fetch("".concat(t).concat((0,f.ZJR)(e)));if(!a.ok){let e=await a.text();throw Error("UUID generation failed: ".concat(a.status," ").concat(e))}let s=await a.json();if(!s.success||!s.uuid)throw Error("Invalid UUID response: ".concat(JSON.stringify(s)));return s},{success:!1,uuid:null},"â DayPassSuccess: UUID generation failed");r.success&&r.uuid?(K(r.uuid),console.log("â
[DayPassSuccess] Backend has already handled all business logic (Braze, Magicline, Auth0)")):(J("Failed to generate access credentials"),R(!0))},[i,P,D,q,Z]);(0,n.useEffect)(()=>{let e=!0;return(async()=>{if(!e)return;Q(!0),R(!1),J(null);let s=(0,h.q9)(t,a);if(!s.isValid){J(s.error||"Missing required data"),Q(!1);return}let n=await (0,y.rl)(a);await et(n),await ea(n),(null==w?void 0:w.daypassId)||(null==z?void 0:z.daypassId)||(J("Day pass data not available. Please contact support."),R(!0)),Q(!1)})(),()=>{e=!1}},[t,a,w,et,ea,Y]),(0,n.useEffect)(()=>{t&&!X&&(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"daypass_purchase_completed",ecommerce:{transaction_id:t||"",value:parseFloat(v),currency:"EUR",items:[{item_name:"Daypass",item_category:"Fitnessstudio-Zugang",quantity:1,price:parseFloat(v)}]}}),ee(!0),t&&sessionStorage.setItem("datalayer_events_sent_".concat(t),"true"))},[t,a,o,i,l,v,_,X]);let es=new URLSearchParams(window.location.search),en=es.get("qr_code_url"),er=es.get("qr_code_identifier"),eo=(null==z?void 0:z.qr_code_image)||q||en;eo&&eo.includes("/qr-code?")&&(eo=null);let ei=M||(null==z?void 0:z.qr_code_identifier)||er,el=O&&"undefined"!=typeof document?(0,c.createPortal)((0,s.jsx)("div",{className:"z-[9999] flex items-center justify-center",style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.4)",backdropFilter:"blur(4px)",WebkitBackdropFilter:"blur(4px)"},children:(0,s.jsx)("div",{className:"max-w-md w-full mx-4",children:(0,s.jsxs)("div",{className:"bg-white rounded-2xl shadow-2xl p-8",children:[(0,s.jsx)("div",{className:"flex justify-center mb-6",children:(0,s.jsx)("div",{className:"relative w-20 h-20",children:(0,s.jsx)("div",{className:"absolute inset-0 rounded-full border-4 ".concat(N?"border-klub-mint-500":k?"border-yellow-400":"border-blue-500"," border-t-transparent animate-spin")})})}),(0,s.jsx)("h3",{className:"text-xl font-semibold text-gray-800 text-center mb-3",children:k?"QR-Code wird generiert...":"Generating your QR code..."}),(0,s.jsx)("p",{className:"text-gray-600 text-center text-sm mb-4",children:k?"Dein Daypass wird vorbereitet. Einen Moment bitte...":"Your day pass is being prepared. This will only take a moment..."}),$&&(0,s.jsxs)("div",{className:"mt-4 p-4 bg-gray-50 rounded-lg border border-gray-200",children:[(0,s.jsx)("p",{className:"text-xs text-gray-600 mb-2 text-center font-medium",children:k?"Dein Zugangscode:":"Your Acce
1ss Code:"}),(0,s.jsx)("p",{className:"text-2xl font-mono font-bold text-gray-800 text-center tracking-wider",children:$}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-2 text-center",children:k?"Falls QR-Code nicht funktioniert":"Use this code if QR code doesn't work"})]})]})})}),document.body):null;return(0,s.jsxs)(s.Fragment,{children:[el,(0,s.jsx)(d.A,{backgroundColor:"bg-white",className:"daypass-success !py-16",children:(0,s.jsxs)("div",{className:"max-w-4xl mx-auto text-center px-6",children:[(0,s.jsx)("div",{className:"mb-8",children:(0,s.jsx)("div",{className:"\n inline-flex items-center justify-center w-20 h-20 rounded-full\n ".concat(N?"bg-klub-teal-500":k?"bg-ci-color":j?"bg-black":"bg-yellow-500","\n text-white\n "),children:(0,s.jsx)(m.A,{})})}),(0,s.jsx)(u.A,{size:["h1"],addClasses:"mb-6 text-4xl sm:text-5xl lg:text-6xl",isCentered:!0,children:(0,s.jsx)("span",{className:k?A:"",children:k?"DAYPASS GESICHERT. WILLKOMMEN IM KLUB!":"Day Pass successfully purchased!"})}),(0,s.jsx)("div",{className:"mb-8 max-w-2xl mx-auto",children:(0,s.jsx)("p",{className:"text-lg sm:text-xl leading-relaxed ".concat(k?A:"text-gray-700"),children:k?"Dein Daypass ist aktiviert. Ab sofort kannst du jederzeit im Klub vorbeischauen und loslegen.":"Thank you for your purchase! Your day pass is now active and you can visit the club immediately."})}),t||a||eo?(0,s.jsxs)("div",{className:"mb-8",children:[(0,s.jsx)("h3",{className:"text-lg font-semibold mb-4 ".concat(k?A:"text-gray-800"),children:k?"Dein QR-Code":"Your QR Code"}),(0,s.jsx)("div",{className:"flex justify-center",children:O?(0,s.jsx)("div",{className:"p-4 bg-gray-50 border-2 border-gray-200 rounded-lg",children:(0,s.jsx)("div",{className:"w-48 h-48 bg-gray-100 rounded flex items-center justify-center",children:(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-gray-600 mx-auto mb-2"}),(0,s.jsx)("p",{className:"text-gray-500 text-sm mb-2",children:k?"QR-Code wird generiert...":"Generating QR code..."}),$&&(0,s.jsxs)("div",{className:"mt-4 p-3 bg-white rounded border",children:[(0,s.jsx)("p",{className:"text-xs text-gray-600 mb-1",children:k?"Zugangscode:":"Access Code:"}),(0,s.jsx)("p",{className:"text-lg font-mono font-bold text-gray-800",children:$}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:k?"Falls QR-Code nicht funktioniert":"If QR code doesn't work"})]})]})})}):F?(0,s.jsx)("div",{className:"p-4 bg-gray-50 border-2 border-gray-200 rounded-lg",children:(0,s.jsxs)("div",{className:"w-48 h-48 bg-gray-200 rounded flex flex-col items-center justify-center p-4",children:[(0,s.jsx)("p",{className:"text-gray-500 text-center text-sm mb-3",children:k?"QR-Code konnte nicht geladen werden":"QR code could not be loaded"}),$?(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("p",{className:"text-xs text-gray-600 mb-2 font-semibold",children:k?"Verwenden Sie stattdessen diesen Code:":"Use this code instead:"}),(0,s.jsx)("div",{className:"bg-white px-4 py-3 rounded border-2 border-gray-300",children:(0,s.jsx)("p",{className:"text-xl font-mono font-bold text-gray-800",children:$})}),(0,s.jsx)("p",{className:"text-xs text-gray-500 mt-2",children:k?"Geben Sie diesen Code am Eingang ein":"Enter this code at the entrance"})]}):(0,s.jsx)("p",{className:"text-gray-400 text-center text-xs mt-3",children:k?"Bitte kontaktieren Sie den Support":"Please contact support"})]})}):(0,s.jsxs)("div",{className:"p-4 bg-white border-2 border-gray-200 rounded-lg shadow-sm",children:[(0,s.jsx)("div",{id:"qr-code-container",className:"w-48 h-48 mx-auto bg-white p-4",style:{minHeight:"200px",minWidth:"200px"},children:eo&&!B?(0,s.jsx)("img",{src:eo,alt:"Day Pass QR Code",className:"w-full h-full object-contain",onLoad:e=>{},onError:e=>{throw Error("QR code image failed to load: ".concat(eo))}}):ei?(0,s.jsx)("div",{className:"w-full h-full flex items-center justify-center",children:(0,s.jsx)(p.default,{value:(0,g.QU)(ei),size:200,style:{height:"auto",maxWidth:"100%",width:"100%"}})}):(0,s.jsx)("div",{className:"w-full h-full flex items-center justify-center text-gray-500 text-sm",children:"QR code not available"})}),(0,s.jsx)("div",{className:"mt-4 text-center",children:(0,s.jsxs)("button",{onClick:()=>{let e=document.getElementById("qr-code-container");
1if(e){let a="daypass-qr-".concat(t||"code",".png");(0,g.Ct)(e,a)}},className:"inline-flex items-center px-4 py-2 bg-blue-600 text-white text-sm font-medium rounded-lg hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-colors",children:[(0,s.jsx)("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),k?"QR-Code herunterladen":"Download QR Code"]})}),(0,s.jsx)("p",{className:"text-sm mt-3 max-w-xs ".concat(k?A:"text-gray-600"),children:k?"Scanne den QR-Code am Eingang":"Show this QR code when visiting the club"})]})})]}):(0,s.jsxs)("div",{className:"mb-8 p-6 rounded-lg max-w-md mx-auto ".concat(N?"bg-klub-mint-100 border border-klub-mint-400":"bg-yellow-50 border border-yellow-200"),children:[(0,s.jsx)("h3",{className:"text-lg font-semibold mb-4 ".concat(N?"text-klub-neutral-700":"text-yellow-800"),children:k?"Information fehlt":"Information Missing"}),(0,s.jsx)("p",{className:"text-sm ".concat(N?"text-klub-neutral-700":"text-yellow-700"),children:k?"Transaktions-ID oder E-Mail fehlt. Bitte kontaktieren Sie den Support.":"Transaction ID or email is missing. Please contact support."})]}),(0,s.jsx)("div",{className:"mt-12 pt-8 border-t border-gray-200",children:(0,s.jsx)("p",{className:"text-sm text-gray-600",children:k?"Fragen? Kontaktieren Sie uns unter [email protected]":j?"Questions? Contact us at [email protected]":"Questions? Contact us at [email protected]"})})]})})]})};var _=a(32189),w=a(10983),P=a(4954),D=a(70729),C=a(64156),k=a(56645);let j=e=>{var t;let{topline:a,toplineColor:o,headlineGroup:i,text:l,bottomLineBig:c,bottomLineSmall:d,priceTextGroup:m,isMF:g=!1}=e,{isKlubTheme:p}=(0,n.useContext)(r._0),y=(0,f.G9c)(),h=(0,f.C86)(o,{isMF:g,isKlub:y,context:"dayPass"}),x=y?"text-klub-neutral-700":"text-graphite";return(0,s.jsxs)("div",{className:"flex flex-col gap-10",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[a&&(0,s.jsx)("p",{className:(0,k.A)("uppercase",y&&"klub-label",!y&&(g?"text-[0.85rem] font-bold tracking-subline":"text-sm font-medium tracking-[4px]"),h),dangerouslySetInnerHTML:{__html:(0,f.pnc)(g?(0,f.kDP)(a):a||"")}}),(null==i?void 0:i.text)&&(0,s.jsx)(u.A,{addClasses:(0,k.A)("uppercase",y&&"klub-h2"),...i,size:null!=(t=null==i?void 0:i.size)?t:["h2"],isCentered:!1,children:(0,s.jsx)("span",{dangerouslySetInnerHTML:{__html:(0,f.pnc)(g?(0,f.kDP)(i.text):i.text||"")}})})]}),m&&(0,s.jsx)("div",{className:"text-center",children:(0,s.jsxs)("p",{className:(0,k.A)("uppercase text-[24px] inline-flex items-center justify-center gap-4",y&&"klub-h2 ".concat(x),!y&&g&&"text-graphite font-montserrat font-[900]",!y&&!g&&"text-black font-bold"),children:[(0,s.jsx)("span",{className:(0,k.A)("text-center text-[24px] leading-[24px] uppercase",y&&x,!y&&g&&"font-montserrat font-[900] text-graphite",!y&&!g&&"font-montserrat font-bold text-graphite"),children:m.pre}),(0,s.jsx)("span",{className:(0,k.A)("text-[54px] leading-none",y&&x,!y&&g&&"font-montserrat font-[900] text-graphite",!y&&!g&&"font-bold text-black"),children:m.price}),(0,s.jsx)("span",{className:(0,k.A)("text-center text-[24px] leading-[24px] uppercase",y&&x,!y&&g&&"font-montserrat font-[900] text-graphite",!y&&!g&&"font-montserrat font-bold text-graphite"),children:m.post})]})}),(0,s.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,s.jsxs)("div",{children:[c&&(0,s.jsx)(C.A,{content:null==c?void 0:c.replace(/<p> <\/p>/g,""),addClasses:(0,k.A)("text-[24px]",y&&"klub-h2 ".concat(x),!y&&"text-graphite font-montserrat",!y&&(g?"font-bold":"font-semibold"))}),d&&(0,s.jsx)(C.A,{content:null==d?void 0:d.replace(/<p> <\/p>/g,""),addClasses:(0,k.A)(y?"klub-body ".concat(x):"text-lg text-gra
1phite font-montserrat")})]}),l&&(0,s.jsx)("div",{children:(0,s.jsx)(C.A,{content:null==l?void 0:l.replace(/<p> <\/p>/g,""),addClasses:(0,k.A)(y?"klub-body ".concat(x):"text-base text-graphite font-montserrat")})})]})]})};var I=a(30787),N=a(87700),A=a(61074);let E=e=>{let{label:t,testId:a,wrapperClasses:o,inputClasses:i,isRequired:l,...c}=e,{errors:d}=(0,I.j7)(),[u,m]=(0,I.Mt)(c),{name:g,placeholder:p}=c,{isMF:y}=(0,n.useContext)(r._0),h=(0,f.G9c)(),x=(0,n.useId)(),S=(null==c?void 0:c.id)||"".concat(g||p,"_").concat(x),b=n.useMemo(()=>{if(!l||!t)return t;let e=(0,s.jsx)("span",{className:"text-error ml-1",children:"*"});if("string"==typeof t)return(0,s.jsxs)("span",{style:{whiteSpace:"nowrap",display:"inline-block"},children:[t,e]});if((0,n.isValidElement)(t)){let a=t.props;if("string"==typeof(null==a?void 0:a.content)){let e,s='<span class="text-error ml-1">*</span>',r=a.content.lastIndexOf("</p>");return e=-1!==r?a.content.slice(0,r)+s+a.content.slice(r):a.content.trimEnd()+s,(0,n.cloneElement)(t,{...a,content:e})}let r=a.children;return(0,n.cloneElement)(t,{...a,children:(0,s.jsxs)("span",{style:{whiteSpace:"nowrap",display:"inline-block"},children:[r,e]})})}return t},[t,l]);return(0,s.jsx)("div",{className:(0,k.A)("flex flex-col",o),children:(0,s.jsxs)("div",{className:(0,k.A)("group relative",i),children:[(0,s.jsx)("input",{type:"checkbox",className:"sr-only peer",id:S,...u,...c,checked:u.value}),(0,s.jsx)("label",{htmlFor:S,className:"\n block \n cursor-pointer\n relative\n text-[0.65rem]\n pl-10\n pt-[3px]\n font-montserrat\n\n group-[:before]:content-['']\n group-[:before]:absolute\n group-[:before]:left-0\n group-[:before]:top-0\n group-[:before]:border-2\n group-[:before]:border-solid\n ".concat(h?"group-[:before]:border-klub-teal-500":y?"group-[:before]:border-ci-color":"group-[:before]:border-black","\n group-[:before]:w-6\n group-[:before]:h-6\n\n peer-checked:after:content-['']\n peer-checked:after:absolute\n peer-checked:after:left-[5px]\n peer-checked:after:top-[5px]\n peer-checked:after:w-[14px]\n peer-checked:after:h-[14px]\n ").concat(h?"peer-checked:after:bg-klub-teal-500":y?"peer-checked:after:bg-ci-color":"peer-checked:after:bg-black","\n\n ").concat(c.disabled?"text-gray-400":"","\n "),"data-testid":a,children:b})]})})};var q=a(19455);let T={email:"",termsAccepted:!1,marketingOptIn:!1};var M=a(85292),L=a(11933);let F=e=>{let{currentStep:t,setCurrentStep:a,stepNumber:o,isMF:i,isJR:l,formHeadline:c,changeLabel:d="\xc4ndern",onChangeStep:u,ariaLabel:m}=e,{isKlubTheme:g}=(0,n.useContext)(r._0),p=(0,f.G9c)(),y=1===o?"black":"white",h=t>o;return(0,s.jsxs)("div",{className:"flex w-full items-center",children:[(0,s.jsx)("div",{className:"\n rounded-full w-8 h-8 sm:w-10 sm:h-10 flex items-center justify-center text-xs sm:text-lg\n ".concat(p&&"border-1 border-klub-teal-500/40 font-montserrat","\n ").concat(!p&&i&&"border-1 border-ci-color/40 font-montserrat","\n ").concat(l&&"border-1 border-black/40 font-open-sans","\n ").concat(p?"bg-klub-teal-500 text-white":"","\n ").concat(!p&&i?"bg-ci-color text-white":"","\n ").concat(l?"bg-black text-white":"","\n ").concat(i||l?"":"text-black","\n "),children:t>2?(0,s.jsx)("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M6.04319 12.5217C5.83449 12.5217C5.64319 12.4521C5.48667 12.2956L2.0258 8.8347C1.71275 8.52166 1.71275 8.0347 2.0258 7.72166C2.33884 7.40861 2.8258 7.40861 3.13884 7.72166L6.06058 10.626L12.9997 3.70426C13.3128 3.39122 13.7997 3.39122 14.1128 4.81731C14.4258 4.01731 14.4258 4.50427 14.1128 4.81731L6.6171 12.2956C6.44319 12.4521 6.25188 12.5217 6.04319 12.5217Z",fill:y})}):(0,s.jsx)("span",{className:i||l?"text-white":"text-black",children:o})}),(0,s.jsx)("p",{className:(0,k.A)("ml-6 text-[1.5rem]",p&&"font-montserrat font-bold text-klub-teal-500",!p&&i&&"font-montserrat font-bold text-ci-color",l&&"text-black"),"aria-current":t===o?"step":void 0,children:c}),h&&(0,s.jsx)("span",{className:"\n ml-auto underline cursor-pointer font-light text-sm text-gray13\n ".concat(i?"font-montserrat":"font-open-sans","\n "),onClick:()=>{u?u(o):a(o)},role:"button",tabIndex:0,"aria-label":m||"Change step ".concat(o),children:d})]})};var R=a(43291),B=a(8190);let U=e=>
1{let{currentStep:t,setCurrentStep:a,isLoading:o,isMF:i,isJR:l,formHeadline:c,checkboxAgb:d,checkboxMarketing:u,errorLegal:m,formId:g,errorMessages:p,formData:y,onSubmit:h}=e,{isKlubTheme:b}=(0,n.useContext)(r._0),v=(0,f.G9c)(),_=((e,t)=>q.Ik().shape({email:q.Yj().trim().email(null==e?void 0:e.emailSyntaxError).required(null==e?void 0:e.emailError),termsAccepted:q.zM().oneOf([!0],t||(null==e?void 0:e.legalError)).required(t||(null==e?void 0:e.legalError)),marketingOptIn:q.zM()}))(p,m),w=(0,n.useRef)(null),P=(0,n.useRef)(!1),[D,j]=(0,n.useState)(""),[U,O]=(0,n.useState)(!1),[Q,z]=(0,n.useState)(!1),{validateEmail:W}=(()=>{let e=(0,n.useRef)(""),t=(0,n.useMemo)(()=>(0,f.AKz)(async(t,a,s)=>{if(e.current===t)return null==a||a(!1),null==s||s(!0),{code:200,valid:!0};null==a||a(!0);try{let n=await fetch("/api/check-email?email=".concat(encodeURIComponent(t))),r=await n.json();return e.current=t,null==a||a(!1),null==s||s(!0),r}catch(e){throw null==a||a(!1),null==s||s(!0),e}},200),[]);return{validateEmail:(0,n.useCallback)(async function(a,s,n,r,o,i){let l=!(arguments.length>6)||void 0===arguments[6]||arguments[6];if(r(""),l&&(null==i||i(!1),e.current=""),!a||a.length<5)return null==o||o(!1),!1;if(!(a&&q.Yj().trim().email().isValidSync(a)))return r((null==s?void 0:s.emailSyntaxError)||"Email format is not valid"),n("email"),!1;{let e=await t(a,o,i);if(L.C0.invalidStatus.includes(null==e?void 0:e.code))return r((null==s?void 0:s.emailGenericError)||"Email is not valid"),n("email"),!1;if(L.C0.invalidStatusSyntax.includes(null==e?void 0:e.code))return r((null==s?void 0:s.emailSyntaxError)||"Email format is not valid"),n("email"),!1;if(L.C0.invalidStatusServer.includes(null==e?void 0:e.code))return r((null==s?void 0:s.emailServerError)||"Email server error"),n("email"),!1;else if(L.C0.invalidStatusDomain.includes(null==e?void 0:e.code))return r((null==s?void 0:s.emailDomainError)||"Email domain is not valid"),n("email"),!1;else return r(""),n("email"),!0}},[t])}})(),G=n.useCallback(e=>{x.DayPassSessionStorage.saveFormData(e),h(e)},[h]);return(0,n.useEffect)(()=>{let e=()=>{if(P.current&&w.current&&window.innerWidth<=768){let e=w.current.getBoundingClientRect();e.top>=0&&e.bottom<=window.innerHeight||(w.current.blur(),P.current=!1)}},t=()=>{P.current=!0},a=()=>{P.current=!1};window.addEventListener("scroll",e,{passive:!0});let s=w.current;return s&&(s.addEventListener("focus",t),s.addEventListener("blur",a)),()=>{window.removeEventListener("scroll",e),s&&(s.removeEventListener("focus",t),s.removeEventListener("blur",a))}},[]),(0,s.jsx)(S.sH,{errorContext:f.BXm,children:(0,s.jsx)(I.l1,{initialValues:(()=>{let e=x.DayPassSessionStorage.getFormData();return{...T,...e}})(),validationSchema:_,onSubmit:G,enableReinitialize:!1,children:e=>{let{values:n,errors:r,touched:m,setFieldValue:h,setFieldTouched:f,validateField:x}=e;return(0,s.jsx)(I.lV,{id:g,className:"flex flex-col w-full",children:(0,s.jsxs)("div",{className:(0,k.A)(1===t&&"gap-6","relative flex flex-col justify-center items-center",v?"border-klub-teal-500":i?"border-pink":"border-black"),role:"region","aria-label":"DayPass Step 1: Your Information",children:[(0,s.jsx)(F,{currentStep:t,setCurrentStep:a,stepNumber:1,isMF:i,isJR:l,formHeadline:c,ariaLabel:"Change Your Information"}),(0,s.jsx)("div",{className:"\n transition-all duration-1000 ease-in-out w-full\n ".concat(l&&"text-black font-open-sans font-normal","\n ").concat(1===t?"h-auto":"h-0 overflow-hidden","\n "),role:"tabpanel","aria-labelledby":"step-1-content",children:(0,s.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,s.jsx)(B.N,{className:"mb-2 w-full"}),(0,s.jsx)(R.FO,{ref:w,id:"email_".concat(g),name:"email",errorMessage:D||(m.email&&r.email?String(r.email):""),isValidating:U,hasValidated:Q,placeholder:(null==y?void 0:y.email)||"Email Address",type:"email",autoComplete:"email",fullWidth:!0,isRequired:(0,M.Sh)(_,"email"),onChange:e=>{let{name:t,value:a}=e.target;h(t,a),O(!0),W(a,p,f,j,O,z,!0)},onBlur:e=>{let{value:t}=e.target;f("email",!0),t&&!Q&&W(t,p,f,j,O,z,!1)},inputHeight:"48px",inputClasses:"mt-[3px]",placeholderClasses:"top-[10px] text-black z-10",daypassErrorMessageClasses:"mt-1"}),(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("div",{className:(0,k.A)(m.termsAccepted&&r.termsAccepted?"mb-0":"mb-4"),children:(0,s.jsx)(E,{id:"termsAccepted_".concat(g),name:"termsAccepted",label:(0,s.jsx)(C.A,{content:d||"Accept terms and conditions.*",hrefModal:!0,addClasses:(0,k.A)("font-montserrat",i?"text-[0.65rem] font-normal leading-4":"text-sm font-light leading-[21px]")}),"aria-invalid":!!(m.termsAccepted&&r.termsAccepted),"aria-describedby":m.termsAccepted&&r.termsAccepted?"termsAccepted-error_".concat(g):void 0,onChange:async e=>{let{name:t,checked:a}=e.target;h(t,a),a||(f(t,!0,!1),await x(t))},onBlur:()=>{m.termsAccepted||f("termsAccepted",!0,!0)},wrapperClasses:"mb-0",error:m.termsAccepted&&r.termsAccepted?r.termsAccepted:void 0,isRequired:!0})}),m.termsAccepted&&r.termsAccepted&&(0,s.jsx)("div",{id:"termsAccepted-error_".concat(g),className:(0,k.A)("mt-1 transition-all mb-4 min-h-0"),children:m.termsAccepted&&r.termsAccepted&&(0,s.jsx)(A.A,{children:String(r.termsAccepted)})}),(0,s.jsx)(E,{id:"marketingOptIn_".concat(g),name:"marketingOptIn",label:(0,s.jsx)(C.A,{content:u||"Accept terms and conditions for marketing communications.",hrefModal:!0,isCheckbox:!0,addClasses:"font-normal leading-4"}),wrapperClasses:"mb-4"})]}),(0,s.jsx)(N.$,{value:o?"Wird verarbeitet...":"Zur Zahlung fortfahren",type:"submit",disabled:!n.termsAccepted||!n.email||o||!!r.email||!!D||U||!Q,primary:!0,addClasses:"w-full py-4 text-lg"})]})})]})})}})})};var O=a(64170),Q=a(52069);let z={buttonHeight:55,paymentMethods:{applePay:"always",googlePay:"always",paypal:"auto"},appearance:{theme:"stripe",variables:{colorPrimary:"#0570de"}},paymentMethodCreation:"automatic",paymentMethodTypes:["card","paypal","apple_pay","google_pay"],paymentMethodOrder:["paypal","apple_pay","google_pay"],layout:{maxRows:3,maxColumns:1,overflow:"auto"}};class W extends n.Component{static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){throw Error("DayPass Error Boundary caught an error: ".concat(e," - ").concat(t))}render(){return this.state.hasError?this.props.fallback?this.props.fallback:(0,s.jsx)("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg",children:(0,s.jsxs)("div",{className:"flex",children:[(0,s.jsx)("div",{className:"flex-shrink-0",children:(0,s.jsx)("svg",{className:"h-5 w-5 text-red-400",viewBox:"0 0 20 20",fill:"currentColor",children:(0,s.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})})}),(0,s.jsxs)("div",{className:"ml-3",children:[(0,s.jsx)("h3",{className:"text-sm font-medium text-red-800",children:"Payment Error"}),(0,s.jsxs)("div",{className:"mt-2 text-sm text-red-700",children:[(0,s.jsx)("p",{children:"Something went wrong with the payment process. Please try again or c
1ontact support if the problem persists."}),!1]}),(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsx)("button",{type:"button",className:"bg-red-100 px-3 py-2 rounded-md text-sm font-medium text-red-800 hover:bg-red-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500",onClick:()=>this.setState({hasError:!1,error:void 0}),children:"Try Again"})})]})]})}):this.props.children}constructor(e){super(e),this.state={hasError:!1}}}let G=(()=>{let e="pk_live_51Lr9UZEieovAsOXX5liJR9GX6TNGsQtBdt8HjIQ2hseK3aJDuWCpJNAYemD8WKS5K3TQpXLWyf78uO2IXP3sgG9h00sdS2Ml5V";return e?e.startsWith("pk_")?(console.log("â
[Stripe] Publishable key loaded successfully"),e):(console.error("â [Stripe] Invalid Stripe publishable key format"),null):(console.error("â [Stripe] Missing Stripe publishable key"),null)})(),J=G?(0,Q.c)(G):null,V=e=>{let{amount:t,clientSecret:a,customerEmail:r,onPaymentMethodSelect:o,onError:i,successLink:l}=e,c=(0,O.useStripe)(),d=(0,O.useElements)(),[u,m]=(0,n.useState)(null),[g,p]=(0,n.useState)("idle"),y=(0,n.useRef)(!1),h=(0,n.useRef)(!1),{trackDaypassPurchaseCompletedIfReady:f}=(0,S.dz)(),v=(0,n.useRef)(f);v.current=f;let _=(0,n.useCallback)(async(e,s)=>{console.log("\uD83C\uDFAF [DayPass] Starting payment success handler for payment intent");for(let n=1;n<=3;n++)try{if(console.log("\uD83D\uDD04 [DayPass] Attempt ".concat(n,"/").concat(3," to create day pass")),x.DayPassSessionStorage.isPaymentCompleted(e)){console.log("â
[DayPass] Payment already completed, skipping reprocessing");let t=sessionStorage.getItem("daypass_success_url_".concat(e));if(t){window.location.href=t;return}}let o=x.DayPassSessionStorage.getFormData();console.log("\uD83D\uDCCB [DayPass] Session data email: ".concat((null==o?void 0:o.email)?"found":"not found")),x.DayPassSessionStorage.isAvailable()||console.warn("â ï¸ [DayPass] Session storage not available, using URL params only");let i=new AbortController,c=setTimeout(()=>i.abort(),3e4);console.log("\uD83D\uDCE1 [DayPass] Calling API to check payment status and create day pass...");let d=a||x.DayPassSessionStorage.getPaymentIntent()||new URLSearchParams(window.location.search).get("payment_intent_client_secret");if(!d)throw Error("Missing Payment Intent client secret for day pass confirmation");let u=await fetch("/api/daypass-checkout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({checkPaymentStatus:!0,clientSecret:d,skipDayPassCreation:!1}),signal:i.signal});if(clearTimeout(c),console.log("\uD83D\uDCEC [DayPass] API response status: ".concat(u.status)),u.ok){let a=await u.json();if(console.log("â
[DayPass] Day pass created successfully"),a.customerFirstName&&a.customerLastName&&x.DayPassSessionStorage.saveCustomerNames(a.customerFirstName,a.customerLastName),a.doorsecureAccessCode&&x.DayPassSessionStorage.saveAccessCode(a.doorsecureAccessCode),"string"==typeof a.detailsAccessToken&&a.detailsAccessToken&&x.DayPassSessionStorage.saveDetailsAccessToken(a.detailsAccessToken),a.uuid&&x.DayPassSessionStorage.saveUuid(a.uuid),a.qrCodeUrl||a.qrCodeImage){let e=a.qrCodeUrl||a.qrCodeImage;e&&e.startsWith("data:")&&x.DayPassSessionStorage.saveQrCodeUrl(e)}let n=l||"/daypasssuccess",i="".concat(window.location.origin).concat(n),c=new URL(i);c.searchParams.set("success","true"),c.searchParams.set("payment_method",s),c.searchParams.set("transaction_id",a.transactionId||e),a.doorsecureDaypassId&&c.searchParams.set("doorsecure_daypass_id",a.doorsecureDaypassId),a.qrCodeUrl&&!a.qrCodeUrl.startsWith("data:")&&c.searchParams.set("qr_code_url",a.qrCodeUrl),a.qrCodeIdentifier&&c.searchParams.set("qr_code_identifier",a.qrCodeIdentifier),"boolean"==typeof a.auth0Success&&c.searchParams.set("auth0_success",String(a.auth0Success)),"boolean"==typeof a.magiclineSuccess&&c.searchParams.set("magicline_success",String(a.magiclineSuccess)),"boolean"==typeof a.brazeSuccess&&c.searchParams.set("braze_success",String(a.brazeSuccess)),c.searchParams.set("amount",(t/100).toFixed(2)),c.searchParams.set("currency","EUR"),console.log("\uD83D\uDE80 [DayPass] Redirecting to success page");let d=c.toString();if(x.DayPassSessionStorage.markPaymentCompleted(e),sessionStorage.setItem("daypass_success_url_".concat(e),d),h.current)return void console.log("â ï¸ [DayPass] Redirect already attempted, skipping duplicate");
1h.current=!0,console.log("\uD83C\uDFAF [DayPass] Initiating automatic redirect..."),p("success");let m=a.transactionId||e;v.current(m,(0,b.M)(o.email||r)),await new Promise(e=>setTimeout(e,50)),window.location.href=d;return}{let e=await u.json().catch(()=>({})),t=e.error||e.details||"Failed to create day pass after successful payment";if(console.error("â [DayPass] Payment status check attempt ".concat(n," failed:"),t),console.error("\uD83D\uDD0D [DayPass] Response status: ".concat(u.status,", Error data:"),e),3===n)throw Error(t);console.log("â³ [DayPass] Waiting ".concat(500,"ms before retry...")),await new Promise(e=>setTimeout(e,500))}}catch(e){if(console.error("â [DayPass] Payment success handling attempt ".concat(n," failed:"),e),3===n){let t=e instanceof Error?e.message:"Error handling payment success";console.error("\uD83D\uDCA5 [DayPass] All retry attempts exhausted. Final error:",t),m(t),p("failed"),i(t);return}console.log("â³ [DayPass] Waiting ".concat(500,"ms before retry...")),await new Promise(e=>setTimeout(e,500))}},[t,r,a,i]),w=(0,n.useCallback)(async e=>{if(!c||!d||y.current)return void console.warn("â ï¸ [DayPass] OnConfirm blocked - Stripe: ".concat(!!c,", Elements: ").concat(!!d,", Processing: ").concat(y.current));if(!a){let e="Payment not ready. Please refresh the page and try again.";console.error("â [DayPass] No client secret available - payment intent should have been created during form submission"),m(e),p("failed"),i(e);return}y.current=!0,p("processing"),m(null);try{let t=(e=>{var t,a,s,n,r,o,i,l;let c=[{condition:"paypal"===e.paymentMethod||(null==(a=e.paymentIntent)||null==(t=a.payment_method_types)?void 0:t.includes("paypal")),method:"paypal"},{condition:"apple_pay"===e.paymentMethod||(null==(n=e.paymentIntent)||null==(s=n.payment_method_types)?void 0:s.includes("apple_pay")),method:"apple_pay"},{condition:"google_pay"===e.expressPaymentType||"google_pay"===e.paymentMethod||(null==(o=e.paymentIntent)||null==(r=o.payment_method_types)?void 0:r.includes("google_pay"))||"gpay"===e.payment_method,method:"google_pay"},{condition:"card"===e.paymentMethod||(null==(l=e.paymentIntent)||null==(i=l.payment_method_types)?void 0:i.includes("card")),method:"card"}].find(e=>{let{condition:t}=e;return t});return(null==c?void 0:c.method)||"express_checkout"})(e);console.log("\uD83C\uDFAC [DayPass] User confirmed payment"),console.log("\uD83D\uDD10 [DayPass] Confirming payment with Stripe...");let s=x.DayPassSessionStorage.getRedirectPath()||window.location.pathname,n="".concat(window.location.origin).concat(s,"?return_from_payment=true&payment_method=").concat(t),{error:r,paymentIntent:o}=await c.confirmPayment({elements:d,confirmParams:{return_url:n},redirect:"if_required"});if(r){let e=r.message||"Payment failed";console.error("â [DayPass] Payment confirmation error: ".concat(e),r),m(e),p("failed"),i(e),y.current=!1;return}console.log("â
[DayPass] Payment confirmed by Stripe. Status: ".concat(null==o?void 0:o.status)),o&&"succeeded"===o.status?(console.log("⨠[DayPass] Payment succeeded immediately, processing day pass creation..."),p("success"),await _(o.id,t)):o&&"processing"===o.status&&(console.log("â³ [DayPass] Payment still processing, will check status in 0.8 seconds..."),p("processing"),setTimeout(async()=>{try{console.log("\uD83D\uDD0D [DayPass] Checking payment status after processing delay...");let{paymentIntent:e}=await c.retrievePaymentIntent(a);console.log("\uD83D\uDCCA [DayPass] Updated payment status: ".concat(null==e?void 0:e.status)),e&&"succeeded"===e.status&&(console.log("â
[DayPass] Payment confirmed as succeeded, processing day pass..."),await _(e.id,t))}catch(e){console.error("â [DayPass] Error checking payment status after processing:",e)}},800))}catch(t){console.error("â [DayPass] Express Checkout error:",t);let e=t instanceof Error?t.message:"Payment failed";m(e),p("failed"),i(e)}finally{y.current=!1}},[c,d,i,_,a]);return(0,n.useEffect)(()=>{if(!c)return;console.log("\uD83D\uDD0D [DayPass] Checking for return from payment provider redirect...");let e=new URLSearchParams(window.location.search),t=e.get("payment_intent"),s=e.get("payment_intent_client_secret"),n="true"===e.get("return_from_payment"),r=a||x.DayPassSessionStorage.getPaymentIntent();if(console.log("\uD83D\uDCCA [DayPass] Return check - PI: ".concat(!!t,", ClientSecret: ").concat(!!r,", ReturnFlag: ").concat(n)),t&&s||t&&n||n&&r){console.log("â
[DayPass] Detected return from payment redirect, retrieving payment status...");let e=s||r;if(!e){console.error("â [DayPass] No client secret available to check payment status"),m("Unable to verify payment status. Please refresh the page.");return}p("processing"),c.retrievePaymentIntent(e).then(t=>{let{paymentIntent:a,error:s}=t;if(s)console.error("â [DayPass] Failed to retrieve payment intent:",s),m(s.message||"Failed to retrieve payment status"),p("failed");else if(a)if(console.log("\uD83D\uDCCA [DayPass] Payment intent status: ".concat(a.status)),"succeeded"===a.status){var n;console.log("â
[DayPass] Payment succeeded, processing day pass...");let e=(null==(n=a.payment_method_types)?void 0:n[0])||"card";_(a.id,e)}else if("processing"===a.status){console.log("â³ [DayPass] Payment still processing, will check again..."),p("processing");let t=0,a=setInterval(async()=>{t++,console.log("\uD83D\uDD04 [DayPass] Polling payment status (attempt ".concat(t,"/").concat(40,")..."));let{paymentIntent:s,error:n}=await c.retrievePaymentIntent(e);
1if(n||!s){console.error("â [DayPass] Error polling payment status:",n),clearInterval(a),m("Unable to verify payment status"),p("failed");return}if("succeeded"===s.status){var r;console.log("â
[DayPass] Payment confirmed as succeeded"),clearInterval(a);let e=(null==(r=s.payment_method_types)?void 0:r[0])||"card";_(s.id,e)}else"requires_payment_method"===s.status||"canceled"===s.status?(console.error("â [DayPass] Payment failed with status: ".concat(s.status)),clearInterval(a),m("Payment ".concat(s.status,". Please try again.")),p("failed")):t>=40&&(console.error("â [DayPass] Payment status check timed out"),clearInterval(a),m("Payment verification timed out. Please contact support."),p("failed"))},500)}else"requires_action"===a.status?(console.warn("â ï¸ [DayPass] Payment requires additional action"),m("Payment requires additional authentication. Please complete the verification.")):(console.error("â [DayPass] Unexpected payment status: ".concat(a.status)),m("Payment ".concat(a.status,". Please try again or contact support."))),p("failed")})}},[c,a,_]),(0,s.jsxs)("div",{className:"w-full",children:[(0,s.jsx)("div",{className:"stripe-express-checkout space-y-3 mb-4",children:(0,s.jsx)(O.ExpressCheckoutElement,{options:z,onConfirm:w})}),u&&(0,s.jsx)("div",{className:"mt-4 p-3 bg-red-50 border border-red-200 rounded-lg",children:(0,s.jsx)("p",{className:"text-red-800 text-sm",children:u})}),("processing"===g||"success"===g)&&(0,s.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-40 backdrop-blur-sm z-50 flex items-center justify-center",children:(0,s.jsx)("div",{className:"max-w-md w-full mx-4",children:(0,s.jsxs)("div",{className:"bg-white rounded-2xl shadow-2xl p-8",children:[(0,s.jsx)("div",{className:"flex justify-center mb-6",children:(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("div",{className:"animate-spin rounded-full h-16 w-16 border-b-4 border-[#FFD500]"}),(0,s.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,s.jsx)("div",{className:"h-10 w-10 bg-yellow-50 rounded-full"})})]})}),(0,s.jsxs)("div",{className:"text-center",children:["processing"===g&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Zahlung wird bearbeitet"}),(0,s.jsx)("p",{className:"text-gray-600 text-sm",children:"Bitte warten Sie, w\xe4hrend wir Ihre Zahlung best\xe4tigen..."})]}),"success"===g&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Zahlung erfolgreich!"}),(0,s.jsx)("p",{className:"text-gray-600 text-sm",children:"Ihr Daypass wird vorbereitet..."})]})]}),(0,s.jsx)("div",{className:"mt-6",children:(0,s.jsx)("div",{className:"h-1 w-full bg-gray-200 rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:"h-full bg-[#FFD500] rounded-full animate-pulse shadow-lg shadow-yellow-500/50"})})}),(0,s.jsx)("p",{className:"text-xs text-gray-500 text-center mt-4",children:"Bitte schlie\xdfen Sie dieses Fenster nicht"})]})})})]})},K=e=>{let{amount:t,onPaymentMethodSelect:a,onError:n,disabled:r=!1,className:o="",clientSecret:i,customerEmail:l,successLink:c}=e;return J?i?(0,s.jsx)(W,{children:(0,s.jsx)("div",{className:"w-full ".concat(o),children:(0,s.jsx)(O.Elements,{stripe:J,options:{clientSecret:i,appearance:{theme:"stripe",variables:{colorPrimary:"#0570de"}}},children:(0,s.jsx)(V,{amount:t,clientSecret:i,customerEmail:l||"",onPaymentMethodSelect:a,onError:n,successLink:c})})})}):(0,s.jsx)(W,{children:(0,s.jsx)("div",{className:"w-full ".concat(o),children:(0,s.jsx)("div",{className:"p-4 bg-gray-50 border border-gray-200 rounded-lg text-center",children:(0,s.jsx)("p",{className:"text-gray-600 text-sm",children:"Payment options will be available shortly..."})})})}):(0,s.jsx)(W,{children:(0,s.jsx)("div",{className:"w-full ".concat(o),children:(0,s.jsxs)("div",{className:"p-6 bg-red-50 border border-red-200 rounded-lg",children:[(0,s.jsx)("p",{className:"text-red-700 font-semibold mb-2",children:"â ï¸ Zahlungssystem nicht verf\xfcgbar"}),(0,s.jsx)("p",{className:"text-red-600 text-sm",children:"Stripe konnte nicht geladen werden. Bitte \xfcberpr\xfcfen Sie Ihre Internetverbindung und laden Sie die Seite neu."})]})})})},$=e=>
1{let{currentStep:t,setCurrentStep:a,formPaymentHeadline:r,isLoading:o,isMF:i,isJR:l,getAmountInCents:c,successLink:d}=e,u=(0,f.G9c)(),m=(0,w.useRouter)(),[g,p]=(0,n.useState)(null);return(0,n.useEffect)(()=>{if(2!==t)return;let e=x.DayPassSessionStorage.getPaymentIntent();if(e)return void p(e);(async()=>{try{let e=x.DayPassSessionStorage.getFormData().email;if(!e)return;let t=await fetch("/api/create-payment-intent",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paymentMethod:"express_checkout",customerEmail:e,studioId:"7633104410",websiteLocale:(0,f.ciB)(),pageUri:m.asPath.split("?")[0],locale:m.locale})});if(t.ok){let e=await t.json();e.clientSecret&&(p(e.clientSecret),x.DayPassSessionStorage.savePaymentIntent(e.clientSecret))}else await t.json()}catch(e){}})()},[t,m.asPath,m.locale]),(0,s.jsxs)("div",{className:"flex flex-col w-full",children:[(0,s.jsx)("div",{className:"\n flex gap-6 pb-[1.5rem] w-full transition-opacity duration-300\n ".concat(u?"border-klub-teal-500":i?"border-pink":"border-black","\n ").concat(1===t?"opacity-50":"opacity-100","\n "),role:"region","aria-label":"DayPass Step 2: Payment Methods",children:(0,s.jsx)(F,{currentStep:t,setCurrentStep:a,stepNumber:2,isMF:i,isJR:l,formHeadline:r,ariaLabel:"Change Payment Method"})}),(0,s.jsx)("div",{className:"\n pt-2 transition-all duration-1000 ease-in-out w-full\n ".concat(l&&"text-black font-open-sans font-normal","\n ").concat(2===t?"h-auto":"h-0 overflow-hidden","\n "),role:"tabpanel","aria-labelledby":"step-2-content",children:(0,s.jsx)("div",{className:"space-y-4",children:(0,s.jsx)(K,{amount:c(),onPaymentMethodSelect:async()=>{},onError:e=>{},disabled:o,clientSecret:g,customerEmail:x.DayPassSessionStorage.getFormData().email||"",successLink:d})})})]})},H=e=>{let{currentStep:t,setCurrentStep:a,isLoading:n,isMF:r,isJR:o,topline:i,toplineColor:l,headlineGroup:c,text:d,bottomLineBig:u,bottomLineSmall:m,priceTextGroup:g,formHeadline:p,formPaymentHeadline:y,checkboxAgb:h,checkboxMarketing:f,errorLegal:x,privacyText:S,getAmountInCents:b,handleFormSubmit:v,errorMessages:_,formData:w,formId:P,successLink:D}=e;return(0,s.jsxs)("div",{className:"daypass-module max-w-[464px] w-full lg:mx-auto flex flex-col gap-10 px-4 py-14 md:px-0 md:py-0",children:[(0,s.jsx)(j,{topline:i,toplineColor:l,headlineGroup:c,text:d,bottomLineBig:u,bottomLineSmall:m,priceTextGroup:g,isMF:r}),(0,s.jsx)(U,{currentStep:t,setCurrentStep:a,isLoading:n,isMF:r,isJR:o,formHeadline:p,checkboxAgb:h,checkboxMarketing:f,errorLegal:x,formId:P,errorMessages:_,formData:w,onSubmit:v}),(0,s.jsx)($,{currentStep:t,setCurrentStep:a,formPaymentHeadline:y,isLoading:n,isMF:r,isJR:o,getAmountInCents:b,successLink:D}),S&&(0,s.jsx)("div",{className:"text-sm text-gray-600",children:(0,s.jsx)(C.A,{content:S,hrefModal:!0,addClasses:"text-sm text-gray-600"})})]})},Z=e=>{var t,o,c,d,u,m,g;let{checkoutSettings:p,studioId:y,...h}=e,{isMF:S,isJR:b,showMessage:C,isStudioPage:k}=(0,n.useContext)(r._0),{currentStudio:j}=(0,n.useContext)(r.os),{locale:I,isPreview:N}=(0,f.FW4)(),A=(0,w.useRouter)(),E=(0,f.G9c)(),q=!((0,f.PaP)()&&!(0,f.AsB)())&&(E||(0,f.AsB)()),[T,M]=(0,n.useState)(1),[L,F]=(0,n.useState)(!1),[R,B]=(0,n.useState)(!1),[U,O]=(0,n.useState)(!1),[Q,z]=(0,n.useState)({}),W=(0,n.useRef)(!0),G=(0,n.useRef)(null);(0,n.useEffect)(()=>{if(1===T){let{DayPassSessionStorage:e}=a(92572);e.clearPaymentIntent()}},[T]),(0,n.useEffect)(()=>()=>{let{DayPassSessionStorage:e}=a(92572);e.clearAll(),console.log("\uD83E\uDDF9 [DayPass] All session storage cleared on page leave")},[]),(0,n.useEffect)(()=>{window.clearDayPassData=()=>{let{DayPassSessionStorage:e}=a(92572);e.clearAll()}},[]),(0,n.useEffect)(()=>{let e=async()=>{try{let{DayPassSessionStorage:e}=await Promise.resolve().then(a.bind(a,92572)),t=e.getPaymentIntent();if(!t)return;let s=t.split("_secret_")[0];if(s&&s.startsWith("pi_")){let a=sessionStorage.getItem("daypass_payment_intent_created_at"),s=Date.now()-18e5;if(a&&parseInt(a)<s){let a=await fetch("/api/cancel-payment-intent",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientSecret:t})});if(a.ok)await a.json(),e.clearPaymentIntent();else{let e=a.headers.get("content-type");if(!e||!e.includes("application/json")){let e=await a.text();throw Error("Cancel API error returned non-JSON response: ".concat(e.substring(0,200))
1)}}}}}catch(e){throw Error("Error cleaning up abandoned payment intent: ".concat(e))}},t=()=>{e()},s=setInterval(e,6e5);return window.addEventListener("beforeunload",t),()=>{clearInterval(s),window.removeEventListener("beforeunload",t),e()}},[]);let J=(0,f.zFC)(),{data:V,isLoading:K}=(0,_.a)(J,{locale:(0,f.vrW)(I)},{refetchOnWindowFocus:N,refetchOnMount:N,refetchOnReconnect:!1,staleTime:N?60:36e5,enabled:!p}),$=k?A.query.studioSlug:void 0,Z=k&&$&&!y,{data:Y}=(0,D.Hv)(J,{},{enabled:Z,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1}),X=Z?null==Y||null==(o=Y.studios)||null==(t=o.nodes)?void 0:t.find(e=>e.slug===$&&e.language.code===(0,f.vrW)(I)):null,ee=(null==X?void 0:X.databaseId.toString())||"0",{data:et}=(0,P.Bl)(J,{id:ee,locale:(0,f.vrW)(I)},{enabled:Z&&"0"!==ee,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1}),ea=p||(null==V?void 0:V.checkoutSettingsV2),es=y||(null==et||null==(u=et.studio)||null==(d=u.translation)||null==(c=d.customStudioSettings)?void 0:c.mlStudioID)||"7633104410",en=(0,n.useId)(),er=(0,n.useMemo)(()=>"daypass-form-".concat(en.replace(/:/g,"")),[en]),{headlineGroup:eo,topline:ei,toplineColor:el,text:ec,bottomLineBig:ed,bottomLineSmall:eu,formHeadline:em,formPaymentHeadline:eg,checkboxAgb:ep,checkboxMarketing:ey,image:eh,imageAlt:ef,jumpmarkLabel:ex,errorLegal:eS,privacyText:eb,priceTextGroup:ev,successLink:e_}=h||{},ew=q?(0,f.ujV)(e_):(0,f.wz_)(e_),eP=null==ea||null==(m=ea.customCheckoutV2Acf)?void 0:m.errorMessages,eD=null==ea||null==(g=ea.customCheckoutV2Acf)?void 0:g.form,eC=(0,n.useMemo)(()=>(0,f.CQV)(null==ev?void 0:ev.price),[null==ev?void 0:ev.price]),ek=(0,n.useCallback)(()=>eC,[eC]);(0,n.useCallback)((e,t)=>{let a=e.get("transaction_id")||e.get("payment_intent"),s=e.get("payment_method"),n=e.get("original_payment_method")||s,r=x.DayPassSessionStorage.getTransactionId(),o=x.DayPassSessionStorage.getUuid(),i=e.get("uuid")||void 0,l=x.DayPassSessionStorage.getQrCodeUrl(),c=e.get("qr_code_url")||void 0,d=x.DayPassSessionStorage.getQrCodeIdentifier(),u=e.get("qr_code_identifier")||void 0,m=x.DayPassSessionStorage.getDoorsecureDaypassId(),g=e.get("doorsecure_daypass_id")||void 0,p=m||g;return{transactionId:r||a||void 0,email:t.email||"",brand:"mcfit",paymentMethod:s,originalPaymentMethod:n,amount:e.get("amount")||(ek()/100).toFixed(2),currency:e.get("currency")||"EUR",customerFirstName:e.get("customer_first_name")||void 0,customerLastName:e.get("customer_last_name")||void 0,doorsecureData:p?{daypassId:p,accessCode:e.get("doorsecure_access_code"),validFrom:e.get("doorsecure_valid_from"),validUntil:e.get("doorsecure_valid_until")}:void 0,qrCodeUrl:l||c||void 0,qrCodeIdentifier:d||u||void 0,qrCodeBase64:e.get("qr_code_base64")||void 0,uuid:o||i||void 0}},[ek,es]),(0,n.useEffect)(()=>()=>{W.current=!1,G.current&&clearTimeout(G.current)},[]),(0,n.useEffect)(()=>{sessionStorage.getItem("daypass_initiation_sent")||(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"daypass_purchase_initiated",payment_method:"pending",page_type:"daypass_landing"}),sessionStorage.setItem("daypass_initiation_sent","true"))},[]);let ej=async e=>{if(!e.email||!e.termsAccepted)throw Error("Form validation failed - missing email or terms");F(!0);try{let t={email:e.email,termsAccepted:e.termsAccepted,marketingOptIn:e.marketingOptIn||!1},{DayPassSessionStorage:s}=await Promise.resolve().then(a.bind(a,92572));s.saveFormData(t);let n=(null==j?void 0:j.id)!=null&&String(j.id)===String(es);s.saveStudio({id:es,...n&&j?{studioName:j.studioName,address:j.address}:{}}),sessionStorage.setItem("marketingOptIn",(e.marketingOptIn||!1).toString());let r={paymentMethod:"express_checkout",customerEmail:e.email,studioId:es,marketingOptIn:e.marketingOptIn||!1,websiteLocale:(0,f.ciB)(),pageUri:A.asPath.split("?")[0],locale:I},o=await fetch("/api/create-payment-intent",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(o.ok){let e=o.headers.get("content-type");if(!e||!e.includes("application/json")){let e=await o.text();throw Error("API returned non-JSON response: ".concat(e.substring(0,200))
1)}let t=await o.json();if(t.clientSecret)s.savePaymentIntent(t.clientSecret,A.asPath.split("?")[0]);else throw Error("No client secret in response!")}else{let e=o.headers.get("content-type");if(!e||!e.includes("application/json")){let e=await o.text();throw Error("API error returned non-JSON response: ".concat(e.substring(0,200)))}let t=await o.json();throw Error("Failed to create Payment Intent: ".concat(JSON.stringify(t)))}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"daypass_payment_step_reached",payment_method:"pending",step:"form_completed"}),M(2)}catch(e){throw Error("Error processing form submission: ".concat(e))}finally{F(!1)}};return(0,n.useEffect)(()=>{console.log("\uD83D\uDD0D [DayPass] Checking URL for success parameters...");let e=new URLSearchParams(window.location.search),t="true"===e.get("success"),a=e.get("transaction_id")||e.get("payment_intent"),s="true"===e.get("return_from_payment"),n=e.get("payment_intent_client_secret");if(console.log("\uD83D\uDCCA [DayPass] URL check - success: ".concat(t)),a&&n&&!t&&1===T){var r;console.log("\uD83D\uDD04 [DayPass] Detected return from PayPal/redirect payment - advancing to step 2 to process"),(null==(r=x.DayPassSessionStorage.getFormData())?void 0:r.email)&&console.log("â
[DayPass] Session data found, advancing to payment step"),M(2);return}if((t||s)&&a){console.log("â
[DayPass] Success detected in URL, redirecting to success page");let e=new URL(window.location.href),t=new URL(ew,window.location.origin);e.searchParams.forEach((e,a)=>{t.searchParams.set(a,e)}),t.searchParams.set("success","true"),window.location.href=t.toString();return}s&&(console.log("â³ [DayPass] Returned from payment provider, checking status..."),O(!0),setTimeout(()=>{window.location.reload()},2e3))},[T,ew]),(0,s.jsx)(s.Fragment,{children:R?(0,s.jsx)(v,{...Q}):h?(0,s.jsx)(l,{children:(0,s.jsxs)("div",{className:"w-full max-w-full lg:flex lg:items-stretch",children:[(0,s.jsx)("div",{className:"daypass-content-container w-full flex-shrink-0",children:(0,s.jsx)("div",{className:"flex py-[84px] justify-center items-start",children:(0,s.jsx)(H,{currentStep:T,setCurrentStep:M,isLoading:L,isMF:S,isJR:b,topline:ei,toplineColor:el,headlineGroup:eo,text:ec,bottomLineBig:ed,bottomLineSmall:eu,priceTextGroup:ev,formHeadline:em,formPaymentHeadline:eg,checkboxAgb:ep,checkboxMarketing:ey,errorLegal:eS,privacyText:eb,getAmountInCents:ek,handleFormSubmit:ej,errorMessages:eP,formData:eD,formId:er,successLink:ew})})}),(0,s.jsx)(i,{isMF:S,image:eh,imageAlt:ef})]})}):null})}},22426:(e,t,a)=>{a.d(t,{b:()=>o});var s=a(60072),n=a(60004),r=a(10983);let o=e=>{let{children:t,inView:a,disabled:o=!1,delayRevealFactor:i=1,persistAfterFirstInView:l=!0}
1=e,c=(0,r.useRouter)(),[d,u]=(0,n.useState)(!1),[m,g]=(0,n.useState)(!1);(0,n.useEffect)(()=>{l&&a&&g(!0)},[a,l]),(0,n.useEffect)(()=>{let e=window.location.pathname,t=c.locale,a=(a,s)=>{let{shallow:n}=s;n||(new URL(a,window.location.origin).pathname.split("/")[1]!==t||a!==e)&&(u(!1),g(!1),setTimeout(()=>u(!0),100))},s=()=>{setTimeout(()=>u(!0),250)};return c.events.on("beforeHistoryChange",a),c.events.on("routeChangeComplete",s),u(!0),()=>{c.events.off("beforeHistoryChange",a),c.events.off("routeChangeComplete",s)}},[c.locale,c.asPath,c.events]);let p=!o&&d&&(l?!!a||m:!!a);return(0,s.jsx)("div",{className:"\n relative\n w-full\n h-full\n ".concat(!o?"overflow-hidden":"","\n transition-all\n ease-in-out\n ").concat(p?"duration-700":"","\n imagereveal\n "),style:o?{}:{clipPath:p?"polygon(0% 0%,100% 0%,100% 100%,0% 100%)":"polygon(0% 100%,100% 100%,100% 100%, 0% 100%)",willChange:"clip-path"},children:(0,s.jsx)("div",{className:"relative w-full h-full transition-all ease-in-out duration-700",style:o?{}:{transform:p?"scale(1)":"scale(1.1)",willChange:"transform"},children:t})})}},30142:(e,t,a)=>{a.d(t,{q9:()=>n,z$:()=>s});let s=async(e,t,a)=>{try{return await e()}catch(e){throw Error("".concat(a,": ").concat(e))}},n=(e,t)=>e?t?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)?{isValid:!0,error:null}:{isValid:!1,error:"Invalid email format"}:{isValid:!1,error:"Missing customer email"}:{isValid:!1,error:"Missing transaction ID"}},37177:(e,t,a)=>{a.d(t,{y:()=>s});let s="\n fragment Seo on PostTypeSEO {\n twitterTitle\n twitterDescription\n title\n readingTime\n opengraphUrl\n opengraphType\n opengraphTitle\n opengraphSiteName\n opengraphPublisher\n opengraphPublishedTime\n opengraphModifiedTime\n opengraphDescription\n opengraphAuthor\n metaRobotsNoindex\n metaRobotsNofollow\n metaKeywords\n metaDesc\n fullHead\n focuskw\n cornerstone\n canonical\n breadcrumbs {\n text\n url\n }\n}\n "},53307:(e,t,a)=>{function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"daypass-qr-code.png";a.e(1507).then(a.t.bind(a,18200,23)).then(a=>{let{default:s}=a;s(e,{backgroundColor:"#ffffff",scale:2,useCORS:!0,allowTaint:!0}).then(e=>{let a=document.createElement("a");a.download=t,a.href=e.toDataURL("image/png"),a.click()})})}function n(e){return e}a.d(t,{Ct:()=>s,QU:()=>n})},70729:(e,t,a)=>{a.d(t,{Hv:()=>l});var s=a(35447);function n(e,t,a,s){return async()=>e.request({document:t,variables:a,requestHeaders:s})}let r="\n query StudioPages($cursor: String, $locale: LanguageCodeFilterEnum!, $stati: [PostStatusEnum]) {\n studios(first: 10, after: $cursor, where: {language: $locale, stati: $stati}) {\n nodes {\n databaseId\n slug\n customStudioSettings {\n mlStudioID\n }\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n}\n ",o=(e,t,a,o)=>(0,s.I)({queryKey:["StudioPages",t],queryFn:n(e,r,t,o),...a});o.document=r,o.getKey=e=>["StudioPages",e];let i="\n query AllStudioPages {\n studios(first: 9999) {\n nodes {\n databaseId\n slug\n language {\n code\n }\n }\n }\n}\n ",l=(e,t,a,r)=>(0,s.I)({queryKey:void 0===t?["AllStudioPages"]:["AllStudioPages",t],queryFn:n(e,i,t,r),...a});l.document=i,l.getKey=e=>void 0===e?["AllStudioPages"]:["AllStudioPages",e]},76038:(e,t,a)=>{a.d(t,{M:()=>n});var s=a(92572);function n(e){var t;let a=s.DayPassSessionStorage.getFormData(),n=s.DayPassSessionStorage.getStudio(),r=e||a.email||"",o=(null==n?void 0:n.id)?{id:n.id,studioName:n.studioName,address:n.address}:void 0;return{email:r,phone:"",marketing:null!=(t=a.marketingOptIn)&&t,organizationUnitId:null==n?void 0:n.id,selectedStudio:o}}},80230:(e,t,a)=>{a.d(t,{A:()=>c});var s=a(60072),n=a(60004),r=a(84477),o=a(4493),i=a(22426),l=a(94122);let c=e=>{let{src:t="",alt:a,divider:c,addClasses:d="",isContain:u,reveal:m=!0,delayRevealFactor:g=1,onLoad:p,ar:y,isPortrait:h=!1,deviceDpr:f,enhanceCloudinary:x,minWidth:S,quality:b,eager:v=!1}=e,{initStageAnimation2:_,isMF:w,isMobile:P}=n.useContext(l._0),[D,C]=n.useState(v),[k,j]=n.useState(!1),[I,N]=n.useState(!1),[A,E]=n.useState(!t),{ref:q,inView:T}=(0,r.Wx)({threshold:0,skip:v}),{ref:M}
1=(0,r.Wx)({threshold:w||P?0:.4}),{src:L,onError:F,isFallback:R}=(0,o.jKV)(A?"":t,!!h),B=(0,o.Ciy)({url:L,divider:c,aspectRatio:y,deviceDpr:f,enhance:x,minWidth:S,quality:b})||(R&&L?L:"");function U(){D&&!A&&(B||!L||R)&&(E(!0),F(),N(!1))}return n.useEffect(()=>{E(!t),N(!1)},[t]),n.useEffect(()=>{I&&(_||R)&&j(!0)},[_,I,R]),n.useEffect(()=>{(v||T)&&C(!0)},[v,T]),(0,s.jsx)("div",{ref:q,className:"h-full",children:(0,s.jsx)("div",{ref:M,className:"h-full",children:(0,s.jsx)(i.b,{inView:k,delayRevealFactor:g,disabled:!m,children:(0,s.jsx)("div",{className:"w-full h-full",children:(0,s.jsx)("picture",{className:"w-full h-full",children:D&&B?(0,s.jsx)("img",{className:"\n ".concat(u?"object-contain":"object-cover"," \n h-full\n w-full\n ").concat(d,"\n "),src:B,alt:a,onLoad:function(e){if(!e.currentTarget.naturalWidth)return void U();N(!0),p&&p()},onError:U},L||"empty"):null})})})})})}},85292:(e,t,a)=>{a.d(t,{If:()=>i,Sh:()=>c,Sp:()=>l});var s=a(60072),n=a(60004),r=a(94122);let o=(0,n.createContext)(null),i=()=>{let e=(0,n.useContext)(o),t=(0,n.useContext)(r._0),a=(null==t?void 0:t.isMF)||!1,s=(null==t?void 0:t.isGG)||!1;return e||{borderStyle:a?"border-ci-color":"border-black",checkedStyle:a?"bg-ci-color":"bg-black",textStyle:a?"text-ci-color":"text-black",fontFamily:a?"font-montserrat":s?"font-sofia-sans":"font-open-sans"}},l=e=>{let{children:t}=e,a=(0,n.useContext)(r._0),i=(null==a?void 0:a.isMF)||!1,l=(null==a?void 0:a.isGG)||!1;return(0,s.jsx)(o.Provider,{value:{borderStyle:i?"border-ci-color":"border-black",checkedStyle:i?"bg-ci-color":"bg-black",textStyle:i?"text-ci-color":"text-black",fontFamily:i?"font-montserrat":l?"font-sofia-sans":"font-open-sans"},children:t})};function c(e,t){var a,s;return!!(null==e||null==(a=e.fields)?void 0:a[t])&&!!(null==(s=e.fields[t].exclusiveTests)?void 0:s.required)}},89894:(e,t,a)=>{a.d(t,{h:()=>n});var s=a(69621);let n="\n fragment PageSettings on CustomPageSettings {\n metaDescription\n ogDescription\n ogTitle\n title\n noIndex\n hideCookieBanner\n useCampaignTheme\n hideFooter\n hideMetaNavigation\n countdownBanner {\n node {\n __typename\n ...CountdownBanner\n }\n }\n countdownBanner2 {\n node {\n __typename\n ...CountdownBanner\n }\n }\n smartBanner {\n nodes {\n __typename\n ... on SmartBanner {\n databaseId\n }\n }\n }\n}\n ".concat(s.M)},92572:(e,t,a)=>{a.r(t),a.d(t,{DayPassSessionStorage:()=>s});let s={saveFormData:e=>{sessionStorage.setItem("daypass_form_data",JSON.stringify(e))},saveStudio:e=>{sessionStorage.setItem("daypass_studio",JSON.stringify(e))},getStudio:()=>{{let e=sessionStorage.getItem("daypass_studio");if(!e)return null;try{return JSON.parse(e)}catch(e){return null}}},clearStudio:()=>{sessionStorage.removeItem("daypass_studio")},getFormData:()=>{{let e=sessionStorage.getItem("daypass_form_data");return e?JSON.parse(e):{}}},clearFormData:()=>{sessionStorage.removeItem("daypass_form_data")},updateField:(e,t)=>{let a={...s.getFormData(),[e]:t};return s.saveFormData(a),a},getField:e=>s.getFormData()[e],savePaymentIntent:(e,t)=>{{sessionStorage.setItem("daypass_payment_intent",e),sessionStorage.setItem("daypass_payment_intent_created_at",Date.now().toString());let a=t||window.location.pathname;sessionStorage.setItem("daypass_redirect_path",a)}},getPaymentIntent:()=>sessionStorage.getItem("daypass_payment_intent"),clearPaymentIntent:()=>{sessionStorage.removeItem("daypass_payment_intent"),sessionStorage.removeItem("daypass_redirect_path")},getRedirectPath:()=>sessionStorage.getItem("daypass_redirect_path"),saveCustomerNames:(e,t)=>{sessionStorage.setItem("daypass_customer_names",JSON.stringify({firstName:e,lastName:t}))},getCustomerNames:()=>{{let e=sessionStorage.getItem("daypass_customer_names");return e?JSON.parse(e):{}}},clearCustomerNames:()=>{sessionStorage.removeItem("daypass_customer_names")}
1,saveAccessCode:e=>{sessionStorage.setItem("daypass_access_code",e),console.log("â
[DayPassSessionStorage] Access code saved securely")},getAccessCode:()=>sessionStorage.getItem("daypass_access_code"),clearAccessCode:()=>{sessionStorage.removeItem("daypass_access_code"),console.log("\uD83E\uDDF9 [DayPassSessionStorage] Access code cleared")},saveDetailsAccessToken:e=>{sessionStorage.setItem("daypass_details_access_token",e)},getDetailsAccessToken:()=>sessionStorage.getItem("daypass_details_access_token"),clearDetailsAccessToken:()=>{sessionStorage.removeItem("daypass_details_access_token")},clearAll:()=>{{sessionStorage.removeItem("daypass_form_data"),sessionStorage.removeItem("daypass_payment_intent"),sessionStorage.removeItem("daypass_payment_intent_created_at"),sessionStorage.removeItem("daypass_customer_names"),sessionStorage.removeItem("daypass_redirect_path"),sessionStorage.removeItem("daypass_access_code"),sessionStorage.removeItem("daypass_details_access_token"),sessionStorage.removeItem("daypass_initiation_sent"),sessionStorage.removeItem("daypass_uuid"),sessionStorage.removeItem("daypass_qr_code_url"),sessionStorage.removeItem("daypass_transaction_id"),sessionStorage.removeItem("daypass_doorsecure_daypass_id"),sessionStorage.removeItem("daypass_qr_code_identifier"),sessionStorage.removeItem("daypass_studio");let e=[];for(let t=0;t<sessionStorage.length;t++){let a=sessionStorage.key(t);a&&a.startsWith("daypass_")&&e.push(a)}e.forEach(e=>sessionStorage.removeItem(e)),console.log("\uD83E\uDDF9 [DayPassSessionStorage] Cleared ".concat(e.length," session storage items"))}},isAvailable:()=>{try{let e="__daypass_test__";return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(e){return console.warn("â ï¸ [DayPass] Session storage is not available:",e),!1}},markPaymentCompleted:e=>{sessionStorage.setItem("daypass_completed_".concat(e),"true"),sessionStorage.setItem("daypass_completed_at_".concat(e),Date.now().toString())},isPaymentCompleted:e=>"true"===sessionStorage.getItem("daypass_completed_".concat(e)),saveUuid:e=>{sessionStorage.setItem("daypass_uuid",e)},getUuid:()=>sessionStorage.getItem("daypass_uuid"),clearUuid:()=>{sessionStorage.removeItem("daypass_uuid")},saveQrCodeUrl:e=>{sessionStorage.setItem("daypass_qr_code_url",e)},getQrCodeUrl:()=>sessionStorage.getItem("daypass_qr_code_url"),clearQrCodeUrl:()=>{sessionStorage.removeItem("daypass_qr_code_url")},saveTransactionId:e=>{sessionStorage.setItem("daypass_transaction_id",e)},getTransactionId:()=>sessionStorage.getItem("daypass_transaction_id"),clearTransactionId:()=>{sessionStorage.removeItem("daypass_transaction_id")},saveDoorsecureDaypassId:e=>{sessionStorage.setItem("daypass_doorsecure_daypass_id",e)},getDoorsecureDaypassId:()=>sessionStorage.getItem("daypass_doorsecure_daypass_id"),clearDoorsecureDaypassId:()=>{sessionStorage.removeItem("daypass_doorsecure_daypass_id")},saveQrCodeIdentifier:e=>{sessionStorage.setItem("daypass_qr_code_identifier",e)},getQrCodeIdentifier:()=>sessionStorage.getItem("daypass_qr_code_identifier"),clearQrCodeIdentifier:()=>{sessionStorage.removeItem("daypass_qr_code_identifier")}}},96792:(e,t,a)=>{a.d(t,{gT:()=>r,rl:()=>n,tK:()=>s});let s=()=>{let e=new URLSearchParams(window.location.search);return{daypassId:e.get("doorsecure_daypass_id"),customerEmail:e.get("customer_email"),qrCodeUrl:e.get("qr_code_url"),qrCodeIdentifier:e.get("qr_code_identifier"),transactionId:e.get("transaction_id")||e.get("payment_intent"),paymentMethod:e.get("payment_method"),amount:e.get("amount"),currency:e.get("currency"),uuid:e.get("uuid"),qrCodeImage:e.get("qr_code_image"),qrCodeFormat:e.get("qr_code_format"),qrCodeSize:e.get("qr_code_size"),qrCodeError:"true"===e.get("qr_code_error")||"false"!==e.get("qr_code_error")&&null,qrCodeImageFailed:"true"===e.get("qr_code_image_failed")||"false"!==e.get("qr_code_image_failed")&&null,isGeneratingQR:"true"===e.get("is_generating_qr")||"false"!==e.get("is_generating_qr")&&null,doorsecureData:e.get("doorsecure_data"),doorsecureError:e.get("doorsecure_error")}},n=async e=>{if(e)return e;try{let{DayPassSessionStorage:e}=await Promise.resolve().then(a.bind(a,92572));return e.getFormData().email||""}catch(e){throw Error("Error getting session data: ".concat(e))}},r=(e,t)=>{if("stripe"!==t&&"paypal"!==t)return null;let{daypassId:a,qrCodeIdentifier:s,qrCodeImage:n}=e;return a?{daypassId:a,qr_code_identifier:s||void 0,qr_code_image:n||void 0}:null}}}]);
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.