Build 545032stable
Module 515054
1,812 characters · in 19d8bf26cd2f0320.js, 9b93149ea2bd68d2.jsDependencies
Source Raw
function(e,t,n){n.d(t,{A:()=>T,K:()=>j});var i=n(627968),l=n(64700),s=n(503698),a=n.n(s),r=n(364522),c=n(761508),o=n(707554),u=n(140735),d=n(207803),m=n(183555),g=n(61881),f=n(790417),x=n(113763),I=n(583246),p=n(941127),A=n(483189),h=n(518477),E=n(464229);function j(e){let{children:t,className:n,scrollerRef:l,...s}=e;return(0,i.jsx)(r.Ip,{ref:l,className:a()(E.gN,n),fade:!0,...s,children:t})}function N(e){let{user:t,currentUser:n,section:l,displayProfile:s,guildId:a,channelId:r,onClose:c}=e;return l===h.RP.ACTIVITY?(0,i.jsx)(f.A,{user:t,currentUser:n,displayProfile:s,guildId:a,channelId:r,onClose:c}):l===h.RP.MUTUAL_FRIENDS?(0,i.jsx)(x.A,{user:t,guildId:a,channelId:r,onClose:c}):l===h.RP.MUTUAL_GUILDS?(0,i.jsx)(I.A,{user:t,onClose:c}):l===h.RP.WIDGETS?(0,i.jsx)(p.A,{user:t,guildId:a,channelId:r}):l===h.RP.WISHLIST?(0,i.jsx)(A.A,{profileOwner:t}):null}function T(e){let{user:t,currentUser:n,displayProfile:s,guildId:a,channelId:f,items:x,initialSection:I,onClose:p}=e,{trackUserProfileAction:A}=(0,m.NJ)(),[{section:j,text:T},v]=l.useState(x.find(e=>{let{section:t}=e;return t===I})??x[0]);return(0,i.jsxs)("div",{className:E.kL,children:[(0,i.jsx)(r.Ip,{orientation:"horizontal",className:E.gU,fade:!0,paddingFix:!1,children:(0,i.jsx)(c.V,{type:"top",look:"custom",selectedItem:j,onItemSelect:e=>{g.A.hasUnsavedChanges()&&j===h.RP.WIDGETS?(0,d.VQ)():(A({action:"PRESS_SECTION",section:e}),v(t=>x.find(t=>t.section===e)??t))},children:x.map(e=>(0,i.jsx)(c.V.Item,{className:E.YU,id:e.section,"aria-label":e.text,children:e.text},e.section))})}),(0,i.jsx)(c.V.Panel,{id:j,"aria-label":T,className:E.NM,children:(0,i.jsx)(o.F,{component:(0,i.jsx)(u.A,{children:(0,i.jsx)(o.H,{children:T})}),children:(0,i.jsx)(N,{user:t,currentUser:n,displayProfile:s,guildId:a,channelId:f,section:j,onClose:p})})})]})}}