1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[495],{29219:function(e,s,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/register",function(){return r(14087)}])},12971:function(e,s,r){"use strict";var t=r(85893),a=r(67294),l=r(91871),n=r.n(l),i=r(25453),o=r(3265),c=r(41664),d=r.n(c),u=r(93214),m=r(85838),p=r(52920),g=r(71175),h=r(91450),_=r(11163);s.Z=()=>{let{isApp:e}=(0,u.u)(),{logged:s}=(0,m.Z)(),{shouldRenderComponent:r}=(0,h.hm)(),l=(0,_.useRouter)(),c="/product/[sku]"===l.pathname,{GlobalMarquee:f}=(0,a.useContext)(p.Z),x=(0,g.Z)({marqueeData:f}),[w,b]=(0,a.useState)(""),{background_color:v="red",text:j,cta:S,text_cta:y,show_button_after_login:N,is_dark:k,temporal_date:C,views:R}=x||{};(0,a.useEffect)(()=>{"/login"===S?b("/login?callbackUrl=".concat(l.asPath)):b(S||"")},[l.asPath,x]);let P=r(null==R?void 0:R.viewDefault,null==R?void 0:R.viewLogged);if(null!=C&&!(()=>{if(C){let{start_day:e,start_time:s,end_day:r,end_time:t}=C;return(0,i.CI)("".concat(e," ").concat(s),"".concat(r," ").concat(t))}return!1})()||e||!P||!["/product/[sku]","/categories/[categoryUid]","/login","/cart","/register"].includes(l.pathname)||null===x)return null;let Z=a.Fragment,T={};return(S&&(Z=d(),T={href:w}),j)?(0,t.jsx)("div",{className:"".concat(n()["cintillo-menu-container"]),"data-is-pdp":c,id:"cintillo-global",children:(0,t.jsx)(Z,{...T,children:(0,t.jsxs)("div",{className:n()["cintillo-menu"],style:{backgroundColor:v,color:"".concat(k?"#fff":"#000")},children:[(0,t.jsx)("h2",{className:n()["cintillo-menu--title"],children:j}),(!!N||!s)&&S&&y&&(0,t.jsx)(o.Z,{size:"sm",href:w||"","data-testid":"banner-app-button",children:y})]})})}):(0,t.jsx)(t.Fragment,{})}},14087:function(e,s,r){"use strict";r.r(s),r.d(s,{__N_SSP:function(){return F},default:function(){return L}});var t=r(85893),a=r(14488),l=r(56505),n=r.n(l),i=r(88999),o=r(46723),c=r(34060),d=r(63673),u=r(70315),m=r(87237),p=r(99298),g=r(41664),h=r.n(g),_=r(87536),f=r(94542),x=r(72174),w=r(67294),b=r(50319),v=r(82729);function j(){let e=(0,v._)(["\n mutation Register(\n $firstname: String!\n $lastname: String!\n $email: String!\n $password: String!\n $subscribed: Boolean!\n $gender: Int!\n ) {\n createCustomerV2(\n input: {\n firstname: $firstname\n lastname: $lastname\n email: $email\n password: $password\n is_subscribed: $subscribed\n gender: $gender\n }\n ) {\n customer {\n firstname\n lastname\n gender\n email\n is_subscribed\n }\n }\n }\n"]);return j=function(){return e},e}let S=(0,r(31230).Ps)(j());var y=r(11163),N=r(54285),k=r(40377),C=r(4243),R=()=>{let e=(0,y.useRouter)(),{formattedCallbackUrl:s}=(0,C.U)(),{addToast:r}=(0,N.Z)(),[t,a]=(0,w.useState)(void 0),[l,{data:n,error:i,loading:o}]=(0,b.D)(S,{context:{headers:{"x-frontend-mock":"register"}},errorPolicy:"none",onCompleted:async()=>{(0,k.n)("registerHandler",{email:t}),await e.push("".concat(p.wm).concat(s)),r({id:"register-success-toast",messageTitle:"TU CUENTA YA EST\xc1 CREADA.",messageSubtitle:"Ya puedes entrar a tu cuenta con tu email y contrase\xf1a",type:"success"})},onError:e=>{r({id:"register-error-toast",messageTitle:"\xa1OH, OH! NO PUDIMOS GUARDAR TUS DATOS",messageSubtitle:e.message,type:"error"})}});return{sendRegisterInfo:(e,s)=>{a(e.email.trim()),l({variables:{firstname:e.name.trim(),lastname:e.lastname.trim(),email:e.email.trim(),password:e.password.trim(),gender:9,subscribed:s}})},registerData:n,registerError:i,registerLoading:o}},P=r(84589),Z=r(77062),T=r(49206),E=r(85838),G=r(12971),q=r(93214),I=e=>{var s,r,a,l,g;let{viewMarquee:b}=e,{logged:v}=(0,E.Z)(),j=(0,w.useRef)(null),S=(0,w.useRef)(null),{isApp:y}=(0,q.u)();v&&(window.location.href="/");let{sendRegisterInfo:N,registerLoading:k}=R(),[C,I]=(0,w.useState)(!1),{register:$,handleSubmit:A,watch:B,setValue:O,trigger:D,formState:{errors:U,dirtyFields:F}}=(0,_.cI)({mode:"onBlur"}),L=(0,T.Z)();return(0,t.jsxs)(t.Fragment,{children:[!y&&(0,t.jsx)(G.Z,{}),(0,t.jsxs)("div",{className:n()["m-register-module"],children:[(0,t.jsx)(P.default,{loading:k,title:c.sY}),(0,t.jsx)(o.Grid,{style:{marginTop:b?"15px":"0px"},decorators:{lg:{cols:12,autoRows:"fr"}},className:n()["container-grid"],children:(0,t.jsxs)(o.Grid.Cell,{decorators:{colSpan:12,lg:{colSpan:6,colStart:5,colEnd:9}},children:[(0,t.jsx)("h2",{className:n().title,children:c.Qu}),(0,t.jsx)("p",{className:n().subtitle,children:c.u_}),(0,t.jsxs)("form",{"data-testid":"login-form",ref:j,onSubmit:A(e=>{N(e,C)}),children:[(0,t.jsxs)(o.Grid,{className:n()["form-grid"],decorators:{cols:3,lg:{cols:6}},children:[(0,t.jsx)(o.Grid.Cell,{decorators:{colSpan:3,lg:{colSpan:3}},children:(0,t.jsx)(d.Z,{testId:"register-name",label:c.JW,value:B("name"),error:!!U.name,isRequired:!0,message:null===(s=U.name)||void 0===s?void 0:s.message,...$("name",{required:"El nombre es obligatorio",pattern:(0,f.pe)("nombre")}),onBlur:e=>{O("name",e.currentTarget.value.trim()),D("name")}})}),(0,t.jsx)(o.Grid.Cell,{decorators:{colSpan:3,lg:{colSpan:3}},children:(0,t.jsx)(d.Z,{testId:"register-lastname",label:c.BB,value:B("lastname"),error:!!U.lastname,isRequired:!0,message:null===(r=U.lastname)||void 0===r?void 0:r.message,...$("lastname",{required:"El apellido es obligatorio",pattern:(0,f.pe)("apellido")}),onBlur:e=>{O("lastname",e.currentTarget.value.trim()),D("lastname")}})}),(0,t.jsx)(o.Grid.Cell,{decorators:{colSpan:6,lg:{colSpan:6}},children:(0,t.jsx)(d.Z,{testId:"register-email",label:c.x7,value:B("email"),isRequired:!0,error:!!U.email,message:null===(a=U.email)||void 0===a?void 0:a.message,...$("email",{required:"El correo electr\xf3nico es obligatorio",pattern:f.s9}),onBlur:e=>{O("email",e.currentTarget.value.trim()),D("email")}})}),(0,t.jsx)(o.Grid.Cell,{decorators:{colSpan:6,lg:{colSpan:6}},children:(0,t.jsx)("div",{className:n()["password-help-wrapper"],"data-show-help":!!B("password"),children:(0,t.jsx)(x.Z,{label:c.Wd,testId:"register-password",value:
1B("password"),error:!!U.password,message:null===(l=U.password)||void 0===l?void 0:l.message,isRequired:!0,helpMessages:B("password")?Z.E0:void 0,...$("password",{required:"La contrase\xf1a es obligatoria",pattern:f.lI,validate:()=>!F.repeatPassword||B("password")===B("repeatPassword")||Z.Go}),onBlur:e=>{O("password",e.currentTarget.value.trim()),D("password")}})})}),(0,t.jsx)(o.Grid.Cell,{decorators:{colSpan:6,lg:{colSpan:6}},children:(0,t.jsx)("div",{ref:S,className:"".concat(n()["animated-field"]," ").concat(B("password")?n()["is-visible"]:""),children:(0,t.jsx)(x.Z,{testId:"register-repeat-password",label:c.ee,value:B("repeatPassword"),isRequired:!0,error:!!U.repeatPassword,message:null===(g=U.repeatPassword)||void 0===g?void 0:g.message,...$("repeatPassword",{validate:()=>B("password")===B("repeatPassword")||Z.Go}),onFocus:()=>{setTimeout(()=>{var e;null===(e=S.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"center"})},300)},onBlur:e=>{O("repeatPassword",e.currentTarget.value.trim()),D("repeatPassword")}})})}),(0,t.jsx)(o.Grid.Cell,{decorators:{colSpan:6,lg:{colSpan:6}},children:(0,t.jsxs)(i.Flex,{decorators:{direction:"column",alignItems:"flex-start"},className:n()["checkbox-container"],children:[(0,t.jsx)(m.Z,{onChange:e=>I(e.target.checked),label:(0,t.jsx)("p",{children:c.OU})}),(0,t.jsxs)("p",{className:n().privacy,children:[c.nq," ",(0,t.jsx)(h(),{prefetch:L,href:p.TP,className:n().link,children:c.Bz})," ","y"," ",(0,t.jsx)(h(),{prefetch:L,href:p.TP,className:n().link,children:c.E9})]})]})})]}),(0,t.jsxs)(o.Grid,{decorators:{cols:6,lg:{cols:6}},children:[(0,t.jsx)(o.Grid.Cell,{decorators:{colSpan:6,lg:{colSpan:6}},children:(0,t.jsx)(u.Z,{fullWidth:!0,type:"submit",children:c.wN})}),(0,t.jsx)(o.Grid.Cell,{decorators:{colSpan:6,lg:{colSpan:6}},children:(0,t.jsx)(h(),{prefetch:!0,href:"".concat(p.wm),className:n()["forgot-password"],children:(0,t.jsx)(u.Z,{fullWidth:!0,type:"button",variant:"secondary",children:c.pS})})})]})]})]})})]})]})},$=r(80838),A=r(52920),B=r(21031),O=r(42708),D=r(52531);let U=(0,w.forwardRef)((e,s)=>{let{dataMarquee:r}=e,{setShowFooterExternally:l,shouldShowFooter:n}=(0,$.T)();(0,B.S)();let{setGlobalMarquee:i}=(0,w.useContext)(A.Z);r&&i(r),(0,w.useEffect)(()=>{r&&i(r)},[]);let{ref:o,inView:c}=(0,O.YD)({threshold:1,triggerOnce:!0});return(0,w.useEffect)(()=>{c&&!n&&l(!0)},[c]),(0,t.jsxs)(a.Z,{title:"Register",description:"Registro",animatedRef:s,hideZendesk:!0,children:[(0,t.jsx)(I,{viewMarquee:!!r}),(0,t.jsx)(D.Spacer,{type:"sp4, xl"}),(0,t.jsx)("div",{ref:o,style:{height:"10px",position:"absolute",width:"10px",visibility:"hidden"}})]})});U.displayName="RegisterPage";var F=!0,L=U},91871:function(e){e.exports={"cintillo-menu":"styles_cintillo-menu___CAv_","cintillo-menu-container":"styles_cintillo-menu-container__x5Rms","cintillo-menu--title":"styles_cintillo-menu--title__jhohg"}},56505:function(e){e.exports={"m-register-module":"styles_m-register-module__vyP22",title:"styles_title__3wRfr",subtitle:"styles_subtitle__ark_k","container-grid":"styles_container-grid__ACZl_","form-grid":"styles_form-grid__AieLT",link:"styles_link__jQCJd","checkbox-container":"styles_checkbox-container__NO1eb",privacy:"styles_privacy__w6pNM","blue-link":"styles_blue-link__AhysR",buttonmask:"styles_buttonmask__xj6MK","password-message":"styles_password-message__Hs1Lw","animated-field":"styles_animated-field__ckxqm","is-visible":"styles_is-visible__CN6ub","password-help-wrapper":"styles_password-help-wrapper__e305Q"}}},function(e){e.O(0,[4488,3868,6742,2888,9774,179],function(){return e(e.s=29219)}),_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.