1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,65110,e=>{"use strict";var n=e.i(91398),t=e.i(70369),i=e.i(79809),a=e.i(88756),s=e.i(22434),o=e.i(8039),r=e.i(2202),l=e.i(44888),d=e.i(25909),c=e.i(37719),u=e.i(49918);let p=function(e){return(0,n.jsxs)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",focusable:!1,"aria-hidden":!0,...e,children:[e.title&&(0,n.jsx)("title",{children:e.title}),(0,n.jsx)("use",{xlinkHref:"/svg/sprites.svg?27b7a50c#login-apple"})]})},m=function(e){return(0,n.jsxs)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",focusable:!1,"aria-hidden":!0,...e,children:[e.title&&(0,n.jsx)("title",{children:e.title}),(0,n.jsx)("use",{xlinkHref:"/svg/sprites.svg?27b7a50c#login-facebook"})]})},_=function(e){return(0,n.jsxs)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",focusable:!1,"aria-hidden":!0,...e,children:[e.title&&(0,n.jsx)("title",{children:e.title}),(0,n.jsx)("use",{xlinkHref:"/svg/sprites.svg?27b7a50c#login-google"})]})};var g=e.i(21750),h=e.i(53973),f=e.i(1837),b=e.i(46896),v=e.i(4066),y=e.i(97629),x=e.i(35531),w=e.i(86883),k=e.i(85296),S=e.i(76848),C=e.i(1090),M=e.i(68700),P=e.i(7554),j=e.i(91365),A=e.i(40884),I=e.i(67100),R=e.i(63190),L=e.i(14306),$=e.i(59735),T=e.i(51040),B=e.i(16951),F=e.i(3828),E=e.i(91788),q=e.i(58021),N=e.i(22276),U=e.i(60814);let W=({open:e,onClose:U,openForgotPassModal:W,isCheckout:J,forwardButtonDisabled:X})=>{let Z=(0,F.useRouter)(),ee=(0,E.useContext)(B.ClientContext),{register:en,handleSubmit:et,setError:ei,formState:{errors:ea},reset:es}=(0,q.useForm)({}),eo=(0,N.useDispatch)(),[er]=(0,B.useMutation)("mutation userLogin($email: String!, $password: String!, $captcha: Captcha) {\n userLogin(email: $email, password: $password, captcha: $captcha) {\n ...AuthResult\n }\n}\n\nfragment AuthResult on AuthResult {\n token\n user {\n ...User\n }\n cart_updated\n}\n\nfragment User on User {\n id\n email\n firstname\n lastname\n country_code\n area_code\n phone_number\n newsletter\n addresses {\n ...UserAddress\n }\n credit_cards {\n ...CreditCard\n }\n favourite_store {\n ...Store\n }\n notification_settings {\n type\n channel\n title\n enabled\n }\n rossmann_plus_profile {\n ...RossmannPlusProfile\n }\n rossmann_plus_profile_inactivated\n favourite_products\n shopping_lists {\n id\n name\n items {\n id\n product {\n id\n }\n quantity\n }\n }\n product_subscriptions {\n product_id\n notify_available\n notify_discounted\n store_id\n }\n social_connections\n has_password\n order_subscription {\n id\n }\n cookie_consent\n favourite_address {\n ...FavouriteAddress\n }\n}\n\nfragment UserAddress on UserAddress {\n id\n type\n firstname\n lastname\n company_name\n company_number\n zip_code\n city\n address_line1\n address_line2\n lat\n lng\n should_confirm_position\n note\n}\n\nfragment CreditCard on CreditCard {\n id\n card_brand\n card_number\n registered_at\n expire_at\n is_expired\n}\n\nfragment Store on Store {\n id\n name\n zip_code\n city\n lat\n lng\n street\n address\n openings\n pickup_date\n instore_pickup_permitted\n services\n is_open\n is_click_and_collect\n click_and_collect_pickup_date\n}\n\nfragment RossmannPlusProfile on RossmannPlusProfile {\n card_number\n first_name\n last_name\n gender\n date_of_birth\n country_code\n area_code\n phone_number\n zip_code\n city\n public_place\n public_place_type {\n id\n name\n }\n house_number\n enable_profiling\n is_verified\n babies {\n ...RossmannPlusBaby\n }\n summary {\n ...RossmannPlusSummary\n }\n is_virtual_card\n enable_extended_profiling\n needs_extended_profiling_confirmation\n}\n\nfragment RossmannPlusBaby on RossmannPlusBaby {\n id\n gender\n name\n date_of_birth\n weight\n created_at\n updated_at\n}\n\nfragment RossmannPlusSummary on RossmannPlusSummary {\n vip_level\n quarter {\n date_start\n date_end\n vip_limits {\n level\n limit\n }\n }\n vip_purchase_quarter\n vip_level_goal\n vip_purchase_left_goal\n vip_level_goal2\n vip_purchase_left_goal2\n vip_level_next_quarter\n rewards_available {\n title\n date_expiration\n discount_percent\n is_kny\n }\n rewards_used {\n title\n date_expiration\n discount_percent\n is_kny\n }\n kny_used\n discount_year\n discount_quarter\n was_vip\n lose_vip\n}\n\nfragment FavouriteAddress on FavouriteAddress {\n address_line1\n address_line2\n city\n id\n lat\n lng\n zip_code\n next_deliveries {\n id\n next_delivery_time_window {\n id\n date\n interval\n is_available\n }\n }\n}\n"),[el,ed]=(0,E.useState)(!1),{loginWithSocialProvider:ec,status:eu,data:ep}=(0,y.useSocialLogin)(),[em,e_]=(0,E.useState)(null),eg=$.QueryUtils.getParam(Z.query.returnTo),eh=em||eg||null;(0,E.useEffect)(()=>{eu===y.SocialLoginStatus.FinishedWithSuccess&&U()},[eu,ep]),(0,E.useEffect)(()=>{e_(P.Cookie.getAuthRedirectPath()),P.Cookie.clearAuthRedirectPath();let e=()=>{U()};return Z.events.on("routeChangeStart",e),()=>{Z.events.off("routeChangeStart",e)}},[]);let ef=async e=>{ed(!0);let{email:n,password:s}=e,o=await window.grecaptcha.execute(j.Env.nextPublicRecaptchaSiteKey),r=await er({variables:{email:n.trim(),password:s.trim(),captcha:{type:a.CaptchaType.google,token:o}}});if(r.data?.userLogin.user){let{token:e,user:n,cart_updated:t}=r.data.userLogin;ee.setHeader("Authorization",`Bearer ${e}`),eo(k.AuthActions.updateAuth(e,n)),t&&(eo(w.AppAlertActions.updateCartAlertVisible(!0)),A.EventEmitter.emit(M.Events.CartContentChange)),R.Gtm.successfulLogin(R.MethodType.email,n.rossmann_plus_profile?.summary?.vip_level??a.RossmannPlusVipLevel.BASIC,!!n.rossmann_plus_profile?.babies.length),es(),J&&Z.push(L.default.cart),U(),eh&&(P.Cookie.clearAuthRedirectPath(),Z.push(eh)),ed(!1);return}let l=await ee.request({query:i.cartQuery});l.data?.cart&&(eo(S.CartActions.updateCart(l.data.cart)),R.Gtm.sendCart(l.data.cart)),r.error&&((0,t.handleApiValidationErrors)(r.error,ei)||
1(ei("email",{message:I.ErrorMessages.wrongEmailOrPassword},{shouldFocus:!0}),ei("password",{message:I.ErrorMessages.wrongEmailOrPassword}))),ed(!1)},eb=()=>{P.Cookie.clearAuthRedirectPath(),e_(null),U(),es(),Z.asPath.startsWith(L.default.promoLogin)&&Z.push(L.default.home)};return(0,n.jsxs)(l.SideModal,{label:x.Intl.formatMessage({id:"login.title"}),isOpen:!!em||e,onRequestClose:eb,children:[em?(0,n.jsx)(K,{children:(0,n.jsx)(g.SystemMessage,{isVisible:!0,isCloseButtonHidden:!0,background:C.Color.orangeL,color:C.Color.red,icon:(0,n.jsx)(c.default,{}),children:(0,n.jsx)(g.SystemMessageText,{children:x.Intl.formatMessage({id:"login.requiresLogin"})})})}):null,(0,n.jsxs)("form",{onSubmit:et(ef),children:[J?(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(l.ModalHeader,{children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(l.ModalTitle,{children:x.Intl.formatMessage({id:"cart.login.title"})}),(0,n.jsx)(l.ModalSubtitle,{children:x.Intl.formatMessage({id:"cart.login.subtitle"})})]}),(0,n.jsx)(o.IconButton.ModalClose,{btnLabel:"Dialógus bezárása",type:"button",icon:(0,n.jsx)(u.default,{}),onClick:eb})]})}):(0,n.jsxs)(l.ModalHeader,{children:[(0,n.jsx)(l.ModalTitle,{children:x.Intl.formatMessage({id:"login.title"})}),(0,n.jsx)(o.IconButton.ModalClose,{btnLabel:"Dialógus bezárása",icon:(0,n.jsx)(u.default,{}),type:"button",onClick:eb})]}),(0,n.jsx)(f.Input,{...(0,v.tidProps)(b.TestIds.loginInputEmail),inputMode:"email",label:x.Intl.formatMessage({id:"form.emailAddress"}),...en("email",I.FormValidation.email),errorMessage:ea.email?.message||void 0,"data-test-has-error":!!ea.email?.message}),(0,n.jsx)(f.PasswordInput,{...(0,v.tidProps)(b.TestIds.loginInputPassword),label:x.Intl.formatMessage({id:"form.password"}
1),...en("password",I.FormValidation.password),errorMessage:ea.password?.message||void 0,"data-test-has-error":!!ea.password?.message}),(0,n.jsx)(d.RecaptchaNotice,{withMargin:!0}),(0,n.jsx)(Q,{as:"button",type:"button",$variant:"regular16",onClick:()=>{W(),U()},children:x.Intl.formatMessage({id:"login.forgotPassword"})}),(0,n.jsx)(z,{...(0,v.tidProps)(b.TestIds.loginInputSubmit),type:"submit",btnLabel:x.Intl.formatMessage({id:"login.button"}),fullWidth:"always",disabled:el}),(0,n.jsx)(G,{children:(0,n.jsx)(H,{$variant:"regular16",$color:"grayD",children:x.Intl.formatMessage({id:"common.or"})})}),(0,n.jsxs)(V,{as:"button",type:"button",bg:"facebook",onClick:()=>ec(a.SocialLoginProvider.facebook,eh),children:[(0,n.jsx)(m,{}),x.Intl.formatMessage({id:"login.facebook"})]}),(0,n.jsxs)(V,{as:"button",type:"button",bg:"google",onClick:()=>ec(a.SocialLoginProvider.google,eh),children:[(0,n.jsx)(_,{}),x.Intl.formatMessage({id:"login.google"})]}),(0,n.jsxs)(V,{as:"button",type:"button",bg:"apple",onClick:()=>ec(a.SocialLoginProvider.apple,eh),children:[(0,n.jsx)(p,{}),x.Intl.formatMessage({id:"login.apple"})]})]}),J?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Y,{$variant:"bold16",$variantMedium:"h4",children:x.Intl.formatMessage({id:"cart.login.notRegistered"})}),(0,n.jsx)(s.Button.Secondary,{btnLabel:x.Intl.formatMessage({id:"cart.checkoutAsGuest"}),onClick:()=>{X?(0,T.showToast)((0,n.jsx)(h.Typo,{$variant:"bold16",$color:"grayD",children:x.Intl.formatMessage({id:"components.cart.cartWarning"})}),"warning"):Z.push(L.default.checkout)},fullWidth:"always"}),(0,n.jsx)(O,{$variant:"regular12",$color:"grayM",children:x.Intl.formatMessage({id:"cart.checkoutAsGuestInfo"})})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(D,{$variant:"bold16",children:x.Intl.formatMessage({id:"login.notRegistered"})}),(0,n.jsx)(r.Link,{to:L.default.register,style:{display:"block"},children:(0,n.jsx)(s.Button.Secondary,{...(0,v.tidProps)(b.TestIds.registrationButton),btnLabel:x.Intl.formatMessage({id:"registration.button"}),fullWidth:"always",asSpan:!0})})]})]})},z=(0,U.default)(s.Button.Primary).withConfig({displayName:"LoginModal__LoginButton",componentId:"sc-10d8bfe5-0"})` 2 margin-bottom: 10px; 3 4 ${C.bp.medium} { 5 margin-bottom: 15px; 6 } 7`,D=(0,U.default)(l.ModalText).withConfig({displayName:"LoginModal__StyledModalText",componentId:"sc-10d8bfe5-1"})` 8 ${C.bp.small} { 9 text-align: center; 10 } 11`,G=U.default.div.withConfig({displayName:"LoginModal__Divider",componentId:"sc-10d8bfe5-2"})` 12 margin-bottom: 15px; 13 height: 22px; 14 text-align: center; 15 position: relative; 16 17 &:before { 18 content: ""; 19 display: block; 20 width: 100%; 21 height: 1px; 22 position: absolute; 23 top: 10px; 24 left: 0; 25 background: ${e=>e.theme.color.grayL}; 26 } 27`,H=(0,U.default)(h.Typo).withConfig({displayName:"LoginModal__DividerText",componentId:"sc-10d8bfe5-3"})` 28 background: ${e=>e.theme.color.white}; 29 padding: 0 10px; 30 display: inline-block; 31 position: relative; 32`,V=U.default.div.withConfig({displayName:"LoginModal__SocialButton",componentId:"sc-10d8bfe5-4"})` 33 width: 100%; 34 height: 60px; 35 display: flex; 36 align-items: center; 37 justify-content: center; 38 color: ${e=>e.theme.color.white}; 39 background: ${e=>e.theme.color[e.bg]}; 40 font-size: 16px; 41 ${e=>e.theme.fontWeight.bold} 42 text-transform: uppercase; 43 border-radius: 4px; 44 margin-bottom: 10px; 45 cursor: pointer; 46 position: relative; 47 48 svg { 49 position: absolute; 50 top: 50%; 51 transform: translateY(-50%); 52 left: 12px; 53 54 ${C.bp.medium} { 55 left: 30px; 56 } 57 } 58`,O=(0,U.default)(h.Typo).withConfig({displayName:"LoginModal__CheckoutGuestInfo",componentId:"sc-10d8bfe5-5"})` 59 text-align: center; 60 margin-top: 10px; 61`,Q=(0,U.default)(l.ModalText).withConfig({displayName:"LoginModal__Text",componentId:"sc-10d8bfe5-6"})` 62 color: ${e=>e.theme.color.red}; 63 cursor: pointer; 64 65 &:hover { 66 color: ${e=>e.theme.color.redD}; 67 } 68`,K=U.default.div.withConfig({displayName:"LoginModal__LoginSystemMessage",componentId:"sc-10d8bfe5-7"})` 69 div { 70 padding-top: 2px; 71 padding-bottom: 2px; 72 } 73 margin-bottom: 15px; 74`;var Y=(0,U.default)(l.ModalText).withConfig({displayName:"LoginModal___StyledModalText",componentId:"sc-10d8bfe5-8"})` 75 margin-top: 15px; 76 `;e.s(["LoginModal",0,W,"default",0,W],65110)},54562,function(e){e.n(e.i(65110))},37719,e=>{"use strict";var n=e.i(91398);
76e.s(["default",0,function(e){return(0,n.jsxs)("svg",{width:"24",height:"25",viewBox:"0 0 24 25",focusable:!1,"aria-hidden":!0,...e,children:[e.title&&(0,n.jsx)("title",{children:e.title}),(0,n.jsx)("use",{xlinkHref:"/svg/sprites.svg?27b7a50c#alert"})]})}])},97629,80714,e=>{"use strict";var n,t=e.i(91398),i=e.i(79809),a=e.i(88756),s=e.i(75436),o=e.i(53973),r=e.i(35531),l=e.i(86883),d=e.i(85296),c=e.i(76848),u=e.i(68700);e.i(7554),e.i(14306);let p=async()=>new Promise(e=>{let n=n=>{n.authResponse&&n.authResponse.accessToken?e({token:n.authResponse.accessToken}):FB.login(n=>{e({error:n.authResponse?void 0:n.status,token:n.authResponse?.accessToken})},{scope:"email, public_profile",return_scopes:!0})};void 0===window.FB?(window.fbAsyncInit=function(){FB.init({appId:"298220005657631",xfbml:!0,version:"v2.1"}),FB.getLoginStatus(e=>{n(e)})},function(e,n,t){let i=e.getElementsByTagName(n)[0];if(e.getElementById(t))return;let a=e.createElement("script");a.id=t,a.src="//connect.facebook.net/en_US/sdk.js",i.parentNode?.insertBefore(a,i)}(document,"script","facebook-jssdk")):FB.getLoginStatus(e=>{n(e)})}),m=async()=>new Promise(e=>{window.google.accounts.oauth2.initTokenClient({client_id:"96601688361-8f7kfahu2gvld3h76uh4c0u8nqv738km.apps.googleusercontent.com",scope:"https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile",callback:n=>{e({token:n.access_token})}}).requestAccessToken()}),_=async()=>{window.AppleID.auth.init({clientId:"hu.rossmann.shop.service",scope:"name email",redirectURI:"https://shop.rossmann.hu/apple-signin",state:"origin:web",usePopup:!0});try{let e=await window.AppleID.auth.signIn(),n=e.authorization.code;if(!e.user)return{token:n};{let{firstName:t,lastName:i}=e.user.name;return{token:n,firstName:t,lastName:i}}}catch(e){return{error:e}}};e.s(["loginWithApple",0,_,"loginWithFacebook",0,p,"loginWithGoogle",0,m],80714);var g=e.i(40884),h=e.i(63190),f=e.i(50895),b=e.i(51040),v=e.i(16951),y=e.i(3828),x=e.i(91788),w=e.i(22276),k=((n={})[n.Initial=0]="Initial",n[n.Started=1]="Started",n[n.FinishedWithSuccess=2]="FinishedWithSuccess",n[n.FinishedWithRegistrationNeeded=3]="FinishedWithRegistrationNeeded",n[n.FinishedWithError=4]="FinishedWithError",n);e.s(["SocialLoginStatus",()=>k,"useSocialLogin",0,()=>{let e=(0,y.useRouter)(),n=(0,x.useContext)(v.ClientContext),[k]=(0,v.useMutation)("mutation userLoginSocial($provider: SocialLoginProvider!, $token: String!, $first_name: String, $last_name: String) {\n userLoginSocial(\n provider: $provider\n token: $token\n first_name: $first_name\n last_name: $last_name\n ) {\n ... on AuthResult {\n ...AuthResult\n __typename\n }\n ... on RegistrationNeeded {\n firstname\n lastname\n email\n __typename\n }\n }\n}\n\nfragment AuthResult on AuthResult {\n token\n user {\n ...User\n }\n cart_updated\n}\n\nfragment User on User {\n id\n email\n firstname\n lastname\n country_code\n area_code\n phone_number\n newsletter\n addresses {\n ...UserAddress\n }\n credit_cards {\n ...CreditCard\n }\n favourite_store {\n ...Store\n }\n notification_settings {\n type\n channel\n title\n enabled\n }\n rossmann_plus_profile {\n ...RossmannPlusProfile\n }\n rossmann_plus_profile_inactivated\n favourite_products\n shopping_lists {\n id\n name\n items {\n id\n product {\n id\n }\n quantity\n }\n }\n product_subscriptions {\n product_id\n notify_available\n notify_discounted\n store_id\n }\n social_connections\n has_password\n order_subscription {\n id\n }\n cookie_consent\n favourite_address {\n ...FavouriteAddress\n }\n}\n\nfragment UserAddress on UserAddress {\n id\n type\n firstname\n lastname\n company_name\n company_number\n zip_code\n city\n address_line1\n address_line2\n lat\n lng\n should_confirm_position\n note\n}\n\nfragment CreditCard on CreditCard {\n id\n card_brand\n card_number\n registered_at\n expire_at\n is_expired\n}\n\nfragment Store on Store {\n id\n name\n zip_code\n city\n lat\n lng\n street\n address\n openings\n pickup_date\n instore_pickup_permitted\n services\n is_open\n is_click_and_collect\n click_and_collect_pickup_date\n}\n\nfragment RossmannPlusProfile on RossmannPlusProfile {\n card_number\n first_name\n last_name\n gender\n date_of_birth\n country_code\n area_code\n phone_number\n zip_code\n city\n public_place\n public_place_type {\n id\n name\n }\n house_number\n enable_profiling\n is_verified\n babies {\n ...RossmannPlusBaby\n }\n summary {\n ...RossmannPlusSummary\n }\n is_virtual_card\n enable_extended_profiling\n needs_extended_profiling_confirmation\n}\n\nfragment RossmannPlusBaby on RossmannPlusBaby {\n id\n gender\n name\n date_of_birth\n weight\n created_at\n updated_at\n}\n\nfragment RossmannPlusSummary on RossmannPlusSummary {\n vip_level\n quarter {\n date_start\n date_end\n vip_limits {\
76n level\n limit\n }\n }\n vip_purchase_quarter\n vip_level_goal\n vip_purchase_left_goal\n vip_level_goal2\n vip_purchase_left_goal2\n vip_level_next_quarter\n rewards_available {\n title\n date_expiration\n discount_percent\n is_kny\n }\n rewards_used {\n title\n date_expiration\n discount_percent\n is_kny\n }\n kny_used\n discount_year\n discount_quarter\n was_vip\n lose_vip\n}\n\nfragment FavouriteAddress on FavouriteAddress {\n address_line1\n address_line2\n city\n id\n lat\n lng\n zip_code\n next_deliveries {\n id\n next_delivery_time_window {\n id\n date\n interval\n is_available\n }\n }\n}\n"),[S,C]=(0,x.useState)(0),[M,P]=(0,x.useState)(null),[j,A]=(0,x.useState)(null),I=(0,w.useDispatch)(),R=(e,n,t)=>{C(e),P(t),A(n)};return{loginWithSocialProvider:async(v,y=null)=>{let x=m;v===a.SocialLoginProvider.facebook&&(x=p),v===a.SocialLoginProvider.apple&&(x=_),R(1,null,null);let w=await x();if(w.token){let r=await k({variables:{provider:v,token:w.token,first_name:w.firstName??null,last_name:w.lastName??null}});if(r.error&&(0,b.showToast)((0,t.jsx)(o.Typo,{$variant:"bold16",$color:"grayD",children:(0,s.getGraphQLErrorMessage)(r.error)}),"error"),r.data?.userLoginSocial.__typename==="RegistrationNeeded")R(3,{authType:v,token:w.token,inputData:r.data.userLoginSocial},null);else if(r.data?.userLoginSocial.__typename==="AuthResult"){let{token:t,user:i,cart_updated:s}=r.data.userLoginSocial;n.setHeader("Authorization",`Bearer ${t}`),I(d.AuthActions.updateAuth(t,i)),s&&(I(l.AppAlertActions.updateCartAlertVisible(!0)),g.EventEmitter.emit(u.Events.CartContentChange)),R(2,null,null),h.Gtm.successfulLogin(h.MethodType.sso,i?.rossmann_plus_profile?.summary?.vip_level??a.RossmannPlusVipLevel.BASIC,!!i?.rossmann_plus_profile?.babies.length),y?e.replace(y,void 0,{scroll:!1}):e.replace((0,f.routerAsPath)(e.asPath),void 0,{scroll:!1})}let p=await n.request({query:i.cartQuery});p.data?.cart&&(I(c.CartActions.updateCart(p.data.cart)),h.Gtm.sendCart(p.data.cart))}else P(r.Intl.formatMessage({id:"login.loginErrorMessage"})),C(4)},status:S,data:j,error:M}}],97629)}]);
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.