Loading
function(e,t,n){"use strict";n(321073);var i=n(435558),r=n.n(i),a=n(803805),s=n(439372),l=n(26909),o=n(630248),d=n(121681),c=n(209932),u=n(931959),_=n(205761),E=n(927813),A=n(594061),f=n(617617),h=n(761821),I=n(355097);n(705751);let p=10+Math.random()*(10*E.A.Millis.SECOND),m=2*E.A.Millis.HOUR+Math.floor(Math.random()*(10*E.A.Millis.MINUTE)),T=null,g=!1;class S extends s.A{actions={POST_CONNECTION_OPEN:N,CONNECTION_RESUMED:N,CONNECTION_CLOSED:R,APP_STATE_UPDATE:O,LOGOUT:C};_initialize(){A.bW.beforeSendCallbacks.push({hasChanges:()=>!1,processProto:()=>{y(m,!1)}}),A.bW.beforeSendCallbacks.push({hasChanges:()=>u.A.hasPendingUsage()&&f.A.hasLoaded(I.oD.FRECENCY_AND_FAVORITES_SETTINGS),processProto:e=>{!u.A.hasPendingUsage()||f.A.hasLoaded(I.oD.FRECENCY_AND_FAVORITES_SETTINGS)&&(e.stickerFrecency=a.Do.create(),e.stickerFrecency.stickers=(0,h.Mr)(u.A.stickerFrecencyWithoutFetchingLatest.usageHistory,100))}}),A.bW.beforeSendCallbacks.push({hasChanges:()=>d.Ay.hasPendingUsage()&&f.A.hasLoaded(I.oD.FRECENCY_AND_FAVORITES_SETTINGS),processProto:e=>{!d.Ay.hasPendingUsage()||f.A.hasLoaded(I.oD.FRECENCY_AND_FAVORITES_SETTINGS)&&(e.emojiFrecency=a.Q8.create(),e.emojiReactionFrecency=a.Q8.create(),e.emojiFrecency.emojis=(0,h.Mr)(d.Ay.emojiFrecencyWithoutFetchingLatest.usageHistory,100),e.emojiReactionFrecency.emojis=(0,h.Mr)(d.Ay.emojiReactionFrecencyWithoutFetchingLatest.usageHistory,100))}}),A.bW.beforeSendCallbacks.push({hasChanges:()=>c.A.hasPendingUsage()&&f.A.hasLoaded(I.oD.FRECENCY_AND_FAVORITES_SETTINGS),processProto:e=>{!c.A.hasPendingUsage()||f.A.hasLoaded(I.oD.FRECENCY_AND_FAVORITES_SETTINGS)&&(e.playedSoundFrecency=a.kc.create(),e.playedSoundFrecency.playedSounds=(0,h.Mr)(c.A.playedSoundFrecencyWithoutFetchingLatest.usageHistory,100))}}),A.bW.beforeSendCallbacks.push({hasChanges:()=>l.Ay.hasPendingUsage()&&f.A.hasLoaded(I.oD.FRECENCY_AND_FAVORITES_SETTINGS),processProto:e=>{!l.Ay.hasPendingUsage()||f.A.hasLoaded(I.oD.FRECENCY_AND_FAVORITES_SETTINGS)&&(e.applicationCommandFrecency=a.Zc.create(),e.applicationCommandFrecency.applicationCommands=(0,h.Mr)(l.Ay.getCommandFrecencyWithoutLoadingLatest().usageHistory,500))}}),A.bW.beforeSendCallbacks.push({hasChanges:()=>o.A.hasPendingUsage()&&f.A.hasLoaded(I.oD.FRECENCY_AND_FAVORITES_SETTINGS),processProto:e=>{!o.A.hasPendingUsage()||f.A.hasLoaded(I.oD.FRECENCY_AND_FAVORITES_SETTINGS)&&(e.applicationFrecency=a.cC.create(),e.applicationFrecency.applications=(0,h.Mr)(o.A.getApplicationFrecencyWithoutLoadingLatest().usageHistory,100))}}),A.bW.beforeSendCallbacks.push({hasChanges:()=>_.A.hasPendingUsage()&&f.A.hasLoaded(I.oD.FRECENCY_AND_FAVORITES_SETTINGS),processProto:e=>{!_.A.hasPendingUsage()||f.A.hasLoaded(I.oD.FRECENCY_AND_FAVORITES_SETTINGS)&&(e.guildAndChannelFrecency=a.F1.create(),e.guildAndChannelFrecency.guildAndChannels=(0,h.Mr)(_.A.frecencyWithoutFetchingLatest.usageHistory,100))}})}}function N(){g=!0,y(p,!0)}function C(){g=!1,clearTimeout(T),T=null}function O(e){g&&"active"!==e.state&&(clearTimeout(T),T=null,L(!1))}function R(){g&&(clearTimeout(T),T=null,L(!1))}async function L(e){if(g){if(y(m,!1),!f.A.hasLoaded(I.oD.FRECENCY_AND_FAVORITES_SETTINGS)&&(u.A.hasPendingUsage()||d.Ay.hasPendingUsage()||l.Ay.hasPendingUsage()||o.A.hasPendingUsage()||c.A.hasPendingUsage()||_.A.hasPendingUsage()&&!e)){(0,A.cE)();try{await A.bW.loadIfNecessary()}catch{return}}r().forEach(A.Df,e=>{e.markDirtyIfHasPendingChange()})}}function y(e,t){null!=T&&clearTimeout(T),T=setTimeout(()=>L(t),e)}let D=new S;n.d(t,{},{A:D})}