1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];if(null!=a)for(var r in a)a.hasOwnProperty(r)&&(e[r]=a[r])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{"_sentryBundlerPluginAppKey:kombo-app":!0})}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5307],{64:(e,t,a)=>{"use strict";a.d(t,{Rd:()=>l,be:()=>i,i3:()=>s});var r=a(17343),n=a(59809);let i=async(e,t,a)=>{let i=e.filter(e=>{var t;return!(null==(t=e.discountCards)?void 0:t.map(e=>!e.cardNumber&&(0,r.isCardNumberRequired)(e.cardType.id)))});if(e.every(e=>{var t;return!(null==(t=e.discountCards)?void 0:t.length)||0===e.discountCards.length}))return{isValid:!0,checkedPassengers:e,missingDiscountCardPassengers:i};if(t)for(let a of e){var l;a.discountCards=null==(l=a.discountCards)?void 0:l.map(e=>((0,r.isCardNumberRequired)(e.cardType.id)&&e.cardNumber&&(e.cardType={...e.cardType||{},providerId:t}),e)).filter(Boolean)}let s=(null==a?void 0:a.length)?a.flatMap(e=>e.subTrips.flatMap(e=>e.segments.flatMap(e=>e.departureTime))):void 0,{passengers:o}=await n._.checkDiscountCard({passengers:e,departureTimes:s});return{isValid:o.every(e=>{var t;return null==(t=e.discountCards)?void 0:t.every(e=>e.isValid)}),checkedPassengers:o,missingDiscountCardPassengers:i}},l=e=>e===r.DiscountCardValidationError.ExpiredButCanBeRenewed?"EXPIRED_RENEWABLE_DISCOUNT_CARD":e===r.DiscountCardValidationError.Expired?"EXPIRED_NOT_RENEWABLE_DISCOUNT_CARD":e===r.DiscountCardValidationError.TripNotElegible?"DISCOUNT_CARD_NOT_ACTIVE":e===r.DiscountCardValidationError.SncfBirthdateMissing?"SNCF_DISCOUNT_CARD_BIRTHDATE_MISSING":(e===r.DiscountCardValidationError.InvalidCard||r.DiscountCardValidationError.Unknown,"INVALID_DISCOUNT_CARD_NUMBER"),s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a={};return e.forEach((e,n)=>{var i;let s={};t.some(t=>(0,r.isNotInputPassenger)(e)&&(0,r.isNotInputPassenger)(t)&&t.id===e.id)&&(s[0]="REDUCTION_NUMBER_REMINDER"),null==(i=e.discountCards)||i.forEach((e,t)=>{if(e.isValid)return;let a=l(e.error);s[t]=a}),Object.keys(s).length&&(a[n]=s)}),a}},554:(e,t,a)=>{"use strict";a.d(t,{S:()=>d});var r=a(52840),n=a(88726),i=a(17836),l=a(65708),s=a(53239),o=a(56267);let d=()=>{let{authStatus:e}=(0,r.As)(),t=(0,l.useRouter)(),a=(0,o.Y)();(0,s.useEffect)(()=>{(0,n._s)(e)&&t.push("/".concat(a,"/account/login").concat((0,i.m7)(window.location.pathname,window.location.search)))},[e,a,t])}},6372:()=>{},9613:e=>{e.exports={"back-arrow":"styles_back-arrow__KrXYd"}},19143:(e,t,a)=>{"use strict";a.d(t,{L:()=>r.L});var r=a(92392)},19974:(e,t,a)=>{"use strict";a.d(t,{g:()=>c});var r=a(80263),n=a(77854),i=a(95217),l=a.n(i),s=a(97554),o=a.n(s);let d=l().bind(o()),c=e=>{let{role:t="banner",as:a,className:i,customPadding:l=!1,children:s}=e,o=d("header-form",i,l&&"no-padding");return(0,r.jsx)("div",{role:t,children:(0,r.jsx)("div",{className:o,children:(0,r.jsx)(n.E,{as:a,variant:"extraLarge",fontWeight:"bold",children:s})})})}},25654:(e,t,a)=>{"use strict";a.d(t,{O:()=>i});var r=a(80263),n=a(50698);let i=e=>{let{children:t}=e;return(0,n.y)(),(0,r.jsx)("div",{className:"bg-color-darker",children:t})}},26670:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var r=a(80263),n=a(29515),i=a(19974),l=a(59913),s=a(44250),o=a(17744);a(6372);let d=e=>{let{headingText:t,children:a,notificationPlace:d,fixedButtons:c,onBack:u,displayButtons:p=!0,hideButtonsOnMobile:x=!1}=e;return(0,r.jsx)("main",{id:"main-content",children:(0,r.jsx)("div",{className:"uwmg2w0",children:(0,r.jsx)(l.A,{children:(0,r.jsx)(s.G,{buttons:c,onBack:u,displayButtons:p,hideButtonsOnMobile:x,fullHeight:!0,children:(0,r.jsxs)(o.A,{children:[t&&(0,r.jsx)(i.g,{as:"h1",className:"uwmg2w1",children:t}),d&&(0,r.jsx)(n.A,{place:d}),a]})})})})})}},30990:(e,t,a)=>{"use strict";a.d(t,{I:()=>n.A,Z:()=>r.A});var r=a(93543),n=a(59606)},36195:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var r=a(80263),n=a(25164),i=a(95217),l=a.n(i),s=a(9613),o=a.n(s);let d=l().bind(o()),c=e=>{let{onBack:t}=e;return t?(0,r.jsx)("button",{onClick:t,className:d("back-arrow"),children:(0,r.jsx)(n.I,{icon:"backArrow",height:"revert-layer",width:"revert-layer"})}):null}},38245:e=>{e.exports={"passenger-info":"PassengerCard_passenger-info__awCTa","no-padding":"PassengerCard_no-padding__WPQut","identity-card":"PassengerCard_identity-card__OXGUV"}},44250:(e,t,a)=>{"use strict";a.d(t,{G:()=>A});var r=a(80263),n=a(95217),i=a.n(n),l=a(36195),s=a(69312),o=a.n(s);let d=i().bind(o()),c=e=>{let{children:t}=e;return(0,r.jsx)("div",{className:d("fixed-buttons-content"),children:t})};var u=a(60829),p=a(53239);let x=i().bind(o()),m=e=>{let{children:t,fullHeight:a}=e,[n,i]=(0,p.useState)(!1);return(0,p.useEffect)(()=>{i(!!document.getElementById("bottom-nav-bar"))},[]),(0,r.jsx)("div",{className:x("fixed-buttons-flex",{"with-bottom-nav":n,"full-height":a}),children:t})};var h=a(36775),f=a(94638),y=a(83506),C=a(34120),_=a(44915),g=a(57569),j=a.n(g);let E=i().bind(j()),N=e=>{let{companies:t}=e,{t:a}=(0,f.B)([_.NS.Common]),n=(0,C.L0)();return(0,r.jsxs)(h.a,{d:"flex",alignItems:"center",justifyContent:"space-between",marginTop:"16px",children:[(null==t?void 0:t.length)?(0,r.jsxs)("div",{className:E("reassurance-payment-companies"),children:[(0,r.jsx)(h.a,{fontSize:{mobile:"11px",tablet:"13px"},color:"textPrimary",fontWeight:"semibold",marginLeft:"4px",whiteSpace:"nowrap",children:a("AUTHORIZED_AGENCY")}),(0,r.jsx)(h.a,{d:"flex",alignItems:"center",gap:"8px",marginLeft:"8px",children:t.slice(0,n?1:t.length).map(e=>(0,r.jsx)(y.v,{displayName:e.displayName,logoName:e.logoName},e.id))})]}):(0,r.jsxs)(h.a,{d:"flex",alignItems:"center",children:[(0,r.jsx)(h.I,{icon:"lock",height:"12px",width:"12px"}),(0,r.jsx)(h.a,{fontSize:{mobile:"11px",tablet:"13px"},color:"textPrimary",fontWeight:"semibold",marginLeft:"4px",children:a("LOLLAPALOOZA_REASSURANCE")})]}),(0,r.jsxs)(h.a,{d:"flex",alignItems:"center",gap:"4px",children:[(0,r.jsx)(h.I,{icon:"trustRating",width:"68px",height:"16px"}),(0,r.jsx)(h.a,{fontSize:{mobile:"11px",tablet:"13px"},color:"textPrimary",fontWeight:"semibold",whiteSpace:"nowrap",children:a("LOLLAPALOOZA_REASSURANCE_TRUSTPILOT")})]})]})},b=i().bind(o()),v=e=>{let{buttons:t,onBack:a,children:n,displayButtons:i,displayBackArrow:s,isSticky:o=!0,displayReassurancePayment:d=!1,buttonInTickets:p,hideButtonsOnMobile:x=!1,companies:h,fullHeight:f=!1}=e,y=(0,u.M)();return y?(0,r.jsxs)(m,{fullHeight:f,children:[(0,r.jsxs)(c,{children:[n,a&&s&&(0,r.jsx)(l.A,{onBack:a})]}),(0,r.jsxs)("div",{className:b("fixed-buttons-wrapper",o?"":"notSticky",x?"hideButtonsOnMobile":""),children:[!p&&i&&t&&(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:b("fixed-buttons-wrapper-inner"),children:[t,d&&(0,r.jsx)("div",{className:b("reassurance-payment-container"),children:(0,r.jsx)(N,{companies:h})})]})}),(0,r.jsx)("div",{ref:y,className:b("fixed-buttons-wrapper-inner")}),!t&&i&&d&&(0,r.jsx)(r.Fragment,{children:d&&(0,r.jsx)("div",{className:b("reassurance-payment-container-outside"),children:(0,r.jsx)(N,{companies:h})})})]})]}):null},A=e=>(0,r.jsx)(u.J,{children:(0,r.jsx)(v,{...e})})},48339:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var r=a(80263),n=a(95217),i=a.n(n),l=a(30990),s=a(38245),o=a.n(s);let d=i().bind(o()),c=()=>(0,r.jsx)(l.Z,{children:Array.from({length:3}).map((e,t)=>(0,r.jsx)("div",{className:d("passenger-info"),children:(0,r.jsxs)("div",{className:d("info"),children:[(0,r.jsx)(l.I,{width:60,style:{marginTop:10}}),(0,r.jsx)(l.I,{width:120,style:{marginTop:10}})]})},t))})},48610:(e,t,a)=>{"use strict";a.d(t,{A:()=>y});var r=a(80263),n=a(95217),i=a.n(n),l=a(74770),s=a(94638),o=a(87913),d=a(68981),c=a(26019),u=a(44915),p=a(59116),x=a(97423),m=a.n(x),h=a(20286);let f=i().bind(m()),y=e=>{let{name:t,hideHeadings:a=!1,hideInfoText:n=!1}=e,{t:i}=(0,s.B)([u.NS.PassengerForm]),[,x]=(0,l.Mt)(t),[m,y]=(0,l.Mt)("".concat(t,".street")),[C,_]=(0,l.Mt)("".concat(t,".city")),[g,j]=(0,l.Mt)("".concat(t,".zipPostCode")),[E,N]=(0,l.Mt)("".concat(t,".country")),b="";return x.error&&("string"==typeof x.error?b=x.error:y.touched&&y.error?b="INCORRECT_STREET":_.touched&&_.error?b="INCORRECT_CITY":j.touched&&j.error?b="INCORRECT_ZIPPOSTCODE":N.touched&&N.error?b="INCORRECT_COUNTRY":x.touched&&x.error&&(b="INCORRECT_ADDRESS")),(0,r.jsx)(d.A,{headingIcon:(0,r.jsx)(c.A,{icon:"location",height:{mobile:"16px",desktop:"20px"},width:{mobile:"16px",desktop:"20px"}}),headingText:i("address"),hideHeadings:a,infoText:n?"":i("WHY_ADDRESS"),wrapperClass:f("journey","text-field-address","address"),children:(0,r.jsxs)(o.A,{d:"flex",flexDirection:"column",gap:"16px",children:[(0,r.jsx)(p.Ay,{...m,label:i("address"),type:"text",placeholder:i("PLACEHOLDER_ADDRESS"),autoComplete:"street-address"}),(0,r.jsx)(p.Ay,{...C,label:i("city"),type:"text",placeholder:i("PLACEHOLDER_CITY"),autoComplete:"address-level2"}),(0,r.jsx)(p.Ay,{...g,label:i("zipPostCode"),type:"text",placeholder:i("PLACEHOLDER_ZIPPOSTCODE"),autoComplete:"postal-code"}),(0,r.jsx)(h.A,{name:E.name}),(0,r.jsx)("div",{className:f("text-field-container"),children:b?(0,r.jsx)("div",{className:f("text-field","error"),children:i(b)}):""})]})})}},57569:e=>{e.exports={"reassurance-payment-companies":"styles_reassurance-payment-companies__WDSxG"}},59913:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var r=a(80263),n=a(45732),i=a(92979),l=a(77626);let s=e=>{let{children:t}=e,a={duration:.5,ease:[.43,.13,.23,.96]};return(0,r.jsx)(n.F,{features:i.l,children:(0,r.jsx)(l.m.div,{initial:"exit",animate:"enter",exit:"exit",children:(0,r.jsx)(l.m.div,{variants:{exit:{x:100,opacity:0,transition:a},enter:{x:0,opacity:1,transition:a}},children:(0,r.jsx)(l.m.div,{initial:"initial",animate:"enter",exit:"exit",children:t})})})})}},60829:(e,t,a)=>{"use strict";a.d(t,{J:()=>s,M:()=>l});var r=a(80263),n=a(53239);let i=(0,n.createContext)(null),l=()=>(0,n.useContext)(i),s=e=>{let{children:t}=e,a=(0,n.useRef)(null);return(0,r.jsx)(i.Provider,{value:a,children:t})}},69312:e=>{e.exports={"fixed-buttons-flex":"styles_fixed-buttons-flex__ifid9","full-height":"styles_full-height___EtcO","
1with-bottom-nav":"styles_with-bottom-nav__vx8Sl","fixed-buttons-content":"styles_fixed-buttons-content__QmNPV","fixed-buttons-wrapper":"styles_fixed-buttons-wrapper__ibKQ_","app-footer":"styles_app-footer__s2C3Y",notSticky:"styles_notSticky__G_3_j","fixed-buttons-wrapper-inner":"styles_fixed-buttons-wrapper-inner__mcfzz","paypal-button":"styles_paypal-button__6WzIm","paypal-button-shape-rect":"styles_paypal-button-shape-rect__JIXtc","reassurance-payment-container":"styles_reassurance-payment-container__iG_WQ",hideButtonsOnMobile:"styles_hideButtonsOnMobile__GZd28","reassurance-payment-container-outside":"styles_reassurance-payment-container-outside__2_TPk"}},82637:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/[locale]/account/profile/edit",function(){return a(83558)}])},83558:(e,t,a)=>{"use strict";a.r(t),a.d(t,{__N_SSG:()=>er,default:()=>en});var r=a(80263),n=a(44915),i=a(55514),l=a(69768),s=a(48719),o=a.n(s),d=a(19143),c=a(25654),u=a(17343),p=a(87913),x=a(98879),m=a(93543),h=a(90257),f=a(14073),y=a(84914),C=a(13609),_=a(74770),g=a(53239),j=a(94638),E=a(52840),N=a(38098),b=a(62034),v=a(35104),A=a(13213),S=a(59116),w=a(20286);let T={companyName:"",companyEmail:"",vatNumber:"",sncfCompanyCode:"",addressStreet:"",zipCode:"",city:"",country:{code:"",displayName:""}},I=e=>{let t={};return e.companyName.trim()||(t.companyName="required"),e.addressStreet.trim()||(t.addressStreet="required"),e.zipCode.trim()||(t.zipCode="required"),e.city.trim()||(t.city="required"),t},P=(0,g.forwardRef)((e,t)=>{let{t:a}=(0,j.B)([n.NS.PaymentForm,n.NS.PassengerForm]),{countries:i}=(0,N.o)(),{companyBillingProfile:l,refreshAuth:s}=(0,E.As)(),o=(0,g.useRef)(null),[d,c]=(0,g.useState)(!1),u=!!l||d,p=(0,g.useMemo)(()=>{var e,t,a,r,n,s,o,d;let c;return l?(c=l.country?i.find(e=>e.code===l.country):void 0,{companyName:null!=(e=l.companyName)?e:"",companyEmail:null!=(t=l.companyEmail)?t:"",vatNumber:null!=(a=l.vatNumber)?a:"",sncfCompanyCode:null!=(r=l.sncfCompanyCode)?r:"",addressStreet:null!=(n=l.addressStreet)?n:"",zipCode:null!=(s=l.zipCode)?s:"",city:null!=(o=l.city)?o:"",country:null!=c?c:{code:null!=(d=l.country)?d:"",displayName:""}}):T},[l,i]);(0,g.useImperativeHandle)(t,()=>({saveIfNeeded:async()=>{var e;if(!u)return{ok:!0};let t=o.current;if(!t)return{ok:!0};let a=await t.validateForm();if(Object.keys(a).length>0){let e=Object.keys(a).reduce((e,t)=>(e[t]=!0,e),{});return await t.setTouched(e,!1),{ok:!1}}let r=t.values;return(await b.Z.upsertCompanyBillingProfile({companyName:r.companyName,companyEmail:r.companyEmail||void 0,vatNumber:r.vatNumber||void 0,sncfCompanyCode:r.sncfCompanyCode||void 0,addressStreet:r.addressStreet,zipCode:r.zipCode,city:r.city,country:(null==(e=r.country)?void 0:e.code)||void 0})).success?(await s(),{ok:!0}):((0,v.v)(Error("[CompanyBillingProfile] upsert returned success=false")),{ok:!1})}}),[u,s]);let{mutate:x,isPending:m}=(0,C.n)({mutationKey:["deleteCompanyBillingProfile"],mutationFn:async()=>b.Z.deleteCompanyBillingProfile(),onSuccess:async()=>{var e;c(!1),null==(e=o.current)||e.resetForm({values:T}),await s()}}),h=a("FACULTATIVE",{defaultValue:"facultatif"});return(0,r.jsxs)(y.az,{d:"flex",flexDirection:"column",gap:"16px",marginTop:"16px",paddingBottom:"24px",children:[(0,r.jsxs)(y.az,{d:"flex",flexDirection:"column",gap:"4px",children:[(0,r.jsxs)(y.az,{d:"flex",gap:"8px",alignItems:"center",children:[(0,r.jsx)(y.In,{icon:"buildingBold",width:"20px",height:"20px",color:"textPrimary"}),(0,r.jsx)(y.EY,{as:"span",variant:"medium",fontWeight:"semibold",color:"textPrimary",children:a("COMPANY_SECTION_TITLE",{defaultValue:"Entreprise"})})]}),(0,r.jsxs)(y.az,{marginLeft:"28px",d:"flex",flexDirection:"column",gap:"8px",children:[(0,r.jsx)(y.EY,{as:"p",variant:"small",color:"grey3",children:a("COMPANY_SECTION_DESCRIPTION",{defaultValue:"Informations sur votre entreprise pour vos factures."})}),u?(0,r.jsx)(y.$n,{variant:"unstyled",onClick:()=>x(),isLoading:m,"aria-disabled":m,children:(0,r.jsxs)(y.az,{d:"flex",gap:"8px",alignItems:"center",children:[(0,r.jsx)(y.In,{icon:"blueCircleMinusSign",width:"16px",height:"16px"}),(0,r.jsx)(y.EY,{as:"span",variant:"small",fontWeight:"bold",color:m?"grey3":"primary",children:a("COMPANY_SECTION_REMOVE",{defaultValue:"Retirer une entreprise"})}),m&&(0,r.jsx)(y.XC,{color:"primary",size:"small"})]})}):(0,r.jsx)(y.$n,{variant:"unstyled",onClick:()=>c(!0),children:(0,r.jsxs)(y.az,{d:"flex",gap:"8px",alignItems:"center",children:[(0,r.jsx)(y.In,{icon:"blueCirclePlusSign",width:"16px",height:"16px"}),(0,r.jsx)(y.EY,{as:"span",variant:"small",fontWeight:"bold",color:"primary",children:a("COMPANY_SECTION_ADD",{defaultValue:"Ajouter une entreprise"})})]})})]})]}),u&&(0,r.jsx)(y.az,{marginLeft:{mobile:"none",desktop:"28px"},children:(0,r.jsx)(_.l1,{innerRef:o,initialValues:p,enableReinitialize:!0,validate:I,onSubmit:()=>void 0,children:(0,r.jsx)(_.lV,{children:(0,r.jsxs)(y.az,{d:"flex",flexDirection:"column",gap:"16px",children:[(0,r.jsx)(S.Ay,{type:"text",name:"companyName",label:a("COMPANY_NAME",{defaultValue:"Nom de la soci\xe9t\xe9"}),placeholder:a("COMPANY_NAME",{defaultValue:"Nom de la soci\xe9t\xe9"}),maxLength:200,autoComplete:"organization"}),(0,r.jsx)(A.A,{name:"companyEmail",label:"".concat(a("COMPANY_EMAIL",{defaultValue:"E-mail de la soci\xe9t\xe9"})," (").concat(h,")"),placeholder:a("COMPANY_EMAIL",{defaultValue:"E-mail de la soci\xe9t\xe9"})}),(0,r.jsx)(S.Ay,{type:"text",name:"vatNumber",label:"".concat(a("VAT_NUMBER")," (").concat(h,")"),placeholder:a("VAT_NUMBER"),maxLength:20}),(0,r.jsx)(S.Ay,{type:"text",name:"sncfCompanyCode",label:"".concat(a("SNCF_COMPANY_CODE",{defaultValue:"Code entreprise SNCF"})," (").concat(h,")"),placeholder:a("SNCF_COMPANY_CODE",{defaultValue:"Code entreprise SNCF"}),maxLength:20}),(0,r.jsx)(S.Ay,{type:"text",name:"addressStreet",label:a("ADDRESS",{defaultValue:"Adresse"}),placeholder:a("ADDRESS",{defaultValue:"Adresse"}),maxLength:200,autoComplete:"street-address"}),(0,r.jsxs)(y.az,{d:"flex",gap:"8px",children:[(0,r.jsx)(y.az,{flexGrow:1,flexShrink:1,minWidth:"0",children:(0,r.jsx)(S.Ay,{type:"text",name:"zipCode",label:a("ZIP_CODE",{defaultValue:"Code postal"}),placeholder:a("ZIP_CODE",{defaultValue:"Code postal"}),maxLength:20,autoComplete:"postal-code"})}),(0,r.jsx)(y.az,{flexGrow:1,flexShrink:1,minWidth:"0",children:(0,r.jsx)(S.Ay,{type:"text",name:"city",label:a("CITY",{defaultValue:"Ville"}),placeholder:a("CITY",{defaultValue:"Ville"}),maxLength:100,autoComplete:"address-level2"})})]}),(0,r.jsx)(w.A,{name:"country",label:a("COUNTRY",{defaultValue:"Pays"})})]})})})})]})});P.displayName="CompanyBillingProfileSection";var O=a(29515),R=a(55851),D=a(48610),V=a(15200),M=a(48339),k=a(68981),L=a(26019),B=a(6918),z=a(66140),U=a(92302);let Y=e=>{let{showSchoolVacations:t,setShowSchoolVacations:a,schoolVacationSelection:i,setSchoolVacationSelection:l}=e,{t:s}=(0,j.B)(n.NS.PassengerForm);return(0,r.jsxs)(p.A,{d:"flex",flexDirection:"column",gap:"16px",children:[(0,r.jsxs)(p.A,{d:"flex",alignItems:"center",justifyContent:"space-between",gap:"32px",children:[(0,r.jsx)(k.A,{headingText:s("SHOW_VACATIONS_IN_CALENDAR"),headingIcon:(0,r.jsx)(p.A,{d:"flex",alignSelf:"flex-start",children:(0,r.jsx)(L.A,{icon:"calendarFilled",height:{mobile:"16px",desktop:"20px"},width:{mobile:"16px",desktop:"20px"}})})}),(0,r.jsx)(B.A,{checked:t,onChange:()=>a(!t)})]}),t&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(z.U,{selection:i,onChange:l}),(0,r.jsx)(U.J,{selection:i,onChange:l})]})]})};var F=a(77686),W=a(70141),G=a(92291),Z=a(26670),H=a(17836),q=a(64),X=a(70719),Q=a(8320),J=a(65708),K=a(56267),$=a(63886),ee=a(554);let et=()=>{let{t:e}=(0,j.B)([n.NS.PassengerForm]),t=(0,J.useRouter)(),a=(0,K.Y)(),[i,l]=(0,g.useState)(!1),[s,o]=(0,g.useState)(!1),[d,c]=(0,g.useState)(!1),{countryCodes:y}=(0,N.o)();(0,ee.S)();
1let{mainPassenger:C,refreshAuth:v,simpleAccount:A}=(0,E.As)(),{deleteAuthAccount:S}=(0,F.F7)(),{isModalOpen:w,toggleModal:T}=(0,W.A)(),{showToast:I}=(0,G.d)(),{userPreference:k,isLoadingPreference:L,setUserPreference:B,updateUserPreferenceFromState:z}=(0,F.F7)(),U=k&&(0,Q.zB)(k,a),et=(0,g.useRef)(null),ea=(0,g.useRef)(null),er=async(r,n)=>{let{setFieldError:s,setFieldTouched:o}=n;if(!i){l(!0);try{var d,c;let e=await (null==(d=ea.current)?void 0:d.saveIfNeeded());if(e&&!e.ok)return;et.current&&(r.profilePicture=await b.Z.uploadProfilePicture(et.current),et.current=null);let n=(0,u.getPassengersWithDiscountCardPrefix)([r])[0];if(!n)return;let{isValid:i,checkedPassengers:l}=await (0,q.be)([n]);if(!i){let e=(0,q.i3)(l);for(let t in e)for(let a in e[t]){let r="discountCards[".concat(a,"].cardNumber");o(r,!0,!1),s(r,null==(c=e[t])?void 0:c[a])}return}let p=C?await b.Z.updateUserPassenger({passenger:{...n,id:C.id}}):await b.Z.createMainUserPassenger({passenger:n});z(),p.success?(await v(),await t.push((0,H.GC)(a))):console.error(p)}catch(t){console.error(t),I({variant:"error",text:e("ERROR_TRY_AGAIN")})}finally{l(!1)}}},en=async()=>{l(!0),o(await S()),l(!1)};(0,g.useEffect)(()=>
1{!i&&s&&t.push((0,H.bx)(a))},[i,s,a,t]),(0,g.useEffect)(()=>{A||d||(c(!0),v())},[d,A,v]);let ei=!!t.query.redirected,el=!!t.query.emailValidated;return(C||A)&&(ei||C)?(0,r.jsx)(_.l1,{initialValues:{...null!=C?C:(0,X.kR)({email:null==A?void 0:A.email})},onSubmit:er,validationSchema:(0,V.Qb)(y,!1),children:(0,r.jsx)(_.lV,{children:(0,r.jsx)(Z.A,{headingText:e("profile"),fixedButtons:(0,r.jsx)(x.A,{fullWidth:!0,type:"submit",isLoading:i,children:e("SAVE_PROFILE")}),children:(0,r.jsxs)(m.A,{children:[ei&&(0,r.jsx)(O.A,{message:"FORCE_ACCOUNT_UPDATE_MSG",type:h.V.Warning,namespaces:[n.NS.PassengerForm]}),(0,r.jsx)(R.A,{displayElements:{x:!1,discountCards:!0,email:!0,phoneNumber:!0},requireElements:{email:!0},emailDisabled:!0,onEditEmail:el?void 0:()=>void t.push((0,H.HI)(a)),emailValidated:el,hasMobilityCard:null==C?void 0:C.hasMobilityCard,hasWheelchair:null==C?void 0:C.hasWheelchair,isReducedMobilityPassenger:null==C?void 0:C.reducedMobility,showProfilePicture:!0,onPendingBlobChange:e=>{et.current=e}}),(0,r.jsx)(D.A,{name:"address"}),(0,r.jsx)(P,{ref:ea}),!L&&k&&U&&(0,r.jsx)(Y,{showSchoolVacations:k.showSchoolVacations,setShowSchoolVacations:e=>B({...k,...U,showSchoolVacations:e}),schoolVacationSelection:U,setSchoolVacationSelection:e=>B({...k,...e})}),(0,r.jsxs)(p.A,{marginTop:"24px",textAlign:"center",children:[(0,r.jsx)(x.A,{variant:"unstyled",onClick:T,children:(0,r.jsx)(f.A,{as:"span",variant:"medium",color:"redError",children:e("DELETE_ACCOUNT")})}),w&&(0,r.jsx)($.u,{prompt:e("DELETE_ACCOUNT"),description:e("DELETE_ACCOUNT_AGREEMENT"),confirmText:e("DELETE_ACCOUNT"),confirmIcon:"logout-outline-default",onConfirm:en,onClose:T})]})]})})})}):(0,r.jsx)(M.A,{})},ea=()=>{let{t:e}=(0,i.Bd)([n.NS.Common]);return(0,r.jsxs)(c.O,{children:[(0,r.jsx)(o(),{children:(0,r.jsx)("meta",{name:"robots",content:"noindex, nofollow"})}),(0,r.jsx)(l.bV,{noindex:!0,nofollow:!0,title:e("defaultTitle")}),(0,r.jsx)(et,{})]})};ea.getLayout=function(e){return(0,r.jsx)(d.L,{bottomNavProps:{isHidden:!0,containerClassName:"bg-color-darker"},children:e})};var er=!0;let en=ea},97554:e=>{e.exports={"header-form":"styles_header-form__jzhmk","no-padding":"styles_no-padding__EaV1s"}}},e=>{e.O(0,[2392,636,6593,8792],()=>e(e.s=82637)),_N_E=e.O()}]);
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.