"use strict";(this.webpackChunkdiscord_app=this.webpackChunkdiscord_app||[]).push([["92233"],{117266:function(e,t,n){n.d(t,{Z:()=>r});var i=n(570140);function r(e){i.Z.dispatch({type:"DETECTED_OFF_PLATFORM_PREMIUM_PERKS_DISMISS",skuId:e})}},195500:function(e,t,n){n.d(t,{Z:()=>r});var i=n(570140);let r=12633==n.j?{clearRemoteDisconnectVoiceChannelId(){i.Z.dispatch({type:"CLEAR_REMOTE_DISCONNECT_VOICE_CHANNEL_ID"})},clearLastSessionVoiceChannelId(){i.Z.dispatch({type:"CLEAR_LAST_SESSION_VOICE_CHANNEL_ID"})}}:null},205355:function(e,t,n){n.d(t,{Z:()=>a}),n(388685);var i=n(544891),r=n(570140),l=n(981631);let o="".concat(l.dGm,"/api/v2/scheduled-maintenances"),s="".concat(l.dGm,"/api/v2/incidents/unresolved.json"),a={checkIncidents(){Promise.all([i.tn.get({url:"".concat(o,"/active.json"),rejectWithError:!0}),i.tn.get(s)]).then(e=>{let[t,n]=e,[i]=t.body.scheduled_maintenances,[l]=n.body.incidents;r.Z.dispatch({type:"STATUS_PAGE_INCIDENT",incident:l||i})})},checkScheduledMaintenances(){i.tn.get({url:"".concat(o,"/upcoming.json"),rejectWithError:!0}).then(e=>{let[t]=e.body.scheduled_maintenances;r.Z.dispatch({type:"STATUS_PAGE_SCHEDULED_MAINTENANCE",maintenance:t})})},ackScheduledMaintenance(){r.Z.dispatch({type:"STATUS_PAGE_SCHEDULED_MAINTENANCE_ACK"})}}},223245:function(e,t,n){n.d(t,{Z:()=>r}),n(388685);var i=n(570140);let r={setEnabled(e){this.update({enabled:e})},update(e){for(let t of Object.keys(e))i.Z.dispatch({type:"STREAMER_MODE_UPDATE",key:t,value:e[t]})}}},491428:function(e,t,n){n.d(t,{Xq:()=>d,g8:()=>h,hZ:()=>u,wk:()=>_});var i=n(990547),r=n(283693),l=n(570140),o=n(558724),s=n(626135),a=n(573261),c=n(981631);function d(e){l.Z.dispatch({type:"SURVEY_OVERRIDE",id:e})}function u(e,t){l.Z.dispatch({type:"SURVEY_HIDE",key:e}),t?s.default.track(c.rMx.APP_NOTICE_CLOSED,{notice_type:c.kVF.SURVEY,survey_id:e,dismissed:t}):s.default.track(c.rMx.APP_NOTICE_PRIMARY_CTA_OPENED,{notice_type:c.kVF.SURVEY})}function _(e,t){var n={};return null!=e&&(n.survey_override=e),null!=t&&(n.disable_auto_seen=t),a.Z.get({url:c.ANM.USER_SURVEY,query:n,trackedActionData:{event:i.NetworkActionNames.USER_SURVEY_FETCH,properties:e=>{var t;let n=null==e||null==(t=e.body)?void 0:t.survey;return(0,r.iG)({key:null==n?void 0:n.key})}},rejectWithError:!1}).then(e=>{var t;l.Z.dispatch({type:"SURVEY_FETCHED",survey:null==e||null==(t=e.body)?void 0:t.survey})},()=>{l.Z.dispatch({type:"SURVEY_FETCHED",survey:null})})}function h(e){let t=o.Z.getLastSeenTimestamp();if(null===t||null!=t&&Date.now()-t>=o.J)return l.Z.dispatch({type:"SURVEY_SEEN",key:e}),a.Z.post({url:c.ANM.USER_SURVEY_SEEN(e),trackedActionData:{event:i.NetworkActionNames.USER_SURVEY_SEEN,properties:t=>(0,r.iG)({key:e})},rejectWithError:!1})}},401430:function(e,t,n){n.d(t,{Wt:()=>_,mc:()=>h,q$:()=>E}),n(415506),n(997841),n(35282);var i=n(570140),r=n(566620),l=n(728345),o=n(812206),s=n(973616),a=n(630388),c=n(591759),d=n(978085),u=n(981631);async function _(e,t){i.Z.dispatch({applicationId:e,type:"DEVELOPER_TEST_MODE_AUTHORIZATION_START"});try{if(!await (0,r.W5)(e))throw Error("Do not have access!");let n=o.Z.getApplication(e);null==n&&(n=s.ZP.createFromServer(await l.ZP.fetchApplication(e)));let _=(0,a.yE)(n.flags,u.udG.EMBEDDED);if(_&&(null==t||!c.Z.URL_REGEX.test(t)))throw Error("Invalid Origin URL for embedded application");return _||d.GR(n),i.Z.dispatch({type:"DEVELOPER_TEST_MODE_AUTHORIZATION_SUCCESS",applicationId:e,originURL:_?t:null}),n}catch(t){return i.Z.dispatch({type:"DEVELOPER_TEST_MODE_AUTHORIZATION_FAIL",applicationId:e,error:t.message}),null}}function h(){i.Z.dispatch({type:"DEVELOPER_TEST_MODE_RESET"})}function E(){i.Z.dispatch({type:"DEVELOPER_TEST_MODE_RESET_ERROR"})}},72924:function(e,t,n){n.d(t,{S:()=>g});var i=n(255367);n(73800);var r=n(512722),l=n.n(r),o=n(481060),s=n(558381),a=n(821849),c=n(531826),d=n(15640),u=n(724870),_=n(87484),h=n(928518),E=n(106976),I=n(689011),p=n(55563),C=n(981631);async function g(e){var t,n,r,g,T;let{applicationId:O,skuId:S,initialPlanId:N,analyticsLocations:f,analyticsLocationObject:R}=e,m=p.Z.get(S);if(null==m){let e=(await (0,s.oJ)(O)).find(e=>e.sku.id===S);l()(null!=e,"Could not find store listing for sku"),e.sku.type===C.epS.SUBSCRIPTION_GROUP&&await (0,E.rx)(O,e.id)}m=null!=m?m:p.Z.get(S),l()(null!=m&&m.applicationId===O,"SKU must belong to application"),m.type!==C.epS.SUBSCRIPTION||(0,d.a)([m.id])||await (0,a.GZ)(m.id);let A=function(e){let t=(0,c.jA)({applicationId:e}),n=null!=t?h.Z.getWindow(t):void 0;return null==n||n.closed?o.z1l:o.u1M}(O);if(m.type!==C.epS.SUBSCRIPTION)return new Promise((e,t)=>{(0,_.Z)({applicationId:O,skuId:S,analyticsLocationObject:R,analyticsLocations:f,contextKey:A,onComplete:t=>{var n;e(null!=(n=null==t?void 0:t.entitlements)?n:[])},onClose:e=>{e||t()}})});await (t=O,n=S,r=N,g=R,T=f,(0,u.m)({applicationId:t,skuId:n,initialPlanId:r,analyticsLocationObject:g,analyticsLocations:T,renderHeader:(e,t,n)=>(0,i.jsx)(I.t,{step:n,onClose:()=>t(!1)})}))}},69499:function(e,t,n){n.d(t,{E:()=>E,Z:()=>p}),n(388685),n(642613);var i=n(255367),r=n(73800),l=n(442837),o=n(481060),s=n(239091),a=n(585237),c=n(812206),d=n(55563),u=n(73346),_=n(388032);function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let E={DropdownSizes:a.Z.DropdownSizes,Sizes:a.Z.Sizes,Colors:a.Z.Colors,Looks:a.Z.Looks};class I extends r.PureComponent{render(){var e,t;let n=this.props,{skus:r,children:l,applicationId:o,primarySKU:s,onSKUSelect:c}=n,d=function(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},l=Object.keys(e);for(i=0;i=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(n,["skus","children","applicationId","primarySKU","onSKUSelect"]);return(0,i.jsx)(a.Z,(e=function(e){for(var t=1;t0?this.handleContextMenu:null,onContextMenu:r.length>0?this.handleContextMenu:void 0},d),t=t={children:l},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e))}constructor(...e){super(...e),h(this,"renderContextMenu",()=>{let{skus:e,onSKUSelect:t,onMenuSelect:n}=this.props;return(0,i.jsx)(o.v2r,{onSelect:n,navId:"test-skus","aria-label":_.intl.string(_.t.ogxXGh),onClose:s.Zy,children:e.map(e=>(0,i.jsx)(o.sNh,{id:"".concat(e.id),label:e.name,action:()=>{null==t||t(e)}},"".concat(e.id)))})}),h(this,"handleContextMenu",e=>{e.stopPropagation(),s.vq(e,this.renderContextMenu)}),h(this,"handleClick",()=>{let{onSKUSelect:e,primarySKU:t}=this.props;null!=t&&(null==e||e(t))})}}let p=l.ZP.connectStores([d.Z,c.Z],e=>{var t;let{applicationId:n}=e,i=(0,u.uF)(n,c.Z,d.Z);return{skus:(null!=(t=d.Z.getForApplication(n))?t:[]).sort((e,t)=>null!=i&&e.id===i.id?-1:null!=i&&t.id===i.id?1:e.name>=t.name?-1:1),primarySKU:i}})(I)},912193:function(e,t,n){n.d(t,{b:()=>u});var i=n(255367);n(73800);var r=n(481060),l=n(846027),o=n(468026),s=n(388032);let a=null;function c(){null!==a&&(0,r.Mr3)(a),a=null}function d(){l.Z.setSilenceWarning(!1)}function u(){a=(0,r.h7j)(e=>(0,i.jsx)(o.default,function(e){for(var t=1;ts});var i=n(73800),r=n(924826),l=n(442837),o=n(607070);function s(e,t,n){let s=(0,l.e7)([o.Z],()=>o.Z.keyboardModeEnabled),a=i.useCallback(e=>{let n=document.querySelector(e),i=t.current;null!=n&&null!=i&&(n.focus(),i.scrollIntoViewNode({node:n,padding:80}))},[t]),c=i.useCallback(()=>new Promise(e=>{let n=t.current;if(null==n)return e();n.scrollTo({to:0,callback:()=>requestAnimationFrame(()=>e())})}),[t]),d=i.useCallback(()=>new Promise(e=>{let n=t.current;if(null==n)return e();n.scrollTo({to:Number.MAX_SAFE_INTEGER,callback:()=>requestAnimationFrame(()=>e())})}),[t]);return(0,r.ZP)({id:e,isEnabled:s,setFocus:a,scrollToStart:c,scrollToEnd:d,orientation:null==n?void 0:n.orientation})}},361213:function(e,t,n){n.d(t,{Z:()=>r});var i=n(981631);function r(e,t){let n,r=window.GLOBAL_ENV.CDN_HOST,l=window.GLOBAL_ENV.API_ENDPOINT;return null!=r?"https://".concat(r,"/app-assets/").concat(e,"/store/").concat(t,".mp4"):"".concat(location.protocol).concat(l).concat(i.ANM.STORE_ASSET(e,t,"mp4"))}},778569:function(e,t,n){n.d(t,{Z:()=>o}),n(388685);var i=n(73800),r=n(81063);let l=["embedded_cover","embedded_background"];function o(e){let{applicationId:t,size:n,names:o=l}=e,[s,a]=i.useState(null),[c,d]=i.useState(!0),u=(0,r.xF)(t,s,n),_=i.useRef(o);return i.useEffect(()=>{_.current=o}),i.useEffect(()=>{let{current:e}=_;null!=t&&(0,r.Vh)(t).then(t=>{for(let[n,i]of(d(!1),Object.entries(t)))if(null!=i&&""!==i.id&&e.includes(i.name))return void a(i.id)})},[t]),{url:u,state:c?"loading":null!=u?"fetched":"not-found"}}},333866:function(e,t,n){n.d(t,{a3:()=>s,eJ:()=>a,kL:()=>c,zJ:()=>o});var i,r,l=n(388032),o=12633==n.j?((i={})[i.NAME=1]="NAME",i[i.PRICE_ASC=2]="PRICE_ASC",i[i.PRICE_DESC=3]="PRICE_DESC",i[i.NEWEST_ARRIVALS=4]="NEWEST_ARRIVALS",i):null,s=((r={})[r.SUBS_FIRST=1]="SUBS_FIRST",r[r.PRODUCTS_FIRST=2]="PRODUCTS_FIRST",r);function a(e){return({4:l.intl.string(l.t["5tzSRE"]),2:l.intl.string(l.t["WWIr5+"]),3:l.intl.string(l.t.WlSInZ),1:l.intl.string(l.t.uOU7Pz)})[e]}let c=[4,2,3,1]},629481:function(e,t,n){n.d(t,{Hr:()=>s,P4:()=>c,TR:()=>d,mz:()=>l,tM:()=>a,xv:()=>o});var i,r,l=((i={}).GET_STARTED_CLICK="get_started_click",i.DISMISS_FULL_PREVIEW="dismiss_full_preview",i.DISMISS_TAB_PREVIEW="dismiss_tab_preview",i.DISMISS_CHANNEL_ROW="dismiss_channel_row",i),o=12633==n.j?((r={}).CHANNEL_ROW_CONTEXT_MENU="channel_row_context_menu",r.SHOP_HEADER_BUTTON="shop_header_button",r):null;let s="hasClickedGuildShopProductPreviewTab",a="hasClickedGuildShopChannelRow",c="https://discord.com/servershop",d="1 GB"},847033:function(e,t,n){n.d(t,{Z:()=>A,m:()=>m}),n(539854),n(388685);var i=n(255367),r=n(73800),l=n(512722),o=n.n(l),s=n(399606),a=n(704215),c=n(367907),d=n(266454),u=n(584825),_=n(994592),h=n(160404),E=n(703656),I=n(984933),p=n(430824),C=n(626135),g=n(652515),T=n(550951),O=n(544978),S=n(333866),N=n(629481),f=n(981631);let R=12633==n.j?r.createContext(void 0):null;function m(){let e=r.useContext(R);return o()(null!=e,"must use useGuildShopDisplayContext within a GuildShopDisplayContextProvider"),e}function A(e){var t;let{children:n,initialTab:l,guildId:o}=e,m=(0,s.e7)([p.Z],()=>p.Z.getGuild(o)),A=(0,s.e7)([h.Z],()=>h.Z.isViewingServerShop(o)),P=(0,T.g)(m,"guild_shop_page"),y=(0,g.RF)(o,"guild_shop_page"),b=(null==m?void 0:m.features.has(f.oNc.PRODUCTS_AVAILABLE_FOR_PURCHASE))===!0,D=(0,_.mY)(null==m?void 0:m.id),v=null==(t=(0,u.YB)(o))?void 0:t.server_shop_tab_order,U=[],M=O.y.GUILD_SHOP_FULL_PREVIEW;A||b&&D?(U.push(v===S.a3.PRODUCTS_FIRST?O.y.GUILD_PRODUCTS:O.y.GUILD_ROLE_SUBSCRIPTIONS),U.push(v===S.a3.PRODUCTS_FIRST?O.y.GUILD_ROLE_SUBSCRIPTIONS:O.y.GUILD_PRODUCTS),M=U[0]):b&&!D?(U.push(O.y.GUILD_PRODUCTS),M=O.y.GUILD_PRODUCTS):!b&&D&&(U.push(O.y.GUILD_ROLE_SUBSCRIPTIONS),M=O.y.GUILD_ROLE_SUBSCRIPTIONS,P&&U.push(O.y.GUILD_PRODUCTS_PREVIEW)),l=null!=l?l:M;let[L,Z]=r.useState(l),k=P&&!(D&&y)||L===O.y.GUILD_PRODUCTS_PREVIEW;return r.useEffect(()=>{Z(l)},[l]),(0,i.jsx)(R.Provider,{value:{selectedTab:L,setSelectedTab:Z,categoryTabs:U,isPhantomPreview:k,handlePreviewDismiss:e=>{(0,d.Q3)(a.z.SERVER_SHOP_PHANTOM_PREVIEW);let t=function(e){for(var t=1;tr});var i,r=12633==n.j?((i={}).GUILD_PRODUCTS="guild_products",i.GUILD_ROLE_SUBSCRIPTIONS="guild_role_subscriptions",i.GUILD_PRODUCTS_PREVIEW="guild_products_preview",i.GUILD_SHOP_FULL_PREVIEW="guild_shop_full_preview",i):null},893182:function(e,t,n){n.d(t,{Z:()=>l});var i=n(255367);n(73800);var r=n(952265);function l(e){(0,r.ZD)(async()=>{let{default:t}=await n.e("86060").then(n.bind(n,816607));return n=>(0,i.jsx)(t,function(e){for(var t=1;t_}),n(388685);var i=n(255367),r=n(73800),l=n(120356),o=n.n(l),s=n(481060),a=n(900609);function c(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function u(e){var t,n,{alt:l}=e,o=d(e,["alt"]);let[u,_]=r.useState(!0);return(0,i.jsxs)(i.Fragment,{children:[u&&(0,i.jsx)(s.$jN,{type:s.$jN.Type.LOW_MOTION,className:a.loader}),(0,i.jsx)("img",(t=c({},o),n=n={alt:l,onLoad:()=>_(!1)},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))]})}function _(e){var{src:t,backgroundSrc:n,alt:r,aspectRatio:l,className:s,imageChildClassName:_}=e,h=d(e,["src","backgroundSrc","alt","aspectRatio","className","imageChildClassName"]);return(0,i.jsxs)("div",{className:o()(a.container,s),children:[(0,i.jsx)("img",{src:n,alt:r,className:a.backgroundImage}),(0,i.jsx)("div",{className:a.backgroundImageFilter}),(0,i.jsx)("div",{style:{aspectRatio:l},className:a.imageContainer,children:(0,i.jsx)(u,c({src:t,alt:r,className:o()(a.image,_)},h))})]})}},696014:function(e,t,n){n.d(t,{s:()=>a}),n(388685);var i=n(255367),r=n(73800),l=n(120356),o=n.n(l),s=n(366736);function a(){let[e,t]=r.useState(!1);return{isTruncated:e,ExpandableTextContainer:r.memo(function(e){let{showAll:n=!1,className:r,children:l,lineClamp:a=2}=e;return(0,i.jsx)("div",{ref:e=>{null!=e&&t(e.scrollHeight-e.clientHeight>1)},className:o()(s.lineClamp,r),style:n?void 0:{lineClamp:a,WebkitLineClamp:a},children:l})})}}},674525:function(e,t,n){n.d(t,{Z:()=>d});var i,r,l,o=n(442837),s=n(570140);let a=[];class c extends(l=o.ZP.Store){getEligibleGuildsForNagActivate(){return a}}r="CreatorMonetizationMarketingStore",(i="displayName")in c?Object.defineProperty(c,i,{value:r,enumerable:!0,configurable:!0,writable:!0}):c[i]=r;let d=new c(s.Z,{CREATOR_MONETIZATION_NAG_ACTIVATE_ELIGIBLITY_FETCH_SUCCESS:function(e){let{eligibleGuilds:t}=e;a=t}})},749277:function(e,t,n){n.d(t,{A:()=>D});var i=n(255367);n(73800);var r=n(442837),l=n(704215),o=n(481060),s=n(232567),a=n(230711),c=n(726542),d=n(100527),u=n(231757),_=n(674525),h=n(963249),E=n(303172),I=n(463230),p=n(246965),C=n(703656),g=n(914010),T=n(594174),O=n(933429),S=n(395361),N=n(626135),f=n(243778),R=n(921944),m=n(981631),A=n(801461),P=n(474936),y=n(388032),b=n(131715);let D=e=>{let{dismissibleContent:t,noticeType:D}=e,v=(0,r.e7)([O.ZP],()=>O.ZP.getNotice()),U=(0,r.e7)([T.default],()=>T.default.getCurrentUser()),M=(0,r.e7)([g.Z],()=>g.Z.getGuildId());return(0,i.jsx)(f.ZP,{contentTypes:[t],groupName:R.R.NOTICE_BAR,bypassAutoDismiss:!0,children:e=>{let{visibleContent:t,markAsDismissed:r}=e;switch(t){case l.z.NAGBAR_NOTICE_DOWNLOAD:return(0,i.jsxs)(o.qXd,{color:o.DM8.DEFAULT,children:[(0,i.jsx)(o.RyX,{onClick:()=>r(R.L.UNKNOWN),noticeType:D}),y.intl.string(y.t["+xn1o6"]),(0,i.jsx)("i",{className:b.iconApple}),(0,i.jsx)("i",{className:b.iconAndroid}),(0,i.jsx)("i",{className:b.iconWindows}),(0,i.jsx)(o.NoS,{noticeType:D,onClick:()=>{(0,o.ZDy)(async()=>{let{default:e}=await Promise.resolve().then(n.bind(n,431583));return t=>(0,i.jsx)(e,function(e){for(var t=1;tr(R.L.UNKNOWN),noticeType:D}),(0,i.jsx)(S.Z,{className:b.platformIcon}),y.intl.string(y.t["5NUVHB"]),(0,i.jsx)(o.NoS,{onClick:()=>(0,u.Z)({platformType:m.ABu.SPOTIFY,location:"Notice Bar"}),noticeType:D,children:y.intl.string(y.t.S0W8Z2)})]});case l.z.NAGBAR_NOTICE_CONNECT_PLAYSTATION:return(0,i.jsxs)(o.qXd,{color:o.DM8.PLAYSTATION,children:[(0,i.jsx)(o.RyX,{onClick:()=>r(R.L.UNKNOWN)}),(0,i.jsx)("img",{alt:"",className:b.platformIcon,src:c.Z.get(m.ABu.PLAYSTATION).icon.whiteSVG}),y.intl.string(y.t.WHWgoa),(0,i.jsx)(o.EyT,{onClick:()=>(0,u.Z)({platformType:m.ABu.PLAYSTATION,location:"Notice Bar"}),children:y.intl.string(y.t.S0W8Z2)})]});case l.z.NAGBAR_NOTICE_MFA_SMS_BACKUP:return(0,i.jsxs)(o.qXd,{color:o.DM8.DEFAULT,children:[(0,i.jsx)(o.RyX,{onClick:()=>r(R.L.UNKNOWN),noticeType:D}),y.intl.string(y.t.B2hnhY),(0,i.jsx)(o.NoS,{onClick:()=>a.Z.open(m.oAB.ACCOUNT),noticeType:D,children:y.intl.string(y.t["50KYxs"])})]});case l.z.NAGBAR_NOTICE_PREMIUM_PROMO:return(0,i.jsxs)(o.qXd,{color:o.DM8.PREMIUM_TIER_2,children:[(0,i.jsx)("span",{className:b.premiumLogo}),(0,i.jsx)("span",{className:b.premiumText,children:y.intl.string(y.t["+urf7+"])}),(0,i.jsx)(o.NoS,{className:b.premiumAction,noticeType:D,onClick:()=>{N.default.track(m.rMx.PREMIUM_PROMOTION_OPENED,{location_section:m.jXE.NOTIFICATION_BAR,location_object:m.qAy.BUTTON_CTA}),a.Z.open(m.oAB.PREMIUM)},children:y.intl.string(y.t["8JC5e3"])}),(0,i.jsx)(o.RyX,{onClick:()=>{r(R.L.UNKNOWN),(0,s.mB)(m.xW$.PREMIUM_PROMO_DISMISSED,!0)},noticeType:D})]});case l.z.NAGBAR_NOTICE_PREMIUM_TIER_TWO_TRIAL_ENDING:return(0,i.jsx)(p.Z,{dismissCurrentNotice:()=>r(R.L.UNKNOWN),subscriptionTier:P.Si.TIER_2});case l.z.NAGBAR_NOTICE_PREMIUM_TIER_0_TRIAL_ENDING:return(0,i.jsx)(p.Z,{dismissCurrentNotice:()=>r(R.L.UNKNOWN),subscriptionTier:P.Si.TIER_0});case l.z.NAGBAR_NOTICE_PREMIUM_REACTIVATE:return(0,i.jsxs)(o.qXd,{color:o.DM8.PREMIUM_TIER_2,children:[(0,i.jsx)(o.RyX,{noticeType:D,onClick:()=>r(R.L.UNKNOWN)}),y.intl.string(y.t["0KFB2N"]),(0,i.jsx)(o.NoS,{noticeType:D,onClick:()=>{r(R.L.UNKNOWN),a.Z.open(m.oAB.PREMIUM)},children:y.intl.string(y.t.pyYSiI)})]});case l.z.NAGBAR_NOTICE_LOCALIZED_PRICING:return(0,i.jsx)(I.Z,{notice:v,noticeType:D,dismissCurrentNotice:()=>r(R.L.UNKNOWN)});case l.z.NAGBAR_BOUNCED_EMAIL_NOTICE:return(0,i.jsxs)(o.qXd,{color:o.DM8.DANGER,children:[(0,i.jsx)(o.RyX,{onClick:()=>r(R.L.UNKNOWN),noticeType:D}),y.intl.string(y.t["7490vb"]),(0,i.jsx)(o.NoS,{noticeType:D,onClick:()=>{(0,C.uL)(m.Z5c.SETTINGS("account"))},children:y.intl.string(y.t.Vm8akJ)})]});case l.z.NAGBAR_ACTIVATE_SERVER_SUBSCRIPTION:let g=_.Z.getEligibleGuildsForNagActivate();return(0,i.jsxs)(o.qXd,{color:o.DM8.DEFAULT,children:[(0,i.jsx)(o.RyX,{onClick:()=>r(R.L.UNKNOWN),noticeType:D}),y.intl.string(y.t.pJ4hJC),(0,i.jsx)(o.NoS,{noticeType:D,onClick:()=>{r(R.L.PRIMARY),(0,C.uL)(1===g.length?m.Z5c.GUILD_SETTINGS(g[0],"role-subscriptions"):m.Z5c.PICK_GUILD_SETTINGS("role-subscriptions",void 0,"server-subscriptions-finish-setting-up"))},children:y.intl.string(y.t["74s74O"])})]});case l.z.NAGBAR_NOTICE_POMELO:return(0,i.jsxs)(o.qXd,{color:o.DM8.WARNING,children:[(0,i.jsx)(o.RyX,{onClick:()=>r(R.L.UNKNOWN),noticeType:D}),y.intl.format(y.t.pdYZys,{}),(0,i.jsx)(o.NoS,{onClick:()=>(0,E.Z)(A.Kq.NOTICE),noticeType:D,children:y.intl.string(y.t.LhlgY2)})]});case l.z.CHECKOUT_RECOVERY_NAGBAR:return(0,i.jsxs)(o.qXd,{color:o.DM8.PREMIUM_TIER_2,children:[(0,i.jsx)(o.RyX,{onClick:()=>r(R.L.UNKNOWN),noticeType:D}),y.intl.string(y.t["O9GI+v"]),(0,i.jsx)(o.NoS,{onClick:()=>{(0,h.Z)({subscriptionTier:P.Si.TIER_2,analyticsLocations:[d.Z.CHECKOUT_RECOVERY_NAGBAR],analyticsLocation:m.Sbl.CHECKOUT_RECOVERY_NAGBAR,onClose:()=>r(R.L.UNKNOWN)})},noticeType:D,children:y.intl.string(y.t.Zi69Dw)})]});case l.z.REPORT_TO_MOD_SURVEY_NOTICE:return(0,i.jsxs)(o.qXd,{color:o.DM8.BRAND,children:[(0,i.jsx)(o.RyX,{onClick:()=>r(R.L.USER_DISMISS),noticeType:m.kVF.REPORT_TO_MOD_SURVEY}),y.intl.string(y.t["Aa+l7e"]),(0,i.jsx)(o.NoS,{onClick:()=>{window.open("https://discord.sjc1.qualtrics.com/jfe/form/SV_5uP0NWTpoXsYSUu?user_id=".concat(null==U?void 0:U.id,"&guild_id=").concat(M),"_blank"),r(R.L.TAKE_ACTION)},noticeType:m.kVF.REPORT_TO_MOD_SURVEY,children:y.intl.string(y.t["iT+wQ0"])})]})}}})}},196068:function(e,t,n){n.d(t,{c:()=>m});var i=n(255367),r=n(73800),l=n(793030),o=n(442837),s=n(704215),a=n(481060),c=n(230711),d=n(2052),u=n(906732),_=n(963249),h=n(163684),E=n(518638),I=n(748770),p=n(594174),C=n(626135),g=n(74538),T=n(243778),O=n(921944),S=n(981631),N=n(474936),f=n(388032),R=n(134772);let m=e=>{let{dismissibleContent:t}=e,n=(0,E.a0)(),m=(0,o.e7)([p.default],()=>g.ZP.isPremiumExactly(p.default.getCurrentUser(),N.p9.TIER_2)),{enabled:A,getNitroCTA:P}=h.g.useExperiment({location:"OutboundPromotionNotice"},{autoTrackExposure:!1,disable:m}),{location:y}=(0,d.O)(),{analyticsLocations:b}=(0,u.ZP)(),D=r.useCallback(()=>{var e,t;(0,_.Z)({subscriptionTier:g.ZP.getSkuIdForPremiumType(N.p9.TIER_2),analyticsLocations:b,analyticsObject:(e=function(e){for(var t=1;t{c.Z.open(S.oAB.INVENTORY),I.ZP.dismissOutboundPromotionNotice()},[]),U=r.useCallback(()=>{C.default.track(S.rMx.OUTBOUND_PROMOTION_NOTICE_CLICKED),P?D():v()},[P,D,v]);if(null==n)return null;let M=e=>(0,i.jsxs)(a.qXd,{color:a.DM8.PREMIUM_TIER_2,children:[(0,i.jsx)(a.RyX,{noticeType:S.kVF.OUTBOUND_PROMOTION,onClick:()=>{I.ZP.dismissOutboundPromotionNotice(),null!==e&&e(O.L.USER_DISMISS)}}),(0,i.jsx)(a.SrA,{size:"md",color:"currentColor",className:R.premiumIcon}),A?P?(0,i.jsxs)(l.xv,{variant:"text-sm/normal",className:R.text,children:[f.intl.string(f.t["5JMiOj"])," ",f.intl.format(f.t.fjSvsL,{onClick:v})]}):f.intl.string(f.t["5JMiOj"]):f.intl.string(f.t["Pzh+Gx"]),(0,i.jsx)(a.NoS,{noticeType:S.kVF.OUTBOUND_PROMOTION,onClick:()=>{U(),null!==e&&e(O.L.TAKE_ACTION)},children:P?f.intl.string(f.t.pj0XBA):f.intl.string(f.t.jVcuVV)})]});return(0,i.jsx)(T.O1,{contentType:t,newSnowflakeId:n,timeRecurringConfig:{cooldownDurationMs:0},groupName:O.R.NOTICE_BAR,bypassAutoDismiss:!0,children:e=>{let{visibleContent:t,markAsDismissed:n}=e;if(t===s.z.THIRD_PARTY_OUTBOUND_PROMO_NAGBAR)return M(n)}})}},131130:function(e,t,n){n.d(t,{q:()=>h}),n(953529);var i=n(255367);n(73800);var r=n(704215),l=n(481060),o=n(906732),s=n(963249),a=n(286961),c=n(644916),d=n(243778),u=n(921944),_=n(131715);let h=e=>{let{dismissibleContent:t,noticeType:n}=e,{analyticsLocations:h}=(0,o.ZP)(),E=(0,a.Z)();return(0,i.jsx)(d.Xf,{contentType:t,latestVersion:(0,c.t)(t),groupName:u.R.NOTICE_BAR,bypassAutoDismiss:!0,children:e=>{let{visibleContent:t,markAsDismissed:o}=e;if(t===r.z.GIFTING_PROMOTION_REMINDER){let e=null==E?void 0:E.reminderNagbar;return(0,i.jsxs)(l.qXd,{color:l.DM8.PREMIUM_TIER_2,children:[(0,i.jsx)(l.RyX,{onClick:()=>o(u.L.USER_DISMISS),noticeType:n}),(0,i.jsx)(l.OgN,{size:"custom",width:20,height:20,color:"currentColor",className:_.giftIcon}),null==e?void 0:e.description(),(0,i.jsx)(l.NoS,{onClick:()=>{(0,s.Z)({isGift:!0,initialPlanId:null,analyticsLocations:h,analyticsLocation:null==e?void 0:e.analyticsLocation,analyticsObject:{page:null==e?void 0:e.analyticsPage}})},noticeType:n,children:null==e?void 0:e.cta()})]})}}})}},528011:function(e,t,n){n.d(t,{g:()=>p,mI:()=>I}),n(388685);var i=n(149765),r=n(399606),l=n(581883),o=n(430824),s=n(496675),a=n(914010),c=n(594174),d=n(700785),u=n(709054),_=n(533244),h=n(487419),E=n(676770);function I(e){let t=(0,r.e7)([o.Z,s.Z],()=>{let t=o.Z.getGuild(e);if(null==t)return!1;let n=s.Z.getGuildPermissions(t);return null!=n&&i.Db(n,E.cv)}),n=(0,r.e7)([h.Z],()=>null!=e?h.Z.getGuildIncident(e):null),l=null!=n&&(0,_.ur)(n);return{shouldShowIncidentActions:t,incidentData:n,isUnderLockdown:l}}function p(){var e;let t=function(e){let t=c.default.getCurrentUser(),n=h.Z.getIncidentsByGuild();for(let r of u.default.keys(n).map(e=>o.Z.getGuild(e))){if(null==r)continue;let l=n[r.id];if(!(null==l||!(0,_.i9)(l)&&!(0,_.ur)(l)||(0,_.ur)(l)&&r.id!==e)&&i.Db(d.uB({user:t,context:r,checkElevated:!1}),E.cv))return r.id}return null}(a.Z.getGuildId()),n=null!=(e=l.Z.getGuildsProto())?e:{},r=null!=t?n[t]:null,s=null!=r&&r.disableRaidAlertNag;return{show:null!=t&&!s,guildId:t}}n(981631)},506357:function(e,t,n){n.d(t,{Z:()=>S});var i=n(255367),r=n(73800),l=n(442837),o=n(481060),s=n(565138),a=n(241559),c=n(527379),d=n(430824),u=n(944486),_=n(914010),h=n(626135),E=n(528011),I=n(666657),p=n(533244),C=n(981631),g=n(176505),T=n(388032),O=n(302654);function S(e){var t,S;let{onDismiss:N}=e,f=(0,l.e7)([_.Z],()=>_.Z.getGuildId()),R=(0,l.e7)([u.Z],()=>null!=f?u.Z.getChannelId(f):null,[f]),m=null!=f?f:null,A=(0,l.e7)([d.Z],()=>null!=m?d.Z.getGuild(m):null,[m]),{shouldShowIncidentActions:P,incidentData:y,isUnderLockdown:b}=(0,E.mI)(m),D=(0,a.n2)(null!=(t=null==A?void 0:A.id)?t:C.lds),v=r.useCallback(()=>null!=A&&(0,c._X)(A.id),[A]);if(null==A||null==y||!P)return null;let U=e=>{if(e&&D&&R!==g.oC.MEMBER_SAFETY&&v())return void h.default.track(C.rMx.APP_NOTICE_PRIMARY_CTA_OPENED,{notice_type:C.kVF.GUILD_RAID_NOTIFICATION,guild_id:A.id});(0,o.ZDy)(async()=>{let e={source:I.Zu.NAGBAR,alertType:(0,p.T1)(y)},{default:t}=await n.e("58175").then(n.bind(n,664452));return n=>{var r,l;return(0,i.jsx)(t,(r=function(e){for(var t=1;tU(!1),children:(0,i.jsxs)("div",{className:O.actionButtonInner,children:[(0,i.jsx)(o.mBM,{size:"xs",color:"currentColor"}),(0,i.jsx)("span",{children:T.intl.string(T.t["c+7oa2"])})]})})]});let Z=(0,p.CG)(y)?T.intl.formatToPlainString(T.t.tZTx2N,{guildName:A.name}):(0,p.kk)(y)?T.intl.formatToPlainString(T.t["1bSmxs"],{guildName:A.name}):T.intl.formatToPlainString(T.t.W87xDA,{guildName:A.name}),k=D&&R===g.oC.MEMBER_SAFETY;return(0,i.jsxs)(o.qXd,{className:O.notice,color:o.DM8.WARNING,children:[(0,i.jsx)(o.RyX,{onClick:N,noticeType:C.kVF.GUILD_RAID_NOTIFICATION}),M,Z,!k&&(0,i.jsx)(o.EyT,{className:O.actionButton,onClick:()=>U(!0),children:(0,i.jsx)("div",{className:O.actionButtonInner,children:(0,i.jsx)("span",{children:T.intl.string(T.t.zDJDho)})})})]})}},295474:function(e,t,n){n.d(t,{Ux:()=>C,gS:()=>g,ww:()=>T}),n(997841);var i=n(73800),r=n(399606),l=n(230711),o=n(18438),s=n(314897),a=n(271383),c=n(430824),d=n(496675),u=n(914010),_=n(715903),h=n(981631),E=n(372897),I=n(526761),p=n(388032);function C(e){return(0,r.e7)([s.default,a.ZP],()=>{if(null==e)return!1;let t=s.default.getId();return(0,_.EY)(a.ZP.getMember(e,t))},[e])}function g(e){return(0,r.cj)([s.default,a.ZP,u.Z,c.Z],()=>{let t={nick:void 0,bio:void 0},n=u.Z.getGuildId(),i=null!=e?e:n,r=c.Z.getGuild(i);if(null==r||null==i)return t;let l=s.default.getId(),o=a.ZP.getMember(i,l),d=(0,_.Ow)(null==o?void 0:o.flags);if(0===d.size)return t;if(d.has(E.q.AUTOMOD_QUARANTINED_USERNAME_OR_GUILD_NICKNAME))if(null==e){var h;t.nick=[p.intl.formatToPlainString(p.t.WBUh3N,{guildName:null!=(h=r.name)?h:""})]}else t.nick=[p.intl.string(p.t.EPZCrK)];return d.has(E.q.AUTOMOD_QUARANTINED_BIO)&&(t.bio=[p.intl.string(p.t.dZh1v7)]),t},[e])}function T(e){let{guildId:t,scrollPosition:n,analyticsLocation:s,analyticsLocations:a,openWithoutBackstack:u}=e,_=(0,r.e7)([c.Z],()=>c.Z.getGuild(t),[t]),E=(0,r.e7)([d.Z],()=>null!=_&&d.Z.can(h.Plq.CHANGE_NICKNAME,_),[_]);return[i.useCallback(()=>{if(null==_)return;let e=h.oAB.PROFILE_CUSTOMIZATION,t=I.NB.GUILD;E?(0,o.Fq)(_):t=I.NB.USER_PROFILE,l.Z.open(e,t,{scrollPosition:n,analyticsLocation:s,analyticsLocations:a,openWithoutBackstack:u})},[E,n,s,a,u,_]),E]}},226192:function(e,t,n){n.d(t,{UV:()=>_,_s:()=>d,kW:()=>u,km:()=>c});var i=n(255367);n(73800);var r=n(481060),l=n(273504),o=n(388032);function s(e){for(var t=1;tnew Promise(e=>{(0,r.ZDy)(async()=>{let{default:r}=await n.e("94005").then(n.bind(n,144462));return n=>{var l;return(0,i.jsx)(r,a(s({initialCustomMessage:null!=(l=t.metadata.customMessage)?l:"",onSubmit:i=>{t.metadata.customMessage=i,e(t),n.onClose()}},n),{onClose:()=>(e(null),n.onClose())}))}})}),[l.jj.FLAG_TO_CHANNEL]:(t,o)=>new Promise(c=>{(0,r.ZDy)(async()=>{let{default:r}=await n.e("74543").then(n.bind(n,643611)),d=t.actions.find(e=>e.type===l.jj.FLAG_TO_CHANNEL);return n=>(0,i.jsx)(r,a(s({action:o,isEdit:null!=d,triggerType:t.triggerType,guildId:e,onEditChannel:e=>{o.metadata.channelId=e,t.exemptChannels.add(e),c(o),n.onClose()}},n),{onClose:()=>(c(null),n.onClose())}))})}),[l.jj.USER_COMMUNICATION_DISABLED]:(e,t)=>new Promise(o=>{(0,r.ZDy)(async()=>{let{default:r}=await n.e("78273").then(n.bind(n,41767)),c=e.actions.find(e=>e.type===l.jj.USER_COMMUNICATION_DISABLED);return n=>(0,i.jsx)(r,a(s({action:t,isEdit:null!=c,triggerType:e.triggerType,onUpdateDuration:e=>{null!=e&&(t.metadata.durationSeconds=e),o(t),n.onClose()}},n),{onClose:()=>(o(null),n.onClose())}))})})}}function d(e,t,l,o){(0,r.ZDy)(async()=>{let{default:r}=await n.e("37483").then(n.bind(n,241046));return n=>(0,i.jsx)(r,a(s({},n),{automodDecision:{messageId:e,messageContent:t,decisionId:l,channel:o}}))})}function u(e,t){(0,r.ZDy)(async()=>{let{default:r}=await n.e("28382").then(n.bind(n,537623));return n=>(0,i.jsx)(r,a(s({},n),{messageId:e,guildId:t}))})}function _(e){(0,r.h7j)(t=>(0,i.jsx)(r.ConfirmModal,a(s({header:o.intl.string(o.t.wLGrjI),confirmText:o.intl.string(o.t["cY+Ooa"]),onConfirm:e,cancelText:o.intl.string(o.t["ETE/oK"])},t),{children:(0,i.jsx)(r.Text,{variant:"text-md/normal",children:o.intl.string(o.t.arYQ2d)})})))}},36459:function(e,t,n){n.d(t,{$Y:()=>N,JK:()=>T,Je:()=>O,T9:()=>m,UE:()=>R,Xx:()=>f,mm:()=>S,qY:()=>g}),n(388685);var i=n(544891),r=n(570140),l=n(367907),o=n(430824),s=n(496675),a=n(823379),c=n(709054),d=n(177862),u=n(787824),_=n(226192),h=n(981631);function E(e){return{type:e.type,metadata:(0,u.X)(e.metadata)}}function I(e){var t,n;let i=(0,u.X)(e.triggerMetadata);return null!=i&&delete i.keywordLists,{id:e.id,name:e.name,guild_id:e.guildId,event_type:e.eventType,trigger_type:e.triggerType,trigger_metadata:i,actions:e.actions.filter(a.lm).map(E),enabled:e.enabled,creator_id:e.creatorId,position:e.position,exempt_channels:Array.from(null!=(t=e.exemptChannels)?t:[]),exempt_roles:Array.from(null!=(n=e.exemptRoles)?n:[])}}function p(e){return{type:e.type,metadata:(0,u.C)(e.metadata)}}function C(e){var t,n,i;let r={id:null!=(t=e.id)?t:c.default.fromTimestamp(Date.now()),name:e.name,guildId:e.guild_id,eventType:e.event_type,triggerType:e.trigger_type,triggerMetadata:(0,u.C)(e.trigger_metadata),actions:e.actions.filter(a.lm).map(p),enabled:e.enabled,creatorId:e.creator_id,position:e.position,exemptChannels:new Set(null!=(n=e.exempt_channels)?n:[]),exemptRoles:new Set(null!=(i=e.exempt_roles)?i:[])};return null!=r.triggerMetadata&&delete r.triggerMetadata.keywordLists,r}async function g(e){let t=I(e),n=await i.tn.post({url:h.ANM.GUILD_AUTOMOD_VALIDATE_RULE(e.guildId),body:t,rejectWithError:!1});return(0,u.C)(n.body)}async function T(e){let t=I(e);return delete t.id,C((await i.tn.post({url:h.ANM.GUILD_AUTOMOD_RULES(e.guildId),body:t,rejectWithError:!1})).body)}async function O(e){let t=I(e);return C((await i.tn.patch({url:h.ANM.GUILD_AUTOMOD_RULE(e.guildId,e.id),body:t,rejectWithError:!1})).body)}async function S(e,t){return await i.tn.del({url:h.ANM.GUILD_AUTOMOD_RULE(t,e),rejectWithError:!1}),!0}async function N(e){let t=await i.tn.get({url:h.ANM.GUILD_AUTOMOD_RULES(e),rejectWithError:!1});return Array.isArray(t.body)?t.body.map(C):[]}async function f(e,t,n){s.Z.can(h.Plq.MANAGE_MESSAGES,t)&&await i.tn.post({url:h.ANM.GUILD_AUTOMOD_ALERT_ACTION(t.guild_id),body:{message_id:e,channel_id:t.id,alert_action_type:n},rejectWithError:!1})}function R(e,t,n){let r=o.Z.getGuild(e);null!=r&&s.Z.can(h.Plq.MANAGE_GUILD,r)&&(0,_.UV)(()=>{(0,l.yw)(h.rMx.GUILD_AUTOMOD_FEEDBACK,{feedback_type:d.x2.MENTION_RAID_REMOVE_RESTRICTION,decision_id:t}),i.tn.post({url:h.ANM.GUILD_AUTOMOD_CLEAR_MENTION_RAID(e),rejectWithError:!0}),n()})}function m(e){r.Z.dispatch({type:"AUTO_MODERATION_MENTION_RAID_NOTICE_DISMISS",guildId:e})}},236069:function(e,t,n){n.d(t,{Z:()=>C}),n(388685);var i=n(255367);n(73800);var r=n(442837),l=n(481060),o=n(300284),s=n(314897),a=n(271383),c=n(715903),d=n(295474),u=n(372897),_=n(526761),h=n(388032);function E(e){for(var t=1;t{if(null==e.guildId)return new Set;let t=s.default.getId();return(0,c.no)(a.ZP.getMember(e.guildId,t))},[e.guildId]);return t.has(u.q.AUTOMOD_QUARANTINED_USERNAME_OR_GUILD_NICKNAME)||t.has(u.q.AUTOMOD_QUARANTINED_BIO)?(0,i.jsx)(I,E({},e)):t.has(u.q.AUTOMOD_QUARANTINED_SERVER_TAG)?(0,i.jsx)(p,{}):(0,i.jsx)(I,E({},e))}},693546:function(e,t,n){n.d(t,{Z:()=>E});var i=n(544891),r=n(570140),l=n(668781),o=n(287734),s=n(131704),a=n(926526),c=n(826581),d=n(246364),u=n(937111),_=n(981631),h=n(388032);let E={fetchGuildJoinRequest:async e=>{let t=await i.tn.get({url:_.ANM.GUILD_JOIN_REQUEST_BY_ID(e),rejectWithError:!1}),n=(0,u.j)(t.body);return r.Z.dispatch({type:"GUILD_JOIN_REQUEST_BY_ID_FETCH_SUCCESS",joinRequest:n}),t},fetchGuildJoinRequests:async e=>{let{guildId:t,status:n=d.wB.SUBMITTED,before:l,after:o,limit:s=d.tB,force:a=!1}=e,h=a||!c.Z.hasFetched(t);if(!c.Z.isFetching()&&h){r.Z.dispatch({type:"GUILD_JOIN_REQUESTS_FETCH_START"});try{var E;let e=await i.tn.get({url:_.ANM.GUILD_JOIN_REQUESTS(t),query:{status:n,limit:s,before:l,after:o},rejectWithError:!1}),a=e.body.total,c=(null!=(E=e.body.guild_join_requests)?E:[]).map(u.j);return r.Z.dispatch({type:"GUILD_JOIN_REQUESTS_FETCH_SUCCESS",status:n,requests:c,total:a,limit:s,guildId:t}),e}catch(e){throw r.Z.dispatch({type:"GUILD_JOIN_REQUESTS_FETCH_FAILURE"}),e}}},ackUserGuildJoinRequest:async(e,t)=>{try{return await i.tn.post({url:_.ANM.GUILD_JOIN_REQUEST_ACK(e,t),rejectWithError:!1})}catch(e){}finally{r.Z.dispatch({type:"ACK_APPROVED_GUILD_JOIN_REQUEST",id:t,guildId:e})}},removeGuildJoinRequest:async e=>{try{let t=await i.tn.del({url:_.ANM.GUILD_MEMBER_REQUEST_TO_JOIN(e),rejectWithError:!1});return r.Z.dispatch({type:"USER_GUILD_JOIN_REQUEST_UPDATE",guildId:e,request:null}),t}catch(e){throw e}},updateGuildJoinRequest:async function(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:d.wB.APPROVED,s=arguments.length>4?arguments[4]:void 0;(0,a.ID)({guildId:e,actionType:o,applicationUserId:t});let c=await i.tn.patch({url:_.ANM.GUILD_JOIN_REQUEST_ID(e,n),body:{action:o,rejection_reason:s},rejectWithError:!1}).catch(e=>(e&&e.body&&e.body.code===_.evJ.REQUEST_TO_JOIN_USER_INELIGIBLE&&l.Z.show({title:h.intl.string(h.t.DxJj4e),body:h.intl.string(h.t.rSAOk5)}),Promise.reject(e)));r.Z.dispatch({type:"GUILD_JOIN_REQUEST_UPDATE",guildId:e,status:c.body.application_status,request:c.body})},actionAllPendingJoinRequests:async(e,t)=>{let n=await i.tn.patch({url:_.ANM.GUILD_JOIN_REQUESTS(e),body:{action:t},rejectWithError:!1});return r.Z.dispatch({type:"GUILD_JOIN_REQUESTS_BULK_ACTION",guildId:e,action:t}),n.body},resetGuildJoinRequest:async e=>{try{let{body:t}=await i.tn.post({url:_.ANM.GUILD_MEMBER_REQUEST_TO_JOIN(e),rejectWithError:!1});return r.Z.dispatch({type:"USER_GUILD_JOIN_REQUEST_UPDATE",guildId:e,request:t}),t}catch(e){throw e}},fetchRequestToJoinGuilds:async()=>{let e=await i.tn.get({url:_.ANM.USER_JOIN_REQUEST_GUILDS,rejectWithError:!1});r.Z.dispatch({type:"USER_JOIN_REQUEST_GUILDS_FETCH",guilds:e.body})},setSelectedApplicationTab:(e,t)=>{r.Z.dispatch({type:"GUILD_JOIN_REQUESTS_SET_APPLICATION_TAB",guildId:e,applicationTab:t})},setSelectedSortOrder:(e,t)=>{r.Z.dispatch({type:"GUILD_JOIN_REQUESTS_SET_SORT_ORDER",guildId:e,sortOrder:t})},setSelectedGuildJoinRequest:(e,t)=>{null!=t&&(0,a.Dq)({guildId:e,applicationStatus:t.applicationStatus,applicationUserId:t.userId}),r.Z.dispatch({type:"GUILD_JOIN_REQUESTS_SET_SELECTED",guildId:e,request:t})},createOrEnterJoinRequestInterview:async function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],n=await i.tn.post({url:_.ANM.GUILD_JOIN_REQUEST_INTERVIEW(e),rejectWithError:!1}),l=(0,s.q_)(n.body);return r.Z.dispatch({type:"CHANNEL_CREATE",channel:l}),t&&o.default.selectPrivateChannel(l.id),l.id},fetchJoinRequestCooldown:async e=>{try{let t=await i.tn.get({url:_.ANM.GUILD_MEMBER_JOIN_REQUEST_COOLDOWN(e),rejectWithError:!1});return r.Z.dispatch({type:"USER_GUILD_JOIN_REQUEST_COOLDOWN_FETCH",guildId:e,cooldown:t.body.cooldown}),t}catch(t){throw r.Z.dispatch({type:"USER_GUILD_JOIN_REQUEST_COOLDOWN_FETCH",guildId:e,cooldown:null}),t}}}},574650:function(e,t,n){n.d(t,{Z:()=>f}),n(539854),n(388685);var i=n(255367);n(73800);var r=n(120356),l=n.n(r);if(12633==n.j)var o=n(114858);var s=n(442837),a=n(755721),c=n(481060),d=n(430824),u=n(914010),_=n(693546),h=n(305325),E=n(246364),I=n(983736),p=n(937111),C=n(981631),g=n(176505),T=n(388032),O=n(246752),S=n(240211);function N(e){for(var t=1;t{var e,t;let r=(0,s.e7)([u.Z],()=>u.Z.getGuildId(),[]),f=(0,s.e7)([d.Z],()=>d.Z.getGuild(r),[r]),R=(0,s.e7)([p.Z],()=>null!=r?p.Z.getRequest(r):null,[r]),m=(0,o.TH)(),A=(null==(e=(0,o.LX)(m.pathname,C.Z5c.CHANNEL(null==f?void 0:f.id,g.oC.GUILD_ONBOARDING)))?void 0:e.isExact)===!0;if(null==f||!(0,I.Dc)(f)||A)return null;let P=null!=(t=null==R?void 0:R.applicationStatus)?t:E.wB.STARTED,y=null,b=null,D=null,v=[O.notice,S.notice];switch(P){case E.wB.SUBMITTED:y=T.intl.string(T.t["5iLvS0"]),b=T.intl.string(T.t.mqtdmZ),D=()=>{(0,c.h7j)(e=>{var t,n;return(0,i.jsx)(c.ConfirmModal,(t=N({header:T.intl.string(T.t.aIz1oa),confirmText:T.intl.string(T.t["cY+Ooa"]),cancelText:T.intl.string(T.t["ETE/oK"]),onConfirm:()=>_.Z.removeGuildJoinRequest(f.id),confirmButtonColor:a.zx.Colors.BRAND},e),n=n={children:(0,i.jsx)(c.Text,{variant:"text-md/normal",children:T.intl.string(T.t["13tjTU"])})},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t))})};break;case E.wB.REJECTED:y=T.intl.string(T.t.lk30cX),b=T.intl.string(T.t["8RrsHh"]),D=()=>{(0,c.ZDy)(async()=>{let{default:e}=await n.e("3378").then(n.bind(n,76075));return t=>(0,i.jsx)(e,N({guildId:f.id},t))})},v.push(O.error);break;default:y=T.intl.string(T.t.G5YKXF),b=T.intl.string(T.t["r8/DT0"]),D=()=>{(0,h.hk)(f.id)}}return(0,i.jsxs)("div",{className:l()(...v),children:[(0,i.jsx)(c.Text,{className:O.header,variant:"text-sm/normal",children:y}),(0,i.jsx)(c.zxk,{variant:"overlay-primary",size:"sm",onClick:D,text:b})]})}:null},584825:function(e,t,n){n.d(t,{GG:()=>p,HQ:()=>S,JH:()=>R,QV:()=>f,YB:()=>N,_1:()=>O,_k:()=>E,jO:()=>I,oC:()=>m,qi:()=>C,r4:()=>T,sp:()=>g}),n(388685),n(539854);var i=n(73800),r=n(442837),l=n(990169),o=n(935369),s=n(38618);n(823379);var a=n(730647),c=n(423117),d=n(289393),u=n(697227);let _=[],h=function(e){let{refetchOnMount:t=!1,includeSoftDeleted:n=!0,countryCode:o,dontFetchWhileTrue:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=(0,r.e7)([s.Z],()=>s.Z.isConnected()),_=(0,r.e7)([d.Z],()=>null!=e?d.Z.getSubscriptionGroupListingsForGuildFetchState(e):d.M.FETCHED),h=i.useRef(t);i.useEffect(()=>{if(null==e||!u||!0===a)return;let i=d.Z.getSubscriptionGroupListingsForGuildFetchState(e);(t||i===d.M.NOT_FETCHED)&&(h.current=!1,c.FP(e,{includeSoftDeleted:n,countryCode:o}))},[u,e,n,t,o,a]);let E=(0,l.Z)(h);return{listingsLoaded:_===d.M.FETCHED&&!0!==E}},E=function(e){let{includeSoftDeleted:t=!1,includeUnpublished:n=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,r.Wu)([d.Z],()=>{if(null==e)return[];let i=d.Z.getSubscriptionGroupListing(e);if(null==i)return[];let r=[];for(let e of i.subscription_listings_ids){let i=d.Z.getSubscriptionListing(e);null!=i&&(!i.soft_deleted||t)&&(i.published||n)&&r.push(i)}return r},[e,t,n])},I=e=>(0,r.e7)([d.Z],()=>null!=e?d.Z.getSubscriptionListing(e):null),p=e=>{let t=(0,a.f)("useGroupListingsForGuild");return(0,r.e7)([d.Z],()=>null!=e&&t?d.Z.getSubscriptionGroupListingsForGuild(e):_)},C=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{includeSoftDeleted:!1,sortDeletedListingsLast:!1};return h(e),(0,r.Wu)([d.Z],()=>{let n=null!=e?d.Z.getSubscriptionGroupListingsForGuild(e):_,i=[];for(let e of n)for(let n of e.subscription_listings_ids){let e=d.Z.getSubscriptionListing(n);null!=e&&(t.includeSoftDeleted||!e.soft_deleted)&&i.push(e)}return t.includeSoftDeleted&&t.sortDeletedListingsLast?[...i.filter(e=>!e.soft_deleted),...i.filter(e=>e.soft_deleted)]:i})},g=e=>{let[t,n]=i.useState(!1),l=i.useMemo(()=>e.map(u.W),[e]),o=(0,r.Wu)([d.Z],()=>l.filter(e=>!d.Z.getDidFetchListingForSubscriptionPlanId(e)),[l]);return i.useEffect(()=>{!t&&o.length>0&&(n(!0),Promise.all(o.map(e=>c.vY(e))).catch(()=>{}).then(()=>{n(!1)}))},[t,o]),{loading:t}},T=()=>{let[e,t]=i.useState(!1),[n,r]=i.useState(null);return{error:n,submitting:e,deleteSubscriptionListing:async(e,n,i)=>{try{return t(!0),r(null),await c._d(e,n,i),!0}catch(e){r(e)}finally{t(!1)}}}},O=()=>{let[e,t]=(0,o.Z)(c.AE),{loading:n,error:i}=t;return{error:i,submitting:n,archiveSubscriptionListing:e}},S=()=>{let[e,t]=i.useState(!1),[n,r]=i.useState(null);return{error:n,submitting:e,publishSubscriptionListing:async e=>{let{guildId:n,groupListingId:i,listingId:l}=e;try{return t(!0),r(null),await c.O0({guildId:n,groupListingId:i,listingId:l,data:{published:!0}}),!0}catch(e){r(e)}finally{t(!1)}},clearError:()=>r(null)}},N=e=>(0,r.e7)([d.Z],()=>null!=e?d.Z.getSubscriptionSettings(e):void 0),f=()=>{let[e,t]=i.useState(!1),[n,r]=i.useState(null);return{loading:e,updateSubscriptionsSettings:i.useCallback(async(e,n)=>{t(!0),r(null);try{await c.W2(e,n)}catch(e){r(e)}finally{t(!1)}},[]),error:n}},R=()=>{let[e,t]=i.useState(!1),[n,r]=i.useState(null);return{loading:e,fetchSubscriptionsSettings:i.useCallback(async e=>{t(!0),r(null);try{await c.Qb(e)}catch(e){r(e)}finally{t(!1)}},[]),error:n}},m=e=>(0,r.e7)([d.Z],()=>null!=e?d.Z.getSubscriptionTrial(e):null)},665302:function(e,t,n){n.d(t,{h:()=>c});var i=n(255367);n(73800);var r=n(755721),l=n(481060),o=n(671533),s=n(981631),a=n(261496);function c(e){let{buttonText:t,onGoBack:n,onDismiss:c,showCloseButton:d}=e;return(0,i.jsxs)(l.qXd,{className:a.backNotice,children:[d&&(0,i.jsx)(l.RyX,{onClick:c,noticeType:s.kVF.BACK_TO_PREVIOUS_SCREEN}),(0,i.jsxs)(r.zx,{className:a.backButton,innerClassName:a.backButtonInner,look:r.zx.Looks.OUTLINED,color:r.zx.Colors.WHITE,size:r.zx.Sizes.NONE,onClick:n,children:[(0,i.jsx)(o.Z,{width:16,height:16,direction:o.Z.Directions.LEFT,className:a.__invalid_backArrow}),t]})]})}},11868:function(e,t,n){n.d(t,{Qt:()=>L,ZP:()=>w}),n(953529);var i=n(255367),r=n(73800),l=n(120356),o=n.n(l),s=n(442837),a=n(755721),c=n(481060),d=n(447543),u=n(287734),_=n(372769),h=n(955415),E=n(922482),I=n(592125),p=n(430824),C=n(411198),g=n(15274),T=n(924301),O=n(725436),S=n(978227),N=n(236373),f=n(854698),R=n(405613),m=n(95291),A=n(742593),P=n(217804),y=n(139712),b=n(765305),D=n(388032),v=n(690606);let U=(e,t)=>n=>{n.stopPropagation(),u.default.selectVoiceChannel(e.channel_id,!1),null==t||t(n)},M=(e,t)=>n=>{let i=I.Z.getChannel(e.channel_id);null!=i&&(n.stopPropagation(),(0,E.Cq)(i),null==t||t(n))},L=(e,t)=>{switch(null==e?void 0:e.entity_type){case b.WX.STAGE_INSTANCE:return M(e,t);case b.WX.VOICE:return U(e,t)}return()=>{}},Z=(e,t)=>t&&[b.WX.STAGE_INSTANCE,b.WX.VOICE].includes(null==e?void 0:e.entity_type),k=r.memo(function(e){var t;let{guild:n,guildScheduledEvent:l,channel:o,isMember:a}=e,u=(0,s.e7)([p.Z],()=>{if(null==n)return null;let e=p.Z.getGuild(n.id);return null!=e?e:(0,C.lM)(n)?n:(0,C.Qs)(n)},[n]),E=(0,P.u)(l,o),I=r.useCallback(e=>{a&&null!=l&&(e.stopPropagation(),(0,d.Bk)(l))},[a,l]),g=r.useCallback(e=>{L(l)(e)},[l]);if(null==u)return null;let T=null==E?void 0:E.IconComponent,S=(0,i.jsxs)(i.Fragment,{children:[null!=T&&(0,i.jsx)(T,{size:"xs",color:"currentColor",className:v.channelIcon}),(0,i.jsx)(c.Text,{className:v.channelDescription,variant:"text-xs/normal",children:(0,O.m)(null!=(t=null==E?void 0:E.locationName)?t:"",!0)})]});return(0,i.jsxs)("div",{className:v.inviteDetailsContainer,children:[(0,i.jsx)(h.Z.Icon,{guild:u,onClick:I}),(0,i.jsxs)("div",{className:v.verticalContainer,children:[(0,i.jsxs)("div",{className:v.guildChannelInfoContainer,children:[(0,i.jsx)(_.Z,{guild:u,tooltipPosition:"top",tooltipColor:c.ua7.Colors.PRIMARY,size:16,className:v.guildBadge}),(0,i.jsx)(c.P3F,{className:v.guildNameClickable,onClick:I,children:(0,i.jsx)(c.X6q,{className:a?v.guildNameLinkable:v.guildName,variant:"text-sm/medium",children:u.name})})]}),(0,i.jsx)("div",{className:v.channelInfoContainer,children:Z(l,a)?(0,i.jsx)(c.P3F,{className:v.channelLocationLink,onClick:g,children:S}):S})]})]})}),j=r.memo(function(e){let{guildId:t,guildScheduledEventId:n,recurrenceId:r,isActive:l,isEnded:o,isMember:d,isExternal:u,onAcceptInstantInvite:_,onTransitionToInviteChannel:h}=e,E=(0,s.e7)([T.ZP],()=>T.ZP.isInterestedInEventRecurrence(n,r),[n,r]),I=e=>{e.stopPropagation(),d?l&&h():_()};return d?l?(0,i.jsx)(a.zx,{className:v.button,size:a.zx.Sizes.SMALL,onClick:e=>{u||I(e)},color:u?a.zx.Colors.TRANSPARENT:a.zx.Colors.GREEN,children:u?D.intl.string(D.t.GoCQxc):D.intl.string(D.t.XpeFYm)}):o?(0,i.jsx)(a.zx,{className:v.button,size:a.zx.Sizes.SMALL,disabled:!0,color:a.zx.Colors.PRIMARY,look:a.zx.Looks.OUTLINED,children:D.intl.string(D.t.Pj7Xrq)}):(0,i.jsxs)(a.zx,{className:v.button,innerClassName:v.innerButton,size:a.zx.Sizes.SMALL,color:a.zx.Colors.PRIMARY,look:E?a.zx.Looks.OUTLINED:a.zx.Looks.FILLED,onClick:e=>{e.stopPropagation(),(0,y.Z)(n,r,t)},children:[E?(0,i.jsx)(c.dz2,{size:"xs",color:"currentColor",className:v.buttonIcon}):(0,i.jsx)(c.Dkj,{size:"xs",color:"currentColor",className:v.buttonIcon}),D.intl.string(D.t.DlcqlZ)]}):(0,i.jsx)(a.zx,{className:v.button,size:a.zx.Sizes.SMALL,onClick:I,color:a.zx.Colors.GREEN,children:D.intl.string(D.t.XpeFYm)})}),w=r.memo(function(e){var t;let{guildScheduledEvent:n,guild:l,channel:s,isMember:a,recurrenceId:d,onAcceptInstantInvite:u,onTransitionToInviteChannel:_}=e,E=null!=d?d:null!=n?(0,f.DK)(n):null,I=(null==n?void 0:n.recurrence_rule)==null||null==E||(0,f.Rp)((0,N.KV)(null==n?void 0:n.recurrence_rule),E),p=(0,S.Z)(n),C=r.useCallback(()=>{a&&null!=n&&(0,g.bO)({eventId:n.id,recurrenceId:E})},[a,n,E]);if(null==n||!I)return null;let O=(0,T.xt)(n),P=(0,T.Z2)(n),y=n.entity_type===b.WX.EXTERNAL;return(0,i.jsx)(h.Z,{className:o()({[v.clickable]:a}),children:(0,i.jsxs)(c.P3F,{onClick:C,children:[null!=n.image&&(0,i.jsx)(m.Z,{source:(0,R.Z)(n),className:v.banner}),(0,i.jsx)(A.ZP,{name:n.name,description:null!=(t=n.description)?t:void 0,descriptionClassName:v.eventDescription,guildId:n.guild_id,creator:p,guildEvent:n,eventPreview:n,recurrenceId:E}),(0,i.jsxs)("div",{className:v.footerContainer,children:[(0,i.jsx)(k,{guild:l,channel:s,guildScheduledEvent:n,isMember:a}),(0,i.jsx)(j,{isActive:O,isEnded:P,isMember:a,guildId:n.guild_id,guildScheduledEventId:n.id,recurrenceId:E,onAcceptInstantInvite:u,onTransitionToInviteChannel:_,isExternal:y})]})]})})})},540126:function(e,t,n){n.d(t,{Bz:()=>eg,Cb:()=>Y,Fq:()=>K,PB:()=>J,VR:()=>eo,ZP:()=>et,p2:()=>X,wF:()=>$,wZ:()=>q,wd:()=>Q,zR:()=>eT}),n(388685),n(415506),n(539854),n(361932),n(187205),n(290780),n(642613);var i=n(512722),r=n.n(i),l=n(392711),o=n.n(l),s=n(317381),a=n(812206),c=n(12498),d=n(430198),u=n(931261),_=n(924301),h=n(160404),E=n(798423),I=n(18036),p=n(798379),C=n(398758),g=n(22082),T=n(893908),O=n(953252),S=n(601070),N=n(569471),f=n(131704),R=n(680089),m=n(592125),A=n(58468),P=n(430824),y=n(496675),b=n(306680),D=n(944486),v=n(9156),U=n(979651),M=n(938475),L=n(823379),Z=n(709054),k=n(968358),j=n(203818),w=n(295454),x=n(443063),F=n(981631),G=n(176505),V=n(231338);function B(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W(e){for(var t=1;t!ee.has(e)),t)}_areChannelNoticeRowsUpdated(e,t){var n;return!o().isEqual(null==(n=this.guilds[e])?void 0:n.getChannelNoticeSection().getRows(),t)}getGuild(e,t,n){return(!(e in this.guilds)||this._areGuildActionRowsUpdated(e,t)||this._areChannelNoticeRowsUpdated(e,n))&&(this.guilds[e]=new en(e,t,n)),this.guilds[e]}getGuildChannelRowsOnly(e){return e in this.guilds||(this.guilds[e]=new en(e,[],[])),this.guilds[e]}clear(){this.guilds={}}clearGuildId(e){return null!=e&&e in this.guilds&&(delete this.guilds[e],!0)}updateRecentsCategory(e){var t,n;return null!=e&&e in this.guilds&&null!=(n=null==(t=this.guilds[e])?void 0:t.updateRecentsCategory())&&n}nonPositionalChannelIdUpdate(e){let t=m.Z.getBasicChannel(e);return null!=t&&null!=t.guild_id&&null!=this.guilds[t.guild_id]&&(t instanceof f.Sf||null!=(t=m.Z.getChannel(e)))&&this.nonPositionalChannelUpdate(t)}nonPositionalChannelUpdate(e){if(null==e.guild_id)return!1;let t=this.guilds[e.guild_id];if(null==t)return!1;let n=!1;return e.isThread()&&(n=this.nonPositionalChannelIdUpdate(e.parent_id)),t.nonPositionalChannelUpdate(e)||n}updateSubtitles(e,t){(null==e?Object.values(this.guilds):e in this.guilds?[this.guilds[e]]:[]).forEach(e=>e.updateSubtitles(t))}constructor(){B(this,"guilds",{})}}class en{get initializationData(){return{selectedChannel:m.Z.getChannel(D.Z.getChannelId()),selectedVoiceChannelId:D.Z.getVoiceChannelId(),activeJoinedRelevantThreads:S.Z.getActiveJoinedRelevantThreadsForGuild(this.id),activeJoinedUnreadThreads:S.Z.getActiveJoinedUnreadThreadsForGuild(this.id)}}invalidate(){this.sections=null,this.rows=null,this.sortedNamedCategories=null,this.firstVoiceChannel=void 0,this.version++}getSortedNamedCategories(){return null==this.sortedNamedCategories&&this.getRows(),this.sortedNamedCategories}getSortedCategories(){return[this.favoritesCategory,this.recentsCategory,this.noParentCategory,...this.getSortedNamedCategories(),this.voiceChannelsCategory]}getSections(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(null==this.sections&&(this.sections=this.getRows().map(e=>e.length)),e)?[...this.sections]:this.sections}getRows(){if(null==this.rows){this.sortedNamedCategories=o().sortBy(Object.values(this.categories),e=>e.record.position),this.rows=[this.channelNoticeSection,this.guildActionSection,this.favoritesCategory,this.recentsCategory,this.noParentCategory,...this.sortedNamedCategories,this.voiceChannelsCategory].map(e=>e.getRows());let e=0;for(let t of[this.noParentCategory,...this.sortedNamedCategories])for(let n of(t.position=++e,t.getShownChannelIds()))t.channels[n].position=++e}return this.rows}getCategoryFromSection(e){switch(e){case K:throw Error("Invalid section. Use getChannelNoticeSection instead");case q:throw Error("Invalid section. Use getGuildActionSection instead");case X:return this.favoritesCategory;case Q:return this.noParentCategory;case this.recentsSectionNumber:return this.recentsCategory;case this.voiceChannelsSectionNumber:return this.voiceChannelsCategory;default:return this.getSortedNamedCategories()[e-$]}}getNamedCategoryFromSection(e){return e-=$,r()(e>=0&&eq,"Invalid section"),e!==this.recentsSectionNumber&&this.getRows()[e][t]===z}getFirstVoiceChannel(e){if(void 0===this.firstVoiceChannel){if(this.firstVoiceChannel=this.favoritesCategory.getFirstVoiceChannel(e),null!=this.firstVoiceChannel||(this.firstVoiceChannel=this.noParentCategory.getFirstVoiceChannel(e),null!=this.firstVoiceChannel))return this.firstVoiceChannel;for(let t of this.getSortedNamedCategories())if(null!=t.getFirstVoiceChannel(e)){this.firstVoiceChannel=t.getFirstVoiceChannel(e);break}}return this.firstVoiceChannel}getSectionRowsFromChannel(e){let t=function(e){if(null==e)return null;if(ef.has(e))return e;let t=m.Z.getChannel(e);return(null==t?void 0:t.isDirectory())?x.z.GUILD_DIRECTORY:null}(e);if(null!=t)return[{row:this.getGuildActionSection().getRows().indexOf(t),section:q}];let n=[],i=m.Z.getChannel(e);if(null==i||null==e)return n;let r=i.isThread();if(r&&(i=m.Z.getChannel(i.parent_id)),null==i)return n;let l=this.favoritesCategory.getShownChannelIds().indexOf(i.id);l>=0&&n.push({section:X,row:l});let s=this.recentsCategory.getShownChannelIds().indexOf(i.id);if(s>=0&&n.push({section:this.recentsSectionNumber,row:s}),i.type===F.d4z.GUILD_CATEGORY)return[{section:o().findIndex(this.getSortedNamedCategories(),e=>e.id===(null==i?void 0:i.id))+$}];let a=this.getCategory(i),c=a instanceof er?Q:this.getSortedNamedCategories().indexOf(a)+$,d=a.getShownChannelIds().indexOf(i.id);if(c>=0&&d>=0){let t=r?a.channels[i.id].threadIds.indexOf(e):0;n.push({section:c,row:d,threadOffset:t})}let u=this.voiceChannelsCategory.getShownChannelIds().indexOf(i.id);return u>=0&&n.push({section:this.voiceChannelsSectionNumber,row:u}),n}getCategory(e){return null!=e.parent_id&&e.parent_id in this.categories?this.categories[e.parent_id]:this.noParentCategory}updateRecentsCategory(){let e=this.recentsCategory.updateAllChannels(this.initializationData);return e&&this.invalidate(),e}nonPositionalChannelUpdate(e){let t=this.initializationData,n=this.getCategory(e).updateChannel(e,t);return this.favoritesCategory.updateChannel(e,t)&&(n=!0),this.recentsCategory.updateChannel(e,t)&&(n=!0),this.voiceChannelsCategory.updateChannel(e,t)&&(n=!0),n&&this.invalidate(),n}getSlicedChannels(e,t){r()(e.length>0,"must have at least one channel in the slice");let n=e[0],i=e[e.length-1],l=!0,o=!1,s=[],a=[];for(let e of this.getSortedCategories()){let r=(null==t?void 0:t.ignoreRecents)&&e===this.recentsCategory;for(let t of e.getShownChannelIds()){let c=e.channels[t];l&&(c.id===n.id?l=!1:r||s.push(c)),o&&!r&&a.push(c),l||o||c.id!==i.id||(o=!0)}}return[s,e,a]}_initializeAllChannelsById(){if(null==this.allChannelsById)for(let e of(this.allChannelsById={},this.getSortedCategories()))for(let t in e.channels)this.allChannelsById[t]=e.channels[t];return this.allChannelsById}getChannels(e){let t=[],n=this._initializeAllChannelsById();for(let i of e)null!=n[i]&&t.push(n[i]);return t}getChannel(e){var t;return null!=(t=this._initializeAllChannelsById()[e])?t:null}updateSubtitles(e){let t=[];if(null!=e){let n=m.Z.getChannel(e);if(null!=n)if(n.id in this.favoritesCategory.channels)t=[this.favoritesCategory.channels[n.id]];else if(n.id in this.recentsCategory.channels)t=[this.recentsCategory.channels[n.id]];else{let i=this.getCategory(n);null!=i&&null!=i.channels[e]&&(t=[i.channels[e]])}}else t=o()(this.getSortedCategories()).map(e=>Object.values(e.channels)).flatten().value();let n=!1;return t.forEach(e=>{e.updateSubtitle()&&(n=!0)}),n&&this.version++,n}forEachShownChannel(e,t){for(let n of this.getSortedCategories())if(null==t||!t.ignoreRecents||n!==this.recentsCategory)for(let t of n.getShownChannelIds()){let i=n.channels[t];for(let t of(e(i.record),i.threadIds)){let n=m.Z.getChannel(t);null!=n&&e(n)}}}forEachChannel(e,t){for(let n of this.getSortedCategories())if(null==t||!t.ignoreRecents||n!==this.recentsCategory)for(let t of n.getChannelRecords())e(t)}constructor(e,t,n){var i,l;B(this,"id",void 0),B(this,"hideMutedChannels",void 0),B(this,"favoritesSectionNumber",void 0),B(this,"recentsSectionNumber",void 0),B(this,"voiceChannelsSectionNumber",void 0),B(this,"mutedChannelIds",void 0),B(this,"optedInChannels",void 0),B(this,"optInEnabled",void 0),B(this,"hideResourceChannels",void 0),B(this,"favoriteChannelIds",void 0),B(this,"suggestedFavoriteChannelId",void 0),B(this,"collapsedCategoryIds",void 0),B(this,"moderatorReportChannelId",void 0),B(this,"moderatorReportChannelEnabled",void 0),B(this,"categories",void 0),B(this,"noParentCategory",void 0),B(this,"favoritesCategory",void 0),B(this,"recentsCategory",void 0),B(this,"voiceChannelsCategory",void 0),B(this,"guildActionSection",void 0),B(this,"channelNoticeSection",void 0),B(this,"sortedNamedCategories",void 0),B(this,"sections",void 0),B(this,"rows",void 0),B(this,"firstVoiceChannel",void 0),B(this,"allChannelsById",void 0),B(this,"version",void 0),this.id=e,this.sortedNamedCategories=null,this.sections=null,this.rows=null,this.firstVoiceChannel=void 0,this.allChannelsById=null,this.version=0,this.hideMutedChannels=v.ZP.isGuildCollapsed(this.id),this.mutedChannelIds=v.ZP.getMutedChannels(this.id),this.optedInChannels=null!=(i=v.ZP.getOptedInChannelsWithPendingUpdates(this.id))?i:v.ZP.getOptedInChannels(this.id),this.optInEnabled=(0,C.r1)(this.id),this.hideResourceChannels=(0,u.s)(this.id),this.favoriteChannelIds=new Set(null!=(l=v.ZP.getGuildFavorites(this.id))?l:[]),this.suggestedFavoriteChannelId=I.Z.getSuggestedChannelId(this.id),this.collapsedCategoryIds=R.Z.getCollapsedCategories();let s=m.Z.getMutableGuildChannelsForGuild(this.id),a=P.Z.getGuild(this.id);this.moderatorReportChannelId=null!=a?(0,T.Z)(a):null,this.moderatorReportChannelEnabled=null!=a&&(0,O.Z)(a);let c={},d=[],_={};for(let e in s){let t=s[e];t.type===F.d4z.GUILD_CATEGORY&&(c[t.id]=t,_[t.id]=[])}let h=[],p=[],g=[],S=this.initializationData;for(let e in s){let t=s[e];if(t.type!==F.d4z.GUILD_CATEGORY){if(t.type===F.d4z.GUILD_DIRECTORY){null==a||a.features.has(F.oNc.HUB)||g.push(t);continue}eN(this,t,S)?h.push(t):(t.type===F.d4z.GUILD_VOICE||t.type===F.d4z.GUILD_STAGE_VOICE)&&(null!=t.parent_id&&null!=c[t.parent_id]&&p.push(c[t.parent_id]),p.push(t)),null!=t.parent_id&&t.parent_id in _?_[t.parent_id].push(t):d.push(t)}}for(let e in this.categories={},_)this.categories[e]=new el(this,c[e],_[e],S);this.recentsSectionNumber=J,this.favoritesSectionNumber=X,this.noParentCategory=new er(this,d,S),this.favoritesCategory=new eo(this,S),this.recentsCategory=(0,E.Q)()?new es(this,s,S):new ea(this,h,S),this.voiceChannelsCategory=new ec(this,p,c,S),this.guildActionSection=new eu(t,g.length>0),this.channelNoticeSection=new ed(n),r()(!("null"in this.categories),"somehow a null got into categories"),this.voiceChannelsSectionNumber=$+o().size(this.categories)}}class ei{updateChannel(e,t){return!!(e.id in this.channels&&this.channels[e.id].updateChannel(e,t))&&(this.invalidate(),!0)}invalidate(){this.shownChannelIds=null}getRows(){let e=this.getShownChannelIds();return 0===e.length&&this.shouldShowEmptyCategory()?[z]:e}shouldShowEmptyCategory(){return o().some(this.channels,e=>e.renderLevel>=3)}getShownChannelIds(){return null==this.shownChannelIds&&(this.shownChannelIds=o()(this.channels).values().filter(e=>4===e.renderLevel).sortBy(e=>{let{record:t}=e;return t.isGuildVocal()?t.position+1e4:t.position}).map(e=>e.id).value()),this.shownChannelIds}getShownChannelAndThreadIds(){let e=o()(this.channels).values().flatMap(e=>e.threadIds).value();return this.getShownChannelIds().concat(e)}isEmpty(){return 0===this.getShownChannelIds().length}getChannelRecords(){return o()(this.channels).values().filter(e=>e.renderLevel>1).map(e=>e.record).value()}getFirstVoiceChannel(e){for(let t of this.getShownChannelIds())if(e&&this.channels[t].record.isGuildStageVoice())return this.channels[t];else if(!e&&this.channels[t].record.isGuildVocal())return this.channels[t];return null}constructor(e){B(this,"guild",void 0),B(this,"isMuted",void 0),B(this,"isCollapsed",void 0),B(this,"position",void 0),B(this,"channels",void 0),B(this,"shownChannelIds",void 0),this.guild=e,this.isMuted=!1,this.isCollapsed=!1,this.position=-1,this.channels={},this.shownChannelIds=null}}class er extends ei{constructor(e,t,n){super(e),this.channels=o()(t).map(e=>new eh(this,e,n)).keyBy(e=>e.id).value()}}class el extends ei{shouldShowEmptyCategory(){return!!(super.shouldShowEmptyCategory()||y.Z.can(V.Pl.MANAGE_CHANNELS,this.record)&&y.Z.can(V.Pl.VIEW_CHANNEL,this.record)&&o().isEmpty(this.channels)&&(!this.guild.optInEnabled||this.guild.optedInChannels.has(this.id)))}constructor(e,t,n,i){for(let r of(super(e),B(this,"id",void 0),B(this,"record",void 0),this.record=t,this.id=t.id,this.isCollapsed=!0===e.collapsedCategoryIds[t.id],this.isMuted=e.mutedChannelIds.has(t.id),this.channels={},n))this.channels[r.id]=new eh(this,r,i)}}class eo extends ei{updateChannel(e,t){let n=e.id in this.channels&&v.ZP.isFavorite(e.guild_id,e.id),i=I.Z.getSuggestedChannelId(e.guild_id);return(e.id!==i||n||(t=H(W({},t),{activeJoinedRelevantThreads:{},activeJoinedUnreadThreads:{}})),e.id in this.channels&&this.channels[e.id].updateChannel(e,t))?(this.invalidate(),!0):e.id in this.channels&&e.id!==i&&!n&&(delete this.channels[e.id],this.invalidate(),!0)}getFirstVoiceChannel(e){return null}constructor(e,t){var n;if(super(e),!e.optInEnabled)return;this.channels=o()(null!=(n=v.ZP.getGuildFavorites(e.id))?n:[]).map(e=>m.Z.getChannel(e)).filter(L.lm).map(e=>new eE(this,e,t)).keyBy(e=>e.id).value();let i=I.Z.getSuggestedChannelId(e.id),r=m.Z.getChannel(i);null!=r&&null!=i&&(this.channels[i]=new eE(this,r,H(W({},t),{activeJoinedRelevantThreads:{},activeJoinedUnreadThreads:{}})))}}class es extends ei{shouldShowEmptyCategory(){return this.enabled&&this.isCollapsed&&super.shouldShowEmptyCategory()}updateAllChannels(e){return Object.values(this.channels).reduce((t,n)=>this.updateChannel(n.record,e)||t,!1)}updateChannel(e,t){if(!this.enabled)return!1;if((0,f.Q5)(e.type)){let t=this.channels[e.parent_id];return null!=t&&this.updateShownChannelIds(t)}if(!(0,f.vc)(e.type))return!1;let n=super.updateChannel(e,t),i=this.channels[e.id];return null==i?(i=new ep(this,e,t),this.channels[e.id]=i,this.invalidate(),!0):this.updateShownChannelIds(i)||n}getFirstVoiceChannel(e){return null}getShownChannelIds(){if(null==this.shownChannelIds){let e=this.isCollapsed?4:3;this.shownChannelIds=this.enabled?o()(this.channels).filter(t=>t.renderLevel>=e).map(e=>[e.id,e.lastMessageTimestamp,e.renderLevel]).filter(e=>{let[,t,n]=e;return 4===n||t>0&&Date.now()-t{let[,t,n]=e;return-(t-(4===n?0:Z.DISCORD_EPOCH))}).take(es.MAX_RECENT_CHANNELS).sortBy(e=>{let[,t]=e;return-t}).map(e=>{let[t]=e;return t}).value():[]}return this.shownChannelIds}updateShownChannelIds(e){var t;let n=this.isCollapsed?4:3;if(null==this.shownChannelIds||e.renderLevel(null==(t=this.channels[this.shownChannelIds[0]])?void 0:t.lastMessageTimestamp)){let t=this.shownChannelIds.indexOf(e.id);return t>-1&&this.shownChannelIds.splice(t,1),this.shownChannelIds.splice(0,0,e.id),this.shownChannelIds.length>es.MAX_RECENT_CHANNELS&&(this.shownChannelIds=this.shownChannelIds.slice(0,es.MAX_RECENT_CHANNELS)),!0}return!1}constructor(e,t,n){if(super(e),B(this,"enabled",!1),this.isCollapsed=p.Z.isCollapsed(e.id),this.enabled=!1,this.enabled)for(let e of Object.values(t))(0,f.vc)(e.type)&&!(0,f.Q5)(e.type)&&(this.channels[e.id]=new ep(this,e,n))}}B(es,"MIN_READABLE_CHANNELS",7),B(es,"MAX_RECENT_CHANNELS",10),B(es,"MAX_TIMESTAMP_DELTA",6048e5);class ea extends ei{updateAllChannels(e){let t=!1;return Z.default.keys(this.channels).forEach(n=>{this.updateChannel(this.channels[n].record,e)&&(t=!0)}),t}updateChannel(e,t){let n=super.updateChannel(e,t);if(this.guild.optInEnabled){let n=this.channels[e.id],i=eN(this.guild,e,t);if(i&&null==n)return this.channels[e.id]=new eI(this,e,t),this.invalidate(),!0;if(!i&&null!=n)return delete this.channels[e.id],this.invalidate(),!0}return n}getFirstVoiceChannel(e){return null}getShownChannelIds(){if(null==this.shownChannelIds){let e=o()(this.channels).values().filter(e=>4===e.renderLevel||3===e.renderLevel),t=e.sortBy(e=>{let{record:t}=e;return t.position}).take(5).value(),n=new Set([...e.filter(e=>4===e.renderLevel).value(),...t]);this.shownChannelIds=o()([...n]).sortBy(e=>{let{record:t}=e;return t.position}).map(e=>e.id).value()}return this.shownChannelIds}constructor(e,t,n){if(super(e),!e.optInEnabled||h.Z.isFullServerPreview(e.id))return;this.isCollapsed=!1,this.isMuted=!1,this.channels=o()(t).map(e=>new eI(this,e,n)).keyBy(e=>e.id).value()}}class ec extends ei{invalidate(){super.invalidate(),this.hiddenChannelIds=null}getHiddenChannelIds(){if(!this.guild.optInEnabled)return[];if(null==this.hiddenChannelIds){let e=o()(this.channels).filter(e=>3===e.renderLevel).value();if(e.every(e=>e.record.isCategory()))return this.hiddenChannelIds=[],this.hiddenChannelIds;this.hiddenChannelIds=e.map(e=>e.id)}return this.hiddenChannelIds}getRows(){if(!this.guild.optInEnabled)return[];let e=this.getShownChannelIds();return 0===e.length&&this.getHiddenChannelIds().length>0?[z]:e}getShownChannelIds(){if(!this.guild.optInEnabled)return[];if(null==this.shownChannelIds){let t=o()(this.channels).filter(e=>4===e.renderLevel).orderBy([e=>(function(e,t){if(e.record.type===F.d4z.GUILD_CATEGORY)return e.record.position;if(null!=e.record.parent_id){var n,i;return null!=(i=null==(n=t[e.record.parent_id])?void 0:n.position)?i:-1}return -1})(e,this.categoriesById),e=>e.record.type===F.d4z.GUILD_CATEGORY?-1:e.record.position],["asc","asc"]).value();this.shownChannelIds=[];for(let n=0;nnew eC(this,e,i)).keyBy(e=>e.id).value()}}class ed{isEmpty(){return 0===this.rows.length}getRows(){return this.rows}getRow(e){return this.rows[e]}constructor(e){B(this,"rows",void 0),this.rows=e}}class eu{isEmpty(){return 0===this.guildActionRows.length}getRows(){return this.guildActionRows}getRow(e){return this.guildActionRows[e]}constructor(e,t){B(this,"guildActionRows",void 0),this.guildActionRows=e.map(String),t&&this.guildActionRows.push(String(x.z.GUILD_DIRECTORY))}}class e_{get isMuted(){return this.category.guild.mutedChannelIds.has(this.id)}get isCollapsed(){return A.Z.isCollapsed(this.id)}get isFirstVoiceChannel(){return this.category.getFirstVoiceChannel()===this}get lastMessageTimestamp(){return Math.max(b.ZP.lastMessageTimestamp(this.id),...this.threadIds.map(b.ZP.lastMessageTimestamp))}updateChannel(e,t){let n=!1;null!=e&&e!==this.record&&(this.record=e,n=!0);let i=this.computeState(t);return i.renderLevel===this.renderLevel&&o().isEqual(i.threadIds,this.threadIds)||(this.renderLevel=i.renderLevel,this.threadIds=i.threadIds,this.threadCount=o().size(i.threadIds),n=!0),4===this.renderLevel&&this.updateSubtitle()&&(n=!0),n}updateSubtitle(){let e=this.computeSubtitle();return!o().isEqual(this.subtitle,e)&&(this.subtitle=e,!0)}computeSubtitle(){return eg(this.record,this.isCollapsed||this.category.isCollapsed,this.category.guild.optInEnabled)}constructor(e,t,n){B(this,"category",void 0),B(this,"record",void 0),B(this,"id",void 0),B(this,"position",void 0),B(this,"threadIds",void 0),B(this,"threadCount",void 0),B(this,"subtitle",void 0),B(this,"renderLevel",void 0),this.category=e,this.record=t,this.position=-1,this.threadIds=[],this.threadCount=0,this.subtitle=null,this.renderLevel=1,this.id=t.id;let{renderLevel:i,threadIds:r}=this.computeState(n);this.renderLevel=i,this.threadCount=o().size(r),this.threadIds=r,4===i&&(this.subtitle=this.computeSubtitle())}}class eh extends e_{computeState(e){var t;let{selectedChannel:n,selectedVoiceChannelId:i,activeJoinedRelevantThreads:r,activeJoinedUnreadThreads:l}=e;if(!y.Z.can(V.Pl.VIEW_CHANNEL,this.record)){if(this.id===i)return{renderLevel:4,threadIds:[]};else if(!d.Z.isChannelGatedAndVisible(this.record.guild_id,this.record.id))return{renderLevel:1,threadIds:[]}}let s=this.record.parent_id,a=this.category.guild;if(eO(a,this.record))return{renderLevel:1,threadIds:[]};let c=(null==n?void 0:n.id)===this.id||i===this.id,u=null!=n&&n.isThread()&&n.parent_id===this.id,_=null!=(t=c||u||!this.category.isCollapsed&&!this.isMuted?r[this.id]:l[this.id])?t:{},h=eT(this.record,_,n,i,a.hideMutedChannels);return this.id!==a.moderatorReportChannelId||a.moderatorReportChannelEnabled?a.optInEnabled&&a.hideResourceChannels&&this.record.hasFlag(G.zZ.IS_GUILD_RESOURCE_CHANNEL)?{renderLevel:c?4:1,threadIds:h}:!a.optInEnabled||a.optedInChannels.has(this.id)||null!=s&&a.optedInChannels.has(s)?c||u||!o().isEmpty(h)||b.ZP.getMentionCount(this.id)>0?{renderLevel:4,threadIds:h}:a.hideMutedChannels&&a.mutedChannelIds.has(this.id)?{renderLevel:2,threadIds:h}:this.category.isCollapsed&&(a.mutedChannelIds.has(this.id)||null!=s&&a.mutedChannelIds.has(s)||this.record.isGuildVocal()||this.record.type===F.d4z.GUILD_STORE||(0,f.vc)(this.record.type)&&!b.ZP.hasUnread(this.record.id))?{renderLevel:3,threadIds:h}:{renderLevel:4,threadIds:h}:{renderLevel:2,threadIds:h}:{renderLevel:2,threadIds:h}}}class eE extends e_{computeState(e){var t;let{selectedChannel:n,selectedVoiceChannelId:i,activeJoinedRelevantThreads:r}=e;return y.Z.can(V.Pl.VIEW_CHANNEL,this.record)?{renderLevel:4,threadIds:eT(this.record,null!=(t=r[this.id])?t:{},n,i,!1)}:{renderLevel:1,threadIds:[]}}}class eI extends e_{computeState(e){var t;let{selectedChannel:n,selectedVoiceChannelId:i,activeJoinedRelevantThreads:r}=e;return y.Z.can(V.Pl.VIEW_CHANNEL,this.record)?{renderLevel:eS(this,e)?4:3,threadIds:eT(this.record,null!=(t=r[this.id])?t:{},n,i,!1)}:{renderLevel:1,threadIds:[]}}}class ep extends eh{computeState(e){let{renderLevel:t,threadIds:n}=super.computeState(e);if(t>1){let i=this.record.parent_id,r=this.category.guild;r.mutedChannelIds.has(this.id)||null!=i&&r.mutedChannelIds.has(i)?t=2:4===t?t=3:2===t&&eN(this.category.guild,this.record,e)&&(t=3),3===t&&eS(this,e)&&(t=4),n=o().sortBy(n,e=>-b.ZP.lastMessageTimestamp(e))}return{renderLevel:t,threadIds:n}}}class eC extends eh{getRenderLevel(e){let t=this.category.guild;return!y.Z.can(V.Pl.VIEW_CHANNEL,this.record)||4===e||3===e||eO(t,this.record)?1:this.category.isCollapsed?o().some(U.Z.getVoiceStatesForChannel(this.record.id))?4:3:4}computeState(e){let t=super.computeState(e),n=this.getRenderLevel(t.renderLevel);return 4===n&&(this.subtitle=eg(this.record,this.isCollapsed||this.category.isCollapsed,this.category.guild.optInEnabled)),{threadIds:[],renderLevel:n}}}function eg(e,t,n){switch(e.type){case F.d4z.GUILD_VOICE:{let i=_.ZP.getActiveEventByChannel(e.id);if(null!=i)return{type:"event",name:i.name};let r=M.ZP.getVoiceStatesForChannel(e);if(n&&t&&(0,k.a)(r))return{type:"go-live"};let l=c.Z.getChannelStatus(e);if(null!=l&&l.length>0)return{type:"voice",text:l};let o=s.ZP.getEmbeddedActivitiesForChannel(e.id).map(e=>{var t;return null==(t=a.Z.getApplication(e.applicationId))?void 0:t.name}).filter(L.lm);if(o.length>0)return{type:"embedded-activities",name:o.join(", ")};return null}case F.d4z.GUILD_STAGE_VOICE:{let t=_.ZP.getActiveEventByChannel(e.id);if(null!=t)return{type:"event",name:t.name};return null}default:return null}}function eT(e,t,n,i,r){let l=null!=n&&(n.id===e.id||i===e.id),s=null!=n&&n.isThread()&&n.parent_id===e.id;if(f.uC.has(e.type)){let e=o().sortBy(Object.values(t),e=>-e.joinTimestamp).map(e=>e.channel.id);return l?e:s?(n.id in t||e.unshift(n.id),e):r?e.filter(e=>!N.Z.isMuted(e)||b.ZP.getMentionCount(e)>0):e}return[]}function eO(e,t){return e.favoriteChannelIds.has(t.id)&&(e.optInEnabled||!1)}function eS(e,t){let{selectedChannel:n,activeJoinedRelevantThreads:i}=t;if(b.ZP.getMentionCount(e.id)>0)return!0;for(let t in i[e.id])if(b.ZP.getMentionCount(t)>0)return!0;if(null!=n&&(n.id===e.id||n.isThread()&&n.parent_id===e.id))return!0;let r=g.Z.getNewChannelIds(e.category.guild.id);if(r.size>Y);else if(r.has(e.id))return!0;return!1}function eN(e,t,n){let{selectedChannel:i,activeJoinedRelevantThreads:r}=n;if(t.type===F.d4z.GUILD_DIRECTORY||!e.optInEnabled||t.isGuildVocal()&&!(0,w.K)("should_show_in_recents")||e.optedInChannels.has(t.id)||t.isThread()||null!=t.parent_id&&e.optedInChannels.has(t.parent_id)||e.hideResourceChannels&&t.hasFlag(G.zZ.IS_GUILD_RESOURCE_CHANNEL))return!1;if(null!=i&&(i.id===t.id||i.isThread()&&i.parent_id===t.id)||b.ZP.getMentionCount(t.id)>0)return!0;for(let e in r[t.id])if(b.ZP.getMentionCount(e)>0||b.ZP.hasUnread(e)||b.ZP.hasRecentlyVisitedAndRead(e))return!0;if(e.mutedChannelIds.has(t.id)||null!=t.parent_id&&e.mutedChannelIds.has(t.parent_id))return!1;let l=g.Z.getNewChannelIds(e.id),o=Array.from(l).sort((e,t)=>Z.default.compare(t,e));return!!(l.has(t.id)&&o.indexOf(t.id)r});var i,r=((i={}).GUILD_PREMIUM_PROGRESS_BAR="guild-premium-progress-bar",i.GUILD_SCHEDULED_EVENTS="guild-scheduled-events",i.GUILD_HUB_HEADER_OPTIONS="guild-hub-header-options",i.GUILD_FAVORITES="favorites",i.GUILD_CHANNEL_LIST_OPT_IN_NOTICE="guild-channel-list-opt-in-notice",i.GUILD_ROLE_SUBSCRIPTIONS="role-subscriptions",i.GUILD_SHOP="shop",i.GUILD_HOME="@home",i.CHANNELS_AND_ROLES="channels-and-roles",i.BROWSE_CHANNELS="browse-channels",i.GUILD_DIRECTORY="guild-directory",i.GUILD_NEW_MEMBER_ACTIONS_PROGRESS_BAR="guild-new-member-actions-progress-bar",i.GUILD_MOD_DASH_MEMBER_SAFETY="guild-mod-dash-member-safety",i.GUILD_BOOSTS="guild-boosts",i)},918658:function(e,t,n){n.d(t,{Z:()=>M,d:()=>L});var i=n(255367),r=n(73800),l=n(120356),o=n.n(l),s=n(442837),a=n(692547),c=n(755721),d=n(481060),u=n(549817),_=n(819553),h=n(17181),E=n(303737),I=n(434404),p=n(703656),C=n(944486),g=n(914010),T=n(671533),O=n(259580),S=n(358085),N=n(962086),f=n(160404),R=n(889695),m=n(981631),A=n(176505),P=n(302463),y=n(293810),b=n(388032),D=n(800515);function v(e){let{className:t,onClick:n,children:r,buttonRef:l}=e;return(0,i.jsx)(c.zx,{buttonRef:l,className:o()(D.button,t),innerClassName:D.buttonInner,look:c.zx.Looks.OUTLINED,color:c.zx.Colors.WHITE,size:c.zx.Sizes.NONE,onClick:n,children:r})}function U(e){let{onClick:t}=e;return(0,i.jsx)(v,{onClick:t,children:b.intl.string(b.t.R9GHyc)})}function M(){let e=r.useRef(null),t=(0,s.e7)([g.Z],()=>g.Z.getGuildId()),n=(0,s.e7)([C.Z],()=>C.Z.getChannelId(t)),{viewingRoles:l,backNavigationSection:o,isFullServerPreview:c,isServerShopPreview:S}=(0,s.cj)([f.Z],()=>({viewingRoles:null!=t?f.Z.getViewingRoles(t):null,backNavigationSection:f.Z.getBackNavigationSection(t),isFullServerPreview:null!=t&&f.Z.isFullServerPreview(t),isServerShopPreview:null!=t&&f.Z.isViewingServerShop(t)}));if(null==l||null==t)return null;let M=function(e){switch(e){case m.pNK.INTEGRATIONS:return b.intl.string(b.t.k7LGdn);case m.pNK.ROLE_SUBSCRIPTIONS:return b.intl.string(b.t.bRqiqa);case m.pNK.ONBOARDING:return b.intl.string(b.t.qZpU3d);default:return b.intl.string(b.t.MTIXho)}}(o),L=o===m.pNK.ROLE_SUBSCRIPTIONS?b.intl.string(b.t.hZUCzc):b.intl.string(b.t["/djIh4"]),Z=n===A.oC.GUILD_ONBOARDING,k=e=>{let{backToSettings:n}=e;null!=t&&(f.Z.isFullServerPreview(t)&&(0,p.uL)(m.Z5c.CHANNEL(t)),_.ZP.shouldShowOnboarding(t)&&(u.Z.finishOnboarding(t),(0,h.EI)(t)),(0,N.mL)(t),n&&I.Z.open(t,o),o===m.pNK.ROLE_SUBSCRIPTIONS&&(0,E.GN)(t))};return(0,i.jsxs)(d.qXd,{color:d.DM8.BRAND,className:D.notice,children:[(0,i.jsxs)(v,{onClick:()=>k({backToSettings:!0}),className:D.backButton,children:[(0,i.jsx)(T.Z,{width:16,height:16,direction:T.Z.Directions.LEFT,className:D.backArrow}),M]}),Z&&c?(0,i.jsx)("div",{className:D.noticeContents,children:(0,i.jsx)("div",{className:D.noticeText,children:b.intl.string(b.t.PxbiAQ)})}):(0,i.jsxs)("div",{className:D.noticeContents,children:[(0,i.jsx)("div",{className:D.noticeText,children:c?b.intl.formatToPlainString(b.t["0PHahI"],{numRoles:Object.keys(l).length}):b.intl.formatToPlainString(b.t.vMlK8v,{numRoles:Object.keys(l).length})}),(0,i.jsx)(d.yRy,{targetElementRef:e,position:"bottom",renderPopout:()=>(0,i.jsx)(R.Z,{guildId:t}),children:t=>{let{onClick:n}=t;return(0,i.jsxs)(v,{onClick:n,buttonRef:e,children:[L,(0,i.jsx)(O.Z,{width:16,height:16,direction:O.Z.Directions.DOWN,className:D.selectCaret})]})}}),c&&(0,i.jsx)(d.DY3,{className:D.previewWarning,text:b.intl.string(b.t.mW4DUF),children:(0,i.jsx)(d.P4T,{size:"xs",color:a.Z.unsafe_rawColors.YELLOW_300.css})}),S&&(0,i.jsx)(d.DY3,{className:D.previewWarning,text:b.intl.formatToPlainString(b.t.eummvb,{maxTiers:y.fF,maxProducts:P.dD}),children:(0,i.jsx)(d.P4T,{size:"xs",color:a.Z.unsafe_rawColors.YELLOW_300.css})})]}),c||o===m.pNK.ROLE_SUBSCRIPTIONS?null:(0,i.jsx)(U,{onClick:()=>k({backToSettings:!1})})]})}function L(e){let{guildId:t}=e;return(0,s.e7)([f.Z],()=>f.Z.isViewingRoles(t))?(0,i.jsx)("div",{className:o()(D.settingsWrapper,{[D.windows]:(0,S.isWindows)(),[D.osx]:(0,S.isMac)()}),children:(0,i.jsx)(M,{})}):null}},859428:function(e,t,n){n.d(t,{Z:()=>T}),n(388685);var i=n(255367),r=n(73800),l=n(120356),o=n.n(l),s=n(442837),a=n(755721),c=n(481060),d=n(749210),u=n(703656),_=n(430824),h=n(914010),E=n(900849),I=n(981631),p=n(388032),C=n(8940),g=n(240211);let T=12633==n.j?()=>{let e=(0,s.e7)([h.Z],()=>h.Z.getGuildId(),[]),t=(0,s.e7)([_.Z],()=>_.Z.getGuild(e),[e]),[n,l]=r.useState(!1);if(null==t)return null;let T=async()=>{l(!0);try{E.mT(t.id),await d.Z.joinGuild(t.id,{source:I.vtS.NOTICE_BAR})}catch(e){l(!1)}};return(0,i.jsxs)("div",{className:o()(C.notice,g.notice),children:[(0,i.jsxs)(a.zx,{look:a.zx.Looks.OUTLINED,color:a.zx.Colors.WHITE,size:a.zx.Sizes.NONE,className:o()(C.button,C.back),innerClassName:C.iconButton,onClick:()=>{(0,u.s1)().goBack()},children:[(0,i.jsx)(c.whL,{size:"xs",color:"currentColor",className:C.arrow}),p.intl.string(p.t["13/7kZ"])]}),(0,i.jsx)(c.Text,{className:C.header,variant:"text-sm/normal",children:p.intl.string(p.t["N/y2WF"])}),(0,i.jsx)(a.zx,{className:C.button,look:a.zx.Looks.OUTLINED,color:a.zx.Colors.WHITE,size:a.zx.Sizes.NONE,submitting:n,onClick:T,children:p.intl.format(p.t.uHN7n5,{guild:t.name})})]})}:null},50284:function(e,t,n){n.d(t,{Z:()=>E}),n(642613),n(583741);var i=n(544891),r=n(710845),l=n(569471),o=n(346479),s=n(592125),a=n(375954),c=n(306680),d=n(594174),u=n(709054),_=n(981631);let h=new r.Z("markUnread");async function E(e,t){let n=d.default.getCurrentUser();if(null==n)return;let r=a.Z.getMessages(e),E=r.toArray().filter(e=>0>u.default.compare(e.id,t)).sort((e,t)=>u.default.compare(e.id,t.id)).reverse()[0],I=null==E?u.default.atPreviousMillisecond(t):E.id,p=0;r.forAll(e=>{u.default.compare(e.id,I)>0&&(0,c.Ex)(e,n)&&p++});let C=s.Z.getChannel(e);null!=C&&C.isThread()&&(C.isArchivedThread()&&await o.Z.unarchiveThread(C,!1),l.Z.hasJoined(e)||await o.Z.joinThread(C,"Mark Unread")),h.log("Marking unread",{channelId:e,messageId:t}),i.tn.post({url:_.ANM.MESSAGE_ACK(e,I),body:{manual:!0,mention_count:p},oldFormErrors:!0,rejectWithError:!0})}},294218:function(e,t,n){n.d(t,{Z:()=>D});var i=n(255367),r=n(73800),l=n(120356),o=n.n(l),s=n(91192),a=n(442837),c=n(518738),d=n(628238),u=n(869765),_=n(592125),h=n(709054),E=n(786761),I=n(739566),p=n(492593),C=n(453687),g=n(25015),T=n(689674),O=n(438075),S=n(963550),N=n(845080),f=n(295790),R=n(145807),m=n(56744),A=n(981631),P=n(30804);function y(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,["message","compact","className","onContextMenu","onClick","hideSimpleEmbedContent","channel","isGroupStart","animateAvatar","subscribeToComponentDispatch","renderThreadAccessory","trackAnnouncementViews"]),G=r.type===A.uaV.POLL_RESULT||null!=(t=e.disableInteraction)&&t,V=r.isFirstMessageInForumPost(L),B=(0,d.A)((null!=(n=r.editedTimestamp)?n:r.timestamp).valueOf()),{content:W,hasSpoilerEmbeds:H}=(0,g.Z)(r,{hideSimpleEmbedContent:M,allowList:V||B,allowHeading:V||B,allowLinks:!0,previewLinkTarget:!0}),z=r.type===A.uaV.REPLY?r.messageReference:void 0,Y=(0,a.e7)([u.Z],()=>u.Z.getMessageByReference(z)),K=(0,s.JA)(r.id),q=(0,I.ZP)(r),X=(0,a.e7)([_.Z],()=>r.hasFlag(A.iLy.HAS_THREAD)&&_.Z.getChannel(h.default.castMessageIdAsChannelId(r.id))),J=(0,c.p9)({guildId:L.guild_id,roleId:q.iconRoleId}),Q=(0,T.Z)({message:r,channel:L,enabled:x}),$=(0,C.iG)(r),ee=(0,C.Gx)(r);return(0,i.jsx)(p.Z,y({compact:l,className:o()(D,{[P.ephemeral]:(0,E.Pv)(r),[P.disableInteraction]:G}),disableInteraction:G,childrenRepliedMessage:(0,m.Z)(r,L,z,Y,l),childrenExecutedCommand:(0,R.Z)(r,L,l),childrenHeader:(0,N.Z)(b(y({},e),{guildId:L.guild_id,author:q,roleIcon:J})),childrenAccessories:e.hideAccessories?void 0:(0,O.Q)(e,H),childrenMessageContent:(0,S.Z)(e,W),childrenSystemMessage:(0,f.Z)(b(y({},e),{disableInteraction:G})),onContextMenu:v,onClick:U,hasThread:w&&null!=X&&r.hasFlag(A.iLy.HAS_THREAD),hasReply:r.type===A.uaV.REPLY,"aria-labelledby":$,"aria-describedby":ee,messageRef:Q,author:q},K,F))})},332473:function(e,t,n){n.d(t,{b:()=>s,e:()=>o});var i=n(399606),r=n(594174),l=n(918505);let o=()=>a(r.default.getCurrentUser(),(0,l.JH)()),s=()=>a((0,i.e7)([r.default],()=>r.default.getCurrentUser()),(0,l.o9)());function a(e,t){return!(null==e||e.isPomelo())&&!!e.hasVerifiedEmailOrPhone()&&!!t}},91802:function(e,t,n){n.d(t,{n:()=>l});var i=n(442837),r=n(351402);function l(){let{localizedPricingPromo:e,hasError:t}=(0,i.cj)([r.Z],()=>({localizedPricingPromo:r.Z.localizedPricingPromo,hasError:r.Z.localizedPricingPromoHasError}));return t?null:e}},222727:function(e,t,n){n.d(t,{U:()=>l});var i=n(990547),r=n(213609);function l(e,t){(0,r.Z)({type:i.ImpressionTypes.VIEW,name:i.ImpressionNames.LOCALIZED_PRICING_UPSELL_VIEWED,properties:{country_code:t,action_location:e}})}},463230:function(e,t,n){n.d(t,{Z:()=>h});var i=n(255367);n(73800);var r=n(481060),l=n(230711),o=n(985754),s=n(91802),a=n(222727),c=n(981631),d=n(921944),u=n(388032),_=n(131715);let h=12633==n.j?e=>{let{notice:t,noticeType:n,dismissCurrentNotice:h}=e,E=(null==t?void 0:t.metadata.premiumSubscription)!=null,I=(0,s.n)();if((0,a.U)(c.jXE.NOTIFICATION_BAR,null==I?void 0:I.countryCode),null==I)return null;let p=I.countryCode,C=I.currency,g=I.paymentSourceTypes.length>0;return(0,i.jsxs)(r.qXd,{color:E?r.DM8.BRAND:r.DM8.PREMIUM_TIER_2,children:[(0,i.jsx)(r.RyX,{onClick:()=>h(d.L.UNKNOWN),noticeType:n}),!E&&(0,i.jsx)(r.SrA,{size:"md",color:"currentColor",className:_.premiumIcon}),(0,o.Gv)(p,C,g,E),(0,i.jsx)(r.NoS,{onClick:()=>{h(d.L.UNKNOWN),l.Z.open(c.oAB.PREMIUM)},noticeType:n,children:u.intl.string(u.t.hvVgAQ)})]})}:null},246965:function(e,t,n){n.d(t,{Z:()=>p}),n(415506);var i=n(255367);n(73800);var r=n(990547),l=n(481060),o=n(774078),s=n(100527),a=n(906732),c=n(213609),d=n(963249),u=n(639119),_=n(474936),h=n(981631),E=n(388032),I=n(131715);let p=12633==n.j?function(e){var t;let{dismissCurrentNotice:n,subscriptionTier:p}=e,{analyticsLocations:C}=(0,a.ZP)(function(e){switch(e){case _.Si.TIER_0:return s.Z.PREMIUM_TIER_0_TRIAL_ENDING_NOTICE;case _.Si.TIER_2:return s.Z.PREMIUM_TIER_2_TRIAL_ENDING_NOTICE;default:throw Error("Unsupported subscription tier: ".concat(e))}}(p)),g=(0,u.N)(),T=(0,o.Z)(null!=g&&null!=g.expires_at?Date.parse(g.expires_at):0),O=null==g||(null==(t=g.subscription_trial)?void 0:t.sku_id)!==p||null==g.expires_at||Object.values(T).every(e=>0===e);return((0,c.Z)({type:r.ImpressionTypes.VIEW,name:r.ImpressionNames.TRIAL_NOTICE,properties:{trial_id:null==g?void 0:g.trial_id}},{disableTrack:O}),O)?null:(0,i.jsxs)(l.qXd,{color:function(e){switch(e){case _.Si.TIER_0:return l.DM8.PREMIUM_TIER_0;case _.Si.TIER_2:return l.DM8.PREMIUM_TIER_2;default:throw Error("Unsupported subscription tier: ".concat(e))}}(p),children:[(0,i.jsx)(l.RyX,{onClick:n}),(0,i.jsx)(l.SrA,{size:"md",color:"currentColor",className:I.premiumIcon}),function(e,t){switch(e){case _.Si.TIER_0:return t.days>0?E.intl.formatToPlainString(E.t.sP5OqK,{days:t.days}):t.hours>0?E.intl.formatToPlainString(E.t["7Lhfu7"],{hours:t.hours}):E.intl.formatToPlainString(E.t.coDiS0,{minutes:Math.max(t.minutes,1)});case _.Si.TIER_2:return t.days>0?E.intl.formatToPlainString(E.t["4prs5e"],{days:t.days}):t.hours>0?E.intl.formatToPlainString(E.t.OD5nIS,{hours:t.hours}):E.intl.formatToPlainString(E.t.rvyXjI,{minutes:Math.max(t.minutes,1)});default:throw Error("Unsupported subscription tier: ".concat(e))}}(p,T),(0,i.jsx)(l.EyT,{onClick:()=>{(0,d.Z)({trialId:g.trial_id,subscriptionTier:p,analyticsLocations:C,analyticsObject:{page:h.ZY5.IN_APP,section:h.jXE.NOTIFICATION_BAR,object:h.qAy.BUTTON_CTA}})},children:function(e){switch(e){case _.Si.TIER_0:return E.intl.string(E.t.mCG029);case _.Si.TIER_2:return E.intl.string(E.t["7590PT"]);default:throw Error("Unsupported subscription tier: ".concat(e))}}(p)})]})}:null},801249:function(e,t,n){let i;n.d(t,{Z:()=>d});var r,l=n(442837),o=n(570140);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let a={lastGuildDismissedTime:{}};class c extends(r=l.ZP.DeviceSettingsStore){initialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a;i=e}getUserAgnosticState(){return i}getLastGuildDismissedTime(e){return i.lastGuildDismissedTime[e]}}s(c,"displayName","ApplicationSubscriptionChannelNoticeStore"),s(c,"persistKey","ApplicationSubscriptionChannelNoticeStore");let d=new c(o.Z,{APPLICATION_SUBSCRIPTIONS_CHANNEL_NOTICE_DISMISSED:function(e){let{guildId:t}=e;i.lastGuildDismissedTime[t]=Date.now()}})},610674:function(e,t,n){n.d(t,{Z:()=>i});let i="https://dis.gd/appeal"},523255:function(e,t,n){n.d(t,{SI:()=>c,hZ:()=>u});var i=n(913527),r=n.n(i),l=n(835913),o=n(675478),s=n(581883),a=n(905567);let c=e=>{var t;if(!d(e))return!1;let n=null==(t=s.Z.settings.userContent)?void 0:t.safetyUserSentimentNoticeDismissedAt,i=null!=n?l.E.toDate(n):void 0,o=null!=i?r()().diff(i,"days"):null;if(null!=n&&!(null!=o&&o>30))return!1;let{isEligible:c}=a.C.getCurrentConfig({location:"657a81_1"},{autoTrackExposure:!0});return c},d=e=>null!=e&&Date.now()-e.createdAt.getTime()>2592e6,u=()=>{let e=l.E.now();o.hW.updateAsync("userContent",t=>{t.safetyUserSentimentNoticeDismissedAt=e},o.fy.INFREQUENT_USER_ACTION)}},101879:function(e,t,n){n.d(t,{Z:()=>_}),n(388685);var i=n(255367),r=n(704215),l=n(481060),o=n(243778),s=n(496729),a=n(987562),c=n(981631),d=n(921944),u=n(388032);function _(){let[e,t]=(0,o.bf)(r.z.NAGBAR_NOTICE_IGNORE_USER_FEEDBACK,{cooldownDurationMs:a.pv});return e!==r.z.NAGBAR_NOTICE_IGNORE_USER_FEEDBACK?null:(0,i.jsxs)(l.qXd,{color:l.DM8.BRAND,children:[(0,i.jsx)(l.RyX,{onClick:()=>t(d.L.DISMISS),noticeType:c.kVF.IGNORE_USER_FEEDBACK_NAGBAR}),u.intl.string(u.t.XkeW9P),(0,i.jsx)(l.NoS,{onClick:()=>{(0,s.v3)(),t(d.L.TAKE_ACTION)},noticeType:c.kVF.IGNORE_USER_FEEDBACK_NAGBAR,children:u.intl.string(u.t.vcdNKi)})]})}},496729:function(e,t,n){n.d(t,{ZZ:()=>_,sT:()=>u,v3:()=>h});var i=n(255367),r=n(704215),l=n(481060),o=n(570140),s=n(266454),a=n(592125),c=n(305587);function d(e){for(var t=1;t{let{default:e}=await Promise.all([n.e("60137"),n.e("37332")]).then(n.bind(n,180970));return t=>(0,i.jsx)(e,d({},t))})}function h(){(0,l.ZDy)(async()=>{let{default:e}=await Promise.all([n.e("60137"),n.e("46355")]).then(n.bind(n,746147));return t=>(0,i.jsx)(e,d({},t))})}},471253:function(e,t,n){n.d(t,{DT:()=>f,Ef:()=>P,HO:()=>A,NZ:()=>y,Pq:()=>m,Q1:()=>T,RK:()=>S,_0:()=>O,hz:()=>R,yi:()=>N});var i=n(512722),r=n.n(i),l=n(149765),o=n(544891),s=n(493683);n(749210);var a=n(911969),c=n(367907),d=n(944486),u=n(979651),_=n(700785),h=n(922482),E=n(192079),I=n(706058),p=n(590415),C=n(981631);function g(e){for(var t=1;t2&&void 0!==arguments[2]&&arguments[2],i=null==e?void 0:e.getGuildId();r()(null!=i,"This channel cannot be guildless.");let l=u.Z.getVoiceStateForChannel(e.id);return(0,p.gf)(l)!==p.xO.REQUESTED_TO_SPEAK_AND_AWAITING_USER_ACK||t||(0,c.yw)(C.rMx.PROMOTED_TO_SPEAKER,g({},(0,E.s$)(e))),o.tn.patch({url:C.ANM.UPDATE_VOICE_STATE(i),body:g({suppress:t,request_to_speak_timestamp:null,channel_id:e.id},n?{silent:n}:{}),rejectWithError:!1})}function N(e){let t=null==e?void 0:e.getGuildId();return r()(null!=t,"This channel cannot be guildless."),o.tn.patch({url:C.ANM.UPDATE_VOICE_STATE(t),body:{suppress:!0,channel_id:e.id,self_video:!1,self_stream:!1},rejectWithError:!1})}function f(e,t,n){let i=e.getGuildId();return r()(null!=i,"This channel cannot be guildless."),o.tn.patch({url:C.ANM.UPDATE_VOICE_STATE(i,t),body:{suppress:n,channel_id:e.id},rejectWithError:!1})}function R(e,t){if(null==t||null==e)return;let n=t.getGuildId();return r()(null!=n,"This channel cannot be guildless."),f(t,e.id,!0),o.tn.patch({url:C.ANM.UPDATE_VOICE_STATE(n,e.id),body:{suppress:!0,channel_id:t.id,self_video:!1,self_stream:!1},rejectWithError:!1})}function m(e,t,n){let i=e.getGuildId();r()(null!=i,"Channel cannot be guildless");let o=e.permissionOverwrites[i],c=g({id:i,type:a.BN.ROLE,allow:_.Hn,deny:_.Hn},o);n?(c.allow=l.IH(c.allow,t),c.deny=l.Od(c.deny,t)):(c.allow=l.Od(c.allow,t),c.deny=l.IH(c.deny,t)),s.Z.updatePermissionOverwrite(e.id,c)}async function A(e,t,n,i){if(""===t)return;d.Z.getVoiceChannelId()!==e.id&&(0,h.TM)(e);let r=await (0,I.me)(e.id,t,n,i);return S(e,!1,!0),r}async function P(e,t,n){if(""!==t)return await (0,I.Dk)(e.id,t,n)}async function y(e){await (0,I.Ix)(e.id)}},623633:function(e,t,n){n.d(t,{Z:()=>o});var i=n(442837),r=n(592125),l=n(944486);function o(){return(0,i.e7)([l.Z,r.Z],()=>{let e=l.Z.getVoiceChannelId();if(null!=e){let t=r.Z.getChannel(e);if(null==t?void 0:t.isGuildStageVoice())return t}return null})}},852923:function(e,t,n){n.d(t,{Z:()=>C});var i=n(255367);n(73800);var r=n(120356),l=n.n(r),o=n(755721),s=n(481060),a=n(592125),c=n(944486),d=n(471253),u=n(623633),_=n(930180),h=n(388032),E=n(957991);function I(e){let t=c.Z.getVoiceChannelId();if(null==t)return;let n=a.Z.getChannel(t);null!=n&&(0,d.RK)(n,e)}function p(e){var t,n;let{channelId:r}=e,o=null!=(t=(0,_._d)(r))?t:0,s=null!=(n=(0,_.K3)(r))?n:0;return o>0&&s>0?(0,i.jsx)("div",{className:E.blocked,children:(0,i.jsx)("div",{className:l()(E.blockedText,E.noIcon),children:h.intl.string(h.t.xlJRfn)})}):o>0?(0,i.jsx)("div",{className:E.blocked,children:(0,i.jsx)("div",{className:l()(E.blockedText,E.noIcon),children:h.intl.string(h.t.WYad9f)})}):s>0?(0,i.jsx)("div",{className:E.blocked,children:(0,i.jsx)("div",{className:l()(E.blockedText,E.noIcon),children:h.intl.string(h.t.eHq2OD)})}):null}function C(){let e=(0,u.Z)();return null==e?null:(0,i.jsxs)(s.qXd,{className:E.container,color:s.DM8.DEFAULT,children:[(0,i.jsx)("div",{children:h.intl.string(h.t.Ul1RJS)}),(0,i.jsx)(p,{channelId:e.id}),(0,i.jsx)(o.zx,{className:E.acceptButton,size:o.zx.Sizes.MIN,color:o.zx.Colors.WHITE,onClick:()=>I(!1),children:(0,i.jsx)(s.Text,{className:E.acceptText,variant:"text-xs/normal",color:"none",children:h.intl.string(h.t.MpO0p6)})}),(0,i.jsx)(o.zx,{className:E.declineButton,look:o.zx.Looks.OUTLINED,size:o.zx.Sizes.MIN,color:o.zx.Colors.WHITE,onClick:()=>I(!0),children:(0,i.jsx)(s.Text,{className:E.declineText,variant:"text-xs/normal",color:"none",children:h.intl.string(h.t["1YDv7e"])})})]})}},933429:function(e,t,n){n.d(t,{ZP:()=>eq,m9:()=>ev,nA:()=>eM,o:()=>eU}),n(388685),n(35282);var i,r=n(913527),l=n.n(r),o=n(442837),s=n(743426),a=n(704215),c=n(433517),d=n(570140),u=n(579806),_=n(726542),h=n(812206),E=n(223892),I=n(674525),p=n(266454),C=n(605236),g=n(458725),T=n(915525),O=n(353926),S=n(594190),N=n(38618),f=n(569545),R=n(528011),m=n(487419),A=n(715903),P=n(223606),y=n(160404),b=n(41776),D=n(332473),v=n(30684),U=n(646476),M=n(616106),L=n(518638),Z=n(1844),k=n(621615),j=n(417626),w=n(569984),x=n(338247),F=n(523255),G=n(867003),V=n(768419),B=n(590415),W=n(581883),H=n(199902),z=n(314897),Y=n(881998),K=n(463395),q=n(592125),X=n(553795),J=n(427123),Q=n(271383),$=n(430824),ee=n(131951),et=n(292959),en=n(496675),ei=n(571474),er=n(19780),el=n(944486),eo=n(914010),es=n(215427),ea=n(246946),ec=n(558724),ed=n(23434),eu=n(594174),e_=n(979651),eh=n(351402),eE=n(853872),eI=n(78839),ep=n(431),eC=n(580130),eg=n(695103),eT=n(358085),eO=n(74538),eS=n(922156),eN=n(436181),ef=n(941128),eR=n(981631),em=n(188785),eA=n(474936),eP=n(46140),ey=n(231338),eb=n(65154);function eD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let ev={[eR.kVF.LOCALIZED_PRICING]:a.z.NAGBAR_NOTICE_LOCALIZED_PRICING,[eR.kVF.DOWNLOAD_NAG]:a.z.NAGBAR_NOTICE_DOWNLOAD,[eR.kVF.CONNECT_SPOTIFY]:a.z.NAGBAR_NOTICE_CONNECT_SPOTIFY,[eR.kVF.CONNECT_PLAYSTATION]:a.z.NAGBAR_NOTICE_CONNECT_PLAYSTATION,[eR.kVF.MFA_SMS_BACKUP]:a.z.NAGBAR_NOTICE_MFA_SMS_BACKUP,[eR.kVF.PREMIUM_TIER_2_TRIAL_ENDING]:a.z.NAGBAR_NOTICE_PREMIUM_TIER_TWO_TRIAL_ENDING,[eR.kVF.PREMIUM_REACTIVATE]:a.z.NAGBAR_NOTICE_PREMIUM_REACTIVATE,[eR.kVF.BOUNCED_EMAIL_DETECTED]:a.z.NAGBAR_BOUNCED_EMAIL_NOTICE,[eR.kVF.ACTIVATE_SERVER_SUBSCRIPTION]:a.z.NAGBAR_ACTIVATE_SERVER_SUBSCRIPTION,[eR.kVF.PREMIUM_TIER_0_TRIAL_ENDING]:a.z.NAGBAR_NOTICE_PREMIUM_TIER_0_TRIAL_ENDING,[eR.kVF.POMELO_ELIGIBLE]:a.z.NAGBAR_NOTICE_POMELO,[eR.kVF.CHECKOUT_RECOVERY_NAGBAR]:a.z.CHECKOUT_RECOVERY_NAGBAR,[eR.kVF.REPORT_TO_MOD_SURVEY]:a.z.REPORT_TO_MOD_SURVEY_NOTICE},eU={[eR.kVF.GIFTING_PROMOTION_REMINDER]:a.z.GIFTING_PROMOTION_REMINDER},eM={[eR.kVF.OUTBOUND_PROMOTION]:a.z.THIRD_PARTY_OUTBOUND_PROMO_NAGBAR},eL={[eR.kVF.DETECTED_OFF_PLATFORM_PREMIUM_PERK_UPSELL]:"hideDetectedOffPlatformPremiumPerkUpsell",[eR.kVF.PREMIUM_UNCANCEL]:"hideUncancelReminder",[eR.kVF.PREMIUM_MISSING_PAYMENT]:"hideMissingPaymentReminder",[eR.kVF.PREMIUM_PAST_DUE_MISSING_PAYMENT]:"hidePastDueMissingPaymentReminder",[eR.kVF.PREMIUM_PAST_DUE_INVALID_PAYMENT]:"hidePastDueInvalidPaymentReminder",[eR.kVF.PREMIUM_PAST_DUE_ONE_TIME_PAYMENT]:"hidePastDueOneTimePaymentReminder",[eR.kVF.AUTO_MODERATION_MENTION_RAID_DETECTION]:"hideAutoModerationMentionRaidDetectionNotice",[eR.kVF.GUILD_RAID_NOTIFICATION]:"hideGuildRaidDetectionNotice",[eR.kVF.WIN32_DEPRECATED_MESSAGE]:"hideWin32DeprecationMessageNotice",[eR.kVF.WIN7_8_DEPRECATED_MESSAGE]:"hideWin78DeprecationMessageNotice",[eR.kVF.PREMIUM_TIER_2_TRIAL_ENDING]:"hidePremiumTier2TrialOfferEndingNotice",[eR.kVF.BLOCK_USER_FEEDBACK_NAGBAR]:"hideNagbarBlockUserFeedbackNotice",[eR.kVF.MACOS_19_DEPRECATED_MESSAGE]:"hideMacOS19DeprecationMessageNotice"},eZ=new Set([eR.kVF.NO_INPUT_DETECTED,eR.kVF.NO_INPUT_DEVICES_DETECTED,eR.kVF.STREAMER_MODE,eR.kVF.VIDEO_UNSUPPORTED_BROWSER,eR.kVF.SPOTIFY_AUTO_PAUSED,eR.kVF.DISPATCH_ERROR,eR.kVF.DISPATCH_ERROR,eR.kVF.DISPATCH_INSTALL_SCRIPT_PROGRESS,eR.kVF.BLOCKED_BY_PROXY]),ek={},ej={},ew=Object.freeze({id:null,message:null,buttonText:null,callback:void 0,metadata:null}),ex=null;function eF(e){return eL[e]+"-untilAtLeast"}function eG(e,t,n){if(null==e)return;let i=eL[e];(null==i||t||c.K.set(i,!0),eZ.has(e)&&(ek[e]=!0),null!=n&&null!=i)?c.K.set(eF(e),n.format("YYYY-MM-DDTHH:mm:ss.SSSZ")):c.K.remove(eF(e))}function eV(e){if(null==e)return!1;let t=eU[e];if(null!=t)return(0,C.H4)(t).isDismissed;let n=ev[e];if(null!=n)return(0,p.zu)(n);let i=eL[e];if(null!=i){let t=function(e){let t=c.K.get(eF(e));return null!=t?l()(t):null}(e);if(null!=t)return null==t?void 0:t.isAfter(l()())}let r=ek[e];return!!r||(null!=i&&""!==i?c.K.get(i):!!eZ.has(e)&&r)}let eB=[eR.kVF.QUARANTINED,eR.kVF.AUTOMOD_QUARANTINED_USER_PROFILE,eR.kVF.VIEWING_ROLES,eR.kVF.INVITED_TO_SPEAK,eR.kVF.LURKING_GUILD,eR.kVF.VOICE_DISABLED,eR.kVF.NO_INPUT_DEVICES_DETECTED,eR.kVF.NO_INPUT_DETECTED,eR.kVF.HARDWARE_MUTE,eR.kVF.H264_DISABLED,eR.kVF.DISPATCH_ERROR,eR.kVF.DISPATCH_INSTALL_SCRIPT_PROGRESS,eR.kVF.SPOTIFY_AUTO_PAUSED,eR.kVF.WIN32_DEPRECATED_MESSAGE,eR.kVF.WIN7_8_DEPRECATED_MESSAGE,eR.kVF.MACOS_19_DEPRECATED_MESSAGE,eR.kVF.BLOCKED_BY_PROXY,eR.kVF.VOICE_CONNECTED_LAST_SESSION,eR.kVF.AUTO_MODERATION_MENTION_RAID_DETECTION,eR.kVF.GUILD_RAID_NOTIFICATION,eR.kVF.GIFTING_PROMOTION_REMINDER,eR.kVF.QUESTS_PROGRESS_INTERRUPTION,eR.kVF.UNCLAIMED_ACCOUNT,eR.kVF.POMELO_ELIGIBLE,eR.kVF.PENDING_MEMBER,eR.kVF.CHECKOUT_RECOVERY_NAGBAR,eR.kVF.OUTBOUND_PROMOTION,eR.kVF.CORRUPT_INSTALLATION,eR.kVF.VIDEO_UNSUPPORTED_BROWSER,eR.kVF.DETECTED_OFF_PLATFORM_PREMIUM_PERK,eR.kVF.DETECTED_OFF_PLATFORM_PREMIUM_PERK_UPSELL,eR.kVF.STREAMER_MODE,eR.kVF.SCHEDULED_MAINTENANCE,eR.kVF.BOUNCED_EMAIL_DETECTED,eR.kVF.UNVERIFIED_ACCOUNT,eR.kVF.PREMIUM_TIER_2_TRIAL_ENDING,eR.kVF.PREMIUM_TIER_0_TRIAL_ENDING,eR.kVF.PREMIUM_UNCANCEL,eR.kVF.PREMIUM_MISSING_PAYMENT,eR.kVF.PREMIUM_PAST_DUE_INVALID_PAYMENT,eR.kVF.PREMIUM_PAST_DUE_MISSING_PAYMENT,eR.kVF.PREMIUM_PAST_DUE_ONE_TIME_PAYMENT,eR.kVF.PREMIUM_REACTIVATE,eR.kVF.ACTIVATE_SERVER_SUBSCRIPTION,eR.kVF.MFA_SMS_BACKUP,eR.kVF.APPLICATION_TEST_MODE,eR.kVF.LOCALIZED_PRICING,eR.kVF.DOWNLOAD_NAG,eR.kVF.CONNECT_SPOTIFY,eR.kVF.CONNECT_PLAYSTATION,eR.kVF.SURVEY,eR.kVF.SAFETY_USER_SENTIMENT_NAGBAR,eR.kVF.BLOCK_USER_FEEDBACK_NAGBAR,eR.kVF.IGNORE_USER_FEEDBACK_NAGBAR,eR.kVF.REPORT_TO_MOD_SURVEY],eW=[eR.kVF.QUARANTINED,eR.kVF.AUTOMOD_QUARANTINED_USER_PROFILE,eR.kVF.VIEWING_ROLES,eR.kVF.INVITED_TO_SPEAK,eR.kVF.LURKING_GUILD,eR.kVF.VOICE_DISABLED,eR.kVF.NO_INPUT_DETECTED,eR.kVF.HARDWARE_MUTE,eR.kVF.H264_DISABLED,eR.kVF.DISPATCH_ERROR,eR.kVF.DISPATCH_INSTALL_SCRIPT_PROGRESS,eR.kVF.SPOTIFY_AUTO_PAUSED,eR.kVF.BLOCKED_BY_PROXY,eR.kVF.VOICE_CONNECTED_LAST_SESSION,eR.kVF.PENDING_MEMBER,eR.kVF.STREAMER_MODE,eR.kVF.SCHEDULED_MAINTENANCE],eH={[eR.kVF.GIFTING_PROMOTION_REMINDER]:{predicate:()=>{let{enabled:e}=U.Ys.getCurrentConfig({location:"NoticeStore"},{autoTrackExposure:!1}),{enabled:t}=U.ZP.getCurrentConfig({location:"NoticeStore"},{autoTrackExposure:!1});return e&&t&&(0,C.H4)(a.z.GIFTING_PROMOTION_DESKTOP_FIRST_TIME_COACHMARK).isDismissed&&!eV(eR.kVF.GIFTING_PROMOTION_REMINDER)}},[eR.kVF.GUILD_RAID_NOTIFICATION]:{predicate:()=>(0,R.g)().show&&!eV(eR.kVF.GUILD_RAID_NOTIFICATION),metadata:()=>({dismissUntil:l()().add(3,"hours").toDate()})},[eR.kVF.AUTOMOD_QUARANTINED_USER_PROFILE]:{predicate:e=>{let{currentUser:t,selectedGuildId:n}=e;if(null==n)return!1;let i=Q.ZP.getMember(n,t.id);return null!=i&&!i.isPending&&(0,A.EY)(i)}},[eR.kVF.QUARANTINED]:{predicate:e=>{let{currentUser:t}=e;return t.hasFlag(eR.xW$.QUARANTINED)}},[eR.kVF.VIEWING_ROLES]:{predicate:e=>{let{selectedGuildId:t}=e;return y.Z.isViewingRoles(t)}},[eR.kVF.INVITED_TO_SPEAK]:{predicate:e=>{let{voiceState:t}=e;return(0,B.gf)(t)===B.xO.REQUESTED_TO_SPEAK_AND_AWAITING_USER_ACK}},[eR.kVF.LURKING_GUILD]:{predicate:e=>{let{selectedGuildId:t}=e;return null!=t&&b.Z.isLurking(t)}},[eR.kVF.VOICE_DISABLED]:{predicate:()=>null!=er.Z.getRemoteDisconnectVoiceChannelId()},[eR.kVF.VOICE_CONNECTED_LAST_SESSION]:{predicate:()=>null!=er.Z.getLastSessionVoiceChannelId()},[eR.kVF.NO_INPUT_DETECTED]:{predicate:()=>T.Z.hasActiveErrorOfType(g.u.NO_AUDIO_INPUT_DETECTED)},[eR.kVF.NO_INPUT_DEVICES_DETECTED]:{predicate:()=>T.Z.hasActiveErrorOfType(g.u.NO_INPUT_DEVICES)},[eR.kVF.H264_DISABLED]:{predicate:e=>{let{voiceChannelId:t}=e,n=q.Z.getChannel(t);return!ee.Z.getOpenH264()&&null!=t&&e_.Z.hasVideo(t)&&null!=n&&n.isGuildStageVoice()}},[eR.kVF.HARDWARE_MUTE]:{predicate:()=>er.Z.isConnected()&&ee.Z.isHardwareMute()&&ee.Z.isEnableHardwareMuteNotice(),metadata:()=>{let e=ee.Z.getInputDeviceId(),t=K.Z.getVendor(e),n=K.Z.getModel(e);if(null!=t&&null!=n)return{vendor:t,model:n}}},[eR.kVF.DISPATCH_ERROR]:{predicate:()=>null!=eS.Z.getLastError(),metadata:()=>({error:eS.Z.getLastError()})},[eR.kVF.DISPATCH_INSTALL_SCRIPT_PROGRESS]:{predicate:()=>null!=eN.Z.getLastProgress(),metadata:()=>eN.Z.getLastProgress()},[eR.kVF.SPOTIFY_AUTO_PAUSED]:{predicate:()=>V.Z.wasAutoPaused()},[eR.kVF.BLOCKED_BY_PROXY]:{predicate:()=>!eV(eR.kVF.BLOCKED_BY_PROXY)&&j.Z.blockedByProxy&&k.Z.getCurrentConfig({location:"notice_store"}).eligibleForNotice},[eR.kVF.UNCLAIMED_ACCOUNT]:{predicate:e=>{let{currentUser:t}=e;return null!=t&&!t.isClaimed()}},[eR.kVF.PENDING_MEMBER]:{predicate:e=>{var t,n,i;let{selectedGuildId:r,currentUser:l}=e;return null!=(i=null!=r&&null!=l&&!(null==(t=$.Z.getGuild(r))?void 0:t.features.has(eR.oNc.GUILD_ONBOARDING))&&(null==(n=Q.ZP.getMember(r,l.id))?void 0:n.isPending))&&i}},[eR.kVF.OUTBOUND_PROMOTION]:{predicate:()=>(0,L.tq)()},[eR.kVF.CORRUPT_INSTALLATION]:{predicate:()=>eT.isPlatformEmbedded&&(!s.Z.supported()||ef.Z.isCorruptInstallation())},[eR.kVF.VIDEO_UNSUPPORTED_BROWSER]:{predicate:e=>{let{voiceChannelId:t}=e;return null!=t&&e_.Z.hasVideo(t)&&!ee.Z.supports(eb.AN.VIDEO)&&!eV(eR.kVF.VIDEO_UNSUPPORTED_BROWSER)}},[eR.kVF.DETECTED_OFF_PLATFORM_PREMIUM_PERK]:{predicate:e=>{let{currentUser:t}=e;return eO.ZP.canRedeemPremiumPerks(t)&&J.Z.getDetectedOffPlatformPremiumPerks().length>0},metadata:()=>J.Z.getDetectedOffPlatformPremiumPerks()[0]},[eR.kVF.DETECTED_OFF_PLATFORM_PREMIUM_PERK_UPSELL]:{predicate:()=>!eV(eR.kVF.DETECTED_OFF_PLATFORM_PREMIUM_PERK_UPSELL)&&J.Z.getDetectedOffPlatformPremiumPerks().length>0,metadata:()=>J.Z.getDetectedOffPlatformPremiumPerks()[0]},[eR.kVF.STREAMER_MODE]:{predicate:()=>ea.Z.enabled},[eR.kVF.DOWNLOAD_NAG]:{predicate:()=>!eT.isPlatformEmbedded&&!eV(eR.kVF.DOWNLOAD_NAG)},[eR.kVF.SCHEDULED_MAINTENANCE]:{predicate:()=>null!=es.Z.getScheduledMaintenance(),metadata:()=>{let e=es.Z.getScheduledMaintenance();if(null!=e)return{id:e.id,start:new Date(e.scheduled_for),end:new Date(e.scheduled_until)}}},[eR.kVF.SURVEY]:{predicate:()=>null!=ec.Z.getCurrentSurvey(),metadata:()=>ec.Z.getCurrentSurvey()},[eR.kVF.UNVERIFIED_ACCOUNT]:{predicate:e=>{let{currentUser:t}=e;return(null==t?void 0:t.email)!=null&&!t.verified}},[eR.kVF.BOUNCED_EMAIL_DETECTED]:{predicate:e=>{let{currentUser:t}=e;return null==t?void 0:t.hasBouncedEmail}},[eR.kVF.CONNECT_SPOTIFY]:{predicate:()=>!V.Z.hasConnectedAccount()&&S.ZP.isObservedAppRunning(_.Z.get(eR.ABu.SPOTIFY).name)&&!eV(eR.kVF.CONNECT_SPOTIFY)},[eR.kVF.WIN32_DEPRECATED_MESSAGE]:{predicate:()=>(null===u.Z||void 0===u.Z?void 0:u.Z.os.arch)==="ia32"&&(null===u.Z||void 0===u.Z?void 0:u.Z.process.platform)==="win32",metadata:()=>({dismissUntil:l()().add(5,"days").toDate()})},[eR.kVF.WIN7_8_DEPRECATED_MESSAGE]:{predicate:()=>{if((null===u.Z||void 0===u.Z?void 0:u.Z.process.platform)==="win32")try{return 10>parseInt(null===u.Z||void 0===u.Z?void 0:u.Z.os.release.split(".")[0])}catch(e){}return!1},metadata:()=>({dismissUntil:l()().add(5,"days").toDate()})},[eR.kVF.MACOS_19_DEPRECATED_MESSAGE]:{predicate:()=>{if((null===u.Z||void 0===u.Z?void 0:u.Z.process.platform)==="darwin")try{return 20>parseInt(null===u.Z||void 0===u.Z?void 0:u.Z.os.release.split(".")[0])}catch(e){}return!1},metadata:()=>({dismissUntil:l()().add(5,"days").toDate()})},[eR.kVF.CONNECT_PLAYSTATION]:{predicate:()=>X.Z.isSuggestedAccountType(eR.ABu.PLAYSTATION)&&null==X.Z.getAccount(null,eR.ABu.PLAYSTATION)&&!eV(eR.kVF.CONNECT_PLAYSTATION)},[eR.kVF.PREMIUM_TIER_2_TRIAL_ENDING]:{predicate:()=>ep.Z.getAlmostExpiringTrialOffers([eA.Si.TIER_2]).length>0&&!eV(eR.kVF.PREMIUM_TIER_2_TRIAL_ENDING)},[eR.kVF.PREMIUM_TIER_0_TRIAL_ENDING]:{predicate:()=>ep.Z.getAlmostExpiringTrialOffers([eA.Si.TIER_0]).length>0&&!eV(eR.kVF.PREMIUM_TIER_0_TRIAL_ENDING)},[eR.kVF.PREMIUM_UNCANCEL]:{predicate:e=>{let{premiumSubscription:t,currentUser:n}=e,i=null!=t?l()(t.currentPeriodEnd).diff(l()().startOf("day"),"days"):0,r=(null==t?void 0:t.canceledAt)!=null&&(null==t?void 0:t.status)===eR.O0b.CANCELED&&1>=l()().diff(l()(t.canceledAt),"days"),o=null!=t&&l()(t.currentPeriodEnd).isBefore(l()()),s=null!=t&&t.status===eR.O0b.CANCELED&&!o&&i<=7&&i>=0&&(0,eO.M5)(n,eA.p9.TIER_2)&&!r&&!n.hasFreePremium()&&!t.isPurchasedExternally;return!eV(eR.kVF.PREMIUM_UNCANCEL)&&s},metadata:e=>{var t;let{premiumSubscription:n}=e,i=null!=n?l()(n.currentPeriodEnd).diff(l()().startOf("day"),"days"):0,r=null!=n?null==(t=(0,eO.Af)(n))?void 0:t.planId:null;return{daysLeft:i,premiumType:null!=r?eO.ZP.getPremiumType(r):null,premiumSubscription:n}}},[eR.kVF.PREMIUM_MISSING_PAYMENT]:{predicate:e=>{let{premiumSubscription:t,currentUser:n}=e,i=null!=t?l()(t.currentPeriodEnd).diff(l()().startOf("day"),"days"):0,r=null!=t?l()(t.currentPeriodEnd).diff(l()(t.currentPeriodStart).startOf("day"),"days"):0,o=null!=t&&l()(t.currentPeriodEnd).isBefore(l()()),s=eC.Z.applicationIdsFetched.has(eA.CL),a=eC.Z.getForApplication(eA.CL),c=null!=t?(0,eO.Af)(t):null,d=null!=c?eO.ZP.getSkuIdForPlan(c.planId):null,u=null!=a&&null!=c&&Array.from(a).filter(e=>{let{skuId:t,consumed:n}=e;return!n&&t===d}).length>0,_=null!=t&&i<=(r>14?7:2)&&i>=0&&t.status!==eR.O0b.PAST_DUE&&!o&&s&&!u&&null===t.paymentSourceId&&!n.hasFreePremium()&&!t.isPurchasedExternally;return!eV(eR.kVF.PREMIUM_MISSING_PAYMENT)&&_},metadata:e=>{var t;let{premiumSubscription:n}=e,i=null!=n?l()(n.currentPeriodEnd).diff(l()().startOf("day"),"days"):0,r=null!=n?null==(t=(0,eO.Af)(n))?void 0:t.planId:null;return{daysLeft:i,premiumType:null!=r?eO.ZP.getPremiumType(r):null,premiumSubscription:n}}},[eR.kVF.PREMIUM_PAST_DUE_INVALID_PAYMENT]:{predicate:e=>{let{premiumSubscription:t,currentUser:n}=e,i=null!=t&&null!=t.paymentSourceId?eE.Z.getPaymentSource(t.paymentSourceId):null,r=null!=t&&l()(t.currentPeriodEnd).isBefore(l()()),o=null!=t&&t.status===eR.O0b.PAST_DUE&&!r&&null!=i&&i.invalid&&!n.hasFreePremium()&&!t.isPurchasedExternally;return!eV(eR.kVF.PREMIUM_PAST_DUE_INVALID_PAYMENT)&&o},metadata:e=>{let{premiumSubscription:t}=e;return{premiumSubscription:t}}},[eR.kVF.PREMIUM_PAST_DUE_MISSING_PAYMENT]:{predicate:e=>{let{premiumSubscription:t,currentUser:n}=e,i=null!=t&&l()(t.currentPeriodEnd).isBefore(l()()),r=null!=t&&t.status===eR.O0b.PAST_DUE&&!i&&null===t.paymentSourceId&&!n.hasFreePremium()&&!t.isPurchasedExternally;return!eV(eR.kVF.PREMIUM_PAST_DUE_MISSING_PAYMENT)&&r},metadata:e=>{let{premiumSubscription:t}=e;return{premiumSubscription:t}}},[eR.kVF.MFA_SMS_BACKUP]:{predicate:e=>{let{currentUser:t}=e;return null!=t&&t.mfaEnabled&&!t.hasFlag(eR.xW$.MFA_SMS)&&!t.hasFlag(eR.xW$.STAFF)&&!t.hasFlag(eR.xW$.PARTNER)&&!eV(eR.kVF.MFA_SMS_BACKUP)}},[eR.kVF.APPLICATION_TEST_MODE]:{predicate:()=>null!=eg.Z.testModeApplicationId,metadata:()=>{if(null==eg.Z.testModeApplicationId)return{};let e=eg.Z.testModeApplicationId,t=h.Z.getApplication(e);return{applicationName:null!=t?t.name:e,applicationId:e}}},[eR.kVF.PREMIUM_REACTIVATE]:{predicate:()=>!eV(eR.kVF.PREMIUM_REACTIVATE)&&M.Z.shouldShowReactivateNotice()},[eR.kVF.LOCALIZED_PRICING]:{predicate:e=>{let{isLocalizedPromoEnabled:t}=e;return!eV(eR.kVF.LOCALIZED_PRICING)&&t},metadata:e=>{let{premiumSubscription:t}=e;return{premiumSubscription:t}}},[eR.kVF.PREMIUM_PAST_DUE_ONE_TIME_PAYMENT]:{predicate:e=>{let{premiumSubscription:t,currentUser:n}=e,i=null!=t&&l()(t.currentPeriodEnd).isBefore(l()()),r=null!=t&&null!=t.paymentSourceId?eE.Z.getPaymentSource(t.paymentSourceId):null,o=null!=r&&ey.Uk.has(r.type),s=null!=t&&t.status===eR.O0b.PAST_DUE&&!i&&o&&!n.hasFreePremium()&&!t.isPurchasedExternally;return!eV(eR.kVF.PREMIUM_PAST_DUE_ONE_TIME_PAYMENT)&&s},metadata:e=>{let{premiumSubscription:t}=e;return null==t?{daysPastDue:0,dismissUntil:l()().toDate()}:{daysPastDue:t.status===eR.O0b.PAST_DUE?l()().diff(t.currentPeriodStart,"days"):0,dismissUntil:(0,eO.lY)(t).expiresDate.toDate()}}},[eR.kVF.POMELO_ELIGIBLE]:{predicate:()=>(0,D.e)()&&!eV(eR.kVF.POMELO_ELIGIBLE)},[eR.kVF.AUTO_MODERATION_MENTION_RAID_DETECTION]:{predicate:e=>{let{selectedGuildId:t}=e,n=null!=t?$.Z.getGuild(t):null;return null!=t&&null!=P.Z.getMentionRaidDetected(t)&&(null==n?void 0:n.features.has(eR.oNc.COMMUNITY))&&!eV(eR.kVF.AUTO_MODERATION_MENTION_RAID_DETECTION)||!1},metadata:e=>{let{selectedGuildId:t}=e,n={dismissUntil:l()().add(2,"hours").toDate()};if(null!=t){let e=P.Z.getMentionRaidDetected(t);null!=e&&(n.decisionId=e.decisionId)}return n}},[eR.kVF.ACTIVATE_SERVER_SUBSCRIPTION]:{predicate:()=>!eV(eR.kVF.ACTIVATE_SERVER_SUBSCRIPTION)&&0!==I.Z.getEligibleGuildsForNagActivate().length&&(0,E.Lm)()},[eR.kVF.SAFETY_USER_SENTIMENT_NAGBAR]:{predicate:e=>{let{currentUser:t}=e;return F.SI(t)}},[eR.kVF.QUESTS_PROGRESS_INTERRUPTION]:{predicate:()=>{let e=H.Z.getCurrentUserActiveStream();if(null==e)return!1;let t=(0,f.V9)(e),n=w.Z.getStreamHeartbeatFailure(t);return null!=n&&Date.now()-n.firstFailedAt>=eP.Ot},metadata:()=>{let e=H.Z.getCurrentUserActiveStream();return{streamKey:null!=e?(0,f.V9)(e):null}}},[eR.kVF.CHECKOUT_RECOVERY_NAGBAR]:{predicate:e=>{var t;let{currentUser:n}=e,i=null!=(t=eE.Z.paymentSources)?t:{};return v.Z.getIsTargeted()&&!(0,eO.I5)(n)&&0!==Object.keys(i).length}},[eR.kVF.BLOCK_USER_FEEDBACK_NAGBAR]:{predicate:()=>!eV(eR.kVF.BLOCK_USER_FEEDBACK_NAGBAR)&&G.L0(),metadata:()=>({dismissUntil:l()().add(180,"days").toDate(),sampleRate:.1})},[eR.kVF.IGNORE_USER_FEEDBACK_NAGBAR]:{predicate:()=>G.Rr(),metadata:()=>({sampleRate:.1})},[eR.kVF.REPORT_TO_MOD_SURVEY]:{predicate:e=>{let{currentUser:t,selectedGuildId:n}=e;return null!=n&&(0,x.s)(t,n)}}};function ez(){var e,t,n;if(!N.Z.isConnected())return!1;ex=null;let i=eu.default.getCurrentUser();if(null==i)return!1;let r=eI.Z.getPremiumSubscription(),l=eh.Z.isLocalizedPromoEnabled,o=eo.Z.getGuildId(),s=el.Z.getVoiceChannelId(),a=null!=s?e_.Z.getVoiceStateForChannel(s):null;for(let n of em.a?eW:eB)if(null!=eH[n]&&eH[n].predicate({selectedGuildId:o,voiceChannelId:s,voiceState:a,currentUser:i,premiumSubscription:r,isLocalizedPromoEnabled:l})){let l=null==(e=(t=eH[n]).metadata)?void 0:e.call(t,{currentUser:i,premiumSubscription:r,selectedGuildId:o});ex=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n.push.apply(n,i)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}(function(e){for(var t=1;t{let{userId:t}=e;return t!==z.default.getId()})&&ez()},STREAMER_MODE_UPDATE:eY,RUNNING_STREAMER_TOOLS_CHANGE:eY,DISPATCH_APPLICATION_ERROR:function(){return delete ek[eR.kVF.DISPATCH_ERROR],ez()},DISPATCH_APPLICATION_LAUNCH_SETUP_START:function(){return delete ek[eR.kVF.DISPATCH_INSTALL_SCRIPT_PROGRESS],ez()},DISPATCH_APPLICATION_INSTALL_SCRIPTS_PROGRESS_UPDATE:function(){return ez()},DISPATCH_APPLICATION_LAUNCH_SETUP_COMPLETE:function(){return ez()},NOTICE_SHOW:function(e){ex=e.notice},NOTICE_DISMISS:function(e){return null!=ex&&(null==e.id||e.id===ex.id)&&(eG(ex.type,e.isTemporary,e.untilAtLeast),ez())},NOTICE_DISABLE:function(e){let{noticeType:t}=e;return eG(t),ez()},LOGOUT:function(){ek={},ej={},ex=null},SUBSCRIPTION_PLANS_FETCH_SUCCESS:ez,AUTO_MODERATION_MENTION_RAID_DETECTION:ez,CREATOR_MONETIZATION_NAG_ACTIVATE_ELIGIBLITY_FETCH_SUCCESS:ez,PROXY_BLOCKED_REQUEST:ez,REPORT_AV_ERROR:ez})},131715:function(e,t,n){e.exports={premiumIcon:"premiumIcon__9671b",platformIcon:"platformIcon__9671b",giftIcon:"giftIcon__9671b",icon:"icon__9671b",iconWindows:"iconWindows__9671b icon__9671b",iconApple:"iconApple__9671b icon__9671b",iconAndroid:"iconAndroid__9671b icon__9671b",textLink:"textLink__9671b",textLinkSmall:"textLinkSmall__9671b textLink__9671b",testModeSKUSelector:"testModeSKUSelector__9671b",premiumLogo:"premiumLogo__9671b",premiumText:"premiumText__9671b",premiumAction:"premiumAction__9671b",ellipsis:"ellipsis__9671b",quarantineLearnMoreLink:"quarantineLearnMoreLink__9671b",errorCodeNoticeText:"errorCodeNoticeText__9671b",errorCodeNoticeClickable:"errorCodeNoticeClickable__9671b"}},622680:function(e,t,n){e.exports={button:"button_e18686",default:"default_e18686",filled:"filled_e18686"}},744053:function(e,t,n){e.exports={container:"container_fcf29c",flexContainer:"flexContainer_fcf29c",shrinkingContainer:"shrinkingContainer_fcf29c",actions:"actions_fcf29c",resetButton:"resetButton_fcf29c",message:"message_fcf29c"}},64730:function(e,t,n){e.exports={tabBarItemContainer:"tabBarItemContainer_c7e907",searchBar:"searchBar_c7e907"}},319586:function(e,t,n){n.r(e.exports={standardSidebarView:"standardSidebarView__23e6b",withUpsell:"withUpsell__23e6b",sidebarRegion:"sidebarRegion__23e6b",sidebarRegionScroller:"sidebarRegionScroller__23e6b",sidebar:"sidebar__23e6b",mobileSidebar:"mobileSidebar__23e6b",contentTransitionWrap:"contentTransitionWrap__23e6b",contentRegionScroller:"contentRegionScroller__23e6b",toolsContainer:"toolsContainer__23e6b",tools:"tools__23e6b",contentRegionHiddenSidebar:"contentRegionHiddenSidebar__23e6b",contentRegionShownSidebar:"contentRegionShownSidebar__23e6b",contentRegion:"contentRegion__23e6b",contentColumn:"contentColumn__23e6b",customColumn:"customColumn__23e6b",contentColumnWide:"contentColumnWide__23e6b",contentColumnDefault:"contentColumnDefault__23e6b",contentColumnMinimal:"contentColumnMinimal__23e6b",contentColumnScrollable:"contentColumnScrollable__23e6b",customHeader:"customHeader__23e6b",customContainer:"customContainer__23e6b",customScroller:"customScroller__23e6b",noticeRegion:"noticeRegion__23e6b",noticeRegionHiddenSidebar:"noticeRegionHiddenSidebar__23e6b",mobileSidebarTools:"mobileSidebarTools__23e6b",flexFullWidth:"flexFullWidth__23e6b",hidden:"hidden__23e6b",mobileContent:"mobileContent__23e6b",mobileContentHeader:"mobileContentHeader__23e6b",hideHamburger:"hideHamburger__23e6b",mobileToolsContainer:"mobileToolsContainer__23e6b",closeIconOnly:"closeIconOnly__23e6b",isMobileAndroid:"isMobileAndroid__23e6b",mobileToolsCloseIcon:"mobileToolsCloseIcon__23e6b",mobileSidebarHeader:"mobileSidebarHeader__23e6b"})},900609:function(e,t,n){e.exports={container:"container__06f11",imageContainer:"imageContainer__06f11",image:"image__06f11",backgroundImage:"backgroundImage__06f11",backgroundImageFilter:"backgroundImageFilter__06f11",loader:"loader__06f11"}},366736:function(e,t,n){e.exports={lineClamp:"lineClamp__0b48b"}},134772:function(e,t,n){e.exports={text:"text__7b750",premiumIcon:"premiumIcon__7b750"}},302654:function(e,t,n){e.exports={notice:"notice__36c3e",guildIcon:"guildIcon__36c3e",actionButton:"actionButton__36c3e",actionButtonInner:"actionButtonInner__36c3e"}},246752:function(e,t,n){e.exports={notice:"notice__30f28",error:"error__30f28",header:"header__30f28"}},274970:function(e,t,n){e.exports={container:"container_cbb93a",body:"body_cbb93a"}},366523:function(e,t,n){e.exports={emojiIcon:"emojiIcon_ff168a"}},310045:function(e,t,n){e.exports={icon:"icon__0e5a2"}},956542:function(e,t,n){e.exports={messageBlock:"messageBlock__2d815",yellowMessageBlock:"yellowMessageBlock__2d815 messageBlock__2d815",messageBlockIcon:"messageBlockIcon__2d815",redMessageBlock:"redMessageBlock__2d815 messageBlock__2d815",brownMessageBlock:"brownMessageBlock__2d815 messageBlock__2d815"}},264700:function(e,t,n){e.exports={container:"container_de50c1"}},525059:function(e,t,n){e.exports={container:"container_e2461d",innerContainer:"innerContainer_e2461d",iconWrapper:"iconWrapper_e2461d",star:"star_e2461d",sparkle:"sparkle_e2461d"}},734344:function(e,t,n){e.exports={statusWarningBlock:"statusWarningBlock__1066d",statusWarningBlockWithCta:"statusWarningBlockWithCta__1066d",horizontalStatusWarningBlock:"horizontalStatusWarningBlock__1066d",verticalStatusWarningBlock:"verticalStatusWarningBlock__1066d",ctaButtonContainer:"ctaButtonContainer__1066d",ctaButton:"ctaButton__1066d",ctaBlackButton:"ctaBlackButton__1066d",ctaButtonText:"ctaButtonText__1066d"}},261496:function(e,t,n){e.exports={backButtonInner:"backButtonInner__84419",backButton:"backButton__84419",backNotice:"backNotice__84419"}},8940:function(e,t,n){e.exports={notice:"notice_c5cd6a",button:"button_c5cd6a",back:"back_c5cd6a",iconButton:"iconButton_c5cd6a",arrow:"arrow_c5cd6a",header:"header_c5cd6a"}},154422:function(e,t,n){e.exports={promotionalGiftMessage:"promotionalGiftMessage__6fbbd",promotionalGiftMessageText:"promotionalGiftMessageText__6fbbd",promotionalTextSection:"promotionalTextSection__6fbbd",avatar:"avatar__6fbbd"}},484027:function(e,t,n){e.exports={firstPromotionalAvatar:"firstPromotionalAvatar__55414",container:"container__55414"}},901986:function(e,t,n){e.exports={premiumTrialBadge:"premiumTrialBadge_e4ef22",backgroundGradient:"backgroundGradient_e4ef22",premiumTrialAcknowledgedBadge:"premiumTrialAcknowledgedBadge_e4ef22",BogoBadgeClockIcon:"BogoBadgeClockIcon_e4ef22"}},689105:function(e,t,n){n.r(e.exports={badgeIconPrivateMessages:"badgeIconPrivateMessages__80f39",badgeIconSettingsMenu:"badgeIconSettingsMenu__80f39"})},767594:function(e,t,n){e.exports={premiumCards:"premiumCards__6df1a",applicationHomeCard:"applicationHomeCard__6df1a",card:"card__6df1a",tier0:"tier0__6df1a",pillMargin:"pillMargin__6df1a",wordmark:"wordmark__6df1a",wumpus:"wumpus__6df1a",bigCloud:"bigCloud__6df1a",smallCloud:"smallCloud__6df1a",divider:"divider__6df1a",featureItem:"featureItem__6df1a",priceHeader:"priceHeader__6df1a",pill:"pill__6df1a",CTAButton:"CTAButton__6df1a",premiumCardsContainer:"premiumCardsContainer__6df1a",premiumCardsHeader:"premiumCardsHeader__6df1a"}},952849:function(e,t,n){e.exports={premiumTrialBadge:"premiumTrialBadge__4c1e4",premiumOfferUnackedBadge:"premiumOfferUnackedBadge__4c1e4",premiumTrialAcknowledgedBadge:"premiumTrialAcknowledgedBadge__4c1e4",premiumTrialBadgeIcon:"premiumTrialBadgeIcon__4c1e4",premiumTrialBadgeSelected:"premiumTrialBadgeSelected__4c1e4",premiumOfferBadgeCopy:"premiumOfferBadgeCopy__4c1e4"}},106112:function(e,t,n){e.exports={pricePerInterval:"pricePerInterval_fd0764",price:"price_fd0764",priceSpinner:"priceSpinner_fd0764"}},753023:function(e,t,n){e.exports={trialHeader:"trialHeader__784e4",price:"price__784e4"}},356883:function(e,t,n){e.exports={container:"container__33718",text:"text__33718"}},957991:function(e,t,n){e.exports={container:"container__477aa",acceptButton:"acceptButton__477aa",acceptText:"acceptText__477aa",declineButton:"declineButton__477aa",declineText:"declineText__477aa",blocked:"blocked__477aa",blockedText:"blockedText__477aa",noIcon:"noIcon__477aa"}},374594:function(e,t,n){e.exports={premiumLabel:"premiumLabel_e681d1",selected:"selected_e681d1",background:"background_e681d1",selectedBackground:"selectedBackground_e681d1",auPromo:"auPromo_e681d1",auPromoSelected:"auPromoSelected_e681d1"}},588866:function(e,t,n){e.exports={card:"card_b846e5"}},565128:function(e,t,n){e.exports={base:"base_e42a84",sparkle:"sparkle_e42a84 base_e42a84",pop:"pop_e42a84 base_e42a84",light:"light_e42a84 base_e42a84",cross:"cross_e42a84 base_e42a84",sparkleWhite:"sparkleWhite_e42a84 sparkle_e42a84 base_e42a84",popWhite:"popWhite_e42a84 pop_e42a84 base_e42a84",lightWhite:"lightWhite_e42a84 light_e42a84 base_e42a84",crossGrey:"crossGrey_e42a84 cross_e42a84 base_e42a84",crossWhite:"crossWhite_e42a84 cross_e42a84 base_e42a84"}},820468:function(e,t,n){e.exports={hoverCard:"hoverCard__26e8b"}}}]); //# sourceMappingURL=d3a58bbb8d686af1.js.map