Build 533169stable
Module 954571
8,439 characters · in no known chunkDependencies
Required by (784)
22942706503789110368134331528517143183961843721754222122365823819242152481429697300843092531051345503464537205379923819839017400564320344022441204578045938464604886249463512715495955926579905803458149615096235064588650106535666442673276741469090692177144872514750767746881335860398688988872903619207792911938799555095655958179630496782100057101306101579102119104440105613105971106922108105108713111549112758114028115184115225116011117733118633120006121127121489121623122204127445129851131935133266133343135668136523139286142524142630143154143547144830145331146001147192147351147472150574150919152568152815155486157259157296159707160761161319164599165685166913167681167866170428172231173971174705175335176031177440180020183802184453186840187559187582190930194267195073196231196291198229199773199940202949204722205463206774206845207803209932210714210742211528212245212602212637216678217222217549218318218738219801220297220995222785223818224010225142226884227205227273227724230801231003231209233380233761234091234355235365235393237774239741240233241124242120242286243258244083244975246605249477250527252345255189258367258942259065260364260821262763262850263747263783264322264686264779274146274794275589276497277682277978281439282592284778285058285933289357289498291224292572299579300153302252302691302810303318303682304232307209307600307750307879308229308528310345311849314737318346319664320426320742322223323082324584325639332408334595336231337953338318338821340451341383341645341826342098343322343906345254345332347961350701351906352423354096354287354949355205357669359094359549362490366598367348367513367516367727373856374138376374380450381969382607384015384059386077386936387101387755389405390248391040391510392516395422396495396777397400398378399289399925401124404787405139407580408213408486409626412461412484415299415951417098420216421116421162421838422891423981424185426389426760427371427562429131429521429619429876430326430452431374432222436416445002446514449054450382455207456425458664460350464035466336466802467164469177471271472734474774475380475720477427480254480800480890480900482644482857483270483660486010488053488358489683493507493527495263497685498400499785501187501945501957502103502229502696503516503852504049504982507887509282509536510022510319510790511793517765518960519222520174522419524085524136525828526162526423529942530912530951531013531053532423532624532794533129533406534217534225535296536432538355538665540462541285542372542533542535542675544036544420545986546042547983549527549794551028552117552258553081554113554238555957556440558001559568560859561769561844562991563038564322565057565505566119567035567367568444569495569717570050570314570658570763574475576437577092577700579908582095582721586445586583587500594061594271594968595244596458596854597783599466600403602902606319611656612200612394612479613760613907614986615003616755617108617590619481619517622501623605624826627950628979631305634202636184639289644508645725646234646468647117649963650338651930652176653145655116657299657516659203660307660387660564662166664675665171665816665909667285668267669201669629669874669953670735671576672385681370682503682829684339685374685533686502686956687829688205688716691172691451692798692848694080696028697138698718698723700331701273706069706847707251707539707606708051708197708281710133714505716600717020718446719129719335723695725034726532727170730986731383732071735305738419739836743445744064745299745317746706747465748579750338750770752118753189754450754487756369758400760207760751763375763845765258765631767065767143767852768161768985772800772958773486773591774393775121775505776384776971777414777426777829777933783153790297790368791498793322795816796111796497796774797637798286798819802246806677806911807067807396808247809697810412810845810877811917812022815706815807816662817818818191820284822123824029826308826789827343827827829219830541835806835835836753837057838293838462843472845187845618846293847599848295850060850226850457850735853742855344856644856768857365857802859587860410861638862570867624869359869568871751872363873297875922876717878112878244879164884210885293886722887489888363890687891090894778895288895313898642899847905911906564907495908192910692911539912417912865914887916768921661922667923861924283926262926466926571926956929400929488930101930238930839930932932140932170932883933917933924935453937008937773939006939846942405944300946255947593949004950344955437955572957622959278961350961883962052962303963169964168964395965162965660965957966619967347969611969900970061970163970573970931971203972387972710975412976627977524984870985603987112987482992771994048994288997997998643998986999235
Lazily required by (0)none
Requires (18)
Lazily requires (0)none
Source Raw
function(e,t,n){"use strict";n.r(t),n.d(t,{AnalyticEventConfigs:()=>k,AnalyticsContext:()=>T,AnalyticsSchema:()=>f,addExtraAnalyticsDecorator:()=>x,clearAnalyticsEventsRecording:()=>X,debugLogEvent:()=>W,default:()=>ei,expandEventProperties:()=>Y,expandLocation:()=>U,getAnalyticsEventsRecording:()=>Z,getNewAnalyticsLoadId:()=>er,isGameApplicationType:()=>et,launchSignature:()=>M,setUTMContext:()=>j,startRecordingAnalyticsEvents:()=>z,stopRecordingAnalyticsEvents:()=>q,trackNetworkAction:()=>en}),n(321073);var r=n(64700),i=n(835245),s=n(110259),a=n(613345),o=n(306173),l=n(73153),u=n(686757),c=n(53943),d=n(790171),_=n(111162),f=n(757811),p=n(321034),h=n(728458),m=n(652215),E=n(53298),g=n(705751),A=n(985018);let I={location:{}},T=r.createContext(I),S={},y=1e3,v=1e4,N=6e4,C=12e4,R=3e5,O=9e5,b=36e5,D=864e5,L=.001,w=performance.now(),M=(0,o.xd)()?(0,o.xy)((0,a.V)()):null;s.extendSuperProperties({launch_signature:M});let P=[];function x(e){P.push(e)}let k={[m.HAw.APP_OPENED]:{throttlePeriod:R,throttleKeys:()=>[]},[m.HAw.APP_BACKGROUND]:{throttlePeriod:C,throttleKeys:()=>[]},[m.HAw.ACK_MESSAGES]:e=>e.location_object_type===m.AnalyticsObjectTypes.ACK_MANUAL?void 0:{throttlePeriod:O,throttleKeys:e=>[e.guild_id,e.channel_id,e.location_section]},[m.HAw.GUILD_VIEWED]:{throttlePeriod:O,throttleKeys:e=>[e.guild_id,e.is_pending]},[m.HAw.FRIENDS_LIST_VIEWED]:{throttlePeriod:O,throttleKeys:e=>[e.tab_opened]},[m.HAw.NOW_PLAYING_CARD_HOVERED]:{throttlePeriod:O,throttleKeys:e=>[e.tab_opened]},[m.HAw.START_SPEAKING]:{throttlePeriod:O,throttleKeys:e=>[e.server]},[m.HAw.START_LISTENING]:{throttlePeriod:O,throttleKeys:e=>[e.server]},[m.HAw.ACTIVITY_UPDATED]:{throttlePeriod:N,throttleKeys:e=>[e.application_id],deduplicate:!0},[m.HAw.CHANNEL_OPENED]:{throttlePeriod:O,throttleKeys:e=>null!=e.channel_static_route?[e.guild_id,e.channel_static_route,e.channel_view]:[e.channel_id,e.channel_view]},[m.HAw.TEXT_IN_VOICE_OPENED]:{throttlePeriod:D,throttleKeys:e=>[e.channel_id]},[m.HAw.NOTIFICATION_VIEWED]:{throttlePeriod:O,throttleKeys:e=>[e.notif_type]},[m.HAw.MEMBER_LIST_VIEWED]:{throttlePeriod:O,throttleKeys:e=>[e.channel_id]},[m.HAw.DM_LIST_VIEWED]:{throttlePeriod:O,throttleKeys:e=>[e.channel_id]},[m.HAw.NAV_DRAWER_OPENED]:{throttlePeriod:O,throttleKeys:()=>[]},[m.HAw.KEYBOARD_SHORTCUT_USED]:{throttlePeriod:C,throttleKeys:e=>[e.shortcut_name,e.location_object,...e.source_class_list??[]]},[m.HAw.QUICKSWITCHER_OPENED]:{throttlePeriod:v,throttleKeys:()=>[]},[m.HAw.CHAT_INPUT_COMPONENT_VIEWED]:{throttlePeriod:O,throttleKeys:e=>[e.type]},[m.HAw.ROLE_PAGE_VIEWED]:{throttlePeriod:C,throttleKeys:e=>[e.role_id,e.tab_opened]},[m.HAw.VIDEO_INPUT_INITIALIZED]:{throttlePeriod:R,throttleKeys:()=>[]},[m.HAw.AUDIO_INPUT_INITIALIZED]:{throttlePeriod:R,throttleKeys:()=>[]},[m.HAw.HUB_ONBOARDING_CAROUSEL_SCROLLED]:{throttlePeriod:O,throttleKeys:()=>[]},[m.HAw.HUB_STUDENT_PROMPT_CLICKED]:{throttlePeriod:O,throttleKeys:()=>[]},[m.HAw.RPC_SERVER_ERROR_CAUGHT]:{throttlePeriod:D,throttleKeys:()=>[]},[m.HAw.RPC_COMMAND_SENT]:{throttlePeriod:D,throttleKeys:e=>[e.application_id,e.command],throttlePercent:L},[m.HAw.RPC_SUBSCRIPTION_REQUESTED]:{throttlePeriod:D,throttleKeys:e=>[e.application_id,e.event],throttlePercent:L},[m.HAw.ACTIVITY_HANDSHAKE]:{throttlePeriod:D,throttleKeys:e=>[e.application_id]},[m.HAw.CHANNEL_BANNER_VIEWED]:{throttlePeriod:D,throttleKeys:e=>[e.banner_type,e.channel_id]},[m.HAw.PREMIUM_UPSELL_VIEWED]:{throttlePeriod:N,throttleKeys:e=>[e.type]},[m.HAw.FORUM_CHANNEL_SEARCHED]:{throttlePeriod:N,throttleKeys:e=>[e.guild_id,e.channel_id]},[m.HAw.FORUM_CHANNEL_SCROLLED]:{throttlePeriod:O,throttleKeys:e=>[e.guild_id,e.channel_id]},[m.HAw.VOICE_CHANNEL_GAME_ACTIVITY_INDICATOR_VIEWED]:{throttlePeriod:N,throttleKeys:e=>[e.user_id]},[m.HAw.MEDIA_VIEWER_SESSION_COMPLETED]:{throttlePeriod:N,throttleKeys:()=>[]},[m.HAw.SUMMARIES_UNREAD_BAR_VIEWED]:{throttlePeriod:R,throttleKeys:e=>[e.channel_id]},[m.HAw.ACTIVITY_CARDS_VIEWED]:{throttlePeriod:O,throttleKeys:e=>[e.context,e.guild_id]},[m.HAw.GUILD_TOOLTIP_SHOWN]:{throttlePeriod:O,throttleKeys:e=>[e.guild_id]},[m.HAw.ACK_COMMUNITY_MESSAGES]:{throttlePeriod:O,throttleKeys:e=>[e.channel_id]},[m.HAw.REDESIGN_NAV_BAR_CLICKED]:{throttlePeriod:O,throttleKeys:e=>[e.tab]},[m.HAw.CHANNEL_LIST_END_REACHED]:{throttlePeriod:O,throttleKeys:e=>[e.guild_id]},[m.HAw.EXPLICIT_MEDIA_REDACTABLE_MESSAGES_LOADED]:{throttlePeriod:N,throttleKeys:e=>[e.guild_id,e.channel_id]},[m.HAw.LIVE_ACTIVITY_SETTINGS_UPDATED]:{throttlePeriod:b,throttleKeys:()=>[]},[m.HAw.MEDIA_INPUT_VOLUME_CHANGED]:{throttlePeriod:R,throttleKeys:e=>[e.location_stack]},[m.HAw.MEDIA_OUTPUT_VOLUME_CHANGED]:{throttlePeriod:R,throttleKeys:e=>[e.location_stack]},[m.HAw.APP_DMS_QUICK_LAUNCHER_IMPRESSION]:{throttlePeriod:O,throttleKeys:e=>[e.channel_id]},[m.HAw.USER_VOICE_ACTIVITY_VIEWED]:{throttlePeriod:R,throttleKeys:e=>[e.activity_user_id,e.surface],deduplicate:!0},[m.HAw.PARTY_VOICE_ACTIVITY_VIEWED]:{throttlePeriod:R,throttleKeys:e=>[e.voice_channel_id],deduplicate:!0},[m.HAw.MEMBER_LIST_SWIPE_PEEK]:{throttlePeriod:y,throttleKeys:e=>[e.channel_id]},[m.HAw.REDACTABLE_MESSAGE_LOADED]:{throttlePeriod:O,throttleKeys:e=>[e.channel_id,e.message_id]},[m.HAw.OPEN_MODAL]:e=>e.type===m.JJy.MEDIA_VIEWER?{throttlePeriod:N,throttleKeys:e=>[e.type]}:void 0,[m.HAw.MODERATOR_QUEUE_ACTION]:{throttlePeriod:v,throttleKeys:e=>[e.guild_id]},[m.HAw.NOTIFICATION_PERMISSION_STATUS]:{throttlePeriod:12*b,throttleKeys:e=>[e.os_enabled,e.notification_authorization_status,e.foreground_app_enabled,e.background_app_enabled]},[m.HAw.SEARCH_BAR_VIEWED]:{throttlePeriod:b,throttleKeys:e=>[e.search_type]},[m.HAw.AD_IDENTIFIER_FETCHED]:{throttlePeriod:D,throttleKeys:()=>[]},[m.HAw.ACTIVITY_PANEL_SDK_LINK_VIEWED]:{throttlePeriod:D,throttleKeys:e=>[e.application_id]},[m.HAw.LIBDISCORE_SLOW_TIMERS]:{throttlePeriod:b,throttleKeys:()=>[]},[m.HAw.VIDEO_STREAM_ZOOM_CHANGED]:{throttlePeriod:y,throttleKeys:()=>[]},[m.HAw.CACHE_STATS_RECORDED]:{throttlePeriod:O,throttleKeys:()=>[]}};function U(e){return"string"==typeof e?{location:e}:{location:e.page,location_page:e.page,location_section:e.section,location_object:e.object,location_object_type:e.objectType}}function G(e){return"string"==typeof e?{source:e}:{source_page:e.page,source_section:e.section,source_object:e.object,source_object_type:e.objectType,source_promotion_id:e.promotionId}}let F=()=>E.O.NONE;function V(e){F=e}function B(e){d.o.includes(e)||h.A.addBreadcrumb({category:"analytics",message:e})}let H=(0,s.trackMaker)({addBreadcrumb:B,analyticEventConfigs:k,dispatcher:l.h,TRACK_ACTION_NAME:"TRACK"});function j(e){return S=e}function Y(e){let t=e??{};if(null!=t.location){let{location:e,...n}=t;t={...n,...U(e)}}if(null!=t.source){let{source:e,...n}=t;t={...n,...G(e)}}t.client_performance_cpu=p.A.getCurrentCPUUsagePercent(),t.client_performance_memory=p.A.getCurrentMemoryUsageKB(),t.cpu_core_count=p.A.getCPUCoreCount(),t.accessibility_features=F(),t.rendered_locale=A.intl.currentLocale,t.uptime_app=Math.floor((performance.now()-w)/y);let n=p.A.getProcessUptime();null!=n&&(t.uptime_process_renderer=Math.floor(n));let{utmSource:r,utmMedium:i,utmCampaign:s,utmContent:a}=S;return t.utm_source=t.utm_source??r,t.utm_medium=t.utm_medium??i,t.utm_campaign=t.utm_campaign??s,t.utm_content=t.utm_content??a,t.launch_signature=M,P.forEach(e=>e(t)),t}function W(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];_.default.isLoggingAnalyticsEvents&&console.info("AnalyticsUtils.track(...):",e,t),n?c.z8("Analytics",e,t):c.z8("Analytics",e)}let K=!1,$={};function z(){K=!0}function q(){K=!1}function Z(){return $}function X(){Object.keys($).forEach(e=>{delete $[e]})}function Q(e,t){return!!K&&(null!=t&&(Array.isArray($[e])?$[e].push(t):$[e]=[t]),!0)}function J(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=String(e);if(Q(e,t),null!=n.throttlePercent&&Math.random()>n.throttlePercent)return Promise.resolve();let i=Y(t);return W(r,i,n.logEventProperties),H(e,i,{flush:n.flush,fingerprint:n.fingerprint})}let ee=(0,s.trackMaker)({addBreadcrumb:B,analyticEventConfigs:k,dispatcher:l.h,TRACK_ACTION_NAME:"TRACK"});function et(e){return e===g.S7.GAME||e===g.S7.DEPRECATED_GAME}function en(e,t){let n=Y({location:(0,u.g$)(),...t});(0,u.eE)(e,{type:"action",...t}),W(e,n),ee(e,n)}function er(){return(0,i.A)()}let ei={...s,getCampaignParams:s.getCampaignParams,setSystemAccessibilityFeatures:V,expandEventProperties:Y,track:J}}