PageSourceSearch

https://www.gaia.com/assets/2.266.7/index.CfcWAerE.js

js gaia.com collected 2026-09-24 08:39:08 UTC 17,442 bytes, 2 lines download raw bytes

1import{r as e,R as a,an as t,i as n,c as l,_ as r,d as c,a as o,n as s,aM as i,eB as m,eC as d,eD as u,bg as p,P as _}from"./index.Dcq7Tn10.js";import{dF as f,ee as g,dH as E,a9 as v,bi as h,aa as b,B as N,T as I,c as y,d as w,g as P,s as x,am as C,o as S,aJ as M,aK as T,aq as V,aQ as R,S as D,aY as L,b4 as O,eR as U,bp as A,aR as j,ek as k,U as q,eS as F}from"./main.BpO2XlP_.js";import{_ as Y}from"./debounce.CGswiwgw.js";import{c as $,P as G}from"./connect.B8_DVB94.js";import{V as H,A as B}from"./index.CdPY0Ljz.js";import{S as K}from"./index.BYz0Ryw7.js";import{C as z,a as J,S as Q}from"./Card.hVlQfx-s.js";import"./staticTextEn.UPMVf61n.js";import"./staticTextEs.DJF2PufX.js";import"./staticTextDe.DGaNPAXM.js";import"./staticTextFr.CRVsglAw.js";function W(n){const{staticText:l}=n,[r,c]=e.useState(""),[o,s]=e.useState(""),[i,m]=e.useState("");return a.createElement("div",{className:"account-profile__form--change-password"},a.createElement(f,{name:"password",label:l.getIn(["data","currentPassword"]),formPasswordLabelClassName:["account-profile__form-label__edit","edit-label"],maxLength:g,validations:{minLength:1},required:!0,value:r,onChange:e=>c(e)}),a.createElement("br",null),a.createElement(f,{name:"newPassword",label:l.getIn(["data","newPassword"]),formPasswordLabelClassName:["account-profile__form-label__edit","edit-label"],maxLength:g,validations:t(E()),validationErrors:{minLength:l.getIn(["data","passwordMinLengthMessage"]),matchRegexp:l.getIn(["data","passwordRegexMessage"]),maxLength:l.getIn(["data","passwordMaxLengthMessage"])},required:!0,hasValidation:!0,value:o,onChange:e=>s(e),showStrength:!0}),a.createElement("br",null),a.createElement(f,{name:"passwordConfirm",label:l.getIn(["data","confirmNewPassword"]),formPasswordLabelClassName:["account-profile__form-label__edit","edit-label"],maxLength:g,validations:t({equalsField:"newPassword"},E()),validationErrors:{equalsField:l.getIn(["data","noMatch"])},required:!0,hasValidation:!0,value:i,onChange:e=>m(e)}))}const X=n(Object.freeze(Object.defineProperty({__proto__:null,default:function(t){const{staticText:n,onSubmit:l,auth:r}=t,c=r.get("processing"),o=r.get("processingRenew"),s=r.get("success"),i=r.get("userAccountAuthenticationGroupId"),[m,d]=e.useState(i),u=c&&o,p=!c&&!o&&!s&&i===m;return!c&&!o&&s&&i!==m?a.createElement("div",{className:"account-security__success"},a.createElement(v,{className:"account-security__success-icon",type:b.CHECK,style:h.TEAL_CIRCLE}),a.createElement("p",null,n.getIn(["data","accountSecurityConfirmation"]))):a.createElement(a.Fragment,null,a.createElement("p",null,n.getIn(["data","accountSecurityDescription"])),p?a.createElement("p",{className:"account-security__error"},n.getIn(["data","accountSecurityError"])):null,a.createElement(N,{disabled:u,type:I.PRIMARY,className:"account-security__button",onClick:()=>{d(i),l()}},u?n.getIn(["data","accountSecurityProcessing"]):n.getIn(["data","accountSecurityButton"])))}},Symbol.toStringTag,{value:"Module"})));function Z(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}var ee;const ae=c(),te=!!(null==ae||null===(ee=ae.features)||void 0===ee?void 0:ee.communityProfile);function ne(e){const a={};return e&&(a.backgroundImage=`url(${e})`),a}function le(e,a,t){const{auth:n,updateUser:l}=a;l({auth:n,password:{current:e.password,updated:e.newPassword}}),t()}const re={formValid:!1};let ce=class extends e.Component{componentDidMount(){const{auth:e,setOverlayDialogVisible:a,setDialogOptions:t,setOverlayCloseOnClick:n}=this.props;!!e.get("jwt")||(a(C),t(null,!0),n(!1))}componentDidUpdate(e){const{user:a}=this.props,{user:t}=e;a.getIn(["updateUser","success"])!==t.getIn(["updateUser","success"])&&this.setState(()=>re)}componentWillUnmount(){const{clearUserProfileData:e}=this.props;e()}render(){const{auth:e,location:t,staticText:n,user:l,userProfiles:c}=this.props,i=l.get("data"),m=c.get("data"),d=r(ae,["features","accountSecurity"]);return a.createElement(a.Fragment,null,a.createElement("div",{className:"my-account__grid"},a.createElement(H,{location:t,navType:B}),a.createElement("div",{className:"my-account my-account__content-box"},a.createElement("div",{className:"account-profile__title"}
1,a.createElement(S,null,n.getIn(["data","title"]))),i&&m?a.createElement(z,{editable:!0,editControl:J.UPDATE},(e,a)=>{const t=function(e,a){if(!o.List.isList(e)||!o.Map.isMap(a))return o.Map();const t=a.get("uid"),n=e.find(e=>o.Map.isMap(e)&&s(e.get("uid"))===t);return o.Map.isMap(n)?n:o.Map()}(m,i);return e===Q.EDITING?this.renderProfileEditMode(t,a):this.renderProfileViewMode(t)}):a.createElement(M,{type:T}),a.createElement("div",{className:"account-profile__title"},a.createElement(S,null,n.getIn(["data","password"]))),a.createElement(z,{editable:!0,editControl:J.CHANGE},(e,a)=>e===Q.EDITING?this.renderPasswordEditMode(a):this.renderPasswordViewMode()),a.createElement("div",{className:"account-profile__title"},a.createElement(S,null,n.getIn(["data","community"]))),a.createElement("div",{className:"account-profile no-shadow"},this.renderReferral()),d&&a.createElement("div",{className:"account-profile__account-security-container"},a.createElement("div",{className:"account-profile__title"},a.createElement(S,null,n.getIn(["data","accountSecurityTitle"]))),a.createElement(z,null,a.createElement(X,{auth:e,staticText:n,onSubmit:this.onClickAccountSecurity}))))),a.createElement("div",{className:"account-profile__support-container"},a.createElement(K,null)))}constructor(e){super(e),Z(this,"onValidSubmit",(e,a,t)=>{const{state:n}=this,{auth:l,updateUser:r}=a;let c=null;const{email:o}=n,{username:s}=n,{bio:i}=n,{location:m}=n,{day:d}=n,{month:u}=n,{year:p}=n,{firstName:_}=n,{lastName:f}=n;d&&u&&p&&(c=new Date(`${p}-${u}-${d}`)),r({auth:l,email:o,username:s,bio:i,location:m,birthday:c,firstName:_,lastName:f}),t()}),Z(this,"onChangeForm",e=>{this.setState(()=>({email:e.email,username:e.userName,firstName:e.firstName,lastName:e.lastName,bio:e.bio,location:e.location,day:void 0!==e.day?e.day:"",month:void 0!==e.month?e.month:"",year:void 0!==e.year?e.year:""}))}),Z(this,"onClickAccountSecurity",()=>{const{auth:e,doAuthRenew:a}=this.props;a(e,!0)}),Z(this,"setFormValid",e=>e?(this.setState(()=>({formValid:!0})),!0):(this.setState(()=>({formValid:!1})),!1)),Z(this,"renderPasswordEditMode",e=>{const{props:t,state:n}=this,{staticText:l}=t,{formValid:r}=n,c=Y(this.setFormValid,100);return a.createElement("div",{className:"account-profile__profile-container edit"},a.createElement(V,null,l.getIn(["data","changePassword"])),a.createElement(R,{className:"account-profile__form",onValidSubmit:D(le,D.placeholder,this.props,e),onValid:D(c,!0),onInvalid:D(c,!1)},a.createElement(W,{staticText:l}),a.createElement("div",{className:"account-profile__buttons"},a.createElement(N,{type:I.PRIMARY,submit:!0,disabled:!r,className:"account-profile__form-button"},l.getIn(["data","save"])),a.createElement(N,{type:I.GHOST,onClick:e,className:"account-profile__form-button account-profile__form-button--cancel"},l.getIn(["data","cancel"])))))}),Z(this,"renderPasswordViewMode",()=>{const{props:e}=this,{staticText:t}=e;return a.createElement("div",{className:"account-profile__profile-container"},a.createElement("div",{className:"account-profile__form-container"},a.createElement(V,null,t.getIn(["data","changePassword"])),t.getIn(["data","changeYourPassword"])))}),Z(this,"renderProfileEditMode",(e,t)=>{const{staticText:n,setOverlayDialogVisible:l,user:r,currentUserPicture:c}=this.props,{formValid:o}=this.state,s=te&&c?c.card:r.getIn(["data","profile","picture","hdtv_190x266"]),p=r.get("updateUserProcessing"),_=r.getIn(["data","mail"],""),f=r.getIn(["data","name"],""),g=r.getIn(["data","email"],""),E=r.getIn(["data","username"],"")||f,v=g||_,h=r.getIn(["data","profile","bio"],""),b=e.get("first_name",""),y=e.get("last_name",""),w=r.getIn(["data","profile","location"],""),P=Y(this.onChangeForm,100),x=Y(this.setFormValid,100),C=r.getIn(["updateUser","statusCode"]),S=e.get("birthday",""),T=(S?i(S,null,"D/M/YYYY"):"").split("/"),q=T[1]||void 0,$=T[2]||void 0,G=T[0]||void 0;return a.createElement("div",{className:"account-profile__profile-container edit"},a.createElement("div",{className:"account-profile__avatar-container"},a.createElement("div",{className:"account-profile__avatar-outline"},a.createElement(V,null,n.getIn(["data","profilePhoto"])),a.createElement("div",{className:"account-profile__avatar-placement"},a.createElement("div",{className:"account-profile__avatar-cell"},a.createElement("div",{className:"account-profile__avatar",style:ne(s)})),a.createElement("div",{className:"account-profile__avatar-btn-cell"},a.createElement(N,{type:I.SECONDARY,onClick:e=>((e,a)=>{e.preventDefault(),a(F)})(e,l),className:"account-profile__upload-avatar"},n.getIn(["data","upload"])))))),a.createElement("div",{className:"account-profile__sep"}),a.createElement("div",{className:"account-profile__form-container"},p?a.createElement("div",{className:"account-profile__processing"},a.createElement(M,{className:["account-profile__sherpa"],type:L}),a.createElement("div",{className:"account-profile__processing-text"},`${n.getIn(["data","saving"])}...`)):null,C>299?a.createElement("div",{className:"account-profile__error"},n.getIn(["data","genericError"])):null,a.createElement(R,{className:"account-profile__form",onValidSubmit:D(this.onValidSubmit,D.placeholder,this.props,t),onValid:D(x,!0),onInvalid:D(x,!1),onChange:D(P)},a.createElement("div",{className:"account-profile__label-container"},a.createElement(V,null,n.getIn(["data","personalInformation"]))),a.createElement("div",{className:"account-profile__input-container"},a.createElement(O,{name:"userName",label:n.getIn(["data","userName"]),labelClassName:["account-profile__form-label__edit","edit-label"],value:E,required:!0,validations:{matchRegexp:U},validationErrors:{matchRegexp:n.getIn(["data","usernameValidError"])}})),a.createElement("div",{className:"account-profile__input-container"},a.createElement(O,{name:"firstName",label:n.getIn(["data","firstName"]),labelClassName:["account-profile__form-label__edit","edit-label"],value:b,required:!0,validations:{maxLength:255},validationErrors:{matchRegexp:n.getIn(["data","usernameValidError"])}})),a.createElement("div",{className:"account-profile__input-container"},a.createElement(O,{name:"lastName",label:n.getIn(["data","lastName"]),labelClassName:["account-profile__form-label__edit","edit-label"],value:y,validations:{maxLength:255},validationErrors:{matchRegexp:n.getIn(["data","usernameValidError"])}})),a.createElement("div",{className:"account-profile__input-container"},a.createElement(A,{name:"email",label:n.getIn(["data","email"]),labelClassName:["account-profile__form-label__edit","edit-label"],value:v,required:!0,validations:{isEmail
1:!0},validationErrors:{isEmail:n.getIn(["data","emailValidError"])}})),a.createElement("div",{className:"account-profile__form account-profile__hidden"},a.createElement("div",{className:"account-profile__input-container"},a.createElement(O,{name:"location",label:n.getIn(["data","location"]),labelClassName:["account-profile__form-label","edit-label"],value:w,validations:{maxLength:255},validationErrors:{maxLength:n.getIn(["data","locationMaxLength"])}})),a.createElement("div",{className:"account-profile__sep"}),a.createElement("div",{className:"account-profile__label-container"},a.createElement(V,null,n.getIn(["data","birthday"]))),a.createElement("div",{className:"form-input account-profile__form-birthday"},a.createElement("div",{className:"account-profile__form-birthday-select-month"},a.createElement(j,{name:"month",label:n.getIn(["data","month"]),value:q,placeholder:n.getIn(["data","selectMonth"])},m.map((e,t)=>a.createElement("option",{value:e.value,key:`birthday-month-${t}`},e.label)))),a.createElement("div",{className:"account-profile__form-birthday-select-day"},a.createElement(j,{name:"day",label:n.getIn(["data","day"]),value:G,placeholder:n.getIn(["data","selectDay"])},d.map((e,t)=>a.createElement("option",{value:e.value,key:`birthday-day-${t}`},e.label)))),a.createElement("div",{className:"account-profile__form-birthday-select-year"},a.createElement(j,{name:"year",label:n.getIn(["data","year"]),value:$,placeholder:n.getIn(["data","selectYear"])},u.map((e,t)=>a.createElement("option",{value:e.value,key:`birthday-day-${t}`},e.label))))),a.createElement("div",{className:"account-profile__sep"}),a.createElement("div",{className:"account-profile__label-container"},a.createElement(V,null,n.getIn(["data","additionalInformation"]))),a.createElement(k,{name:"bio",className:"account-profile__form-text-area",label:n.getIn(["data","bio"]),labelClassName:["account-profile__form-label","edit-label"],value:h,validations:{maxLength:255},validationErrors:{maxLength:n.getIn(["data","bioMaxLength"])}})),a.createElement("div",{className:"account-profile__sep"}),a.createElement("div",{className:"account-profile__buttons"},a.createElement(N,{type:I.PRIMARY,submit:!0,disabled:!o,className:"account-profile__form-button"},n.getIn(["data","save"])),a.createElement(N,{type:I.GHOST,onClick:t,className:"account-profile__form-button account-profile__form-button--cancel"},n.getIn(["data","cancel"]))))))}),Z(this,"renderProfileViewMode",e=>{const{staticText:t,user:n,currentUserPicture:l}=this.props,r=te&&l?l.card:n.getIn(["data","profile","picture","hdtv_190x266"]),c=n.get("updateUserProcessing"),o=n.getIn(["data","mail"],""),s=n.getIn(["data","uid"]),m=n.getIn(["data","name"],""),d=n.getIn(["data","email"],"")||o,u=n.getIn(["data","username"],"")||m,p=n.getIn(["data","profile","bio"],""),_=e.get("birthday",""),f=_?i(_):"",g=`${e.get("first_name","")||""} ${e.get("last_name","")||""}`.trim()||m,E=n.getIn(["data","profile","location"],""),v=n.getIn(["updateUser","statusCode"]);return a.createElement("div",{className:"account-profile__profile-container"},a.createElement("div",{className:"account-profile__avatar-container"},a.createElement("div",{className:"account-profile__avatar-outline"},a.createElement("div",{className:"account-profile__avatar",style:ne(r)}))),a.createElement("div",{className:"account-profile__form-container"},c?a.createElement("div",{className:"account-profile__processing"},a.createElement(M,{className:["account-profile__sherpa"],type:L}),a.createElement("div",{className:"account-profile__processing-text"},`${t.getIn(["data","saving"])}...`)):null,v>299?a.createElement("div",{className:"account-profile__error"},t.getIn(["data","genericError"])):null,a.createElement("div",{className:"account-profile__user-container"},a.createElement("div",{className:"account-profile__form-bio"},a.createElement(V,null,t.getIn(["data","userId"])),a.createElement("span",{className:"account-profile__view-info"},s)),a.createElement("div",{className:"account-profile__form-bio"},a.createElement(V,null,t.getIn(["data","userName"])),a.createElement("span",{className:"account-profile__view-info"},u))),a.createElement("div",{className:"account-profile__user-container"},a.createElement("div",{className:"account-profile__form-bio"},a.createElement(V,null,t.getIn(["data","name"])),a.createElement("span",{className:"account-profile__view-info"},g)),a.createElement("div",{className:"account-profile__form-bio"},a.createElement(V,null,t.getIn(["data","email"])),a.createElement("span",{className:"account-profile__view-info"},d)),a.createElement("div",{className:"account-profile__form-bio account-profile__hidden"},a.createElement(V,null,t.getIn(["data","location"])),a.createElement("span",{className:"account-profile__view-info"},E)),a.createElement("div",{className:"account-profile__form-bio account-profile__hidden"},a.createElement(V,null,t.getIn(["data","birthday"])),a.createElement("span",{className:"account-profile__view-info"},f))),a.createElement("div",{className:"account-profile__form-bio account-profile__hidden"},a.createElement(V,null,t.getIn(["data","bio"])),a.createElement("span",{className:"account-profile__view-info"},p))))}),Z(this,"renderReferral",()=>{const{props:e}=this,{staticText:t}=e;return a.createElement("div",{className:"account-profile__referral-container"},a.createElement("div",{className:"account-profile__form-container"},a.createElement(V,null,t.getIn(["data","inviteAFriend"])),a.createElement("p",null,t.getIn(["data","sendALink"])),a.createElement("div",{className:"account-profile__refer-btn-container"},a.createElement(N,{type:I.GHOST,url:p,className:"account-profile__refer-button",scrollToTop:!0},t.getIn(["data","invite"])),a.createElement("div",{className:"account-profile__icon-right"}))))}),this.state=t({},re)}};
1ce.propTypes={auth:q.map.isRequired,user:q.map.isRequired,setOverlayDialogVisible:_.func.isRequired,updateUser:_.func.isRequired,clearUserProfileData:_.func.isRequired};const oe=y($({seoType:G}),w({storeKey:"myAccountProfilePage"}),l(e=>({currentUserPicture:x(e),user:e.user,auth:e.auth,userProfiles:e.userProfiles,page:e.page}),e=>{const a=P(e);return{setOverlayDialogVisible:a.dialog.setOverlayDialogVisible,clearUserProfileData:a.user.clearUserProfileData,updateUser:a.user.updateUser,setDialogOptions:a.dialog.setDialogOptions,setOverlayCloseOnClick:a.dialog.setOverlayCloseOnClick,doAuthRenew:a.auth.doAuthRenew}}))(ce),se=n(Object.freeze(Object.defineProperty({__proto__:null,default:oe},Symbol.toStringTag,{value:"Module"})));export{se as default};
2//# sourceMappingURL=index.CfcWAerE.js.map

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.