1var Na=Object.defineProperty;var Aa=(m,a,l)=>a in m?Na(m,a,{enumerable:!0,configurable:!0,writable:!0,value:l}):m[a]=l;var I=(m,a,l)=>Aa(m,typeof a!="symbol"?a+"":a,l);import{fx as _a,bG as Ea,dT as ca,dS as Ua,fz as Ia,cv as Oa,M as Ze,ae as Ta,A as la,v as Me,r as O,f as Fe,g as Be,l as we,j as e,y as ne,P as E,eW as Xe,s as G,fA as Ee,fB as ea,aG as xe,B as L,d as ia,S as Ma,aI as Ra,a9 as Da,au as $a,aO as qa,aa as ka,bT as Fa,aj as Ba,C as Ca,fC as ge,T as ma,k as ua,ad as ke,dZ as Ya,a7 as Va,t as La,x as aa,aD as q,aE as le,bl as pa,bm as Ga,ay as ta,aH as ha,$ as Ye,cL as za,cu as Wa,R as Ha,a as Ue}from"./index.CveLbn2O.js";import{L as Qa,T as ve}from"./index.BhTWg5Dh.js";import{M as Ve}from"./authentication.private.constants.BbRg8XuT.js";import{F as c}from"./index.C6nQSokA.js";import{C as B}from"./CommonInput.DZRyKsMk.js";import{C as Ka}from"./CommonAddress.EM5_zMJn.js";import{C as _}from"./CommonMessages.J90v6RlK.js";import{C as Za}from"./CommonPhoneInput.C6RDIpRU.js";import{C as k}from"./CommonRequiredLabel.Bq32aJtF.js";import{C as Ja}from"./CommonSelect.DeXY3D6C.js";import{C as Xa}from"./CommonDateOfBirth.DzRDi67Z.js";import{s as et}from"./send-notification.DsBwS6ze.js";import{d as at}from"./download-helper.CCoeeDC7.js";import{c as tt}from"./change-password.zhlJpBs-.js";import{d as st,C as va}from"./CommonPaymentAgreements.J1EEAH0S.js";import{u as rt}from"./update-profile.CapqsUaP.js";import{c as lt}from"./can-delete-user.BVde-h_b.js";import{C as wa}from"./CommonTitle.D0kt59tv.js";import{I as je}from"./index.0fJ69KUW.js";import{E as sa}from"./EditOutlined.Bwer82ul.js";import{C as Te,E as it}from"./CommonForm.BPdcUx_-.js";import{E as nt}from"./EyeTwoTone.ChqXBk1i.js";import{C as ot}from"./PasswordStrength.mmoqakQv.js";import{C as Ge}from"./CommonAccessiblePasswordInput.C6N4f3f0.js";import{S as ze}from"./index.BipgyrgO.js";import{C as Oe}from"./index.B-E20hpj.js";import{D as We}from"./index.BKimYVMi.js";import{R as He}from"./index.ViuJUTqg.js";import{D as dt}from"./DeleteOutlined.BStCQ8op.js";import{E as ct}from"./ExportOutlined.B_P0cm4s.js";import{S as mt}from"./SaveOutlined.DbUK2muz.js";import{C as na}from"./CommonDrawer.DP1lOiW0.js";import{C as Je}from"./CommonModal.CVR6dZCa.js";import{A as ut}from"./AuthenticationPrivateClassicService.DAAS9iBl.js";import{C as pt,p as ht,E as W}from"./PaymentData.BDWpTH7f.js";import{c as ft}from"./request.B3y6vMwA.js";import{C as gt}from"./CommonDynamicLazyAssets.t0rhr4ZA.js";import{C as bt}from"./CommonLink.CNsgdR6A.js";import{A as xt}from"./index.BbxB6457.js";import{a as fa}from"./CommonCopyOnHoverWrapper.1ms2lKv9.js";import{C as ga}from"./index.BUGgot2P.js";import{P as yt}from"./index.CxP0viHr.js";import{T as Pt}from"./index.D7WLBY48.js";import{A as ba}from"./AuthenticationCommonPaymentMethod.CiN1yQTw.js";import{A as jt}from"./AuthenticationPrivateNavBar.DF50p5wi.js";import{C as Ct}from"./CommonPreserveQueryNavigate.s1imqqLI.js";import"./LockOutlined.B6ZXyhFn.js";import"./CloseCircleFilled.CLuZ9hoX.js";import"./CommonCountrySelector.OrYmzcli.js";import"./CommonStateSelector.D0-_qblN.js";import"./CloseOutlined.CL-5T5Zi.js";import"./index.BCD-Pnv5.js";import"./internal.D81wogZe.js";import"./toArray.DPVGi2q8.js";import"./isFragment._g5-Z0t5.js";import"./DoubleLeftOutlined.Hv8D0WQf.js";import"./RightOutlined.WXbx4Pn1.js";import"./LeftOutlined.GLpWiuYx.js";import"./RightOutlined.CQ_qA0xX.js";import"./useSize.CU3vrRMJ.js";import"./useBreakpoint.CU0uN1JM.js";import"./useLayoutEffect.bPzQ5b3U.js";import"./useForceUpdate.dVt1wI6s.js";import"./index.mux4iSFO.js";import"./LoadingOutlined.CK7Q0QQR.js";import"./LoadingOutlined.w7PPx32N.js";import"./useCSSVarCls.Z1bMTjkr.js";import"./DownOutlined.DQPSubam.js";import"./SearchOutlined.BP7VF8pH.js";import"./index.CfQf5H25.js";import"./Table.a8ntZSLq.js";import"./addEventListener.C4Jz3GWo.js";import"./index.Dfu8E_UG.js";import"./index._pmvPX8T.js";import"./dropdown.BCIwG2Wk.js";import"./Dropdown.n94qsRUb.js";import"./scrollTo.BavZxmqg.js";import"./index.D1Z9eTpD.js";import"./index.B0sDJIW-.js";import"./PlusCircleOutlined.fjE_PkhE.js";import"./CommonOverlay.DVc2gCVO.js";import"./CommonDatePicker.BMX9qyZY.js";import"./CommonDatePickerMobile.BJan8pE_.js";import"./index.B-06JicI.js";import"./PaymentAgreementCredit.CAPB8zcV.js";import"./PaymentAgreement.D6SwJphc.js";import"./Credit.BtAXAm13.js";import"./EyeOutlined.Dg4cz16z.js";import"./index.Dx-D_vIa.js";import"./ShopListOrdersV2ToTicketOrdersMapper.ay8J0G-A.js";import"./confirm-marketing.a7XN054Z.js";import"./check-delete-dependencies.wRRZYbt2.js";import"./cancel-subscription.BQjxsJEH.js";import"./SpecialTicketInformation.DryntPcH.js";import"./login.kh4zg-Fe.js";import"./Skeleton.COFmJ_gc.js";import"./index.B4oiPsEx.js";import"./CommonSubNavbarMobile.DP8XfkEl.js";import"./EllipsisOutlined.DOcYtGXb.js";import"./CommonHooks.BCvkjhRi.js";import"./CommonListColsContext._bhRspQ4.js";function Lt(m){return a=>a(`Customer/Reactivate/${m.PaymentProvider}`,{...m},{method:"POST"})}function vt(m){return a=>a(`Customer/DeletePaymethodId/${m.PaymentProviderName}`,{...m},{method:"POST"})}function wt(m){return a=>a("Customer/FavourPaymethod",{...m},{method:"POST"})}function St(m){return a=>a(`Customer/Update/${m.PaymentProvider}`,{...m},{method:"POST"})}function Nt(m){const a="Registry/SetUserProperties/";return l=>l(a,{...m},{method:"POST"})}let ue=null,xa=null,ra={credentials:"include","x-data-access":"administrator"};class oa{constructor(){I(this,"getProfile",()=>ue.request(_a({})).then(a=>a.value&&a.value.length>0?new Ea(a.value[0]):Promise.reject()));I(this,"updateProfile",(a,l)=>ue.request(ca(a,l)));I(this,"getUserProperty",a=>ue.request(Ua({$filter:`(UserId eq ${a})`})).then(l=>{let s=[];return l.value&&l.value.length>0&&(s=l.value.map(t=>new Ia(t))),s}));I(this,"updateUserProperty",a=>ue.request(Nt(a)));I(this,"canDeleteUser",a=>ue.request(lt({UserId:a})));I(this,"deleteUser",(a,l,s,t)=>{let b={Name:a,Password:l,Client:s,Organization:t};return ue.request(st(b))});I(this,"logout",()=>ue.request(Oa()));I(this,"changePassword",(a,l,s,t,b)=>ue.request(tt({Name:a,Password:l,NewPassword:s,Client:t,Organization:b})));I(this,"updateUserEmail",(a,l)=>ue.request(ca(a,l)));I(this,"updateUserName",a=>ue.request(rt({...a})).then(l=>{if(l)return l}));I(this,"exportProfile",a=>{let l=["User($select=UserProperty)","User($expand=UserProperty($filter=Key eq 'SecurityQuestions'))"].join(","),s=`${a.getFirstName()}_${a.getLastName()}_Profil.csv`;return at({url:`${Ze.APIS.PERSO.BASE_URL}Identity/ODATA/UserProfile/?$expand=${l}&filename=${s}`,type:"CSV",requestInit:ra}).then(t=>Ta({blob:t.file,filename:t.fileName}))});I(this,"notifyUser",(a,l,s)=>xa.request(et({Template:l,UserId:a,Client:s})));ue=la({baseUrl:Ze.APIS.PERSO.BASE_URL+"Identity/",staticParameters:{},requestInit:{headers:ra}}),xa=la({baseUrl:Ze.APIS.PERSO.BASE_URL+"TicketShop/",staticParameters:{},requestInit:{headers:ra}})}}const ie="Authentication.Private.Settings.address.labels.",be="Authentication.Common.labels.",At=m=>{var U,Q,J;const{profile:a}=m,{t:l,i18n:s}=Me(["Authentication"]),t=new oa,{isMobile:b}=O.useContext(Fe),{showClientAdressItemByType:Y,getClientFirstNameRegex:A,getClientLastNameRegex:ae,canClientEditAdressItemByType:te,getClientIsCountryPreSelected:x,isClientDateOfBirthRequired:T,getClientCountryCode:F,isClientBitvConform:y,getClientAuthenticationAdultAge:H,isClientGenderRequired:v}=O.useContext(Be),[$,K]=O.useState({success:!1,error:!1,loading:!1}),[o]=c.useForm(),Z=A(),oe=ae();H();const w=f=>{K({...$,loading:!0,success:!1,error:!1});let u={LastName:f.lastName,FirstName:f.firstName,Title:f.title,Gender:f.gender,StreetAddress:f.StreetAddress,Locality:f.Locality,Country:f.Country?s.t(`Common.Countries.${f.Country}`):void 0,CountryCode:f.Country?f.Country:void 0,StateOrProvince:f.StateOrProvince,PostalCode:f.PostalCode,DateOfBirth:f.dateOfBirth?ia(f.dateOfBirth).set({hour:12,minute:0}
1).toISOString():void 0,Phone:f.phone?(f.phonePrefix+"."+f.phone.replace(/ /g,"")).replace(/^0+/,""):void 0,AddressVerified:f.AddressVerified};if(f.companyName){let r={[xe.USER_COMPANY_NAME]:f.companyName};t.updateUserProperty(r).then(()=>{we.log("Company name property updated successfully")}).catch(g=>{we.error("Error updating company name property",g)})}t.updateProfile(a.getId(),u).then(r=>{a.update(u),K({...$,loading:!1,success:!0,error:!1})}).catch(r=>{K({...$,error:!0,loading:!1,success:!1})})};let{success:P,loading:j,error:Se}=$;const V=(U=a.getPhone())==null?void 0:U.split(".");return we.log("RENDER AuthenticationPrivateSettingsAddress"),e.jsxs(ne,{className:"authentication-private-settings-address block-padding",children:[e.jsx(wa,{title:l(`${ie}Label28`)}),e.jsx(E,{span:24,children:e.jsx(c,{form:o,labelCol:{span:24},wrapperCol:{span:24},requiredMark:b()?"optional":!0,onFinish:w,initialValues:{title:a.getTitle(),gender:a.getGender(),firstName:a.getFirstName(),lastName:a.getLastName(),StreetAddress:a.getStreetAddress(),Locality:a.getLocality(),StateOrProvince:a.getStateOrProvince(),PostalCode:a.getPostalCode(),Country:a.getCountryCode()?a.getCountryCode():x()?F():null,phone:V&&V.length>1?V[1]:a.getPhone(),dateOfBirth:a.getDateOfBirth(),phonePrefix:V&&V.length>1?V[0]:void 0,companyName:(Q=a.getPropertiesByKey(xe.USER_COMPANY_NAME))==null?void 0:Q.getValue()},onFinishFailed:Xe,feedbackIcons:()=>({success:e.jsx("span",{role:"img","aria-label":l(be+"Completed"),className:"valid-form-item-icon",children:e.jsxs("svg",{viewBox:"64 64 896 896",width:"1em",height:"1em",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",role:"presentation","aria-hidden":"true",focusable:"false",strokeWidth:"80",children:[e.jsx("circle",{cx:"512",cy:"512",r:"416"}),e.jsx("path",{d:"M336 512 L464 640 L688 384"})]})}),error:e.jsx("span",{role:"img","aria-label":l(be+"NotCompleted"),children:e.jsxs("svg",{viewBox:"64 64 896 896",width:"1em",height:"1em",fill:"none",stroke:"currentColor","stroke-width":"64","stroke-linecap":"round","stroke-linejoin":"round",role:"presentation","aria-hidden":"true",focusable:"false",children:[e.jsx("circle",{cx:"512",cy:"512",r:"416"}),e.jsx("line",{x1:"299",y1:"299",x2:"725",y2:"725"}),e.jsx("line",{x1:"725",y1:"299",x2:"299",y2:"725"})]})})}),children:e.jsxs("fieldset",{children:[e.jsx("legend",{className:"sr-only",children:l(ie+"Legend")}),(()=>{if(P)return e.jsx(_,{message:l(ie+"Label1"),type:"success"});if(Se)return e.jsx(_,{message:s.t("Common.Alert.errorMessage"),type:"error"})})(),!b()&&e.jsx(G,{type:"info",message:l(be+"Label2")}),Y(Ee.GENDER)&&e.jsx(c.Item,{label:v()?e.jsx(k,{label:l(ie+"Label3"),requiredLabel:l(be+"Label1")}):l(ie+"Label3"),colon:!1,name:"gender",rules:[{required:v()}],validateTrigger:"onBlur",children:e.jsx(Ja,{optionFilterProp:"children",data:[{key:"m",value:"m",label:s.t("Common.Gender.male")},{key:"f",value:"f",label:s.t("Common.Gender.female")},{key:"x",value:"x",label:s.t("Common.Gender.divers")}]})}),Y(Ee.TITLE)&&e.jsx(c.Item,{label:l(ie+"Label2"),colon:!1,name:"title",children:e.jsx(B,{allowClear:!y(),autoComplete:"honorific-prefix"})}),Y(Ee.FIRST_NAME)&&e.jsx(c.Item,{label:e.jsx(k,{label:l(ie+"Label4"),requiredLabel:l(be+"Label1")}),colon:!1,name:"firstName",validateTrigger:"onBlur",rules:[{required:!0,message:l(be+"firstNameRequired")},...Z?[{pattern:new RegExp(Z,"g"),message:l(ie+"Label24")}]:[]],children:e.jsx(B,{allowClear:!y(),autoComplete:"given-name",disabled:!te(ea.FIRST_NAME),name:"given-name"})}),Y(Ee.LAST_NAME)&&e.jsx(c.Item,{label:e.jsx(k,{label:l(ie+"Label6"),requiredLabel:l(be+"Label1")}),colon:!1,name:"lastName",validateTrigger:"onBlur",rules:[{required:!0,message:l(be+"lastNameRequired")},...oe?[{pattern:new RegExp(oe,"g"),message:l(ie+"Label24")}]:[]],children:e.jsx(B,{allowClear:!y(),autoComplete:"family-name",disabled:!te(ea.LAST_NAME),value:a.getLastName()||void 0,name:"family-name"})}),Y(Ee.PHONE)&&e.jsx(Za,{}),Y(Ee.COMPANY_NAME)&&e.jsx(c.Item,{label:e.jsx(k,{label:l(ie+"companyName"),requiredLabel:l(be+"Label1")}),colon:!1,name:"companyName",validateTrigger:"onBlur",children:e.jsx(B,{allowClear:!y(),autoComplete:"company-name",value:((J=a.getPropertiesByKey(xe.USER_COMPANY_NAME))==null?void 0:J.getValue())||void 0,name:"company-name"})}),e.jsx(Ka,{form:o}),Y(Ee.DATE_OF_BIRTH)&&e.jsxs("fieldset",{children:[e.jsx("legend",{className:"sr-only",children:l(ie+"Label22")}),e.jsx(c.Item,{label:e.jsx(k,{label:l(ie+"Label22"),requiredLabel:T()?l(be+"Label1"):void 0}),colon:!1,name:"dateOfBirth",validateTrigger:"onBlur",required:T(),children:e.jsx(Xa,{labelId:"dateOfBirth",disabled:!te(ea.DATE_OF_BIRTH),required:T()})})]}),e.jsx(c.Item,{style:{textAlign:"center"},className:"submit-button-container",children:e.jsx(L,{type:"primary",htmlType:"submit",loading:j,children:l(ie+"Label21")})})]})})})]})},i="Authentication.Private.Settings.password.labels.",ee="Authentication.Common.labels.",_t=({profile:m})=>{const[a,l]=O.useState({loading:!1,error:null,editUsage:null}),[s]=c.useForm(),{t,i18n:b}=Me("Authentication"),Y=new oa,{canClientPasswordBeEdited:A,getClientPasswordStrength:ae,doesClientSettingsShowEmailAddress:te,doesClientUseEmailAddressByLogin:x,isClientBitvConform:T}=O.useContext(Be),{isMobile:F,getOrganizationName:y,getClientName:H}=O.useContext(Fe),v=H(),[$,K]=O.useState(null),[o,Z]=O.useState(!1),oe=ae(),w=y(),P=u=>{switch(l({...a,loading:!0,error:null}),a.editUsage){case"EDIT_PASSWORD":j(u);break;case"EDIT_EMAIL":Se(u);break;case"EDIT_USERNAME":V(u)}},j=u=>{u.newPassword!==u.newPasswordConfirm?l({...a,error:{unmachtedPasswords:!0},loading:!1}):(K(null),Z(null),Y.changePassword(u.username,u.currentPassword,u.newPassword,u.client,u.organization).then(r=>{r.Succeeded?(l({...a,error:null,loading:!1,editUsage:null}),K(!0),s.resetFields(["currentPassword","newPassword","newPasswordConfirm"])):l({...a,error:r,loading:!1})}).catch(r=>{l({...a,error:{hasInvalidPassword:!0},loading:!1})}
1))},Se=u=>{u.email!==u.newEmailConfirm?l({...a,error:{unmatchedEmails:!0},loading:!1}):(K(null),Z(null),Y.updateUserEmail(m.getId(),{Email:u.email}).then(r=>{l({...a,loading:!1,error:null,editUsage:null}),Z(!0),s.resetFields(["currentPassword"])}).catch(r=>{r.body.getReader().read().then(X=>{const ye=new TextDecoder("utf-8").decode(X.value).includes("already exists");l(ye?{...a,error:{EmailAlreadyExist:!0},loading:!1}:{...a,error:{failedRequest:!0},loading:!1})}).catch(()=>{l({...a,error:{failedRequest:!0},loading:!1})})}))},V=u=>{if(u.username!==u.newUsernameConfirm)l({...a,error:{unmatchedUsernames:!0},loading:!1});else{K(null),Z(null);const r={Name:u.username,Password:u.currentPassword,Client:u.client,Organization:u.organization};Y.updateUserName({...r}).then(g=>{g.Succeeded?(l({...a,loading:!1,error:null,editUsage:null}),Z(!0),s.resetFields(["currentPassword"])):l({...a,error:g,loading:!1})}).catch(g=>{l({...a,error:{failedRequest:!0},loading:!1})})}},U=u=>{l(r=>({...r,editUsage:u}))};O.useEffect(()=>{let u;switch(a.editUsage){case"EDIT_USERNAME":u="username";break;case"EDIT_EMAIL":u="email";break;case"EDIT_PASSWORD":u="currentPassword";break}if(u){const r=s.getFieldInstance(u);r&&r.focus()}},[a.editUsage]);const Q=()=>{s.resetFields(["currentPassword"]),l({...a,editUsage:null})};let{loading:J,error:f}=a;return e.jsxs(ne,{className:"authentication-private-settings-password block-padding",children:[e.jsx(wa,{title:"Passwort ändern"}),e.jsxs(E,{span:24,children:[(()=>{if(f){if(f.unmachtedPasswords)return e.jsx(_,{message:t(i+"Label1"),description:e.jsx("span",{children:t([`${i}Label2_${v}`,`${i}Label2`])}),type:"error"});if(f.failedCharacterClasses)return e.jsx(_,{message:t(i+"Label3"),description:e.jsxs("span",{children:[t([`${i}Label4_${v}`,`${i}Label4`])," "]}),type:"error"});if(f.hasInvalidPassword)return e.jsx(_,{message:t(i+"Label5"),description:e.jsxs("span",{children:[t([`${i}Label6_${v}`,`${i}Label6`])," "]}),type:"error"});if(f.hasPwnedPassword)return e.jsx(_,{message:t(i+"Label7"),description:e.jsxs("span",{children:[t([`${i}Label8_${v}`,`${i}Label8`])," "]}),type:"error"});if(f.AuthenticationFailed)return e.jsx(_,{message:t([`${i}Label35_${v}`,`${i}Label35`]),type:"error"});if(f.InvalidCredentials)return e.jsx(_,{message:t(i+"Label36"),type:"error"});if(f.failedRequest)return e.jsx(_,{message:b.t("Common.Alert.errorMessage"),type:"error"});if(f.EmailAlreadyExist)return e.jsx(_,{message:t(i+"Label25"),type:"error"});if(f.unmatchedUsernames)return e.jsx(_,{message:t(i+"Label31"),type:"error"});if(f.unmatchedEmails)return e.jsx(_,{message:t(i+"Label32"),type:"error"});if(f.HasExistingName)return e.jsx(_,{message:t(i+"Label34"),type:"error"})}else{if(o)return e.jsx(_,{message:t(i+"Label23"),type:"success"});if($)return e.jsx(_,{message:t(i+"Label9"),description:e.jsxs("span",{children:[t([`${i}Label10_${v}`,`${i}Label10`])," "]}),type:"success"})}})(),e.jsx(Ma,{children:({getClientName:u,getOrganizationName:r})=>{var g;return e.jsx(Te,{size:"middle",labelCol:{span:24},wrapperCol:{span:24},onFinish:P,form:s,initialValues:{username:(g=m.getUser())==null?void 0:g.getUserName(),email:m.getEmail()},onFinishFailed:Xe,children:a.editUsage?e.jsx(e.Fragment,{children:(()=>{var X,ye,Ne,Ae;switch(a.editUsage){case"EDIT_USERNAME":return e.jsxs("fieldset",{children:[e.jsx("legend",{className:"sr-only",children:t(i+"Legend2")}),e.jsx(c.Item,{label:e.jsx(k,{label:t(i+"Label11"),requiredLabel:t(ee+"Label1")}),name:"username",rules:[{required:!0,message:t(i+"Label12")},x()?{type:"email",message:t([`${i}Label22_${v}`,`${i}Label22`])}:{}],children:e.jsx(B,{placeholder:t(i+"Label11"),allowClear:!T(),type:x()?"email":"text",autoComplete:x()?"email":"off"})}),e.jsx(c.Item,{label:e.jsx(k,{label:t(i+"Label26"),requiredLabel:t(ee+"Label1")}),name:"newUsernameConfirm",rules:[{required:!0,message:t(i+"Label27")},x()?{type:"email",message:t([`${i}Label22_${v}`,`${i}Label22`])}:{}],children:e.jsx(B,{placeholder:t(i+"Label26"),allowClear:!T(),type:x()?"email":"text",autoComplete:"off"})}),e.jsx(c.Item,{label:e.jsx(k,{label:t(i+"Label20"),requiredLabel:t
1(ee+"Label1")}),name:"email",rules:[{required:!0,message:t(i+"Label21")},{type:"email",message:t([`${i}Label22_${v}`,`${i}Label22`])}],children:e.jsx(B,{placeholder:t(i+"Label20"),disabled:!0,allowClear:!T(),autoComplete:"off",type:"email"})}),e.jsx(c.Item,{label:t(i+"Label13"),name:"currentPassword",validateTrigger:"onBlur",rules:[{required:!0,message:t(i+"Label14")}],children:e.jsx(Ge,{name:"current-password",placeholder:t(i+"Label15")})}),e.jsx(c.Item,{hidden:!0,name:"client",initialValue:(X=u())==null?void 0:X.toLowerCase(),rules:[{required:!0}],children:e.jsx(je,{type:"hidden"})}),e.jsx(c.Item,{hidden:!0,name:"organization",initialValue:(ye=r())==null?void 0:ye.toLowerCase(),rules:[{required:!0}],children:e.jsx(je,{type:"hidden"})}),e.jsxs(ne,{children:[e.jsx(E,{span:8,children:e.jsx(L,{type:"default",className:"cancel-button",loading:J,onClick:Q,children:t(i+"Label28")})}),e.jsx(E,{span:16,className:"text-align-right",children:e.jsx(L,{type:"primary",loading:J,htmlType:"submit",children:t([i+"Label24_"+w,i+"Label24"])})})]})]});case"EDIT_PASSWORD":return e.jsxs("fieldset",{children:[e.jsx("legend",{className:"sr-only",children:t(i+"Legend3")}),e.jsx(c.Item,{label:e.jsx(k,{label:t(i+"Label11"),requiredLabel:t(ee+"Label1")}),name:"username",rules:[{required:!0,message:t(i+"Label12")}],children:e.jsx(B,{placeholder:t(i+"Label11"),disabled:!0,allowClear:!T(),autoComplete:"off"})}),e.jsx(c.Item,{label:e.jsx(k,{label:t(i+"Label20"),requiredLabel:t(ee+"Label1")}),name:"email",rules:[{required:!0,message:t(i+"Label21")},{type:"email",message:t([`${i}Label22_${v}`,`${i}Label22`])}],children:e.jsx(B,{placeholder:t(i+"Label20"),disabled:!0,allowClear:!T(),autoComplete:"off"})}),e.jsx(c.Item,{label:e.jsx(k,{label:t(i+"Label13"),requiredLabel:t(ee+"Label1")}),name:"currentPassword",validateTrigger:"onBlur",rules:[{required:!0,message:t(i+"Label14")}],children:e.jsx(Ge,{name:"current-password",autoComplete:"current-password",placeholder:t(i+"Label15"),size:"middle"})}),e.jsx(c.Item,{label:"Neues Passwort",name:"newPassword",rules:oe.length?[{required:!0,message:t(i+"Label16")},...oe.map(he=>({message:b.t("Common.PasswordStrengthType"+he.Type,he.Type==="ALL"?{passwordLength:he.Minimum}:void 0),validator:(Re,Ce,_e)=>Ra(Re,Ce,_e,he)}))]:[{required:!0,message:t(i+"Label16")}],children:e.jsx(ot,{inputProps:{name:"new-password",placeholder:t(i+"Label17"),"aria-describedby":"newPassword_help"},iconRender:he=>he?e.jsx(nt,{"aria-label":b.t("Common.AriaLabels.eye")}):e.jsx(it,{"aria-label":b.t("Common.AriaLabels.eyeInvisible")}),passwordStrength:oe,autoComplete:"new-password"})}),e.jsx(c.Item,{label:e.jsx(k,{label:t(i+"Label18"),requiredLabel:t(ee+"Label1")}),name:"newPasswordConfirm",validateTrigger:"onBlur",rules:[{required:!0,message:t(i+"Label18")+"!"}],children:e.jsx(Ge,{name:"new-password",autoComplete:"new-password",placeholder:t(i+"Label18")})}),e.jsx(c.Item,{hidden:!0,name:"client",initialValue:(Ne=u())==null?void 0:Ne.toLowerCase(),rules:[{required:!0}],children:e.jsx(je,{type:"hidden"})}),e.jsx(c.Item,{hidden:!0,name:"organization",initialValue:(Ae=r())==null?void 0:Ae.toLowerCase(),rules:[{required:!0}],children:e.jsx(je,{type:"hidden"})}),e.jsxs(ne,{children:[e.jsx(E,{span:8,children:e.jsx(L,{type:"default",className:"cancel-button",loading:J,onClick:Q,children:t(i+"Label28")})}),e.jsx(E,{span:16,className:"text-align-right",children:e.jsx(L,{type:"primary",loading:J,htmlType:"submit",children:t([i+"Label24_"+w,i+"Label24"])})})]})]});case"EDIT_EMAIL":return e.jsxs("fieldset",{children:[e.jsx("legend",{className:"sr-only",children:t(i+"Legend4")}),e.jsx(c.Item,{label:e.jsx(k,{label:t(i+"Label11"),requiredLabel:t(ee+"Label1")}),name:"username",rules:[{required:!0,message:t(i+"Label12")},x()?{type:"email",message:t([`${i}Label22_${v}`,`${i}Label22`])}:{}],children:e.jsx(B,{placeholder:t(i+"Label11"),disabled:!0,allowClear:!T(),type:x()?"email":"text",autoComplete:x()?"email":"off"})}),e.jsx(c.Item,{label:e.jsx(k,{label:t(i+"Label20"),requiredLabel:t(ee+"Label1")}),name:"email",rules:[{required:!0,message:t(i+"Label21")},{type:"email",message:t([`${i}Label22_${v}`,`${i}Label22`])}],children:e.jsx(B,{placeholder:t(i+"Label20"),allowClear:!T(),type:"email",autoComplete:"email"})}),e.jsx(c.Item,{label:e.jsx(k,{label:t(i+"Label29"),requiredLabel:t
1(ee+"Label1")}),name:"newEmailConfirm",rules:[{required:!0,message:t(i+"Label30")},{type:"email",message:t([`${i}Label22_${v}`,`${i}Label22`])}],children:e.jsx(B,{placeholder:t(i+"Label20"),allowClear:!T(),type:"email",name:"newEmailConfirm",autoComplete:"email"})}),e.jsx(c.Item,{label:e.jsx(k,{label:t(i+"Label13"),requiredLabel:t(ee+"Label1")}),name:"currentPassword",validateTrigger:"onBlur",children:e.jsx(Ge,{name:"current-password",placeholder:t(i+"Label15"),disabled:!0})}),e.jsxs(ne,{children:[e.jsx(E,{span:8,children:e.jsx(L,{type:"default",className:"cancel-button",loading:J,onClick:Q,children:t(i+"Label28")})}),e.jsx(E,{span:16,className:"text-align-right",children:e.jsx(L,{type:"primary",loading:J,htmlType:"submit",children:t([i+"Label24_"+w,i+"Label24"])})})]})]})}})()}):e.jsxs("fieldset",{children:[e.jsx("legend",{className:"sr-only",children:t(i+"Legend1")}),!F()&&e.jsx(G,{type:"info",message:t(ee+"Label2")}),e.jsx(c.Item,{label:e.jsx(k,{label:t(i+"Label11"),requiredLabel:t(ee+"Label1")}),className:"input-suffix",name:"username",validateTrigger:"onBlur",rules:[{required:!0,message:t(i+"Label12")}],children:e.jsx(B,{placeholder:t(i+"Label11"),disabled:!0,suffix:A()?e.jsx(L,{type:"primary",size:"small",icon:e.jsx(sa,{"aria-label":void 0}),onClick:()=>U("EDIT_USERNAME"),"aria-label":b.t("Common.AriaLabels.edit")}):null})}),te()&&e.jsx(c.Item,{className:"input-suffix",label:e.jsx(k,{label:t(i+"Label20"),requiredLabel:t(ee+"Label1")}),name:"email",validateTrigger:"onBlur",rules:[{required:!0,message:t(i+"Label21")},{type:"email",message:t([`${i}Label22_${v}`,`${i}Label22`])}],children:e.jsx(B,{placeholder:t(i+"Label20"),disabled:!0,className:"input-suffix",name:"email",autoComplete:"email",suffix:A()?e.jsx(L,{size:"small",type:"primary",icon:e.jsx(sa,{"aria-label":void 0}),onClick:()=>U("EDIT_EMAIL"),"aria-label":b.t("Common.AriaLabels.edit")}):null})}),e.jsx(c.Item,{label:e.jsx(k,{label:t(i+"Label13"),requiredLabel:t(ee+"Label1")}),name:"currentPassword",className:"input-suffix",validateTrigger:"onBlur",rules:[{required:!0,message:t(i+"Label14")}],children:e.jsx(B,{type:"password",name:"current-password",placeholder:t(i+"Label15"),disabled:!0,suffix:A()?e.jsx(L,{size:"small",type:"primary",icon:e.jsx(sa,{"aria-label":void 0}),onClick:()=>U("EDIT_PASSWORD"),"aria-label":b.t("Common.AriaLabels.edit")}):null})})]})})}})]})]})};var Qe={exports:{}},qe={},Ke={},ya;function Et(){if(ya)return Ke;ya=1,Object.defineProperty(Ke,"__esModule",{value:!0});var m={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M678.3 655.4c24.2-13 51.9-20.4 81.4-20.4h.1c3 0 4.4-3.6 2.2-5.6a371.67 371.67 0 00-103.7-65.8c-.4-.2-.8-.3-1.2-.5C719.2 518 759.6 444.7 759.6 362c0-137-110.8-248-247.5-248S264.7 225 264.7 362c0 82.7 40.4 156 102.6 201.1-.4.2-.8.3-1.2.5-44.7 18.9-84.8 46-119.3 80.6a373.42 373.42 0 00-80.4 119.5A373.6 373.6 0 00137 901.8a8 8 0 008 8.2h59.9c4.3 0 7.9-3.5 8-7.8 2-77.2 32.9-149.5 87.6-204.3C357 641.2 432.2 610 512.2 610c56.7 0 111.1 15.7 158 45.1a8.1 8.1 0 008.1.3zM512.2 534c-45.8 0-88.9-17.9-121.4-50.4A171.2 171.2 0 01340.5 362c0-45.9 17.9-89.1 50.3-121.6S466.3 190 512.2 190s88.9 17.9 121.4 50.4A171.2 171.2 0 01683.9 362c0 45.9-17.9 89.1-50.3 121.6C601.1 516.1 558 534 512.2 534zM880 772H640c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h240c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"user-delete",theme:"outlined"};return Ke.default=m,Ke}var Pa;function Ut(){if(Pa)return qe;Pa=1;var m=Da(),a=$a();Object.defineProperty(qe,"__esModule",{value:!0}),qe.default=void 0;var l=m(qa()),s=A(ka()),t=m(Et()),b=m(Fa());function Y(x){if(typeof WeakMap!="function")return null;var T=new WeakMap,F=new WeakMap;return(Y=function(H){return H?F:T})(x)}function A(x,T){if(x&&x.__esModule)return x;if(x===null||a(x)!="object"&&typeof x!="function")return{default:x};var F=Y(T);if(F&&F.has(x))return F.get(x);var y={__proto__:null},H=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in x)if(v!=="default"&&{}.hasOwnProperty.call(x,v)){var $=H?Object.getOwnPropertyDescriptor(x,v):null;$&&($.get||$.set)?Object.defineProperty(y,v,$):y[v]=x[v]}return y.default=x,F&&F.set(x,y),y}var ae=function(T,F){return s.createElement(b.default,(0,l.default)((0,l.default)({},T),{},{ref:F,icon:t.default}))},te=s.forwardRef(ae);return qe.default=te,qe}var ja;function It(){return ja||(ja=1,(function(m,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var l=s(Ut());function s(b){return b&&b.__esModule?b:{default:b}}var t=l;a.default=t,m.exports=t})(Qe,Qe.exports)),Qe.exports}var Ot=It();const Tt=Ba(Ot),d="Authentication.Private.Settings.config.labels.",pe="Authentication.Private.Settings.config.messages.",Ie="Authentication.Common.labels.",Mt=m=>{var ce,me;const{showClientConfigItemByType:a,showClientConfigItemTypeSave:l,showClientConfigItemTypeExport:s,doesClientNeedPasswordToDeactivateAccount:t,doesClientNeedPasswordToDeleteAccount:b,doesClientHavePaymentAgreementParentChild:Y,isWSBClient:A,isClientBitvConform:ae}=O.useContext(Be),{getClientName:te,getOrganizationName:x,getClientUsage:T,isMobile:F}=O.useContext(Fe),y=te(),H=x(),v=A(),$=new oa;let K=new ut;const{t:o,i18n:Z}=Me("Authentication"),[oe]=c.useForm(),[w]=c.useForm(),[P,j]=O.useState({pageLoading:!1,loading:!1,success:!1,deactivateVisible:!1,deleteVisible:!1,
1confirmDeleteVisible:!1,deactivateSuccess:null,emptyIhrPassword:!0,userPropertyFirstClass:m.profile.getPropertiesByKey(xe.FIRST_CLASS),userSecurityQuestion:m.profile.getPropertiesByKey(xe.SECURITY_QUESTIONS),adSelected:!1,mafoSelected:!1,firstClassSelected:((ce=m.profile.getPropertiesByKey(xe.FIRST_CLASS))==null?void 0:ce.getValue())==="true",newSelected:((me=m.profile.getPropertiesByKey(xe.NEWS))==null?void 0:me.getValue())==="true",error:{deleteOrUpdateFailed:!1,wrongPassword:!1,cannotDeleteUser:!1}}),Se=p=>{let{userPropertyFirstClass:R,userSecurityQuestion:D}=P;j({...P,loading:!0,success:!1,error:{deleteOrUpdateFailed:!1,wrongPassword:!1,cannotDeleteUser:!1}});let Pe=[],De=p.firstClass!==void 0?{[xe.FIRST_CLASS]:p.firstClass.toString()}:null,$e=p.question!==void 0?{[xe.SECURITY_QUESTIONS]:JSON.stringify([{QuestionType:p.question,Answer:p.answer}])}:null,da=p.news!==void 0?{[xe.NEWS]:p.news.toString()}:null;if(De){let fe=$.updateUserProperty(De);Pe.push(fe)}if(da){let fe=$.updateUserProperty(da);Pe.push(fe)}if($e){D.setValue($e.SecurityQuestions);let fe=$.updateUserProperty($e);Pe.push(fe)}Promise.all(Pe).then(fe=>{fe&&j({...P,userSecurityQuestion:D,userPropertyFirstClass:R||fe[1],loading:!1,success:!0,error:{deleteOrUpdateFailed:!1,wrongPassword:!1,cannotDeleteUser:!1}})}).catch(fe=>{const Sa=new Error("Error updating user properties",{cause:fe});we.error({error:Sa,context:{module:"Authentication",function:"AuthenticationPrivateSettingsConfig - onFinish"}}),j({...P,loading:!1,success:!1,error:{deleteOrUpdateFailed:!0,wrongPassword:!1,cannotDeleteUser:!1}})})},V=()=>{$.logout().then(()=>{window.location.href=`/authentication/login?organization=${H}&client=${y}`}).catch(()=>{window.location.href=`/authentication/login?organization=${H}&client=${y}`})},U=p=>{if(j({...P,loading:!0,success:!1,error:{deleteOrUpdateFailed:!1,wrongPassword:!1,cannotDeleteUser:!1}}),y&&H){let R=m.profile.getEmail();R&&$.deleteUser(R,p.ihrPassword,y,H).then(D=>{D&&D.Succeeded&&D.Deleted?V():j({...P,loading:!1,success:!1,deleteVisible:!1,error:{deleteOrUpdateFailed:!1,wrongPassword:!0,cannotDeleteUser:!1}})}).catch(D=>{j({...P,loading:!1,success:!1,deleteVisible:!1,error:{deleteOrUpdateFailed:!0,wrongPassword:!1,cannotDeleteUser:!1}})})}},Q=p=>{P.emptyIhrPassword&&p.target.value.length>0?j({...P,emptyIhrPassword:!1}):p.target.value.length===0&&j({...P,emptyIhrPassword:!0})},J=()=>{j({...P,deleteVisible:!1,emptyIhrPassword:!0}),oe.setFieldsValue({ihrPassword:""})},f=()=>{j(R=>({...R,loading:!0,success:!1,error:{deleteOrUpdateFailed:!1,wrongPassword:!1,cannotDeleteUser:!1}}));let p=m.profile.getId();$.canDeleteUser(p).then(R=>{R.SummaryResult===1?j(D=>({...D,loading:!1,deleteVisible:!0,emptyIhrPassword:!0})):R.SummaryResult===2?j(D=>({...D,loading:!1,confirmDeleteVisible:!0})):j(D=>({...D,loading:!1,deleteVisible:!1,error:{deleteOrUpdateFailed:!1,wrongPassword:!1,cannotDeleteUser:!0}}))}).catch(R=>{j(D=>({...D,loading:!1,success:!1,deleteVisible:!1,error:{deleteOrUpdateFailed:!0,wrongPassword:!1,cannotDeleteUser:!1}}))})},u=()=>{j({...P,confirmDeleteVisible:!1})},r=()=>{j({...P,loading:!0}),$.exportProfile(m.profile).finally(()=>{j({...P,loading:!1})})},g=()=>{j({...P,deactivateVisible:!1,deactivateSuccess:null}),w.setFieldsValue({password:""})},X=()=>{j({...P,deactivateVisible:!0})},ye=p=>{var Pe,De;const{profile:R}=m;let D=JSON.stringify({LastModified:ia.tz(ia()).toISOString(),ModifiedBy:(Pe=R.getUser())==null?void 0:Pe.getName()});y&&H&&(j({...P,loading:!0,deactivateSuccess:null}),K.deactivateCustomer({name:(De=m.profile.getUser())==null?void 0:De.getName(),client:y,organization:H,annotation:D,password:p.password}).then($e=>{if($e.Succeeded)j({...P,deactivateSuccess:!0,loading:!1,deactivateVisible:!1}),setTimeout(()=>V(),2e3);else throw Error()}).catch(()=>{j({...P,deactivateSuccess:!1,loading:!1,deactivateVisible:!1})}))};let{deactivateVisible:Ne,deleteVisible:Ae,confirmDeleteVisible:he,success:Re,error:Ce,userSecurityQuestion:_e,deactivateSuccess:h,userPropertyFirstClass:C,mafoSelected:S,adSelected:se,newSelected:de,loading:N,pageLoading:re}=P,z=_e?_e.getValue():null,M={};return z&&(M=JSON.parse(z)[0]),re?e.jsx(ne,{children:e.jsx(E,{span:24,className:"text-align-center",children:e.jsx(Ca,{size:"large"})})}):e.jsx(ne,{className:"authentication-private-settings-config block-padding",children:e.jsxs(E,{span:24,children:[e.jsx(Te,{labelCol:{span:24},wrapperCol:{span:24},requiredMark:F()?"optional":!0,onFinish:Se,onFinishFailed:Xe,initialValues:{mafo:S,firstClass:(C==null?void 0:C.getValue())==="true",ad:se,news:de,question:M==null?void 0:M.QuestionType,answer:M==null?void 0:M.Answer},onValuesChange:(p,R)=>{p.hasOwnProperty("mafo")&&j({...P,mafoSelected:p.mafo}),p.hasOwnProperty("firstClass")&&j({...P,firstClassSelected:p.firstClass}),p.hasOwnProperty("ad")&&j({...P,adSelected:p.ad}),p.hasOwnProperty("news")&&j({...P,newSelected:p.news})},feedbackIcons:()=>({success:e.jsx("span",{role:"img","aria-label":o(Ie+"Completed"),className:"valid-form-item-icon",children:e.jsxs("svg",{viewBox:"64 64 896 896",width:"1em",height:"1em",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",role:"presentation","aria-hidden":"true",focusable:"false",strokeWidth:"80",children:[e.jsx("circle",{cx:"512",cy:"512",r:"416"}),e.jsx("path",{d:"M336 512 L464 640 L688 384"})]})}),error:e.jsx("span",{role:"img","aria-label":o(Ie+"NotCompleted"),children:e.jsxs("svg",{viewBox:"64 64 896 896",width:"1em",height:"1em",fill:"none",stroke:"currentColor","stroke-width":"64","stroke-linecap":"round","stroke-linejoin":"round",role:"presentation","aria-hidden":"true",focusable:"false",children:[e.jsx("circle",{cx:"512",cy:"512",r:"416"}),e.jsx("line",{x1:"299",y1:"299",x2:"725",y2:"725"}),e.jsx("line",{x1:"725",y1:"299",x2:"299",y2:"725"})]})})}),children:e.jsxs("fieldset",{children:[e.jsx("legend",{className:"sr-only",children:o(d+"Legend")}),(()=>{if(h!=null)return e.jsx(_,{message:o(d+(h?"Label35":"Label36")),type:h?"success":"error"});if(Re)return e.jsx(_,{message:o(d+"Label2"),type:"success"});if(Ce.deleteOrUpdateFailed)return e.jsx(_,{message:Z.t("Common.Alert.errorMessage"),type:"error"});if(Ce.wrongPassword)return e.jsx(_,{message:o([`${d}Label3_${y}`,`${d}Label3`]),type:"error"});if(Ce.cannotDeleteUser)return e.jsx(_,{message:o(d+"Label50"),type:"error"})})(),!F()&&a(ge.PERSONAL_QUESTION)&&e.jsx(G,{type:"info",message:o(Ie+"Label2")}),a(ge.PERSONAL_QUESTION)&&e.jsxs(e.Fragment,{children:[e.jsxs("fieldset",{children:[e.jsx("legend",{className:"sr-only",children:o(d+"Label4")}),e.jsx(c.Item,{label:e.jsx(k,{label:o(d+"Label4"),requiredLabel:o(Ie+"Label1")}),hasFeedback:!0,name:"question",validateTrigger:"onBlur",rules:[{required:!0,message:o(Ie+"personalQuestionRequired")}],children:e.jsxs(He.Group,{children:[e.jsx(He,{value:"1",children:o([`${d}Label6_${y}`,`${d}Label6`])}),e.jsx(He,{value:"2",children:o([`${d}Label7_${y}`,`${d}Label7`])}),e.jsxs(He,{value:"3",children:[" ",o([`${d}Label8_${y}`,`${d}Label8`])]})]})})]}),e.jsx(c.Item,{label:e.jsx(k,{label:o(d+"Label9"),requiredLabel:o(Ie+"Label1")}),hasFeedback:!0,name:"answer",validateTrigger:"onBlur",rules:[{required:!0,message:o(Ie+"personalAnswerRequired")}],children:e.jsx(B,{})})]}),a(ge.FIRST_CLASS)&&e.jsxs(e.Fragment,{children:[e.jsx(c.Item,{label:o(d+"Label11"),colon:!1,name:"firstClass",valuePropName:"checked",children:e.jsx(ze,{})}),P.firstClassSelected?e.jsx(G,{className:"form-hints",message:e.jsx("p",{className:"alert-message",children:e.jsxs(ma,{t:o,i18nKey:d+"Label12",children:["Ich bevorzuge ",e.jsx("i",{children:"erste"})," Klasse zu fahren."]})}),type:"info"}):e.jsx(G,{className:"form-hints",message:e.jsx("p",{className:"alert-message",children:e.jsxs(ma,{t:o,i18nKey:d+"Label13",children:["Ich bevorzuge ",e.jsx("i",{children:"zweite"})," Klasse zu fahren."]})}),type:"info"})]}),a(ge.MAFO)&&e.jsxs(e.Fragment,{children:[e.jsx(c.Item,{label:o(d+"Label14"),colon:!1,name:"mafo",valuePropName:"checked",children:e.jsx(ze,{})}),P.mafoSelected?e.jsx(G,{className:"form-hints",message:e.jsx("p",{className:"alert-message",children:o(d+"Label16")}),type:"info"}):e.jsx(G,{className:"form-hints",message:e.jsx("p",{className:"alert-message",children:o(d+"Label15")}
1),type:"info"})]}),a(ge.ADS)&&e.jsxs(ua.Fragment,{children:[e.jsx(c.Item,{label:o([`${d}Label17_${y}`,d+"Label17"]),colon:!1,name:"ad",valuePropName:"checked",children:e.jsx(ze,{})}),P.adSelected?e.jsxs(e.Fragment,{children:[e.jsx(G,{className:"form-hints",message:e.jsx("p",{className:"alert-message",children:o([`${d}Label19_${y}`,d+"Label19"])}),type:"info"}),v&&e.jsx(G,{className:"form-hints revoke last",message:e.jsxs("p",{className:"alert-message",children:[" ",o(d+"Label44_WSB")," ",e.jsx("a",{href:"https://www.wvv.de/media-wvv/rechtliches/dokumente/datenschutz_informationspflichten.pdf",target:"_blank",children:"wvv.de/datenschutz"})," ","."]}),type:"info"})]}):e.jsx(G,{className:"form-hints",message:e.jsx("p",{className:"alert-message",children:o([`${d}Label18_${y}`,d+"Label18"])}),type:"info"})]}),a(ge.NEWS)&&e.jsxs(ua.Fragment,{children:[e.jsx(c.Item,{label:o([`${d}Label20_${y}`,d+"Label20"]),colon:!1,name:"news",valuePropName:"checked",children:e.jsx(ze,{})}),P.newSelected?e.jsxs(e.Fragment,{children:[e.jsx(G,{className:`form-hints ${v?"":"last"}`,message:e.jsx("p",{className:"alert-message",children:o([`${d}Label22_${y}`,d+"Label22"])}),type:"info"}),v&&e.jsx(G,{className:"form-hints revoke last",message:e.jsxs("p",{className:"alert-message",children:[" ",o(d+"Label44_WSB")," ",e.jsx("a",{href:"https://www.wvv.de/media-wvv/rechtliches/dokumente/datenschutz_informationspflichten.pdf",target:"_blank",children:"wvv.de/datenschutz"})," ","."]}),type:"info"})]}):e.jsx(G,{className:"form-hints last",message:e.jsx("p",{className:"alert-message",children:o([`${d}Label21_${y}`,d+"Label21"])}),type:"info"})]}),e.jsx(c.Item,{style:{textAlign:"center"},children:e.jsxs(ne,{gutter:[6,6],justify:"space-around",children:[a(ge.DEACTIVATE)&&e.jsxs(e.Fragment,{children:[F()?e.jsx(na,{className:"authentication-private-settings-config-deactivate-modal",open:Ne,title:o(d+"Label34"),footer:null,closable:!1,placement:"top",children:e.jsxs(Te,{form:w,onFinish:ye,onFinishFailed:Xe,children:[t()&&e.jsx(c.Item,{name:"password",className:"authentication-private-settings-config__popup-form-item",rules:[{required:!0,message:o([`${d}Label23_${y}`,`${d}Label23`])}],children:e.jsx(B,{type:"password",placeholder:o([`${d}Label24_${y}`,`${d}Label24`]),allowClear:!ae(),autoComplete:"off"})}),e.jsx(We,{}),e.jsx(c.Item,{className:"authentication-private-settings-config__popup-form-item",children:e.jsxs(Oe,{className:"buttons",children:[e.jsx(L,{type:"primary",htmlType:"submit",loading:N,children:o(d+"Label31")}),e.jsx(L,{onClick:g,children:o(d+"Label26")})]})})]})}):e.jsx(Je,{className:"authentication-private-settings-config-deactivate-modal",open:Ne,title:o(d+"Label34"),footer:null,closable:!1,children:e.jsxs(Te,{form:w,onFinish:ye,children:[t()&&e.jsx(c.Item,{name:"password",className:"authentication-private-settings-config__popup-form-item",rules:[{required:!0,message:o(d+"Label23")}],children:e.jsx(B,{type:"password",placeholder:o(d+"Label24"),allowClear:!ae(),autoComplete:"off"})}),e.jsx(We,{}),e.jsx(c.Item,{className:"authentication-private-settings-config__popup-form-item",children:e.jsxs(Oe,{className:"buttons",children:[e.jsx(L,{type:"primary",htmlType:"submit",loading:N,children:o(d+"Label31")}),e.jsx(L,{onClick:g,children:o(d+"Label26")})]})})]})}),e.jsx(E,{xs:24,xxl:6,sm:12,children:e.jsx(L,{icon:e.jsx(Tt,{"aria-label":void 0}),className:"action-button",type:"primary",loading:N,block:!0,danger:!0,onClick:X,children:o(d+"Label31")})})]}),s(ge.EXPORT)&&T()!==ke.APP&&e.jsx(E,{xs:24,xxl:6,sm:12,children:e.jsx(L,{icon:e.jsx(ct,{"aria-label":void 0}),className:"action-button",type:"primary",loading:N,onClick:r,block:!0,children:o(d+"Label30")})}),a(ge.DELETE)&&e.jsxs(e.Fragment,{children:[F()?e.jsx(na,{className:"authentication-private-settings-config-delete-modal",open:Ae,title:o(d+"Label27"),footer:null,closable:!1,placement:"top",children:e.jsxs(Te,{form:oe,onFinish:U,children:[b()&&e.jsx(c.Item,{name:"ihrPassword",className:"authentication-private-settings-config__popup-form-item",rules:[{required:!0,message:o(d+"Label23")}
1],children:e.jsx(B,{type:"password",onChange:Q,placeholder:o(d+"Label24"),allowClear:!ae(),className:"ihr-password",autoComplete:"off"})}),e.jsxs(c.Item,{className:"authentication-private-settings-config__popup-form-item",children:[e.jsx(G,{className:"form-hints",message:o([`${pe}Message1_${y}`,`${pe}Message1`]),description:e.jsxs("p",{className:"alert-message",children:[o([`${pe}Message2_${y}`,`${pe}Message2`]),e.jsx("br",{})]}),type:"info"}),e.jsx(We,{}),e.jsxs(Oe,{className:"buttons",children:[e.jsx(L,{type:"primary",htmlType:"submit",loading:N,disabled:P.emptyIhrPassword&&b(),children:o(d+"Label1")}),e.jsx(L,{onClick:J,children:o(d+"Label26")})]})]})]})}):e.jsx(Je,{className:"authentication-private-settings-config-delete-modal",open:Ae,title:o(d+"Label27"),footer:null,closable:!1,children:e.jsxs(Te,{form:oe,onFinish:U,children:[b()&&e.jsx(c.Item,{name:"ihrPassword",className:"authentication-private-settings-config__popup-form-item",rules:[{required:!0,message:o(d+"Label23")}],children:e.jsx(B,{type:"password",onChange:Q,placeholder:o(d+"Label24"),allowClear:!ae(),className:"ihr-password",autoComplete:"off"})}),e.jsxs(c.Item,{className:"authentication-private-settings-config__popup-form-item",children:[e.jsx(G,{className:"form-hints",message:o(pe+"Message1"),description:e.jsxs("p",{className:"alert-message",children:[o(pe+"Message2"),e.jsx("br",{})]}),type:"info"}),e.jsx(We,{}),e.jsxs(Oe,{className:"buttons",children:[e.jsx(L,{type:"primary",htmlType:"submit",loading:N,disabled:P.emptyIhrPassword&&b(),children:o(d+"Label1")}),e.jsx(L,{onClick:J,children:o(d+"Label26")})]})]})]})}),e.jsx(E,{xs:24,xxl:6,sm:12,children:e.jsx(L,{danger:!0,block:!0,icon:e.jsx(dt,{"aria-label":void 0}),className:"action-button",type:"primary",loading:N,onClick:f,children:o(d+"Label28")})})]}),l(ge.SAVE)&&e.jsx(E,{xs:24,xxl:6,sm:12,children:e.jsx(L,{className:"action-button",type:"primary",htmlType:"submit",block:!0,loading:N,icon:e.jsx(mt,{"aria-label":void 0}),children:o(d+"Label29")})})]})})]})}),e.jsxs(Je,{open:he,footer:null,closable:!1,children:[e.jsx(G,{className:"form-hints",message:o([`${pe}Message13_${y}`,`${pe}Message13`]),description:e.jsxs("p",{className:"alert-message",children:[o(pe+"Message6"),e.jsx("br",{}),e.jsx("b",{children:o([`${pe}Message14_${y}`,`${pe}Message14`])})]}),type:"warning"}),e.jsxs(Oe,{children:[e.jsx(L,{type:"primary",onClick:()=>{j(p=>({...p,deleteVisible:!0,emptyIhrPassword:!0,confirmDeleteVisible:!1}))},children:o(d+"Label49")}),e.jsx(L,{onClick:u,children:o(d+"Label26")})]})]})]})})};class Rt{constructor(a){I(this,"Active");I(this,"PaymentProvider");I(this,"CustomerResult");for(let l in a)l==="CustomerResult"&&a.CustomerResult?this.CustomerResult=new pt(a[l]):this[l]=a[l]}isActive(){return this.Active||!1}getPaymentProvider(){return this.PaymentProvider}getCustomerResult(){return this.CustomerResult||null}}let Le=null,Dt={credentials:"include","x-data-access":"administrator"};class $t{constructor(){I(this,"getAllCustomerResults",()=>Le.request(ht()).then(a=>{let l=[];return a&&a.AllCustomerResults&&a.AllCustomerResults.forEach(s=>{l.push(new Rt(s))}),l}));I(this,"confirmCustomer",async(a,l,s,t)=>Le.request(ft({SubjectId:a,PaymentProvider:t,Client:l,Organization:s})));I(this,"updatePaymentData",a=>Le.request(St(a)));I(this,"favorPayMethod",(a,l,s)=>Le.request(wt({PaymethodId:a.getPaymethodId(),CustomerId:s,ProviderName:l,PaymentMethod:a.getPaymentMethod()})).then(t=>{if(t&&t.Success)return!0;throw new Error}));I(this,"deletePayMethod",(a,l)=>Le.request(vt({PaymethodId:a,PaymentProviderName:l})).then(s=>{if(s&&s.Success)return!0;throw new Error}));I(this,"reactivatePaymentData",a=>Le.request(Lt(a)));I(this,"getActivePaymentProvider",async()=>Le.request(Ya({$filter:"Active eq true",$expand:"PaymentProvider"})).then(a=>{if(a.value&&a.value.length>0){const l=new Va(a.value[0]),s=l.getPaymentProvider();if(s)return s}return null}));Le=la({baseUrl:Ze.APIS.PERSO.BASE_URL+"Payment/",staticParameters:{},requestInit:{headers:Dt}})}}const n="Authentication.Private.Settings.payment.labels.",qt=m=>{var Ce,_e;const a=La();let l=new $t;const{t:s}=Me("Authentication"),{t}
1=Me("Common"),{hasClientPaymentMethod:b,getClientPaypalSource:Y,getClientPaymentProviderSource:A,canClientFavoritePaymentMethod:ae,canClientDeletePaymentMethod:te,getFormattedPriceWithClientCurrency:x,isBegClient:T,getClientRedirectionDelay:F,getClientPaymentMethodsOrder:y,getClientPrepayUrl:H}=O.useContext(Be),{getClientName:v,getOrganizationName:$,isMobile:K,getReturnUrl:o,getClientUsage:Z,getAppType:oe}=O.useContext(Fe),w=v(),P=$(),j=F(),{search:Se}=a,V=aa.parse(Se);let{blacklistedPaymentMethods:U}=V;const Q=o(),J=()=>{const{search:h}=a,C=aa.parse(h),{logpayUpdate:S,paypalUpdate:se,worldlineBridgeUpdate:de,payOneUpdate:N,bypassUpdate:re,rivertyUpdate:z}=C;return S||se||de||re||N||z},f=()=>!J()&&Z()===ke.APP;U?U=U.split(","):U=[];const u=O.useMemo(()=>{let h=[];b(q.SEPA)&&U.indexOf(`${W.PostPay}`)===-1&&h.push({title:s([n+"Label15_"+w,n+"Label15"]),link:s(n+"Label16"),key:"POSTDD",images:["sepa.svg"],provider:le.LOGPAY,method:q.SEPA}),b(q.CREDIT_CARD)&&U.indexOf(`${W.CreditCard}`)===-1&&h.push({title:s([n+"Label18_"+w,n+"Label18"]),link:s(n+"Label19"),key:"POSTCC",images:["visa.svg","mastercard.svg","american-express.svg"],provider:le.LOGPAY,method:q.CREDIT_CARD}),b(q.PREPAY)&&U.indexOf(`${W.PrePay}`)===-1&&(A()==le.RIVERTY?h.push({title:s(n+"Label52"),link:s(n+"Label26"),key:"PREPAY",description:s(n+"Label53"),images:["riverty.svg"],provider:le.RIVERTY,method:q.PREPAY}):h.push({title:s(n+"Label25"),link:s(n+"Label26"),key:"PREPAY",description:s(n+"Label27"),images:["giropay.png","eps.png","sepa.svg"],provider:le.LOGPAY,method:q.PREPAY})),b(q.PAYPAL)&&U.indexOf(`${W.PayPal}`)===-1&&h.push({title:s([n+"Label21_"+w,n+"Label21"]),link:s(n+"Label22"),key:"POSTPP",images:["paypal.svg"],provider:Y(),method:q.PAYPAL}),b(q.WORLDLINE_BRIDGE)&&U.indexOf(`${W.Free}`)===-1&&h.push({title:s(n+"Label32"),link:s(n+"Label33"),key:"WORLDLINE_BRIDGE",description:s(n+"Label34"),images:["worldline-bridge.png"],provider:A(),method:q.WORLDLINE_BRIDGE}),b(q.BYPASS)&&U.indexOf(`${W.Unspecified}`)===-1&&h.push({title:s(n+"Label35"),link:s(n+"Label36"),key:"BYPASS",description:s(n+"Label37"),images:["bypass.png"],provider:A(),method:q.BYPASS}),b(q.PAY_ONE)&&U.indexOf(`${W.Unspecified}`)===-1&&h.push({title:s(n+"Label39"),link:s(n+"Label40"),key:"PayOne",description:s(n+"Label41"),images:["pay-one.png"],provider:A(),method:q.PAY_ONE}),b(q.BONVOYO)&&U.indexOf(`${W.Bonvoyo}`)===-1&&h.push({title:s([n+"Label43_"+w,n+"Label43"]),link:s(n+"Label44"),key:"Bonvoyo",description:s([n+"Label41_"+w,n+"Label41"]),method:q.BONVOYO,images:["bonvoyo.png"],provider:A()}),b(q.APPLE_PAY)&&U.indexOf(`${W.ApplePay}`)===-1&&pa.isIOS&&h.push({title:s(n+"Label47"),link:s(n+"Label48"),key:"ApplePay",images:["apple-pay.svg"],provider:A(),method:q.APPLE_PAY}),b(q.GOOGLE_PAY)&&U.indexOf(`${W.GooglePay}`)===-1&&pa.isAndroid&&h.push({title:s(n+"Label45"),link:s(n+"Label46"),key:"GooglePay",images:["google-pay.svg"],provider:A(),method:q.GOOGLE_PAY});let C=h;return y()&&(C=Ga(h,y())),C},[s]),[r,g]=O.useState({paymentCustomerResults:[],loading:!1,success:!1,showUpdateModal:!1,showActivateModal:!1,error:null,logpayUpdate:V.logpayUpdate||null,paypalUpdate:V.paypalUpdate||null,rivertyUpdate:V.rivertyUpdate||null,worldlineBridgeUpdate:V.worldlineBridgeUpdate||null,payOneUpdate:V.payOneUpdate||null,bypassUpdate:V.bypassUpdate||null,reload:!1});O.useEffect(()=>{const h=r.showActivateModal||r.showUpdateModal?"polite":"off";document.querySelectorAll(".list-item-modal").forEach(S=>{S.setAttribute("aria-live",h)})},[r.showActivateModal,r.showUpdateModal]),O.useEffect(()=>{ye()},[r.reload]);const X=(h,C)=>{switch(C){case"update":he(h.key,h.provider);break;case"activate":Re(h.key,h.provider);break}},ye=O.useCallback(async()=>{g({...r,loading:!0});const{search:h}=a,C=aa.parse(h),{logpayUpdate:S,paypalUpdate:se,rivertyUpdate:de,worldlineBridgeUpdate:N,payOneUpdate:re,bypassUpdate:z,subjectId:M}=C;let ce,me=[];if(J()&&M&&w&&P&&(S==="true"||se==="true"||N==="true"||z==="true"||re==="true"||de==="true")){let p=le.LOGPAY;se?p=le.PAYPAL:S?p=le.LOGPAY:N?p=le.WORLDLINE_BRIDGE:z?p=le.BYPASS:re?p=le.PAY_ONE:de&&(p=le.RIVERTY);try{ce=await l.confirmCustomer(M,w,P,p)}catch{u.length===1&&f()?X(u[0],"activate"):g({...r,loading:!1,showActivateModal:f(),error:{payment:!0}});return}}try{me=await l.getAllCustomerResults()}catch{u.length===1&&f()?X(u[0],"activate"):g({...r,loading:!1,showActivateModal:f(),error:{payment:!0}});return}
1me.length?ce?(ce.Success?g({...r,paymentCustomerResults:me,logpayUpdate:S,paypalUpdate:se,rivertyUpdate:de,worldlineBridgeUpdate:N,bypassUpdate:z,payOneUpdate:re,loading:!1}):g({...r,paymentCustomerResults:me,logpayUpdate:"false",paypalUpdate:"false",rivertyUpdate:"false",worldlineBridgeUpdate:"false",payOneUpdate:"false",bypassUpdate:"false",loading:!1}),Q&&ta(Q,j)):g({...r,paymentCustomerResults:me,logpayUpdate:S,paypalUpdate:se,rivertyUpdate:de,worldlineBridgeUpdate:N,bypassUpdate:z,payOneUpdate:re,loading:!1}):u.length===1&&f()?X(u[0],"activate"):g({...r,loading:!1,showActivateModal:f(),error:{payment:!0}})},[]),Ne=(h,C)=>{g({...r,loading:!0}),l.deletePayMethod(h,C).then(()=>{g({...r,error:null}),setTimeout(()=>{window.location.reload()},3e3)}).catch(()=>{g({...r,loading:!1,error:{checkedIn:!0}})})},Ae=(h,C,S)=>{g({...r,loading:!0}),l.favorPayMethod(h,C,S).then(()=>{g({...r,reload:!r.reload})}).catch(()=>{g({...r,loading:!1})})},he=(h,C=le.LOGPAY)=>{g({...r,showUpdateModal:!1,showActivateModal:!1,loading:!0,error:null}),l.updatePaymentData({PaymentProvider:C,PaymentMethod:h}).then(S=>{S.Success&&S.RedirectUrl?(g({...r,loading:!1,showUpdateModal:!1,showActivateModal:!1}),window.location.href=S.RedirectUrl):g({...r,showUpdateModal:!1,showActivateModal:!1,loading:!1,error:{payment:!0,checkedIn:S.UserHasEntitlement,missingDob:S.RequiresDob}})}).catch(S=>{g({...r,loading:!1,showUpdateModal:!1,showActivateModal:!1,error:{payment:!0}})})},Re=(h,C=le.LOGPAY)=>{g({...r,showUpdateModal:!1,showActivateModal:!1,loading:!0,error:null}),l.reactivatePaymentData({PaymentProvider:C,PaymentMethod:h,Client:w||void 0}).then(S=>{S.Success&&S.RedirectUrl?(g({...r,loading:!1,showUpdateModal:!1,showActivateModal:!1}),window.location.href=S.RedirectUrl):g({...r,loading:!1,showUpdateModal:!1,showActivateModal:!1,error:{payment:!0}})}).catch(S=>{var se;g({...r,loading:!1,showUpdateModal:!1,showActivateModal:!1,error:{payment:!0,messageId:(se=S==null?void 0:S.Error)==null?void 0:se.MessageId}})})};return we.log("RENDER : AuthenticationPrivateSettingsPayment"),e.jsxs(ne,{className:`authentication-private-settings-payment block-padding ${K()&&"mobile"}`,children:[((Ce=r.error)==null?void 0:Ce.messageId)&&e.jsx(_,{type:"error",message:t(`Common.PaymentAgreements.Messages.${(_e=r.error)==null?void 0:_e.messageId}`)}),e.jsxs(E,{span:24,children:[(()=>{if(r.logpayUpdate==="true"||r.logpayUpdate==="false"||r.paypalUpdate==="true"||r.paypalUpdate==="false"||r.worldlineBridgeUpdate==="true"||r.worldlineBridgeUpdate==="false"||r.bypassUpdate==="true"||r.bypassUpdate==="false"||r.payOneUpdate==="true"||r.payOneUpdate==="false"||r.rivertyUpdate==="true"||r.rivertyUpdate==="false")return e.jsx(E,{span:24,children:(()=>{if(r.logpayUpdate==="true"||r.paypalUpdate==="true"||r.rivertyUpdate==="true"||r.worldlineBridgeUpdate==="true"||r.bypassUpdate==="true"||r.payOneUpdate==="true")return e.jsx(_,{message:s(n+"Label1"),description:e.jsx("span",{children:s([n+"Label2_"+w,n+"Label2"])}),type:"success"});if(r.logpayUpdate==="false"||r.paypalUpdate==="false"||r.rivertyUpdate==="false"||r.worldlineBridgeUpdate==="false"||r.bypassUpdate==="false"||r.payOneUpdate==="false")return e.jsx(_,{message:s([n+"Label49_"+w,n+"Label49"]),type:"error"})})()})})(),(()=>{var se,de;const h=r.paymentCustomerResults.filter(N=>N.isActive()),C=(se=h[0])==null?void 0:se.getCustomerResult(),S=(de=h[0])==null?void 0:de.getPaymentProvider();if(r.loading)return e.jsx(E,{span:24,className:"text-align-center",children:e.jsx(Ca,{className:"loading-spin",size:"large"})});if(r.error){if(r.error.checkedIn)return e.jsx(_,{message:e.jsx("span",{children:s(n+"Label5")}),type:"error"});if(r.error.missingDob)return e.jsx(_,{message:e.jsx("span",{children:s(n+"Label29")}),type:"error"});if(r.error.payment)return e.jsxs(e.Fragment,{children:[e.jsx(G,{message:m.profile.getDateOfBirth()&&m.profile.getStreetAddress()?e.jsx("p",{className:"alert-message",children:s([n+"Label6_"+w,n+"Label6"])}):e.jsxs("p",{className:"alert-message",children:[" ",s([n+"Label30_"+w,n+"Label30"])]}),action:e.jsxs("div",{className:"enter-payment-alert-buttons-group",children:[e.jsx(L,{type:"primary",htmlType:"submit",loading:r.loading,onClick:()=>
1{u.length===1?X(u[0],"activate"):g({...r,showUpdateModal:!1,showActivateModal:!0})},children:s([n+"Label7_"+w,n+"Label7"])}),K()&&Z()===ke.APP&&oe()===ha.GULLIVR_PR&&Q&&e.jsx(c.Item,{style:{textAlign:"center"},children:e.jsx(L,{type:"default",loading:r.loading,onClick:()=>{ta(Q,j)},children:s(n+"Label31")})})]}),type:"error"}),T()&&e.jsx(G,{description:s(n+"Label38"),type:"info",showIcon:!0})]})}else return e.jsxs(ne,{children:[(()=>{var N,re;if(C){const z=(N=C.getPayMethods())==null?void 0:N.filter(M=>M.isFavorite());return e.jsxs(E,{span:24,children:[e.jsx(c,{labelCol:{span:24},wrapperCol:{span:24},initialValues:{toChange:Ye.t("Common.PaymentMethods."+String(C.getPaymentMethod()||0)),details:C.getPaymentMethodLabel(),balance:x((C.getBalance()||0).toFixed(2)),status:Ye.t("Common.PaymentMethodStatus."+String(C.getStatus()||0)),statusDate:(re=C.getStatusDate())==null?void 0:re.format("DD.MM.YYYY HH:mm")},children:e.jsxs("fieldset",{children:[e.jsx("legend",{className:"sr-only",children:s(n+"Legend")}),e.jsx(c.Item,{label:s(n+"Label8"),hasFeedback:!0,name:"toChange",children:e.jsx(je,{"aria-disabled":"true",readOnly:!0,className:"disabled-item"})}),e.jsx(c.Item,{label:s(n+"Label9"),hasFeedback:!0,name:"details",children:e.jsx(je,{"aria-disabled":"true",readOnly:!0,className:"disabled-item"})}),e.jsx(c.Item,{label:s(n+"Label10"),hasFeedback:!0,name:"status",children:e.jsx(je,{"aria-disabled":"true",readOnly:!0,className:"disabled-item"})}),e.jsx(c.Item,{label:s(n+"Label11"),hasFeedback:!0,name:"statusDate",children:e.jsx(je,{"aria-disabled":"true",readOnly:!0,className:"disabled-item"})}),C.getPaymentMethod()===W.PrePay&&e.jsx(c.Item,{label:s(n+"Label28"),hasFeedback:!0,children:e.jsxs(Oe.Compact,{className:`balance-prepay-compact ${P}`,style:{width:"100%"},children:[e.jsx(c.Item,{name:"balance",noStyle:!0,children:e.jsx(je,{"aria-disabled":"true",readOnly:!0,className:"disabled-item"})}),H()&&e.jsx(L,{type:"primary",className:"prepay-button",onClick:()=>{window.location.href=H()},children:s(n+"Label51")})]})})]})}),e.jsx(c.Item,{children:e.jsxs(ne,{gutter:[6,6],justify:"space-around",children:[te()&&e.jsx(E,{xs:24,sm:12,children:e.jsx(yt,{title:s(n+"ConfirmDelete"),description:s(n+"ConfirmDeleteDesc"),okText:s(n+"Delete"),cancelText:s(n+"Label31"),onConfirm:()=>{z&&(z==null?void 0:z.length)>0&&Ne(z[0].getPaymethodId(),S)},children:e.jsx(L,{danger:!0,type:"primary",loading:r.loading,className:"action-button",block:!0,children:s(n+"Label42")})})}),e.jsx(E,{xs:24,sm:12,children:e.jsx(L,{type:"primary",htmlType:"submit",loading:r.loading,className:"action-button",block:!0,onClick:()=>{u.length===1?X(u[0],"update"):g({...r,showUpdateModal:!0,showActivateModal:!1})},children:s(n+"Label12")})})]})}),K()&&Z()!==ke.APP&&oe()===ha.GULLIVR_PR&&Q&&e.jsx(c.Item,{style:{textAlign:"center"},children:e.jsx(L,{type:"default",loading:r.loading,onClick:()=>{ta(Q,j)},children:s(n+"Label31")})})]})}else return e.jsx(G,{message:e.jsxs("p",{className:"alert-message",children:[s([n+"Label6_"+w,n+"Label6"]),e.jsx(Oe,{children:e.jsx(L,{type:"link",htmlType:"submit",loading:r.loading,onClick:()=>{u.length===1?X(u[0],"activate"):g({...r,showUpdateModal:!1,showActivateModal:!0})},children:s([n+"Label7_"+w,n+"Label7"])})})]}),type:"error"})})(),(()=>{if(ae()&&r.paymentCustomerResults.length>0)return e.jsx(E,{sm:24,md:24,className:"pay-methods-list",children:r.paymentCustomerResults.map(N=>{var z;let re=((z=N.getCustomerResult())==null?void 0:z.getPayMethods())||[];return re.length>0?e.jsx(E,{className:"pay-methods-list",children:e.jsx(Qa,{header:e.jsxs(ve.Title,{level:4,children:[N.getPaymentProvider(),":Â ",N.isActive()&&e.jsx(Pt,{color:"#52c41a",children:"Aktiv"})]}),dataSource:re,rowKey:M=>M.getPaymethodId(),split:!1,renderItem:M=>{let ce=M.getStatus(),me=e.jsx(ga,{className:M.isFavorite()?"fav-method":void 0,hoverable:!0,onClick:()=>{var D;const p=N.getPaymentProvider(),R=(D=N.getCustomerResult())==null?void 0:D.getCustomerId();p&&R&&Ae(M,p,R)},children:e.jsx(ga.Meta,{avatar:(()=>{let p=[];switch(M.getPaymentMethod()){case W.PayPal:p=["paypal"];break;
1case W.CreditCard:p=["visa","mastercard","american-express"];break;case W.PostPay:p=["sepa"];break;case W.Free:p=["worldline-bridge"];break;case W.Unspecified:p=["bypass"];break;case W.PrePay:p=["giropay","eps","sepa"];break;case W.Bonvoyo:p=["bonvoyo"];break}return p.map((R,D)=>e.jsx(gt,{assetType:"payment-methods",assetName:[`${R}.png`,`${R}.svg`],children:Pe=>e.jsx(xt,{size:60,alt:R,shape:"square",src:Pe})},D))})(),title:e.jsx(bt,{children:Ye.t("Common.PaymentMethods."+M.getPaymentMethod().toString())}),description:M.getPaymethodLabel()})});return e.jsx(fa.Ribbon,{text:Ye.t("Common.PaymentMethodStatus."+ce.toString()),color:ce===3||ce===4?"red":ce===0?"blue":"green",children:M.isFavorite()?e.jsx(fa.Ribbon,{text:s(n+"Label24"),color:"gold",className:"fav-ribbon",children:me}):me})}})}):null}).filter(N=>N)})})()]})})(),K()?e.jsx(na,{title:Z()!==ke.APP?r.showUpdateModal?s([n+"Label13_"+w,n+"Label13"]):s([n+"Label14_"+w,n+"Label14"]):"",className:"payment-methods-modal",open:r.showUpdateModal||r.showActivateModal,onClose:()=>{g({...r,showUpdateModal:!1,showActivateModal:!1})},closable:!1,footer:[e.jsx(L,{onClick:()=>{g({...r,showUpdateModal:!1,showActivateModal:!1})},children:s(n+"Label31")})],placement:"top",height:"75%",children:e.jsx(ba,{dataSource:u,onClick:h=>{if(!r.showActivateModal&&!r.showUpdateModal)return;const C=r.showActivateModal?"activate":"update";X(h,C)}})}):e.jsx(Je,{title:e.jsx(ve.Title,{level:2,children:r.showUpdateModal?s([n+"Label13_"+w,n+"Label13"]):s([n+"Label14_"+w,n+"Label14"])}),className:"payment-methods-modal",open:r.showUpdateModal||r.showActivateModal,onCancel:()=>{g({...r,showUpdateModal:!1,showActivateModal:!1})},closable:!1,footer:[e.jsx(L,{onClick:()=>{g({...r,showUpdateModal:!1,showActivateModal:!1})},children:s(n+"Label31")})],children:e.jsx(ba,{dataSource:u,onClick:h=>{if(!r.showActivateModal&&!r.showUpdateModal)return;const C=r.showActivateModal?"activate":"update";X(h,C)}})})]})]})},kt=m=>(we.info("RENDER: AuthenticationPrivateSettingsParentChild"),e.jsx(ne,{className:"authentication-private-settings-parent-child block-padding",children:e.jsx(E,{span:24,children:e.jsx(va,{profile:m.profile,usage:"parent/child"})})})),Ft=m=>(we.info("RENDER: AuthenticationPrivateSettingsCompanyEmployee"),e.jsx(ne,{className:"authentication-private-settings-company-employee block-padding",children:e.jsx(E,{span:24,children:e.jsx(va,{profile:m.profile,usage:"company/employee"})})})),Rr=m=>{const{profile:a}=m,{getClientName:l}=O.useContext(Fe),s=l(),{doesClientHavePaymentAgreementParentChild:t,doesClientHavePaymentAgreementCompanyEmployee:b,isClassicClientCategory:Y}=O.useContext(Be),{t:A}=Me("Authentication"),{analyticsDispatch:ae}=O.useContext(za),{pathname:te}=La();O.useEffect(()=>{ae({type:Wa.STANDARD_EVENT,payload:{pathName:te}})},[te]);let x=Ve.ROUTER.SETTINGS.DEFAULT;return s&&(Ve.ROUTER.SETTINGS.hasOwnProperty(s)?x=Ve.ROUTER.SETTINGS[s]:Y()&&(x=Ve.ROUTER.SETTINGS.CLASSIC)),t()||delete x["parent-child"],b()||delete x["company-employee"],A("Authentication.Private.Breadcrumb.labels.Label15"),we.info("RENDER : AuthenticationPrivateSettings"),e.jsx(ne,{className:"authentication-private-settings",children:e.jsxs(E,{span:24,children:[e.jsx(jt,{routes:x}),e.jsxs(Ha,{children:[e.jsx(Ue,{index:!0,element:e.jsx(Ct,{to:"address",replace:!0})}),e.jsx(Ue,{path:"address/*",element:e.jsxs(e.Fragment,{children:[e.jsx(ve.Title,{level:1,className:"sr-only",children:A("Authentication.Private.Settings.config.labels.Label52")}),e.jsx(At,{profile:a})]})}),e.jsx(Ue,{path:"password",element:e.jsxs(e.Fragment,{children:[e.jsx(ve.Title,{level:1,className:"sr-only",children:A("Authentication.Private.Settings.config.labels.Label53")}),e.jsx(_t,{profile:a})]})}),e.jsx(Ue,{path:"config",element:e.jsxs(e.Fragment,{children:[e.jsx(ve.Title,{level:1,className:"sr-only",children:A("Authentication.Private.Settings.config.labels.Label51")}),e.jsx(Mt,{profile:a})]})}),e.jsx(Ue,{path:"payment",element:e.jsxs(e.Fragment,{children:[e.jsx(ve.Title,{level:1,className:"sr-only",children:A("Authentication.Private.Settings.config.labels.Label54")}),e.jsx(qt,{profile:a})]})}),t()&&e.jsx(Ue,{path:"parent-child",element:e.jsxs(e.Fragment,{children:[e.jsx(ve.Title,{level:1,className:"sr-only",children:A("Authentication.Private.Settings.config.labels.Label55")}),e.jsx(kt,{profile:a})]})}),b()&&e.jsx(Ue,{path:"company-employee",element:e.jsxs(e.Fragment,{children:[e.jsx(ve.Title,{level:1,className:"sr-only",children:A("Authentication.Private.Settings.config.labels.Label56")}),e.jsx(Ft,{profile:a})]})})]})]})})};export{Rr as AuthenticationPrivateSettings};
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.