PageSourceSearch

https://www.ezys.lt/_next/static/chunks/7819.6146058ebd277bf4.js

js ezys.lt collected 2026-10-01 16:35:12 UTC 70,839 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1946,7819],{5391:(e,t,n)=>{n.d(t,{LE:()=>u,S$:()=>d,Ul:()=>s,sQ:()=>c});var i=n(82777),r=n(66438),a=n(93717),o=n(39946),l=n(23971);let s=(0,r.Ay)(o.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,r.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,r.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}),u=(0,r.Ay)(l.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"},5759:(e,t,n)=>{n.d(t,{K:()=>i});let i=e=>t=>{let{networkError:n}=t;n&&"response"in n&&401===n.response.status||e()}},9128:(e,t,n)=>{n.d(t,{V:()=>u,R:()=>R});var i=n(64177),r=n(14232),a=n(63172),o=n(70828),l=n(76448),s=n(98696),d=n(56912);let c=e=>async()=>{await s.S.resetStore(),e&&s.S.refetchQueries({include:[o.N1]})},u=()=>{let[,e]=(0,a.fp)(l.mi),[t]=(0,i.n)(o.tM);return(0,r.useCallback)(function(n){let i=!(arguments.length>1)||void 0===arguments[1]||arguments[1];s.S.clearStore(),t({variables:{phoneNumber:n},onCompleted:t=>{let{switchPhoneNumber:{currentPhoneNumber:i,switchPhoneNumberStatus:r}}=t;e(i),r===o.uK.MISSING_PHONE_NUMBER&&(globalThis.location.href="".concat(d.Bw,"?phoneNumber=").concat(n))}}).then(c(i)).catch(c(i))},[t,e])};var p=n(89099),E=n(77663),h=n(31221),f=n(88975),m=n(26229),A=n(55542);let x=null,R=(e,t)=>{let n=(0,p.useRouter)(),i=n.asPath.includes("extra"),o=e&&(0,h.$_)(e,t),s=(0,f.UA)(n.asPath,d.D2,d.tx,d.l6),c=(0,f.UA)(n.asPath,d.pp,d.$,d.x8),[u,R]=(0,r.useState)(!i),[g,_]=(0,r.useState)([]),[,S]=(0,a.fp)(l.mi),[,C]=(0,a.fp)(l.wh),[,I]=(0,a.fp)(E.I),T=async()=>{m.gB.get(d.Hr.CHECK_AUTHORIZATION_STATUS).then(e=>{var t,i,r,a,l,d,c;R(!1);let u=null!=(a=null==(t=e.ownedAsset)?void 0:t.phoneNumber)?a:"",p=null!=(l=e.partnerId)?l:"",E=null!=(d=null==(i=e.ownedAssets)?void 0:i.map(e=>e.phoneNumber))?d:[],h=null!=(c=e.ownedAssets)?c:[];if(document.cookie="userAuthId=".concat(p,"; path=/"),S(u),I(p),C(E),_(h),!e.isAuthorized&&o)return void(0,A.Ow)();!(null==(r=e.ownedAsset)?void 0:r.phoneNumber)&&e.isAuthorized&&o&&n.push("".concat(s,"?redirectPath=").concat(n.asPath)),(e=>{globalThis.LiveChatWidget&&null!=e&&x!==e&&(globalThis.LiveChatWidget.call("set_session_variables",e),x=e)})(e.liveChatSignature)}).catch(()=>n.push(c))};return(0,r.useEffect)(()=>{if(!1!==n.isReady)return i||T(),globalThis.addEventListener("refresh-user-data",T),()=>{globalThis.removeEventListener("refresh-user-data",T)}},[i,n.isReady]),{loading:u,accountProfiles:g}}},15956:(e,t,n)=>{n.d(t,{Z:()=>i});let i=e=>{globalThis.dataLayer=globalThis.dataLayer||[],globalThis.dataLayer.push({event:e})}},17656:(e,t,n)=>{n.r(t),n.d(t,{FormPageContentRenderer:()=>tA});var i=n(37876),r=n(89099),a=n(14232),o=n(63172),l=n(64177),s=n(73665),d=n(42008),c=n(82777),u=n(5550),p=n(72506),E=n(42498),h=n(66438);let f=(0,h.Ay)(u.A)(e=>{let{theme:t}=e;return{".MuiStepConnector-root .MuiStepConnector-line":{borderColor:t.palette.grey[100]}}}),m=e=>{let{currentStep:t,steps:n}=e,r=(0,s.A)();return n.length>1?(0,i.jsx)(d.A,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",height:"48px"},children:(0,i.jsx)(f,{activeStep:-1,children:n.map((e,n)=>(0,i.jsx)(p.A,{sx:{".MuiSvgIcon-root":{color:r.palette.grey[50],fontSize:"1.37rem",".MuiStepIcon-text":{fill:r.palette.grey[500],fontSize:"8px",fontWeight:700}},"&:first-of-type":{paddingLeft:"unset",".MuiStepLabel-iconContainer":{paddingLeft:{xs:2}}},"&:last-of-type":{paddingRight:"unset",".MuiStepLabel-iconContainer":{paddingRight:{xs:2}}},"&.completed":{".MuiSvgIcon-root":{opacity:.5,".MuiStepIcon-text":{fill:r.palette.common.white}}},".Mui-active":{".MuiSvgIcon-root":{".MuiStepIcon-text":{fill:r.palette.common.white}}}},active:n<=t,className:n<t?"completed":"",children:(0,i.jsx)(E.A,{sx:{transform:"scale(2)",".MuiStepLabel-iconContainer":{paddingLeft:{xs:3},paddingRight:{xs:3}}}})},e))})}):null};var A=n(80861),x=n(2213),R=n(82942),g=n(92874),_=n(23971),S=n(5759),C=n(38529),I=n(31221),T=n(76448),N=n(70828),v=n(74416),y=n(9128),O=n(76305),b=n(20051),j=n(21627),D=n(29775),L=n(34963),M=n(30768),k=n(56912),P=n(28486),w=n(51257);let U=()=>{let{redirectPath:e}=(0,r.useRouter)().query;return{redirectPathWithSlash:e&&("/"===e[0]?e:"/".concat(e))}};var F=n(19505),B=n(9339),G=n(55373),V=n(91408);let Y=V.Ik().shape({[G.Yi.PHONE]:V.Yj().required(j.F.REQUIRED).test("isValid",j.F.INVALID,e=>e?/^\d{8}$/.test(e):void 0==e)}),H=V.Ik().shape({[G.aQ.SECURITY_CODE]:V.Yj().required(j.F.REQUIRED).test("isValid",j.F.INVALID,e=>e?/^\d{6}$/.test(e):void 0==e)});var K=n(9620),z=n(21402),W=n(83133);let q=e=>{let{pageContent:t,addRouterQueryParam:n=!1,phoneNumber:r,withBackgroun
1d:a=!0}=e,o=(0,s.A)(),{getValue:l}=(0,A.aU)(),u=(0,I.df)(t,B.bc.INFO_FOR_NEW_EZYS);if(!u)return null;let p=n?"".concat(u.fields.url,"?flow=").concat(G.n7.REGISTRATION,"&phoneNumber=").concat(r):u.fields.url,E=a?W.yY:W.lo;return(0,i.jsx)(d.A,{sx:{...E,backgroundColor:a?o.palette.grey[50]:"transparent",padding:2*!!a,width:"100%"},children:(0,i.jsxs)(d.A,{sx:{display:"flex",flexDirection:a?"column":"row",alignItems:a?"center":"flex-start",flexWrap:a?"nowrap":"wrap",minWidth:0,width:"100%",gap:1},children:[(0,i.jsx)(c.A,{variant:"paragraph1",fontWeight:700,sx:{whiteSpace:a?"normal":"pre-line"},children:l(A.d_.doYouHaveQuestions)}),(0,i.jsx)(R.E,{"data-testid":(0,C.G)(t,"prompt_to_read_info"),"aria-label":u.fields.description,title:u.fields.description,href:p,color:"inherit",sx:{padding:"unset",paddingRight:"5px",textAlign:a?"center":"left"},children:(0,i.jsx)(c.A,{variant:"paragraph1",children:u.fields.title})})]})})},Z=(0,a.forwardRef)(function(e,t){var n;let{pageContent:a,phoneNumber:l,customInputError:c,notification:u,activeInterval:p,linkPhoneLoading:E,setNotification:h,resetInterval:f,setPhoneNumber:m,setModalOpen:x,setCustomInputError:R,onSubmit:g}=e,{getValue:S}=(0,A.aU)(),N=(0,s.A)(),v=(0,I.MK)(F.p.REGISTRATION_ENTER_NUMBER,a.forms),y=(0,I.p3)(B.Zh.ENTER_NUMBER,v),O=(0,I.If)(a.notifications,u),V=null!==p,[H]=(0,o.fp)(T.mi),W=(0,b.Wx)({initialValues:{[G.Yi.PHONE]:l},validateOnChange:!0,validateOnBlur:!1,validationSchema:Y,onSubmit:g}),Z=(0,r.useRouter)(),{errors:Q,handleChange:J}=W,{redirectPathWithSlash:X}=U(),$=X&&X!==k.$h?X:null==v||null==(n=v.fields.secondaryButton)?void 0:n.fields.url,ee=async()=>{Object.keys(await W.validateForm()).length||W.submitForm()},et=E||V||u===G.$L.REGISTRATION_NUMBER_ACTIVATED||u===G.$L.REGISTRATION_NUMBER_ACTIVATED_UNAUTH||u===G.$L.REGISTRATION_NUMBER_ACTIVATION_IN_PROGRESS,en=(0,K.qG)(V,u);return v?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(d.A,{width:"100%",display:"flex",flexDirection:"column",rowGap:V?4:2,children:[(0,i.jsxs)(d.A,{display:"flex",flexDirection:"column",rowGap:2,children:[(0,i.jsx)(j.k,{"data-testid":(0,C.G)(a,"phone-number-input"),value:l,isPhoneNumber:!0,componentContent:y,name:G.Yi.PHONE,errorKind:Q[G.Yi.PHONE]||c,onChange:e=>{(0,K.jy)(e,R,h,f,m,J)},fullWidth:!0,sx:{".MuiInputBase-input":{paddingLeft:"5px"}}}),(0,i.jsxs)(d.A,{display:"flex",justifyContent:"end",columnGap:1,children:[(0,i.jsx)(_.In,{"aria-hidden":"true",name:"info",size:"sm"}),(0,i.jsx)(w.a,{color:N.palette.common.black,hoverColor:N.palette.common.black,padding:"0 !important",onClick:()=>x(G.te.REGISTRATION_WHERE_TO_FIND_NUMBER),children:S(A.d_.whereToFindNumber)})]}),en&&O&&(0,i.jsx)(L.CustomizableNotification,{type:O.fields.type,icon:L.NotificationIcons[O.fields.type],testId:"".concat(G.uJ.ENTER_NUMBER,"-").concat(O.fields.type),title:O.fields.title,description:(0,i.jsx)(M.s,{content:O.fields.text}),isCloseable:O.fields.showCloseButton,isDynamic:!0}),(0,i.jsx)(z.r,{ref:t,counterActive:V,countDownId:G.RI,text:S(A.d_.tryAgainAfter)})]}),(0,i.jsx)(q,{pageContent:a})]}),(!!v.fields.primaryButton||!!v.fields.secondaryButton)&&(0,i.jsxs)(d.A,{display:"flex",flexDirection:"column",rowGap:2,width:"100%",children:[!!v.fields.primaryButton&&(0,i.jsx)(D.default,{disabled:et,type:"submit","data-testid":(0,C.G)(a,"submit-phone-step-btn"),componentContent:v.fields.primaryButton,onClick:ee}),!!H&&!!v.fields.secondaryButton&&(0,i.jsx)(D.default,{type:"button",onClick:e=>{e.preventDefault(),X&&(X.includes(k.hd)||X.includes(k.b2)||X.includes(k.TZ))&&(0,P.qf)(),$&&Z.push($)},url:$,"data-testid":(0,C.G)(a,"cancel-step-btn"),componentContent:v.fields.secondaryButton})]})]}):null}),Q=(0,h.Ay)(d.A)(e=>{let{theme:t}=e;return{display:"flex",flexDirection:"column",rowGap:t.spacing(4),width:"100%"}}),J=(0,h.Ay)(d.A)(e=>{let{theme:t}=e;return{[t.breakpoints.up("xs")]:{paddingBottom:t.spacing(3),width:"100%"},[t.breakpoints.up("md")]:{paddingBottom:t.spacing(6),width:"410px"},display:"flex",alignItems:"center",flexGrow:1,margin:"0 auto",flexDirection:"column"}}),X=(0,h.Ay)(d.A)(e=>{let{theme:t}=e;return{display:"flex",flexDirection:"column",paddingTop:t.spacing(3),rowGap:t.spacing(2),width:"100%"}}),$=(0,h.Ay)(d.A)(()=>({overflow:"hidden",margin:"16px 0 8px",textAlign:"center",width:"100%"})),ee=(0,h.Ay)(d.A)(e=>{let{theme:t}=e;return{display:"flex",flexDirection:"column",marginTop:t.spacing(1.5),rowGap:t.spacing(3),width:"100%"}});var et=n(29333),en=n(64397),ei=n(88231);let er=(0,a.forwardRef)(function(e,t){let{phoneNumber:n,pageContent:r,securityCode:o,activeInterval:l,notification:u,customInputError:p,verifyPhoneLinkLoading:E,setCustomInputError:h,resendCode:f,onSubmit:m,setSecurityCode:x}=e,g=(0,I.If)(r.notifications,u),_=(0,I.MK)(F.p.REGISTRATION_LINK_SIM_ENTER_CODE,r.forms),S=(0,I.p3)(B.Zh.ENTER_CODE,_),T=(0,I.df)(r,B.bc.SEND_AGAIN),N=(0,s.A)(),{getValue:v}=(0,A.aU)(),y=null!==l,O=(0,b.Wx)({initialValues:{[G.aQ.SECURITY_CODE]:o},validateOnChange:!0,validateOnBlur:!1,validationSchema:H,onSubmit:m}),{errors:k,handleChange:P}=O,{abortWebOTP:w}=(e=>{let t=(0,a.useMemo)(()=>new AbortController,[]),n=(0,a.useRef)(e),i=(0,a.useCallback)(()=>{"OTPCredential"in globalThis&&navigator.credentials.get({otp:{transport:["sms"]},signal:t.signal}).then(e=>{(null==e?void 0:e.code)&&n.current(e.code)}).catch(e=>{if("AbortError"===e.name)return})},[t.signal]);return(0,a.useEffect)(()=>{i(),setTimeout(()=>{t.abort()},3e4)},[t,i]),{abortWebOTP:()=>t.abort()}})(e=>{e&&(setTimeout(()=>{x(e)},0),P(e))}),U=async()=>
1{Object.keys(await O.validateForm()).length||(O.submitForm(),w())},V=u&&g&&(0,ei.L)(null==g?void 0:g.fields.text,{"@phoneNumber":(0,en.n)(n)}),Y=V&&(0,K.Qs)(y,u),q=y&&u===G.$L.REGISTRATION_CODE_LIMIT_REACHED||E;return _?(0,i.jsxs)(d.A,{width:"100%",display:"flex",flexDirection:"column",rowGap:y?4:2,children:[(0,i.jsxs)(d.A,{display:"flex",flexDirection:"column",rowGap:2,children:[(0,i.jsx)(j.k,{inputProps:{inputMode:"numeric",autoComplete:"one-time-code"},type:"text","data-testid":(0,C.G)(r,"security-code-input"),value:o,componentContent:S,name:G.aQ.SECURITY_CODE,errorKind:k[G.aQ.SECURITY_CODE]||p,onChange:e=>{(0,K.GO)(e,h,x,P)},fullWidth:!0}),Y&&(0,i.jsx)(L.CustomizableNotification,{type:g.fields.type,icon:L.NotificationIcons[g.fields.type],testId:"".concat(G.uJ.LINK_SIM_ENTER_CODE,"-").concat(g.fields.type),title:g.fields.title,description:(0,i.jsx)(M.s,{content:V,sx:{[et.MARKS.BOLD]:{whiteSpace:"nowrap",fontWeight:"bold",color:N.palette.common.black}}}),isCloseable:g.fields.showCloseButton,isDynamic:!0}),!y&&T&&(0,i.jsxs)(d.A,{sx:{...W.yY,backgroundColor:N.palette.grey[50],padding:2},children:[(0,i.jsx)(c.A,{variant:"paragraph1",children:v(A.d_.didNotGetCode)}),(0,i.jsx)(R.E,{"data-testid":(0,C.G)(r,"prompt_to_resend_code"),"aria-label":T.fields.description,title:T.fields.description,color:"inherit",sx:{padding:"unset",paddingRight:"5px"},onClick:f,children:(0,i.jsx)(c.A,{variant:"paragraph1",children:T.fields.title})})]}),(0,i.jsx)(z.r,{ref:t,counterActive:y,countDownId:G.RI,text:v(A.d_.tryAgainAfter)})]}),!!(null==_?void 0:_.fields.primaryButton)&&(0,i.jsx)(D.default,{disabled:q,type:"submit","data-testid":(0,C.G)(r,"submit-code-step-btn"),componentContent:_.fields.primaryButton,onClick:U})]}):null}),ea=e=>{var t;let{pageContent:n}=e,{redirectPathWithSlash:r}=U(),{getValue:a}=(0,A.aU)(),o=(0,I.MK)(F.p.REGISTRATION_LINK_SIM_SUCCESS,n.forms),l=r&&r!==k.$h?r:null==o||null==(t=o.fields.primaryButton)?void 0:t.fields.url;return(null==o?void 0:o.fields.primaryButton)||(null==o?void 0:o.fields.secondaryButton)?(0,i.jsxs)(d.A,{display:"flex",flexDirection:"column",rowGap:2,width:"100%",children:[!!(null==o?void 0:o.fields.primaryButton)&&(0,i.jsx)(D.default,{differentBtnLabel:r&&a(A.d_.continue),url:l,"data-testid":(0,C.G)(n,"success-primary-btn"),componentContent:o.fields.primaryButton}),!!(null==o?void 0:o.fields.secondaryButton)&&(0,i.jsx)(D.default,{"data-testid":(0,C.G)(n,"success-secondary-btn"),componentContent:o.fields.secondaryButton})]}):null};var eo=n(53318),el=n(67387),es=n(61210),ed=n(5391),ec=n(93717);let eu=(0,h.Ay)(ec.Ay,{shouldForwardProp:e=>"isFilled"!==e&&"hasError"!==e})(e=>{let{theme:t,isFilled:n,hasError:i}=e;return{padding:"10px 12px",borderRadius:"0",border:"none",borderBottom:n&&!i?"2px solid ".concat(t.palette.grey[400]):"2px solid ".concat(t.palette.grey[100]),height:"56px",[t.breakpoints.down("md")]:{minWidth:"20px",padding:"10px 5px"},"&.Mui-focused + .dot":{display:"none"},"&.Mui-focused":{borderColor:i?t.palette.error.main:t.palette.secondary.main},"&.Mui-disabled":{borderColor:t.palette.grey[400],opacity:.3,"& + .dot":{backgroundColor:t.palette.grey[400],opacity:.3}},".MuiInputBase-input":{padding:"0",fontSize:"24px",fontWeight:"900",textAlign:"center",[t.breakpoints.down("md")]:{fontSize:"20px"}}}}),ep=(0,h.Ay)("span")(e=>{let{theme:t}=e;return{position:"absolute",pointerEvents:"none",top:"20px",right:"calc(50% - 7px)",width:"14px",height:"14px",backgroundColor:t.palette.grey[100],borderRadius:"50%",[t.breakpoints.down("md")]:{right:"calc(50% - 6px)",height:"12px",width:"12px"}}}),eE=e=>{let{codeLength:t,gapInterval:n,errorMessage:r,disabled:o,clearInputs:l,onChange:u,setCode:p}=e,E=(0,s.A)(),[h,f]=(0,a.useState)(Array(t).fill("")),m=(0,a.useRef)([]);return(0,a.useEffect)(()=>{let e=h.indexOf("");if(-1!==e){var n;null==(n=m.current[e])||n.focus()}h.every(e=>""!==e)?l?(f(Array(t).fill("")),p("")):p(h.join("")):p("")},[h,l,p]),(0,i.jsxs)(d.A,{display:"flex",flexDirection:"column",children:[(0,i.jsx)(d.A,{display:"flex",columnGap:1,children:h.map((e,l)=>(0,i.jsxs)(a.Fragment,{children:[(0,i.jsxs)(d.A,{position:"relative",children:[(0,i.jsx)(eu,{inputProps:{inputMode:"numeric"},type:"text","data-testid":"verification-code-input-".concat(l),isFilled:!!e,hasError:!!r,disabled:o,error:!!r,"aria-invalid":!!r,"aria-describedby":r?"verification-error":void 0,inputRef:e=>
1m.current[l]=e,value:e,onChange:e=>((e,n)=>{u();let i=e.target.value;if(i.length<=1&&I.dO.test(i)){let a=[...h];if(a[n]=e.target.value,f(a),1===i.length&&n<t-1){var r;null==(r=m.current[n+1])||r.focus()}}})(e,l),onKeyDown:e=>((e,t)=>{if("Backspace"===e.key&&""===h[t]&&t>0){var n;null==(n=m.current[t-1])||n.focus()}})(e,l)}),!e&&(0,i.jsx)(ep,{className:"dot"})]}),n&&(l+1)%n==0&&l<h.length-1&&(0,i.jsx)("span",{style:{display:"flex",paddingBottom:"5px",alignItems:"center",fontSize:"26px",color:E.palette.grey[100]},children:"-"})]},"input-".concat(l)))}),r&&(0,i.jsxs)(d.A,{id:"verification-error",role:"alert",display:"flex",justifyContent:"center",alignItems:"top",columnGap:.5,paddingTop:1,children:[(0,i.jsx)(ed.LE,{"aria-hidden":"true",name:"error-filled",size:"sm"}),(0,i.jsx)(c.A,{variant:"paragraph1",color:E.palette.error.main,children:r})]})]})},eh=(0,a.forwardRef)(function(e,t){let{pageContent:n,activeInterval:o,notification:l,pukCode:c,pukCodeError:u,declarePhoneLoading:p,isDeclarationLoader:E,setPukCodeError:h,setPukCode:f,setModalOpen:m,onSubmit:x,onSubmitAfterStrongificationOrConsents:R,onSubmitAfterVeriffSession:g}=e,S=(0,r.useRouter)(),{getValue:T}=(0,A.aU)(),N=(0,s.A)(),v=S.query.verificationFlowType,y=(0,I.MK)(F.p.REGISTRATION_ENTER_PUK_CODE,n.forms),O=(0,eo.A)(e=>e.breakpoints.down("md")),b=null!==o,j=(0,I.If)(n.notifications,l),k=(0,K.U3)(b,l),P=b&&l===G.$L.REGISTRATION_PUK_CODE_LIMIT_REACHED||p;return((0,a.useEffect)(()=>{c&&O&&!P&&!u&&x()},[c,O,p,P,u,x]),(0,a.useEffect)(()=>{E&&(v===G.iV.TELIA_ID?R():v===G.iV.VERIFF&&g())},[E,v,R,g]),y)?(0,i.jsxs)(d.A,{width:"100%",display:"flex",flexDirection:"column",rowGap:b?4:2,children:[E&&(0,i.jsx)(es.Th,{sx:{position:"fixed",zIndex:1e4,backgroundColor:"".concat((0,el.X4)(N.palette.grey[50],.84)),".loader-with-text-wrapper":{top:"10%"}},title:T(A.d_.queryInProgress),description:T(A.d_.waitQueryInProgress)}),(0,i.jsxs)(d.A,{display:"flex",flexDirection:"column",rowGap:2,children:[(0,i.jsx)(eE,{disabled:b&&O||k,codeLength:8,gapInterval:4,setCode:f,errorMessage:u,clearInputs:!!u||k,onChange:()=>{h("")}}),(0,i.jsxs)(d.A,{display:"flex",justifyContent:"end",columnGap:1,children:[(0,i.jsx)(_.In,{"aria-hidden":"true",name:"info",size:"sm"}),(0,i.jsx)(w.a,{color:N.palette.common.black,hoverColor:N.palette.common.black,padding:"0 !important",onClick:()=>m(G.te.REGISTRATIONS_WHERE_TO_FIND_PUK),children:T(A.d_.whereToFindPuk)})]}),k&&j&&(0,i.jsx)(L.CustomizableNotification,{sx:{minHeight:"unset"},type:j.fields.type,icon:L.NotificationIcons[j.fields.type],testId:"".concat(G.uJ.ENTER_PUK_CODE,"-").concat(j.fields.type),title:j.fields.title,description:(0,i.jsx)(M.s,{content:j.fields.text}),isCloseable:j.fields.showCloseButton,isDynamic:!0}),(0,i.jsx)(z.r,{ref:t,counterActive:b,countDownId:G.RI,text:T(A.d_.tryAgainAfter)})]}),!O&&!!(null==y?void 0:y.fields.primaryButton)&&(0,i.jsx)(D.default,{disabled:P,type:"submit","data-testid":(0,C.G)(n,"submit-puk-code-step-btn"),componentContent:null==y?void 0:y.fields.primaryButton,onClick:x})]}):null});var ef=n(69984),em=n(56486);let eA="checkbox-err",ex=(0,h.Ay)(em.A)(e=>{let{theme:t}=e;return{["&.".concat(eA)]:{svg:{color:t.palette.error.main}}}}),eR=(0,h.Ay)(d.A)(e=>{let{theme:t}=e;return{color:t.palette.error.main,display:"flex",marginBottom:"8px"}}),eg=e=>{let{ctaContent:t,errorMessage:n,checkedStatus:r,checkboxText:a,ariaLabel:o,handleChange:l}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(d.A,{children:(0,i.jsx)(ef.A,{sx:{width:"fit-content"},control:(0,i.jsx)(ex,{slotProps:{input:{"aria-label":o}},className:n?eA:void 0,checked:r,onChange:l}),label:(0,i.jsxs)(c.A,{padding:"12px 0 12px 8px",children:[a," ",t&&(0,i.jsx)(R.E,{href:t.fields.url,openInANewTab:t.fields.openInANewTab,"aria-label":t.fields.description,color:"inherit",sx:{padding:0},children:(0,i.jsx)(c.A,{variant:"paragraph1",children:t.fields.title})})]})})}),n&&(0,i.jsxs)(eR,{marginTop:"4px !important",children:[(0,i.jsx)(ed.LE,{"aria-hidden":"true",name:"error-filled",size:"sm"}),(0,i.jsx)(c.A,{children:n})]})]})};var e_=n(88975);let eS=(0,h.Ay)(d.A)(e=>{let{theme:t}=e;return{backgroundColor:t.palette.grey[50],display:"flex",flexDirection:"column",padding:"24px 16px",rowGap:t.spacing(2),width:"100%"}}),eC=(0,h.Ay)(d.A)(e=>{let{theme:t}=e;return{display:"flex",flexDirection:"column",rowGap:t.spacing(1)}}),eI=e=>{var t;let{pageContent:n,personalData:l,phoneNumber:u,consents:p,consentsError:E,isDeclarationLoader:h,handleAgreeTermsAndConditions:f,handlePrivacyPolicy:m,onSubmit:x}=e,R=(0,s.A)(),g=(0,r.useRouter)(),[_]=(0,o.fp)(T.mi),{getValue:S}=(0,A.aU)(),N=(0,I.MK)(F.p.REGISTRATION_DATA_CONFIRMATION,n.forms),v=(0,I.df)(n,B.bc.TERMS_AND_CON
1DITIONS),y=(0,I.df)(n,B.bc.PRIVACY_POLICY),O=(0,e_.UA)(g.asPath,"/","/en","/ru"),b=_?null==N||null==(t=N.fields.secondaryButton)?void 0:t.fields.url:O;return(0,a.useEffect)(()=>{let e=new URL(globalThis.location.href);e.search="",g.replace(e.pathname)},[]),(0,i.jsxs)(d.A,{width:"100%",display:"flex",flexDirection:"column",rowGap:4,children:[h&&(0,i.jsx)(es.Th,{sx:{position:"fixed",zIndex:1e4,backgroundColor:(0,el.X4)(R.palette.grey[50],.84),".loader-with-text-wrapper":{top:"10%"}},title:S(A.d_.activationInProgress),description:S(A.d_.waitActivationInProgress)}),(0,i.jsxs)(d.A,{children:[(0,i.jsxs)(eS,{children:[(0,i.jsxs)(eC,{children:[(0,i.jsx)(c.A,{variant:"paragraph1",children:S(A.d_.name)}),(0,i.jsxs)(c.A,{variant:"heading4",children:[l.name," ",l.surname]})]}),(0,i.jsxs)(eC,{children:[(0,i.jsx)(c.A,{variant:"paragraph1",children:S(A.d_.ezysNumber)}),(0,i.jsx)(c.A,{variant:"heading4",children:(0,en.n)(u)})]})]}),(0,i.jsxs)(d.A,{marginTop:2,children:[(0,i.jsx)(eg,{ctaContent:y,errorMessage:E.privacyPolicy,checkedStatus:p.privacyPolicy,checkboxText:S(A.d_.readAndAgree),ariaLabel:"agree-privacy-policy-check-input",handleChange:m}),(0,i.jsx)(eg,{ctaContent:v,errorMessage:E.termAndCond,checkedStatus:p.termAndCond,checkboxText:S(A.d_.readAndAgree),ariaLabel:"agree-terms-conditions-check-input",handleChange:f})]})]}),(!!(null==N?void 0:N.fields.primaryButton)||!!(null==N?void 0:N.fields.secondaryButton))&&(0,i.jsxs)(d.A,{display:"flex",flexDirection:"column",rowGap:2,width:"100%",children:[!!(null==N?void 0:N.fields.primaryButton)&&(0,i.jsx)(D.default,{disabled:h,"data-testid":(0,C.G)(n,"data-confirmation-primary-btn"),componentContent:N.fields.primaryButton,onClick:x}),!!(null==N?void 0:N.fields.secondaryButton)&&(0,i.jsx)(D.default,{disabled:h,"data-testid":(0,C.G)(n,"data-confirmation-secondary-btn"),url:b,componentContent:N.fields.secondaryButton})]})]})};var eT=n(15956),eN=n(55542);let ev=(0,h.Ay)(d.A)(e=>{let{theme:t}=e;return{height:"54px",alignItems:"center",display:"flex",backgroundColor:t.palette.common.white,padding:"12px 24px",borderRadius:"4px",marginBottom:"8px",boxShadow:"0px 8px 24px ".concat((0,el.X4)(t.palette.common.black,.16)),"& span, & h2":{textAlign:"left"}}}),ey=e=>{var t;let{pageContent:n,phoneNumber:l,errorHandler:u}=e,p=(0,s.A)(),E=(0,r.useRouter)(),{pathname:h,query:f}=E,m=f.phoneNumber,[x]=null!=(t=(0,o.fp)(T.I1))?t:["Guest"],{getValue:g}=(0,A.aU)(),S=(0,I.MK)(F.p.REGISTRATION_CONFIRM_IDENTITY,n.forms),C=(0,I.df)(n,B.bc.APPROVE_IDENTITY_SMART_ID),N=(0,I.df)(n,B.bc.APPROVE_IDENTITY_MOBILE_ID),v=(0,I.df)(n,B.bc.APPROVE_IDENTITY_BANK),y=(0,I.df)(n,B.bc.APPROVE_IDENTITY_SCAN_DOC),b={padding:"unset","&:active":{"& span":{fontWeight:"500"}}},j=e=>{O.A.userIdentificationEvent(x),E.replace({pathname:E.pathname,query:{...E.query,from:"teliaStrongLogin"}},void 0,{shallow:!0}),setTimeout(()=>{m&&(0,eN.kQ)(E.asPath,m,e)},50)};return((0,a.useEffect)(()=>{f.step=G.uJ.CONFIRM_IDENTITY,f.phoneNumber=null!=m?m:l,delete f.verificationFlowType,E.replace({pathname:h,query:f},void 0,{shallow:!0})},[]),(0,a.useEffect)(()=>{let e=new URLSearchParams(globalThis.location.search);"teliaStrongLogin"===e.get("from")&&((0,eT.Z)("medallia_puk"),setTimeout(()=>{e.delete("from");let t=e.toString(),n=globalThis.location.pathname+(t?"?"+t:"");globalThis.history.replaceState({},"",n)},0))},[]),S)?(0,i.jsxs)(d.A,{children:[(0,i.jsxs)(d.A,{display:"flex",flexDirection:"column",rowGap:3,children:[(0,i.jsxs)(d.A,{role:"group","aria-labelledby":"telia-login-options",children:[(0,i.jsx)(c.A,{variant:"paragraph1",id:"telia-login-options",children:g(A.d_.withTeliaAccount)}),(0,i.jsxs)(d.A,{marginTop:1,children:[!!C&&(0,i.jsx)(R.E,{width:"100%",sx:b,underline:"none","data-testid":"approve-identity-smart-id-cta",title:C.fields.description,onClick:()=>j(eN.Rh.SMART_ID),children:(0,i.jsxs)(ev,{justifyContent:"space-between",children:[(0,i.jsx)(c.A,{variant:"paragraph1",fontWeight:"500",children:C.fields.title}),!!C.fields.rightIcon&&(0,i.jsx)(_.In,{name:C.fields.rightIcon,size:"sm",color:p.palette.grey[400],"aria-hidden":"true"})]})}),!!N&&(0,i.jsx)(R.E,{width:"100%",sx:b,underline:"none","data-testid":"approve-identity-mobile-id-cta",title:N.fields.description,onClick:()=>j(eN.Rh.MOBILE_ID),children:(0,i.jsxs)(ev,{justifyContent:"space-between",children:[(0,i.jsx)(c.A,{variant:"paragraph1",fontWeight:"500",children:N.fields.title}),!!N.fields.rightIcon&&(0,i.jsx)(_.In,{name:N.fields.rightIcon,size:"sm",color:p.palette.grey[400],"aria-hidden":"true"})]})}),!!v&&(0,i.jsx)(R.E,{width:"100%",sx:b,underline:"none","data-testid":"approve-identity-bank-cta",title:v.fields.description,onClick:()=>j(eN.Rh.BANK),children:(0,i.jsxs)(ev,{justifyContent:"space-between",children:[(0,i.jsx)(c.A,{variant:"paragraph1",fontWeight:"500",children:v.fields.title}),!!v.fields.rightIcon&&(0,i.jsx)(_.In,{name:v.fields.rightIcon,size:"sm",color:p.palette.grey[400],"aria-hidden":"true"})]})})]})]}),(0,i.jsxs)(d.A,{role:"group","aria-labelledby":"without-telia-login-options",children:[(0,i.jsx)(c.A,{variant:"paragraph1",id:"without-telia-login-options",children:g(A.d_.withoutAccount)}),!!y&&(0,i.jsx)(R.E,{width:"100%",marginTop:1,sx:b,underline:"none","data-testid":"approve-identity-scan-doc-cta",title:y.fields.description,onClick:()=>m&&(0,K.X3)(m,E.asPath,u),children:(0,i.jsxs)(ev,{justifyContent:"space-between",children:[(0,i.jsx)(c.A,{variant:"paragraph1",fontWeight:"500",children:y.fields.title}),!!y.fields.rightIcon&&(0,i.jsx)(_.In,{name:y.fields.rightIcon,size:"sm",color:p.palette.grey[400],"aria-hidden":"true"})]})})]})]}),(0,i.jsxs)(ee,{children:[S.fields.additionalInfoText&&(0,i.jsx)(M.s,{content:S.fields.additionalInfoText,sx:{[et.BLOCKS.PARAGRAPH]:{fontSize:"14px"},[et.INLINES.HYPERLINK]:{fontSize:"14px"}}}),(0,i.jsx)(q,{pageContent:n,addRouterQueryParam:!0,phoneNumber:m,withBackgroun
1d:!1})]})]}):null},eO=e=>{var t,n,u;let{pageContent:p}=e,{getValue:E}=(0,A.aU)(),h=(0,y.V)(),f={seconds:E(A.d_.timeSeconds),minutes:E(A.d_.timeMinutes),goBack:E(A.J0.goBack),pukCodeRequired:E(A.d_.pukCodeRequired),pukCodeInvalid:E(A.d_.pukCodeInvalid)},[b]=(0,o.fp)(T.mi),[j]=(0,o.fp)(T.I1),D=(0,s.A)(),L=(0,r.useRouter)(),M=null!=(u=null==(t=L.query)?void 0:t.step)?u:G.uJ.ENTER_NUMBER,k=L.query.step===G.uJ.ENTER_PUK_CODE&&void 0!==L.query.phoneNumber&&void 0!==L.query.verificationFlowType,P=L.query.phoneNumber,w=(0,a.useRef)(null),U=(0,a.useRef)(0),F=(0,a.useRef)(null),B=(0,a.useRef)(!1),[V,Y]=(0,a.useState)(M),[H,z]=(0,a.useState)(""),[W,q]=(0,a.useState)(""),[ee,et]=(0,a.useState)(""),[en,ei]=(0,a.useState)(""),[eo,el]=(0,a.useState)(""),[es,ed]=(0,a.useState)(null),[ec,eu]=(0,a.useState)({termAndCond:!1,privacyPolicy:!1}),[ep,eE]=(0,a.useState)({termAndCond:"",privacyPolicy:""}),[ef,em]=(0,a.useState)(void 0),[eA,ex]=(0,a.useState)(void 0),[eR,eg]=(0,a.useState)(null),[e_,eS]=(0,a.useState)(null),[eC,eT]=(0,a.useState)(k),[eN,ev]=(0,a.useState)(!1),eO=(0,I.Cg)(p.fields.forms,eA),{localizedSlugForRedirectToLinkSimError:eb,localizedSlugForRedirectToLinkFirstSimError:ej,localizedSlugForRedirectToActivationInProgress:eD}=(0,K.ED)(L),eL=V===G.uJ.ENTER_PUK_CODE||V===G.uJ.LINK_SIM_ENTER_CODE,eM=(0,K.Qp)(V,p.fields),ek=(0,K.fY)(V,p.fields),eP=(0,K.mT)(V),ew=e=>{(0,K.n4)(e,"UKNOWN_SERVER_ERROR","ERROR",j),L.push(b?eb:ej)},eU=()=>Math.max(3e3-(Date.now()-U.current),0),[eF,{loading:eB}]=(0,l.n)(N.MA,{onCompleted:e=>{ez(e.linkPhoneNumber,eK)},onError:(0,S.K)(()=>ew("unsuccessfulLinkSimStartEvent"))}),[eG,{loading:eV}]=(0,l.n)(N.k,{onCompleted:e=>{ez(e.verifyPhoneNumberLink,e=>(0,K.AV)(e,V,j,h,Y))},onError:(0,S.K)(()=>ew("unsuccessfulLinkCodActivationEvent"))}),eY=e=>{ev(!0),(0,v.Dc)(e).then(e=>{let t=U.current>0?eU():0;F.current=(0,K.Sw)(e=>{z(e.phoneNumber),eW(e)},t,e)}).catch(ew)},eH=()=>{setTimeout(()=>{(0,v.Y4)(H).then(()=>{L.push("".concat(eD,"?phoneNumber=").concat(H,"&process=").concat(N.Oc.ACTIVATION_IN_PROGRESS))}).catch(()=>{eH()})},5e3)},eK=e=>{(0,K.de)(j,e,V,Y,em)},ez=(e,t)=>{eS(e.restrictedUntil),e.linkPhoneNumberResponseKey===N.Wo.SUCCESS?t(e):(0,K.YM)(j,e,q,em,ex)},eW=e=>{eS(e.restrictedUntil),eT(!1),ev(!1),e.declarePhoneNumberResponseKey===N.Ju.SUCCESS&&V!==G.uJ.DATA_CONFIRMATION?(0,K.Xn)(j,e.personalData,V,ed,Y):(0,K.CZ)(j,e,f,L,et,em,Y)},eq=e=>{eS(null),j?eF({variables:{phoneNumber:H,forceLink:e}}):(0,v.Fs)({phoneNumber:H}).then(e=>{ez(e,eK)}).catch(()=>ew("unsuccessfulLinkSimStartEvent"))},eZ=(0,a.useCallback)(()=>{if(et(""),eo)return void eY({phoneNumber:H,puk:eo});setTimeout(()=>{et(f.pukCodeRequired)},0)},[eo,H,L.asPath,f.pukCodeRequired]),eQ=(0,a.useCallback)(()=>{U.current=Date.now(),eY({phoneNumber:P,isRedirect:!0})},[P,L.asPath]),eJ=(0,a.useCallback)(()=>{U.current=Date.now(),(0,v.uB)(P,!0).then(e=>{let t=U.current>0?eU():0;F.current=(0,K.Sw)(e=>{z(e.phoneNumber),(0,K.Je)({partnerId:j,response:e,router:L,currentStep:V,setIsDeclarationLoader:eT,setPersonalData:ed,setCurrentStep:Y,errorHandler:ew})},t,e)}).catch(ew)},[P]);return(0,a.useEffect)(()=>{e_&&w.current&&(0,K.Nj)(w,e_,f.minutes,f.seconds,eR,eS,eg)},[e_,V,w.current]),(0,a.useEffect)(()=>{B.current||V!==G.uJ.ENTER_NUMBER||(O.A.numberActivationStartEvent(j||"Guest"),B.current=!0)},[V,j]),(0,a.useEffect)(()=>()=>{F.current&&clearTimeout(F.current)},[]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(x.O,{}),(0,i.jsx)(R.E,{"data-testid":(0,C.G)(p,"go-back"),"aria-label":f.goBack,title:f.goBack,onClick:()=>{let e=V===G.uJ.LINK_SIM_ENTER_CODE?1:2;q(""),et(""),ei(""),el(""),Y(G.K5[G.K5.indexOf(V)-e])},color:"inherit",hoverColor:"inherit",textBtn:!0,underline:"none",sx:{visibility:eL?"visible":"hidden",display:"block",marginTop:"24px"},children:(0,i.jsxs)(d.A,{display:"flex",alignItems:"center",children:[(0,i.jsx)(_.In,{"aria-hidden":"true",name:"chevron-left",size:"sm",allyTitle:"chevron-left"}),(0,i.jsx)(c.A,{fontWeight:700,children:f.goBack})]})}),V===G.uJ.LINK_SIM_SUCCESS&&(0,i.jsx)(_.In,{style:{margin:"0 auto"},name:"check-circle-filled",size:"lg",color:D.palette.success.main,"aria-hidden":"true"}),(0,i.jsxs)(J,{children:[eM&&(0,i.jsx)("img",{src:null==(n=eM.fields.file)?void 0:n.url,height:"250px",width:"auto",alt:eM.fields.title}),(0,i.jsxs)(Q,{children:[(0,i.jsxs)(X,{children:[(0,i.jsx)(c.A,{variant:"heading2",textAlign:"center",component:"h1",children:(0,K.LK)(V,p.fields)}),void 0!==eP&&(0,i.jsx)($,{"data-testid":(0,C.G)(p,"wizard-stepper"),children:(0,i.jsx)(m,{currentStep:eP,steps:K.Kr})}),ek&&(0,i.jsx)(c.A,{variant:"paragraph1",textAlign:"center",children:ek})]}),V===G.uJ.ENTER_NUMBER&&(0,i.jsx)(Z,{ref:w,activeInterval:eR,pageContent:p.fields,phoneNumber:H,customInputError:W,notification:ef,linkPhoneLoading:eB,setNotification:em,resetInterval:()=>(0,K.bF)(eR,w,eg),setCustomInputError:q,setPhoneNumber:z,setModalOpen:ex,onSubmit:()=>eq(!1)}),V===G.uJ.LINK_SIM_ENTER_CODE&&(0,i.jsx)(er,{ref:w,activeInterval:eR,phoneNumber:H,notification:ef,page
1Content:p.fields,securityCode:en,customInputError:W,verifyPhoneLinkLoading:eV,setSecurityCode:ei,setCustomInputError:q,resendCode:()=>eq(!0),onSubmit:()=>{eG({variables:{phoneNumber:H,verificationCode:en}})}}),V===G.uJ.ENTER_PUK_CODE&&(0,i.jsx)(eh,{ref:w,activeInterval:eR,notification:ef,pukCodeError:ee,pageContent:p.fields,pukCode:eo,declarePhoneLoading:eN,isDeclarationLoader:eC,setPukCode:el,setModalOpen:ex,setPukCodeError:et,onSubmit:eZ,onSubmitAfterStrongificationOrConsents:eQ,onSubmitAfterVeriffSession:eJ}),V===G.uJ.LINK_SIM_SUCCESS&&(0,i.jsx)(ea,{pageContent:p.fields}),V===G.uJ.DATA_CONFIRMATION&&es&&(0,i.jsx)(eI,{pageContent:p.fields,personalData:es,phoneNumber:H,consents:ec,consentsError:ep,isDeclarationLoader:eC,handleAgreeTermsAndConditions:e=>{eE(e=>({...e,termAndCond:""})),eu(t=>({...t,termAndCond:e.target.checked}))},handlePrivacyPolicy:e=>{eE(e=>({...e,privacyPolicy:""})),eu(t=>({...t,privacyPolicy:e.target.checked}))},onSubmit:()=>{if(ec.termAndCond&&ec.privacyPolicy){eT(!0),U.current=Date.now(),(0,v.uH)({phoneNumber:H,areTermsAndConditionsApproved:ec.termAndCond,isPrivacyPolicyApproved:ec.privacyPolicy}).then(e=>{let t=eU();F.current=(0,K.Sw)(K.zq,t,e.status,H,j,L,h,ew,eT)}).catch(eH);return}ec.termAndCond||(O.A.unsuccessfulNumberActivationConfirmationEvent(j||"Guest","termsOfServiceCheckboxRequired","failed"),eE(e=>({...e,termAndCond:E(A.d_.agreeToTermsAndConditions)}))),ec.privacyPolicy||(O.A.unsuccessfulNumberActivationConfirmationEvent(j||"Guest","privacyPolicyCheckboxRequired","failed"),eE(e=>({...e,privacyPolicy:E(A.d_.agreeToPrivacyPolicy)})))}}),V===G.uJ.CONFIRM_IDENTITY&&(0,i.jsx)(ey,{pageContent:p.fields,phoneNumber:H,errorHandler:()=>ew("unsuccessfulNumberActivationEvent")}),eO&&(0,i.jsx)(g.z,{"data-testid":(0,I.Gz)(eA),sx:{'.MuiDialog-container > [role = "dialog"]':{maxWidth:"628px"}},componentContent:eO,open:void 0!==eA,onClose:()=>ex(void 0),onConfirm:()=>{eA===G.te.REGISTRATION_NUMBER_ALREADY_ADDED&&eq(!0),ex(void 0)}},eA)]})]})]})};var eb=function(e){return e.ENTER_DETAILS="enterDetails",e.ENTER_SECURITY_CODE="enterSecurityCode",e.LEAVE_EXTRA_SUCCESS="leaveExtraSuccess",e}({}),ej=function(e){return e.SMS_RETRY_DELAY="leaveExtraSmsRetryDelay",e.SECURITY_CODE_SUCCESS="leaveExtraCodeSent",e.SECURITY_CODE_NOT_SENT="leaveExtraCodeNotSent",e.SECURITY_CODE_THRESHOLD_REACHED="leaveExtraCodeLimitReached",e}({}),eD=function(e){return e.PHONE="phoneNumber",e.NAME="userName",e.SURNAME="userSurname",e.PERSONAL_ID="userPersonalId",e}({}),eL=function(e){return e.SECURITY_CODE="securityCode",e}({});let eM=["enterDetails","enterSecurityCode","leaveExtraSuccess"];var ek=n(26229);eb.ENTER_DETAILS,eb.ENTER_SECURITY_CODE,eb.LEAVE_EXTRA_SUCCESS;var eP=function(e){return e.SUCCESS="SUCCESS",e.WARN="WARN",e.ERROR="ERROR",e}({}),ew=function(e){return e.FAILED_TO_SEND_VERIFICATION_CODE="FAILED_TO_SEND_VERIFICATION_CODE",e.INVALID_INPUT="INVALID_INPUT",e.INVALID_VERIFICATION_CODE="INVALID_VERIFICATION_CODE",e.FAILED_TO_SEND_LEAVE_EXTRA_LEAD="FAILED_TO_SEND_LEAVE_EXTRA_LEAD",e.VERIFICATION_THRESHOLD_REACHED="VERIFICATION_THRESHOLD_REACHED",e.VERIFICATION_CODE_EXPIRED="VERIFICATION_CODE_EXPIRED",e.SMS_RETRY_THRESHOLD_REACHED="SMS_RETRY_THRESHOLD_REACHED",e.SMS_RETRY_DELAY="SMS_RETRY_DELAY",e.DEFAULT="DEFAULT",e}({}),eU=n(66238);let eF="countdown-id",eB=e=>{let{endtime:t,clockRef:n,min:i,sec:r}=e,a=(e=>{let t=new Date(e).getTime()-Date.now(),n=Math.floor(t/1e3%60),i=Math.floor(t/1e3/60%60);return{total:t,minutes:i,seconds:n}})(t);return n.current&&(n.current.innerHTML=((e,t,n)=>e.minutes>0?e.minutes+" ".concat(t):e.seconds+" ".concat(n))(a,i,r)),a},eG=e=>({enterPersonalDataForm:(0,I.MK)(F.p.LEAVE_EXTRA_ENTER_PERSONAL_DATA,e.forms),enterCodeForm:(0,I.MK)(F.p.LEAVE_EXTRA_ENTER_CODE,e.forms),requestSubmittedForm:(0,I.MK)(F.p.LEAVE_EXTRA_REQUEST_SUBMITTED,e.forms)}),eV=(e,t,n,i)=>{switch(t.leaveExtraResponseType){case ew.INVALID_INPUT:case ew.INVALID_VERIFICATION_CODE:case ew.VERIFICATION_CODE_EXPIRED:return n(j.F.CUSTOM);case ew.FAILED_TO_SEND_VERIFICATION_CODE:return i(ej.SECURITY_CODE_NOT_SENT);case ew.SMS_RETRY_THRESHOLD_REACHED:return i(ej.SMS_RETRY_DELAY);case ew.VERIFICATION_THRESHOLD_REACHED:return i(ej.SECURITY_CODE_THRESHOLD_REACHED);case ew.FAILED_TO_SEND_LEAVE_EXTRA_LEAD:return e.push(k.qd);default:return}};var eY=n(45798);let eH=V.Ik().shape({[eD.PHONE]:V.Yj().required(j.F.REQUIRED).test("isValid",j.F.INVALID,e=>e?/^\d{8}$/.test(e):void 0==e),[eD.NAME]:V.Yj().max(50,j.F.INVALID).required(j.F.REQUIRED),[eD.SURNAME]:V.Yj().max(50,j.F.INVALID).required(j.F.REQUIRED),[eD.PERSONAL_ID]:V.Yj().required(j.F.REQUIRED).test("isValid",j.F.INVALID,e=>{let t=+(null!=e?e:0),n="".concat(t);return 11===n.length&&!Number.isNaN(e)&&"3,4,5,6".includes(n[0])&&t>=1e10&&t<1e11||null==e})}),eK=V.Ik().shape({[eL.SECURITY_CODE]:V.Yj().required(j.F.REQUIRED).test("isValid",j.F.INVALID,e=>e?/^\d{6}$/.test(e):void 0==e)}
1),ez=(0,a.forwardRef)(function(e,t){let{counterActive:n,text:r,countDownId:a}=e,o=(0,s.A)();return(0,i.jsxs)(d.A,{display:"flex",justifyContent:"center",sx:{backgroundColor:o.palette.grey[50],padding:n?"16px":0},children:[n&&(0,i.jsx)(c.A,{variant:"paragraph1",children:r}),(0,i.jsx)(c.A,{ref:t,id:a,variant:"heading4",paddingLeft:"5px"})]})}),eW=(0,a.forwardRef)(function(e,t){let{pageContent:n,phoneNumber:r,userName:a,userSurname:o,personalId:l,customInputError:c,notification:u,activeInterval:p,loading:E,setNotification:h,resetInterval:f,setCustomInputError:m,setPhoneNumber:x,setUserName:R,setUserSurname:g,setPersonalId:_,onSubmit:S}=e,T=(0,s.A)(),{getValue:N}=(0,A.aU)(),v=(0,I.MK)(F.p.LEAVE_EXTRA_ENTER_PERSONAL_DATA,n.forms),y=(0,I.p3)(B.Zh.ENTER_NUMBER,v),O=(0,I.p3)(B.Zh.ENTER_NAME,v),k=(0,I.p3)(B.Zh.ENTER_SURNAME,v),P=(0,I.p3)(B.Zh.ENTER_PERSONAL_ID,v),w=(0,I.If)(n.notifications,u),U=null!==p,G=u&&(u===ej.SECURITY_CODE_NOT_SENT||U&&u===ej.SECURITY_CODE_THRESHOLD_REACHED||U&&u===ej.SMS_RETRY_DELAY),V=(0,b.Wx)({initialValues:{[eD.PHONE]:r,[eD.NAME]:a,[eD.SURNAME]:o,[eD.PERSONAL_ID]:l},validateOnChange:!1,validateOnBlur:!1,validationSchema:eH,onSubmit:S}),{errors:Y,handleChange:H}=V,K=async()=>{Object.keys(await V.validateForm()).length||V.submitForm()};return v?(0,i.jsx)("form",{style:{width:"100%"},noValidate:!0,children:(0,i.jsxs)(d.A,{width:"100%",display:"flex",flexDirection:"column",rowGap:U?4:2,children:[(0,i.jsxs)(d.A,{display:"flex",flexDirection:"column",rowGap:2,children:[(0,i.jsx)(j.k,{"data-testid":(0,C.G)(n,"phone-number-input"),value:r,isPhoneNumber:!0,componentContent:y,name:eD.PHONE,errorKind:Y[eD.PHONE]||c,onChange:e=>((e,t,n,i,r,a)=>{let o=e.target.value;t(""),n(void 0),i(),(o.length<=8&&""===o||(0,eU.E)(o))&&(r(o),a(e))})(e,m,h,f,x,H),fullWidth:!0,sx:{".MuiInputBase-input":{paddingLeft:"5px"}}}),(0,i.jsx)(j.k,{"data-testid":(0,C.G)(n,"user-name-input"),value:a,componentContent:O,name:eD.NAME,errorKind:Y[eD.NAME],onChange:e=>{R(e.target.value),H(e)},fullWidth:!0}),(0,i.jsx)(j.k,{"data-testid":(0,C.G)(n,"user-surname-input"),value:o,componentContent:k,name:eD.SURNAME,errorKind:Y[eD.SURNAME],onChange:e=>{g(e.target.value),H(e)},fullWidth:!0}),(0,i.jsx)(j.k,{"data-testid":(0,C.G)(n,"personal-id-input"),value:l,componentContent:P,name:eD.PERSONAL_ID,errorKind:Y[eD.PERSONAL_ID],onChange:e=>((e,t,n)=>{let i=e.target.value;(i.length<=11&&""===i||/^\d{1,11}$/.test(i))&&(t(i),n(e))})(e,_,H),fullWidth:!0}),G&&w&&(0,i.jsx)(L.CustomizableNotification,{sx:{...(0,eY.yt)(!0,T,w.fields.type)},type:w.fields.type,icon:L.NotificationIcons[w.fields.type],testId:"".concat(eb.ENTER_DETAILS,"-").concat(w.fields.type),title:w.fields.title,description:(0,i.jsx)(M.s,{content:w.fields.text}),isCloseable:w.fields.showCloseButton})]}),(0,i.jsx)(ez,{ref:t,counterActive:U,text:N(A.Je.tryAgainAfter),countDownId:eF}),(!!v.fields.primaryButton||!!v.fields.secondaryButton)&&(0,i.jsxs)(d.A,{display:"flex",flexDirection:"column",rowGap:2,children:[!!v.fields.primaryButton&&(0,i.jsx)(D.default,{disabled:U||E,type:"submit",value:"Submit","data-testid":(0,C.G)(n,"submit-details-step-btn"),componentContent:v.fields.primaryButton,onClick:e=>{e.preventDefault(),K()}}),!!v.fields.secondaryButton&&(0,i.jsx)(D.default,{type:"button",url:v.fields.secondaryButton.fields.url,"data-testid":(0,C.G)(n,"cancel-step-btn"),componentContent:v.fields.secondaryButton})]})]})}):null}),eq=(0,a.forwardRef)(function(e,t){let{phoneNumber:n,pageContent:r,securityCode:a,activeInterval:o,notification:l,customInputError:u,loading:p,setCustomInputError:E,setSecurityCode:h,resendCode:f,onSubmit:m}=e,x=(0,s.A)(),{getValue:g}=(0,A.aU)(),_=(0,I.MK)(F.p.LEAVE_EXTRA_ENTER_CODE,r.forms),S=(0,I.p3)(B.Zh.ENTER_CODE,_),T=(0,I.If)(r.notifications,l),N=(0,I.df)(r,B.bc.SEND_AGAIN),v=null!==o,y=(0,b.Wx)({initialValues:{[eL.SECURITY_CODE]:a},validateOnChange:!1,validateOnBlur:!1,validationSchema:eK,onSubmit:m}),{errors:O,handleChange:k}=y,P=l&&T&&(0,ei.L)(T.fields.text,{"@phoneNumber":(0,en.n)(n)}),w=P&&(l===ej.SECURITY_CODE_NOT_SENT||v&&l===ej.SECURITY_CODE_SUCCESS||v&&l===ej.SMS_RETRY_DELAY||v&&l===ej.SECURITY_CODE_THRESHOLD_REACHED),U=async()=>
1{Object.keys(await y.validateForm()).length||y.submitForm()};return _?(0,i.jsx)("form",{style:{width:"100%"},noValidate:!0,children:(0,i.jsxs)(d.A,{width:"100%",display:"flex",flexDirection:"column",rowGap:v?4:2,children:[(0,i.jsx)(j.k,{"data-testid":(0,C.G)(r,"security-code-input"),value:a,componentContent:S,name:eL.SECURITY_CODE,errorKind:O[eL.SECURITY_CODE]||u,onChange:e=>{let t=e.target.value;E(""),(t.length<=6&&""===t||/^\d{1,6}$/.test(t))&&(h(t),k(e))},fullWidth:!0}),w&&(0,i.jsx)(L.CustomizableNotification,{sx:{...(0,eY.yt)(!0,x,T.fields.type)},type:T.fields.type,icon:L.NotificationIcons[T.fields.type],testId:"".concat(eb.ENTER_SECURITY_CODE,"-").concat(T.fields.type),title:T.fields.title,description:(0,i.jsx)(M.s,{content:P,sx:{[et.MARKS.BOLD]:{whiteSpace:"nowrap",fontWeight:"bold",color:x.palette.common.black}}}),isCloseable:T.fields.showCloseButton}),!v&&N&&(0,i.jsxs)(d.A,{sx:{...W.yY,backgroundColor:x.palette.grey[50],padding:2,marginTop:2},children:[(0,i.jsx)(c.A,{variant:"paragraph1",children:g(A.Je.didNotGetCode)}),(0,i.jsx)(R.E,{"data-testid":(0,C.G)(r,"prompt_to_resend_code"),"aria-label":N.fields.description,title:N.fields.description,color:"primary.main",sx:{padding:"unset",paddingRight:"5px"},onClick:e=>{e.preventDefault(),f()},children:N.fields.title})]}),(0,i.jsx)(ez,{ref:t,counterActive:v,text:g(A.Je.tryAgainAfter),countDownId:eF}),!!_.fields.primaryButton&&(0,i.jsx)(D.default,{disabled:v&&l===ej.SECURITY_CODE_THRESHOLD_REACHED||p,type:"submit","data-testid":(0,C.G)(r,"submit-code-step-btn"),componentContent:_.fields.primaryButton,onClick:e=>{e.preventDefault(),U()}})]})}):null}),eZ=(0,h.Ay)(d.A)(e=>{let{theme:t}=e;return{[t.breakpoints.up("xs")]:{paddingTop:t.spacing(10),paddingBottom:t.spacing(3),width:"100%"},[t.breakpoints.up("md")]:{paddingBottom:t.spacing(6),width:"410px"},display:"flex",position:"relative",alignItems:"center",flexGrow:1,margin:"0 auto",flexDirection:"column",rowGap:t.spacing(4)}}),eQ=(0,h.Ay)(d.A)(e=>{let{theme:t}=e;return{display:"flex",overflow:"hidden",textAlign:"center",flexDirection:"column",width:"100%",rowGap:t.spacing(3)}}),eJ=e=>{var t;let{pageContent:n}=e,o=(0,s.A)(),l=(0,r.useRouter)(),u=(0,a.useRef)(null),[p,E]=(0,a.useState)(!1),[h,f]=(0,a.useState)(""),[g,S]=(0,a.useState)(""),[T,N]=(0,a.useState)(""),[v,y]=(0,a.useState)(""),[O,b]=(0,a.useState)(""),[j,L]=(0,a.useState)(eb.ENTER_DETAILS),[M,P]=(0,a.useState)(null),[w,U]=(0,a.useState)(null),[B,G]=(0,a.useState)(""),[V,Y]=(0,a.useState)(void 0),{getValue:H}=(0,A.aU)(),K=H(A.p4),z={seconds:H(A.d_.timeSeconds),minutes:H(A.d_.timeMinutes),goBack:H(A.J0.goBack)},W=(0,I.MK)(F.p.LEAVE_EXTRA_REQUEST_SUBMITTED,n.fields.forms),q=((e,t)=>{var n,i,r;let a=eG(t);switch(e){case eb.ENTER_DETAILS:return null==(n=a.enterPersonalDataForm)?void 0:n.fields.description;case eb.ENTER_SECURITY_CODE:return null==(i=a.enterCodeForm)?void 0:i.fields.description;case eb.LEAVE_EXTRA_SUCCESS:return null==(r=a.requestSubmittedForm)?void 0:r.fields.description;default:return}})(j,n.fields),Z=()=>{var e;U(null),E(!0),(e={phoneNumber:h,personalData:{name:g,surname:T,personalId:v}},ek.gB.post(k.Hr.INIT_LEAVE_EXTRA,e)).then(e=>{E(!1),Q(e)}).catch(()=>{l.push(k.qd)})},Q=e=>{if(U(e.restrictedUntil),e.leaveExtraResponseKey===eP.SUCCESS){if(j===eb.ENTER_DETAILS){L(eM[eM.indexOf(j)+1]),Y(ej.SECURITY_CODE_SUCCESS);return}Y(ej.SECURITY_CODE_SUCCESS);return}eV(l,e,G,Y)};return(0,a.useEffect)(()=>{w&&u.current&&((e,t,n,i,r,a,o)=>{r&&clearInterval(r),o(null),eB({endtime:t,clockRef:e,min:n,sec:i});let l=setInterval(()=>{let r=eB({endtime:t,clockRef:e,min:n,sec:i});e.current&&r.minutes<1&&r.seconds<1&&(l&&clearInterval(l),e.current.innerHTML="",o(null),a(null))},1e3);o(l)})(u,w,z.minutes,z.seconds,M,U,P)},[w,j,u.current]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(x.O,{}),(0,i.jsxs)(eZ,{children:[j===eb.LEAVE_EXTRA_SUCCESS&&(0,i.jsx)(_.In,{name:"check-circle-filled",size:"lg",color:o.palette.success.main,"aria-hidden":"true"}),j===eb.ENTER_SECURITY_CODE&&(0,i.jsx)(R.E,{"data-testid":(0,C.G)(n,"go-back"),"aria-label":z.goBack,title:z.goBack,onClick:()=>{G(""),b(""),L(eM[eM.indexOf(j)-1])}
1,color:"inherit",underline:"always",sx:{display:"block",padding:"unset",paddingRight:"5px",position:"absolute",top:"34px",left:0},children:(0,i.jsxs)(d.A,{display:"flex",alignItems:"center",children:[(0,i.jsx)(_.In,{name:"chevron-left",size:"xs",allyTitle:"chevron-left","aria-hidden":"true"}),(0,i.jsx)(c.A,{fontWeight:700,fontSize:"14px",children:z.goBack})]})}),(0,i.jsx)(c.A,{variant:"heading2",textAlign:"center",children:((e,t)=>{var n,i,r;let a=eG(t);switch(e){case eb.ENTER_DETAILS:return null==(n=a.enterPersonalDataForm)?void 0:n.fields.title;case eb.ENTER_SECURITY_CODE:return null==(i=a.enterCodeForm)?void 0:i.fields.title;case eb.LEAVE_EXTRA_SUCCESS:return null==(r=a.requestSubmittedForm)?void 0:r.fields.title;default:return""}})(j,n.fields)}),(0,i.jsxs)(eQ,{"data-testid":(0,C.G)(n,"wizard-stepper"),children:[(0,i.jsx)(m,{currentStep:eM.indexOf(j),steps:eM}),q&&(0,i.jsx)(c.A,{variant:"paragraph1",children:q})]}),j===eb.ENTER_DETAILS&&(0,i.jsx)(eW,{ref:u,pageContent:n.fields,phoneNumber:h,userName:g,userSurname:T,personalId:v,customInputError:B,notification:V,activeInterval:M,loading:p,setNotification:Y,resetInterval:()=>((e,t,n)=>{e&&t.current&&(clearInterval(e),n(null),t.current.innerHTML="")})(M,u,P),setCustomInputError:G,setPhoneNumber:f,setPersonalId:y,setUserName:S,setUserSurname:N,onSubmit:Z}),j===eb.ENTER_SECURITY_CODE&&(0,i.jsx)(eq,{ref:u,pageContent:n.fields,securityCode:O,activeInterval:M,phoneNumber:h,notification:V,customInputError:B,loading:p,setCustomInputError:G,setSecurityCode:b,resendCode:Z,onSubmit:()=>{var e;U(null),E(!0),(e={verificationCode:O},ek.gB.post(k.Hr.VERIFY_LEAVE_EXTRA,{},{},{verificationCode:e.verificationCode})).then(e=>{E(!1),(e=>{if(U(e.restrictedUntil),e.leaveExtraResponseKey===eP.SUCCESS)return L(eM[eM.indexOf(j)+1]);eV(l,e,G,Y)})(e)}).catch(()=>{l.push(k.qd)})}}),j===eb.LEAVE_EXTRA_SUCCESS&&W&&!!W.fields.primaryButton&&(0,i.jsx)(D.default,{url:null==W||null==(t=W.fields.primaryButton)?void 0:t.fields.url,"data-testid":(0,C.G)(n,"success-primary-btn"),componentContent:null==W?void 0:W.fields.primaryButton})]}),(0,i.jsx)(c.A,{variant:"paragraph2","data-testid":"extra-footer",textAlign:"center",children:K})]})};n(51946);var eX=n(36489);n(83543);let e$=e=>{let{name:t,successButton:n,children:r,successDescription:a,successTitle:o}=e,l=(0,s.A)();return(0,i.jsxs)(d.A,{maxWidth:"410px",marginX:"auto",paddingTop:6,"aria-label":t,sx:{display:"flex",flexDirection:"column",flexGrow:1,textAlign:"center"},justifyContent:{xs:"space-between",md:"unset"},"data-testid":"success-content-data",children:[(0,i.jsxs)(d.A,{children:[(0,i.jsx)(_.In,{name:"check-circle-filled",size:"lg",sx:{marginBottom:"27px"},color:l.palette.success.main,"aria-hidden":"true"}),(0,i.jsx)(c.A,{variant:"heading2",component:"h2",children:o}),null!=r?r:(0,i.jsx)(c.A,{variant:"paragraph1",component:"p",textAlign:"center",marginTop:{xs:3},marginBottom:{xs:4},children:a})]}),!!n&&(0,i.jsx)(d.A,{children:(0,i.jsx)(D.default,{componentContent:n,"data-testid":"return-dashboard-btn",type:"button"})})]})},e0=e=>{let{pageContent:t}=e,[n,o]=(0,a.useState)(!1),l=(0,r.useRouter)(),s=(0,I.MK)(F.p.LEAD_GENERATION,t.fields.forms),u=(0,I.MK)(F.p.LEAD_GENERATION_SUCCESS,t.fields.forms),p=(0,a.useCallback)(e=>{e===B.jG.SUCCESS&&o(!0),e===B.jG.ERROR&&l.push(k.pp)},[]),E=(0,a.useCallback)(()=>{},[]);return s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(x.O,{}),n&&u?(0,i.jsx)(e$,{name:null==u?void 0:u.fields.title,successButton:null==u?void 0:u.fields.primaryButton,successDescription:null==u?void 0:u.fields.description,successTitle:null==u?void 0:u.fields.title}):(0,i.jsxs)(d.A,{maxWidth:"410px",marginX:"auto",paddingTop:6,"aria-label":null==s?void 0:s.fields.title,sx:W.yY,"data-testid":(0,C.G)(t),children:[(0,i.jsx)(c.A,{variant:"heading2",component:"h2",sx:{textAlign:{xs:"left",md:"center"}},children:null==s?void 0:s.fields.title}),(null==s?void 0:s.fields.description)&&(0,i.jsx)(c.A,{variant:"paragraph1",component:"p",textAlign:"center",marginTop:{xs:3},marginBottom:{xs:4},sx:{textAlign:{xs:"left",md:"center"}},children:null==s?void 0:s.fields.description}),(0,i.jsx)(eX.O,{onComplete:p,content:s,onClose:E})]})]}):null};var e1=n(28888);function e2(){let e=(0,e1._)(["\n  mutation LEAVE_EZYS(\n    $leaveReasons: [String!]\n    $otherLeaveReasons: String\n    $operatorName: String!\n    $personalData: PersonalDataInput!\n  ) {\n    leaveEzys(\n      leaveOperatorRequest: {\n        leaveReasons: $leaveReasons\n        otherLeaveReasons: $otherLeaveReasons\n        personalData: $personalData\n        operatorName: $operatorName\n      }\n    ) {\n      status\n      message\n    }\n  }\n"]);return e2=function(){return e},e}let e3=(0,n(81188).J1)(e2());var e5=n(67395),e4=function(e){return e.SUCCESS="SUCCESS",e.FAILED="FAILED",e}({}),e6=function(e){return e.BEFORE_LEAVE_EZYS="beforeLeaveEzysError",e}({}),e7=function(e){return e.START="start",e.LEAVE_OTHER="leave-other",e.LEAVE_TELIA="leave-telia",e.SUCCESS="sucess",e}({}),e8=function(e){return e.REASONS="leaveReasons",e.REASONS_OTHER="otherLeaveReasons",e.PERSONAL_DATA="personalData",e.OPERATOR="operatorName",e}({}),e9=function(e){return e.NAME="name",e.SURNAME="surname",e.PERSONAL_ID="personalId",e}({});let te=e=>{let{content:t,onChangeState:n}=e,r=(0,I.df)(t,B.bc.LEAVE_FOR_POSTPAID),a=(0,I.df)(t,B.bc.LEAVE_FOR_OTHER_OPE
1RATOR),o=(0,I.df)(t,B.bc.BACK_TO_SETTINGS),l=(0,s.A)(),{getValue:u}=(0,A.aU)();return(0,i.jsxs)(d.A,{paddingTop:"34px",maxWidth:"410px",marginX:"auto",children:[o&&(0,i.jsx)(R.E,{"data-testid":"back-to-settings-cta",href:o.fields.url,title:o.fields.title,color:"inherit",underline:"none",textBtn:!0,sx:{display:"block"},children:(0,i.jsxs)(d.A,{display:"flex",alignItems:"center",children:[(0,i.jsx)(_.In,{name:"chevron-left",size:"sm",sx:{marginRight:.5},"aria-hidden":"true"}),(0,i.jsx)(c.A,{fontWeight:700,children:o.fields.description})]})}),(0,i.jsxs)(d.A,{sx:{textAlign:"center"},children:[(0,i.jsx)(c.A,{variant:"heading2",component:"h1",marginTop:{xs:3},children:u(A.d_.leaveEzysTitle)}),(0,i.jsx)(c.A,{variant:"paragraph1",component:"p",marginTop:3,marginBottom:4,children:u(A.d_.leaveEzysDescription)}),r&&(0,i.jsx)(R.E,{width:"100%",sx:{padding:"unset"},"data-testid":"leave-post-paid-cta",onClick:()=>n(e7.LEAVE_TELIA),underline:"none",title:r.fields.title,children:(0,i.jsxs)(ev,{children:[(0,i.jsx)(_.In,{name:"pebble",size:"sm",color:"#990AE3","aria-hidden":"true"}),(0,i.jsx)(c.A,{variant:"heading4",component:"h2",marginLeft:3,children:r.fields.description})]})}),a&&(0,i.jsx)(R.E,{width:"100%",onClick:()=>n(e7.LEAVE_OTHER),sx:{padding:"unset"},underline:"none","data-testid":"leave-other-op-cta",title:a.fields.title,children:(0,i.jsxs)(ev,{children:[(0,i.jsx)(_.In,{name:"services",size:"sm",color:l.palette.primary.main,"aria-hidden":"true"}),(0,i.jsx)(c.A,{variant:"heading4",component:"h2",marginLeft:3,children:a.fields.description})]})})]})]})};var tt=n(96781),tn=n(68551);let ti={[e8.REASONS]:[],[e8.PERSONAL_DATA]:{[e9.NAME]:"",[e9.PERSONAL_ID]:"",[e9.SURNAME]:""},[e8.OPERATOR]:"",[e8.REASONS_OTHER]:""},tr=V.Ik().shape({[e8.REASONS]:V.YO().of(V.Yj()).required(j.F.REQUIRED).test("isValid",j.F.INVALID,e=>!!(null==e?void 0:e.length)),[e8.REASONS_OTHER]:V.Yj()}).required(j.F.REQUIRED),ta=V.Ik().shape({[e9.NAME]:V.Yj().matches(/\S/,j.F.INVALID).max(50,j.F.INVALID).required(j.F.REQUIRED),[e9.SURNAME]:V.Yj().matches(/\S/,j.F.INVALID).max(50,j.F.INVALID).required(j.F.REQUIRED),[e9.PERSONAL_ID]:V.Yj().required(j.F.REQUIRED).test("isValid",j.F.INVALID,e=>{let t=+(null!=e?e:0),n="".concat(t);return 11===n.length&&!Number.isNaN(e)&&"3,4,5,6".includes(n[0])&&t>=1e10&&t<1e11||null==e})}),to=V.Ik().shape({[e8.OPERATOR]:V.Yj().required(j.F.REQUIRED)}).required(j.F.REQUIRED),tl=(0,h.Ay)(d.A)(e=>{let{theme:t}=e;return{[t.breakpoints.up("xs")]:{paddingLeft:t.spacing(1.5),paddingRight:t.spacing(1.5),paddingTop:t.spacing(4)},[t.breakpoints.up("md")]:{width:"410px",paddingTop:t.spacing(6)},display:"flex",flexGrow:1,overflow:"hidden",margin:"0 auto",flexDirection:"column",'[name = "leaveReasons_other"]':{borderColor:t.palette.grey[100],padding:"14px 16px"}}}),ts=(0,h.Ay)(d.A)(e=>{let{theme:t}=e;return{display:"flex",flexDirection:"column",flexGrow:1,[t.breakpoints.down("md")]:{justifyContent:"space-between"}}}),td=e=>(0,i.jsx)(d.A,{paddingBottom:2.5,children:(0,i.jsx)(j.k,{...e})}),tc=e=>{let{content:t,onNextClick:n}=e;return t.primaryButton||t.secondaryButton?(0,i.jsxs)(d.A,{marginTop:4,children:[!!t.primaryButton&&(0,i.jsx)(D.default,{type:"submit","data-testid":"leave-ezys-next-btn",componentContent:t.primaryButton,onClick:n}),!!t.secondaryButton&&(0,i.jsx)(D.default,{sx:{marginTop:2},"data-testid":"leave-ezys-cancel-btn",componentContent:t.secondaryButton})]}):null},tu=e=>async()=>{Object.keys(await e.validateForm()).length||e.submitForm()},tp=e=>{var t;let{content:n,onSubmit:r}=e,o=(0,I.MK)(F.p.LEAVE_EZYS_FOR_OTHER_OPERATOR_FIRST_STEP,n.forms),l=(0,I.If)(n.notifications,e6.BEFORE_LEAVE_EZYS),[s,u]=(0,a.useState)(!1),{getValue:p}=(0,A.aU)(),E=(0,b.Wx)({initialValues:{[e8.REASONS]:[],[e8.REASONS_OTHER]:""},validationSchema:tr,validateOnChange:!1,validateOnBlur:!1,initialTouched:{[e8.REASONS]:!0},onSubmit:r}),{errors:h,handleChange:f}=E;return o?(0,i.jsxs)(ts,{children:[(0,i.jsxs)(d.A,{marginTop:3,children:[o.fields.description&&(0,i.jsx)(c.A,{variant:"paragraph1",marginBottom:4,component:"div",textAlign:"center",children:o.fields.description}),(0,i.jsxs)(tt.A,{sx:{},children:[null==(t=o.fields.optionsList)?void 0:t.map((e,t)=>(0,i.jsx)(ef.A,{"data-testid":"reason-".concat(t,"_label"),control:(0,i.jsx)(em.A,{name:e8.REASONS,"data-testid":"reason-".concat(t,"_check"),value:e,tabIndex:0,onChange:f}),label:e},"form-control-".concat(e))),(0,i.jsx)(ef.A,{"data-testid":"reason-other_label",control:(0,i.jsx)(em.A,{name:e8.REASONS,value:p(A.d_.leaveEzysOtherReason),tabIndex:0,"data-testid":"reason-other_check",onChange:e=>{u(e.target.checked),f(e)}}),label:p(A.d_.leaveEzysOtherReason)},"form-control-other"),s&&(0,i.jsx)(tn.A,{name:"".concat(e8.REASONS_OTHER),onChange:f,"data-testid":"reason-other-textarea","aria-label":p(A.d_.leaveEzysOtherReason),placeholder:p(A.d_.leaveEzysOtherReason),style:{height:"66px"}})]}),!!h[e8.REASONS]&&l&&(0,i.jsx)(L.ErrorNotification,{sx:{marginTop:3.5},testId:"leave-reason-error",description:(0,i.jsx)(M.s,{content:l.fields.text})})]}),(0,i.jsx)(tc,{content:o.fields,onNextClick:tu(E)})]}):null},tE=e=>{let{content:t,isLastStep:n,onSubmit:r}=e,a=(0,I.MK)(F.p.LEAVE_EZYS_FOR_POSTPAID,t.forms),o=(0,I.MK)(F.p.LEAVE_EZYS_FOR_OTHER_OPE
1RATOR_SECOND_STEP,t.forms),l=(0,I.p3)(B.Zh.ENTER_NAME,a),s=(0,I.p3)(B.Zh.ENTER_SURNAME,a),u=(0,I.p3)(B.Zh.ENTER_PERSONAL_ID,a),p=(0,I.p3)(B.Zh.ENTER_NAME,o),E=(0,I.p3)(B.Zh.ENTER_SURNAME,o),h=(0,I.p3)(B.Zh.ENTER_PERSONAL_ID,o),f=n?a:o,m=(0,b.Wx)({initialValues:{[e9.NAME]:"",[e9.SURNAME]:"",[e9.PERSONAL_ID]:""},validateOnChange:!1,validateOnBlur:!1,validationSchema:ta,onSubmit:r}),{errors:A,handleChange:x}=m;if(!f)return null;let R=n?null==a?void 0:a.fields.description:null==o?void 0:o.fields.description;return(0,i.jsxs)(ts,{children:[(0,i.jsxs)(d.A,{marginTop:n?void 0:3,children:[R&&(0,i.jsx)(c.A,{variant:"paragraph1",marginBottom:4,component:"div",textAlign:"center",children:R}),(0,i.jsx)(td,{errorKind:A[e9.NAME],onChange:x,required:!0,"data-testid":"leave-ezys-name",componentContent:n?l:p,name:e9.NAME,fullWidth:!0}),(0,i.jsx)(td,{errorKind:A[e9.SURNAME],onChange:x,required:!0,"data-testid":"leave-ezys-surname",componentContent:n?s:E,name:e9.SURNAME,fullWidth:!0}),(0,i.jsx)(td,{errorKind:A[e9.PERSONAL_ID],required:!0,"data-testid":"leave-ezys-personal-id",onChange:x,componentContent:n?u:h,name:e9.PERSONAL_ID,fullWidth:!0})]}),(0,i.jsx)(tc,{content:null==f?void 0:f.fields,onNextClick:tu(m)})]})};var th=n(57836);let tf=e=>{var t;let{content:n,onSubmit:r}=e,a=(0,I.MK)(F.p.LEAVE_EZYS_FOR_OTHER_OPERATOR_THIRD_STEP,n.forms),o=(0,I.p3)(B.Zh.ENTER_OPERATOR,a),l=(0,b.Wx)({initialValues:{[e8.OPERATOR]:""},validationSchema:to,initialTouched:{[e8.OPERATOR]:!0},onSubmit:r}),{errors:s}=l;return a?(0,i.jsxs)(ts,{children:[(0,i.jsxs)(d.A,{marginTop:3,children:[a.fields.description&&(0,i.jsx)(c.A,{variant:"paragraph1",marginBottom:4,component:"div",textAlign:"center",children:a.fields.description}),(0,i.jsx)(th.A,{label:(null==o?void 0:o.fields.label)||"",labelId:"select-operator",value:l.values.operatorName,options:(null!=(t=null==o?void 0:o.fields.selectOptions)?t:[]).map(e=>({id:e,label:e})),name:e8.OPERATOR,required:!0,error:!!s[e8.OPERATOR],dataTestId:"select-operator",handleChange:l.handleChange,errorText:null==o?void 0:o.fields[s[e8.OPERATOR]]})]}),(0,i.jsx)(tc,{content:a.fields,onNextClick:tu(l)})]}):null},tm=e=>{let{pageContent:{fields:t}}=e,n=(0,I.MK)(F.p.LEAVE_EZYS_SUCCESS,t.forms),o=(0,I.MK)(F.p.LEAVE_EZYS_FOR_POSTPAID,t.forms),[s,u]=(0,a.useState)(e7.START),p=(0,a.useMemo)(()=>s===e7.LEAVE_TELIA?[e8.PERSONAL_DATA]:[e8.REASONS,e8.PERSONAL_DATA,e8.OPERATOR],[s]),E=(0,r.useRouter)(),h=(0,a.useRef)(ti),[f]=(0,l.n)(e3,{onCompleted:e=>{e.leaveEzys.status===e4.FAILED?E.push(k.pp):u(e7.SUCCESS)},onError:(0,S.K)(()=>E.push(k.pp))}),A=(e,t)=>{h.current&&(h.current={...h.current,[e]:t})},[R,g]=(0,a.useState)(0);if(s===e7.START)return(0,i.jsx)(te,{content:t,onChangeState:e=>{h.current={...ti},u(e)}});if(s===e7.SUCCESS&&n){let{title:e,primaryButton:t,additionalInfoText:r}=n.fields;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(x.O,{}),(0,i.jsx)(e$,{name:"Port out success",successTitle:e,successButton:t,children:(0,i.jsx)(d.A,{marginTop:3,marginBottom:4,children:r&&(0,i.jsx)(M.s,{content:r})})})]})}let _=R===p.length-1,C=()=>{if(!_)return void g(R+1);if(h.current){let{personalData:e,leaveReasons:t,operatorName:n,otherLeaveReasons:i}=h.current,r=n||"Telia";f({variables:{leaveReasons:t,otherLeaveReasons:i,personalData:e,operatorName:r}}),e5.Ay.leaveEzysTransferNumber(r),h.current={...ti}}};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(x.O,{}),(0,i.jsxs)(tl,{children:[(0,i.jsx)(c.A,{variant:"heading2",component:"h1",marginBottom:4,textAlign:"center",children:s===e7.LEAVE_TELIA?null==o?void 0:o.fields.title:((e,t)=>{var n,i,r,a;let o=(e=>({leaveEzysForPostpaidForm:(0,I.MK)(F.p.LEAVE_EZYS_FOR_POSTPAID,e.forms),leaveEzysForOtherOperator1Form:(0,I.MK)(F.p.LEAVE_EZYS_FOR_OTHER_OPERATOR_FIRST_STEP,e.forms),leaveEzysForOtherOperator2Form:(0,I.MK)(F.p.LEAVE_EZYS_FOR_OTHER_OPERATOR_SECOND_STEP,e.forms),leaveEzysForOtherOperator3Form:(0,I.MK)(F.p.LEAVE_EZYS_FOR_OTHER_OPERATOR_THIRD_STEP,e.forms),requestSuccessForm:(0,I.MK)(F.p.LEAVE_EZYS_SUCCESS,e.forms)}))(t);switch(e){case e8.REASONS:return null==(n=o.leaveEzysForOtherOperator1Form)?void 0:n.fields.title;case e8.REASONS_OTHER:return null==(i=o.leaveEzysForOtherOperator1Form)?void 0:i.fields.title;case e8.PERSONAL_DATA:return null==(r=o.leaveEzysForOtherOperator2Form)?void 0:r.fields.title;case e8.OPERATOR:return null==(a=o.leaveEzysForOtherOperator3Form)?void 0:a.fields.title;default:return""}})(p[R],t)}),(0,i.jsx)(m,{currentStep:R,steps:p}),p[R]===e8.REASONS&&(0,i.jsx)(tp,{content:t,onSubmit:e=>{A(e8.REASONS,e[e8.REASONS]),A(e8.REASONS_OTHER,e[e8.REASONS_OTHER]),C()}}),p[R]===e8.PERSONAL_DATA&&(0,i.jsx)(tE,{content:t,isLastStep:_,onSubmit:e=>{A(e8.PERSONAL_DATA,e),C()}}),p[R]===e8.OPERATOR&&(0,i.jsx)(tf,{content:t,onSubmit:e=>
1{A(e8.OPERATOR,e[e8.OPERATOR]),C()}})]})]})},tA=e=>{let{pageContent:t}=e,n=(0,r.useRouter)();return(0,i.jsxs)(i.Fragment,{children:[t.fields.id===F.E.REGISTRATION_FLOW&&n.isReady&&(0,i.jsx)(eO,{pageContent:t}),t.fields.id===F.E.LEAVE_EXTRA_FLOW&&(0,i.jsx)(eJ,{pageContent:t}),t.fields.id===F.E.LEAD_GENERATION_FLOW&&(0,i.jsx)(e0,{pageContent:t}),t.fields.id===F.E.LEAVE_EZYS_FLOW&&(0,i.jsx)(tm,{pageContent:t})]})}},21402:(e,t,n)=>{n.d(t,{r:()=>s});var i=n(37876),r=n(14232),a=n(73665),o=n(42008),l=n(82777);let s=(0,r.forwardRef)(function(e,t){let{counterActive:n,countDownId:r,text:s,...d}=e,c=(0,a.A)();return(0,i.jsxs)(o.A,{...d,display:"flex",alignItems:"center",justifyContent:"center",sx:{backgroundColor:c.palette.grey[50],padding:n?"16px":0,width:"100%",...d.sx},children:[n&&(0,i.jsx)(l.A,{variant:"paragraph1",children:s}),(0,i.jsx)(l.A,{ref:t,id:r,variant:"heading4",display:"block",paddingLeft:"5px"})]})})},21627:(e,t,n)=>{n.d(t,{F:()=>u,k:()=>c});var i=n(37876),r=n(856),a=n(22997),o=n(82777),l=n(5701),s=n(38529),d=n(5391);let c=e=>{let{componentContent:t,errorKind:n,contextualText:c,inputRef:u,inputProps:p,...E}=e;return t?(0,i.jsxs)(r.A,{fullWidth:E.fullWidth,"data-testid":(0,s.G)(t),sx:{opacity:E.disabled?.6:1},children:[(0,i.jsx)(d.Ul,{"data-testid":"".concat(l.b,"_label"),required:E.required,htmlFor:t.sys.id,"aria-labelledby":null==t?void 0:t.fields.label,children:(0,i.jsx)(o.A,{maxWidth:"95%",noWrap:!0,children:t.fields.label})}),(0,i.jsx)(d.sQ,{inputProps:{"data-testid":(0,s.G)(t,"input-element"),...p},error:!!n,id:t.sys.id,placeholder:t.fields.placeholder,inputRef:u,"aria-describedby":n?"".concat(l.b,"_error_").concat(t.sys.id):void 0,...E}),n&&t.fields[n]&&(0,i.jsxs)(a.A,{error:!0,role:"alert","aria-live":"polite","data-testid":"".concat(l.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)(o.A,{id:"".concat(l.b,"_error_").concat(t.sys.id),variant:"paragraph1","data-testid":"".concat(l.b,"_error_text"),children:null==t?void 0:t.fields[n]})]}),c&&(0,i.jsx)(d.S$,{isError:!!n,variant:"paragraph2","data-testid":"".concat(l.b,"_contextual_text"),children:c})]}):null};var u=function(e){return e.INVALID="errorMessageFieldIsInvalid",e.REQUIRED="errorMessageFieldIsRequired",e.CUSTOM="errorMessageFieldCustom",e}({})},22655:(e,t,n)=>{n.d(t,{B:()=>a,_:()=>o});var i=n(56912),r=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 o(e){let{captchaToken:t,...n}=e;return r.gB.post(i.Hr.GAME_REGISTRATION,n,{headers:{[r.Lb]:t}})}},26229:(e,t,n)=>{n.d(t,{EF:()=>p,KJ:()=>d,Lb:()=>u,gB:()=>c});var i=n(56912);let r="Ezys-Is-Missing-Phone-Number";class a extends Error{constructor(e,t){super("HTTP Error: ".concat(e," - ").concat(t)),this.status=e,this.statusText=t}}let o=e=>{if(403===e.status&&e.headers.get(r)){let t=e.headers.get(r);globalThis.location.href="".concat(i.Bw,"?phoneNumber=").concat(t);return}return Promise.reject(new a(e.status,e.statusText))},l=e=>e.status>=200&&e.status<300?e.text():o(e),s=e=>e.status>=200&&e.status<300?e.json():o(e),d={post:(e,t,n)=>{let{headers:r={}}=null!=n?n:{};return fetch(i.CI+e,{method:"POST",body:JSON.stringify(t),...n,headers:{"Content-Type":"application/json",...r}}).then(l)},get:(e,t)=>fetch("".concat(i.CI+e,"?").concat(new URLSearchParams(t)),{method:"GET"}).then(l)},c={post:(e,t,n,r)=>{let{headers:a={}}=null!=n?n:{};return fetch("".concat(i.CI+e,"?").concat(new URLSearchParams(r)),{method:"POST",body:JSON.stringify(t),...n,credentials:"include",headers:{"Content-Type":"application/json",...a}}).then(s)},get:(e,t)=>fetch("".concat(i.CI+e,"?").concat(new URLSearchParams(t)),{method:"GET",credentials:"include"}).then(s)},u="X-Captcha-Token",p="Accept-Language"},30098:(e,t,n)=>{n.d(t,{K:()=>a});var i=n(56912),r=n(26229);function a(e,t){return r.KJ.get(i.Hr.VALIDATE_NUMBER,{phoneNumber:e,channel:t})}}
1,36489:(e,t,n)=>{n.d(t,{O:()=>g,A:()=>S});var i=n(37876),r=n(96849),a=n(50090),o=n(73665),l=n(91408),s=n(20051),d=n(14232),c=n(21627),u=n(29775),p=n(56912),E=n(26229),h=n(9339),f=n(55542),m=n(31221),A=n(83543);let x={[A.k.NAME]:"",[A.k.SURNAME]:"",[A.k.PHONE_NUMBER]:"",[A.k.COMMENT]:""},R=l.Ik().shape({[A.k.NAME]:l.Yj().max(50,c.F.INVALID).required(c.F.REQUIRED),[A.k.SURNAME]:l.Yj().max(50,c.F.INVALID).required(c.F.REQUIRED),[A.k.PHONE_NUMBER]:l.Yj().test("len",c.F.INVALID,e=>(null==e?void 0:e.length)===8).required(c.F.REQUIRED),[A.k.COMMENT]:l.Yj().max(2e3,c.F.INVALID)}),g=e=>{let{onClose:t,content:n,onComplete:r}=e,a=(0,d.useCallback)(e=>{E.KJ.post(p.Hr.LEAD_GENERATION,e).then(()=>{t(),r(h.jG.SUCCESS)}).catch(e=>{t(),503===e.status&&(0,f.xL)("global"),r(h.jG.ERROR)})},[t,r]);return(0,i.jsx)(s.l1,{initialValues:x,onSubmit:a,validationSchema:R,validateOnBlur:!1,validateOnChange:!1,children:e=>(0,i.jsx)(_,{onClose:t,content:n,...e})})},_=e=>{let{content:t,onClose:n,handleChange:l,handleSubmit:s,values:d,isSubmitting:p,errors:E}=e,f=(0,o.A)(),x=(0,m.p3)(h.Zh.ENTER_NAME,t),R=(0,m.p3)(h.Zh.ENTER_SURNAME,t),g=(0,m.p3)(h.Zh.ENTER_NUMBER,t),_=(0,m.p3)(h.Zh.ENTER_COMMENT,t);return(0,i.jsxs)("form",{noValidate:!0,onSubmit:s,children:[(0,i.jsxs)(r.A,{columnSpacing:2,sx:{mb:{xs:f.spacing(2),md:0}},container:!0,children:[(0,i.jsx)(r.A,{sx:{mb:2},size:{xs:12,md:6},children:(0,i.jsx)(c.k,{errorKind:E[A.k.NAME],onChange:l,value:d[A.k.NAME],required:!0,componentContent:x,name:A.k.NAME,fullWidth:!0})}),(0,i.jsx)(r.A,{size:{xs:12,md:6},children:(0,i.jsx)(c.k,{errorKind:E[A.k.SURNAME],onChange:l,value:d[A.k.SURNAME],required:!0,componentContent:R,name:A.k.SURNAME,fullWidth:!0})})]}),(0,i.jsx)(r.A,{sx:{mb:2},size:{md:12},children:(0,i.jsx)(c.k,{isPhoneNumber:!0,errorKind:E[A.k.PHONE_NUMBER],required:!0,onChange:e=>(e=>{let t=e.currentTarget.value;/^\d+$|^$/.test(t)&&l(e)})(e),value:d[A.k.PHONE_NUMBER],componentContent:g,name:A.k.PHONE_NUMBER,fullWidth:!0})}),(0,i.jsx)(r.A,{sx:{mb:4},size:{md:12},children:(0,i.jsx)(c.k,{errorKind:E[A.k.COMMENT],style:{height:120,display:"flex",alignItems:"flex-start",maxHeight:120,overflow:"auto"},onChange:e=>{l(e)},value:d[A.k.COMMENT],multiline:!0,type:"textarea",componentContent:_,name:A.k.COMMENT,fullWidth:!0})}),(!!t.fields.primaryButton||!!t.fields.secondaryButton)&&(0,i.jsx)(a.A,{children:(0,i.jsxs)(r.A,{container:!0,spacing:2,width:"100%",children:[!!t.fields.primaryButton&&(0,i.jsx)(u.default,{role:"submit",value:"Submit",type:"submit",componentContent:t.fields.primaryButton,disabled:p,onKeyDownCapture:e=>{("Enter"===e.key||" "===e.key)&&s()}}),!!t.fields.secondaryButton&&(0,i.jsx)(u.default,{type:"button",onClick:n,componentContent:t.fields.secondaryButton})]})})]})},S=g},47123:(e,t,n)=>{n.d(t,{Em:()=>a,dd:()=>i,t5:()=>r});var i=function(e){return e.APPLICABLE_TO_GAME="gamePromoteAfterTransaction",e.ALREADY_REGISTERED="gameAlreadyRegistered",e}({}),r=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}({})},51946:(e,t,n)=>{n.r(t),n.d(t,{LeadGenerationModal:()=>c});var i=n(37876),r=n(53318),a=n(26675),o=n(14476),l=n(43185),s=n(82777),d=n(36489);let c=e=>{let{open:t,content:n,onClose:c,onComplete:u}=e,{title:p,description:E}=n.fields,h=(0,r.A)(e=>e.breakpoints.down("md"));return(0,i.jsx)(a.A,{onClose:c,maxWidth:"lg","data-testid":"lead-generation-modal",fullScreen:h,open:t,disableEnforceFocus:h,scroll:"body",children:(0,i.jsxs)(o.A,{sx:{maxWidth:628},children:[(0,i.jsx)(l.A,{children:(0,i.jsx)(s.A,{component:"span",variant:"heading1",children:p})}),E&&(0,i.jsx)(s.A,{marginBottom:3,display:"block",variant:"paragraph1",children:E}),(0,i.jsx)(d.A,{onComplete:u,content:n,onClose:c})]})})}},57836:(e,t,n)=>{n.d(t,{A:()=>x});var i=n(37876),r=n(73665),a=n(856),o=n(42008),l=n(22997),s=n(82777),d=n(5391),c=n(23971),u=n(31221),p=n(22890),E=n(73896),h=n(66438);let f=(0,h.Ay)(E.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]}}}),m=(0,h.Ay)(o.A)(()=>({display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%"})),A=(0,h.Ay)(p.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%"}}}}),x=e=>{let{label:t,labelId:n,value:p,defaultValue:E,ariaLabel:h,disabled:x,dataTestId:R,errorText:g,options:_,handleChange:S,...C}=e,I=(0,u.m0)(),T=(0,r.A)();return(0,i.jsxs)(a.A,{size:"small",disabled:x,sx:{width:"100%",opacity:x?.6:1},children:[(0,i.jsx)(d.Ul,{id:n,children:t}),I?(0,i.jsxs)(A,{native:!0,labelId:n,value:p,displayEmpty:!0,"data-testid":R,"aria-label":h,onChange:S,...C,children:[E?(0,i.jsx)("option",{value:"","data-testid":"default-option",children:E},"default"):(0,i.jsx)("option",{value:"",disabled:!0,hidden:!0}),_.map(e=>{let{id:t,label:n}=e;return(0,i.jsx)("option",{value:t,"data-testid":"".concat(R,"-option-").concat(t),children:n},t)})]}):(0,i.jsxs)(A,{labelId:n,value:p,hasValue:!!p,displayEmpty:!0,"data-testid":R,"aria-label":h,onChange:S,renderValue:e=>{if(!e&&E)return E;let t=_.find(t=>t.id===e);return t?(0,i.jsx)(i.Fragment,{children:t.label}):""},...C,children:[E&&(0,i.jsx)(f,{value:"","data-testid":"default-option",children:(0,i.jsxs)(m,{children:[E,(0,i.jsx)(o.A,{sx:{visibility:""===p?"visible":"hidden",display:"inline-flex"},children:(0,i.jsx)(c.In,{"aria-hidden":!0,name:"checkmark",size:"sm",sx:{ml:"auto"},color:T.palette.common.black})})]})},"default"),_.map(e=>{let{id:t,label:n}=e,r=t===p;return(0,i.jsx)(f,{value:t,"data-testid":"".concat(R,"-option-").concat(t),children:(0,i.jsxs)(m,{children:[n,(0,i.jsx)(o.A,{sx:{display:"inline-flex",visibility:r?"visible":"hidden"},children:(0,i.jsx)(c.In,{"aria-hidden":!0,name:"checkmark",size:"sm",sx:{ml:"auto"},color:T.palette.common.black})})]})},t)})]}),C.error&&g&&(0,i.jsxs)(l.A,{"data-testid":"".concat(R,"_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)(s.A,{variant:"paragraph1",children:g})]})]})}},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:()=>r});let i=e=>/^\d{1,8}$/.test(e),r=e=>/^\d{8}$/.test(e)},83133:(e,t,n)=>{n.d(t,{N9:()=>o,in:()=>i,lo:()=>a,q:()=>l,yY:()=>r});let i={display:"flex",justifyContent:"center"},r={display:"flex",flexDirection:"column",alignItems:"center"},a={display:"flex",flexDirection:"row",alignItems:"flex-start"},o={textTransform:"unset",whiteSpace:"nowrap",fontWeight:"bold"},l=e=>({overflowY:"overlay","::-webkit-scrollbar":{width:"12px"},"::-webkit-scrollbar-thumb":{backgroundColor:e.palette.grey[100],border:"4px solid transparent",backgroundClip:"content-box"},"::-webkit-scrollbar-track":{backgroundColor:"transparent"}})},83543:(e,t,n)=>{n.d(t,{k:()=>i});var i=function(e){return e.NAME="name",e.SURNAME="surname",e.PHONE_NUMBER="phoneNumber",e.COMMENT="comment",e}({})}}]);

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.