1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="00892536-082c-4829-9ba6-56dab9ddcc84",e._sentryDebugIdIdentifier="sentry-dbid-00892536-082c-4829-9ba6-56dab9ddcc84")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3836],{2394:(e,t,a)=>{"use strict";a.d(t,{s:()=>s});var r=a(75284);let s=e=>async t=>{await t(r.a.connect2FA.thunk.request({body:e}))}},3836:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>eZ});var r=a(23798),s=a(46001),o=a.n(s),n=a(21462),i=a(74138),l=a(39942),c=a(67150),d=a(7718),u=a(46296),f=a(90969),p=a(1840),g=a(63416),m=a(71328),h=a(35395),y=a(87383),v=a.n(y),x=a(8759),b=a(75284),w=a(14156),_=a(18671),k=a(1091),M=a(3169),j=a(51469),P=a(99407),C=a(70101),S=a(3265),N=a(53012),O=a(19049),F=a(69670);let D=e=>{let{fields:t}=e,a=(0,x.d4)(b.a.getPlayerInfo.selector.data),s=(0,x.d4)(b.a.getPlayerInfo.selector.isFetching),o=(0,x.d4)(b.a.updatePlayerAddress.selector.isFetching),{data:i}=(0,j.Z)(),l=null==i?void 0:i.excludedCountryIds,c=(0,k.t)(),d=(0,P.F)({rules:a,intl:c}),u=null==t?void 0:t.reduce((e,t)=>({...e,[t.name]:d[t.name]}),{}),f=(0,n.useMemo)(()=>null==t?void 0:t.reduce((e,t)=>("countryId"===t.name&&(null==l?void 0:l.includes(t.value))||(e[t.name]=t.value),e),{}),[t,l]),{reset:g,register:m,control:y,formState:D,formState:{errors:B},handleSubmit:T,watch:$,setValue:I}=(0,M.n)({resolver:(0,h.H)(v().object().keys(u)),defaultValues:f,mode:"onChange"});(0,n.useEffect)(()=>{if(t){let e=t.find(e=>"countryId"===e.name);e&&(null==l?void 0:l.includes(e.value))&&I("countryId",null)}},[l,t,I]);let{optionsMap:Y,submit:A}=((e,t)=>{let a=(0,x.wA)(),r=(0,k.t)();(0,C.r)();let{data:s}=(0,S.O)(),{data:o}=(0,j.Z)(),i=null==o?void 0:o.excludedCountryIds,{timezoneOptions:l}=(0,N.z)(),c=(0,n.useMemo)(()=>[...null!=s?s:[]].filter(e=>e._key&&!(null==i?void 0:i.includes(e._key))).sort((e,t)=>{var a;return(null==(a=e.locTitle)?void 0:a.localeCompare(t.locTitle||""))||0}),[s,i]),d=(0,n.useCallback)(a=>async(s,o)=>{for(let e in a)a[e]||(a[e]=null);await s(b.a.updatePlayerAddress.thunk.request({body:a}));let{error:n}=b.a.updatePlayerAddress.selector.state(o());if(!n){await s(b.a.getPlayerInfo.thunk.request({}));let{data:a}=b.a.getPlayerInfo.selector.state(o());e(null==t?void 0:t.reduce((e,t)=>({...e,[t.name]:(null==a?void 0:a[t.name]).value}),{}))}n&&(0,F.Qp)(n),(0,O.D)({message:r.formatMessage({id:"roc-front.front.request.update_profile_fields.success",defaultMessage:"Successfully saved"}),type:"success"})},[t,e,r]);return{submit:e=>{a(d(e))},optionsMap:{countryId:c,timezoneId:l}}})(g,t),L=(0,p.o)("ProfileSettings");return t?(0,r.jsxs)("div",{className:L("tab"),children:[(0,r.jsx)("form",{className:L("form"),children:t.sort((e,t)=>e.order-t.order).map((e,t)=>{let{name:a,...s}=e;return(0,r.jsx)(_.i,{element:s,control:y,register:m,setValue:I,watch:$,errors:B,name:a,optionsMap:Y},`Profile-Field-${a}-${t}`)})}),(0,r.jsx)("div",{className:L("button"),children:(0,r.jsx)(w.$,{title:c.formatMessage({id:"roc-front.front.profile.sections_location.button.update_data",defaultMessage:"Update data"}),type:"primary",isLoading:o,disabled:!D.isDirty||s,onClick:T(A)})})]}):null};var B=a(58822),T=a.n(B),$=a(29789),I=a.n($),Y=a(86946),A=a(71532);T().extend(I());let L=e=>{var t;let{fields:a}=e,{minPlayersAge:s,maxPlayersAge:i,allowNotSpecifiedGender:l,documentNumber:c}=null!=(t=(0,j.Z)().data)?t:{},d=(0,x.d4)(b.a.getPlayerInfo.selector.data),u=(0,x.d4)(b.a.getPlayerInfo.selector.isFetching),f=(0,x.d4)(b.a.updatePlayerPersonalData.selector.isFetching),g=(0,k.t)(),m=(0,P.F)({rules:d,intl:g,minPlayersAge:s,maxPlayersAge:i,documentNumberRule:c}),y=null==a?void 0:a.reduce((e,t)=>({...e,[t.name]:m[t.name]}),{}),C=(0,n.useMemo)(()=>null==a?void 0:a.reduce((e,t)=>("birthday"===t.name&&t.value?e[t.name]=T()(t.value).utc().format("YYYY-MM-DD"):"gender"===t.name?(e[t.name]=t.value,l&&!t.value&&(e[t.name]="NotSet"),l||"NotSet"!==t.value||(e[t.name]=null)):e[t.name]=t.value,e),{}
1),[l,a]),{reset:S,register:N,control:D,formState:B,formState:{errors:$},handleSubmit:L,watch:R,setValue:U}=(0,M.n)({resolver:(0,h.H)(v().object().keys(y)),context:{minAge:s,maxAge:i},defaultValues:C,mode:"onChange"}),{submit:E}=((e,t)=>{let a=(0,x.wA)(),r=(0,k.t)(),s=(0,n.useCallback)(a=>async(s,o)=>{for(let e in T().extend(I()),a.birthday&&(a.birthday=T().utc(a.birthday).toISOString()),a)"gender"!==e||a[e]||(a[e]="NotSet"),a[e]||(a[e]=null);null==t||t.forEach(e=>{e.isEditableByPlayer||delete a[e.name]}),await s(b.a.updatePlayerPersonalData.thunk.request({body:a}));let{error:n}=b.a.updatePlayerPersonalData.selector.state(o());if(!n){await s(b.a.getPlayerInfo.thunk.request({}));let{data:a}=b.a.getPlayerInfo.selector.state(o());e(null==t?void 0:t.reduce((e,t)=>"birthday"===t.name?{...e,[t.name]:T()((null==a?void 0:a[t.name]).value).format("YYYY-MM-DD")}:{...e,[t.name]:(null==a?void 0:a[t.name]).value},{})),await s(b.a.getPlayerProfile.thunk.request({}))}n&&(0,F.Qp)(n),(0,O.D)({message:r.formatMessage({id:"roc-front.front.request.update_profile_fields.success",defaultMessage:"Successfully saved"}),type:"success"})},[t,e,r]);return(0,n.useEffect)(()=>(a(b.a.getGenderDictionary.thunk.request({})),()=>{a(b.a.getGenderDictionary.action.reset())}),[a]),{submit:e=>{a(s(e))}}})(S,a),G={gender:l},q=(0,p.o)("ProfileSettings"),K=(0,p.o)("FieldText");return a?(0,r.jsxs)("div",{className:q("tab"),children:[(0,r.jsx)("form",{className:q("form"),children:a.sort((e,t)=>e.order-t.order).map((e,t)=>{let{name:a,...s}=e;return"documentNumber"===a&&!1===s.isEditableByPlayer?(0,r.jsx)(_.i,{element:s,control:D,register:N,setValue:U,watch:R,errors:$,name:a,optionsMap:G,children:(0,r.jsxs)("div",{className:o()(K("info"),"body4"),children:[(0,r.jsx)(Y.I,{name:"info"}),g.formatMessage(A.R.support)]})},`Profile-Field-${a}-${t}`):(0,r.jsx)(_.i,{element:s,control:D,register:N,setValue:U,watch:R,errors:$,name:a,optionsMap:G},`Profile-Field-${a}-${t}`)})}),(0,r.jsx)("div",{className:q("button"),children:(0,r.jsx)(w.$,{title:g.formatMessage({id:"roc-front.front.profile.sections_personal.button.update_data",defaultMessage:"Update data"}),type:"primary",isLoading:f,disabled:!B.isDirty||u,onClick:L(E)})})]}):null};var R=a(9586);let U={type:R.Y.GROUP,gap:"25px",direction:"column",children:[{type:R.Y.BLOCK,width:"100px",height:"20px"},{type:R.Y.BLOCK,width:"300px",height:"45px"},{type:R.Y.BLOCK,height:"40px"}]},E={type:R.Y.GROUP,gap:"25px",direction:"column",children:[{type:R.Y.BLOCK,width:"80px",height:"20px"},{type:R.Y.BLOCK,width:"200px",height:"40px"},{type:R.Y.BLOCK,height:"30px"}]},G={type:R.Y.GROUP,gap:"20px",direction:"column",children:[{type:R.Y.BLOCK,width:"60px",height:"20px"},{type:R.Y.BLOCK,width:"150px",height:"35px"},{type:R.Y.BLOCK,height:"35px"}]},q={type:R.Y.GROUP,direction:"column",gap:"8px",children:[{type:R.Y.BLOCK,width:"120px",height:"16px"},{type:R.Y.BLOCK,height:"40px"}]},K={type:R.Y.GROUP,direction:"row",gap:"16px",children:[{...q,flexGrow:1},{...q,flexGrow:1}]},z={type:R.Y.GROUP,direction:"column",gap:"8px",children:[{type:R.Y.BLOCK,width:"150px",height:"16px"},{type:R.Y.BLOCK,height:"40px"}]},H={type:R.Y.GROUP,direction:"column",gap:"8px",children:[{type:R.Y.BLOCK,width:"150px",height:"16px"},{type:R.Y.GROUP,direction:"row",gap:"8px",alignItems:"center",children:[{type:R.Y.BLOCK,height:"40px",flexGrow:1},{type:R.Y.BLOCK,width:"20px",height:"20px",isCircle:!0}]}]},V={type:R.Y.GROUP,display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:"24px",children:[z,z,z,z,H,z]},W={type:R.Y.GROUP,display:"grid",gridTemplateColumns:"1fr 1fr",gap:"24px",children:[z,z,z,z,H,z,z,z]},Z={type:R.Y.GROUP,display:"grid",gridTemplateColumns:"1fr",gap:"24px",children:[z,z,z,z,H,z,z,z,z]},Q={type:R.Y.GROUP,gap:"24px",direction:"column",children:[K,K,z,z,z]},J={type:R.Y.GROUP,gap:"24px",direction:"column",children:[q,q]},X={type:R.Y.GROUP,justifyContent:"flex-end",children:[{type:R.Y.BLOCK,height:"40px",width:"120px"}]},ee={type:R.Y.GROUP,direction:"row",gap:"20px",justifyContent:"flex-end",children:[{type:R.Y.BLOCK,width:"100px",height:"40px"},{type:R.Y.BLOCK,width:"140px",height:"40px"}]},et={type:R.Y.GROUP,direction:"row",gap:"20px",children:[{type:R.Y.BLOCK,width:"50%",height:"40px"},{type:R.Y.BLOCK,width:"50%",height:"40px"}]},ea={type:R.Y.GROUP,direction:"column",gap:"50px",groupWithBg:!0,padding:"32px",children:[U,V,X]},er={type:R.Y.GROUP,direction:"column",groupWithBg:!0,padding:"32px",margin:"20px",gap:"50px",children:[U,Q,X]},es={type:R.Y.GROUP,direction:"column",groupWithBg:!0,padding:"32px",margin:"20px",gap:"50px",children:[U,J,ee]},eo={...ea,padding:"32px",children:[E,W,X]},en={...er,padding:"32px",children:[E,Q,X]},ei={...es,padding:"32px",children:[E,J,ee]},el={...ea,gap:"45px",groupWithBg:!1,padding:"20px",children:[G,Z,X]},ec={...er,gap:"45px",groupWithBg:!1,padding:"20px",children:[G,Q,X]},ed={type:R.Y.GROUP,direction:"column",gap:"50px",padding:"20px",children:[U,J,et]};var eu=a(87462),ef=a(94108),ep=a(39788),eg=a(94667);let em=e=>{let{onClose:t}=e,a=(0,p.o)("TwoFAModal"),s=(0,k.t)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Y.I,{name:"defiwallet-success",className:a("titleIcon")}),(0,r.jsx)("h1",{className:o()(a("third_title"),"title4"),children:s.formatMessage({id:"roc-front.front.profile.sections_security.2fa.third_form.title",defaultMessage:"Done!"})}),(0,r.jsx)("p",{className:o()(a("third_description"),"body2"),children:s.formatMessage({id:"roc-front.front.profile.sections_security.2fa.third_form.disconnect.description",defaultMessage:"2 factor authentication is disconnected"})}),(0,r.jsx)("div",{className:a("footer"),children:(0,r.jsx)(w.$,{title:s.formatMessage({id:"roc-front.front.profile.sections_security.2fa.third_form.got_it",defaultMessage:"Got it"}),className:a("button",["fixed","center"]),type:"primary",onClick:t})})]})};var eh=a(31537),ey=a(2394),ev=a(14895),ex=a(7106),eb=a(25013),ew=a(50708),e_=a(12444);let ek=e=>{let{onSuccess:t}=e,{intl:a,bem:s,register:n,isDirty:i,isValid:l,handleSubmit:c,errors:d,onSubmit:u,connect2FAState:f}=(e=>{let{onSuccess:t}=e,a=(0,p.o)("TwoFAModal"),r=(0,k.t)(),s=(0,x.wA)(),o=(0,x.d4)(b.a.connect2FA.selector.state),{keycloak:n}=(0,ew.z)(),{isKCEnabled:i,hallId:l}=(0,e_.j)(),c=v().object({confirmationCode:v().string().required().custom((e,t)=>
1e&&6!==e.length?t.error("custom.length"):e).messages({"string.empty":r.formatMessage({id:"roc-front.front.profile.sections_security.2fa.second_form.code.blank",defaultMessage:"Verification code can not be blank"}),"any.required":r.formatMessage({id:"roc-front.front.profile.sections_security.2fa.second_form.code.blank",defaultMessage:"Verification code can not be blank"}),"custom.length":r.formatMessage({id:"roc-front.front.profile.sections_security.2fa.second_form.code.invalid",defaultMessage:"Verification code is invalid"})})}),{register:d,formState:{isDirty:u,isValid:f,errors:g},handleSubmit:m}=(0,M.n)({mode:"onChange",resolver:(0,h.H)(c)});return{intl:r,bem:a,register:d,isDirty:u,isValid:f,handleSubmit:m,errors:g,onSubmit:e=>{s(async(a,s)=>{await a((0,ey.s)({...e,isConnected:!1}));let{error:o,data:c}=b.a.connect2FA.selector.state(s());if(o){var d;return(0,O.D)({message:null==(d=o.data)?void 0:d.message,type:"error"})}if(!(null==c?void 0:c.isConnected)){if(await a((0,ev.p)(!0)),t(),i&&n){try{await n.updateToken(-1),n.token&&n.refreshToken&&l&&a((0,ex._)({accessToken:n.token,refreshToken:n.refreshToken,hallId:l}))}catch(e){return(0,O.D)({message:r.formatMessage({id:"roc-front.front.deposit_withdraw.error.keycloak",defaultMessage:"It is not possible to update the keycloak token"}),type:"error"})}return}a((0,eb.b)())}})},connect2FAState:o}})({onSuccess:t});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:o()(s("second_description"),"body2"),children:a.formatMessage({id:"roc-front.front.profile.sections_security.2fa.second_form.description",defaultMessage:"Please enter the verification code from the authentication app installed. If you don't have access to the authentication app please use the recovery code."})}),(0,r.jsx)(eh.c,{name:"confirmationCode",register:n,errors:d,type:"text",label:a.formatMessage({id:"roc-front.front.withdraw.2fa.confirm_withdraw_code.label",defaultMessage:"2FA CODE"}),placeholder:a.formatMessage({id:"roc-front.front.profile.sections_security.2fa.second_form.code.placeholder",defaultMessage:"Enter the code"})}),(0,r.jsx)("div",{className:s("footer"),children:(0,r.jsx)(w.$,{title:a.formatMessage({id:"roc-front.front.profile.sections_security.2fa.button.disconnect",defaultMessage:"Disconnect"}),isLoading:f.isFetching,className:s("button",["fixed"]),type:"primary",disabled:!l||!i,onClick:c(u)})})]})},eM=e=>{let{onClose:t}=e,a=(0,p.o)("TwoFAModal"),s=(0,k.t)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Y.I,{name:"defiwallet-success",className:a("titleIcon")}),(0,r.jsx)("h1",{className:o()(a("third_title"),"title4"),children:s.formatMessage({id:"roc-front.front.profile.sections_security.2fa.third_form.title",defaultMessage:"Done!"})}),(0,r.jsx)("p",{className:o()(a("third_description"),"body2"),children:s.formatMessage({id:"roc-front.front.profile.sections_security.2fa.third_form.connect.description",defaultMessage:"2 factor authentication is connected"})}),(0,r.jsx)("div",{className:a("footer"),children:(0,r.jsx)(w.$,{title:s.formatMessage({id:"roc-front.front.profile.sections_security.2fa.third_form.got_it",defaultMessage:"Got it"}),className:a("button",["fixed","center"]),type:"primary",onClick:t})})]})};var ej=a(66458),eP=a(70146);let eC=e=>{var t;let{onClose:a}=e,s=(0,k.t)(),i=(0,p.o)("TwoFAModal"),[l,c]=(0,n.useState)(!0),[d,u]=(0,n.use
1State)(!1),[f,g]=(0,n.useState)(!1),m=(0,x.d4)(b.a.getPlayerProfile.selector.data),h=null==m||null==(t=m.twoFactorAuthentication)?void 0:t.isEnabledByPlayer,y="";f||(y=h?s.formatMessage({id:"roc-front.front.profile.sections_security.2fa.disconnected.title",defaultMessage:"Disconnect 2FA"}):s.formatMessage({id:"roc-front.front.profile.sections_security.2fa.connection.title",defaultMessage:"2FA connection"}));let v=h?(0,r.jsx)(eM,{onClose:a}):(0,r.jsx)(em,{onClose:a}),w=h?(0,r.jsx)(r.Fragment,{children:l&&(0,r.jsx)(ek,{onSuccess:()=>{c(!1),g(!0)}})}):(0,r.jsxs)(r.Fragment,{children:[l&&(0,r.jsx)(ej.b,{onSubmit:()=>{c(!1),u(!0)}}),d&&(0,r.jsx)(eP.r,{onBack:()=>{u(!1),c(!0)},onSuccess:()=>{u(!1),g(!0)}})]});return(0,r.jsx)(eg.a,{isOpen:!0,closeModal:a,title:y,className:i(),children:(0,r.jsx)("div",{className:o()(i("wrapper")),children:f?v:w})})},eS=()=>{var e;let t=(0,p.o)("ProfileSettings"),a=(0,k.t)(),s=(0,x.d4)(b.a.getPlayerProfile.selector.data),i=null==s||null==(e=s.twoFactorAuthentication)?void 0:e.isEnabledByPlayer,[l,c]=(0,n.useState)(!1),d=i?a.formatMessage({id:"roc-front.front.profile.sections_security.two_factor.title.connected",defaultMessage:"Two-factor authentication is connected"}):a.formatMessage({id:"roc-front.front.profile.sections_security.two_factor.title.not_connected",defaultMessage:"Connect two-factor authentication"}),u=i?a.formatMessage({id:"roc-front.front.profile.sections_security.2fa.description.connected",defaultMessage:"Now your account is protected. You may disconnect the 2 factor authentication any time you want."}):a.formatMessage({id:"roc-front.front.profile.sections_security.2fa.description.not_connected",defaultMessage:"Significantly increases the security of your account and protects it from unauthorized access. To use two-factor authentication, you must install the Google Authenticator app."});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("form",{className:o()(t("form",{security:!0,third:!0,connected:i}),"radiusCard"),children:[(0,r.jsx)(Y.I,{name:i?"2faConnected":"2fa",className:t("2faIconIsConnected",{connected:i})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:o()(t("2faTitle"),"title6"),children:d}),(0,r.jsx)("p",{className:o()(t("2faDescription"),"body3"),children:u})]}),(0,r.jsxs)("div",{className:t("footer"),children:[(0,r.jsxs)("div",{className:t("appLinks"),children:[(0,r.jsx)("span",{children:(0,r.jsx)(ep.m,{content:a.formatMessage({id:"roc-front.front.profile.sections_security.2fa.app_link.play_market",defaultMessage:"Get it on Google Play"}),children:(0,r.jsx)("a",{className:o()(t("appLink"),"radiusButton"),target:"_blank",rel:"noreferrer",href:"https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2",children:(0,r.jsx)(Y.I,{name:"playmarket",className:t("2faIconApp")})})})}),(0,r.jsx)("span",{children:(0,r.jsx)(ep.m,{content:a.formatMessage({id:"roc-front.front.profile.sections_security.2fa.app_link.app_store",defaultMessage:"Get it on App Store"}),children:(0,r.jsx)("a",{className:o()(t("appLink"),"radiusButton"),target:"_blank",rel:"noreferrer",href:"https://apps.apple.com/app/google-authenticator/id388497605",children:(0,r.jsx)(Y.I,{name:"apple",className:t("2faIconApp")})})})})]}),i?(0,r.jsx)(w.$,{title:a.formatMessage({id:"roc-front.front.profile.sections_security.2fa.button.not_connected",defaultMessage:"Disconnect"}),type:"secondary",onClick:()=>c(!0)}):(0,r.jsx)(w.$,{title:a.formatMessage({id:"roc-front.front.profile.sections_security.2fa.button.connected",defaultMessage:"Connect"}),type:"primary",onClick:()=>c(!0)})]})]}),l&&(0,r.jsx)(eC,{onClose:()=>c(!1)})]})};var eN=a(23407),eO=a(11664),eF=a.n(eO),eD=a(65360),eB=a(29234),eT=a(42460),e$=a(27269),eI=a(11915),eY=a(26491),eA=a(53456),eL=a(55307),eR=a(65232),eU=a(73163),eE=a(48603);let eG={previousPassword:{value:"",isRequired:!0,isEditableByPlayer:!0,isPending:!1,isDisplayed:!0,section:i.BF.Security,mustBeFilled:!1,order:0},newPassword:{value:"",isRequired:!0,isEditableByPlayer:!0,isPending:!1,isDisplayed:!0,section:i.BF.Security,mustBeFilled:!1,order:0},confirmNewPassword:{value:"",isRequired:!0,isEditableByPlayer:!0,isPending:!1,isDisplayed:!0,section:i.BF.Security,mustBeFilled:!1,order:0}},eq={securityQuestionId:{value:"",isRequired:!0,isEditableByPlayer:!0,isPending:!1,isDisplayed:!0,section:i.BF.Security,mustBeFilled:!1,order:0},answerToSecurityQuestion:{value:"",isRequired:!0,isEditableByPlayer:!0,isPending:!1,isDisplayed:!0,section:i.BF.Security,mustBeFilled:!1,order:0}},eK=(0,eL.zk)(),ez=()=>{var e,t,a,r;let s=(0,k.t)(),o=(0,p.o)("ProfileSettings"),l=(0,C.r)(),c=(0,x.d4)(b.a.changePassword.selector.state),d=(0,eB.Ke)(),{data:u}
1=(0,j.Z)(),[f,g]=(0,n.useState)(!0),m=(0,x.d4)(b.a.getPlayerInfo.selector.data),h=(0,x.d4)(b.a.getPlayerProfile.selector.data),{isKCEnabled:y}=(0,e_.j)(),{data:w}=(0,eB.ec)(void 0,{skip:y}),{getKCUpdatePasswordUrl:_}=(0,e$._)(),S=(0,n.useRef)(null),[N,F]=(0,n.useState)(null),[D,B]=(0,n.useState)(!0),[T,$]=(0,n.useState)(300);(0,n.useEffect)(()=>{y&&(B(!0),_().then(e=>{F(null!=e?e:null),e||B(!1)}))},[_,y]),(0,n.useEffect)(()=>{if(!y)return;let e=e=>{var t,a,r,o,n,i,c,d,u;if((0,eR.SG)(e,S.current)){if((null==(t=e.data)?void 0:t.type)===eA.S5.KC_RESIZE&&S.current){let t=e.data.height;"number"==typeof t&&t>0&&$(t)}(null==(a=e.data)?void 0:a.type)===eA.S5.KC_READY&&B(!1),(null==(r=e.data)?void 0:r.type)===eA.S5.KC_GO_TO_HOME&&l.push("/"),(null==(o=e.data)?void 0:o.type)===eA.S5.KC_NAVIGATE&&"string"==typeof(null==(n=e.data)?void 0:n.path)&&l.push(e.data.path),(null==(i=e.data)?void 0:i.type)===eA.S5.KC_REDIRECTED&&B(!0),(null==(c=e.data)?void 0:c.type)===eA.S5.KC_CHANGE_PASS_SUCCESS&&(0,O.D)({message:s.formatMessage({id:"roc-front.front.change_password.request",defaultMessage:"New password is set"}),type:"success"}),(null==(d=e.data)?void 0:d.type)===eA.S5.KC_LOG_ERROR&&(0,eU.c)({message:e.data.message,extra:null!=(u=e.data.extra)?u:{}})}};return null==eK||eK.addEventListener("message",e),()=>{null==eK||eK.removeEventListener("message",e)}},[s,y,l]),(0,eI.F)({iframeRef:S}),(0,eY.l)({iframeRef:S,widgetType:eD.Md.A});let I=(0,x.d4)(b.a.getPlayerProfile.selector.data),Y=(null==I||null==(e=I.twoFactorAuthentication)?void 0:e.isEnabledOnProject)&&(null==I||null==(t=I.twoFactorAuthentication)?void 0:t.type)===i.Yi.Authenticator,A=null==I||null==(a=I.twoFactorAuthentication)?void 0:a.isEnabledByPlayer,[L,R]=(0,n.useState)(!1),U=(0,x.wA)(),E={securityQuestionId:null==(r=d.data)?void 0:r.securityQuestions},G=(null==w?void 0:w.isDisplay2Fields)?eT.NP:eT.f,q=(0,n.useMemo)(()=>m&&h?h.canDetachSocialProvider?m:eF()(m,["previousPassword"]):{},[h,m]),K=(0,n.useMemo)(()=>Object.keys({...eG,...eq}).reduce((e,t)=>G.hasOwnProperty(t)?"previousPassword"!==t||(null==h?void 0:h.canDetachSocialProvider)?{...e,[t]:eG[t]}:{...e,[t]:{...eG[t],isDisplayed:!1,isRequired:!1,mustBeFilled:!1}}:e,{}),[G,h]),z=(0,P.F)({rules:{...K,...q},intl:s,passwordSettings:w}),H=Object.keys(G).reduce((e,t)=>({...e,[t]:z[t]}),{}),V=(0,n.useMemo)(()=>u&&w?{newPassword:(0,eE.Z)({formRules:u,intl:s,passwordSettings:w}).newPassword}:null,[u,w,s]),W=(0,n.useMemo)(()=>V?v().object().keys(V):void 0,[V]),{reset:Z,register:Q,control:J,formState:X,formState:{errors:ee},getValues:et,handleSubmit:ea,watch:er,setValue:es}=(0,M.n)({resolver:(0,eN.H)(v().object().keys(H)),mode:"onChange"}),eo=Object.keys(eT.Cd).reduce((e,t)=>({...e,[t]:z[t]}),{}),en=(0,n.useCallback)(e=>async(t,a)=>{await t(b.a.changePassword.thunk.request({body:e}));let{error:r}=b.a.changePassword.selector.state(a());if(r){var o;(0,O.D)({message:null==(o=r.data)?void 0:o.message,type:"error"})}else await t(b.a.getPlayerProfile.thunk.request({})),Z(),R(!1),(0,O.D)({message:s.formatMessage({id:"roc-front.front.change_password.request",defaultMessage:"New password is set"}),type:"success"})},[s,Z]),ei=(0,n.useCallback)(e=>{U(en(e))},[U,en]),el=(0,n.useCallback)(e=>{ei({...et(),...e})},[ei,et]);return{intl:s,bem:o,changePasswordState:c,getPasswordSettings:w,validationSecurityFieldsRules:eo,submit:ei,FORM_VALIDATION_RULES:eG,FORM_VALIDATION_SECURITY_RULES:eq,optionsMap:E,visible:f,setVisible:g,playerInfo:m,playerProfile:h,show2FAModalVerification:L,setShow2FAModalVerification:R,is2FAEnabledOnProject:Y,connected:A,submitVerificationCode:el,register:Q,control:J,formState:X,errors:ee,getValues:et,handleSubmit:ea,watch:er,setValue:es,reset:Z,isKCEnabled:y,kcUpdatePasswordUrl:N,isIframeLoading:D,keycloakFrameHeight:T,iframeRef:S,validationSchema:W}},eH=()=>{let e=(0,x.wA)(),{bem:t,intl:a,changePasswordState:{isFetching:s},validationSecurityFieldsRules:o,FORM_VALIDATION_SECURITY_RULES:i,optionsMap:l,visible:c,setVisible:d,playerInfo:u}=ez(),{reset:f,register:p,control:g,formState:m,formState:{errors:y},handleSubmit:k,watch:j,setValue:P}=(0,M.n)({resolver:(0,h.H)(v().object().keys(o)),mode:"onChange"}),C=(0,n.useCallback)(e=>async(t,r)=>{var s;
1await t(b.a.updateSecurityQuestion.thunk.request({body:e}));let{error:o}=b.a.updateSecurityQuestion.selector.state(r());o||((0,O.D)({message:a.formatMessage({id:"roc-front.front.change_security_question.request",defaultMessage:"New security question is set"}),type:"success"}),d(!1),f()),o&&(0,O.D)({message:null==(s=o.data)?void 0:s.message,type:"error"})},[a,f,d]),S=(0,n.useCallback)(t=>{e(C(t))},[e,C]);return!c||Object.keys(i).every(e=>{let t=(null==u?void 0:u[e])||null;return!(null==t?void 0:t.isDisplayed)})?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("form",{className:t("form",["security","second"]),children:Object.keys(i).map((e,t)=>{let a=(null==u?void 0:u[e])||null;return a?(0,r.jsx)(_.i,{element:a,control:g,register:p,setValue:P,watch:j,errors:y,name:e,optionsMap:l},`Profile-Field-${e}-${t}`):null})}),(0,r.jsx)("div",{className:t("button"),children:(0,r.jsx)(w.$,{title:a.formatMessage({id:"roc-front.front.profile.sections_security.button.save",defaultMessage:"Save"}),type:"primary",disabled:!m.isDirty||0!==Object.keys(y).length||s,onClick:k(S)})})]})},eV=()=>{let{intl:e,bem:t,playerInfo:a,changePasswordState:{isFetching:s},getPasswordSettings:o,submit:n,FORM_VALIDATION_RULES:l,playerProfile:c,show2FAModalVerification:d,setShow2FAModalVerification:f,is2FAEnabledOnProject:p,connected:g,submitVerificationCode:m,register:h,control:y,formState:v,errors:x,handleSubmit:b,watch:k,setValue:M,reset:j,isKCEnabled:P,kcUpdatePasswordUrl:C,isIframeLoading:S,keycloakFrameHeight:N,iframeRef:O,validationSchema:F}=ez();return(0,r.jsxs)("div",{className:t("tab"),children:[C&&P?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("iframe",{name:ef.dI,ref:O,className:t("kcIframe",{ready:!S}),src:C,style:{height:N}}),S&&(0,r.jsx)("div",{className:t("kcIframeLoadingWrapper"),children:(0,r.jsx)(u.E,{isLoading:!0,blocks:(()=>{let e={type:R.Y.GROUP,direction:"column",groupWithBg:!0,padding:"0",gap:"50px",children:[J,ee]},t={type:R.Y.GROUP,direction:"column",groupWithBg:!1,padding:"0",gap:"24px",children:[J,ee]},a={type:R.Y.GROUP,direction:"column",groupWithBg:!1,gap:"20px",padding:"0",children:[J,et]};return{blocks:[{type:R.Y.GROUP,justifyContent:"center",alignment:"center",alignContent:"center",padding:"0",children:{largeDesktop:[e],desktop:[e],tablet:[t],mobile:[a]}}]}})().blocks,breakpointsCorrection:-.5,children:null})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("form",{className:t("form",["security"]),children:Object.keys(l).map((e,t)=>{let s=(null==a?void 0:a[e])||null;return s&&("confirmNewPassword"!==e||(null==o?void 0:o.isDisplay2Fields))&&("previousPassword"!==e||(null==c?void 0:c.canDetachSocialProvider))?(0,r.jsx)(_.i,{element:s,control:y,register:h,setValue:M,watch:k,errors:x,name:e,validationSchema:e===i.Lr.newPassword?F:void 0},`Profile-Field-${e}-${t}`):null})}),(0,r.jsxs)("div",{className:t("buttonsRow"),children:[(0,r.jsx)("div",{className:t("button"),children:(0,r.jsx)(w.$,{title:e.formatMessage({id:"roc-front.front.profile.sections_security.button.clear_all",defaultMessage:"Clear all"}),type:"secondary",disabled:!v.isDirty,onClick:()=>j({previousPassword:"",newPassword:"",confirmNewPassword:""})})}),(0,r.jsx)("div",{className:t("button"),children:(0,r.jsx)(w.$,{title:e.formatMessage({id:"roc-front.front.profile.sections_security.button.update_password",defaultMessage:"Update password"}),type:"primary",isLoading:s,disabled:!v.isDirty||0!==Object.keys(x).length,onClick:()=>{if(g)return f(!0);b(n)()}})})]})]}),(0,r.jsx)(eH,{}),p&&(0,r.jsx)(eS,{}),d&&(0,r.jsx)(eu.y,{fetching:s,onSubmit:m,onClose:()=>f(!1)})]})};var eW=a(72712);a(88398);let eZ=()=>{let e=(0,p.o)("ProfileSetting"),{profileState:t,profileInfoState:a,registrationFormState:s,tabName:h,setTabName:y,list:w,isAuth:_,sectionsFields:M,isLocationOptionsLoading:P}=(()=>{let{query:e}=(0,C.r)(),t=(0,k.t)(),a=(0,x.wA)(),{isAuth:r}=(0,x.d4)(eW.y.auth.selector.state),{page:s}=((e,t)=>{let{value:a}=v().object().keys(e).validate(t);return a})({page:v().string().required()},e),o=(0,x.d4)(b.a.getPlayerProfile.selector.state),l=(0,x.d4)(b.a.getPlayerInfo.selector.state),c=(0,x.d4)(b.a.getPlayerInfo.selector.data),d=(0,j.Z)(),u=(0,n.useCallback)(()=>{let e=i.BF.Personal;if(!(null==s?void 0:s.length))return e;let t=s[s.length-1];
1return t&&(t=t[0].toUpperCase()+t.slice(1)),t in i.BF&&(e=t),e},[s]),[f,p]=(0,n.useState)(u()),{isLoading:g}=(0,N.z)(),{data:m,isFetching:h}=(0,S.O)(),y=f===i.BF.Location&&(g||h&&!m.length),w=(0,n.useMemo)(()=>Object.keys(null!=c?c:{}).reduce((e,t)=>{if("id"!==t){let a={...c[t],name:t};if(a.isDisplayed)return"country"===t||"timeZone"===t?e:e[a.section]?{...e,[a.section]:[...e[a.section],a]}:{...e,[a.section]:[a]}}return e},{}),[c]),_=(0,n.useMemo)(()=>[{label:t.formatMessage({id:"roc-front.front.profile.nested_pages_tabs.personal",defaultMessage:"Personal"}),value:i.BF.Personal,pathUrl:"personal"},{label:t.formatMessage({id:"roc-front.front.profile.nested_pages_tabs.location",defaultMessage:"Location"}),value:i.BF.Location,pathUrl:"location"},{label:t.formatMessage({id:"roc-front.front.profile.nested_pages_tabs.security",defaultMessage:"Security"}),value:i.BF.Security,pathUrl:"security"}].filter(e=>e.value===i.BF.Security||w[e.value]),[t,w]);return(0,n.useEffect)(()=>{if((null==s?void 0:s.length)===3&&_.some(e=>e.pathUrl===s[2]))return void p(s[2]);p(e=>{var t;return _.some(t=>t.value===e)||(null!=(t=null==s?void 0:s.length)?t:1)>1?e:_[0].value})},[s,_]),(0,n.useEffect)(()=>{r&&(a(b.a.getPlayerProfile.thunk.request({})),a(b.a.getPlayerInfo.thunk.request({})))},[a,r]),{profileState:o,profileInfoState:l,tabName:f,setTabName:p,list:_,isAuth:r,registrationFormState:d,sectionsFields:w,isLocationOptionsLoading:y}})(),{isBitz:O}=(0,g.j)(),F=(0,m.bU)();if(!_)return null;let B=e=>{y(e)},T=a.isFetching&&!a.isFetched||t.isFetching&&!t.isFetched||s.isFetching&&!s.isSuccess||P;return(0,r.jsx)("section",{className:o()("body2","container-padding"),children:(0,r.jsx)(u.E,{isLoading:T,blocks:(e=>{let t=[];return e===i.BF.Personal&&t.push({type:R.Y.GROUP,justifyContent:"center",alignment:"center",alignContent:"center",padding:"32px",margin:"20px",children:{largeDesktop:[ea],desktop:[ea],tablet:[eo],mobile:[el]}}),e===i.BF.Location&&t.push({type:R.Y.GROUP,justifyContent:"center",alignment:"center",alignContent:"center",padding:"32px",margin:"20px",children:{largeDesktop:[er],desktop:[er],tablet:[en],mobile:[ec]}}),e===i.BF.Security&&t.push({type:R.Y.GROUP,justifyContent:"center",alignment:"center",alignContent:"center",padding:"40px 0px 80px 0px",children:{largeDesktop:[es],desktop:[es],tablet:[ei],mobile:[ed]}}),{blocks:t}})(h).blocks,children:(0,r.jsxs)("div",{className:o()(e("content"),"radiu
1sCard",{radiusBitz:O}),children:[(0,r.jsx)(l.o,{}),(0,r.jsxs)("div",{className:e("header"),children:[(0,r.jsx)("div",{children:(0,r.jsx)("h1",{className:o()(e("title"),"title4"),children:(0,r.jsx)(c.s,{id:"roc-front.front.profile.profile_sections.text",defaultMessage:"Profile info"})})}),(0,r.jsxs)("div",{className:e("tabsWrapper",{isConstructor:F}),children:[(0,r.jsx)(f.t,{className:e("tabs"),list:w,value:h,change:B,classNames:{tab:e("tabsTab")}}),(0,r.jsx)(d.H,{options:w,className:e("select"),value:h,onChange:B})]})]}),h===i.BF.Personal&&M[i.BF.Personal]&&(0,r.jsx)(L,{fields:M[i.BF.Personal]}),h===i.BF.Location&&M[i.BF.Location]&&(0,r.jsx)(D,{fields:M[i.BF.Location]}),h===i.BF.Security&&(0,r.jsx)(eV,{})]})})})}},14895:(e,t,a)=>{"use strict";a.d(t,{p:()=>i});var r=a(72712),s=a(75284),o=a(19049),n=a(69670);let i=e=>async(t,a)=>{let{isAuth:i}=r.y.auth.selector.state(a());if(!i)return;let l=s.a.getPlayerProfile.selector.data(a());if(l&&!e)return l;await t(s.a.getPlayerProfile.thunk.request({}));let c=s.a.getPlayerProfile.selector.data(a()),d=s.a.getPlayerProfile.selector.error(a());if(d){var u;return(0,n.ut)(d)&&(null==d||null==(u=d.data)?void 0:u.message)?(0,o.D)({message:d.data.message,type:"error"}):void 0}return c}},25013:(e,t,a)=>{"use strict";a.d(t,{b:()=>i});var r=a(72712),s=a(75284),o=a(19049),n=a(7106);let i=()=>async(e,t)=>{let{hallId:a,accessToken:i,refreshToken:l}=r.y.auth.selector.state(t());if(!i||!l||!a)return;await e(s.a.refreshToken.thunk.request({body:{accessToken:i,refreshToken:l},config:{}}));let{data:c,error:d}=s.a.refreshToken.selector.state(t());if(d||!c){var u;return(0,o.D)({message:null==d||null==(u=d.data)?void 0:u.message,type:"error"})}e((0,n._)({accessToken:c.accessToken,hallId:a,refreshToken:c.refreshToken}))}},27269:(e,t,a)=>{"use strict";a.d(t,{_:()=>F});var r=a(21462),s=a(8759),o=a(72712),n=a(50708),i=a(12444),l=a(86123),c=a(71328),d=a(55307),u=a(58773),f=a(93101),p=a(92435),g=a(48162);async function m(){try{let e=await (0,g.w)((0,p.HY)(),3e3);if(!e)return null;return await (0,f.s)(e,"sha256")}catch{return null}}var h=a(95884),y=a(16057),v=a.n(y),x=a(65196),b=a(68087),w=a(27503);let _=[31,139,8,0,0,0,0,0,0,255],k=null,M=async(e,t)=>{let a=new e("gzip"),r=a.writable.getWriter(),s=Promise.all([r.write(t),r.close()]),[o]=await Promise.all([new Response(a.readable).arrayBuffer(),s]);return new Uint8Array(o)},j=async e=>{let t=(()=>{let e=(0,d.zk)();return"function"==typeof(null==e?void 0:e.CompressionStream)?e.CompressionStream:void 0})();return t?M(t,e):(e=>{let t=Math.max(1,Math.ceil(e.length/65535)),a=new Uint8Array(_.length+5*t+e.length+8);a.set(_,0);let r=_.length;for(let s=0;s<t;s+=1){let o=65535*s,n=Math.min(65535,e.length-o),i=s===t-1;a[r]=+!!i,a[r+1]=255&n,a[r+2]=n>>>8&255,a[r+3]=255&~n,a[r+4]=~n>>>8&255,r+=5,a.set(e.subarray(o,o+n),r),r+=n}let s=(e=>{let t=(()=>{if(k)return k;let e=new Uint32Array(256);for(let t=0;t<256;t+=1){let a=t;for(let e=0;e<8;e+=1)a=1&a?0xedb88320^a>>>1:a>>>1;e[t]=a>>>0}return k=e,e})(),a=0xffffffff;for(let r=0;r<e.length;r+=1)a=t[(a^e[r])&255]^a>>>8;return(0xffffffff^a)>>>0})(e);return[s,e.length>>>0].forEach(e=>{a[r]=255&e,a[r+1]=e>>>8&255,a[r+2]=e>>>16&255,a[r+3]=e>>>24&255,r+=4}),a})(e)},P=()=>{let e=(0,d.zk)();return!!e&&void 0!==e.sessionStorage},C=async e=>{let t=JSON.stringify(e),a=await j(new TextEncoder().encode(t)),r="";for(let e=0;e<a.length;e+=32768)r+=String.fromCharCode(...a.subarray(e,e+32768));return btoa(r)},S=async()=>{let e=(()=>{if(!P())return null;try{let e=sessionStorage.getItem(x.nw);return e?JSON.parse(e):null}catch{return null}})();if(e)return e;let t={...await (0,b.H)(),deviceType:w.j7};t.canvas&&(t.canvas=v()(t.canvas)),t.webgl&&(t.webgl=v()(t.webgl));if(P())try{sessionStorage.setItem(x.nw,JSON.stringify(t))}catch{}return t},N=async e=>{let{realm:t}=e;try{let e=await S(),a=(0,u.S_)(),r={...e,cookie:a},s=await C(r);s.length>3800&&console.error("device_info cookie is too large",s.length),document.cookie="device_info="+s+"; path="+`/api/idp/realms/${t}/`+"; SameSite=None; Secure"}catch(e){console.error(e)}};var O=a(2272);let F=()=>{let e=(0,c.bU)(),{constructorNodeId:t,hallId:a,projectId:f,isDPoPEnabled:p}=(0,i.j)(),g=O.env.NEXT_KEYCLOAK_NODE_ID||(e?t:a),{keycloak:y}=(0,n.z)(),{getTimezoneId:v}=(0,l.y)(),x=(0,s.d4)(o.y.localization.selector.activeLanguage),b=(0,r.useCallback)(async()=>
1{if(!y||!(0,h.Gc)(y,g,f))return null;let e=(0,h.V7)();if(!e)return null;await N({realm:y.realm});let t={nodeId:null!=g?g:void 0,redirectUri:e,maxAge:0,ui_locales:null!=x?x:void 0,kc_locale:null!=x?x:void 0},a=p?await m():null;return a&&(t.dpop_jkt=a),(0,h.CP)(y,t)},[y,x,g,f,p]),w=(0,r.useCallback)(async()=>{if(!y||!(0,h.Gc)(y,g,f))return null;let e=(0,h.V7)({passwordUpdated:"success"});return e?(await N({realm:y.realm}),(0,h.CP)(y,{nodeId:null!=g?g:void 0,action:"UPDATE_PASSWORD",redirectUri:e,ui_locales:null!=x?x:void 0,kc_locale:null!=x?x:void 0})):null},[y,x,g,f]);return{getKCLoginUrl:b,getKCUpdatePasswordUrl:w,getKCRegisterUrl:(0,r.useCallback)(async()=>{var e,t;if(!y||!(0,h.Gc)(y,g,f))return null;let a=(0,h.V7)();if(!a)return null;await N({realm:y.realm});let r=(0,d.zk)(),s={nodeId:null!=g?g:void 0,domain:null!=(t=null==r||null==(e=r.location)?void 0:e.host)?t:"",redirectUri:a,maxAge:0,ui_locales:null!=x?x:void 0,kc_locale:null!=x?x:void 0},o=p?await m():null;return o&&(s.dpop_jkt=o),(0,h.yc)(y,s)},[y,x,g,f,p]),getThirdPartyAuthUrl:(0,r.useCallback)(async()=>{if(!y||!(0,h.Gc)(y,g,f))return null;let e=(0,h.V7)();return e?(await N({realm:y.realm}),((e,t)=>{let a=`/api/idp/realms/${e}/`,r=encodeURIComponent(JSON.stringify(t));document.cookie=`user_context_info=${r}; path=${a}; SameSite=None; Secure`})(y.realm,{customAttributes:(0,u.tO)(),timezoneId:await v(),defaultLanguage:null!=x?x:void 0}),(0,h.CP)(y,{nodeId:null!=g?g:void 0,loginHint:h.Q1,prompt:"login",redirectUri:e,maxAge:0,ui_locales:null!=x?x:void 0,kc_locale:null!=x?x:void 0})):null},[v,y,x,g,f])}}},29789:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(r,s,o){var n=s.prototype;o.utc=function(e){var t={date:e,utc:!0,args:arguments};return new s(t)},n.utc=function(t){var a=o(this.toDate(),{locale:this.$L,utc:!0});return t?a.add(this.utcOffset(),e):a},n.local=function(){return o(this.toDate(),{locale:this.$L,utc:!1})};var i=n.parse;n.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),i.call(this,e)};var l=n.init;n.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var c=n.utcOffset;n.utcOffset=function(r,s){var o=this.$utils().u;if(o(r))return this.$u?0:o(this.$offset)?c.call(this):this.$offset;if("string"==typeof r&&null===(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var s=(""+r[0]).match(a)||["-",0,0],o=s[0],n=60*s[1]+ +s[2];return 0===n?0:"+"===o?n:-n}(r)))return this;var n=16>=Math.abs(r)?60*r:r;if(0===n)return this.utc(s);var i=this.clone();if(s)return i.$offset=n,i.$u=!1,i;var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(i=this.local().add(n+l,e)).$offset=n,i.$x.$localOffset=l,i};var d=n.format;n.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return d.call(this,t)},n.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},n.isUTC=function(){return!!this.$u},n.toISOString=function(){return this.toDate().toISOString()},n.toString=function(){return this.toDate().toUTCString()};var u=n.toDate;n.toDate=function(e){return"s"===e&&this.$offset?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():u.call(this)};var f=n.diff;n.diff=function(e,t,a){if(e&&this.$u===e.$u)return f.call(this,e,t,a);var r=this.local(),s=o(e).local();return f.call(r,s,t,a)}}}()},39788:(e,t,a)=>{"use strict";a.d(t,{A:()=>f,m:()=>h});var r=a(23798),s=a(75809),o=a(46001),n=a.n(o),i=a(21462),l=a(8759),c=a(72712),d=a(1840),u=a(93790);let f=e=>{let{tooltipText:t,element:a,className:s,title:o,event:l="hover"}=e,c=(0,d.o)("Popover"),{isBottomPosition:f,wrapperRef:p,popoverRef:g,show:m,buttonRef:h,onMouseEnter:y,onTouchToggle:v,onMouseLeave:x}=(()=>{let e=(0,i.useRef)(null),t=(0,i.useRef)(null),a=(0,i.useRef)(null),[r,s]=(0,i.useState)(!0),[o,n]=(0,i.useState)(!1),l=()=>{let{isBottom:e}=(()=>{var e,a;if(!t.current)return{isBottom:!0};let r=null==(e=t.current)?void 0:e.getBoundingClientRect();return{isBottom:((null==(a=document.querySelector(".Header"))?void 0:a.clientHeight)||0)<r.top}})();s(e)};return(0,u.W)({ref:e,handler:()=>n(!1),buttonRef:a}),(0,i.useEffect)(()=>{o||s(!0)},[o]),{onMouseLeave:()=>{n(!1)},setShow:n,onMouseEnter:()=>{l(),n(!0)},onTouchToggle:()=>{l(),n(!o)},isBottomPosition:r,wrapperRef:e,popoverRef:t,show:o,buttonRef:a}})();return(0,r.jsxs)("div",{className:c("main"),ref:p,onMouseEnter:"hover"===l?y:()=>{},onMouseLeave:"hover"===l?x:()=>{},onClick:e=>{e.preventDefault(),e.stopPropagation(),v()},children:[(0,r.jsx)("span",{ref:h,className:n()(c("icon"),s),children:a}),(0,r.jsx)("span",{className:n()(c("wrapper",{show:m})),children:(0,r.jsxs)("span",{ref:g,className:n()(c("textPopover",{bodyDown:!f}),"body4","radiusButton"),children:[o&&(0,r.jsx)("span",{className:c("titlePopover"),children:o}),(0,r.jsx)("span",{children:t})]})})]})},p=s.Kq,g=s.bL,m=s.l9,h=e=>{var t,a,o,u;let{children:f,content:h,className:y,title:v,contentProps:x,arrowProps:b,tooltipTriggerProps:w,openControl:_,container:k,classNames:M={}}=e,j=(0,d.o)("Tooltip"),[P,C]=(0,i.useState)(!1),{portalsContainerId:S}=(0,l.d4)(c.y.technical.selector.state),N=null!=(a=null==_?void 0:_.setOpen)?a:C,O=null!=(o=null==_?void 0:_.open)?o:P,F=h?`${h}`.split("\n").map((e,t)=>(0,r.jsxs)(i.Fragment,{children:[e,(0,r.jsx)("br",{})]},t)):"";return(0,r.jsx)(p,{children:(0,r.jsxs)(g,{open:O,children:[(0,r.jsx)(m,{asChild:!0,onMouseEnter:()=>N(!0),onMouseLeave:()=>N(!1),onFocus:()=>N(!0),onBlur:()=>N(!1),...w,children:(0,r.jsx)("span",{className:n()(j("icon"),y,M.icon),children:f})}),(0,r.jsx)(s.ZL,{style:{zIndex:999},container:null!=(u=null!=k?k:null==(t=document)?void 0:t.getElementById(S))?u:null,children:(0,r.jsxs)(s.UC,{sideOffset:6,...x,className:n()(j("content"),"labelMTypo","radiusButton",null==x?void 0:x.className),children:[v&&(0,r.jsx)("span",{className:j("titlePopover"),children:v}),(0,r.jsx)("span",{children:"object"==typeof h?h:F}),(0,r.jsx)(s.i3,{width:12,height:8,...b,className:n()(j("arrow"),null==b?void 0:b.className)})]})})]})})}},39942:(e,t,a)=>{"use strict";a.d(t,{o:()=>f});var r=a(23798),s=a(46001),o=a.n(s);a(21462);var n=a(67150),i=a(86946),l=a(57725),c=a(1840),d=a(70101),u=a(79246);let f=e=>{let{home:t,children:a,onClick:s,dataTestId:f}=e,p=(0,c.o)("BackButton"),g=(0,d.r)();return(0,r.jsxs)("button",{onClick:()=>{s?s():t?g.push("/"):(()=>{let e=(0,u.H)(localStorage.getItem(l.UT));e&&e!==g.path?g.replace(e,void 0,{scroll:!1,shallow:!0}):g.back()})()},className:o()(p(),"buttonTypo"),"data-testid":f,children:[(0,r.jsx)(i.I,{name:"go-back",className:p("icon")}),null!=a?a:t?(0,r.jsx)(n.s,{id:"roc-front.front.go_home",defaultMessage:"Home"}):(0,r.jsx)(n.s,{id:"roc-front.front.button.back",defaultMessage:"Back"})]})}},43071:(e,t,a)=>{"use strict";a.d(t,{D:()=>s});var r=a(75284);let s=e=>async t=>{await t(r.a.get2FAKey.thunk.request({body:e}))}},53012:(e,t,a)=>{"use strict";a.d(t,{z:()=>o});var r=a(21462),s=a(79279);let o=()=>{let{data:e,isLoading:t}=(0,s.$A)({definition:"Timezones"});return{timezoneOptions:(0,r.useMemo)(()=>{var t;return(null!=(t=null==e?void 0:e.values)?t:[]).map(e=>{var t;return{label:(e=>{var t,a,r,s;if((null==e?void 0:e.gtmOffset)==null)return null!=(a=null==e?void 0:e.zoneName)?a:"";let o=e.gtmOffset/3600,n=Math.floor(Math.abs(o)),i=Math.round(Math.abs(o)%1*60),l=`${n.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}`,c=null!=(s=null!=(r=null==(t=e.zoneName)?void 0:t.split("/")[1])?r:e.zoneName)?s:"";return`(GMT ${o>=0?"+":"-"}${l}) ${c.replace(/_/g," ")}`})(e),value:null!=(t=null==e?void 0:e._key)?t:""}})},[e]),isLoading:t}}},64211:e=>{e.exports={wrapper:"Tabs__wrapper--c67594",wrapper_isSecondary:"Tabs__wrapper_isSecondary--c67594",tab:"Tabs__tab--c67594",tab_active:"Tabs__tab_active--c67594",tab_disabled:"Tabs__tab_disabled--c67594",tabLabel:"Tabs__tabLabel--c67594"}},66458:(e,t,a)=>{"use strict";a.d(t,{b:()=>M});var r=a(23798),s=a(46001),o=a.n(s),n=a(21462),i=a(58274),l=a(31537),c=a(86946),d=a(90210),u=a(14156),f=a(35395),p=a(87383),g=
1a.n(p),m=a(8759),h=a(74138),y=a(75284),v=a(43071),x=a(1840),b=a(1091),w=a(3169),_=a(19049),k=a(90763);let M=(0,n.forwardRef)((e,t)=>{var s;let{onSubmit:p,hideButton:M,setIs2FAFormValid:j,setQr2FAServerError:P}=e,{intl:C,bem:S,handleCopy2FAKey:N,register:O,isDirty:F,isValid:D,handleSubmit:B,div120:T,errors:$,get2FAKeyState:I}=(e=>{var t,r;let{setQr2FAServerError:s}=e,o=(0,x.o)("TwoFAModal"),i=(0,b.t)(),l=(0,m.wA)(),c=(0,m.d4)(y.a.get2FAKey.selector.state),{data:d}=(0,m.d4)(y.a.getPlayerInfo.selector.state),u=(null==d||null==(t=d.nickname)?void 0:t.value)||(null==d||null==(r=d.login)?void 0:r.value),p=g().object({key:g().string().required(),terms:g().boolean().invalid(!1).messages({"any.invalid":i.formatMessage({id:"roc-front.front.profile.sections_security.2fa.validation.save_code",defaultMessage:"You have to save the recovery code"})})}),{register:M,setValue:j,formState:{isDirty:P,isValid:C,errors:S},handleSubmit:N}=(0,w.n)({mode:"onChange",resolver:(0,f.H)(p)}),O=(0,n.useRef)(null),F=(0,n.useRef)(null),D=(0,n.useCallback)(async e=>{F.current=new(await a.e(51661).then(a.t.bind(a,51661,23))).default({width:128,height:128,backgroundOptions:{color:"white"},dotsOptions:{color:"black",type:"dots"},cornersSquareOptions:{type:"extra-rounded"},cornersDotOptions:{type:"dot"},imageOptions:{crossOrigin:"anonymous",margin:0,hideBackgroundDots:!0,imageSize:.4},qrOptions:{typeNumber:0,mode:"Byte",errorCorrectionLevel:"Q"}}),F.current.update({data:`otpauth://totp/${u}?secret=${e}`}),F.current.append(O.current)},[u]),B=async e=>{if(!await (0,k.XX)(e))return(0,_.D)({message:i.formatMessage({id:"roc-front.front.tools.copy.error.key",defaultMessage:"Unable to copy the key"}),type:"error"});(0,_.D)({message:i.formatMessage({id:"roc-front.front.tools.copy.success.key",defaultMessage:"Copied"}),type:"success"})};return(0,n.useEffect)(()=>
1{l((0,v.D)({type:h.Yi.Authenticator}))},[l]),(0,n.useEffect)(()=>{var e,t;if(c.error)return s?s(c.error):(0,_.D)({message:null==(t=c.error.data)?void 0:t.message,type:"error"});(null==(e=c.data)?void 0:e.key)&&(j("key",c.data.key),D(c.data.key))},[j,D,c.error,c.data,s]),(0,n.useEffect)(()=>()=>{l(y.a.get2FAKey.action.reset())},[l]),{intl:i,bem:o,handleCopy2FAKey:B,register:M,isDirty:P,isValid:C,handleSubmit:N,div120:O,errors:S,get2FAKeyState:c}})({setQr2FAServerError:P});return(0,n.useEffect)(()=>{null==j||j(D)},[j,D]),(0,r.jsxs)("form",{ref:t,onSubmit:e=>{e.preventDefault(),B(p)(e)},className:S("form"),children:[(0,r.jsxs)("div",{className:"FieldText",children:[(0,r.jsx)("label",{className:"FieldText__label",htmlFor:"name",children:C.formatMessage({id:"roc-front.front.profile.sections_security.2fa.qr_code",defaultMessage:"Scan this QR code with Google Authenticator:"})}),(0,r.jsxs)("div",{className:"radiusCard FieldText__wrapper",children:[I.isFetching&&(0,r.jsx)(i.y,{size:"normal",type:"icon",background:"transparent",height:"small"}),!I.isFetching&&I.isFetched&&(0,r.jsx)("div",{ref:T,className:S("qrDiv")})]})]}),(0,r.jsx)(l.c,{name:"key",register:O,errors:$,type:"text",label:C.formatMessage({id:"roc-front.front.profile.sections_security.2fa.secret_key",defaultMessage:"Or type this recovery code manually:"}),rightAddonElement:(null==(s=I.data)?void 0:s.key)&&(0,r.jsx)("i",{onClick:()=>N(I.data.key),className:S("fieldCopyIcon"),children:(0,r.jsx)(c.I,{name:"field_copy"})}),classNames:{input:S("qrText")},readOnly:!0}),(0,r.jsxs)("div",{className:o()(S("warning"),"body3"),children:[(0,r.jsx)(c.I,{name:"warning"}),(0,r.jsx)("span",{children:C.formatMessage({id:"roc-front.front.profile.sections_security.2fa.warning",defaultMessage:"Please save your recovery code. If you lose the access to the authentication app, this code is the only way to regain access to your account"})})]}),(0,r.jsx)(d.G,{id:"terms",name:"terms",register:O,label:C.formatMessage({id:"roc-front.front.profile.sections_security.2fa.save_code",defaultMessage:"I've saved the recovery code"}),errors:$,classNames:{wrapper:S("checkbox",{marginBottomZero:M})}}),!M&&(0,r.jsx)("div",{className:S("footer"),children:(0,r.jsx)(u.$,{title:C.formatMessage({id:"roc-front.front.profile.sections_security.2fa.button.proceed",defaultMessage:"Proceed"}),className:S("button",["fixed"]),type:"primary",disabled:!D||!F,onClick:B(p)})})]})})},68087:(e,t,a)=>{"use strict";a.d(t,{H:()=>o});var r=a(95212);let s=["userAgent","language","canvas","plugins","sessionStorage","indexedDb","cpuClass","webgl","hasLiedLanguages","hasLiedResolution","hasLiedOs","hasLiedBrowser","adBlock","screenResolution","localStorage","webglVendorAndRenderer","fonts","audio"],o=async()=>({...(await (0,r.getPromise)({excludes:{}})).reduce((e,t)=>{var a,r,o;
1return s.includes(t.key)&&(Array.isArray(t.value)?e[t.key]=null!=(r=null==(a=t.value)?void 0:a.map(e=>JSON.stringify(e)).join())?r:null:e[t.key]=null!=(o=t.value)?o:null),e},{}),accept:null})},70146:(e,t,a)=>{"use strict";a.d(t,{r:()=>M});var r=a(23798),s=a(46001),o=a.n(s),n=a(21462),i=a(31537),l=a(14156),c=a(35395),d=a(87383),u=a.n(d),f=a(8759),p=a(75284),g=a(2394),m=a(14895),h=a(7106),y=a(25013),v=a(1840),x=a(1091),b=a(3169),w=a(50708),_=a(12444),k=a(19049);let M=(0,n.forwardRef)((e,t)=>{let{onSuccess:a,onBack:s,hideButton:d,setIs2FAFormValid:M}=e,{intl:j,bem:P,register:C,isDirty:S,isValid:N,handleSubmit:O,errors:F,onSubmit:D,connect2FAState:B}=(e=>{let{onSuccess:t}=e,a=(0,v.o)("TwoFAModal"),r=(0,x.t)(),s=(0,f.wA)(),o=(0,f.d4)(p.a.connect2FA.selector.state),{keycloak:n}=(0,w.z)(),{isKCEnabled:i,hallId:l}=(0,_.j)(),d=u().object({confirmationCode:u().string().required().custom((e,t)=>e&&6!==e.length?t.error("custom.length"):e).messages({"string.empty":r.formatMessage({id:"roc-front.front.profile.sections_security.2fa.second_form.code.blank",defaultMessage:"Verification code can not be blank"}),"any.required":r.formatMessage({id:"roc-front.front.profile.sections_security.2fa.second_form.code.blank",defaultMessage:"Verification code can not be blank"}),"custom.length":r.formatMessage({id:"roc-front.front.profile.sections_security.2fa.second_form.code.invalid",defaultMessage:"Verification code is invalid"})})}),{register:M,formState:{isDirty:j,isValid:P,errors:C},handleSubmit:S}=(0,b.n)({mode:"onChange",resolver:(0,c.H)(d)});return{intl:r,bem:a,register:M,isDirty:j,isValid:P,handleSubmit:S,errors:C,onSubmit:e=>{s(async(a,s)=>{await a((0,g.s)({...e,isConnected:!0}));let{error:o,data:c}=p.a.connect2FA.selector.state(s());if(o){var d;return(0,k.D)({message:null==(d=o.data)?void 0:d.message,type:"error"})}if(null==c?void 0:c.isConnected){if(await a((0,m.p)(!0)),t(),i&&n){try{await n.updateToken(-1),n.token&&n.refreshToken&&l&&a((0,h._)({accessToken:n.token,refreshToken:n.refreshToken,hallId:l}))}catch(e){return(0,k.D)({message:r.formatMessage({id:"roc-front.front.deposit_withdraw.error.keycloak",defaultMessage:"It is not possible to update the keycloak token"}),type:"error"})}return}a((0,y.b)())}})},connect2FAState:o}})({onSuccess:a});return(0,n.useEffect)(()=>{null==M||M(N)},[M,N]),(0,r.jsxs)("form",{ref:t,onSubmit:e=>{e.preventDefault(),O(D)(e)},children:[(0,r.jsx)("p",{className:o()(P("second_description"),"body2"),children:j.formatMessage({id:"roc-front.front.profile.sections_security.2fa.second_form.description",defaultMessage:"Please enter the verification code from the authentication app installed. If you don't have access to the authentication app please use the recovery code."})}),(0,r.jsx)(i.c,{name:"confirmationCode",register:C,errors:F,type:"text",label:j.formatMessage({id:"roc-front.front.withdraw.2fa.confirm_withdraw_code.label",defaultMessage:"2FA CODE"}),placeholder:j.formatMessage({id:"roc-front.front.profile.sections_security.2fa.second_form.code.placeholder",defaultMessage:"Enter the code"}),classNames:{wrapper:P("textAlign")}}),!d&&(0,r.jsxs)("div",{className:P("footer"),children:[s&&(0,r.jsx)(l.$,{title:j.formatMessage({id:"roc-front.front.profile.sections_security.2fa.button.back",defaultMessage:"Back"}),className:P("button",["fixed50","back"]),type:"secondary",onClick:s}),(0,r.jsx)(l.$,{title:j.formatMessage({id:"roc-front.front.profile.sections_security.2fa.button.connect",defaultMessage:"Connect"}),className:P("button",["fixed50"]),type:"primary",isLoading:B.isFetching,disabled:!N||!S,onClick:O(D)})]})]})})},86123:(e,t,a)=>{"use strict";a.d(t,{y:()=>o});var r=a(21462),s=a(79279);let o=()=>{let[e]=(0,s.PV)();return{getTimezoneId:(0,r.useCallback)(async()=>{var t,a,r;let{data:s}=await e({definition:"Timezones"}),o=Intl.DateTimeFormat().resolvedOptions().timeZone;return null!=(r=null==s||null==(a=s.values)||null==(t=a.find(e=>e.zoneName===o))?void 0:t._key)?r:void 0},[e])}}},87462:(e,t,a)=>{"use strict";a.d(t,{y:()=>m});var r=a(23798),s=a(46001),o=a.n(s);a(21462);var n=a(31537),i=a(14156),l=a(94667),c=a(35395),d=a(87383),u=a.n(d),f=a(1840),p=a(1091),g=a(3169);let m=e=>{let{onClose:t,fetching:a,onSubmit:s,withoutModal:d}=e,{intl:m,bem:h,register:y,isDirty:v,isValid:x,handleSubmit:b,errors:w}=(()=>{let e=(0,f.o)("TwoFAModal"),t=(0,p.t)(),a=u().object({confirmationCode:u().string().required().custom((e,t)=>
1e&&6!==e.length?t.error("custom.length"):e).messages({"string.empty":t.formatMessage({id:"roc-front.front.profile.sections_security.2fa.second_form.code.blank",defaultMessage:"Verification code can not be blank"}),"any.required":t.formatMessage({id:"roc-front.front.profile.sections_security.2fa.second_form.code.blank",defaultMessage:"Verification code can not be blank"}),"custom.length":t.formatMessage({id:"roc-front.front.profile.sections_security.2fa.second_form.code.invalid",defaultMessage:"Verification code is invalid"})})}),{register:r,formState:{isDirty:s,isValid:o,errors:n},handleSubmit:i}=(0,g.n)({mode:"onChange",resolver:(0,c.H)(a)});return{intl:t,bem:e,register:r,isDirty:s,isValid:o,handleSubmit:i,errors:n}})(),_=m.formatMessage({id:"roc-front.front.profile.sections_security.2fa.login.title",defaultMessage:"2 factor authentication"}),k=m.formatMessage({id:"roc-front.front.profile.sections_security.2fa.login.description",defaultMessage:"Please enter the verification code from Google authentication"}),M=m.formatMessage({id:"roc-front.front.profile.sections_security.2fa.login.description2",defaultMessage:"Lost your code? You can restore it using your recovery key. If you don't have it please contact support."}),j=(0,r.jsxs)("div",{className:o()(h("wrapper")),children:[(0,r.jsx)("p",{className:o()(h("second_description"),"body2"),children:k}),(0,r.jsx)(n.c,{name:"confirmationCode",register:y,errors:w,type:"text",label:m.formatMessage({id:"roc-front.front.profile.sections_security.2fa.login.code.label",defaultMessage:"Verification code"}),placeholder:m.formatMessage({id:"roc-front.front.profile.sections_security.2fa.login.code.placeholder",defaultMessage:"Enter the code"})}),(0,r.jsx)("p",{className:o()(h("second_description"),"body2"),children:M}),(0,r.jsx)("div",{className:h("footer"),children:(0,r.jsx)(i.$,{title:m.formatMessage({id:"roc-front.front.profile.sections_security.2fa.button.proceed",defaultMessage:"Proceed"}),className:h("button",["fixed"]),type:"primary",isLoading:a,disabled:!x||!v,onClick:b(s),dataTestId:"auth-2fa-proceed-button"})})]});return d?j:(0,r.jsx)(l.a,{isOpen:!0,closeModal:t,title:_,className:h(),children:j})}},88398:()=>{},90969:(e,t,a)=>{"use strict";a.d(t,{t:()=>f});var r=a(23798),s=a(46001),o=a.n(s),n=a(21462),i=a(62372),l=a(90136),c=a(71328),d=a(64211),u=a.n(d);let f=e=>{let{list:t,value:a,change:s,className:d,disabled:f=!1,classNames:p={},dataTestId:g="",tabTestIdPrefix:m,isSecondary:h=!1}=e,y=(0,l.C)(u()),v=e=>m?`${m}-${e}`:void 0,x=(0,n.useCallback)((e,t)=>{f||t||s(e)},[s,f]);return(0,r.jsx)("ul",{className:o()("radiusInput",y("wrapper",{isSecondary:h}),d,p.wrapper,"labelLtypo"),"data-testid":g,children:null==t?void 0:t.map((e,t)=>{let s=e.value===a;return e.pathUrl&&!(0,c.bU)()?(0,r.jsx)(i.N,{href:`/personalInformation/${e.pathUrl}`,replace:!0,onClick:()=>x(e.value,s),role:"tab","data-testid":v(e.value),className:o()("radiusButton",y("tab",{active:s,radiusRegular:s,disabled:!!f}),"labelLTypo",p.tab),children:(0,r.jsx)("span",{className:y("tabLabel"),children:e.label})},e.pathUrl):(0,r.jsx)("li",{onClick:()=>x(e.value,s),role:"tab","data-testid":v(e.value),className:o()("radiusButton",y("tab",{active:s,radiusRegular:s,disabled:!!f}),"labelLTypo",p.tab),children:(0,r.jsx)("span",{className:y("tabLabel"),children:e.label})},t)})})}}}]);
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.