1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2747],{5391:(e,t,n)=>{n.d(t,{LE:()=>p,S$:()=>d,Ul:()=>r,sQ:()=>c});var i=n(82777),s=n(66438),a=n(93717),l=n(39946),o=n(23971);let r=(0,s.Ay)(l.A)(e=>{let{theme:t}=e;return{display:"flex",color:t.palette.common.black,fontSize:"16px",lineHeight:"24px",paddingBottom:t.spacing(.5),"&.Mui-disabled":{color:t.palette.common.black},".MuiFormLabel-asterisk":{color:t.palette.common.black}}}),d=(0,s.Ay)(i.A,{shouldForwardProp:e=>"isError"!==e})(e=>{let{theme:t,isError:n}=e;return{color:t.palette.grey[500],paddingTop:n?t.spacing(.5):t.spacing(1)}}),c=(0,s.Ay)(a.Ay,{shouldForwardProp:e=>"isPhoneNumber"!==e})(e=>{let{isPhoneNumber:t}=e;return t?{"&:before":{position:"relative",paddingRight:"2px",content:t?'"+370"':void 0,fontWeight:700,lineHeight:"24px"}}:void 0}),p=(0,s.Ay)(o.In)(e=>{let{theme:t}=e;return{color:t.palette.error.main,marginTop:"3px",minWidth:"20px",width:"20px",height:"20px"}})},5701:(e,t,n)=>{n.d(t,{b:()=>i});let i="text-input"},21627:(e,t,n)=>{n.d(t,{F:()=>p,k:()=>c});var i=n(37876),s=n(856),a=n(22997),l=n(82777),o=n(5701),r=n(38529),d=n(5391);let c=e=>{let{componentContent:t,errorKind:n,contextualText:c,inputRef:p,inputProps:u,...x}=e;return t?(0,i.jsxs)(s.A,{fullWidth:x.fullWidth,"data-testid":(0,r.G)(t),sx:{opacity:x.disabled?.6:1},children:[(0,i.jsx)(d.Ul,{"data-testid":"".concat(o.b,"_label"),required:x.required,htmlFor:t.sys.id,"aria-labelledby":null==t?void 0:t.fields.label,children:(0,i.jsx)(l.A,{maxWidth:"95%",noWrap:!0,children:t.fields.label})}),(0,i.jsx)(d.sQ,{inputProps:{"data-testid":(0,r.G)(t,"input-element"),...u},error:!!n,id:t.sys.id,placeholder:t.fields.placeholder,inputRef:p,"aria-describedby":n?"".concat(o.b,"_error_").concat(t.sys.id):void 0,...x}),n&&t.fields[n]&&(0,i.jsxs)(a.A,{error:!0,role:"alert","aria-live":"polite","data-testid":"".concat(o.b,"_error"),sx:{display:"flex",paddingTop:1,alignItems:"top",columnGap:.5},children:[(0,i.jsx)(d.LE,{"aria-hidden":"true",name:"error-filled",size:"sm"}),(0,i.jsx)(l.A,{id:"".concat(o.b,"_error_").concat(t.sys.id),variant:"paragraph1","data-testid":"".concat(o.b,"_error_text"),children:null==t?void 0:t.fields[n]})]}),c&&(0,i.jsx)(d.S$,{isError:!!n,variant:"paragraph2","data-testid":"".concat(o.b,"_contextual_text"),children:c})]}):null};var p=function(e){return e.INVALID="errorMessageFieldIsInvalid",e.REQUIRED="errorMessageFieldIsRequired",e.CUSTOM="errorMessageFieldCustom",e}({})},22655:(e,t,n)=>{n.d(t,{B:()=>a,_:()=>l});var i=n(56912),s=n(26229),a=function(e){return e.NOT_APPLICABLE_TO_GAME="NOT_APPLICABLE_TO_GAME",e.APPLICABLE_TO_GAME="APPLICABLE_TO_GAME",e.ALREADY_REGISTERED="ALREADY_REGISTERED",e.NO_CURRENT_GAME="NO_CURRENT_GAME",e.APPLIED_TO_GAME="APPLIED_TO_GAME",e}({});function l(e){let{captchaToken:t,...n}=e;return s.gB.post(i.Hr.GAME_REGISTRATION,n,{headers:{[s.Lb]:t}})}},30098:(e,t,n)=>{n.d(t,{K:()=>a});var i=n(56912),s=n(26229);function a(e,t){return s.KJ.get(i.Hr.VALIDATE_NUMBER,{phoneNumber:e,channel:t})}},32595:(e,t,n)=>{n.d(t,{A:()=>i.Ay});var i=n(67395)},39750:(e,t,n)=>{n.d(t,{R:()=>d});var i=n(37876),s=n(82777),a=n(73665),l=n(23971),o=n(29775),r=n(71605);let d=e=>{let{iconName:t,title:n,description:d,actionButtonContent:c,dataTestId:p,titleComponentType:u}=e,x=(0,a.A)();return(0,i.jsxs)(r.rf,{"data-testid":p,children:[t&&(0,i.jsx)(r.o0,{className:"no-content-icon",children:(0,i.jsx)(l.In,{name:t,sx:{width:56,height:56,color:x.palette.grey[100]},"aria-hidden":"true"})}),(0,i.jsx)(s.A,{variant:"heading3",component:u,textAlign:"center",marginBottom:"16px",children:n}),d&&(0,i.jsx)(s.A,{variant:"paragraph1",component:"p",textAlign:"center",children:d}),c&&(0,i.jsx)(o.Button,{componentContent:c,sx:{marginTop:{xs:"32px",md:"42px"}}})]})}},47123:(e,t,n)=>{n.d(t,{Em:()=>a,dd:()=>i,t5:()=>s});var i=function(e){return e.APPLICABLE_TO_GAME="gamePromoteAfterTransaction",e.ALREADY_REGISTERED="gameAlreadyRegistered",e}({}),s=function(e){return e.ALREADY_REGISTERED="gameAlreadyRegistered",e.CAN_NOT_REGISTER="gameCannotParticipate",e}({}),a=function(e){return e.APPLICABLE_TO_GAME="applicable",e.ALREADY_REGISTERED="registered",e}({})},57836:(e,t,n)=>{n.d(t,{A:()=>A});var i=n(37876),s=n(73665),a=n(856),l=n(42008),o=n(22997),r=n(82777),d=n(5391),c=n(23971),p=n(31221),u=n(22890),x=n(73896),h=n(66438);let m=(0,h.Ay)(x.A)(e=>{let{theme:t}=e;return{"&.MuiMenuItem-root":{"&.Mui-selected":{backgroundColor:t.palette.grey[100]},"&:focus, &:focus-visible, &.Mui-focusVisible":{outline:"none !important"}},"&:hover":{backgroundColor:t.palette.grey[50]}}}),g=(0,h.Ay)(l.A)(()=>({display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"})),f=(0,h.Ay)(u.A,{shouldForwardProp:e=>"hasValue"!==e})(e=>{let{theme:t,hasValue:n=!0}=e;return{borderColor:n?t.palette.grey[400]:t.palette.grey[100],"&.MuiOutlinedInput-root":{padding:t.spacing(1.5,2,1.5,2),"&.Mui-focused":{outline:"none"},".MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiSvgIcon-root":{color:t.palette.grey[500],marginRight:t.spacing(1),"& path":{transform:"scale(1.6)",transformOrigin:"center"}},"& .MuiSelect-select":{padding:0,height:"100%"},"& .MuiOutlinedInput-input":{padding:0,height:"100%"}
1,"& .MuiSelect-nativeInput":{height:"100%"}}}}),A=e=>{let{label:t,labelId:n,value:u,defaultValue:x,ariaLabel:h,disabled:A,dataTestId:v,errorText:j,options:b,handleChange:y,...C}=e,E=(0,p.m0)(),I=(0,s.A)();return(0,i.jsxs)(a.A,{size:"small",disabled:A,sx:{width:"100%",opacity:A?.6:1},children:[(0,i.jsx)(d.Ul,{id:n,children:t}),E?(0,i.jsxs)(f,{native:!0,labelId:n,value:u,displayEmpty:!0,"data-testid":v,"aria-label":h,onChange:y,...C,children:[x?(0,i.jsx)("option",{value:"","data-testid":"default-option",children:x},"default"):(0,i.jsx)("option",{value:"",disabled:!0,hidden:!0}),b.map(e=>{let{id:t,label:n}=e;return(0,i.jsx)("option",{value:t,"data-testid":"".concat(v,"-option-").concat(t),children:n},t)})]}):(0,i.jsxs)(f,{labelId:n,value:u,hasValue:!!u,displayEmpty:!0,"data-testid":v,"aria-label":h,onChange:y,renderValue:e=>{if(!e&&x)return x;let t=b.find(t=>t.id===e);return t?(0,i.jsx)(i.Fragment,{children:t.label}):""},...C,children:[x&&(0,i.jsx)(m,{value:"","data-testid":"default-option",children:(0,i.jsxs)(g,{children:[x,(0,i.jsx)(l.A,{sx:{visibility:""===u?"visible":"hidden",display:"inline-flex"},children:(0,i.jsx)(c.In,{"aria-hidden":!0,name:"checkmark",size:"sm",sx:{ml:"auto"},color:I.palette.common.black})})]})},"default"),b.map(e=>{let{id:t,label:n}=e,s=t===u;return(0,i.jsx)(m,{value:t,"data-testid":"".concat(v,"-option-").concat(t),children:(0,i.jsxs)(g,{children:[n,(0,i.jsx)(l.A,{sx:{display:"inline-flex",visibility:s?"visible":"hidden"},children:(0,i.jsx)(c.In,{"aria-hidden":!0,name:"checkmark",size:"sm",sx:{ml:"auto"},color:I.palette.common.black})})]})},t)})]}),C.error&&j&&(0,i.jsxs)(o.A,{"data-testid":"".concat(v,"_error"),sx:{display:"flex",paddingTop:1,alignItems:"top",columnGap:.5},children:[(0,i.jsx)(d.LE,{"aria-hidden":"true",name:"error-filled",size:"sm"}),(0,i.jsx)(r.A,{variant:"paragraph1",children:j})]})]})}},64397:(e,t,n)=>{n.d(t,{n:()=>i});let i=e=>"+370 ".concat(e.substring(0,3)," ").concat(e.substring(3,5)," ").concat(e.substring(5))},66238:(e,t,n)=>{n.d(t,{E:()=>i,r:()=>s});let i=e=>/^\d{1,8}$/.test(e),s=e=>/^\d{8}$/.test(e)},67805:(e,t,n)=>{n.d(t,{R:()=>i.R});var i=n(39750);n(71605)},71605:(e,t,n)=>{n.d(t,{o0:()=>o,rf:()=>l});var i=n(66438),s=n(42008),a=n(21611);let l=(0,i.Ay)(s.A)(()=>({display:"flex",flexDirection:"column",flex:1,alignItems:"center",justifyContent:"center"})),o=(0,i.Ay)(s.A)(()=>({display:"flex",marginBottom:"32px"}));a.A.a({color:"inherit"})},83061:(e,t,n)=>{n.r(t),n.d(t,{TabbedSectionsPageContentRenderer:()=>eZ});var i=n(37876),s=n(14232),a=n(89099),l=n(53318),o=n(42008),r=n(82777),d=n(96849),c=n(73665),p=n(67387),u=n(28332),x=n(63132),h=n(57836),m=n(80861);let g={position:"relative",".MuiTabs-indicator":{display:"none"},".MuiTabs-scroller":{display:"flex",marginRight:"1px"}
1,".MuiTabs-scrollButtons":{"&.Mui-disabled":{display:"none"},"> .MuiSvgIcon-root":{height:"32px",width:"32px",marginBottom:"8px"},position:"absolute",top:0,bottom:0,opacity:1,justifyContent:"start",zIndex:2,width:"40px",marginLeft:"-8px",background:"linear-gradient(90deg, #F6F6F6 50%, rgba(246, 246, 246, 0.51) 75.52%, rgba(246, 246, 246, 0) 104%)"},".MuiTabs-scrollButtons:last-child":{right:0,justifyContent:"end",marginLeft:"unset",marginRight:"-8px",background:"linear-gradient(270deg, #F6F6F6 50%, rgba(246, 246, 246, 0.51) 75.52%, rgba(246, 246, 246, 0) 104%)"}},f={textTransform:"uppercase",alignItems:"start",minHeight:"32px",minWidth:"unset",marginTop:"16px",marginBottom:"12px",marginRight:"24px",textAlign:"left",padding:"unset",paddingBottom:"4px","&.MuiButtonBase-root.Mui-selected":{color:"black",paddingBottom:"unset","> span":{borderBottom:"4px solid",borderColor:"primary.main"}},"&.MuiButtonBase-root:first-of-type":{marginTop:{lg:"unset"}}},A=e=>{let{links:t,onTabSelected:n,selected:a}=e,d=(0,c.A)(),{getValue:p}=(0,m.aU)(),A=p(m.d_.chooseCategory),v=(0,l.A)(e=>e.breakpoints.down("lg")),j=(0,s.useMemo)(()=>{let e=t.findIndex(e=>{let{id:t}=e;return t===a});return e>-1?e:0},[a,t]);return v?(0,i.jsx)(o.A,{children:(0,i.jsx)(h.A,{label:A,labelId:"select-category-label",value:null!=a?a:"",options:t,dataTestId:"select-category",sx:{backgroundColor:d.palette.common.white},handleChange:e=>{n(e.target.value)}})}):(0,i.jsx)(x.A,{value:j,onChange:(e,i)=>{n(t[i].id)},variant:"scrollable",scrollButtons:"auto",allowScrollButtonsMobile:!0,sx:g,orientation:"vertical",children:t.map(e=>{let{id:t,label:n}=e;return(0,i.jsx)(u.A,{id:"tab-".concat(t),"data-testid":t,"aria-controls":"tabpanel-".concat(t),label:(0,i.jsx)(r.A,{variant:"heading4",paddingBottom:{xs:"8px",md:"4px"},children:n}),sx:f},t)})})};var v=n(44061),j=n(61210),b=n(58311),y=n(67882),C=n(23971);let E=e=>{var t,n,i;return(null==e||null==(i=e.sys)||null==(n=i.contentType)||null==(t=n.sys)?void 0:t.id)==="faq"},I=e=>{var t,n,i;return(null==e||null==(i=e.sys)||null==(n=i.contentType)||null==(t=n.sys)?void 0:t.id)==="value"},T=e=>{let{selectedSectionItems:t}=e,n=(0,c.A)(),{faqs:s,value:a}=(e=>{let t,n=[];for(let i of e)E(i)?n.push(i):!t&&I(i)&&(t=i);return{faqs:n,value:t}})(t);return 0!==s.length||a?(0,i.jsx)(b.A,{children:(0,i.jsx)(o.A,{sx:{py:{xs:4,md:5},px:{xs:3,md:5},position:"relative",zIndex:10},children:(0,i.jsxs)(o.A,{children:[a&&(0,i.jsxs)(o.A,{mb:3,children:[(0,i.jsx)(C.In,{"aria-hidden":"true",name:a.fields.icon,sx:{width:32,minWidth:32,height:32,color:n.palette.primary.main}}),(0,i.jsx)(r.A,{variant:"heading3",component:"h2",mt:2,children:a.fields.title})]}),s.length>0&&(0,i.jsx)(y.o,{content:s,removeBoxShadow:!0,removePadding:!0})]})})}):null};var P=n(29333),N=n(31167),w=n(63172),S=n(30768),R=n(34963),k=n(53221),_=n(90611),M=n(67805),D=n(64177),L=n(82097),B=n(29775),O=n(92874),G=n(70828),z=n(98696),F=n(45533),U=n(5188),V=n(56912),W=n(76448),K=n(64397),H=n(88231),q=n(5759),X=n(38769);let Y=e=>{let{phoneNumber:t,validity:n,userPhoneNumberProfile:s}=e,a=(0,c.A)();return(0,i.jsxs)(o.A,{sx:{display:"flex",alignItems:"center"},children:[(null==s?void 0:s.avatarUrl)&&(0,i.jsx)(X.A,{"data-testid":"avatar",sx:{width:"64px",height:"64px"},slotProps:{img:{width:64,height:64}},src:null==s?void 0:s.avatarUrl,alt:null==s?void 0:s.avatarDescription}),(0,i.jsxs)(o.A,{marginLeft:"16px",children:[(0,i.jsx)(r.A,{variant:"paragraph1",component:"div",fontWeight:500,children:null==s?void 0:s.nickname}),(0,i.jsx)(r.A,{variant:"paragraph1",component:"div",children:t}),(0,i.jsx)(r.A,{variant:"paragraph3",component:"div",color:a.palette.grey[500],children:n})]})]})};var Z=n(69585),J=n(66438),Q=n(51804);let $=(0,J.Ay)(o.A)(()=>({paddingTop:"60px",paddingBottom:"60px"})),ee=(0,J.Ay)(o.A)(e=>{let{theme:t}=e;return{display:"flex",flexDirection:"column",rowGap:t.spacing(3)}}),et=(0,J.Ay)(o.A)(e=>{let{theme:t}=e;return{backgroundColor:t.palette.grey[50],padding:t.spacing(2),maxWidth:"548px"}}),en=(0,J.Ay)(Q.A)(e=>{let{theme:t}=e;return{columnGap:t.spacing(1.5),display:"flex",flexWrap:"wrap",justifyContent:"center",marginTop:t.spacing(2),padding:0,rowGap:t.spacing(1.5),[t.breakpoints.down("md")]:{columnGap:t.spacing(2),rowGap:t.spacing(2)},[t.breakpoints.down("sm")]:{columnGap:t.spacing(1.5),rowGap:t.spacing(1.5)}}});var ei=n(21627),es=n(83133),ea=n(38529);let el=e=>{var t,n,s;
1let{content:a,modalContent:l,profileName:d,selectedAvatarName:u,setProfileName:x,setSelectedAvatarName:h}=e,m=(0,c.A)();return(0,i.jsxs)(ee,{children:[(0,i.jsx)(et,{children:(0,i.jsx)(ei.k,{type:"text","data-testid":(0,ea.G)(a,"profile-name-input"),value:null!=d?d:"",componentContent:l.fields.input,onChange:e=>{(0,F.HT)(e,x)},fullWidth:!0,sx:{backgroundColor:m.palette.common.white}})}),(0,i.jsxs)(et,{sx:{maxHeight:{md:"320px"},...(0,es.q)(m)},children:[(0,i.jsx)(r.A,{id:"select-profile-images-label",children:null==(t=l.fields.valuesList)?void 0:t.fields.title}),(0,i.jsx)(en,{"aria-labelledby":"select-profile-images-label",children:null==(s=l.fields.valuesList)||null==(n=s.fields.media)?void 0:n.map(e=>{if(!e||!e.fields)return null;let{title:t,description:n,file:s}=e.fields;if(!t)return null;let a=u===t.trim();return(0,i.jsx)(o.A,{component:"li",width:{xs:"calc(33% - 9px)",sm:"calc(25% - 12px)",md:"calc(20% - 10px)"},justifyContent:"center",display:"flex",children:(0,i.jsxs)(Z.A,{"data-testid":"profile-name-avatar-".concat(t),sx:{position:"relative",width:"100%",height:"auto"},"aria-label":n,"aria-pressed":a,onClick:()=>h(t.trim()),children:[a&&(0,i.jsx)(C.In,{"aria-hidden":"true",size:"sm",name:"check-circle-filled",color:m.palette.secondary.main,sx:{borderRadius:"50%",position:"absolute",top:"7px",right:"6px",backgroundColor:m.palette.common.white,"z-index":1}}),s&&(0,i.jsx)(X.A,{sx:{width:"100%",minWidth:"60px",maxWidth:"80px",height:"auto",border:a?"2px solid ".concat(m.palette.secondary.main):"","&:hover":{border:a?"2px solid ".concat(m.palette.secondary.main):"2px solid ".concat(m.palette.common.white),boxShadow:"0px 8px 24px 0px ".concat((0,p.X4)(m.palette.trueBlack,.16))}},src:s.url,slotProps:{img:{width:80,height:80}}})]})},t)})})]})]})},eo=e=>{var t,n;let{content:l,phoneNumber:p,ownershipType:u,validFrom:x,email:h,userPhoneNumberProfile:m,setTopLevelAlertNotification:g}=e,f=(0,c.A)(),A=(0,a.useRouter)(),[v]=(0,w.fp)(W.wh),j=1===v.length,[b,y]=(0,s.useState)(void 0),[C,E]=(0,s.useState)(null),[I,T]=(0,s.useState)(""),N=(0,F.h4)(l,b),R=p&&N&&N.fields.description&&(0,H.L)(N.fields.description,{"@phoneNumber":(0,K.n)(p)}),k=x&&new Date(x).toLocaleDateString("lt-LT"),_={"& .MuiGrid-item":{marginLeft:"auto"},paddingTop:{xs:"20px",md:"0"}},[M]=(0,D.n)(G.fk,{onCompleted:e=>{"SUCCESS"===e.unlinkPhoneNumber.linkPhoneNumberResponseKey?j?globalThis.location.href="".concat(V.D2,"?redirectPath=").concat(A.asPath):globalThis.location.href="".concat(A.asPath,"?unlinkedPhoneNumber=").concat(p):g(U.Z.UNLINK_PHONE_NUMBER_ERROR),y(void 0)},onError:(0,q.K)(()=>A.push(V.pp))}),[X]=(0,D.n)(G.FJ,{onCompleted:e=>{y(void 0);let t=e.editProfileAsset.isChanged?U.Z.EDIT_PROFILE_SUCCESS:U.Z.EDIT_PROFILE_ERROR;z.S.refetchQueries({include:[G.tI]}).then(()=>{g(t)}).catch(()=>A.push(V.pp)),globalThis.dispatchEvent(new Event("refresh-user-data"))},onError:(0,q.K)(()=>A.push(V.pp))});return(0,s.useEffect)(()=>{var e,t;E(null!=(e=null==m?void 0:m.avatarName)?e:null),T(null!=(t=null==m?void 0:m.nickname)?t:"")},[m]),(0,i.jsxs)(o.A,{children:[(0,i.jsx)(r.A,{variant:"heading3",component:"h2",sx:{paddingBottom:4},children:l.personalDataTitle}),(0,i.jsxs)(d.A,{container:!0,sx:{alignItems:"center"},children:[(0,i.jsx)(d.A,{size:{xs:12,md:8},children:p&&(0,i.jsx)(Y,{phoneNumber:(0,K.n)(p),userPhoneNumberProfile:m,validity:"".concat(l.personalDataActiveFromLabel," ").concat(k)})}),(0,i.jsx)(d.A,{size:{xs:12,md:4},sx:_,children:(0,i.jsx)(B.default,{componentContent:l.personalDataEditButton,onClick:()=>y(F.pl.EDIT_NUMBER_PROFILE),"data-testid":"edit-profile-btn"})})]}),(0,i.jsxs)(d.A,{container:!0,sx:{pt:{xs:4,md:6},alignItems:"center"},children:[(0,i.jsx)(d.A,{size:{xs:4,md:3},children:l.personalDataEmailLabel}),(0,i.jsx)(d.A,{size:{xs:8,md:5},sx:{pr:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:h,children:h}),(0,i.jsx)(d.A,{size:{xs:12,md:4},sx:_,children:(0,i.jsx)(B.default,{url:null==(t=l.personalDataChangeEmailButton)?void 0:t.fields.url,componentContent:l.personalDataChangeEmailButton,"data-testid":"change-email-btn"})})]}),(0,i.jsxs)(d.A,{container:!0,sx:{alignItems:"center",pt:4,pb:3},children:[(0,i.jsx)(d.A,{size:{xs:12,md:8},children:l.personalDataPasswordLabel}),(0,i.jsx)(d.A,{size:{xs:12,md:4},sx:_,children:(0,i.jsx)(B.default,{url:null==(n=l.personalDataChangePasswordButton)?void 0:n.fields.url,componentContent:l.personalDataChangePasswordButton,"data-testid":"change-password-btn"})})]}),(0,i.jsx)(L.A,{}),u&&(0,i.jsxs)(d.A,{container:!0,sx:{alignItems:"center",pt:3},children:[(0,i.jsx)(d.A,{size:{xs:12,md:8},children:(0,i.jsx)(r.A,{variant:"heading4",children:l.unlinkNumberLabel})}),(0,i.jsx)(d.A,{size:{xs:12,md:4},sx:_,children:u===G.hN.DECLARED?(0,i.jsx)(B.default,{componentContent:l.personalDataLearnMoreButton,onClick:()=>y(F.pl.UNLINK_NUMBER_INFORMATION),"data-testid":"unlink-phone-number-info-btn"}):(0,i.jsx)(B.default,{componentContent:l.personalDataUnlinkNumberButton,onClick:()=>y(F.pl.UNLINK_NUMBER_CONFIRMATION),"data-testid":"unlink-phone-number-btn"})})]}),N&&(0,i.jsx)(O.z,{"data-testid":(0,F.zN)(b),sx:{'.MuiDialog-container > [role = "dialog"]':{maxWidth:"628px"}},componentContent:N,showNotification:(0,F.Ds)(j,b),open:void 0!==b,onClose:()=>y(void 0),onConfirm:()=>{switch(b){case F.pl.UNLINK_NUMBER_INFORMATION:return y(void 0);case F.pl.UNLINK_NUMBER_CONFIRMATION:return void(p&&M({variables:{phoneNumber:p}}));case F.pl.EDIT_NUMBER_PROFILE:return void(p&&X({variables:{phoneNumberProfileInput:{
1nickname:null!=I?I:"",avatarName:C,phoneNumber:p}}}));default:return null}},children:(()=>{switch(b){case F.pl.UNLINK_NUMBER_INFORMATION:case F.pl.UNLINK_NUMBER_CONFIRMATION:return R&&(0,i.jsx)(S.s,{content:R,sx:{[P.MARKS.BOLD]:{whiteSpace:"nowrap",fontWeight:"bold",color:f.palette.common.black}}});case F.pl.EDIT_NUMBER_PROFILE:return N&&(0,i.jsx)(el,{content:l,modalContent:N,profileName:I,selectedAvatarName:C,setProfileName:T,setSelectedAvatarName:E})}})()},b)]})},er={display:"flex",justifyContent:"end"},ed={xs:6,md:7};var ec=n(50820);let ep=e=>{let{showValue:t,onClick:n,valueId:s,content:a}=e;return(0,i.jsx)(ec.m_,{placement:"top",sx:ec.kx,title:t?a.pinAndPukCodesShowCodeTooltipText:a.pinAndPukCodesHideCodeTooltipText,children:(0,i.jsx)(o.A,{sx:{display:"flex"},onClick:n,component:B.ButtonStyled,"data-testid":"".concat(s,"-toggle-btn"),children:(0,i.jsx)(C.In,{name:t?"password-visible":"password-invisible",sx:C.nu})})})},eu=e=>Array(e.length).fill("*").join(""),ex=e=>!e,eh=e=>{let{content:t,pinCode:n,pukCode:a}=e,[l,c]=(0,s.useState)(!1),[p,u]=(0,s.useState)(!1);return(0,i.jsxs)(o.A,{paddingBottom:ed,children:[(0,i.jsx)(r.A,{variant:"heading3",component:"h2",sx:{paddingBottom:"19px"},children:t.pinAndPukCodesTitle}),(0,i.jsxs)(d.A,{container:!0,sx:{alignItems:"center",marginY:"13px"},children:[(0,i.jsx)(d.A,{size:{xs:4,md:3},children:t.pinAndPukCodesPinCodeLabel}),(0,i.jsx)(d.A,{size:{xs:3},children:n&&(0,i.jsx)("span",{children:l?n:eu(n)})}),(0,i.jsx)(d.A,{size:{xs:2,md:3}}),(0,i.jsx)(d.A,{size:{xs:3},sx:er,children:(0,i.jsx)(ep,{valueId:"pin",showValue:l,content:t,onClick:()=>{c(ex)}})})]}),(0,i.jsxs)(d.A,{container:!0,sx:{alignItems:"center",marginY:"13px"},children:[(0,i.jsx)(d.A,{size:{xs:4,md:3},children:t.pinAndPukCodesPukCodeLabel}),(0,i.jsx)(d.A,{size:{xs:3},children:a&&(0,i.jsx)("span",{children:p?a:eu(a)})}),(0,i.jsx)(d.A,{size:{xs:2,md:3}}),(0,i.jsx)(d.A,{size:{xs:3},sx:er,children:(0,i.jsx)(ep,{valueId:"puk",showValue:p,content:t,onClick:()=>{u(ex)}})})]})]})},em=e=>{let{content:t,phoneNumber:n,userPhoneNumberProfile:s,validTo:a}=e,l=a&&new Date(a).toLocaleDateString("lt-LT");return(0,i.jsxs)(o.A,{paddingBottom:ed,children:[(0,i.jsx)(r.A,{variant:"heading3",component:"h2",sx:{paddingBottom:4},children:t.simCardValidityTitle}),n&&(0,i.jsx)(Y,{phoneNumber:(0,K.n)(n),userPhoneNumberProfile:s,validity:"".concat(t.simCardValidityValidTillLabel," ").concat(l)})]})};var eg=n(12392);let ef=(0,J.Ay)(e=>{var t,n,a;let{onClick:l,...r}=e,d=(0,s.useRef)(null);return(0,i.jsx)(o.A,{tabIndex:0,role:"switch","aria-checked":r.checked,"aria-labelledby":r["aria-label"],onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&d.current&&!r.disabled&&(e.preventDefault(),d.current.click(),l&&l(e))},onClick:e=>{!r.disabled&&l&&l(e)},sx:{display:"inline-flex",outline:"none",cursor:r.disabled?"not-allowed":"pointer","&:focus-visible":{outline:"2px solid black",outlineOffset:"1px",borderRadius:"3px"}},children:(0,i.jsx)(eg.A,{...r,slotProps:{...null!=(n=r.slotProps)?n:{},input:{...null!=(a=null==(t=r.slotProps)?void 0:t.input)?a:{},ref:d}},tabIndex:-1})})},{shouldForwardProp:e=>"inProgress"!==e})(e=>{let{theme:t,inProgress:n}=e;return{width:48,height:24,padding:0,display:"flex",opacity:n?.4:1,"&:active":{"& .MuiSwitch-thumb":{width:25},"& .MuiSwitch-switchBase.Mui-checked":{transform:"translateX(24px)"}},"& .MuiSwitch-switchBase":{padding:2,color:"".concat(t.palette.common.white," !important"),"&.Mui-checked":{transform:"translateX(24px)","& + .MuiSwitch-track":{opacity:1,backgroundColor:t.palette.primary}}},"& .MuiSwitch-thumb":{boxShadow:"0 2px 4px 0 ".concat((0,p.X4)(t.palette.common.black,.2)),width:20,height:20,borderRadius:10,transition:t.transitions.create(["width"],{duration:200})},"& .MuiSwitch-track":{borderRadius:12,opacity:"1 !important",backgroundColor:"dark"===t.palette.mode?"".concat((0,p.X4)(t.palette.common.white,.35)):"".concat((0,p.X4)(t.palette.common.black,.16)),boxSizing:"border-box"}}}),eA=(0,J.Ay)("label")(e=>{let{theme:t}=e;return{marginRight:t.spacing(1.5)}}),ev=e=>{var t,n,a,l;let{content:c,status:p,onChange:u,inProgress:x,account:h,loading:m}
1=e,[g,f]=(0,s.useState)(!1);(0,s.useEffect)(()=>{f(!1)},[h]);let A="ACTIVATION_IN_PROGRESS"===p?null==(t=c.roamingInProgressToActivationNotification)?void 0:t.fields.text:null==(n=c.roamingInProgressToDeactivationNotification)?void 0:n.fields.text,v="ACTIVATION_IN_PROGRESS"===p?null==(a=c.roamingInProgressToActivationNotification)?void 0:a.fields.showCloseButton:null==(l=c.roamingInProgressToDeactivationNotification)?void 0:l.fields.showCloseButton;return(0,i.jsxs)(o.A,{paddingBottom:ed,children:[(0,i.jsx)(r.A,{variant:"heading3",component:"h2",sx:{paddingBottom:"32px"},children:c.roamingTitle}),(0,i.jsx)(o.A,{"aria-live":"polite",children:g&&(0,i.jsx)(R.InfoNotification,{testId:"roaming-notification",description:A&&(0,i.jsx)(S.s,{content:A}),isCloseable:v,sx:{marginBottom:1.5},onClose:()=>{f(!1)}})}),(0,i.jsxs)(d.A,{container:!0,sx:{alignItems:"start",justifyContent:"space-between"},children:[(0,i.jsx)(d.A,{size:{xs:6,md:9},children:c.roamingLabel}),(0,i.jsxs)(d.A,{size:{xs:6,md:3},sx:{display:"flex",justifyContent:"end",alignItems:"center"},children:[("ACTIVATION_IN_PROGRESS"===p||"DEACTIVATION_IN_PROGRESS"===p)&&(0,i.jsx)(eA,{children:"ACTIVATION_IN_PROGRESS"===p?c.roamingInProgressToActivationLabel:c.roamingInProgressToDeactivationLabel}),(0,i.jsx)(ef,{slotProps:{input:{"aria-label":c.roamingLabel}},"data-testid":"roaming-switch",checked:"ACTIVE"===p||"ACTIVATION_IN_PROGRESS"===p,onClick:()=>{x?f(!0):u()},inProgress:void 0===p||x||m})]})]})]})},ej="space-between",eb=e=>{let{content:t,consents:n}=e,[a,l]=(0,s.useState)(!1),[o,c]=(0,s.useState)(G.BV.NOT_SET),[p,u]=(0,s.useState)(G.BV.NOT_SET);(0,s.useEffect)(()=>{n&&(c(null==n?void 0:n.smsMarketingConsent),u(null==n?void 0:n.phoneMarketingConsent))},[n]);let[x,{loading:h}]=(0,D.n)(G.aS,{onCompleted:e=>{let{changeConsent:t}=e;c(t.acceptanceType)}}),[m,{loading:g}]=(0,D.n)(G.aS,{onCompleted:e=>{let{changeConsent:t}=e;u(t.acceptanceType)}}),f=p===G.BV.ACCEPTED?G.tc.REJECTED:G.tc.ACCEPTED,A=o===G.BV.ACCEPTED?G.tc.REJECTED:G.tc.ACCEPTED,v=h||n&&!n.isAllowedToEdit,j=g||n&&!n.isAllowedToEdit;return(0,i.jsxs)(i.Fragment,{children:[(null==n?void 0:n.isAllowedToEdit)&&(0,i.jsxs)(r.A,{variant:"paragraph1",component:"p",paddingTop:4,children:[(0,i.jsxs)("span",{children:[t.consentsMarketingNotificationsDescription,"\xa0"]}),(0,i.jsx)(r.A,{onClick:()=>{l(!0)},sx:{cursor:"pointer","> span":{borderBottom:"1px dashed currentColor"}},component:B.ButtonStyled,children:(0,i.jsx)("span",{"data-testid":"marketing-consents-label",children:t.consentsMarketingNotificationsInfoLabel})})]}),(0,i.jsxs)(d.A,{container:!0,sx:{marginY:"32px",justifyContent:ej},children:[(0,i.jsx)(d.A,{children:t.consentsMarketingNotificationsSmsLabel}),(0,i.jsx)(d.A,{children:(0,i.jsx)(ef,{slotProps:{input:{"aria-label":t.consentsMarketingNotificationsSmsLabel}},"data-testid":"sms-switch",checked:o===G.BV.ACCEPTED,inProgress:v,disabled:v,onClick:()=>{x({variables:{consentType:"SMS",acceptanceType:A}})}})})]}),(0,i.jsxs)(d.A,{container:!0,sx:{marginTop:"32px",marginBottom:"24px",justifyContent:ej},children:[(0,i.jsx)(d.A,{children:t.consentsMarketingNotificationsPhoneLabel}),(0,i.jsx)(d.A,{children:(0,i.jsx)(ef,{slotProps:{input:{"aria-label":t.consentsMarketingNotificationsPhoneLabel}},"data-testid":"phone-switch",checked:p===G.BV.ACCEPTED,inProgress:j,disabled:j,onClick:()=>{m({variables:{consentType:"PHONE",acceptanceType:f}})}})})]}),(0,i.jsx)(O.z,{open:a,onClose:()=>{l(!1)},componentContent:t.consentsMarketingNotificationsInfoModal})]})},ey=e=>{var t;let{content:n,account:s}=e,a=(0,c.A)(),l=s.validFrom&&new Date(s.validFrom).toLocaleDateString("lt-LT"),p=n.consentsNotification&&(0,H.L)(n.consentsNotification.fields.text,{"@email":null!=(t=s.settings.consents.consentManagingAccount)?t:""});return(0,i.jsxs)(o.A,{children:[(0,i.jsx)(r.A,{variant:"heading3",component:"h2",sx:{paddingBottom:"32px"},children:n.consentsTitle}),(0,i.jsx)(d.A,{container:!0,sx:{alignItems:"center"},children:(0,i.jsx)(d.A,{size:{xs:12,md:8},children:s.ownedAsset.phoneNumber&&(0,i.jsx)(Y,{phoneNumber:(0,K.n)(s.ownedAsset.phoneNumber),userPhoneNumberProfile:s.ownedAsset.userPhoneNumberProfile,validity:"".concat(n.consentsActiveFromLabel," ").concat(l)})})}),!s.settings.consents.isAllowedToEdit&&p&&n.consentsNotification&&(0,i.jsx)(R.
1CustomizableNotification,{sx:{marginTop:2,maxWidth:"548px"},type:n.consentsNotification.fields.type,icon:R.NotificationIcons[n.consentsNotification.fields.type],testId:"consents-".concat(n.consentsNotification.fields.type),title:n.consentsNotification.fields.title,description:(0,i.jsx)(S.s,{content:p,sx:{[P.MARKS.BOLD]:{...es.N9,textTransform:"lowercase",color:a.palette.common.black}}}),isCloseable:n.consentsNotification.fields.showCloseButton}),(0,i.jsx)(eb,{content:n,consents:s.settings.consents}),(0,i.jsx)(L.A,{}),(0,i.jsxs)(d.A,{container:!0,sx:{alignItems:"center",pt:3,flexWrap:{xs:"wrap",md:"nowrap"}},children:[(0,i.jsx)(d.A,{size:{xs:12,md:8},sx:{mr:3},children:(0,i.jsx)(r.A,{variant:"paragraph1",component:"p",children:n.consentsManageOtherConsentsDescription})}),(0,i.jsx)(d.A,{size:{xs:12,md:4},sx:{pt:{xs:"24px",md:0}},children:(0,i.jsx)(B.default,{componentContent:n.consentsManageOtherConsentsButton,"data-testid":"manage-other-consents-btn"})})]})]})};var eC=n(94154);let eE=e=>Object.keys(e.fields).reduce((t,n)=>{let i=e.fields[n];return i&&"object"==typeof i&&"sys"in i&&"fields"in i?{...t,[n]:eE(i)}:{...t,[n]:i}},{}),eI=e=>{let{content:t}=e,[n,a]=(0,s.useState)(!1),{portOutPhoneNumberBeforeYouLeaveMod
1al:l,portOutPhoneNumberBeforeYouLeaveOffers:c,portOutPhoneNumberButton:p,portOutPhoneNumberDescription:u,portOutPhoneNumberTitle:x}=t,h=(0,s.useMemo)(()=>c.filter(e=>void 0!==e).map(e=>eE(e)),[c]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(o.A,{children:[(0,i.jsx)(r.A,{variant:"heading3",component:"h2",sx:{paddingBottom:"32px"},children:x}),(0,i.jsxs)(d.A,{container:!0,sx:{alignItems:"center"},children:[(0,i.jsx)(d.A,{size:{xs:12,md:8},sx:{pr:{md:"24px"},mb:{xs:"20px"}},children:u}),(0,i.jsx)(d.A,{size:{xs:12,md:4},sx:{"& .MuiGrid-item":{marginLeft:"auto"}},children:(0,i.jsx)(B.default,{componentContent:p,"data-testid":"port-out-btn",onClick:()=>{a(!0)}})})]})]}),(0,i.jsxs)(O.z,{sx:{'.MuiDialog-container > [role = "dialog"]':{maxWidth:"628px"}},componentContent:l,onClose:()=>{a(!1)},open:n,children:[(0,i.jsx)(o.A,{display:"flex",flexWrap:{xs:"wrap",md:"unset"},sx:{marginBottom:5,marginTop:2,paddingX:4,justifyContent:h.length<2?"center":"space-between"},children:h.map((e,t)=>(0,i.jsx)(o.A,{"data-testid":"offer-".concat(t),sx:{width:"235px"},marginTop:t?{xs:"20px",md:"unset"}:"unset",children:(0,i.jsx)(eC.DG,{offer:e})},"offer-".concat(t)))}),(null==l?void 0:l.fields.description)&&(0,i.jsx)(S.s,{content:l.fields.description})]})]})},eT=e=>{let{content:t,recurringPayments:n,handleModalOpen:s}=e,a=(0,c.A)();return(0,i.jsxs)(o.A,{paddingBottom:"32px",children:[(0,i.jsx)(r.A,{variant:"heading3",component:"h2",sx:{paddingBottom:"32px"},children:t.recurringPaymentsActiveTitle}),(0,i.jsx)(o.A,{display:"flex",flexDirection:"column",rowGap:"24px",children:n.map(e=>(0,i.jsxs)(d.A,{container:!0,sx:{alignItems:"center"},children:[(0,i.jsxs)(d.A,{size:{xs:12,md:8},sx:{alignItems:"flex-start",display:"flex"},children:[(0,i.jsx)(C.In,{"aria-hidden":"true",name:"sync",sx:{width:24,minWidth:24,height:"auto",marginRight:"12px"},color:a.palette.success.main}),(0,i.jsxs)(o.A,{display:"flex",flexDirection:"column",marginRight:2,children:[(0,i.jsx)(r.A,{whiteSpace:{xs:"break-spaces",md:"break-spaces"},children:(0,F.GJ)({autoRefillDate:e.nextPaymentDate.replaceAll("-","â"),sumVal:e.amount.toString(),text:t.recurringPaymentsNextPaymentText})}),(0,i.jsx)(r.A,{textTransform:"capitalize",fontWeight:"bold",children:"".concat(e.brand," (").concat(e.number,")")})]})]}),(0,i.jsx)(d.A,{size:{xs:12,md:4},sx:{pt:{xs:"12px",md:"0"},"& .MuiGrid-item":{marginLeft:"auto"}},children:(0,i.jsx)(B.default,{"data-testid":"delete-recurring-btn",onClick:()=>s(e.recurringPaymentId,"recurringPaymentDeleteModal"),type:"button",componentContent:t.recurringPaymentsDeleteButton})})]},e.recurringPaymentId))})]})};var eP=n(82942);let eN=e=>{var t,n,s,a,l;let{content:d,recurringPayments:c}=e;return(0,i.jsxs)(o.A,{children:[(void 0===c||0===c.length)&&(0,i.jsx)(r.A,{variant:"heading3",component:"h2",sx:{paddingBottom:"32px"},children:d.recurringPaymentsTitle}),(0,i.jsx)(r.A,{sx:{paddingBottom:"22px"},children:c&&c.length>0?d.recurringPaymentsDescription:d.recurringPaymentsEmptyDescription}),(0,i.jsx)(eP.E,{"data-testid":(0,ea.G)(d,"link_to_topup"),href:null==(t=d.reccuringPaymentsTurnOnCta)?void 0:t.fields.url,"aria-label":null==(n=d.reccuringPaymentsTurnOnCta)?void 0:n.fields.description,title:null==(s=d.reccuringPaymentsTurnOnCta)?void 0:s.fields.description,color:"inherit",hoverColor:"inherit",underline:"none",textBtn:!0,sx:{display:"block",padding:"unset",paddingRight:"5px"},children:(0,i.jsxs)(o.A,{display:"flex",alignItems:"center",children:[(0,i.jsx)(r.A,{fontWeight:700,fontSize:"14px",children:null==(a=d.reccuringPaymentsTurnOnCta)?void 0:a.fields.title}),(0,i.jsx)(C.In,{name:"chevron-right",size:"xs",allyTitle:null==(l=d.reccuringPaymentsTurnOnCta)?void 0:l.fields.rightIcon})]})})]})};var ew=n(32595);let eS=e=>{let{account:t,content:n,currentAccount:a}
1=e,[l,o]=(0,s.useState)(null==t?void 0:t.settings.roamingStatus),[r,{loading:d}]=(0,D.n)(G.nP,{onCompleted:e=>{let{changeRoaming:t}=e;o(t.roamingStatus)}});return(0,s.useEffect)(()=>{(null==t?void 0:t.settings)&&o(t.settings.roamingStatus)},[t]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(em,{content:n,phoneNumber:null==t?void 0:t.ownedAsset.phoneNumber,userPhoneNumberProfile:null==t?void 0:t.ownedAsset.userPhoneNumberProfile,validTo:null==t?void 0:t.validTo}),(0,i.jsx)(ev,{content:n,status:l,account:a,inProgress:"ACTIVATION_IN_PROGRESS"===l||"DEACTIVATION_IN_PROGRESS"===l,loading:d,onChange:()=>{if("ACTIVE"===l||"INACTIVE"===l){let e="INACTIVE"===l;r({variables:{on:e}}),ew.A.roamingStatusChanged(e?"on":"off")}}}),(0,i.jsx)(eh,{content:n,pinCode:null==t?void 0:t.settings.simPIN,pukCode:null==t?void 0:t.settings.simPUK}),(0,i.jsx)(eI,{content:n})]})};var eR=n(86080),ek=n(77797),e_=n(45798),eM=n(96242),eD=n(83589),eL=n(56390);let eB=(0,J.Ay)(o.A)(e=>{let{theme:t}=e;return{display:"flex",gap:"16px",flexDirection:"row",flexWrap:"wrap",[t.breakpoints.down("md")]:{flexDirection:"column"}}}),eO=(0,J.Ay)(o.A,{shouldForwardProp:e=>"isExpired"!==e})(e=>{let{theme:t,isExpired:n}=e;return{backgroundColor:n?t.palette.grey[50]:t.palette.common.white,border:"1px solid ".concat(t.palette.grey[100]),borderRadius:"4px",display:"flex",flexDirection:"column",height:"112px",width:"calc(50% - 8px)",opacity:n?.7:1,padding:"16px 16px 24px 24px",rowGap:"8px",[t.breakpoints.down("md")]:{width:"100%"}}}),eG=(0,J.Ay)(o.A)(()=>({display:"flex",flexDirection:"row",columnGap:"8px",alignItems:"center"})),ez=(0,J.Ay)(o.A)(()=>({alignItems:"center",display:"flex",height:"44px",justifyContent:"center",minWidth:"44px",width:"44px"})),eF=(0,J.Ay)(o.A,{shouldForwardProp:e=>"isExpired"!==e})(e=>{let{theme:t,isExpired:n}=e;return{fontSize:"14px",color:n?t.palette.error.main:t.palette.common.black}}),eU=e=>{let{content:t,savedCards:n,handleDeleteModalOpen:a,handleAddCardModalOpen:l}=e,d=(0,c.A)(),[p,u]=(0,s.useState)([]),x=n&&n.length>0;return(0,s.useEffect)(()=>{let{expiredStoredCards:e,validStoredCards:t}=(0,e_.Tz)(n);u([...t.map(e=>({...e,isExpired:!1})),...e.map(e=>({...e,isExpired:!0}))])},[n]),(0,i.jsxs)(o.A,{children:[(0,i.jsx)(r.A,{variant:"heading3",component:"h2",sx:{paddingBottom:"32px"},children:t.savedCardsTitle}),x?(0,i.jsx)(eB,{children:null==p?void 0:p.map(e=>(0,i.jsxs)(eO,{"data-testid":e.isExpired?"expired-card":"valid-card",isExpired:e.isExpired,children:[(0,i.jsxs)(o.A,{display:"flex",justifyContent:"space-between",children:[(0,i.jsxs)(eG,{children:[(0,i.jsx)(o.A,{children:(e=>{var n,s;if(!["visa","mastercard","maestro","mc"].includes(e.toLocaleLowerCase()))return null;let a=t[(0,e_.Jx)(e)],l=null==a||null==(s=a.fields)||null==(n=s.file)?void 0:n.url;return l?(0,i.jsx)(ez,{children:(0,i.jsx)("img",{"data-testid":"payments-settings__card-logo",src:l,height:"100%",width:"100%",alt:a.fields.title})}):null})(e.variant)}),(0,i.jsxs)(r.A,{fontWeight:"bold",color:d.palette.common.black,children:["â¢â¢â¢â¢ ",e.cardInfo.number]})]}),(0,i.jsx)(eL.a,{sx:{width:"44px",height:"44px"},iconName:"delete",onClick:()=>a(e.cardDetailsReference,"savedCardDeleteModal"),testId:"delete-icon"})]}),(0,i.jsx)(eF,{isExpired:e.isExpired,children:(0,F.H5)(e,t)})]},e.cardDetailsReference))}):(0,i.jsxs)(r.A,{children:[" ",t.savedCardsDesciption]}),(0,i.jsx)(B.default,{"data-testid":(0,ea.G)(t,"add-new-card-btn"),onClick:l,componentContent:t.addNewPaymentCardButton,sx:{marginTop:"16px",maxWidth:{md:"calc(50% - 8px)"}}})]})},eV=e=>{let{account:t,content:n,checkAccLoading:l,setDropinRedirectProcessing:r,setTopLevelAlertNotification:d}=e,c=(0,a.useRouter)(),{result:p}=c.query,[u]=(0,w.fp)(W.mi),x=(0,s.useRef)(null),[h,m]=(0,s.useState)(!1),[g,f]=(0,s.useState)(),[A,v]=(0,s.useState)(),[b,y]=(0,s.useState)(""),[C,E]=(0,s.useState)(!1),[I,T]=(0,s.useState)(void 0),P=(null==t?void 0:t.settings.recurringPayments)&&(null==t?void 0:t.settings.recurringPayments.length)>0,N=b?n[b]:void 0,S=C?n.cardAddingConfirmationModal:void 0,{checkoutConfig:R,dropinConfig:k}
1=(0,eD.U)({pageContent:n.newPaymentCardDetails,paymentMethodsResponse:A,isCardSavingEnabled:!1,setLoading:m});(0,eM.m)({setRedirectProcessing:r,result:p,checkAccLoading:l,setAddCardModalOpen:E,setTopLevelAlertNotification:d});let[_]=(0,D.n)(G.Ap,{onCompleted:e=>B(e),onError:(0,q.K)(()=>c.push(V.pp))}),[M]=(0,D.n)(G.Xx,{onCompleted:e=>B(e),onError:(0,q.K)(()=>c.push(V.pp))}),L=(e,t)=>{y(t),T(e)},B=e=>{y(""),T(void 0);let t="deleteSavedCard"in e?U.Z.CARD_DELETE_SUCCESS:U.Z.RECURRING_DELETE_SUCCESS,n="deleteSavedCard"in e?U.Z.CARD_DELETE_ERROR:U.Z.RECURRING_DELETE_ERROR,{isRemoved:i}="deleteSavedCard"in e?e.deleteSavedCard:e.deleteRecurringPayments[0];i?z.S.refetchQueries({include:[G.tI]}).then(()=>{d(t)}).catch(()=>c.push(V.pp)):d(n)};return(0,s.useEffect)(()=>{A&&(0,e_.B7)({checkoutConfig:R,dropinConfig:k,showStoredPaymentMethods:!1,setLoading:m,dropinContainer:x,setDropinEl:f}).catch(()=>{c.push(V.pp)})},[A]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.A,{"data-testid":"payments-settings-section",children:(0,i.jsxs)(o.A,{rowGap:{xs:6,md:7},display:"flex",flexDirection:"column",children:[(0,i.jsxs)(o.A,{children:[P&&(0,i.jsx)(eT,{content:n,recurringPayments:null==t?void 0:t.settings.recurringPayments,handleModalOpen:L}),(0,i.jsx)(eN,{content:n,recurringPayments:null==t?void 0:t.settings.recurringPayments})]}),(0,i.jsx)(eU,{content:n,savedCards:null==t?void 0:t.settings.cardsDetails,handleDeleteModalOpen:L,handleAddCardModalOpen:()=>{E(!0),m(!0),(0,eR.ge)().then(e=>{var t;v({paymentMethods:e.paymentMethods.filter(e=>"scheme"===e.type),storedPaymentMethods:null==(t=e.storedPaymentMethods)?void 0:t.filter(e=>"scheme"===e.type)})}).catch(()=>{c.push(V.pp),m(!1)})}})]})}),b&&(0,i.jsx)(O.z,{"data-testid":"recurringPaymentDeleteModal"===b?"delete-recurring-modal":"delete-card-modal",sx:{'.MuiDialog-container > [role = "dialog"]':{maxWidth:"628px"}},componentContent:N,open:!!b,onClose:()=>{y(""),T(void 0)},onConfirm:()=>(d(void 0),"recurringPaymentDeleteModal"===b?_({variables:{recurringPaymentIds:I?[I]:[]}}):M({variables:{cardReference:null!=I?I:""}}))}),C&&(0,i.jsxs)(O.z,{"data-testid":"add-new-card-modal",sx:{".MuiPaper-root":{minHeight:"540px",position:"relative"}},componentContent:S,open:C,onClose:()=>E(!1),onConfirm:()=>{g&&(0,F.n0)({dropinEl:g,phoneNumber:u,router:c,setLoading:m,setTopLevelAlertNotification:d,setAddCardModalOpen:E})},children:[h&&(0,i.jsx)(ek.ms,{container:!0,"data-testid":(0,ea.G)(S,"loader"),children:(0,i.jsx)(ek.gX,{children:(0,i.jsx)(j.fq,{})})}),(0,i.jsx)(ek.NY,{position:"relative",cardAutorefill:!1,isOnlyOnePaymentMethod:!0,children:(0,i.jsx)(o.A,{ref:x})})]})]})},eW=e=>{let{activeSectionId:t,activeItem:n,account:s,currentAccount:a,checkAccLoading:l,errorValue:o,setDropinRedirectProcessing:r,setTopLevelAlertNotification:d}=e;switch(t){case"accountSettings":return(0,i.jsx)(eo,{content:n.fields,phoneNumber:null==s?void 0:s.ownedAsset.phoneNumber,ownershipType:null==s?void 0:s.ownedAsset.ownershipType,validFrom:null==s?void 0:s.validFrom,email:null==s?void 0:s.settings.email,userPhoneNumberProfile:null==s?void 0:s.ownedAsset.userPhoneNumberProfile,setTopLevelAlertNotification:d});case"simCardSettings":return(0,i.jsx)(eS,{content:n.fields,account:s,currentAccount:a});case"paymentsSettings":return(0,i.jsx)(eV,{account:s,checkAccLoading:l,content:n.fields,setDropinRedirectProcessing:r,setTopLevelAlertNotification:d});case"consentsSettings":var c;return(null==s||null==(c=s.settings)?void 0:c.consents)?(0,i.jsx)(ey,{content:n.fields,account:s}):(0,i.jsx)($,{children:(null==o?void 0:o.fields)&&(0,i.jsx)(M.R,{iconName:o.fields.icon,title:o.fields.title,description:o.fields.text,titleComponentType:"h2"})});default:return null}};var eK=n(31221);let eH=e=>{var t,n,i;if(!e)return!1;let s=null==e||null==(i=e.sys)||null==(n=i.contentType)||null==(t=n.sys)?void 0:t.id;return"accountSettings"===s||"paymentsSettings"===s||"simCardSettings"===s||"consentsSettings"===s},eq=e=>{var t,n,l;let{selectedSectionSysId:r,selectedSectionItems:d,checkAccLoading:p,setDropinRedirectProcessing:u}=e,[x]=(0,w.fp)(W.mi),h="string"==typeof x&&""!==x.trim(),m=(0,c.A)(),g=(0,a.useRouter)(),f=(e=>"string"==typeof e?e:void 0)(g.query.unlinkedPhoneNumber),[A,v]=(0,s.use
1State)(void 0),y=(0,s.useRef)(null),{isHideOnScrollTrigger:C}=(0,s.useContext)(_.D),E=d.find(eH),I=null==E||null==(l=E.sys)||null==(n=l.contentType)||null==(t=n.sys)?void 0:t.id,T=d.find(e=>{var t,n,i;return(null==e||null==(i=e.sys)||null==(n=i.contentType)||null==(t=n.sys)?void 0:t.id)==="value"}),M=A?((e,t)=>{var n,i,s,a,l,o,r,d;return t?(null==(s=t.sys)||null==(i=s.contentType)||null==(n=i.sys)?void 0:n.id)==="paymentsSettings"&&e in t.fields?null==(r=t.fields[e])?void 0:r.fields:(null==(o=t.sys)||null==(l=o.contentType)||null==(a=l.sys)?void 0:a.id)==="accountSettings"&&e in t.fields?null==(d=t.fields[e])?void 0:d.fields:void 0:null})(A,E):null,D=M&&(0,H.L)(M.text,{"@phoneNumber":f?(0,K.n)(f):""}),L=()=>{v(e=>e===A?void 0:e)},{data:B,loading:O}=(0,N.I)(G.tI,{skip:!h,variables:h?{accountId:x}:void 0,fetchPolicy:"no-cache",onError:(0,q.K)(()=>g.push(V.pp))});(0,s.useEffect)(()=>{A&&L()},[r]),(0,s.useEffect)(()=>((0,eK.yf)(y),A&&(y.current=setTimeout(L,15e3)),()=>(0,eK.yf)(y)),[A]),(0,s.useEffect)(()=>{v(f?U.Z.UNLINK_PHONE_NUMBER_SUCCESS:void 0)},[f]);let z=B?B.account:void 0;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(b.A,{children:(0,i.jsxs)(o.A,{sx:{py:{xs:4,md:5},px:{xs:3,md:5},position:"relative",zIndex:10},"aria-busy":O?"true":"false",children:[O&&(0,i.jsx)(j.Th,{"aria-live":"polite"}),E&&I&&(0,i.jsx)(eW,{activeSectionId:I,activeItem:E,account:z,currentAccount:x,checkAccLoading:p,errorValue:T,setDropinRedirectProcessing:u,setTopLevelAlertNotification:v})]})}),A&&M&&(0,i.jsx)(k.Cd,{isHideOnScrollTrigger:C,type:M.type,children:(0,i.jsx)(R.CustomizableNotification,{sx:k.hO,type:M.type,icon:R.NotificationIcons[M.type],testId:"profile-settings-notification-".concat(M.type),title:M.title,de
1scription:D?(0,i.jsx)(S.s,{content:D,sx:{[P.MARKS.BOLD]:{whiteSpace:"nowrap",fontWeight:"bold",color:m.palette.common.black}}}):null,isCloseable:M.showCloseButton,onClose:L})})]})};var eX=n(44185);let eY=(e,t)=>{var n;return(null!=(n=e.fields.containerKey)?n:"").trim()||"section".concat(t)},eZ=e=>{var t,n,u,x,h,m,g,f;let{pageContent:b,checkAccLoading:y}=e,C=(0,c.A)(),E=(null!=(h=b.fields.sections)?h:[]).filter(e=>null!=e),I=b.fields.id===eX.s.HELP_PAGE,P=b.fields.id===eX.s.PROFILE_SETTINGS_PAGE,N=(0,l.A)(e=>e.breakpoints.down("lg")),w=(0,a.useRouter)(),S=null==(t=w.query)?void 0:t.tab,R=w.isReady&&"string"==typeof S&&""!==S.trim()?S.trim():void 0,k=E[0]?eY(E[0],0):"section0",[_,M]=(0,s.useState)(k),[D,L]=(0,s.useState)(!1),B=E.map((e,t)=>{var n;return{label:null!=(n=e.fields.title)?n:"",id:eY(e,t)}}),O=null!=(g=null!=(m=E.find((e,t)=>eY(e,t)===_))?m:E[0])?g:null,G=null!=(f=null==O?void 0:O.fields.items)?f:[],z=G.find(eH),F=null==z||null==(x=z.sys)||null==(u=x.contentType)||null==(n=u.sys)?void 0:n.id,U=D&&z&&"paymentsSettings"===F,V=async e=>{let t=new URL(globalThis.location.href);t.search="",t.hash="",await w.replace(t.pathname),M(e)};return(0,s.useEffect)(()=>{w.isReady&&R&&M(e=>e===R?e:R)},[w.isReady,R]),(0,i.jsxs)(o.A,{children:[(0,i.jsxs)(o.A,{paddingTop:{xs:3,lg:5},position:"relative","aria-busy":U?"true":"false",children:[U&&(0,i.jsx)(j.Th,{"aria-live":"polite",sx:{top:"5px",bottom:"-5px",zIndex:100,backgroundColor:"".concat((0,p.X4)(C.palette.grey[50],.84)),".loader-with-text-wrapper":{top:"10%"}},title:z.fields.cardAddingInProgressTitle,description:z.fields.cardAddingInProgressDescription}),(0,i.jsx)(r.A,{variant:"heading1",marginBottom:{lg:5,xs:4},component:"h1",children:b.fields.title}),(0,i.jsxs)(d.A,{container:!0,sx:{position:"relative"},children:[(0,i.jsx)(d.A,{size:{lg:3,xs:12},children:(0,i.jsx)(A,{links:B,onTabSelected:V,selected:_})}),O&&G.length>0&&(0,i.jsxs)(d.A,{size:{xs:12,lg:7},sx:{mt:{xs:3,lg:"unset"}},role:"tabpanel",id:"tabpanel-".concat(_),"aria-labelledby":N?"selected-label":"tab-".concat(_),children:[I&&(0,i.jsx)(T,{selectedSectionItems:G}),P&&(0,i.jsx)(eq,{selectedSectionSysId:O.sys.id,selectedSectionItems:G,checkAccLoading:y,setDropinRedirectProcessing:L})]})]})]}),b.fields.quickLinks&&(0,i.jsx)(o.A,{mt:5,children:(0,i.jsx)(v.y,{entry:b.fields.quickLinks,field:"quick-links"})})]})}}}]);
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.