PageSourceSearch

https://direct.alicia.insure/assets/index.slPY8xZ7.js

js alicia.insure collected 2026-10-06 18:11:22 UTC 18,280 bytes, 1 lines download raw bytes

1import{aJ as A,j as s,ba as W,a7 as ee,a8 as se,al as te,F as r,T as n,B as N,k as ae,bd as R}from"./chakra.CNo8-LAt.js";import{a as V}from"./emotion.DwsOS3er.js";import{P as oe}from"./index.CV3ljN9_.js";import{T as re,a1 as ie,c as E,a2 as ne,b as Q,a3 as le,a4 as L,r as ce}from"./partnerSettingsMatch.CeNsCB3v.js";import{r as e}from"./alicia.B0Mu1pxX.js";import{d as q,f as Z,m as me,h as de,b0 as F,a5 as M,b1 as U,T as ue,e as pe}from"./index.BTIn1CTQ.js";import{F as z}from"./forms.BKkyutuO.js";import{F as p}from"./index.Dd5rojvF.js";import{D as he,a as ye,b as fe,c as be,d as ge,e as xe}from"./dialog.BY_pIDGk.js";import{I as je}from"./index.C3lMuakI.js";import{M as De}from"./modal-content-wrapper.CO3a-3qt.js";import{s as Pe}from"./payment.B42k3Fn_.js";import"./currency-symbol-map.CtHp7l9E.js";import"./index.DeNWp4ad.js";import{s as B}from"./sanitize.6Zl4IpWR.js";import{g as $,F as O}from"./index.DRGtgGXp.js";import{T as _e,a as Ne,b as G,c as Se,d as ve,e as Y}from"./tabs.CnuvwiQE.js";import"./formatPrice.Dsfe_nD6.js";import"./framer.C7ABESK6.js";import"./sentry.TqamEh5Y.js";import"./lodash.DlBJHpcm.js";import"./posthog.Dw1T_2oi.js";import"./combobox-field-props.D8S_1i3B.js";import"./CheckIcon.gTFJlWPu.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},m=new t.Error().stack;m&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[m]="6117a0b3-a202-4e93-8177-cad08dcc4db6",t._sentryDebugIdIdentifier="sentry-dbid-6117a0b3-a202-4e93-8177-cad08dcc4db6")}catch{}})();const J=({columns:t,name:m,label:i,mask:D,children:g,tooltip:o})=>{const{getColor:x}=q(),{open:f,onOpen:j,onClose:C}=A();return s.jsx(W,{colSpan:t??2,py:4,borderBottom:`${e(1)} solid #00000033`,children:s.jsxs(ee,{px:e(20),children:[m&&s.jsxs(se,{fontSize:e(18),lineHeight:e(20),fontWeight:500,color:x("text"),bg:x("input-label-background","background-card"),width:"fit-content",px:e(8),children:[m,s.jsx(te,{})]}),s.jsxs(r,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[g??s.jsx(n,{mt:e(6),fontSize:e(16),lineHeight:e(24),className:D?"sentry-mask":"",pos:"relative",children:i}),o&&s.jsx(re,{content:s.jsx(n,{dangerouslySetInnerHTML:{__html:B(o)}}),bg:"black",color:"white",fontSize:e(14),lineHeight:e(22),p:e(16),hasArrow:!0,open:f,children:s.jsx(ie,{onMouseEnter:j,onMouseLeave:C})})]})]})},m)},K=({type:t,title:m,description:i,open:D,onClose:g})=>{const o=de(),{getColor:x}=q(),{t:f}=E(),j=Q(),{user:C,getUser:S}=Z(),v=async(P,{setSubmitting:w})=>{try{if(!C?.id)return;const{iban_number:_}=P;await Pe(_.replace(/\s/g,""),t),j({title:f("common.iban-update"),type:"success"}),g(),setTimeout(async()=>{await S()},1e3)}catch(_){j({title:String(_),type:"error"})}finally{w(!1)}};return s.jsxs(he,{open:D,onOpenChange:P=>{P.open||g()},placement:"center",size:"lg",children:[s.jsx(ye,{}),s.jsxs(De,{children:[s.jsx(fe,{"data-testid":"dialog-close-button",css:{color:"black",borderRadius:"full",marginTop:e(5)}}),s.jsx(z,{initialValues:{iban_number:""},validationSchema:ne(f,o),onSubmit:v,children:({handleChange:P,handleBlur:w,submitForm:_,touched:k,errors:X,isSubmitting:H,values:T,dirty:a,isValid:h})=>s.jsxs(r,{flexDirection:"column",children:[m&&s.jsx(be,{fontSize:e(48),lineHeight:e(48),color:x("text"),fontWeight:"bold",children:m}),s.jsxs(ge,{pl:e(32),pr:e(32),children:[i&&s.jsx(n,{fontSize:e(16),lineHeight:e(24),color:x("text"),children:i}),s.jsx(r,{direction:"column",mt:e(8),mb:e(24),children:s.jsx(je,{mt:e(24),required:!0,name:"iban_number",inputType:"text",label:f("userPages.myDetails.forms.payment.modal.ibanLabel"),placeholder:f("userPages.myDetails.forms.payment.modal.ibanPlaceholder"),invalid:X.iban_number,touched:k.iban_number,handleChange:P,handleBlur:w,value:T.iban_number,mask:!0})})]}),s.jsx(xe,{children:s.jsxs(r,{gap:e(8),css:{justifyContent:"end",alignItems:"center",[me.tablet]:{flexDirection:"column-reverse"}},children:[s.jsx(N,{variant:"solid",onClick:_,loading:H,disabled:Object.values(T).some(u=>u===void 0||u==="")&&(H||!(a&&h)),rounded:"full",width:"100%",maxWidth:e(150),height:e(56),"data-testid":"continue-btn",fontWeight:"bold",fontSize:e(16),children:s.jsx("span",{children:f("userPages.myDetails.forms.cta.iban")})}),s.jsx(N,{variant:"outline",onClick:g,rounded:"full",width:"100%",maxWidth:e(150),height:e(56),"data-testid":"continue-btn",fontWeight:"bold",fontSize:e(16),children:s.jsx("span",{children:f("userPages.myDetails.forms.cta.back")})})]})})]})})]})]})},Ce=()=>{const{t}=E(),m=Q(),{getColor:i}=q(),D=A(),g=A(),{user:o,getUser:x,manageUserAddress:f}=Z(),[j,C]=V.useState(F.PERSONAL),S=(o?.iban?.freelancer??"XX XX").replace(/\s/g,"").slice(-4).split(""),v=(o?.iban?.consumer??"XX XX").replace(/\s/g,"").slice(-4).split(""),P=async()=>{try{await x()}catch(a){m({title:String(a),type:"error"})}};V.useEffect(()=>{P()},[]);const w={firstName:o?.first_name??"",lastName:o?.last_name??"",email:o?.email??"",phoneNumber:o?.phone_number??""},_={street:o?.personal_address?.street??"",houseNumber:o?.personal_address?.house_number??"",addition:o?.personal_address?.house_number_addition??"",postalCode:o?.personal_address?.postal_code??"",city:o?.personal_address?.city??"",country:$(o?.personal_address?.country??"Nederland"),type:M.PERSONAL},k={street:o?.company_address?.street??"",houseNumber:o?.company_address?.house_number??"",addition:o?.company_address?.house_number_addition??"",postalCode:o?.company_address?.postal_code??"",city:o?.company_address?.city??"",country:$(o?.company_address?.country??"Nederland"),type:M.COMPANY},X=ce,H=async(a,{setSubmitting:h})=>{try{await ue({first_name:a.firstName,last_name:a.lastName,email:a.email.toLocaleLowerCase(),phone_number:a.phoneNumber}),await x(),m({title:t("common.user-update"),type:"success"})}catch(u){m({title:s.jsx(n,{dangerouslySetInnerHTML:{__html:B(String(u))}}),type:"error"})}finally{h(!1)}},T=async(a,{setSubmitting:h})=>
1{try{await f({street:a.street,house_number:a.houseNumber,house_number_addition:a.addition,city:a.city,postal_code:a.postalCode.toUpperCase().replace(/\s+/g,""),country:a.country},a.type),m({title:t("common.address-update"),type:"success"})}catch(u){m({title:String(u),type:"error"})}finally{h(!1)}};return s.jsxs(r,{w:"100%",h:"100%",flexDirection:"column",children:[s.jsxs(r,{gap:e(16),direction:"column",children:[s.jsx(n,{as:"h1",fontSize:e(48),lineHeight:e(52),fontWeight:"bold",color:i("text"),children:t("userPages.myDetails.title")})," ",s.jsx(n,{fontSize:e(18),lineHeight:e(22),color:i("text"),maxW:["100%","100%","100%","50%"],children:t("userPages.myDetails.description")})]}),s.jsx(r,{w:"100%",mt:e(32),mb:e(32),children:s.jsxs(_e,{variant:"plain",w:"inherit",defaultValue:j,onValueChange:a=>{const h=a.value;C(h)},children:[s.jsx(ae,{width:"fit-content",bgColor:"gray.100",borderRadius:"full",padding:e(4),children:s.jsxs(Ne,{children:[s.jsx(G,{fontWeight:"bold",fontSize:e(16),lineHeight:e(24),value:"personal","data-testid":"profile-personal-tab",children:t("userPages.myDetails.tabs.personal")}),o?.company_address&&s.jsx(G,{fontWeight:"bold",fontSize:e(16),lineHeight:e(24),value:"company","data-testid":"profile-company-tab",children:t("userPages.myDetails.tabs.company")}),s.jsx(Se,{bg:i("nav-pane-item-active-bg","input-label-background"),rounded:"full"})]})}),s.jsxs(ve,{w:"100%",mt:e(16),children:[s.jsx(Y,{value:"personal",p:0,children:j===F.PERSONAL&&s.jsxs(R,{mt:e(32),templateColumns:["repeat(1, 1fr)","repeat(1, 1fr)","repeat(2, 1fr)"],gap:e(16),columnGap:e(32),children:[s.jsxs(W,{children:[s.jsx(z,{initialValues:w,validationSchema:le(t),onSubmit:H,children:({handleChange:a,submitForm:h,touched:u,errors:l,values:c,isSubmitting:d,handleBlur:b})=>s.jsxs(r,{w:"100%",flexDirection:"column",children:[s.jsx(n,{fontSize:e(24),lineHeight:e(28),fontWeight:"bold",color:i("text"),children:t("userPages.myDetails.forms.personal.title")}),s.jsx(p,{mt:e(16),required:!0,name:"firstName",label:t("userPages.myDetails.forms.personal.firstName"),placeholder:t("userPages.myDetails.forms.personal.firstNamePlaceholder"),invalid:l.firstName,touched:u.firstName,handleChange:a,handleBlur:b,value:c.firstName}),s.jsx(p,{mt:e(16),required:!0,name:"lastName",label:t("userPages.myDetails.forms.personal.lastName"),placeholder:t("userPages.myDetails.forms.personal.lastNamePlaceholder"),invalid:l.lastName,touched:u.lastName,handleChange:a,handleBlur:b,value:c.lastName}),s.jsx(p,{mt:e(16),required:!0,name:"email",inputType:"email",label:t("userPages.myDetails.forms.personal.email"),placeholder:t("userPages.myDetails.forms.personal.emailPlaceholder"),invalid:l.email,touched:u.email,handleChange:a,handleBlur:b,value:c.email,mask:!0}),s.jsx(p,{mt:e(16),required:!0,name:"phoneNumber",inputType:"tel",label:t("userPages.myDetails.forms.personal.phoneNumber"),placeholder:t("userPages.myDetails.forms.personal.phoneNumberPlaceholder"),invalid:l.phoneNumber,touched:u.phoneNumber,handleChange:a,handleBlur:b,value:c.phoneNumber,mask:!0}),s.jsx(r,{flexDirection:"column",css:{my:e(32)},children:s.jsx(N,{maxW:e(104),variant:"solid",onClick:h,loading:d,disabled:d,rounded:"full",css:{height:e(56)},"data-testid":"profile-personal-details-submit-btn",children:s.jsx(n,{fontWeight:"bold",lineHeight:e(24),fontSize:e(16),as:"span",m:e(8),children:t("userPages.myDetails.forms.cta.update")})})})]})}),o?.personal_address&&s.jsx(z,{initialValues:_,validationSchema:L(t),onSubmit:T,children:({handleChange:a,submitForm:h,setFieldValue:u,touched:l,errors:c,values:d,isSubmitting:b,handleBlur:y})=>s.jsxs(r,{w:"100%",flexDirection:"column",children:[s.jsx(n,{fontSize:e(24),lineHeight:e(28),fontWeight:"bold",color:i("text"),children:t("userPages.myDetails.forms.company.addressTitle")}),s.jsx(p,{mt:e(16),required:!0,name:"street",label:t("userPages.myDetails.forms.company.street"),placeholder:t("userPages.myDetails.forms.company.streetPlaceholder"),invalid:c.street,touched:l.street,handleChange:a,handleBlur:y,value:d.street}),s.jsxs(r,{direction:["column","column","column","row"],gap:4,children:[s.jsx(r,{flex:1,children:s.jsx(p,{containerWidth:"full",mt:e(16),required:!0,name:"houseNumber",label:t("userPages.myDetails.forms.company.houseNumber"),placeholder:t("userPages.myDetails.forms.company.houseNumberPlaceholder"),invalid:c.houseNumber,touched:l.houseNumber,handleChange:a,handleBlur:y,value:d.houseNumber,inputType:"number"})}),s.jsx(r,{flex:1,w:"100%",children:s.jsx(p,{containerWidth:"full",mt:e(16),name:"addition",label:t("userPages.myDetails.forms.company.addition"),placeholder:t("userPages.myDetails.forms.company.additionPlaceholder"),invalid:c.addition,touched:l.addition,handleChange:a,handleBlur:y,value:d.addition})})]}),s.jsxs(r,{direction:["column","column","column","row"],gap:4,children:[s.jsx(r,{flex:1,children:s.jsx(p,{containerWidth:"full",mt:e(16),required:!0,name:"postalCode",label:t("userPages.myDetails.forms.company.postalCode"),placeholder:t("userPages.myDetails.forms.company.postalCodePlaceholder"),invalid:c.postalCode,touched:l.postalCode,handleChange:a,handleBlur:y,value:d.postalCode})}),s.jsx(r,{flex:3,w:"100%",children:s.jsx(p,{containerWidth:"full",mt:e(16),required:!0,name:"city",label:t("userPages.myDetails.forms.company.city"),placeholder:t("userPages.myDetails.forms.company.cityPlaceholder"),invalid:c.city,touched:l.city,handleChange:a,handleBlur:y,value:d.city})})]}),s.jsx(O,{mt:e(16),name:"country",required:!0,columns:12,label:t("userPages.myDetails.forms.company.country"),placeholder:t("userPages.myDetails.forms.company.countryPlaceholder"),onValueChange:I=>{u("country",I)},onBlur:y,value:d.country,invalid:c.country,touched:l.country,searchable:!0,clearable:!0,testId:"profile-personal-address-country-select"}),s.jsx(r,{mt:e(16),py:e(16),px:e(32),bg:i("disabled-background","background-card"),borderRadius:e(10),fontSize:e(16),lineHeight:e(28),color:i("text"),children:t("userPages.myDetails.forms.personal.addressChangeWarning")}),s.jsx(r,{flexDirection:"column",css:{my:e(32),pb:e(32)},children:s.jsx(N,{maxW:e(104),variant:"solid",onClick:h,loading:b,disabled:b,rounded:"full",css:{height:e(56)},"data-testid":"profile-personal-address-submit-btn",children:s.jsx(n,{fontWeight:"bold",lineHeight:e(24),fontSize:e(16),as:"span",m:e(8),children:t("userPages.myDetails.forms.cta.update")})})})]})})]}),!X&&o?.iban?.consumer&&s.jsxs(W,{children:[s.jsx(n,{fontSize:e(24),lineHeight:e(28),fontWeight:"bold",color:i("text"),children:t("userPages.myDetails.forms.payment.title")}),s.jsxs(r,{mt:e(16),direction:"column",border:`${e(1)} solid #00000033`,p:e(20),borderRadius:e(10),children:[s.jsx(n,{fontSize:e(17),lineHeight:e(24),color:i("text"),children:t("userPages.myDetails.forms.payment.details.billed")}),s.jsxs(n,{fontSize:e(17),lineHeight:e(24),color:i("text"),mt:e(25),children:[t("userPages.myDetails.forms.payment.details.currentAccount")," ",s.jsx("br",{}),`XXXX XXXX XXXX XX${v?.[0]??""}${v?.[1]??""} ${v?.[2]??""}${v?.[3]??""}`]})]}),s.jsx(r,{flexDirection:"column",css:{my:e(32),pb:e(32)},children:s.jsx(N,{maxW:e(104),variant:"solid",rounded:"full",css:{height:e(56)},"data-testid":"iban-change-btn",onClick:D.onOpen,children:s.jsx(n,{fontWeight:"bold",lineHeight:e(24),fontSize:e(16),as:"span",m:e(8),children:t("userPages.myDetails.forms.cta.change")})})}),s.jsx(K,{type:U.CONSUMER,title:t("userPages.myDetails.forms.payment.modal.title"),description:t("userPages.myDetails.forms.payment.modal.description"),open:D.open,onClose:D.onClose},"iban-change-modal-consumer")]})]})}),s.jsx(Y,{value:"company",p:0,children:j===F.COMPANY&&s.jsxs(R,{mt:e(32),templateColumns:["repeat(1, 1fr)","repeat(1, 1fr)","repeat(2, 1fr)"],gap:e(16),columnGap:e(32),children:[s.jsx(W,{children:o?.company_address&&s.jsx(z,{initialValues:k,validationSchema:L(t),onSubmit:T,children:({handleChange:a,submitForm:h,setFieldValue:u,touched:l,errors:c,values:d,isSubmitting:b,handleBlur:y})=>s.jsxs(r,{w:"100%",flexDirection:"column",children:[s.jsx(n,{fontSize:e(24),lineHeight:e(28),fontWeight:"bold",color:i("text"),children:t("userPages.myDetails.forms.company.title")}),o?.company_name&&s.jsx(J,{name:t("userPages.myDetails.forms.company.companyName"),label:o?.company_name,tooltip:t("userPages.myDetails.forms.company.companyInfo")}),o?.chamber_of_commerce_number&&s.jsx(J,{name:t("userPages.myDetails.forms.company.kvkNumber"),label:o?.chamber_of_commerce_number,tooltip:t("userPages.myDetails.forms.company.kvkInfo")}),s.jsx(p,{mt:e(16),required:!0,name:"street",label:t("userPages.myDetails.forms.company.street"),placeholder:t("userPages.myDetails.forms.company.streetPlaceholder"),invalid:c.street,touched:l.street,handleChange:a,handleBlur:y,value:d.street}),s.jsxs(r,{direction:["column","column","column","row"],gap:4,children:[s.jsx(r,{flex:1,children:s.jsx(p,{containerWidth:"full",mt:e(16),required:!0,name:"houseNumber",label:t("userPages.myDetails.forms.company.houseNumber"),placeholder:t("userPages.myDetails.forms.company.houseNumberPlaceholder"),invalid:c.houseNumber,touched:l.houseNumber,handleChange:a,handleBlur:y,value:d.houseNumber,inputType:"number"})}),s.jsx(r,{flex:1,w:"100%",children:s.jsx(p,{containerWidth:"full",mt:e(16),name:"addition",label:t("userPages.myDetails.forms.company.addition"),placeholder:t("userPages.myDetails.forms.company.additionPlaceholder"),invalid:c.addition,touched:l.addition,handleChange:a,handleBlur:y,value:d.addition})})]}),s.jsxs(r,{direction:["column","column","column","row"],gap:4,children:[s.jsx(r,{flex:1,children:s.jsx(p,{containerWidth:"full",mt:e(16),required:!0,name:"postalCode",label:t("userPages.myDetails.forms.company.postalCode"),placeholder:t("userPages.myDetails.forms.company.postalCodePlaceholder"),invalid:c.postalCode,touched:l.postalCode,handleChange:a,handleBlur:y,value:d.postalCode})}),s.jsx(r,{flex:3,w:"100%",children:s.jsx(p,{containerWidth:"full",mt:e(16),required:!0,name:"city",label:t("userPages.myDetails.forms.company.city"),placeholder:t("userPages.myDetails.forms.company.cityPlaceholder"),invalid:c.city,touched:l.city,handleChange:a,handleBlur:y,value:d.city})})]}),s.jsx(O,{mt:e(16),name:"country",required:!0,columns:12,label:t("userPages.myDetails.forms.company.country"),placeholder:t("userPages.myDetails.forms.company.countryPlaceholder"),onValueChange:I=>{u("country",I)},onBlur:y,value:d.country,invalid:c.country,touched:l.country,searchable:!0,clearable:!0,testId:"profile-company-address-country-select"}),s.jsx(r,{flexDirection:"column",css:{my:e(32),pb:e(o?.personal_address?0:32)},children:s.jsx(N,{maxW:e(104),variant:"solid",onClick:h,loading:b,disabled:b,rounded:"full",css:{height:e(56)},"data-testid":"profile-company-address-submit-btn",children:s.jsx(n,{fontWeight:"bold",lineHeight:e(24),fontSize:e(16),as:"span",m:e(8),children:t("userPages.myDetails.forms.cta.update")})})})]})})}),!X&&o?.iban?.freelancer&&s.jsxs(W,{children:[s.jsx(n,{fontSize:e(24),lineHeight:e(28),fontWeight:"bold",color:i("text"),children:t("userPages.myDetails.forms.payment.title")}),s.jsxs(r,{mt:e(16),direction:"column",border:`${e(1)} solid #00000033`,p:e(20),borderRadius:e(10),children:[s.jsx(n,{fontSize:e(17),lineHeight:e(24),color:i("text"),children:t("userPages.myDetails.forms.payment.details.billed")}),s.jsxs(n,{fontSize:e(17),lineHeight:e(24),color:i("text"),mt:e(25),children:[t("userPages.myDetails.forms.payment.details.currentAccount")," ",s.jsx("br",{}),`XXXX XXXX XXXX XX${S?.[0]??""}${S?.[1]??""} ${S?.[2]??""}${S?.[3]??""}`]})]}),s.jsx(r,{flexDirection:"column",css:{my:e(32),pb:e(32)},children:s.jsx(N,{maxW:e(104),variant:"solid",rounded:"full",css:{height:e(56)},"data-testid":"iban-change-btn",onClick:g.onOpen,children:s.jsx(n,{fontWeight:"bold",lineHeight:e(24),fontSize:e(16),as:"span",m:e(8),children:t("userPages.myDetails.forms.cta.change")})})}),s.jsx(K,{type:U.FREELANCER,title:t("userPages.myDetails.forms.payment.modal.title"),description:t("userPages.myDetails.forms.payment.modal.description"),open:g.open,onClose:g.onClose},"iban-change-modal-freelancer")]})]})})]})]})})]})},Ze=()=>{const{t,i18n:m}=E(),{setTitle:i}=pe();return V.useEffect(()=>{i(t("pageTitles.userDetails"))},[m.language]),s.jsx(r,{w:"100%",h:"100%",children:s.jsx(oe,{showCart:!1,showSteps:!1,showHeaderNav:!0,showLeftNav:!0,children:s.jsx(Ce,{})})})};export{Ze as default};

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.