Build 533169stable
Module 338318
2,257 characters · in 33645dc6ae61c139.jsDependencies
Source Raw
function(e,t,n){n.d(t,{A:()=>U});var i=n(627968),s=n(64700),l=n(284009),r=n.n(l),a=n(311907),o=n(230109),d=n(397927),c=n(73153),u=n(631670),m=n(974544),g=n(793574),_=n(688810),x=n(512213),h=n(429619),A=n(451909),p=n(202639),T=n(400669),f=n(407217),S=n(919395),E=n(884546),b=n(287070),C=n(196291),v=n(101058),N=n(836602),I=n(814390),j=n(909536),y=n(351906),O=n(287809),R=n(954571),L=n(927578),P=n(890668),D=n(780207),G=n(652215),M=n(985018),k=n(482549);function U(){let e=(0,a.bG)([O.default],()=>{let e=O.default.getCurrentUser();return r()(null!=e,"UserSettingsProfileCustomization: user cannot be undefined"),e}),t=(0,a.bG)([y.A],()=>y.A.hidePersonalInformation),{pendingBio:n,pendingAvatar:l,pendingNameplate:U,showNotice:w,...V}=(0,a.cf)([N.A],()=>({...N.A.getPendingChanges(),showNotice:N.A.showNotice()})),B=(0,v.V7)({userId:e.id,image:l}),F=(0,S.lw)({pendingValue:U,userValue:e?.collectibles?.nameplate}),H=(0,I.A)()&&null!=n?A.Ay.parse(void 0,n).content:n,z=L.Ay.canUsePremiumProfileCustomization(e),Y=(0,j.St)("edit-profile-upsell"),{analyticsLocations:X}=(0,_.Ay)(g.A.USER_SETTINGS_USER_PROFILE);s.useEffect(()=>()=>c.h.wait(u.IM),[]);let[K,W]=s.useState(!1),Z=!z,q=s.useRef(null);return t?(0,i.jsx)(m.A,{}):(0,i.jsxs)(_.f5,{value:X,children:[(0,i.jsx)(h.A,{}),(0,i.jsx)(E.A,{profilePreview:(0,i.jsx)(b.A,{user:e,canUsePremiumCustomization:z,onUpsellClick:D.A,pendingBio:H,...V,pendingAvatar:B}),nameplatePreview:(0,i.jsx)(x.A,{user:e,nameplate:F,...V,className:null==F?k.tJ:void 0,isHighlighted:!0}),children:(0,i.jsx)(P.A,{})}),(0,i.jsx)(o.L,{innerRef:q,onChange:e=>W(e),threshold:.25,active:Z,children:(0,i.jsx)("div",{ref:q,children:(0,i.jsx)(C.A,{user:e,shouldShow:Z,isVisible:K})})}),Z&&!w&&(0,i.jsx)(p.d,{className:k.EL,showUpsell:!K,text:M.intl.format(M.t.TmfgI2,{onClick:()=>(0,f.K)({})}),textVariant:"heading-md/medium",useUpdatedStyling:!0,leadingAction:Y?(0,i.jsx)(T.l,{size:"md",location:g.A.PREMIUM_WISHLIST_EDIT_PROFILE_UPSELL}):void 0,button:(0,i.jsx)("div",{className:k.Xl,children:(0,i.jsx)(d.Button,{variant:"overlay-primary",onClick:()=>{R.default.track(G.HAw.TRY_IT_OUT_PRESET_CLICKED,{cta_variant:"floating_action_button"}),q?.current?.scrollIntoView({behavior:"smooth"})},text:M.intl.string(M.t.uw9zI7),icon:d.tvc})})})]})}}