Loading
function(e,t,n){let l;n(667532);var i=n(435558),s=n(855986),r=n(765178),a=n(73153),o=n(927813),u=n(716365);n(806931);let c=[],d={},m=[],p=[],g=10*o.A.Millis.SECOND,f=(0,i.debounce)(()=>{let e=(0,u.fr)(m);r.O.announce(e,"polite"),m=[]},500);class h extends s.Ay.Store{static displayName="VoiceChannelEffectsStore";get recentlyUsedEmojis(){return c}get isOnCooldown(){return null!=l&&new Date<l}get effectCooldownEndTime(){return l}getEffectForUserId(e){return d[e]}}let A=new h(a.h,{VOICE_CHANNEL_EFFECT_CLEAR:function(e){let{userId:t}=e;null!=d[t]&&delete d[t]},VOICE_CHANNEL_EFFECT_RECENT_EMOJI:function(e){let{emoji:t}=e;null!=t&&(c.unshift(t),(c=(0,i.uniqBy)(c,"name")).length>9&&c.pop())},VOICE_CHANNEL_EFFECT_SEND:function(e){let{emoji:t,userId:n,animationType:l}=e;null!=t&&null!=l&&(d[n]={emoji:t,sentAt:Date.now(),animationType:l},m=[...m,{emojiName:t.name,userId:n}],f())},VOICE_CHANNEL_EFFECT_SENT_LOCAL:function(){let e=new Date;if((p=[e,...p].slice(0,20)).length>=20){let t=p[p.length-1],n=e.getTime()-t.getTime();n<g&&(l=new Date(e.getTime()+g-n))}},VOICE_CHANNEL_EFFECT_UPDATE_TIME_STAMP:function(e){let{cooldownEndsAtMs:t}=e;l=new Date(Date.now()+t)}});n.d(t,{},{A:A,a:function(e){null!=e&&a.h.dispatch({type:"VOICE_CHANNEL_EFFECT_CLEAR",userId:e})}})}