Build 545032stable
Module 68085
8,776 characters · in 2eb7b4a52b31a40f.jsDependencies
Lazily required by (0)none
Requires (45)
Lazily requires (1)
Source Raw
function(e,t,n){n.d(t,{A:()=>eo});var i=n(627968),l=n(64700),r=n(503698),a=n.n(r),s=n(990078),o=n(349288),d=n(464792),u=n(793574),c=n(688810);let m=(0,n(945810).mj)({name:"2026-04-badge-discovery",kind:"user",defaultConfig:{enabled:!1},variations:{0:{enabled:!1},1:{enabled:!0}}});var p=n(192308);let g=function(){let{initialBadgeId:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,p.openModalLazy)(async()=>{let{default:t}=await Promise.all([n.e("13445"),n.e("9778")]).then(n.bind(n,890473));return n=>(0,i.jsx)(t,{...n,initialBadgeId:e})},{stackingBehavior:"stack"})};var h=n(859040),E=n(459192);function f(e){let{targetElementRef:t,delay:n,forceOpen:l,badgeDescription:r,children:a}=e;return(0,i.jsx)(E.u,{targetElementRef:t,delay:n,forceOpen:l,asset:{type:"image",src:"https://cdn.discordapp.com/assets/content/c41152a51207aef6b145fd309053f9fa5d5bd5fab7208289710c70d61a47d2f4.svg"},title:"Last Meadow Online",body:r,children:a})}var _=n(116833),x=n(704640),R=n(425713),v=n(716574),b=n(642481),j=n(720879),y=n(788868),A=n(49999),C=n(518477),I=n(375708);let O=e=>{let{badgeId:t=y.Ac.PREMIUM_TENURE_1_MONTH,markAsDismissed:n,children:r,targetElementRef:a,progressCircleText:s,progressCirclePercent:o,progressCircleUrgency:d,onShow:u}=e,c=y.VD[t].nameUnformattedNitro,m=I.intl.string(c).toLocaleUpperCase(),p=y.VD[t].rarity,g=(0,x.A)(t),h=(0,R.I)(t).standard;(0,l.useEffect)(()=>{_.m[_.DynamicGraphicComponent.BADGE_IMAGE_WITH_PROGRESS_CIRCLE](),new Image().src=h},[h]);let E=(0,l.useCallback)(()=>{n?.(A.i.USER_DISMISS)},[n]);if("mini-tooltip"===e.mode)return(0,i.jsx)(v.A,{targetElementRef:a,onShow:u,title:m,body:e.body,variant:"nitro",rarity:p,graphic:{type:"dynamic",component:_.DynamicGraphicComponent.BADGE_IMAGE_WITH_PROGRESS_CIRCLE,aspectRatio:"16/9",props:{src:h,alt:m,progressCircleText:s,progressCirclePercent:o,progressCircleUrgency:d,compact:!0}},children:r});let f={gradientColor:g,size:"lg",graphic:{type:"dynamic",component:_.DynamicGraphicComponent.BADGE_IMAGE_WITH_PROGRESS_CIRCLE,aspectRatio:"6/4",props:{src:h,alt:m,progressCircleText:s,progressCirclePercent:o,progressCircleUrgency:d}},title:m,body:e.body,actions:e.actions};return"tooltip"===e.mode?(0,i.jsx)(j.A,{targetElementRef:a,estimatedTooltipHeight:e.estimatedTooltipHeight??300,delay:C.In,onShow:u,...f,children:r}):(0,i.jsxs)(i.Fragment,{children:[r,(0,i.jsx)(b.A,{targetElementRef:a,shouldShow:!0,onRequestClose:E,align:"right",position:"top",caretConfig:{align:"center"},...f})]})};var T=n(534514),S=n(834730),N=n(775549);let D=e=>{let{assetComponent:t,tooltipWordmarkComponent:n,children:l}=e;return(0,i.jsxs)("div",{className:N.R,children:[t,(0,i.jsx)("div",{className:N.A,children:n}),l]})};var U=n(224016),k=n(74824);let L=e=>{let{profileBadge:t,tenureBadge:n}=e,l=(0,R.I)(n.id).standard;return(0,i.jsxs)(D,{assetComponent:(0,i.jsx)("img",{src:l,alt:""}),tooltipWordmarkComponent:(0,i.jsx)(U.A,{width:56,className:k.R}),children:[(0,i.jsx)(T.D,{variant:"heading-xl/extrabold",children:I.intl.string(n.nameUnformatted)}),(0,i.jsx)(S.E,{variant:"text-xs/normal",color:"text-muted",className:k.K,children:t.description})]})};var B=n(30084),P=n(507107),M=n(590202),$=n(976860),G=n(305003),w=n(312640),H=n(798618),V=n(752079),F=n(414690);function q(e){let{children:t,targetElementRef:n,delay:r,showSubtext:a,forceOpen:s}=e,[o,d]=l.useState(!1),u=l.useRef(null),c=l.useCallback(()=>{null!=u.current&&(clearTimeout(u.current),u.current=null)},[]);l.useEffect(()=>c,[c]);let m=l.useCallback(()=>{c(),u.current=window.setTimeout(()=>{u.current=null,d(!0)},r)},[r,c]);l.useEffect(()=>{s&&!o&&m()},[s,o,m]);let p=l.useCallback(()=>{m()},[m]),g=l.useCallback(()=>{c(),d(!1)},[c]);return(0,i.jsxs)("div",{onMouseEnter:p,onMouseLeave:g,children:[t,(0,i.jsxs)(w.x,{targetElementRef:n,shouldShow:!!(o||s),position:"top",caretConfig:{align:"center"},children:[(0,i.jsx)(K,{showSubtext:a}),(0,i.jsx)(H.F,{})]})]})}function K(e){let{showSubtext:t=!1}=e;return(0,i.jsxs)(D,{assetComponent:(0,i.jsx)(V.A,{className:F.jc}),tooltipWordmarkComponent:(0,i.jsx)(T.D,{variant:"heading-md/extrabold",className:F.RK,children:I.intl.string(I.t.ElYQFS)}),children:[(0,i.jsx)(T.D,{variant:"heading-xl/extrabold",className:t?void 0:F.Qn,children:I.intl.string(I.t.lTHkqd)}),t?(0,i.jsx)(S.E,{variant:"text-xs/normal",className:F.lV,children:I.intl.string(I.t.MEV0GI)}):void 0]})}var Q=n(287809),Y=n(174459),W=n(474090),z=n(439174),J=n(183555),X=n(47675);let Z=(0,n(240921).Ay)({name:"2026-04-boosting-badge-hover-popup",kind:"user",defaultConfig:{enabled:!1},variations:{0:{enabled:!1},1:{enabled:!0}}});var ee=n(262),et=n(999291);function en(e){let{children:t,targetElementRef:n,delay:l,badgeIcon:r,premiumGuildSince:a}=e,s=(0,C.L7)(r),o=I.intl.string(I.t.OAq2KW).toLocaleUpperCase(),d=I.intl.formatToPlainString(I.t.rTUArF,{date:a});return(0,i.jsx)(j.A,{targetElementRef:n,estimatedTooltipHeight:220,delay:l,gradientColor:"purple",size:"lg",graphic:{type:"image",src:s,aspectRatio:"6/4"},title:o,body:d,children:t})}var ei=n(652215),el=n(92111),er=n(758836);let ea="premium";var es=n(992028);function eo(e){let{badges:t,className:n,badgeClassName:r,displayProfile:p,onClose:E,shouldOpenBadgeTooltip:_,shouldGlowTenureBadge:x}=e,R=l.useRef(null),v=l.useRef(null),b=l.useRef(null),j=l.useRef(null),{analyticsLocations:A}=(0,c.Ay)(u.A.BADGE),{context:T,trackUserProfileAction:S}=(0,J.NJ)(),N=Q.default.getCurrentUser(),D=(0,W.CC)(N?.premiumType,y.PremiumTypes.TIER_2),U=Z.useConfig({location:"UserProfileBadgeList"}).enabled,k=function(e){let{location:t}=e;return m.useConfig({location:t}).enabled}({location:"UserProfileBadgeList"}),w=(0,et.AP)(N?.id??null),H=(0,ee.A)(w).some(e=>e.id===G.A.ORB_PROFILE_BADGE);return(0,i.jsx)("div",{className:a()(es.k,n),"aria-label":I.intl.string(I.t.VWV0y5),role:"group",children:t.map((e,t)=>{let n=e.id===G.A.ORB_PROFILE_BADGE,l=(0,z.e0)(e.id),c=null!=l||e.id===ea,m=p?.userId===N?.id,y="april_fools_2026"===e.id,w=e.id.startsWith(C.Ky),V=void 0!==l&&e.id!==ea,F=(0,i.jsx)("img",{alt:" ","aria-hidden":!0,src:e.iconSrc??(0,C.L7)(e.icon),className:a()(es.q,r)}),K=null!=_&&_(e.id),Q={onClick:t=>{S({action:"PRESS_BADGE"}),(0,X.R9)({badge:e.id,analyticsLocations:A,...T});let i=e.id.startsWith("staff")&&!m;if(k&&!i){t.preventDefault(),g({initialBadgeId:(0,el.P3)(e.id)});return}if(n){(0,h.Cz)({tab:er.G2.ORBS,analyticsLocations:A,analyticsSource:u.A.VIRTUAL_CURRENCY_ORB_PROFILE_BADGE}),E?.();return}if(c){if(t.preventDefault(),Y.default.track(ei.HAw.TIERED_TENURE_BADGE_CLICKED,{badge:e.id,premium_type:D,viewed_user_id:p?.userId}),D){m?(0,$.pX)(ei.BVt.NITRO_HOME):(0,B.D)({analyticsLocations:A,displayProfile:p}),E?.();return}if(m){let n=null!=e.link?(0,d.default)(e.link,{analyticsLocations:A}):null;if(null==n)return;return E?.(),n(t)}return(0,B.D)({analyticsLocations:A,displayProfile:p}),void E?.()}let l=null!=e.link?(0,d.default)(e.link,{analyticsLocations:A}):null;if(null!=l)return E?.(),l(t)},onMouseEnter:()=>{e.id===ee.h&&Y.default.track(ei.HAw.QUEST_CONTENT_VIEWED,{...(0,M.fF)(P.uF.QUEST_BADGE),is_targeted:!1}),S({action:"HOVER_BADGE"}),(0,X.sQ)({badge:e.id,analyticsLocations:A,...T})},href:e.link,"aria-label":e.description,style:{filter:x&&null!=l?`drop-shadow(0 0 5px ${l.glowColor})`:void 0}};if(V){let n=k?{...Q,"aria-label":I.intl.string(I.t["JEiq/c"])}:Q,l=(0,i.jsx)(o.Anchor,{...n,ref:R,children:F});return(0,i.jsx)("div",{children:k?(0,i.jsx)(O,{badgeId:e.id,targetElementRef:R,mode:"mini-tooltip",body:"string"==typeof e.description?e.description:void 0,onShow:()=>{Y.default.track(ei.HAw.TOOLTIP_VIEWED,{type:"tiered_tenure_badge_profile_"+(m?"self":"other")})},children:l}):(0,i.jsx)(O,{badgeId:e.id,targetElementRef:R,mode:"tooltip",body:e.description,onShow:()=>{Y.default.track(ei.HAw.TOOLTIP_VIEWED,{type:"tiered_tenure_badge_profile_"+(m?"self":"other")})},estimatedTooltipHeight:220,children:l})},`${e.id}-${t}`)}if(n){let n=(0,i.jsx)(o.Anchor,{...Q,ref:v,children:F});return(0,i.jsx)(q,{targetElementRef:v,delay:C.In,showSubtext:!H&&!e.isPreviewMode,forceOpen:K,children:n},`${e.id}-${t}`)}if(y){let n=(0,i.jsx)(o.Anchor,{...Q,ref:b,children:F});return(0,i.jsx)(f,{targetElementRef:b,delay:C.In,forceOpen:K,badgeDescription:e.description,children:n},`${e.id}-${t}`)}if(w&&p?.premiumGuildSince!=null&&U){let n=(0,i.jsx)(o.Anchor,{...Q,ref:j,children:F});return(0,i.jsx)(en,{targetElementRef:j,delay:C.In,badgeIcon:e.icon,premiumGuildSince:p.premiumGuildSince,children:n},`${e.id}-${t}`)}let W=(0,i.jsx)(o.Anchor,{...Q,children:F}),J=(e=>{let{badge:t,tieredTenureBadge:n}=e;return void 0!==n&&t.id!==ea?(0,i.jsx)(L,{profileBadge:t,tenureBadge:n}):t.description})({badge:e,tieredTenureBadge:c&&e.id!==ea?l:void 0});return(0,i.jsx)(s.m,{__unsupportedReactNodeAsText:J,forceOpen:K,delay:C.In,ariaHidden:!0,children:W},`${e.id}-${t}`)})})}}