Loading
function(e,t,n){"use strict";n.d(t,{A:()=>k});var l=n(627968);n(64700);var i=n(503698),s=n.n(i),r=n(17928),a=n(661531),o=n(462887),u=n(306471),c=n(478016),d=n(565787),m=n(332837),h=n(998445),p=n(834730),f=n(781696),g=n(939249),E=n(404374),A=n(85829),C=n(814925),x=n(363195),I=n(696451),_=n(287809),S=n(816166),y=n(953727);function v(e){let{width:t=10,height:n=10,color:i="currentColor",...s}=e;return(0,l.jsxs)("svg",{...(0,y.A)(s),width:t,height:n,viewBox:"0 0 17 22",fill:i,xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsxs)("g",{filter:"url(#filter0_d_1296_1706)",children:[(0,l.jsx)("path",{opacity:"0.55",d:"M8.49999 3.7998L4.85999 7.4398V12.5598L8.49999 16.1998L12.14 12.5598V7.4398L8.49999 3.7998ZM10.32 11.7998L8.49999 13.6265L6.67999 11.8065V8.19314L8.49999 6.37314L10.32 8.19314V11.7998Z",fill:"white"}),(0,l.jsx)("path",{opacity:"0.8",d:"M6.67999 8.19354V11.8069L8.49999 13.6269L10.32 11.8069V8.19354L8.49999 6.37354L6.67999 8.19354Z",fill:"white"}),(0,l.jsx)("path",{d:"M8.5 3.7998V6.37314L10.32 8.19314L12.14 7.4398L8.5 3.7998Z",fill:"white"})]}),(0,l.jsx)("defs",{children:(0,l.jsxs)("filter",{id:"filter0_d_1296_1706",x:"-3.5",y:"-1",width:"24",height:"24",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,l.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,l.jsx)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,l.jsx)("feOffset",{dy:"1"}),(0,l.jsx)("feGaussianBlur",{stdDeviation:"2"}),(0,l.jsx)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.14 0"}),(0,l.jsx)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_1296_1706"}),(0,l.jsx)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_1296_1706",result:"shape"})]})})]})}var T=n(473145),N=n(426983),j=n(176128),b=n(375708);function R(e,t){let n=t===j.qo.PUBLIC?b.intl.string(b.t.op2cJ6):t===j.qo.APPLY_TO_JOIN?b.intl.string(b.t.YwZfbt):b.intl.string(b.t.TME4LJ);switch(e){case N._.STAFF:return{tooltipTitle:b.intl.string(b.t.lMrv96),tooltipSubtitle:b.intl.string(b.t.lMrv96),tooltipDescription:b.intl.string(b.t.lMrv96)};case N._.VERIFIED:return{tooltipTitle:b.intl.string(b.t.K7iRig),tooltipSubtitle:b.intl.string(b.t.iCehw9),tooltipDescription:n};case N._.PARTNERED:return{tooltipTitle:b.intl.string(b.t.K7iRig),tooltipSubtitle:b.intl.string(b.t.hfYfEE),tooltipDescription:n};case N._.VERIFIED_AND_PARTNERED:return{tooltipTitle:b.intl.string(b.t.K7iRig),tooltipSubtitle:b.intl.string(b.t["TX+iFC"]),tooltipDescription:n};case N._.COMMUNITY:return{tooltipTitle:b.intl.string(b.t.K7iRig),tooltipDescription:n};case N._.DISCOVERABLE:return{tooltipTitle:b.intl.string(b.t.K7iRig),tooltipDescription:b.intl.string(b.t.op2cJ6)};default:return{tooltipTitle:b.intl.string(b.t["iZRkC/"])}}}var P=n(652215),L=n(40544);let M={[N._.STAFF]:{IconComponent:u.V,foregroundDarkColor:a.A.unsafe_rawColors.WHITE.css,foregroundLightColor:a.A.unsafe_rawColors.WHITE.css,backgroundDarkColor:a.A.unsafe_rawColors.GREEN_360.css,backgroundLightColor:a.A.unsafe_rawColors.GREEN_360.css},[N._.VERIFIED_AND_PARTNERED]:{IconComponent:c.U,foregroundDarkColor:a.A.unsafe_rawColors.WHITE.css,foregroundLightColor:a.A.unsafe_rawColors.WHITE.css,backgroundDarkColor:a.A.unsafe_rawColors.GREEN_360.css,backgroundLightColor:a.A.unsafe_rawColors.GREEN_360.css},[N._.VERIFIED]:{IconComponent:c.U,foregroundDarkColor:a.A.unsafe_rawColors.WHITE.css,foregroundLightColor:a.A.unsafe_rawColors.WHITE.css,backgroundDarkColor:a.A.unsafe_rawColors.GREEN_360.css,backgroundLightColor:a.A.unsafe_rawColors.GREEN_360.css},[N._.PARTNERED]:{IconComponent:(0,d.k)(S.A),foregroundDarkColor:a.A.unsafe_rawColors.WHITE.css,foregroundLightColor:a.A.unsafe_rawColors.WHITE.css,backgroundDarkColor:a.A.unsafe_rawColors.BRAND_500.css,backgroundLightColor:a.A.unsafe_rawColors.BRAND_500.css},[N._.COMMUNITY]:{IconComponent:m.f,foregroundDarkColor:a.A.unsafe_rawColors.PRIMARY_500.css,foregroundLightColor:a.A.unsafe_rawColors.WHITE.css,backgroundDarkColor:a.A.unsafe_rawColors.WHITE.css,backgroundLightColor:a.A.unsafe_rawColors.PRIMARY_500.css,premiumBackgroundColor:E.k0.PREMIUM_GUILD_BADGE_V2_BACKGROUND,premiumForegroundColor:a.A.unsafe_rawColors.WHITE.css,sizeAdjustment:2},[N._.DISCOVERABLE]:{IconComponent:h.L,foregroundDarkColor:a.A.unsafe_rawColors.PRIMARY_500.css,foregroundLightColor:a.A.unsafe_rawColors.WHITE.css,backgroundDarkColor:a.A.unsafe_rawColors.WHITE.css,backgroundLightColor:a.A.unsafe_rawColors.PRIMARY_500.css,premiumBackgroundColor:E.k0.PREMIUM_GUILD_BADGE_V2_BACKGROUND,premiumForegroundColor:a.A.unsafe_rawColors.WHITE.css,sizeAdjustment:2},[N._.NONE]:{}};function O(e){let{guildTraits:t}=e;return(0,l.jsxs)("div",{className:L.V8,children:[(0,l.jsxs)("div",{className:s()(L.f,L.N5),children:[(0,l.jsx)(v,{width:18,height:18,className:L.F8}),(0,l.jsx)(p.E,{variant:"text-xs/semibold",color:"always-white",children:T.gb(t.premiumTier)})]}),(0,l.jsx)("div",{className:L.f,children:(0,l.jsx)(p.E,{variant:"text-xs/semibold",color:"always-white",children:b.intl.format(b.t["dR/SVH"],{count:t.premiumSubscriberCount})})})]})}function w(e){let{badgeType:t,guildTraits:n}=e,{tooltipTitle:i,tooltipSubtitle:s,tooltipDescription:r}=R(t,n.visibility);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:L.Rf,children:[(0,l.jsx)(p.E,{color:"interactive-text-active",variant:"text-xs/bold",children:i}),null!=s?(0,l.jsx)(p.E,{color:"text-muted",variant:"text-xs/medium",children:s}):null,null!=r?(0,l.jsx)(p.E,{color:"text-muted",variant:"text-xs/medium",children:r}):null]}),n.premium?(0,l.jsx)(O,{guildTraits:n}):null]})}function k(e){let t,n,{guild:i,tooltipColor:s=f.ST.Colors.BRAND,tooltipPosition:a,className:u,flowerStarClassName:c,iconClassName:d,badgeStrokeColor:m,badgeColor:h,disableBoostClick:p,"aria-label":E,...S}=e,y=S.size??18,v=(0,r.bG)([_.default,I.Ay],()=>{let e=_.default.getCurrentUser();return I.Ay.isMember(i?.id,e?.id)}),T=(0,r.bG)([x.A],()=>x.A.theme),b=(0,j.Jp)(i),O=(0,N.K)(b),k=b.premium&&v&&!p;function D(e){k&&(e.stopPropagation(),e.preventDefault(),(0,A.K4)({guildId:i.id,location:{section:P.JJy.GUILD_HEADER,object:P.ZSU.BOOST_GEM_ICON}}))}if(O===N._.NONE)return null;let{IconComponent:U,backgroundDarkColor:G,backgroundLightColor:F,foregroundDarkColor:V,foregroundLightColor:B,premiumBackgroundColor:H,premiumForegroundColor:W,sizeAdjustment:K}=M[O];if(null==U)return null;b.premium&&(t=W,n=H);let Y=(0,o.M)(T)?V:B,z=(0,o.M)(T)?G:F;t=t??Y,n=n??z;let Z=Math.floor(.75*y)-(K??0),{tooltipTitle:q,tooltipSubtitle:$}=R(O,b.visibility),J=E??(null!=$?$:q);return(0,l.jsx)(f.ST,{color:s,position:a,"aria-label":!1,text:(0,l.jsx)(w,{badgeType:O,guildTraits:b}),tooltipContentClassName:L.Hj,children:e=>(0,l.jsx)(g.D,{"aria-label":J,onClick:D,tabIndex:0,children:(0,l.jsx)(C.A,{...e,className:u,flowerStarClassName:c,allowFullSizedIcon:!0,color:n??h,stroke:m,size:y,children:(0,l.jsx)(U,{size:"custom",width:Z,height:Z,className:d,color:t??"currentColor"})})})})}}