mirror of
https://github.com/bvanroll/_dotfiles.git
synced 2025-08-28 19:42:47 +00:00
271 lines
609 KiB
JavaScript
271 lines
609 KiB
JavaScript
// Vencord 5c05443
|
|
// Standalone: true
|
|
// Platform: Universal
|
|
// Updater Disabled: false
|
|
"use strict";var Vencord=(()=>{var rC=Object.create;var Wl=Object.defineProperty;var iC=Object.getOwnPropertyDescriptor;var sC=Object.getOwnPropertyNames;var aC=Object.getPrototypeOf,lC=Object.prototype.hasOwnProperty;var qi=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,o)=>(typeof require<"u"?require:t)[o]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var f=(e,t)=>()=>(e&&(t=e(e=0)),t);var oi=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),lt=(e,t)=>{for(var o in t)Wl(e,o,{get:t[o],enumerable:!0})},fv=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of sC(t))!lC.call(e,i)&&i!==o&&Wl(e,i,{get:()=>t[i],enumerable:!(r=iC(t,i))||r.enumerable});return e};var ql=(e,t,o)=>(o=e!=null?rC(aC(e)):{},fv(t||!e||!e.__esModule?Wl(o,"default",{value:e,enumerable:!0}):o,e)),gv=e=>fv(Wl({},"__esModule",{value:!0}),e);var d,n,a=f(()=>{"use strict";d=Symbol.for("react.fragment"),n=(...e)=>(n=Vencord.Webpack.Common.React.createElement)(...e)});var Q,ke=f(()=>{"use strict";a();Q=class{constructor(t,o="white"){this.name=t;this.color=o}static makeTitle(t,o){return["%c %c %s ","",`background: ${t}; color: black; font-weight: bold; border-radius: 5px;`,o]}_log(t,o,r,i=""){console[t](`%c Vencord %c %c ${this.name} ${i}`,`background: ${o}; color: black; font-weight: bold; border-radius: 5px;`,"",`background: ${this.color}; color: black; font-weight: bold; border-radius: 5px;`,...r)}log(...t){this._log("log","#a6d189",t)}info(...t){this._log("info","#a6d189",t)}error(...t){this._log("error","#e78284",t)}errorCustomFmt(t,...o){this._log("error","#e78284",o,t)}warn(...t){this._log("warn","#e5c890",t)}debug(...t){this._log("debug","#eebebe",t)}}});var hv,G,Ze=f(()=>{"use strict";a();hv="",G={};for(let e of["top","bottom","left","right"])for(let t of[8,16,20]){let o=`vc-m-${e}-${t}`;G[`${e}${t}`]=o,hv+=`.${o}{margin-${e}:${t}px;}`}document.addEventListener("DOMContentLoaded",()=>document.head.append(Object.assign(document.createElement("style"),{textContent:hv,id:"vencord-margins"})),{once:!0})});function xn(e,t=5){let o=0,r;return()=>(!r&&t>o++&&(r=e(),!r&&t===o&&console.error("Lazy factory failed:",e)),r)}function Tt(e,t=5,o=!1){let r=!0;o||setTimeout(()=>r=!1,0);let i=0,s=Object.assign(function(){},{[En]:void 0,[on](){return!s[En]&&t>i++&&(s[En]=e(),!s[En]&&t===i&&console.error("Lazy factory failed:",e)),s[En]}});return new Proxy(s,{...Kl,get(l,u,c){if(u===En||u===on)return Reflect.get(l,u,c);if(!o&&r)return Tt(()=>Reflect.get(l[on](),u,c),t,!0);let m=l[on]();if(typeof m=="object"||typeof m=="function")return Reflect.get(m,u,c);throw new Error("proxyLazy called on a primitive value")}})}var yv,Kl,on,En,Mo=f(()=>{"use strict";a();yv=["arguments","caller","prototype"],Kl={},on=Symbol.for("vencord.lazy.get"),En=Symbol.for("vencord.lazy.cached");for(let e of["apply","construct","defineProperty","deleteProperty","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf"])Kl[e]=(t,...o)=>Reflect[e](t[on](),...o);Kl.ownKeys=e=>{let t=e[on](),o=Reflect.ownKeys(t);for(let r of yv)o.includes(r)||o.push(r);return o};Kl.getOwnPropertyDescriptor=(e,t)=>{if(typeof t=="string"&&yv.includes(t))return Reflect.getOwnPropertyDescriptor(e,t);let o=Reflect.getOwnPropertyDescriptor(e[on](),t);return o&&Object.defineProperty(e,t,o),o}});function Dt(e,t=5){let o=xn(e,t),r=i=>{let s=o()??cC;return n(s,{...i})};return r.$$vencordInternal=o,r}var cC,Yl=f(()=>{"use strict";a();Mo();cC=()=>null});function Kt(e){if(typeof e=="string")return e;let t=e.source.replaceAll("\\i","[A-Za-z_$][\\w$]*");return new RegExp(t,e.flags)}function Xs(e,t){let o=`Vencord.Plugins.plugins[${JSON.stringify(t)}]`;return typeof e!="function"?e.replaceAll("$self",o):(...r)=>e(...r).replaceAll("$self",o)}function Zl(e,t){if(e.get){let o=e.get;e.get=function(){return t(o.call(this))}}else e.value&&(e.value=t(e.value));return e}function Js(e,t){let o=Object.getOwnPropertyDescriptors(e);o.match=Zl(o.match,Kt),o.replace=Zl(o.replace,r=>Xs(r,t)),Object.defineProperties(e,o)}function ag(e){let t=Object.getOwnPropertyDescriptors(e);t.find=Zl(t.find,Kt),Object.defineProperties(e,t)}var Ko=f(()=>{"use strict";a()});var uC,nn,Xl=f(()=>{"use strict";a();ke();uC=(e,t,o)=>t,nn=uC});var rc={};lt(rc,{ChunkIdsRegex:()=>nc,DefaultExtractAndLoadChunksRegex:()=>oc,LazyComponentWebpack:()=>ec,_initWebpack:()=>Vl,_resolveReady:()=>Qs,beforeInitListeners:()=>Ql,cache:()=>Yo,extract:()=>oa,extractAndLoadChunks:()=>pg,extractAndLoadChunksLazy:()=>On,factoryListeners:()=>Vs,filters:()=>ae,find:()=>Zo,findAll:()=>br,findBulk:()=>Tr,findByCode:()=>ta,findByCodeLazy:()=>ye,findByProps:()=>ea,findByPropsLazy:()=>C,findComponentByCode:()=>tc,findComponentByCodeLazy:()=>ve,findComponentLazy:()=>Ki,findExportedComponentLazy:()=>Xo,findLazy:()=>Qe,findModuleFactory:()=>lg,findModuleId:()=>wr,findStore:()=>cg,findStoreLazy:()=>me,handleModuleNotFound:()=>Pn,lazyWebpackSearchHistory:()=>vv,mapMangledModule:()=>ug,mapMangledModuleLazy:()=>oo,moduleListeners:()=>Jl,onceReady:()=>ri,proxyLazyWebpack:()=>Ao,search:()=>Yi,subscriptions:()=>Sr,waitFor:()=>ht,wreq:()=>$t});function Vl(e){$t=e,Yo=e.c}function Pn(e,...t){let o=new Error(`webpack.${e} found no module`);ni.error(o,"Filter:",t)}function br(e){if(typeof e!="function")throw new Error("Invalid filter. Expected a function got "+typeof e);let t=[];for(let o in Yo){let r=Yo[o];if(!(!r.loaded||!r?.exports)){if(e(r.exports))t.push(r.exports);else if(typeof r.exports!="object")continue;if(r.exports.default&&e(r.exports.default))t.push(r.exports.default);else for(let i in r.exports)if(i.length<=3){let s=r.exports[i];s&&e(s)&&t.push(s)}}}return t}function lg(...e){let t=wr(...e);return t?$t.m[t]:null}function Ao(e,t){return Tt(e,t)}function ec(e,t){return Dt(e,t)}function Qe(e){return Tt(()=>Zo(e))}function ea(...e){let t=Zo(ae.byProps(...e),{isIndirect:!0});return t||Pn("findByProps",...e),t}function C(...e){return Tt(()=>ea(...e))}function ta(...e){let t=Zo(ae.byCode(...e),{isIndirect:!0});return t||Pn("findByCode",...e),t}function ye(...e){return Tt(()=>ta(...e))}function cg(e){let t=Zo(ae.byStoreName(e),{isIndirect:!0});return t||Pn("findStore",e),t}function me(e){return Tt(()=>cg(e))}function tc(...e){let t=Zo(ae.componentByCode(...e),{isIndirect:!0});return t||Pn("findComponentByCode",...e),t}function Ki(e){return Dt(()=>{let t=Zo(e,{isIndirect:!0});return t||Pn("findComponent",e),t})}function ve(...e){return Dt(()=>{let t=Zo(ae.componentByCode(...e),{isIndirect:!0});return t||Pn("findComponentByCode",...e),t})}function Xo(...e){return Dt(()=>{let t=Zo(ae.byProps(...e),{isIndirect:!0});return t||Pn("findExportedComponent",...e),t[e[0]]})}function oo(e,t){return Tt(()=>ug(e,t))}async function pg(e,t=oc){let o=lg(...e);if(!o){let l=new Error("extractAndLoadChunks: Couldn't find module factory");return ni.warn(l,"Code:",e,"Matcher:",t),!1}let r=o.toString().match(Kt(t));if(!r){let l=new Error("extractAndLoadChunks: Couldn't find chunk loading in module factory code");return ni.warn(l,"Code:",e,"Matcher:",t),!1}let[,i,s]=r;if(Number.isNaN(Number(s))){let l=new Error("extractAndLoadChunks: Matcher didn't return a capturing group with the chunk ids array, or the entry point id returned as the second group wasn't a number");return ni.warn(l,"Code:",e,"Matcher:",t),!1}if(i){let l=Array.from(i.matchAll(nc)).map(u=>u[1]);await Promise.all(l.map(u=>$t.e(u)))}if($t.m[s]==null){let l=new Error("extractAndLoadChunks: Entry point is not loaded in the module factories, perhaps one of the chunks failed to load");return ni.warn(l,"Code:",e,"Matcher:",t),!1}return $t(s),!0}function On(e,t=oc){return xn(()=>pg(e,t))}function ht(e,t,{isIndirect:o=!1}={}){if(typeof e=="string")e=ae.byProps(e);else if(Array.isArray(e))e=ae.byProps(...e);else if(typeof e!="function")throw new Error("filter must be a string, string[] or function, got "+typeof e);if(Yo!=null){let[r,i]=Zo(e,{isIndirect:!0,isWaitFor:!0});if(r)return void t(r,i)}Sr.set(e,t)}function Yi(...e){let t={},o=$t.m;e:for(let r in o){let i=o[r].original??o[r],s=i.toString();for(let l of e)if(typeof l=="string"&&!s.includes(l)||l instanceof RegExp&&!l.test(s))continue e;t[r]=i}return t}function oa(e){let t=$t.m[e];if(!t)return null;let o=`
|
|
// [EXTRACTED] WebpackModule${e}
|
|
// WARNING: This module was extracted to be more easily readable.
|
|
// This module is NOT ACTUALLY USED! This means putting breakpoints will have NO EFFECT!!
|
|
|
|
0,${t.toString()}
|
|
//# sourceURL=ExtractedWebpackModule${e}
|
|
`;return(0,eval)(o)}var ni,Qs,ri,$t,Yo,ae,Sr,Jl,Vs,Ql,Zo,Tr,wr,vv,ug,oc,nc,$=f(()=>{"use strict";a();Mo();Yl();ke();Ko();Xl();ni=new Q("Webpack"),ri=new Promise(e=>Qs=e),ae={byProps:(...e)=>e.length===1?t=>t[e[0]]!==void 0:t=>e.every(o=>t[o]!==void 0),byCode:(...e)=>t=>{if(typeof t!="function")return!1;let o=Function.prototype.toString.call(t);for(let r of e)if(!o.includes(r))return!1;return!0},byStoreName:e=>t=>t.constructor?.displayName===e,componentByCode:(...e)=>{let t=ae.byCode(...e);return o=>t(o)?!0:o.$$typeof?o.type&&o.type.render?t(o.type.render):o.type?t(o.type):o.render?t(o.render):!1:!1}},Sr=new Map,Jl=new Set,Vs=new Set,Ql=new Set;Zo=nn("find",function(t,{isIndirect:o=!1,isWaitFor:r=!1}={}){if(typeof t!="function")throw new Error("Invalid filter. Expected a function got "+typeof t);for(let i in Yo){let s=Yo[i];if(!(!s.loaded||!s?.exports)){if(t(s.exports))return r?[s.exports,i]:s.exports;if(typeof s.exports=="object"){if(s.exports.default&&t(s.exports.default)){let l=s.exports.default;return r?[l,i]:l}for(let l in s.exports)if(l.length<=3){let u=s.exports[l];if(u&&t(u))return r?[u,i]:u}}}}return o||Pn("find",t),r?[null,null]:null});Tr=nn("findBulk",function(...t){if(!Array.isArray(t))throw new Error("Invalid filters. Expected function[] got "+typeof t);let{length:o}=t;if(o===0)throw new Error("Expected at least two filters.");if(o===1)return Zo(t[0]);let r=t,i=0,s=Array(o);e:for(let l in Yo){let u=Yo[l];if(!(!u.loaded||!u?.exports))for(let c=0;c<o;c++){let m=r[c];if(m!==void 0){if(m(u.exports)){if(s[c]=u.exports,r[c]=void 0,++i===o)break e;break}if(typeof u.exports=="object"){if(u.exports.default&&m(u.exports.default)){if(s[c]=u.exports.default,r[c]=void 0,++i===o)break e;break}for(let g in u.exports)if(g.length<=3){let y=u.exports[g];if(y&&m(y)){if(s[c]=y,r[c]=void 0,++i===o)break e;continue e}}}}}}if(i!==o){let l=new Error(`Got ${o} filters, but only found ${i} modules!`);ni.warn(l)}return s}),wr=nn("findModuleId",function(...t){e:for(let r in $t.m){let i=$t.m[r].toString();for(let s of t)if(!i.includes(s))continue e;return r}let o=new Error(`Didn't find module with code(s):
|
|
`+t.join(`
|
|
`));return ni.warn(o),null});vv=[];ug=nn("mapMangledModule",function(t,o){let r={},i=wr(t);if(i===null)return r;let s=$t(i);e:for(let l in s){let u=s[l];for(let c in o)if(o[c](u)){r[c]=u;continue e}}return r});oc=/(?:(?:Promise\.all\(\[)?(\i\.e\("?[^)]+?"?\)[^\]]*?)(?:\]\))?|Promise\.resolve\(\))\.then\(\i\.bind\(\i,"?([^)]+?)"?\)\)/,nc=/\("([^"]+?)"\)/g});var ic,sc,Sv=f(()=>{"use strict";a();$();ic=Qe(e=>e.image&&e.modal&&!e.applicationIcon),sc=C("buttonWrapper","buttonContent")});function ac(e,t){let o=function(){throw new Error(`Vencord could not find the ${e} Component`)},r=Dt(()=>o);return ht(t,i=>{o=i,Object.assign(r,i)},{isIndirect:!0}),r}function Xt(e,t){ht(ae.byStoreName(e),t,{isIndirect:!0})}var dg=f(()=>{"use strict";a();ft();$()});var S,At,T,Lt,oe,xr,je,na,Z,ra,Fo,lc,ii,cc,si,uc,rn,pc,Zi,Xi,Ji,ia,sa,ai,No,Qi,aa,bv=f(()=>{"use strict";a();$();dg();S={},ai=ac("MaskedLink",ae.componentByCode("MASKED_LINK)")),No=ac("Timestamp",ae.byCode(".Messages.MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL.format")),Qi=ac("Flex",["Justify","Align","Wrap"]),{OAuth2AuthorizeModal:aa}=C("OAuth2AuthorizeModal");ht(["FormItem","Button"],e=>{({useToken:sa,Card:At,Button:T,FormSwitch:Lt,Tooltip:oe,TooltipContainer:xr,TextInput:je,TextArea:na,Text:Z,Select:Fo,SearchableSelect:lc,Slider:ii,ButtonLooks:cc,TabBar:rn,Popout:si,Dialog:uc,Paginator:pc,ScrollerThin:Zi,Clickable:Xi,Avatar:Ji,FocusLock:ia,Heading:ra}=e),S=e})});var E,Jt,Tv=f(()=>{"use strict";a();$();E={};ht(["MenuItem","MenuSliderControl"],e=>E=e);Jt=oo('type:"CONTEXT_MENU_OPEN',{closeContextMenu:ae.byCode("CONTEXT_MENU_CLOSE"),openContextMenu:ae.byCode("renderLazy:"),openContextMenuLazy:e=>typeof e=="function"&&e.toString().length<100})});var H,K,ce,wt,xt,Vi,dc,li,wv=f(()=>{"use strict";a();$();li=C("createPortal","render");ht("useState",e=>{H=e,{useEffect:ce,useState:K,useMemo:wt,useRef:xt,useReducer:Vi,useCallback:dc}=H})});var ci,Yt,Gt,la,We,_n,ui,In,se,L,Qt,xe,Uo,te,Be,Le,sn,ca,ua,Fe,xv=f(()=>{"use strict";a();$();dg();ci=C("connectStores"),Yt=C("ChannelMessage","SlashCommand"),la=C("openPrivateChannel"),Fe=ye("useStateFromStores");Xt("DraftStore",e=>ua=e);Xt("UserStore",e=>L=e);Xt("UserProfileStore",e=>Qt=e);Xt("ChannelStore",e=>te=e);Xt("SelectedChannelStore",e=>xe=e);Xt("SelectedGuildStore",e=>Uo=e);Xt("GuildStore",e=>se=e);Xt("GuildMemberStore",e=>Be=e);Xt("RelationshipStore",e=>Le=e);Xt("PermissionStore",e=>We=e);Xt("PresenceStore",e=>In=e);Xt("ReadStateStore",e=>ui=e);Xt("GuildChannelStore",e=>_n=e);Xt("MessageStore",e=>Gt=e);Xt("WindowStore",e=>ca=e);Xt("EmojiStore",e=>sn=e)});var Pv={};var Iv=f(()=>{"use strict";a()});var Mv={};var Av=f(()=>{"use strict";a()});var Nv={};var Cv=f(()=>{"use strict";a()});var pa,Rv=f(()=>{"use strict";a();$();pa={FrecencyUserSettingsActionCreators:Qe(e=>e.ProtoClass?.typeName?.endsWith(".FrecencyUserSettings")),PreloadedUserSettingsActionCreators:Qe(e=>e.ProtoClass?.typeName?.endsWith(".PreloadedUserSettings"))}});function it(e,t=kv.MESSAGE){V.show({id:V.genId(),message:e,type:t})}var F,Pr,yt,St,Ir,pi,di,Se,uo,Pe,rt,kv,pC,V,no,mi,da,fi,Et,Bn,mc,Ie,gi,mg,Co,fc,fg,gg,Ct,dC,ma,mC,Dv=f(()=>{"use strict";a();Ko();$();ht(["dispatch","subscribe"],e=>{F=e,Vencord.Plugins.subscribeAllPluginsFluxEvents(e);let t=()=>{e.unsubscribe("CONNECTION_OPEN",t),Qs()};e.subscribe("CONNECTION_OPEN",t)});ht(["dispatchToLastSubscribed"],e=>Pr=e);yt=oo('ME:"/users/@me"',{Endpoints:ae.byProps("USER","ME"),UserFlags:ae.byProps("STAFF","SPAMMER"),FriendsSections:e=>e.PENDING==="PENDING"&&e.ADD_FRIEND}),St=Qe(e=>typeof e=="object"&&e.del&&e.put),Ir=C("parseTwoDigitYear"),pi=C("highlight","registerLanguage"),di=C("debounce","cloneDeep"),Se=Qe(e=>e.Messages?.["en-US"]);ht(["fromTimestamp","extractTimestamp"],e=>uo=e);ht("parseTopic",e=>Pe=e);ht(["show","close"],e=>rt=e);kv={MESSAGE:0,SUCCESS:1,FAILURE:2,CUSTOM:3},pC={TOP:0,BOTTOM:1},V={Type:kv,Position:pC,genId:()=>(Math.random()||Math.random()).toString(36).slice(2)};ht("showToast",e=>{V.show=e.showToast,V.pop=e.popToast});no={getUser:ye(".USER(")},mi=C("clearAll","addFile"),da={promptToUpload:ye(".ATTACHMENT_TOO_MANY_ERROR_TITLE,")},fi=C("fetchAssetIds","getAssetImage"),Et=oo('queryCommandEnabled("copy")',{copy:ae.byCode(".copy("),SUPPORTS_COPY:e=>typeof e=="boolean"}),Bn=oo("Transitioning to ",{transitionTo:ae.byCode("transitionTo -"),transitionToGuild:ae.byCode("transitionToGuild -"),back:ae.byCode("goBack()"),forward:ae.byCode("goForward()")});ht(["open","saveAccountChanges"],e=>mc=e);Ie=Qe(e=>typeof e.ADMINISTRATOR=="bigint"),gi=ye("will be removed in v4"),mg=ye("[zustand persist middleware]"),Co=C("editMessage","sendMessage"),fc=C("clearCache","_channelMessages"),fg=C("openUserProfileModal","closeUserProfileModal"),gg=C("resolveInvite"),Ct=C("getGuildBannerURL","getUserAvatarURL"),dC=Kt(/setState\({activeView:\i,activeViewType:/),ma=oo("expression-picker-last-active-view",{closeExpressionPicker:ae.byCode("setState({activeView:null"),openExpressionPicker:e=>typeof e=="function"&&dC.test(e.toString())}),mC=oo('type:"POPOUT_WINDOW_OPEN"',{open:ae.byCode('type:"POPOUT_WINDOW_OPEN"'),close:ae.byCode('type:"POPOUT_WINDOW_CLOSE"'),setAlwaysOnTop:ae.byCode('type:"POPOUT_WINDOW_SET_ALWAYS_ON_TOP"')})});var es={};lt(es,{Alerts:()=>rt,ApplicationAssetUtils:()=>fi,Avatar:()=>Ji,Button:()=>T,ButtonLooks:()=>cc,ButtonWrapperClasses:()=>sc,Card:()=>At,ChannelStore:()=>te,Clickable:()=>Xi,Clipboard:()=>Et,ComponentDispatch:()=>Pr,ComponentTypes:()=>Pv,Constants:()=>yt,ContextMenuApi:()=>Jt,Dialog:()=>uc,DraftStore:()=>ua,DraftType:()=>Yt,EmojiStore:()=>sn,ExpressionPickerStore:()=>ma,Flex:()=>Qi,Flux:()=>ci,FluxDispatcher:()=>F,FocusLock:()=>ia,Forms:()=>S,GuildChannelStore:()=>_n,GuildMemberStore:()=>Be,GuildStore:()=>se,Heading:()=>ra,IconUtils:()=>Ct,InviteActions:()=>gg,MaskedLink:()=>ai,Menu:()=>E,MenuTypes:()=>Mv,MessageActions:()=>Co,MessageCache:()=>fc,MessageStore:()=>Gt,ModalImageClasses:()=>ic,NavigationRouter:()=>Bn,OAuth2AuthorizeModal:()=>aa,Paginator:()=>pc,Parser:()=>Pe,PermissionStore:()=>We,PermissionsBits:()=>Ie,Popout:()=>si,PopoutActions:()=>mC,PresenceStore:()=>In,PrivateChannelsStore:()=>la,React:()=>H,ReactDOM:()=>li,ReadStateStore:()=>ui,RelationshipStore:()=>Le,RestAPI:()=>St,ScrollerThin:()=>Zi,SearchableSelect:()=>lc,Select:()=>Fo,SelectedChannelStore:()=>xe,SelectedGuildStore:()=>Uo,SettingsRouter:()=>mc,Slider:()=>ii,SnowflakeUtils:()=>uo,Switch:()=>Lt,TabBar:()=>rn,Text:()=>Z,TextArea:()=>na,TextInput:()=>je,Timestamp:()=>No,Toasts:()=>V,Tooltip:()=>oe,TooltipContainer:()=>xr,UploadHandler:()=>da,UploadManager:()=>mi,UserProfileActions:()=>fg,UserProfileStore:()=>Qt,UserSettingsActionCreators:()=>pa,UserStore:()=>L,UserUtils:()=>no,UtilTypes:()=>Nv,WindowStore:()=>ca,hljs:()=>pi,i18n:()=>Se,lodash:()=>di,moment:()=>Ir,showToast:()=>it,useCallback:()=>dc,useEffect:()=>ce,useMemo:()=>wt,useReducer:()=>Vi,useRef:()=>xt,useState:()=>K,useStateFromStores:()=>Fe,useToken:()=>sa,zustandCreate:()=>gi,zustandPersist:()=>mg});var b=f(()=>{"use strict";a();Sv();bv();Tv();wv();xv();Iv();Av();Cv();Rv();Dv()});var ts,fC,hi,p,os,P=f(()=>{"use strict";a();ts="webpackChunkdiscord_app",fC="Vencord.Webpack.Common.React",hi="1026515880080842772",p=Object.freeze({Nobody:{name:"Nobody",id:0n},Ven:{name:"Vee",id:343383572805058560n},Arjix:{name:"ArjixWasTaken",id:674710789138939916n},Cyn:{name:"Cynosphere",id:150745989836308480n},Trwy:{name:"trey",id:354427199023218689n},Megu:{name:"Megumin",id:545581357812678656n},botato:{name:"botato",id:440990343899643943n},fawn:{name:"fawn",id:336678828233588736n},rushii:{name:"rushii",id:295190422244950017n},Glitch:{name:"Glitchy",id:269567451199569920n},Samu:{name:"Samu",id:702973430449832038n},Nyako:{name:"nyako",id:118437263754395652n},MaiKokain:{name:"Mai",id:722647978577363026n},echo:{name:"ECHO",id:712639419785412668n},katlyn:{name:"katlyn",id:250322741406859265n},nea:{name:"nea",id:310702108997320705n},Nuckyz:{name:"Nuckyz",id:235834946571337729n},D3SOX:{name:"D3SOX",id:201052085641281538n},Nickyux:{name:"Nickyux",id:427146305651998721n},mantikafasi:{name:"mantikafasi",id:287555395151593473n},Xinto:{name:"Xinto",id:423915768191647755n},JacobTm:{name:"Jacob.Tm",id:302872992097107991n},DustyAngel47:{name:"DustyAngel47",id:714583473804935238n},BanTheNons:{name:"BanTheNons",id:460478012794863637n},BigDuck:{name:"BigDuck",id:1024588272623681609n},AverageReactEnjoyer:{name:"Average React Enjoyer",id:1004904120056029256n},adryd:{name:"adryd",id:0n},Tyman:{name:"Tyman",id:487443883127472129n},afn:{name:"afn",id:420043923822608384n},KraXen72:{name:"KraXen72",id:379304073515499530n},kemo:{name:"kemo",id:715746190813298788n},dzshn:{name:"dzshn",id:310449948011528192n},Ducko:{name:"Ducko",id:506482395269169153n},jewdev:{name:"jewdev",id:222369866529636353n},Luna:{name:"Luny",id:821472922140803112n},Vap:{name:"Vap0r1ze",id:454072114492866560n},KingFish:{name:"King Fish",id:499400512559382538n},Commandtechno:{name:"Commandtechno",id:296776625432035328n},TheSun:{name:"sunnie",id:406028027768733696n},axyie:{name:"'ax",id:273562710745284628n},pointy:{name:"pointy",id:99914384989519872n},SammCheese:{name:"Samm-Cheese",id:372148345894076416n},zt:{name:"zt",id:289556910426816513n},captain:{name:"Captain",id:347366054806159360n},nick:{name:"nick",id:347884694408265729n,badge:!1},whqwert:{name:"whqwert",id:586239091520176128n},lewisakura:{name:"lewisakura",id:96269247411400704n},RuiNtD:{name:"RuiNtD",id:157917665162297344n},hunt:{name:"hunt-g",id:222800179697287168n},cloudburst:{name:"cloudburst",id:892128204150685769n},Aria:{name:"Syncxv",id:549244932213309442n},TheKodeToad:{name:"TheKodeToad",id:706152404072267788n},LordElias:{name:"LordElias",id:319460781567639554n},juby:{name:"Juby210",id:324622488644616195n},Alyxia:{name:"Alyxia Sother",id:952185386350829688n},Remty:{name:"Remty",id:335055032204656642n},skyevg:{name:"skyevg",id:1090310844283363348n},Dziurwa:{name:"Dziurwa",id:1001086404203389018n},arHSM:{name:"arHSM",id:841509053422632990n},F53:{name:"F53",id:280411966126948353n},AutumnVN:{name:"AutumnVN",id:393694671383166998n},pylix:{name:"pylix",id:492949202121261067n},Tyler:{name:"\\\\GGTyler\\\\",id:143117463788191746n},RyanCaoDev:{name:"RyanCaoDev",id:952235800110694471n},FieryFlames:{name:"Fiery",id:890228870559698955n},KannaDev:{name:"Kanna",id:317728561106518019n},carince:{name:"carince",id:818323528755314698n},PandaNinjas:{name:"PandaNinjas",id:455128749071925248n},CatNoir:{name:"CatNoir",id:260371016348336128n},outfoxxed:{name:"outfoxxed",id:837425748435796060n},UwUDev:{name:"UwU",id:691413039156690994n},amia:{name:"amia",id:142007603549962240n},phil:{name:"phil",id:305288513941667851n},ImLvna:{name:"lillith <3",id:799319081723232267n},rad:{name:"rad",id:610945092504780823n},AndrewDLO:{name:"Andrew-DLO",id:434135504792059917n},HypedDomi:{name:"HypedDomi",id:354191516979429376n},Rini:{name:"Rini",id:1079479184478441643n},castdrian:{name:"castdrian",id:224617799434108928n},Arrow:{name:"arrow",id:958158495302176778n},bb010g:{name:"bb010g",id:72791153467990016n},Dolfies:{name:"Dolfies",id:852892297661906993n},RuukuLada:{name:"RuukuLada",id:119705748346241027n},blahajZip:{name:"blahaj.zip",id:683954422241427471n},archeruwu:{name:"archer_uwu",id:160068695383736320n},ProffDea:{name:"ProffDea",id:609329952180928513n},UlyssesZhan:{name:"UlyssesZhan",id:586808226058862623n},ant0n:{name:"ant0n",id:145224646868860928n},Board:{name:"BoardTM",id:285475344817848320n},philipbry:{name:"philipbry",id:554994003318276106n},Korbo:{name:"Korbo",id:455856406420258827n},maisymoe:{name:"maisy",id:257109471589957632n},Lexi:{name:"Lexi",id:506101469787717658n},Mopi:{name:"Mopi",id:1022189106614243350n},Grzesiek11:{name:"Grzesiek11",id:368475654662127616n},Samwich:{name:"Samwich",id:976176454511509554n},coolelectronics:{name:"coolelectronics",id:696392247205298207n},Av32000:{name:"Av32000",id:593436735380127770n},Noxillio:{name:"Noxillio",id:138616536502894592n},Kyuuhachi:{name:"Kyuuhachi",id:236588665420251137n},nin0dev:{name:"nin0dev",id:886685857560539176n},Elvyra:{name:"Elvyra",id:708275751816003615n},HappyEnderman:{name:"Happy enderman",id:1083437693347827764n},Vishnya:{name:"Vishnya",id:282541644484575233n},Inbestigator:{name:"Inbestigator",id:761777382041714690n},newwares:{name:"newwares",id:421405303951851520n},JohnyTheCarrot:{name:"JohnyTheCarrot",id:132819036282159104n},puv:{name:"puv",id:469441552251355137n},Kodarru:{name:"Kodarru",id:785227396218748949n},nakoyasha:{name:"nakoyasha",id:222069018507345921n},Sqaaakoi:{name:"Sqaaakoi",id:259558259491340288n},Byron:{name:"byeoon",id:1167275288036655133n},Kaitlyn:{name:"kaitlyn",id:306158896630988801n},PolisanTheEasyNick:{name:"Oleh Polisan",id:242305263313485825n},HAHALOSAH:{name:"HAHALOSAH",id:903418691268513883n},GabiRP:{name:"GabiRP",id:507955112027750401n},ImBanana:{name:"Im_Banana",id:635250116688871425n},xocherry:{name:"xocherry",id:221288171013406720n},ScattrdBlade:{name:"ScattrdBlade",id:678007540608532491n},goodbee:{name:"goodbee",id:658968552606400512n},Moxxie:{name:"Moxxie",id:712653921692155965n},Ethan:{name:"Ethan",id:721717126523781240n},nyx:{name:"verticalsync",id:328165170536775680n},nekohaxx:{name:"nekohaxx",id:1176270221628153886n},Antti:{name:"Antti",id:312974985876471810n}}),os=(()=>Object.freeze(Object.fromEntries(Object.entries(p).filter(e=>e[1].id!==0n).map(([e,t])=>[t.id,t]))))()});function q(...e){return e.filter(Boolean).join(" ")}function an(e){return new Promise(t=>setTimeout(t,e))}function po(e,t="Copied to clipboard!"){Et.SUPPORTS_COPY?Et.copy(e):t="Your browser does not support copying to clipboard",V.show({message:t,id:V.genId(),type:V.Type.SUCCESS})}function gC(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function fa(e){for(let t in e)if(Object.hasOwn(e,t))return!1;return!0}function hg(e){try{return new URL(e)}catch{return null}}function ns(e){return e}function vg(e,t,o=t+"s"){return e===1?`${e} ${t}`:`${e} ${o}`}function gc(e,t){try{let o=e();return o instanceof Promise?o.catch(()=>t):o}catch{return t}}var yg,hC,Fn,be=f(()=>{"use strict";a();b();P();yg=e=>{let t=e.getBoundingClientRect(),o=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(t.bottom<0||t.top-o>=0)};hC=navigator.userAgent.includes("Mobi"),Fn=e=>Object.hasOwn(os,e)});function st(e,t){let o=Object.assign({fallbackValue:null,deps:[],onError:null},t),[r,i]=K({value:o.fallbackValue,error:null,pending:!0});return ce(()=>{let s=!0;return r.pending||i({...r,pending:!0}),e().then(l=>{!s||(i({value:l,error:null,pending:!1}),o.onSuccess?.(l))}).catch(l=>{!s||(i({value:null,error:l,pending:!1}),o.onError?.(l))}),()=>void(s=!1)},o.deps),[r.value,r.error,r.pending]}function Jo(e){let t=Vi(o=>o+1,0);return e?t:t[1]}function ga({interval:e=1e3,deps:t=[]}){let[o,r]=K(0),i=wt(()=>Date.now(),t);return ce(()=>{let s=setInterval(()=>r(Date.now()-i),e);return()=>{r(0),clearInterval(s)}},t),o}var yC,Sg,ft=f(()=>{"use strict";a();b();be();Yl();yC=()=>null,Sg=(e=!1)=>{let t=H.useRef(null),[o,r]=K(!1);return[s=>{t.current?.disconnect(),t.current=null,s&&(yg(s)&&(r(!0),e)||(t.current=new IntersectionObserver(l=>{for(let u of l)u.target===s&&(u.isIntersecting&&e?(r(!0),t.current?.disconnect(),t.current=null):r(u.isIntersecting))}),t.current.observe(s)))},o]}});var Lv=f(()=>{});function mo(e){return n("div",{...e,className:q(e.className,"vc-error-card")},e.children)}var yi=f(()=>{"use strict";a();Lv();be()});var vC,Ev,Ov,bg,k,re=f(()=>{"use strict";a();ke();Ze();ft();b();yi();vC="#e78284",Ev=new Q("React ErrorBoundary",vC),Ov={},bg=Dt(()=>class extends H.PureComponent{state={error:Ov,stack:"",message:""};static getDerivedStateFromError(t){let o=t?.stack??"",r=t?.message||String(t);if(t instanceof Error&&o){let i=o.indexOf(`
|
|
`);i!==-1&&(r=o.slice(0,i),o=o.slice(i+1).replace(/https:\/\/\S+\/assets\//g,""))}return{error:t,stack:o,message:r}}componentDidCatch(t,o){this.props.onError?.({error:t,errorInfo:o,props:this.props.wrappedProps}),Ev.error(`A component threw an Error
|
|
`,t),Ev.error("Component Stack",o.componentStack)}render(){if(this.state.error===Ov)return this.props.children;if(this.props.noop)return null;if(this.props.fallback)return n(this.props.fallback,{children:this.props.children,...this.state});let t=this.props.message||"An error occurred while rendering this Component. More info can be found below and in your console.";return n(mo,{style:{overflow:"hidden"}},n("h1",null,"Oh no!"),n("p",null,t),n("code",null,this.state.message,!!this.state.stack&&n("pre",{className:G.top8},this.state.stack)))}});bg.wrap=(e,t)=>o=>n(bg,{...t,wrappedProps:o},n(e,{...o}));k=bg});var _v=f(()=>{});function ha(){return n("svg",{"aria-hidden":"true",height:"16",viewBox:"0 0 16 16",width:"16",style:{marginRight:"0.5em",transform:"translateY(2px)"}},n("path",{fill:"#db61a2","fill-rule":"evenodd",d:"M4.25 2.5c-1.336 0-2.75 1.164-2.75 3 0 2.15 1.58 4.144 3.365 5.682A20.565 20.565 0 008 13.393a20.561 20.561 0 003.135-2.211C12.92 9.644 14.5 7.65 14.5 5.5c0-1.836-1.414-3-2.75-3-1.373 0-2.609.986-3.029 2.456a.75.75 0 01-1.442 0C6.859 3.486 5.623 2.5 4.25 2.5zM8 14.25l-.345.666-.002-.001-.006-.003-.018-.01a7.643 7.643 0 01-.31-.17 22.075 22.075 0 01-3.434-2.414C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.045 5.231-3.885 6.818a22.08 22.08 0 01-3.744 2.584l-.018.01-.006.003h-.002L8 14.25zm0 0l.345.666a.752.752 0 01-.69 0L8 14.25z"}))}var hc=f(()=>{"use strict";a()});function ya(e){return n(T,{...e,look:T.Looks.LINK,color:T.Colors.TRANSPARENT,onClick:()=>VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")},n(ha,null),"Donate")}var yc=f(()=>{"use strict";a();b();hc()});function pe(e){return e.style??={},e.style.display="flex",e.style.gap??="1em",e.style.flexDirection||=e.flexDirection,delete e.flexDirection,n("div",{...e},e.children)}var Rt=f(()=>{"use strict";a()});var Bv=f(()=>{});function ro(e,t=300){let o;return function(...r){clearTimeout(o),o=setTimeout(()=>{e(...r)},t)}}var Mr=f(()=>{"use strict";a()});var vc,Fv=f(()=>{"use strict";a();vc=class{pathListeners=new Map;globalListeners=new Set;constructor(t,o={}){this.plain=t,this.store=this.makeProxy(t),Object.assign(this,o)}makeProxy(t,o=t,r=""){let i=this;return new Proxy(t,{get(s,l){let u=s[l];return!(l in s)&&i.getDefaultValue&&(u=i.getDefaultValue({target:s,key:l,root:o,path:r})),typeof u=="object"&&u!==null&&!Array.isArray(u)?i.makeProxy(u,o,`${r}${r&&"."}${l}`):u},set(s,l,u){if(s[l]===u)return!0;Reflect.set(s,l,u);let c=`${r}${r&&"."}${l}`;return i.globalListeners.forEach(m=>m(u,c)),i.pathListeners.get(c)?.forEach(m=>m(u)),!0}})}setData(t,o){if(this.readOnly)throw new Error("SettingsStore is read-only");if(this.plain=t,this.store=this.makeProxy(t),o){let r=t,i=o.split(".");for(let s of i){if(!r){console.warn(`Settings#setData: Path ${o} does not exist in new data. Not dispatching update`);return}r=r[s]}this.pathListeners.get(o)?.forEach(s=>s(r))}this.markAsChanged()}addGlobalChangeListener(t){this.globalListeners.add(t)}addChangeListener(t,o){let r=this.pathListeners.get(t)??new Set;r.add(o),this.pathListeners.set(t,r)}removeGlobalChangeListener(t){this.globalListeners.delete(t)}removeChangeListener(t,o){let r=this.pathListeners.get(t);!r||(r.delete(o),r.size||this.pathListeners.delete(t))}markAsChanged(){this.globalListeners.forEach(t=>t(this.plain,""))}}});var vi,Sc=f(()=>{"use strict";a();({localStorage:vi}=window)});function rs(e,t){for(let o in t){let r=t[o];typeof r=="object"&&!Array.isArray(r)?(e[o]??={},rs(e[o],r)):e[o]??=r}return e}var bc=f(()=>{"use strict";a()});var $o,Si=f(()=>{"use strict";a();$o=class{constructor(t=1/0){this.maxSize=t}queue=[];promise;next(){let t=this.queue.shift();t?this.promise=Promise.resolve().then(t).finally(()=>this.next()):this.promise=void 0}run(){this.promise||this.next()}push(t){this.size>=this.maxSize&&this.queue.shift(),this.queue.push(t),this.run()}unshift(t){this.size>=this.maxSize&&this.queue.pop(),this.queue.unshift(t),this.run()}get size(){return this.queue.length}}});var Uv=f(()=>{});var Tc,Tg=f(()=>{"use strict";a();Uv();_();re();be();b();Tc=k.wrap(function({title:t,body:o,richBody:r,color:i,icon:s,onClick:l,onClose:u,image:c,permanent:m,className:g,dismissOnClick:y}){let{timeout:v,position:M}=Pt(["notifications.timeout","notifications.position"]).notifications,x=Fe([ca],()=>ca.isFocused()),[N,I]=K(!1),[R,D]=K(0),B=wt(()=>Date.now(),[v,N,x]);ce(()=>{if(N||!x||v===0||m)return void D(0);let Y=setInterval(()=>{let ee=Date.now()-B;ee>=v?u():D(ee)},10);return()=>clearInterval(Y)},[v,N,x]);let z=R/v;return n("button",{className:q("vc-notification-root",g),style:M==="bottom-right"?{bottom:"1rem"}:{top:"3rem"},onClick:()=>{l?.(),y!==!1&&u()},onContextMenu:Y=>{Y.preventDefault(),Y.stopPropagation(),u()},onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1)},n("div",{className:"vc-notification"},s&&n("img",{className:"vc-notification-icon",src:s,alt:""}),n("div",{className:"vc-notification-content"},n("div",{className:"vc-notification-header"},n("h2",{className:"vc-notification-title"},t),n("button",{className:"vc-notification-close-btn",onClick:Y=>{Y.preventDefault(),Y.stopPropagation(),u()}},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24",role:"img","aria-labelledby":"vc-notification-dismiss-title"},n("title",{id:"vc-notification-dismiss-title"},"Dismiss Notification"),n("path",{fill:"currentColor",d:"M18.4 4L12 10.4L5.6 4L4 5.6L10.4 12L4 18.4L5.6 20L12 13.6L18.4 20L20 18.4L13.6 12L20 5.6L18.4 4Z"})))),n("div",null,r??n("p",{className:"vc-notification-p"},o)))),c&&n("img",{className:"vc-notification-img",src:c,alt:""}),v!==0&&!m&&n("div",{className:"vc-notification-progressbar",style:{width:`${(1-z)*100}%`,backgroundColor:i||"var(--brand-500)"}}))},{onError:({props:e})=>e.onClose()})});var Mn={};lt(Mn,{clear:()=>wC,createStore:()=>$v,del:()=>xg,delMany:()=>TC,entries:()=>IC,get:()=>It,getMany:()=>bC,keys:()=>xC,promisifyRequest:()=>fo,set:()=>Ht,setMany:()=>SC,update:()=>bi,values:()=>PC});function fo(e){return new Promise((t,o)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>o(e.error)})}function $v(e,t){let o=indexedDB.open(e);o.onupgradeneeded=()=>o.result.createObjectStore(t);let r=fo(o);return(i,s)=>r.then(l=>s(l.transaction(t,i).objectStore(t)))}function ln(){return wg||(wg=$v("VencordData","VencordStore")),wg}function It(e,t=ln()){return t("readonly",o=>fo(o.get(e)))}function Ht(e,t,o=ln()){return o("readwrite",r=>(r.put(t,e),fo(r.transaction)))}function SC(e,t=ln()){return t("readwrite",o=>(e.forEach(r=>o.put(r[1],r[0])),fo(o.transaction)))}function bC(e,t=ln()){return t("readonly",o=>Promise.all(e.map(r=>fo(o.get(r)))))}function bi(e,t,o=ln()){return o("readwrite",r=>new Promise((i,s)=>{r.get(e).onsuccess=function(){try{r.put(t(this.result),e),i(fo(r.transaction))}catch(l){s(l)}}}))}function xg(e,t=ln()){return t("readwrite",o=>(o.delete(e),fo(o.transaction)))}function TC(e,t=ln()){return t("readwrite",o=>(e.forEach(r=>o.delete(r)),fo(o.transaction)))}function wC(e=ln()){return e("readwrite",t=>(t.clear(),fo(t.transaction)))}function Pg(e,t){return e.openCursor().onsuccess=function(){!this.result||(t(this.result),this.result.continue())},fo(e.transaction)}function xC(e=ln()){return e("readonly",t=>{if(t.getAllKeys)return fo(t.getAllKeys());let o=[];return Pg(t,r=>o.push(r.key)).then(()=>o)})}function PC(e=ln()){return e("readonly",t=>{if(t.getAll)return fo(t.getAll());let o=[];return Pg(t,r=>o.push(r.value)).then(()=>o)})}function IC(e=ln()){return e("readonly",t=>{if(t.getAll&&t.getAllKeys)return Promise.all([fo(t.getAllKeys()),fo(t.getAll())]).then(([r,i])=>r.map((s,l)=>[s,i[l]]));let o=[];return e("readonly",r=>Pg(r,i=>o.push([i.key,i.value])).then(()=>o))})}var wg,cn=f(()=>{"use strict";a();});var Ag={};lt(Ag,{classNameFactory:()=>Te,classNameToSelector:()=>Hv,compileStyle:()=>Mg,disableStyle:()=>go,enableStyle:()=>zt,isStyleEnabled:()=>Ig,requireStyle:()=>va,setStyleClassNames:()=>AC,styleMap:()=>Gv,toggleStyle:()=>MC});function va(e){let t=Gv.get(e);if(!t)throw new Error(`Style "${e}" does not exist`);return t}function zt(e){let t=va(e);return t.dom?.isConnected?!1:(t.dom||(t.dom=document.createElement("style"),t.dom.dataset.vencordName=t.name),Mg(t),document.head.appendChild(t.dom),!0)}function go(e){let t=va(e);return t.dom?.isConnected?(t.dom.remove(),t.dom=null,!0):!1}var Gv,MC,Ig,AC,Mg,Hv,Te,Ve=f(()=>{"use strict";a();Gv=window.VencordStyles??=new Map;MC=e=>Ig(e)?go(e):zt(e),Ig=e=>va(e).dom?.isConnected??!1,AC=(e,t,o=!0)=>{let r=va(e);r.classNames=t,o&&Ig(r.name)&&Mg(r)},Mg=e=>{if(!e.dom)throw new Error("Style has no DOM element");e.dom.textContent=e.source.replace(/\[--(\w+)\]/g,(t,o)=>{let r=e.classNames[o];return r?Hv(r):t})},Hv=(e,t="")=>e.split(" ").map(o=>`.${t}${o}`).join(""),Te=(e="")=>(...t)=>{let o=new Set;for(let r of t)r&&typeof r=="string"?o.add(r):Array.isArray(r)?r.forEach(i=>o.add(i)):r&&typeof r=="object"&&Object.entries(r).forEach(([i,s])=>s&&o.add(i));return Array.from(o,r=>e+r).join(" ")}});function Sa(e,t){return wc.openModalLazy(e,t)}function ue(e,t,o){return wc.openModal(e,t,o)}function Un(e,t){return wc.closeModal(e,t)}function An(){return wc.closeAllModals()}var Ro,un,Ng,fe,Ee,we,ct,ut,wc,$e=f(()=>{"use strict";a();$();ft();Ro=(i=>(i.SMALL="small",i.MEDIUM="medium",i.LARGE="large",i.DYNAMIC="dynamic",i))(Ro||{}),un=C("ModalRoot","ModalCloseButton"),Ng=ve(".MEDIA_MODAL_CLOSE","responsive"),fe=Dt(()=>un.ModalRoot),Ee=Dt(()=>un.ModalHeader),we=Dt(()=>un.ModalContent),ct=Dt(()=>un.ModalFooter),ut=Dt(()=>un.ModalCloseButton),wc=C("openModalLazy")});function Cg({text:e,color:t}){return n("div",{className:"vc-plugins-badge",style:{backgroundColor:t,justifySelf:"flex-end",marginLeft:"auto"}},e)}var xc=f(()=>{"use strict";a()});function ba({value:e,onChange:t,validate:o}){let[r,i]=H.useState(e),[s,l]=H.useState();function u(c){i(c);let m=o(c);m===!0?(l(void 0),t(c)):l(m)}return n(d,null,n(je,{type:"text",value:r,onChange:u,error:s}))}var Pc=f(()=>{"use strict";a();b()});function Ta(e){return n("div",{className:NC.markup},Pe.defaultRules.codeBlock.react(e,null,{}))}var NC,Ic=f(()=>{"use strict";a();$();b();NC=C("markup","codeContainer")});var zv=f(()=>{});function wa({children:e,onMoreClick:t,buttons:o,moreTooltipText:r,onDropDownClick:i,headerText:s,defaultState:l=!1,forceOpen:u=!1}){let[c,m]=K(l||u);return n(d,null,n("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"8px"}},n(Z,{tag:"h2",variant:"eyebrow",style:{color:"var(--header-primary)",display:"inline"}},s),n("div",{className:Rg("center-flex")},o??null,t&&n(oe,{text:r},g=>n("button",{...g,className:Rg("btn"),onClick:t},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},n("path",{fill:"var(--text-normal)",d:"M7 12.001C7 10.8964 6.10457 10.001 5 10.001C3.89543 10.001 3 10.8964 3 12.001C3 13.1055 3.89543 14.001 5 14.001C6.10457 14.001 7 13.1055 7 12.001ZM14 12.001C14 10.8964 13.1046 10.001 12 10.001C10.8954 10.001 10 10.8964 10 12.001C10 13.1055 10.8954 14.001 12 14.001C13.1046 14.001 14 13.1055 14 12.001ZM19 10.001C20.1046 10.001 21 10.8964 21 12.001C21 13.1055 20.1046 14.001 19 14.001C17.8954 14.001 17 13.1055 17 12.001C17 10.8964 17.8954 10.001 19 10.001Z"})))),n(oe,{text:c?"Hide "+s:"Show "+s},g=>n("button",{...g,className:Rg("btn"),onClick:()=>{m(y=>!y),i?.(c)},disabled:u},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24",transform:c?"scale(1 -1)":"scale(1 1)"},n("path",{fill:"var(--text-normal)",d:"M16.59 8.59003L12 13.17L7.41 8.59003L6 10L12 16L18 10L16.59 8.59003Z"})))))),c&&e)}var Rg,Mc=f(()=>{"use strict";a();zv();Ve();b();Rg=Te("vc-expandableheader-")});var jv=f(()=>{});async function Ti(e){let{invite:t}=await gg.resolveInvite(e,"Desktop Modal");if(!t)throw new Error("Invalid invite: "+e);return F.dispatch({type:"INVITE_MODAL_OPEN",invite:t,code:e,context:"APP"}),new Promise(o=>{let r,i,s=!1;F.subscribe("INVITE_ACCEPT",i=()=>{s=!0}),F.subscribe("INVITE_MODAL_CLOSE",r=()=>{F.unsubscribe("INVITE_MODAL_CLOSE",r),F.unsubscribe("INVITE_ACCEPT",i),o(s)})})}function pn(){return te.getChannel(xe.getChannelId())}function wi(){return se.getGuild(pn()?.guild_id)}function CC(e){la.openPrivateChannel(e)}function is(){return pa.PreloadedUserSettingsActionCreators.getCurrentValue()?.appearance?.theme}function $n(e){Pr.dispatchToLastSubscribed("INSERT_TEXT",{rawText:e,plainText:e})}function Nc(e,t,o,r){let i={content:"",invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};return Co.sendMessage(e,i,o,r)}function Go(e,t){return ue(o=>n(fe,{...o,className:ic.modal,size:"dynamic"},n(Ng,{className:ic.image,original:e,placeholder:e,src:e,renderLinkComponent:r=>n(ai,{...r}),renderForwardComponent:()=>null,shouldHideMediaOptions:!1,shouldAnimate:!0,...t})))}async function Ho(e){if(!await no.getUser(e))throw new Error("No such user: "+e);let o=Uo.getGuildId();fg.openUserProfileModal({userId:e,guildId:o,channelId:xe.getChannelId(),analyticsLocation:{page:o?"Guild Channel":"DM Channel",section:"Profile Popout"}})}async function kg(e,t){let o=Qt.getUserProfile(e);if(o)return o;F.dispatch({type:"USER_PROFILE_FETCH_START",userId:e});let{body:r}=await St.get({url:yt.Endpoints.USER_PROFILE(e),query:{with_mutual_guilds:!1,with_mutual_friends_count:!1,...t},oldFormErrors:!0});return F.dispatch({type:"USER_UPDATE",user:r.user}),await F.dispatch({type:"USER_PROFILE_FETCH_SUCCESS",...r}),t?.guild_id&&r.guild_member&&F.dispatch({type:"GUILD_MEMBER_PROFILE_UPDATE",guildId:t.guild_id,guildMember:r.guild_member}),Qt.getUserProfile(e)}function Gn(e){return e.discriminator==="0"?e.username:e.tag}var Ac,pt=f(()=>{"use strict";a();b();$e();Ac=(o=>(o[o.Dark=1]="Dark",o[o.Light=2]="Light",o))(Ac||{})});function kt({height:e=24,width:t=24,className:o,children:r,viewBox:i,...s}){return n("svg",{className:q(o,"vc-icon"),role:"img",width:t,height:e,viewBox:i,...s},r)}function xi({height:e=24,width:t=24,className:o}){return n(kt,{height:e,width:t,className:q(o,"vc-link-icon"),viewBox:"0 0 24 24"},n("g",{fill:"none","fill-rule":"evenodd"},n("path",{fill:"currentColor",d:"M10.59 13.41c.41.39.41 1.03 0 1.42-.39.39-1.03.39-1.42 0a5.003 5.003 0 0 1 0-7.07l3.54-3.54a5.003 5.003 0 0 1 7.07 0 5.003 5.003 0 0 1 0 7.07l-1.49 1.49c.01-.82-.12-1.64-.4-2.42l.47-.48a2.982 2.982 0 0 0 0-4.24 2.982 2.982 0 0 0-4.24 0l-3.53 3.53a2.982 2.982 0 0 0 0 4.24zm2.82-4.24c.39-.39 1.03-.39 1.42 0a5.003 5.003 0 0 1 0 7.07l-3.54 3.54a5.003 5.003 0 0 1-7.07 0 5.003 5.003 0 0 1 0-7.07l1.49-1.49c-.01.82.12 1.64.4 2.43l-.47.47a2.982 2.982 0 0 0 0 4.24 2.982 2.982 0 0 0 4.24 0l3.53-3.53a2.982 2.982 0 0 0 0-4.24.973.973 0 0 1 0-1.42z"}),n("rect",{width:t,height:e})))}function xa(e){return n(kt,{...e,className:q(e.className,"vc-copy-icon"),viewBox:"0 0 24 24"},n("g",{fill:"currentColor"},n("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1z"}),n("path",{d:"M15 5H8c-1.1 0-1.99.9-1.99 2L6 21c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V11l-6-6zM8 21V7h6v5h5v9H8z"})))}function Hn(e){return n(kt,{...e,className:q(e.className,"vc-open-external-icon"),viewBox:"0 0 24 24"},n("polygon",{fill:"currentColor",fillRule:"nonzero",points:"13 20 11 20 11 8 5.5 13.5 4.08 12.08 12 4.16 19.92 12.08 18.5 13.5 13 8"}))}function dn(e){return n(kt,{...e,className:q(e.className,"vc-image-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M21,19V5c0,-1.1 -0.9,-2 -2,-2H5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2zM8.5,13.5l2.5,3.01L14.5,12l4.5,6H5l3.5,-4.5z"}))}function Pa(e){return n(kt,{...e,className:q(e.className,"vc-info-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",transform:"translate(2 2)",d:"M9,7 L11,7 L11,5 L9,5 L9,7 Z M10,18 C5.59,18 2,14.41 2,10 C2,5.59 5.59,2 10,2 C14.41,2 18,5.59 18,10 C18,14.41 14.41,18 10,18 L10,18 Z M10,4.4408921e-16 C4.4771525,-1.77635684e-15 4.4408921e-16,4.4771525 0,10 C-1.33226763e-15,12.6521649 1.0535684,15.195704 2.92893219,17.0710678 C4.80429597,18.9464316 7.3478351,20 10,20 C12.6521649,20 15.195704,18.9464316 17.0710678,17.0710678 C18.9464316,15.195704 20,12.6521649 20,10 C20,7.3478351 18.9464316,4.80429597 17.0710678,2.92893219 C15.195704,1.0535684 12.6521649,2.22044605e-16 10,0 L10,4.4408921e-16 Z M9,15 L11,15 L11,9 L9,9 L9,15 L9,15 Z"}))}function Dg(e){return n(kt,{"aria-label":Se.Messages.GUILD_OWNER,...e,className:q(e.className,"vc-owner-crown-icon"),role:"img",viewBox:"0 0 16 16"},n("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M13.6572 5.42868C13.8879 5.29002 14.1806 5.30402 14.3973 5.46468C14.6133 5.62602 14.7119 5.90068 14.6473 6.16202L13.3139 11.4954C13.2393 11.7927 12.9726 12.0007 12.6666 12.0007H3.33325C3.02725 12.0007 2.76058 11.792 2.68592 11.4954L1.35258 6.16202C1.28792 5.90068 1.38658 5.62602 1.60258 5.46468C1.81992 5.30468 2.11192 5.29068 2.34325 5.42868L5.13192 7.10202L7.44592 3.63068C7.46173 3.60697 7.48377 3.5913 7.50588 3.57559C7.5192 3.56612 7.53255 3.55663 7.54458 3.54535L6.90258 2.90268C6.77325 2.77335 6.77325 2.56068 6.90258 2.43135L7.76458 1.56935C7.89392 1.44002 8.10658 1.44002 8.23592 1.56935L9.09792 2.43135C9.22725 2.56068 9.22725 2.77335 9.09792 2.90268L8.45592 3.54535C8.46794 3.55686 8.48154 3.56651 8.49516 3.57618C8.51703 3.5917 8.53897 3.60727 8.55458 3.63068L10.8686 7.10202L13.6572 5.42868ZM2.66667 12.6673H13.3333V14.0007H2.66667V12.6673Z"}))}function Lg(e){return n(kt,{...e,className:q(e.className,"vc-screenshare-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M2 4.5C2 3.397 2.897 2.5 4 2.5H20C21.103 2.5 22 3.397 22 4.5V15.5C22 16.604 21.103 17.5 20 17.5H13V19.5H17V21.5H7V19.5H11V17.5H4C2.897 17.5 2 16.604 2 15.5V4.5ZM13.2 14.3375V11.6C9.864 11.6 7.668 12.6625 6 15C6.672 11.6625 8.532 8.3375 13.2 7.6625V5L18 9.6625L13.2 14.3375Z"}))}function Ia(e){return n(kt,{...e,className:q(e.className,"vc-image-visible"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Zm0-2h14V5H5v14Zm1-2h12l-3.75-5-3 4L9 13Zm-1 2V5v14Z"}))}function Ma(e){return n(kt,{...e,className:q(e.className,"vc-image-invisible"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"m21 18.15-2-2V5H7.85l-2-2H19q.825 0 1.413.587Q21 4.175 21 5Zm-1.2 4.45L18.2 21H5q-.825 0-1.413-.587Q3 19.825 3 19V5.8L1.4 4.2l1.4-1.4 18.4 18.4ZM6 17l3-4 2.25 3 .825-1.1L5 7.825V19h11.175l-2-2Zm7.425-6.425ZM10.6 13.4Z"}))}function Eg(e){return n(kt,{...e,className:q(e.className,"vc-microphone"),viewBox:"0 0 24 24"},n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.99 11C14.99 12.66 13.66 14 12 14C10.34 14 9 12.66 9 11V5C9 3.34 10.34 2 12 2C13.66 2 15 3.34 15 5L14.99 11ZM12 16.1C14.76 16.1 17.3 14 17.3 11H19C19 14.42 16.28 17.24 13 17.72V21H11V17.72C7.72 17.23 5 14.41 5 11H6.7C6.7 14 9.24 16.1 12 16.1ZM12 4C11.2 4 11 4.66667 11 5V11C11 11.3333 11.2 12 12 12C12.8 12 13 11.3333 13 11V5C13 4.66667 12.8 4 12 4Z",fill:"currentColor"}),n("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.99 11C14.99 12.66 13.66 14 12 14C10.34 14 9 12.66 9 11V5C9 3.34 10.34 2 12 2C13.66 2 15 3.34 15 5L14.99 11ZM12 16.1C14.76 16.1 17.3 14 17.3 11H19C19 14.42 16.28 17.24 13 17.72V22H11V17.72C7.72 17.23 5 14.41 5 11H6.7C6.7 14 9.24 16.1 12 16.1Z",fill:"currentColor"}))}function Aa(e){return n(kt,{...e,className:q(e.className,"vc-cog-wheel"),viewBox:"0 0 24 24"},n("path",{clipRule:"evenodd",fill:"currentColor",d:"M19.738 10H22V14H19.739C19.498 14.931 19.1 15.798 18.565 16.564L20 18L18 20L16.565 18.564C15.797 19.099 14.932 19.498 14 19.738V22H10V19.738C9.069 19.498 8.203 19.099 7.436 18.564L6 20L4 18L5.436 16.564C4.901 15.799 4.502 14.932 4.262 14H2V10H4.262C4.502 9.068 4.9 8.202 5.436 7.436L4 6L6 4L7.436 5.436C8.202 4.9 9.068 4.502 10 4.262V2H14V4.261C14.932 4.502 15.797 4.9 16.565 5.435L18 3.999L20 5.999L18.564 7.436C19.099 8.202 19.498 9.069 19.738 10ZM12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16Z"}))}function Cc(e){return n(kt,{...e,className:q(e.className,"vc-reply-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M10 8.26667V4L3 11.4667L10 18.9333V14.56C15 14.56 18.5 16.2667 21 20C20 14.6667 17 9.33333 10 8.26667Z"}))}function Pi(e){return n(kt,{...e,className:q(e.className,"vc-delete-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M15 3.999V2H9V3.999H3V5.999H21V3.999H15Z"}),n("path",{fill:"currentColor",d:"M5 6.99902V18.999C5 20.101 5.897 20.999 7 20.999H17C18.103 20.999 19 20.101 19 18.999V6.99902H5ZM11 17H9V11H11V17ZM15 17H13V11H15V17Z"}))}function Og(e){return n(kt,{...e,className:q(e.className,"vc-plus-icon"),viewBox:"0 0 18 18"},n("polygon",{"fill-rule":"nonzero",fill:"currentColor",points:"15 10 10 10 10 15 8 15 8 10 3 10 3 8 8 8 8 3 10 3 10 8 15 8"}))}function _g(e){return n(kt,{...e,className:q(e.className,"vc-no-entry-sign-icon"),viewBox:"0 0 24 24"},n("path",{d:"M0 0h24v24H0z",fill:"none"}),n("path",{fill:"currentColor",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z"}))}function Bg(e){return n(kt,{...e,className:q(e.className,"vc-safety-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M4.27 5.22A2.66 2.66 0 0 0 3 7.5v2.3c0 5.6 3.3 10.68 8.42 12.95.37.17.79.17 1.16 0A14.18 14.18 0 0 0 21 9.78V7.5c0-.93-.48-1.78-1.27-2.27l-6.17-3.76a3 3 0 0 0-3.12 0L4.27 5.22ZM6 7.68l6-3.66V12H6.22C6.08 11.28 6 10.54 6 9.78v-2.1Zm6 12.01V12h5.78A11.19 11.19 0 0 1 12 19.7Z"}))}function Fg(e){return n(kt,{...e,className:q(e.className,"vc-notes-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M8 3C7.44771 3 7 3.44772 7 4V5C7 5.55228 7.44772 6 8 6H16C16.5523 6 17 5.55228 17 5V4C17 3.44772 16.5523 3 16 3H15.1245C14.7288 3 14.3535 2.82424 14.1002 2.52025L13.3668 1.64018C13.0288 1.23454 12.528 1 12 1C11.472 1 10.9712 1.23454 10.6332 1.64018L9.8998 2.52025C9.64647 2.82424 9.27121 3 8.8755 3H8Z"}),n("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M19 4.49996V4.99996C19 6.65681 17.6569 7.99996 16 7.99996H8C6.34315 7.99996 5 6.65681 5 4.99996V4.49996C5 4.22382 4.77446 3.99559 4.50209 4.04109C3.08221 4.27826 2 5.51273 2 6.99996V19C2 20.6568 3.34315 22 5 22H19C20.6569 22 22 20.6568 22 19V6.99996C22 5.51273 20.9178 4.27826 19.4979 4.04109C19.2255 3.99559 19 4.22382 19 4.49996ZM8 12C7.44772 12 7 12.4477 7 13C7 13.5522 7.44772 14 8 14H16C16.5523 14 17 13.5522 17 13C17 12.4477 16.5523 12 16 12H8ZM7 17C7 16.4477 7.44772 16 8 16H13C13.5523 16 14 16.4477 14 17C14 17.5522 13.5523 18 13 18H8C7.44772 18 7 17.5522 7 17Z"}))}function Ug(e){return n(kt,{...e,className:q(e.className,"vc-folder-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M2 5a3 3 0 0 1 3-3h3.93a2 2 0 0 1 1.66.9L12 5h7a3 3 0 0 1 3 3v11a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V5Z"}))}function $g(e){return n(kt,{...e,className:q(e.className,"vc-log-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M3.11 8H6v10.82c0 .86.37 1.68 1 2.27.46.43 1.02.71 1.63.84A1 1 0 0 0 9 22h10a4 4 0 0 0 4-4v-1a2 2 0 0 0-2-2h-1V5a3 3 0 0 0-3-3H4.67c-.87 0-1.7.32-2.34.9-.63.6-1 1.42-1 2.28 0 .71.3 1.35.52 1.75a5.35 5.35 0 0 0 .48.7l.01.01h.01L3.11 7l-.76.65a1 1 0 0 0 .76.35Zm1.56-4c-.38 0-.72.14-.97.37-.24.23-.37.52-.37.81a1.69 1.69 0 0 0 .3.82H6v-.83c0-.29-.13-.58-.37-.8C5.4 4.14 5.04 4 4.67 4Zm5 13a3.58 3.58 0 0 1 0 3H19a2 2 0 0 0 2-2v-1H9.66ZM3.86 6.35ZM11 8a1 1 0 1 0 0 2h5a1 1 0 1 0 0-2h-5Zm-1 5a1 1 0 0 1 1-1h5a1 1 0 1 1 0 2h-5a1 1 0 0 1-1-1Z"}))}function Gg(e){return n(kt,{...e,className:q(e.className,"vc-restart-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M4 12a8 8 0 0 1 14.93-4H15a1 1 0 1 0 0 2h6a1 1 0 0 0 1-1V3a1 1 0 1 0-2 0v3a9.98 9.98 0 0 0-18 6 10 10 0 0 0 16.29 7.78 1 1 0 0 0-1.26-1.56A8 8 0 0 1 4 12Z"}))}function Hg(e){return n(kt,{...e,className:q(e.className,"vc-paintbrush-icon"),viewBox:"0 0 24 24"},n("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M15.35 7.24C15.9 6.67 16 5.8 16 5a3 3 0 1 1 3 3c-.8 0-1.67.09-2.24.65a1.5 1.5 0 0 0 0 2.11l1.12 1.12a3 3 0 0 1 0 4.24l-5 5a3 3 0 0 1-4.25 0l-5.76-5.75a3 3 0 0 1 0-4.24l4.04-4.04.97-.97a3 3 0 0 1 4.24 0l1.12 1.12c.58.58 1.52.58 2.1 0ZM6.9 9.9 4.3 12.54a1 1 0 0 0 0 1.42l2.17 2.17.83-.84a1 1 0 0 1 1.42 1.42l-.84.83.59.59 1.83-1.84a1 1 0 0 1 1.42 1.42l-1.84 1.83.17.17a1 1 0 0 0 1.42 0l2.63-2.62L6.9 9.9Z"}))}function Na(e){let t=is()===2?DC:LC;return n("img",{...e,src:t})}function zg(e){let t=is()===2?kC:RC;return n("img",{...e,src:t})}var RC,kC,DC,LC,bt=f(()=>{"use strict";a();jv();pt();be();b();RC="/assets/e1e96d89e192de1997f73730db26e94f.svg",kC="/assets/730f58bcfd5a57a5e22460c445a0c6cf.svg",DC="/assets/3ff98ad75ac94fa883af5ed62d17c459.svg",LC="/assets/6a853b4c87fce386cbfef4a2efbacb09.svg"});function qe(e){return e.disabled&&(e.style??={},e.style.pointerEvents="none",e["aria-disabled"]=!0),n("a",{role:"link",target:"_blank",...e},e.children)}var ho=f(()=>{"use strict";a()});var Wv=f(()=>{});function qg({checked:e,onChange:t,disabled:o}){return n("div",null,n("div",{className:q(Rc.container,"default-colors",e?Rc.checked:void 0),style:{backgroundColor:e?jg:Wg,opacity:o?.3:1}},n("svg",{className:Rc.slider+" vc-switch-slider",viewBox:"0 0 28 20",preserveAspectRatio:"xMinYMid meet","aria-hidden":"true",style:{transform:e?"translateX(12px)":"translateX(-3px)"}},n("rect",{fill:"white",x:"4",y:"0",height:"20",width:"20",rx:"10"}),n("svg",{viewBox:"0 0 20 20",fill:"none"},e?n(d,null,n("path",{fill:jg,d:"M7.89561 14.8538L6.30462 13.2629L14.3099 5.25755L15.9009 6.84854L7.89561 14.8538Z"}),n("path",{fill:jg,d:"M4.08643 11.0903L5.67742 9.49929L9.4485 13.2704L7.85751 14.8614L4.08643 11.0903Z"})):n(d,null,n("path",{fill:Wg,d:"M5.13231 6.72963L6.7233 5.13864L14.855 13.2704L13.264 14.8614L5.13231 6.72963Z"}),n("path",{fill:Wg,d:"M13.2704 5.13864L14.8614 6.72963L6.72963 14.8614L5.13864 13.2704L13.2704 5.13864Z"})))),n("input",{disabled:o,type:"checkbox",className:Rc.input,tabIndex:0,checked:e,onChange:r=>t(r.currentTarget.checked)})))}var jg,Wg,Rc,Kg=f(()=>{"use strict";a();Wv();be();$();jg="var(--green-360)",Wg="var(--primary-400)",Rc=C("slider","input","container")});var Yg={};lt(Yg,{Badge:()=>Cg,CheckedTextInput:()=>ba,CodeBlock:()=>Ta,CogWheel:()=>Aa,CopyIcon:()=>xa,DeleteIcon:()=>Pi,ErrorBoundary:()=>k,ErrorCard:()=>mo,ExpandableHeader:()=>wa,Flex:()=>pe,FolderIcon:()=>Ug,GithubIcon:()=>Na,Heart:()=>ha,ImageIcon:()=>dn,ImageInvisible:()=>Ma,ImageVisible:()=>Ia,InfoIcon:()=>Pa,Link:()=>qe,LinkIcon:()=>xi,LogIcon:()=>$g,Microphone:()=>Eg,NoEntrySignIcon:()=>_g,NotesIcon:()=>Fg,OpenExternalIcon:()=>Hn,OwnerCrownIcon:()=>Dg,PaintbrushIcon:()=>Hg,PlusIcon:()=>Og,ReplyIcon:()=>Cc,RestartIcon:()=>Gg,SafetyIcon:()=>Bg,ScreenshareIcon:()=>Lg,Switch:()=>qg,WebsiteIcon:()=>zg});var Ca=f(()=>{"use strict";a();xc();Pc();Ic();yc();re();yi();Mc();Rt();hc();bt();ho();Kg()});function EC(){let e=Pt().notifications;return n("div",{style:{padding:"1em 0"}},n(S.FormTitle,{tag:"h5"},"Notification Style"),e.useNative!=="never"&&Notification?.permission==="denied"&&n(mo,{style:{padding:"1em"},className:G.bottom8},n(S.FormTitle,{tag:"h5"},"Desktop Notification Permission denied"),n(S.FormText,null,"You have denied Notification Permissions. Thus, Desktop notifications will not work!")),n(S.FormText,{className:G.bottom8},"Some plugins may show you notifications. These come in two styles:",n("ul",null,n("li",null,n("strong",null,"Vencord Notifications"),": These are in-app notifications"),n("li",null,n("strong",null,"Desktop Notifications"),": Native Desktop notifications (like when you get a ping)"))),n(Fo,{placeholder:"Notification Style",options:[{label:"Only use Desktop notifications when Discord is not focused",value:"not-focused",default:!0},{label:"Always use Desktop notifications",value:"always"},{label:"Always use Vencord notifications",value:"never"}],closeOnSelect:!0,select:t=>e.useNative=t,isSelected:t=>t===e.useNative,serialize:ns}),n(S.FormTitle,{tag:"h5",className:G.top16+" "+G.bottom8},"Notification Position"),n(Fo,{isDisabled:e.useNative==="always",placeholder:"Notification Position",options:[{label:"Bottom Right",value:"bottom-right",default:!0},{label:"Top Right",value:"top-right"}],select:t=>e.position=t,isSelected:t=>t===e.position,serialize:ns}),n(S.FormTitle,{tag:"h5",className:G.top16+" "+G.bottom8},"Notification Timeout"),n(S.FormText,{className:G.bottom16},"Set to 0s to never automatically time out"),n(ii,{disabled:e.useNative==="always",markers:[0,1e3,2500,5e3,1e4,2e4],minValue:0,maxValue:2e4,initialValue:e.timeout,onValueChange:t=>e.timeout=t,onValueRender:t=>(t/1e3).toFixed(2)+"s",onMarkerRender:t=>t/1e3+"s",stickToMarkers:!1}),n(S.FormTitle,{tag:"h5",className:G.top16+" "+G.bottom8},"Notification Log Limit"),n(S.FormText,{className:G.bottom16},"The amount of notifications to save in the log until old ones are removed. Set to ",n("code",null,"0")," to disable Notification log and ",n("code",null,"\u221E")," to never automatically remove old Notifications"),n(ii,{markers:[0,25,50,75,100,200],minValue:0,maxValue:200,stickToMarkers:!0,initialValue:e.logLimit,onValueChange:t=>e.logLimit=t,onValueRender:t=>t===200?"\u221E":t,onMarkerRender:t=>t===200?"\u221E":t}))}function kc(){ue(e=>n(fe,{...e,size:"medium"},n(Ee,null,n(Z,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Notification Settings"),n(ut,{onClick:e.onClose})),n(we,null,n(EC,null))))}var Zg=f(()=>{"use strict";a();_();Ze();be();$e();b();Ca()});var qv,Kv=f(()=>{a();qv=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,o)=>(o&=63,o<36?t+=o.toString(36):o<62?t+=(o-26).toString(36).toUpperCase():o>62?t+="-":t+="_",t),"")});async function Zv(e){if(e.noPersist)return;let t=j.notifications.logLimit;t!==0&&(await bi(Dc,o=>{let r=o??[],{onClick:i,onClose:s,richBody:l,permanent:u,noPersist:c,dismissOnClick:m,...g}=e;return r.unshift({...g,timestamp:Date.now(),id:qv()}),r.length>t&&t!==200&&(r.length=t),r}),Ra.forEach(o=>o()))}async function OC(e){let t=await Yv(),o=t.findIndex(r=>r.timestamp===e);o!==-1&&(t.splice(o,1),await Ht(Dc,t),Ra.forEach(r=>r()))}function _C(){let[e,t]=Vi(s=>s+1,0);ce(()=>(Ra.add(t),()=>void Ra.delete(t)),[]);let[o,r,i]=st(Yv,{fallbackValue:[],deps:[e]});return[o,i]}function BC({data:e}){let[t,o]=K(!1),r=H.useRef(null);return ce(()=>{let i=r.current,s=()=>{if(i.clientHeight===0)return requestAnimationFrame(s);i.style.height=`${i.clientHeight}px`};s()},[]),n("div",{className:ss("wrapper",{removing:t}),ref:r},n(Tc,{...e,permanent:!0,dismissOnClick:!1,onClose:()=>{t||(o(!0),setTimeout(()=>OC(e.timestamp),200))},richBody:n("div",{className:ss("body")},e.body,n(No,{timestamp:new Date(e.timestamp),className:ss("timestamp")}))}))}function FC({log:e,pending:t}){return!e.length&&!t?n("div",{className:ss("container")},n("div",{className:ss("empty")}),n(S.FormText,{style:{textAlign:"center"}},"No notifications yet")):n("div",{className:ss("container")},e.map(o=>n(BC,{data:o,key:o.id})))}function UC({modalProps:e,close:t}){let[o,r]=_C();return n(fe,{...e,size:"large"},n(Ee,null,n(Z,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Notification Log"),n(ut,{onClick:t})),n(we,null,n(FC,{log:o,pending:r})),n(ct,null,n(pe,null,n(T,{onClick:kc},"Notification Settings"),n(T,{disabled:o.length===0,color:T.Colors.RED,onClick:()=>{rt.show({title:"Are you sure?",body:`This will permanently remove ${o.length} notification${o.length===1?"":"s"}. This action cannot be undone.`,async onConfirm(){await Ht(Dc,[]),Ra.forEach(i=>i())},confirmText:"Do it!",confirmColor:"vc-notification-log-danger-btn",cancelText:"Nevermind"})}},"Clear Notification Log"))))}function ka(){let e=ue(t=>n(UC,{modalProps:t,close:()=>Un(e)}))}var Dc,Yv,ss,Ra,Lc=f(()=>{"use strict";a();cn();_();Ve();Rt();Zg();$e();ft();b();Kv();Tg();Dc="notification-log",Yv=async()=>await It(Dc)??[],ss=Te("vc-notification-log-"),Ra=new Set});function HC(){if(!Xg){let e=document.createElement("div");e.id="vc-notification-container",document.body.append(e),Xg=li.createRoot(e)}return Xg}function zC(e,t){let o=HC();return new Promise(r=>{o.render(n(Tc,{key:t,...e,onClose:()=>{e.onClose?.(),o.render(null),r()}}))})}function jC(){if(typeof Notification>"u")return!1;let{useNative:e}=j.notifications;return e==="always"?!0:e==="not-focused"?!document.hasFocus():!1}async function Xv(){return Notification.permission==="granted"||Notification.permission!=="denied"&&await Notification.requestPermission()==="granted"}async function Ue(e){if(Zv(e),jC()&&await Xv()){let{title:t,body:o,icon:r,image:i,onClick:s=null,onClose:l=null}=e,u=new Notification(t,{body:o,icon:r,image:i});u.onclick=s,u.onclose=l}else $C.push(()=>zC(e,GC++))}var $C,Xg,GC,Jv=f(()=>{"use strict";a();_();Si();b();Tg();Lc();$C=new $o,GC=42});var Jg={};lt(Jg,{requestPermission:()=>Xv,showNotification:()=>Ue});var zn=f(()=>{"use strict";a();Jv()});function sS(e,t){return e4(e,t||{},0,0)}function aS(e,t){return JC(e,t)}var yo,ko,Ec,Oc,_c,th,tS,oS,nS,oh,rS,WC,Qv,nh,jn,Xe,Nn,Nr,Xe,Xe,Xe,Xe,Ea,Xe,qC,KC,YC,ZC,Qg,mn,Vg,sh,iS,XC,Ar,JC,Wn,Da,eh,rh,Vv,La,ih,eS,QC,ah,VC,e4,t4,o4,lS=f(()=>{a();yo=Uint8Array,ko=Uint16Array,Ec=Uint32Array,Oc=new yo([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),_c=new yo([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),th=new yo([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),tS=function(e,t){for(var o=new ko(31),r=0;r<31;++r)o[r]=t+=1<<e[r-1];for(var i=new Ec(o[30]),r=1;r<30;++r)for(var s=o[r];s<o[r+1];++s)i[s]=s-o[r]<<5|r;return[o,i]},oS=tS(Oc,2),nS=oS[0],oh=oS[1];nS[28]=258,oh[258]=28;rS=tS(_c,0),WC=rS[0],Qv=rS[1],nh=new ko(32768);for(Xe=0;Xe<32768;++Xe)jn=(Xe&43690)>>>1|(Xe&21845)<<1,jn=(jn&52428)>>>2|(jn&13107)<<2,jn=(jn&61680)>>>4|(jn&3855)<<4,nh[Xe]=((jn&65280)>>>8|(jn&255)<<8)>>>1;Nn=function(e,t,o){for(var r=e.length,i=0,s=new ko(t);i<r;++i)e[i]&&++s[e[i]-1];var l=new ko(t);for(i=0;i<t;++i)l[i]=l[i-1]+s[i-1]<<1;var u;if(o){u=new ko(1<<t);var c=15-t;for(i=0;i<r;++i)if(e[i])for(var m=i<<4|e[i],g=t-e[i],y=l[e[i]-1]++<<g,v=y|(1<<g)-1;y<=v;++y)u[nh[y]>>>c]=m}else for(u=new ko(r),i=0;i<r;++i)e[i]&&(u[i]=nh[l[e[i]-1]++]>>>15-e[i]);return u},Nr=new yo(288);for(Xe=0;Xe<144;++Xe)Nr[Xe]=8;for(Xe=144;Xe<256;++Xe)Nr[Xe]=9;for(Xe=256;Xe<280;++Xe)Nr[Xe]=7;for(Xe=280;Xe<288;++Xe)Nr[Xe]=8;Ea=new yo(32);for(Xe=0;Xe<32;++Xe)Ea[Xe]=5;qC=Nn(Nr,9,0),KC=Nn(Nr,9,1),YC=Nn(Ea,5,0),ZC=Nn(Ea,5,1),Qg=function(e){for(var t=e[0],o=1;o<e.length;++o)e[o]>t&&(t=e[o]);return t},mn=function(e,t,o){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&o},Vg=function(e,t){var o=t/8|0;return(e[o]|e[o+1]<<8|e[o+2]<<16)>>(t&7)},sh=function(e){return(e+7)/8|0},iS=function(e,t,o){(t==null||t<0)&&(t=0),(o==null||o>e.length)&&(o=e.length);var r=new(e.BYTES_PER_ELEMENT==2?ko:e.BYTES_PER_ELEMENT==4?Ec:yo)(o-t);return r.set(e.subarray(t,o)),r},XC=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Ar=function(e,t,o){var r=new Error(t||XC[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,Ar),!o)throw r;return r},JC=function(e,t,o){var r=e.length;if(!r||o&&o.f&&!o.l)return t||new yo(0);var i=!t||o,s=!o||o.i;o||(o={}),t||(t=new yo(r*3));var l=function(Qr){var yr=t.length;if(Qr>yr){var vr=new yo(Math.max(yr*2,Qr));vr.set(t),t=vr}},u=o.f||0,c=o.p||0,m=o.b||0,g=o.l,y=o.d,v=o.m,M=o.n,x=r*8;do{if(!g){u=mn(e,c,1);var N=mn(e,c+1,3);if(c+=3,N)if(N==1)g=KC,y=ZC,v=9,M=5;else if(N==2){var B=mn(e,c,31)+257,z=mn(e,c+10,15)+4,Y=B+mn(e,c+5,31)+1;c+=14;for(var ee=new yo(Y),J=new yo(19),U=0;U<z;++U)J[th[U]]=mn(e,c+U*3,7);c+=z*3;for(var ne=Qg(J),ie=(1<<ne)-1,Ne=Nn(J,ne,1),U=0;U<Y;){var he=Ne[mn(e,c,ie)];c+=he&15;var I=he>>>4;if(I<16)ee[U++]=I;else{var Ke=0,Ce=0;for(I==16?(Ce=3+mn(e,c,3),c+=2,Ke=ee[U-1]):I==17?(Ce=3+mn(e,c,7),c+=3):I==18&&(Ce=11+mn(e,c,127),c+=7);Ce--;)ee[U++]=Ke}}var Oe=ee.subarray(0,B),He=ee.subarray(B);v=Qg(Oe),M=Qg(He),g=Nn(Oe,v,1),y=Nn(He,M,1)}else Ar(1);else{var I=sh(c)+4,R=e[I-4]|e[I-3]<<8,D=I+R;if(D>r){s&&Ar(0);break}i&&l(m+R),t.set(e.subarray(I,D),m),o.b=m+=R,o.p=c=D*8,o.f=u;continue}if(c>x){s&&Ar(0);break}}i&&l(m+131072);for(var ze=(1<<v)-1,_e=(1<<M)-1,Ae=c;;Ae=c){var Ke=g[Vg(e,c)&ze],Ft=Ke>>>4;if(c+=Ke&15,c>x){s&&Ar(0);break}if(Ke||Ar(2),Ft<256)t[m++]=Ft;else if(Ft==256){Ae=c,g=null;break}else{var gt=Ft-254;if(Ft>264){var U=Ft-257,Ye=Oc[U];gt=mn(e,c,(1<<Ye)-1)+nS[U],c+=Ye}var Io=y[Vg(e,c)&_e],Wt=Io>>>4;Io||Ar(3),c+=Io&15;var He=WC[Wt];if(Wt>3){var Ye=_c[Wt];He+=Vg(e,c)&(1<<Ye)-1,c+=Ye}if(c>x){s&&Ar(0);break}i&&l(m+131072);for(var Ut=m+gt;m<Ut;m+=4)t[m]=t[m-He],t[m+1]=t[m+1-He],t[m+2]=t[m+2-He],t[m+3]=t[m+3-He];m=Ut}}o.l=g,o.p=Ae,o.b=m,o.f=u,g&&(u=1,o.m=v,o.d=y,o.n=M)}while(!u);return m==t.length?t:iS(t,0,m)},Wn=function(e,t,o){o<<=t&7;var r=t/8|0;e[r]|=o,e[r+1]|=o>>>8},Da=function(e,t,o){o<<=t&7;var r=t/8|0;e[r]|=o,e[r+1]|=o>>>8,e[r+2]|=o>>>16},eh=function(e,t){for(var o=[],r=0;r<e.length;++r)e[r]&&o.push({s:r,f:e[r]});var i=o.length,s=o.slice();if(!i)return[ah,0];if(i==1){var l=new yo(o[0].s+1);return l[o[0].s]=1,[l,1]}o.sort(function(Y,ee){return Y.f-ee.f}),o.push({s:-1,f:25001});var u=o[0],c=o[1],m=0,g=1,y=2;for(o[0]={s:-1,f:u.f+c.f,l:u,r:c};g!=i-1;)u=o[o[m].f<o[y].f?m++:y++],c=o[m!=g&&o[m].f<o[y].f?m++:y++],o[g++]={s:-1,f:u.f+c.f,l:u,r:c};for(var v=s[0].s,r=1;r<i;++r)s[r].s>v&&(v=s[r].s);var M=new ko(v+1),x=rh(o[g-1],M,0);if(x>t){var r=0,N=0,I=x-t,R=1<<I;for(s.sort(function(ee,J){return M[J.s]-M[ee.s]||ee.f-J.f});r<i;++r){var D=s[r].s;if(M[D]>t)N+=R-(1<<x-M[D]),M[D]=t;else break}for(N>>>=I;N>0;){var B=s[r].s;M[B]<t?N-=1<<t-M[B]++-1:++r}for(;r>=0&&N;--r){var z=s[r].s;M[z]==t&&(--M[z],++N)}x=t}return[new yo(M),x]},rh=function(e,t,o){return e.s==-1?Math.max(rh(e.l,t,o+1),rh(e.r,t,o+1)):t[e.s]=o},Vv=function(e){for(var t=e.length;t&&!e[--t];);for(var o=new ko(++t),r=0,i=e[0],s=1,l=function(c){o[r++]=c},u=1;u<=t;++u)if(e[u]==i&&u!=t)++s;else{if(!i&&s>2){for(;s>138;s-=138)l(32754);s>2&&(l(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(l(i),--s;s>6;s-=6)l(8304);s>2&&(l(s-3<<5|8208),s=0)}for(;s--;)l(i);s=1,i=e[u]}return[o.subarray(0,r),t]},La=function(e,t){for(var o=0,r=0;r<t.length;++r)o+=e[r]*t[r];return o},ih=function(e,t,o){var r=o.length,i=sh(t+2);e[i]=r&255,e[i+1]=r>>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var s=0;s<r;++s)e[i+s+4]=o[s];return(i+4+r)*8},eS=function(e,t,o,r,i,s,l,u,c,m,g){Wn(t,g++,o),++i[256];for(var y=eh(i,15),v=y[0],M=y[1],x=eh(s,15),N=x[0],I=x[1],R=Vv(v),D=R[0],B=R[1],z=Vv(N),Y=z[0],ee=z[1],J=new ko(19),U=0;U<D.length;++U)J[D[U]&31]++;for(var U=0;U<Y.length;++U)J[Y[U]&31]++;for(var ne=eh(J,7),ie=ne[0],Ne=ne[1],he=19;he>4&&!ie[th[he-1]];--he);var Ke=m+5<<3,Ce=La(i,Nr)+La(s,Ea)+l,Oe=La(i,v)+La(s,N)+l+14+3*he+La(J,ie)+(2*J[16]+3*J[17]+7*J[18]);if(Ke<=Ce&&Ke<=Oe)return ih(t,g,e.subarray(c,c+m));var He,ze,_e,Ae;if(Wn(t,g,1+(Oe<Ce)),g+=2,Oe<Ce){He=Nn(v,M,0),ze=v,_e=Nn(N,I,0),Ae=N;var Ft=Nn(ie,Ne,0);Wn(t,g,B-257),Wn(t,g+5,ee-1),Wn(t,g+10,he-4),g+=14;for(var U=0;U<he;++U)Wn(t,g+3*U,ie[th[U]]);g+=3*he;for(var gt=[D,Y],Ye=0;Ye<2;++Ye)for(var Io=gt[Ye],U=0;U<Io.length;++U){var Wt=Io[U]&31;Wn(t,g,Ft[Wt]),g+=ie[Wt],Wt>15&&(Wn(t,g,Io[U]>>>5&127),g+=Io[U]>>>12)}}else He=qC,ze=Nr,_e=YC,Ae=Ea;for(var U=0;U<u;++U)if(r[U]>255){var Wt=r[U]>>>18&31;Da(t,g,He[Wt+257]),g+=ze[Wt+257],Wt>7&&(Wn(t,g,r[U]>>>23&31),g+=Oc[Wt]);var Ut=r[U]&31;Da(t,g,_e[Ut]),g+=Ae[Ut],Ut>3&&(Da(t,g,r[U]>>>5&8191),g+=_c[Ut])}else Da(t,g,He[r[U]]),g+=ze[r[U]];return Da(t,g,He[256]),g+ze[256]},QC=new Ec([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ah=new yo(0),VC=function(e,t,o,r,i,s){var l=e.length,u=new yo(r+l+5*(1+Math.ceil(l/7e3))+i),c=u.subarray(r,u.length-i),m=0;if(!t||l<8)for(var g=0;g<=l;g+=65535){var y=g+65535;y>=l&&(c[m>>3]=s),m=ih(c,m+1,e.subarray(g,y))}else{for(var v=QC[t-1],M=v>>>13,x=v&8191,N=(1<<o)-1,I=new ko(32768),R=new ko(N+1),D=Math.ceil(o/3),B=2*D,z=function(de){return(e[de]^e[de+1]<<D^e[de+2]<<B)&N},Y=new Ec(25e3),ee=new ko(288),J=new ko(32),U=0,ne=0,g=0,ie=0,Ne=0,he=0;g<l;++g){var Ke=z(g),Ce=g&32767,Oe=R[Ke];if(I[Ce]=Oe,R[Ke]=Ce,Ne<=g){var He=l-g;if((U>7e3||ie>24576)&&He>423){m=eS(e,c,0,Y,ee,J,ne,ie,he,g-he,m),ie=U=ne=0,he=g;for(var ze=0;ze<286;++ze)ee[ze]=0;for(var ze=0;ze<30;++ze)J[ze]=0}var _e=2,Ae=0,Ft=x,gt=Ce-Oe&32767;if(He>2&&Ke==z(g-gt))for(var Ye=Math.min(M,He)-1,Io=Math.min(32767,g),Wt=Math.min(258,He);gt<=Io&&--Ft&&Ce!=Oe;){if(e[g+_e]==e[g+_e-gt]){for(var Ut=0;Ut<Wt&&e[g+Ut]==e[g+Ut-gt];++Ut);if(Ut>_e){if(_e=Ut,Ae=gt,Ut>Ye)break;for(var Qr=Math.min(gt,Ut-2),yr=0,ze=0;ze<Qr;++ze){var vr=g-gt+ze+32768&32767,Vr=I[vr],to=vr-Vr+32768&32767;to>yr&&(yr=to,Oe=vr)}}}Ce=Oe,Oe=I[Ce],gt+=Ce-Oe+32768&32767}if(Ae){Y[ie++]=268435456|oh[_e]<<18|Qv[Ae];var ei=oh[_e]&31,O=Qv[Ae]&31;ne+=Oc[ei]+_c[O],++ee[257+ei],++J[O],Ne=g+_e,++U}else Y[ie++]=e[g],++ee[e[g]]}}m=eS(e,c,s,Y,ee,J,ne,ie,he,g-he,m),!s&&m&7&&(m=ih(c,m+1,ah))}return iS(u,0,r+sh(m)+i)},e4=function(e,t,o,r,i){return VC(e,t.level==null?6:t.level,t.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):12+t.mem,o,r,!i)};t4=typeof TextDecoder<"u"&&new TextDecoder,o4=0;try{t4.decode(ah,{stream:!0}),o4=1}catch{}});async function cS(){let e=await It("Vencord_cloudSecret")??{},t=lh();return e[t]?(await bi("Vencord_cloudSecret",o=>(o??={},o[`${t}:${Oa()}`]=o[t],delete o[t],o)),e[t]):e[`${t}:${Oa()}`]}async function n4(e){await bi("Vencord_cloudSecret",t=>(t??={},t[`${lh()}:${Oa()}`]=e,t))}async function Fc(){await bi("Vencord_cloudSecret",e=>(e??={},delete e[`${lh()}:${Oa()}`],e))}async function ch(){if(await cS()!==void 0){j.cloud.authenticated=!0;return}try{let o=await fetch(new URL("/v1/oauth/settings",Cr()));var{clientId:e,redirectUri:t}=await o.json()}catch{Ue({title:"Cloud Integration",body:"Setup failed (couldn't retrieve OAuth configuration)."}),j.cloud.authenticated=!1;return}ue(o=>n(aa,{...o,scopes:["identify"],responseType:"code",redirectUri:t,permissions:0n,clientId:e,cancelCompletesFlow:!1,callback:async({location:r})=>{if(!r){j.cloud.authenticated=!1;return}try{let i=await fetch(r,{headers:{Accept:"application/json"}}),{secret:s}=await i.json();s?(Bc.info("Authorized with secret"),await n4(s),Ue({title:"Cloud Integration",body:"Cloud integrations enabled!"}),j.cloud.authenticated=!0):(Ue({title:"Cloud Integration",body:"Setup failed (no secret returned?)."}),j.cloud.authenticated=!1)}catch(i){Bc.error("Failed to authorize",i),Ue({title:"Cloud Integration",body:`Setup failed (${i.toString()}).`}),j.cloud.authenticated=!1}}}))}async function as(){let e=await cS();return window.btoa(`${e}:${Oa()}`)}var Bc,Cr,lh,Oa,uh=f(()=>{"use strict";a();cn();zn();_();b();ke();$e();Bc=new Q("Cloud","#39b7e0"),Cr=()=>new URL(j.cloud.url),lh=()=>Cr().origin,Oa=()=>{let e=L.getCurrentUser()?.id;if(!e)throw new Error("User not yet logged in");return e}});function vo(){window.DiscordNative.app.relaunch()}function Uc(e){window.DiscordNative.fileManager.showItemInFolder(e)}var qn=f(()=>{"use strict";a()});function uS(e){return new Promise(t=>{let o=document.createElement("input");o.type="file",o.style.display="none",o.accept=e,o.onchange=async()=>{t(o.files?.[0]??null)},document.body.appendChild(o),o.click(),setImmediate(()=>document.body.removeChild(o))})}var ph=f(()=>{"use strict";a()});async function pS(e){try{var t=JSON.parse(e)}catch(o){throw console.log(e),new Error("Failed to parse JSON: "+String(o))}if("settings"in t&&"quickCss"in t)Object.assign(Kn,t.settings),await VencordNative.settings.set(t.settings),await VencordNative.quickCss.set(t.quickCss);else throw new Error("Invalid Settings. Is this even a Vencord Settings file?")}async function dS({minify:e}={}){let t=VencordNative.settings.get(),o=await VencordNative.quickCss.get();return JSON.stringify({settings:t,quickCss:o},null,e?void 0:4)}async function mS(){let e=`vencord-settings-backup-${Ir().format("YYYY-MM-DD")}.json`,t=await dS(),o=new TextEncoder().encode(t);DiscordNative.fileManager.saveWithDialog(o,e)}async function gS(e=!0){{let[t]=await DiscordNative.fileManager.openFiles({filters:[{name:"Vencord Settings Backup",extensions:["json"]},{name:"all",extensions:["*"]}]});if(t)try{await pS(new TextDecoder().decode(t.data)),e&&r4()}catch(o){new Q("SettingsSync").error(o),e&&i4(o)}}}async function ls(e){let t=await dS({minify:!0});try{let o=await fetch(new URL("/v1/settings",Cr()),{method:"PUT",headers:{Authorization:await as(),"Content-Type":"application/octet-stream"},body:sS(new TextEncoder().encode(t))});if(!o.ok){fn.error(`Failed to sync up, API returned ${o.status}`),Ue({title:"Cloud Settings",body:`Could not synchronize settings to cloud (API returned ${o.status}).`,color:"var(--red-360)"});return}let{written:r}=await o.json();Kn.cloud.settingsSyncVersion=r,VencordNative.settings.set(Kn),fn.info("Settings uploaded to cloud successfully"),e&&Ue({title:"Cloud Settings",body:"Synchronized settings to the cloud!",noPersist:!0})}catch(o){fn.error("Failed to sync up",o),Ue({title:"Cloud Settings",body:`Could not synchronize settings to the cloud (${o.toString()}).`,color:"var(--red-360)"})}}async function $c(e=!0,t=!1){try{let o=await fetch(new URL("/v1/settings",Cr()),{method:"GET",headers:{Authorization:await as(),Accept:"application/octet-stream","If-None-Match":j.cloud.settingsSyncVersion.toString()}});if(o.status===404)return fn.info("No settings on the cloud"),e&&Ue({title:"Cloud Settings",body:"There are no settings in the cloud.",noPersist:!0}),!1;if(o.status===304)return fn.info("Settings up to date"),e&&Ue({title:"Cloud Settings",body:"Your settings are up to date.",noPersist:!0}),!1;if(!o.ok)return fn.error(`Failed to sync down, API returned ${o.status}`),Ue({title:"Cloud Settings",body:`Could not synchronize settings from the cloud (API returned ${o.status}).`,color:"var(--red-360)"}),!1;let r=Number(o.headers.get("etag")),i=j.cloud.settingsSyncVersion;if(!t&&r<i){e&&Ue({title:"Cloud Settings",body:"Your local settings are newer than the cloud ones.",noPersist:!0});return}let s=await o.arrayBuffer(),l=new TextDecoder().decode(aS(new Uint8Array(s)));return await pS(l),Kn.cloud.settingsSyncVersion=r,VencordNative.settings.set(Kn),fn.info("Settings loaded from cloud successfully"),e&&Ue({title:"Cloud Settings",body:"Your settings have been updated! Click here to restart to fully apply changes!",color:"var(--green-360)",onClick:vo,noPersist:!0}),!0}catch(o){return fn.error("Failed to sync down",o),Ue({title:"Cloud Settings",body:`Could not synchronize settings from the cloud (${o.toString()}).`,color:"var(--red-360)"}),!1}}async function hS(){try{let e=await fetch(new URL("/v1/settings",Cr()),{method:"DELETE",headers:{Authorization:await as()}});if(!e.ok){fn.error(`Failed to delete, API returned ${e.status}`),Ue({title:"Cloud Settings",body:`Could not delete settings (API returned ${e.status}).`,color:"var(--red-360)"});return}fn.info("Settings deleted from cloud successfully"),Ue({title:"Cloud Settings",body:"Settings deleted from cloud!",color:"var(--green-360)"})}catch(e){fn.error("Failed to delete",e),Ue({title:"Cloud Settings",body:`Could not delete settings (${e.toString()}).`,color:"var(--red-360)"})}}var fS,r4,i4,fn,_a=f(()=>{"use strict";a();zn();_();b();lS();uh();ke();qn();ph();fS=(e,t)=>V.show({type:e,message:t,id:V.genId()}),r4=()=>fS(V.Type.SUCCESS,"Settings successfully imported. Restart to apply changes!"),i4=e=>fS(V.Type.FAILURE,`Failed to import settings: ${String(e)}`);fn=new Q("Cloud:Settings","#39b7e0")});function h(e){return e}var w=f(()=>{"use strict";a()});var mh={};lt(mh,{PlainSettings:()=>Kn,Settings:()=>j,SettingsStore:()=>io,definePluginSettings:()=>A,migratePluginSettings:()=>gn,useSettings:()=>Pt});function Pt(e){let[,t]=H.useReducer(()=>({}),{});return H.useEffect(()=>e?(e.forEach(o=>io.addChangeListener(o,t)),()=>e.forEach(o=>io.removeChangeListener(o,t))):(io.addGlobalChangeListener(t),()=>io.removeGlobalChangeListener(t)),[]),io.store}function gn(e,...t){let{plugins:o}=io.plain;if(!(e in o)){for(let r of t)if(r in o){s4.info(`Migrating settings from old name ${r} to ${e}`),o[e]=o[r],delete o[r],io.markAsChanged();break}}}function A(e,t){let o={get store(){if(!o.pluginName)throw new Error("Cannot access settings before plugin is initialized");return j.plugins[o.pluginName]},use:r=>Pt(r?.map(i=>`plugins.${o.pluginName}.${i}`)).plugins[o.pluginName],def:e,checks:t??{},pluginName:"",withPrivateSettings(){return this}};return o}var s4,a4,dh,l4,io,Kn,j,_=f(()=>{"use strict";a();Mr();Fv();Sc();ke();bc();_a();w();b();Rr();s4=new Q("Settings"),a4={autoUpdate:!0,autoUpdateNotification:!0,useQuickCss:!0,themeLinks:[],enabledThemes:[],enableReactDevtools:!1,frameless:!1,transparent:!1,winCtrlQ:!1,macosVibrancyStyle:void 0,disableMinSize:!1,winNativeTitleBar:!1,plugins:{},notifications:{timeout:5e3,position:"bottom-right",useNative:"not-focused",logLimit:50},cloud:{authenticated:!1,url:"https://api.vencord.dev/",settingsSync:!1,settingsSyncVersion:0}},dh=VencordNative.settings.get();rs(dh,a4);l4=ro(async()=>{j.cloud.settingsSync&&j.cloud.authenticated&&(await ls(),delete vi.Vencord_settingsDirty)},6e4),io=new vc(dh,{readOnly:!0,getDefaultValue({target:e,key:t,path:o}){let r=e[t];if(!et)return r;if(o==="plugins"&&t in et)return e[t]={enabled:et[t].required||et[t].enabledByDefault||!1};if(o.startsWith("plugins.")){let i=o.slice(8);if(i in et){let s=et[i].options?.[t];if(!s)return r;if("default"in s)return e[t]=s.default;if(s.type===4){let l=s.options.find(u=>u.default);return l&&(e[t]=l.value),l?.value}}}return r}});io.addGlobalChangeListener((e,t)=>{io.plain.cloud.settingsSyncVersion=Date.now(),vi.Vencord_settingsDirty=!0,l4(),VencordNative.settings.set(io.plain,t)});Kn=dh,j=io.store});var yS=f(()=>{});var yh={};lt(yh,{currentNotice:()=>Ba,nextNotice:()=>vS,noticesQueue:()=>gh,popNotice:()=>c4,showNotice:()=>hh});function c4(){fh.dismiss()}function vS(){Ba=gh.shift(),Ba&&fh.show(...Ba,"VencordNotice")}function hh(e,t,o){gh.push(["GENERIC",e,t,o]),Ba||vS()}var fh,gh,Ba,vh=f(()=>{"use strict";a();$();ht(e=>e.show&&e.dismiss&&!e.suppressAll,e=>fh=e);gh=[],Ba=null});var SS=f(()=>{});function bS(e,t,o){return o===!1?t?e.slice(0,-1):e:e[0]}function Ua(e,t,o=!1){let r=Ir.duration(e,t),i=y4.map(c=>({amount:r[c](),unit:c})),s=0;e:for(let c=0;c<i.length;c++)if(!(i[c].amount===0||!(c+1<i.length))){for(let m=c+1;m<i.length;m++)if(i[m].amount!==0)continue e;s=i.length-(c+1)}i=s===0?i:i.slice(0,-s);let l=i.findIndex(({unit:c})=>c==="days");if(l!==-1){let c=i[l],m=c.amount%7;m===0?i.splice(l,1):c.amount=m}let u="";for(;i.length;){let{amount:c,unit:m}=i.shift();u.length&&(u+=i.length?", ":" and "),(c>0||u.length)&&(u+=`${c} ${bS(m,c===1,o)}`)}return u.length?u:`0 ${bS(t,!1,o)}`}function v4(e,t=o=>o){let{length:o}=e;if(o===0)return"";if(o===1)return t(e[0]);let r="";for(let i=0;i<o;i++)r+=t(e[i]),o-i>2?r+=", ":o-i>1&&(r+=" and ");return r}function Ii(e,t){let o="```";return`${o}${t||""}
|
|
${e.replaceAll("```","\\`\\`\\`")}
|
|
${o}`}function S4(e,...t){let o=String.raw({raw:e},...t),r=o.match(/^[ \t]*(?=\S)/gm);if(!r)return o.trim();let i=r.reduce((s,l)=>Math.min(s,l.length),1/0);return o.replace(new RegExp(`^[ \\t]{${i}}`,"gm"),"").trim()}function b4(e){return"``"+Fa+e.replaceAll("`",Fa+"`"+Fa)+Fa+"``"}var Sh,u4,p4,bh,d4,m4,f4,g4,h4,Yn,y4,Fa,Cn=f(()=>{"use strict";a();b();Sh=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),u4=e=>e.toLowerCase().split("_"),p4=e=>e.toLowerCase().split("-"),bh=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),d4=e=>e.toLowerCase().split(" "),m4=e=>e.map((t,o)=>o?t[0].toUpperCase()+t.slice(1):t).join(""),f4=e=>e.join("_").toUpperCase(),g4=e=>e.join("-").toLowerCase(),h4=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(""),Yn=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(" "),y4=["years","months","weeks","days","hours","minutes","seconds"];Fa="\u200B"});function $a(){return`-${uo.fromTimestamp(Date.now())}`}function Me(e,t){let o=T4({channelId:e,content:"",embeds:[]});return Co.receiveMessage(e,rs(t,o)),t}function Ot(e,t,o){return e.find(r=>r.name===t)?.value||o}var T4,Th=f(()=>{"use strict";a();bc();$();b();T4=ye('username:"Clyde"')});var kr,hn,wh,Gc=f(()=>{"use strict";a();kr=(y=>(y[y.SUB_COMMAND=1]="SUB_COMMAND",y[y.SUB_COMMAND_GROUP=2]="SUB_COMMAND_GROUP",y[y.STRING=3]="STRING",y[y.INTEGER=4]="INTEGER",y[y.BOOLEAN=5]="BOOLEAN",y[y.USER=6]="USER",y[y.CHANNEL=7]="CHANNEL",y[y.ROLE=8]="ROLE",y[y.MENTIONABLE=9]="MENTIONABLE",y[y.NUMBER=10]="NUMBER",y[y.ATTACHMENT=11]="ATTACHMENT",y))(kr||{}),hn=(s=>(s[s.BUILT_IN=0]="BUILT_IN",s[s.BUILT_IN_TEXT=1]="BUILT_IN_TEXT",s[s.BUILT_IN_INTEGRATION=2]="BUILT_IN_INTEGRATION",s[s.BOT=3]="BOT",s[s.PLACEHOLDER=4]="PLACEHOLDER",s))(hn||{}),wh=(r=>(r[r.CHAT_INPUT=1]="CHAT_INPUT",r[r.USER=2]="USER",r[r.MESSAGE=3]="MESSAGE",r))(wh||{})});var Ih={};lt(Ih,{ApplicationCommandInputType:()=>hn,ApplicationCommandOptionType:()=>kr,ApplicationCommandType:()=>wh,BUILT_IN:()=>Dr,OptionalMessageOption:()=>Lr,RequiredMessageOption:()=>Ga,_handleCommand:()=>x4,_init:()=>w4,commands:()=>xh,findOption:()=>Ot,generateId:()=>$a,prepareOption:()=>Ph,registerCommand:()=>cs,sendBotMessage:()=>Me,unregisterCommand:()=>Ha});function Ph(e){return e.displayName||=e.name,e.displayDescription||=e.description,e.options?.forEach((t,o,r)=>{t===TS?r[o]=Lr:t===wS&&(r[o]=Ga),t.choices?.forEach(i=>i.displayName||=i.name),Ph(r[o])}),e}function P4(e,t){e.options?.forEach(o=>{if(o.type!==1)throw new Error("When specifying sub-command options, all options must be sub-commands.");let r={...e,...o,type:1,name:`${e.name} ${o.name}`,id:`${o.name}-${e.id}`,displayName:`${e.name} ${o.name}`,subCommandPath:[{name:o.name,type:o.type,displayName:o.name}],rootCommand:e};cs(r,t)})}function cs(e,t){if(!Dr){console.warn("[CommandsAPI]",`Not registering ${e.name} as the CommandsAPI hasn't been initialised.`,"Please restart to use commands");return}if(Dr.some(o=>o.name===e.name))throw new Error(`Command '${e.name}' already exists.`);if(e.isVencordCommand=!0,e.id??=`-${Dr.length+1}`,e.applicationId??="-1",e.type??=1,e.inputType??=1,e.plugin||=t,Ph(e),e.options?.[0]?.type===1){P4(e,t);return}xh[e.name]=e,Dr.push(e)}function Ha(e){let t=Dr.findIndex(o=>o.name===e);return t===-1?!1:(Dr.splice(t,1),delete xh[e],!0)}var Dr,xh,TS,wS,Lr,Ga,w4,x4,Do=f(()=>{"use strict";a();Cn();Th();Gc();Th();Gc();xh={},TS=Symbol("OptionalMessageOption"),wS=Symbol("RequiredMessageOption"),Lr=TS,Ga=wS,w4=function(e){try{Dr=e,Lr=e.find(t=>t.name==="shrug").options[0],Ga=e.find(t=>t.name==="me").options[0]}catch{console.error("Failed to load CommandsApi")}return e},x4=function(e,t,o){if(!e.isVencordCommand)return e.execute(t,o);let r=i=>{let s=`An Error occurred while executing command "${e.name}"`,l=i instanceof Error?i.stack||i.message:String(i);console.error(s,i),Me(o.channel.id,{content:`${s}:
|
|
${Ii(l)}`,author:{username:"Vencord"}})};try{let i=e.execute(t,o);return i instanceof Promise?i.catch(r):i}catch(i){return r(i)}}});var yn,us=f(()=>{a();yn="5c05443"});var za,xS=f(()=>{a();za="Vendicated/Vencord"});var PS,Mh=f(()=>{"use strict";a();us();xS();PS=`Vencord/${yn}${za?` (https://github.com/${za})`:""}`});function IS({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let l=t[r]??e.default,[u,c]=H.useState(l??!1),[m,g]=H.useState(null);H.useEffect(()=>{s(m!==null)},[m]);function y(v){let M=e.isValid?.call(o,v)??!0;typeof M=="string"?g(M):M?(g(null),c(v),i(v)):g("Invalid input provided.")}return n(S.FormSection,null,n(Lt,{value:u,onChange:y,note:e.description,disabled:e.disabled?.call(o)??!1,...e.componentProps,hideBorder:!0,style:{marginBottom:"0.5em"}},Yn(Sh(r))),m&&n(S.FormText,{style:{color:"var(--text-danger)"}},m))}var MS=f(()=>{"use strict";a();Cn();b()});function AS({option:e,onChange:t,onError:o}){return e.component({setValue:t,setError:o,option:e})}var NS=f(()=>{"use strict";a()});function Ah({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){function l(v){return e.type===2?BigInt(v):Number(v)}let[u,c]=H.useState(`${t[r]??e.default??0}`),[m,g]=H.useState(null);H.useEffect(()=>{s(m!==null)},[m]);function y(v){let M=e.isValid?.call(o,v)??!0;g(null),typeof M=="string"?g(M):M||g("Invalid input provided."),e.type===1&&BigInt(v)>=I4?(c(`${Number.MAX_SAFE_INTEGER}`),i(l(v))):(c(v),i(l(v)))}return n(S.FormSection,null,n(S.FormTitle,null,e.description),n(je,{type:"number",pattern:"-?[0-9]+",value:u,onChange:y,placeholder:e.placeholder??"Enter a number",disabled:e.disabled?.call(o)??!1,...e.componentProps}),m&&n(S.FormText,{style:{color:"var(--text-danger)"}},m))}var I4,CS=f(()=>{"use strict";a();w();b();I4=BigInt(Number.MAX_SAFE_INTEGER)});function RS({option:e,pluginSettings:t,definedSettings:o,onChange:r,onError:i,id:s}){let l=t[s]??e.options?.find(v=>v.default)?.value,[u,c]=H.useState(l??null),[m,g]=H.useState(null);H.useEffect(()=>{i(m!==null)},[m]);function y(v){let M=e.isValid?.call(o,v)??!0;typeof M=="string"?g(M):M?(g(null),c(v),r(v)):g("Invalid input provided.")}return n(S.FormSection,null,n(S.FormTitle,null,e.description),n(Fo,{isDisabled:e.disabled?.call(o)??!1,options:e.options,placeholder:e.placeholder??"Select an option",maxVisibleItems:5,closeOnSelect:!0,select:y,isSelected:v=>v===u,serialize:v=>String(v),...e.componentProps}),m&&n(S.FormText,{style:{color:"var(--text-danger)"}},m))}var kS=f(()=>{"use strict";a();b()});function Vt(e,t,o=1){let r=[];for(let i=e;i<=t;i+=o)r.push(Math.round(i*100)/100);return r}function DS({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let l=t[r]??e.default,[u,c]=H.useState(null);H.useEffect(()=>{s(u!==null)},[u]);function m(g){let y=e.isValid?.call(o,g)??!0;typeof y=="string"?c(y):y?(c(null),i(g)):c("Invalid input provided.")}return n(S.FormSection,null,n(S.FormTitle,null,e.description),n(ii,{disabled:e.disabled?.call(o)??!1,markers:e.markers,minValue:e.markers[0],maxValue:e.markers[e.markers.length-1],initialValue:l,onValueChange:m,onValueRender:g=>String(g.toFixed(2)),stickToMarkers:e.stickToMarkers??!0,...e.componentProps}))}var Nh=f(()=>{"use strict";a();b()});function LS({option:e,pluginSettings:t,definedSettings:o,id:r,onChange:i,onError:s}){let[l,u]=H.useState(t[r]??e.default??null),[c,m]=H.useState(null);H.useEffect(()=>{s(c!==null)},[c]);function g(y){let v=e.isValid?.call(o,y)??!0;m(typeof v=="string"?v:v?null:"Invalid input provided."),u(y),i(y)}return n(S.FormSection,null,n(S.FormTitle,null,e.description),n(je,{type:"text",value:l,onChange:g,placeholder:e.placeholder??"Enter a value",disabled:e.disabled?.call(o)??!1,...e.componentProps}),c&&n(S.FormText,{style:{color:"var(--text-danger)"}},c))}var ES=f(()=>{"use strict";a();b()});var Er=f(()=>{"use strict";a();xc();MS();NS();CS();kS();Nh();ES()});var OS=f(()=>{});function M4(){return n(Na,{"aria-hidden":!0,className:"vc-settings-modal-link-icon"})}function A4(){return n(zg,{"aria-hidden":!0,className:"vc-settings-modal-link-icon"})}function _S({text:e,href:t,Icon:o}){return n(oe,{text:e},r=>n(ai,{...r,href:t},n(o,null)))}var Hc,zc,Ch=f(()=>{"use strict";a();OS();b();Ca();Hc=e=>n(_S,{...e,Icon:A4}),zc=e=>n(_S,{...e,Icon:M4})});function FS(e){let t=new C4({username:e.username,id:e.id??$a(),avatar:e.avatar,bot:!0});return F.dispatch({type:"USER_UPDATE",user:t}),t}function jc({plugin:e,onRestartNeeded:t,onClose:o,transitionState:r}){let[i,s]=H.useState([]),l=Pt().plugins[e.name],[u,c]=H.useState({}),[m,g]=H.useState({}),[y,v]=H.useState(null),M=()=>Object.values(m).every(B=>!B),x=Boolean(l&&e.options&&!fa(e.options));H.useEffect(()=>{(async()=>{for(let B of e.authors.slice(0,6)){let z=B.id?await no.getUser(`${B.id}`).catch(()=>FS({username:B.name})):FS({username:B.name});s(Y=>[...Y,z])}})()},[]);async function N(){if(!e.options){o();return}if(e.beforeSave){let z=await Promise.resolve(e.beforeSave(u));if(z!==!0){v(z);return}}let B=!1;for(let[z,Y]of Object.entries(u)){let ee=e.options[z];l[z]=Y,ee?.onChange?.(Y),ee?.restartNeeded&&(B=!0)}B&&t(),o()}function I(){if(!x||!e.options)return n(S.FormText,null,"There are no settings for this plugin.");{let B=Object.entries(e.options).map(([z,Y])=>{if(Y.hidden)return null;function ee(ne){c(ie=>({...ie,[z]:ne}))}function J(ne){g(ie=>({...ie,[z]:ne}))}let U=R4[Y.type];return n(U,{id:z,key:z,option:Y,onChange:ee,onError:J,pluginSettings:l,definedSettings:e.settings})});return n(pe,{flexDirection:"column",style:{gap:12,marginBottom:16}},B)}}function R(B,z){let Y=e.authors.length-z,ee=e.authors.length-Y,J=ee+e.authors.length-z;return n(oe,{text:e.authors.slice(ee,J).map(U=>U.name).join(", ")},({onMouseEnter:U,onMouseLeave:ne})=>n("div",{className:Rh.moreUsers,onMouseEnter:U,onMouseLeave:ne},"+",Y))}let D=ps[e.name];return n(fe,{transitionState:r,size:"medium",className:"vc-text-selectable"},n(Ee,{separator:!1},n(Z,{variant:"heading-lg/semibold",style:{flexGrow:1}},e.name),n(ut,{onClick:o})),n(we,null,n(S.FormSection,null,n(pe,{className:BS("info")},n(S.FormText,{className:BS("description")},e.description),!D.userPlugin&&n("div",{className:"vc-settings-modal-links"},n(Hc,{text:"View more info",href:`https://vencord.dev/plugins/${e.name}`}),n(zc,{text:"View source code",href:`https://github.com/${za}/tree/main/src/plugins/${D.folderName}`}))),n(S.FormTitle,{tag:"h3",style:{marginTop:8,marginBottom:0}},"Authors"),n("div",{style:{width:"fit-content",marginBottom:8}},n(N4,{users:i,count:e.authors.length,guildId:void 0,renderIcon:!1,max:6,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:R,renderUser:B=>n(Xi,{className:Rh.clickableAvatar,onClick:()=>Kc(B)},n("img",{className:Rh.avatar,src:B.getAvatarURL(void 0,80,!0),alt:B.username,title:B.username}))}))),!!e.settingsAboutComponent&&n("div",{className:q(G.bottom8,"vc-text-selectable")},n(S.FormSection,null,n(k,{message:"An error occurred while rendering this plugin's custom InfoComponent"},n(e.settingsAboutComponent,{tempSettings:u})))),n(S.FormSection,{className:G.bottom16},n(S.FormTitle,{tag:"h3"},"Settings"),I())),x&&n(ct,null,n(pe,{flexDirection:"column",style:{width:"100%"}},n(pe,{style:{marginLeft:"auto"}},n(T,{onClick:o,size:T.Sizes.SMALL,color:T.Colors.PRIMARY,look:T.Looks.LINK},"Cancel"),n(oe,{text:"You must fix all errors before saving",shouldShow:!M()},({onMouseEnter:B,onMouseLeave:z})=>n(T,{size:T.Sizes.SMALL,color:T.Colors.BRAND,onClick:N,onMouseEnter:B,onMouseLeave:z,disabled:!M()},"Save & Close"))),y&&n(Z,{variant:"text-md/semibold",style:{color:"var(--text-danger)"}},"Error while saving: ",y))))}function Wc(e,t){ue(o=>n(jc,{...o,plugin:e,onRestartNeeded:()=>t?.(e.name)}))}var BS,N4,Rh,C4,R4,qc=f(()=>{"use strict";a();SS();Do();_();Ve();re();Rt();Mh();Mo();Ze();be();$e();w();$();b();Rr();Er();kh();Ch();BS=Te("vc-plugin-modal-"),N4=ve("defaultRenderUser","showDefaultAvatarsForNullUsers"),Rh=C("moreUsers","emptyUser","avatarContainer","clickableAvatar"),C4=Tt(()=>L.getCurrentUser().constructor);R4={[0]:LS,[1]:Ah,[2]:Ah,[3]:IS,[4]:RS,[5]:DS,[6]:AS}});var US=f(()=>{});function Yc({disabled:e,isNew:t,name:o,infoButton:r,footer:i,author:s,enabled:l,setEnabled:u,description:c,onMouseEnter:m,onMouseLeave:g}){let y=xt(null),v=xt(null);return n("div",{className:Or("card",{"card-disabled":e}),onMouseEnter:m,onMouseLeave:g},n("div",{className:Or("header")},n("div",{className:Or("name-author")},n(Z,{variant:"text-md/bold",className:Or("name")},n("div",{ref:v,className:Or("title-container")},n("div",{ref:y,className:Or("title"),onMouseOver:()=>{let M=y.current,x=v.current;M.style.setProperty("--offset",`${x.clientWidth-M.scrollWidth}px`),M.style.setProperty("--duration",`${Math.max(.5,(M.scrollWidth-x.clientWidth)/7)}s`)}},o)),t&&n(Cg,{text:"NEW",color:"#ED4245"})),!!s&&n(Z,{variant:"text-md/normal",className:Or("author")},s)),r,n(qg,{checked:l,onChange:u,disabled:e})),n(Z,{className:Or("note"),variant:"text-sm/normal"},c),i)}var Or,Dh=f(()=>{"use strict";a();US();Ve();xc();Kg();b();Or=Te("vc-addon-")});var $S=f(()=>{});var GS=f(()=>{});var Eh={};lt(Eh,{UpdateLogger:()=>Ai,changes:()=>_r,checkForUpdates:()=>Zn,getRepo:()=>Lh,isNewer:()=>ja,isOutdated:()=>Mi,maybePromptToUpdate:()=>Wa,update:()=>Br,updateError:()=>ds});async function Zc(e){let t=await e;if(t.ok)return t.value;throw ds=t.error,t.error}async function Zn(){return _r=await Zc(VencordNative.updater.getUpdates()),_r.some(e=>e.hash===yn)?(ja=!0,Mi=!1):Mi=_r.length>0}async function Br(){if(!Mi)return!0;let e=await Zc(VencordNative.updater.update());if(e&&(Mi=!1,!await Zc(VencordNative.updater.rebuild())))throw new Error("The Build failed. Please try manually building the new update");return e}async function Wa(e,t=!1){try{if(await Zn()){let r=confirm(e);if(r&&ja)return alert("Your local copy has more recent commits. Please stash or reset them.");r&&(await Br(),vo())}}catch(o){Ai.error(o),alert("That also failed :( Try updating or re-installing with the installer!")}}var Ai,Mi,ja,ds,_r,Lh,Ni=f(()=>{"use strict";a();us();ke();qn();Ai=new Q("Updater","white"),Mi=!1,ja=!1;Lh=()=>Zc(VencordNative.updater.getRepo())});function HS(){Wa("Uh Oh! Failed to render this Page. However, there is an update available that might fix it. Would you like to update and restart now?")}var zS=f(()=>{"use strict";a();Ni()});function qa(e){let t=!1,o;return function(){return t?o:(t=!0,o=e.apply(this,arguments))}}var Xc=f(()=>{"use strict";a()});function zo({title:e,children:t}){return n(S.FormSection,null,n(Z,{variant:"heading-lg/semibold",tag:"h2",className:G.bottom16},e),t)}function Lo(e,t){return k.wrap(e,{message:`Failed to render the ${t} tab. If this issue persists, try using the installer to reinstall!`,onError:Oh})}var Oh,Xn=f(()=>{"use strict";a();$S();GS();re();zS();Ze();Xc();b();Oh=qa(HS)});var Ka,_h=f(()=>{"use strict";a();Ka=class{set=new Set;get changeCount(){return this.set.size}get hasChanges(){return this.changeCount>0}handleChange(t){this.set.delete(t)||this.set.add(t)}add(t){return this.set.add(t)}remove(t){return this.set.delete(t)}getChanges(){return this.set.values()}map(t){return[...this.getChanges()].map(t)}}});var $h={};lt($h,{_usePatchContextMenu:()=>L4,addContextMenuPatch:()=>Fh,addGlobalContextMenuPatch:()=>k4,findGroupChildrenByChildId:()=>tt,globalPatches:()=>Jc,navPatches:()=>Ya,removeContextMenuPatch:()=>Uh,removeGlobalContextMenuPatch:()=>D4});function Fh(e,t){Array.isArray(e)||(e=[e]);for(let o of e){let r=Ya.get(o);r||(r=new Set,Ya.set(o,r)),r.add(t)}}function k4(e){Jc.add(e)}function Uh(e,t){let r=(Array.isArray(e)?e:[e]).map(i=>Ya.get(i)?.delete(t)??!1);return Array.isArray(e)?r:r[0]}function D4(e){return Jc.delete(e)}function tt(e,t){for(let o of t){if(o==null)continue;if(Array.isArray(o)){let i=tt(e,o);if(i!==null)return i}if(Array.isArray(e)&&e.some(i=>o.props?.id===i)||o.props?.id===e)return t;let r=o.props?.children;if(r){Array.isArray(r)||(r=[r],o.props.children=r);let i=tt(e,r);if(i!==null)return i}}return null}function L4(e){e={...e,children:Bh(e.children)},e.contextMenuApiArguments??=[];let t=Ya.get(e.navId);if(Array.isArray(e.children)||(e.children=[e.children]),t)for(let o of t)try{o(e.children,...e.contextMenuApiArguments)}catch(r){jS.error(`Patch for ${e.navId} errored,`,r)}for(let o of Jc)try{o(e.navId,e.children,...e.contextMenuApiArguments)}catch(r){jS.error("Global patch errored,",r)}return e}function Bh(e){return Array.isArray(e)?e.map(Bh):(H.isValidElement(e)&&(e=H.cloneElement(e),e?.props?.children&&(e.type!==E.MenuControlItem||e.type===E.MenuControlItem&&e.props.control!=null)&&(e.props.children=Bh(e.props.children))),e)}var jS,Ya,Jc,So=f(()=>{"use strict";a();ke();b();jS=new Q("ContextMenu"),Ya=new Map,Jc=new Set});var Vc={};lt(Vc,{PMLogger:()=>E4,addPatch:()=>KS,isPluginEnabled:()=>Za,patches:()=>fs,plugins:()=>O4,startAllPlugins:()=>Xa,startDependenciesRecursive:()=>YS,startPlugin:()=>zh,stopPlugin:()=>B4,subscribeAllPluginsFluxEvents:()=>_4,subscribePluginFluxEvents:()=>Hh,unsubscribePluginFluxEvents:()=>ZS});function Za(e){return(et[e]?.required||et[e]?.isDependency||Qc[e]?.enabled)??!1}function KS(e,t){let o=e;o.plugin=t,ag(o),Array.isArray(o.replacement)||(o.replacement=[o.replacement]),fs.push(o)}function YS(e){let t=!1,o=[];return e.dependencies?.forEach(r=>{if(!Qc[r].enabled){let i=et[r];if(YS(i),Qc[r].enabled=!0,i.isDependency=!0,i.patches){_t.warn(`Enabling dependency ${r} requires restart.`),t=!0;return}zh(i)||o.push(r)}}),{restartNeeded:t,failures:o}}function Hh(e,t){if(e.flux&&!Gh.has(e.name)){Gh.add(e.name),_t.debug("Subscribing to flux events of plugin",e.name);for(let[o,r]of Object.entries(e.flux)){let i=e.flux[o]=function(){try{let s=r.apply(e,arguments);return s instanceof Promise?s.catch(l=>_t.error(`${e.name}: Error while handling ${o}
|
|
`,l)):s}catch(s){_t.error(`${e.name}: Error while handling ${o}
|
|
`,s)}};t.subscribe(o,i)}}}function ZS(e,t){if(e.flux){Gh.delete(e.name),_t.debug("Unsubscribing from flux events of plugin",e.name);for(let[o,r]of Object.entries(e.flux))t.unsubscribe(o,r)}}function _4(e){WS=!0;for(let t in et)!Za(t)||Hh(et[t],e)}var _t,E4,O4,fs,WS,Gh,qS,Qc,Xa,zh,B4,Ja=f(()=>{"use strict";a();Do();So();_();ke();Ko();w();b();Rr();Xl();_t=new Q("PluginManager","#a6d189"),E4=_t,O4=et,fs=[],WS=!1,Gh=new Set,qS=Object.values(et),Qc=j.plugins;for(let e of qS)Za(e.name)&&e.dependencies?.forEach(t=>{let o=et[t];if(!o){let r=new Error(`Plugin ${e.name} has unresolved dependency ${t}`);_t.warn(r);return}Qc[t].enabled=!0,o.isDependency=!0});for(let e of qS){if(e.settings){e.settings.pluginName=e.name,e.options??={};for(let[t,o]of Object.entries(e.settings.def)){let r=e.settings.checks?.[t];e.options[t]={...o,...r}}}if(e.patches&&Za(e.name))for(let t of e.patches)KS(t,e.name)}Xa=nn("startAllPlugins",function(t){_t.info(`Starting plugins (stage ${t})`);for(let o in et)if(Za(o)){if((et[o].startAt??"WebpackReady")!==t)continue;zh(et[o])}});zh=nn("startPlugin",function(t){let{name:o,commands:r,contextMenus:i}=t;if(t.start){if(_t.info("Starting plugin",o),t.started)return _t.warn(`${o} already started`),!1;try{t.start()}catch(s){return _t.error(`Failed to start ${o}
|
|
`,s),!1}}if(t.started=!0,r?.length){_t.debug("Registering commands of plugin",o);for(let s of r)try{cs(s,o)}catch(l){return _t.error(`Failed to register command ${s.name}
|
|
`,l),!1}}if(WS&&Hh(t,F),i){_t.debug("Adding context menus patches of plugin",o);for(let s in i)Fh(s,i[s])}return!0},e=>`startPlugin ${e.name}`),B4=nn("stopPlugin",function(t){let{name:o,commands:r,contextMenus:i}=t;if(t.stop){if(_t.info("Stopping plugin",o),!t.started)return _t.warn(`${o} already stopped`),!1;try{t.stop()}catch(s){return _t.error(`Failed to stop ${o}
|
|
`,s),!1}}if(t.started=!1,r?.length){_t.debug("Unregistering commands of plugin",o);for(let s of r)try{Ha(s.name)}catch(l){return _t.error(`Failed to unregister command ${s.name}
|
|
`,l),!1}}if(ZS(t,F),i){_t.debug("Removing context menus patches of plugin",o);for(let s in i)Uh(s,i[s])}return!0},e=>`stopPlugin ${e.name}`)});function H4(e){V.show({message:e,type:V.Type.FAILURE,id:V.genId(),options:{position:V.Position.BOTTOM}})}function z4({required:e}){return n(At,{className:Ci("info-card",{"restart-card":e})},e?n(d,null,n(S.FormTitle,{tag:"h5"},"Restart required!"),n(S.FormText,{className:Ci("dep-text")},"Restart now to apply new plugins and their settings"),n(T,{onClick:()=>location.reload()},"Restart")):n(d,null,n(S.FormTitle,{tag:"h5"},"Plugin Management"),n(S.FormText,null,"Press the cog wheel or info icon to get more info on a plugin"),n(S.FormText,null,"Plugins with a cog wheel have settings you can modify!")))}function eu({plugin:e,disabled:t,onRestartNeeded:o,onMouseEnter:r,onMouseLeave:i,isNew:s}){let l=j.plugins[e.name],u=()=>l.enabled??!1;function c(){let m=u();if(!m){let{restartNeeded:y,failures:v}=F4(e);if(v.length){XS.error(`Failed to start dependencies for ${e.name}: ${v.join(", ")}`),hh("Failed to start dependencies: "+v.join(", "),"Close",()=>null);return}else if(y){l.enabled=!0,o(e.name);return}}if(e.patches?.length){l.enabled=!m,o(e.name);return}if(m&&!e.started){l.enabled=!m;return}if(!(m?$4(e):U4(e))){l.enabled=!1;let y=`Error while ${m?"stopping":"starting"} plugin ${e.name}`;XS.error(y),H4(y);return}l.enabled=!m}return n(Yc,{name:e.name,description:e.description,isNew:s,enabled:u(),setEnabled:c,disabled:t,onMouseEnter:r,onMouseLeave:i,infoButton:n("button",{role:"switch",onClick:()=>Wc(e,o),className:q(G4.button,Ci("info-button"))},e.options&&!fa(e.options)?n(Aa,null):n(Pa,null))})}function j4({search:e}){let t=Object.entries(QS).filter(([r])=>r.toLowerCase().includes(e)),o={desktop:"Discord Desktop app or Vesktop",discordDesktop:"Discord Desktop app",vencordDesktop:"Vesktop app",web:"Vesktop app and the Web version of Discord",dev:"Developer version of Vencord"};return n(Z,{variant:"text-md/normal",className:G.top16},t.length?n(d,null,n(S.FormText,null,"Are you looking for:"),n("ul",null,t.map(([r,i])=>n("li",{key:r},n("b",null,r),": Only available on the ",o[i])))):"No plugins meet the search criteria.")}function jh(){let e=Pt(),t=H.useMemo(()=>new Ka,[]);H.useEffect(()=>()=>void(t.hasChanges&&rt.show({title:"Restart required",body:n(d,null,n("p",null,"The following plugins require a restart:"),n("div",null,t.map((x,N)=>n(d,null,N>0&&", ",Pe.parse("`"+x+"`"))))),confirmText:"Restart now",cancelText:"Later!",onConfirm:()=>location.reload()})),[]);let o=H.useMemo(()=>{let x={};for(let N in et){let I=et[N].dependencies;if(I)for(let R of I)x[R]??=[],x[R].push(N)}return x},[]),r=wt(()=>Object.values(et).sort((x,N)=>x.name.localeCompare(N.name)),[]),[i,s]=H.useState({value:"",status:0}),l=i.value.toLowerCase(),u=x=>s(N=>({...N,value:x})),c=x=>s(N=>({...N,status:x})),m=x=>{let{status:N}=i,I=Vencord.Plugins.isPluginEnabled(x.name);return I&&N===2||!I&&N===1||N===3&&!g?.includes(x.name)?!1:l.length?x.name.toLowerCase().includes(l)||x.description.toLowerCase().includes(l)||x.tags?.some(R=>R.toLowerCase().includes(l)):!0},[g]=st(()=>It("Vencord_existingPlugins").then(x=>{let N=Date.now()/1e3,I={},R=Object.values(r).map(B=>B.name),D=[];for(let{name:B}of r)(I[B]=x?.[B]??N)+60*60*24*2>N&&D.push(B);return Ht("Vencord_existingPlugins",I),di.isEqual(D,R)?[]:D})),y=[],v=[],M=i.value.includes("API");for(let x of r){if(x.hidden||!x.options&&x.name.endsWith("API")&&!M||!m(x))continue;if(x.required||o[x.name]?.some(I=>e.plugins[I].enabled)){let I=x.required?"This plugin is required for Vencord to function.":W4(o[x.name]?.filter(R=>e.plugins[R].enabled));v.push(n(oe,{text:I,key:x.name},({onMouseLeave:R,onMouseEnter:D})=>n(eu,{onMouseLeave:R,onMouseEnter:D,onRestartNeeded:B=>t.handleChange(B),disabled:!0,plugin:x,key:x.name})))}else y.push(n(eu,{onRestartNeeded:I=>t.handleChange(I),disabled:!1,plugin:x,isNew:g?.includes(x.name),key:x.name}))}return n(zo,{title:"Plugins"},n(z4,{required:t.hasChanges}),n(S.FormTitle,{tag:"h5",className:q(G.top20,G.bottom8)},"Filters"),n("div",{className:q(G.bottom20,Ci("filter-controls"))},n(je,{autoFocus:!0,value:i.value,placeholder:"Search for a plugin...",onChange:u}),n("div",{className:JS.inputWrapper},n(Fo,{options:[{label:"Show All",value:0,default:!0},{label:"Show Enabled",value:1},{label:"Show Disabled",value:2},{label:"Show New",value:3}],serialize:String,select:c,isSelected:x=>x===i.status,closeOnSelect:!0,className:JS.inputDefault}))),n(S.FormTitle,{className:G.top20},"Plugins"),y.length||v.length?n("div",{className:Ci("grid")},y.length?y:n(Z,{variant:"text-md/normal"},"No plugins meet the search criteria.")):n(j4,{search:l}),n(S.FormDivider,{className:G.top20}),n(S.FormTitle,{tag:"h5",className:q(G.top20,G.bottom8)},"Required Plugins"),n("div",{className:Ci("grid")},v.length?v:n(Z,{variant:"text-md/normal"},"No plugins meet the search criteria.")))}function W4(e){return n(H.Fragment,null,n(S.FormText,null,"This plugin is required by:"),e.map(t=>n(S.FormText,{className:Ci("dep-text")},t)))}var F4,U4,$4,Ci,XS,JS,G4,Wh=f(()=>{"use strict";a();yS();cn();vh();_();Ve();bt();qc();Dh();Xn();_h();Mo();ke();Ze();be();ft();$();b();Rr();({startDependenciesRecursive:F4,startPlugin:U4,stopPlugin:$4}=Tt(()=>(Ja(),gv(Vc)))),Ci=Te("vc-plugins-"),XS=new Q("PluginSettings","#a6d189"),JS=C("inputWrapper","inputDefault","error"),G4=C("button","disabled","enabled")});function Kc(e){ue(t=>n(fe,{...t},n(k,null,n(we,{className:gs("root")},n(q4,{user:e})))))}function q4({user:e}){Pt();let t=Fe([Qt],()=>Qt.getUserProfile(e.id));ce(()=>{!t&&!e.bot&&e.id&&kg(e.id)},[e.id]);let o=t?.connectedAccounts?.find(l=>l.type==="github")?.name,r=t?.connectedAccounts?.find(l=>l.type==="domain")?.name,i=wt(()=>{let l=Object.values(et);return(os[e.id]?l.filter(c=>c.authors.includes(os[e.id])):l.filter(c=>c.authors.some(m=>m.name===e.username))).filter(c=>!c.name.endsWith("API")).sort((c,m)=>Number(c.required??!1)-Number(m.required??!1))},[e.id,e.username]),s=n(qe,{href:"https://vencord.dev/source"},"contributed");return n(d,null,n("div",{className:gs("header")},n("img",{className:gs("avatar"),src:e.getAvatarURL(void 0,512,!0),alt:""}),n(S.FormTitle,{tag:"h2",className:gs("name")},e.username),n("div",{className:q("vc-settings-modal-links",gs("links"))},r&&n(Hc,{text:r,href:`https://${r}`}),o&&n(zc,{text:o,href:`https://github.com/${o}`}))),i.length?n(S.FormText,null,"This person has ",s," to ",vg(i.length,"plugin"),"!"):n(S.FormText,null,"This person has not made any plugins. They likely ",s," to Vencord in other ways!"),!!i.length&&n("div",{className:gs("plugins")},i.map(l=>n(eu,{key:l.name,plugin:l,disabled:l.required??!1,onRestartNeeded:()=>it("Restart to apply changes!")}))))}var gs,kh=f(()=>{"use strict";a();Bv();_();Ve();re();ho();P();pt();be();$e();b();Rr();Wh();Ch();gs=Te("vc-author-modal-")});async function VS(e=!1){qh={};let t={};e&&(t.cache="no-cache"),qh=await fetch("https://badges.vencord.dev/badges.json",t).then(o=>o.json())}var K4,Y4,qh,tu,eb=f(()=>{"use strict";a();_v();nu();yc();re();Rt();hc();kh();P();ke();Ze();be();$e();w();b();K4="https://vencord.dev/assets/favicon.png",Y4={description:"Vencord Contributor",image:K4,position:0,shouldShow:({userId:e})=>Fn(e),onClick:(e,{userId:t})=>Kc(L.getUser(t))},qh={};tu=h({name:"BadgeAPI",description:"API to add badges to users.",authors:[p.Megu,p.Ven,p.TheSun],required:!0,patches:[{find:'id:"premium",',replacement:[{match:/&&(\i)\.push\(\{id:"premium".+?\}\);/,replace:"$&$1.unshift(...$self.getBadges(arguments[0]));"},{match:/alt:" ","aria-hidden":!0,src:(?=(\i)\.src)/,replace:"...$1.props,$& $1.image??"},{match:/(?<=text:(\i)\.description,spacing:12,.{0,50})children:/,replace:"children:$1.component ? () => $self.renderBadgeComponent($1) :"},{match:/href:(\i)\.link/,replace:"...($1.onClick && { onClick: vcE => $1.onClick(vcE, $1) }),$&"}]},{find:".PANEL]:14",replacement:{match:/(?<=(\i)=\(0,\i\.\i\)\(\i\);)return 0===\i.length\?/,replace:"$1.unshift(...$self.getBadges(arguments[0].displayProfile));$&"}},{find:".description,delay:",replacement:[{match:/alt:" ","aria-hidden":!0,src:(?=.{0,20}(\i)\.icon)/,replace:"...$1.props,$& $1.image??"},{match:/(?<=text:(\i)\.description,.{0,50})children:/,replace:"children:$1.component ? $self.renderBadgeComponent({ ...$1 }) :"},{match:/href:(\i)\.link/,replace:"...($1.onClick && { onClick: vcE => $1.onClick(vcE, $1) }),$&"}]}],toolboxActions:{async"Refetch Badges"(){await VS(!0),V.show({id:V.genId(),message:"Successfully refetched badges!",type:V.Type.SUCCESS})}},async start(){Vencord.Api.Badges.addBadge(Y4),await VS()},getBadges(e){if(!e)return[];try{return e.userId??=e.user?.id,Kh(e)}catch(t){return new Q("BadgeAPI#hasBadges").error(t),[]}},renderBadgeComponent:k.wrap(e=>{let t=e.component;return n(t,{...e})},{noop:!0}),getDonorBadges(e){return qh[e]?.map(t=>({image:t.badge,description:t.tooltip,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},onClick(){let o=ue(r=>n(k,{noop:!0,onError:()=>{Un(o),VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")}},n(un.ModalRoot,{...r},n(un.ModalHeader,null,n(pe,{style:{width:"100%",justifyContent:"center"}},n(S.FormTitle,{tag:"h2",style:{width:"100%",textAlign:"center",margin:0}},n(ha,null),"Vencord Donor"))),n(un.ModalContent,null,n(pe,null,n("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533070955872337.png",alt:"",style:{margin:"auto"}}),n("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533090627174460.png",alt:"",style:{margin:"auto"}})),n("div",{style:{padding:"1em"}},n(S.FormText,null,"This Badge is a special perk for Vencord Donors"),n(S.FormText,{className:G.top20},"Please consider supporting the development of Vencord by becoming a donor. It would mean a lot!!"))),n(un.ModalFooter,null,n(pe,{style:{width:"100%",justifyContent:"center"}},n(ya,null))))))}}))}})});var ru,tb=f(()=>{"use strict";a();P();w();ru=h({name:"ChatInputButtonAPI",description:"API to add buttons to the chat input",authors:[p.Ven],patches:[{find:'"sticker")',replacement:{match:/return\(!\i\.\i&&(?=\(\i\.isDM.+?(\i)\.push\(.{0,50}"gift")/,replace:"$&(Vencord.Api.ChatButtons._injectButtons($1,arguments[0]),true)&&"}}]})});var iu,ob=f(()=>{"use strict";a();P();w();iu=h({name:"CommandsAPI",authors:[p.Arjix],description:"Api required by anything that uses commands",patches:[{find:',"tenor"',replacement:[{match:/(?<=\w=)(\w)(\.filter\(.{0,60}tenor)/,replace:"Vencord.Api.Commands._init($1)$2"}]},{find:"Unexpected value for option",replacement:{match:/,(\i)\.execute\((\i),(\i)\)/,replace:(e,t,o,r)=>`,Vencord.Api.Commands._handleCommand(${t}, ${o}, ${r})`}},{find:".source,children",replacement:{match:/(?<=:(.{1,3})\.displayDescription\}.{0,200}\.source,children:)[^}]+/,replace:"$1.plugin||($&)"}}]})});var su,nb=f(()=>{"use strict";a();P();w();su=h({name:"ContextMenuAPI",description:"API for adding/removing items to/from context menus.",authors:[p.Nuckyz,p.Ven,p.Kyuuhachi],required:!0,patches:[{find:"\u266B (\u3064\uFF61\u25D5\u203F\u203F\u25D5\uFF61)\u3064 \u266A",replacement:{match:/(?=let{navId:)(?<=function \i\((\i)\).+?)/,replace:"$1=Vencord.Api.ContextMenu._usePatchContextMenu($1);"}},{find:".Menu,{",all:!0,replacement:{match:/Menu,{(?<=\.jsxs?\)\(\i\.Menu,{)/g,replace:"$&contextMenuApiArguments:typeof arguments!=='undefined'?arguments:[],"}}]})});var au,rb=f(()=>{"use strict";a();P();w();au=h({name:"MemberListDecoratorsAPI",description:"API to add decorators to member list (both in servers and DMs)",authors:[p.TheSun,p.Ven],patches:[{find:".lostPermission)",replacement:[{match:/let\{[^}]*lostPermissionTooltipText:\i[^}]*\}=(\i),/,replace:"$&vencordProps=$1,"},{match:/\.Messages\.GUILD_OWNER(?=.+?decorators:(\i)\(\)).+?\1=?\(\)=>.+?children:\[/,replace:"$&...(typeof vencordProps=='undefined'?[]:Vencord.Api.MemberListDecorators.__getDecorators(vencordProps)),"}]},{find:"PrivateChannel.renderAvatar",replacement:{match:/decorators:(\i\.isSystemDM\(\))\?(.+?):null/,replace:"decorators:[...Vencord.Api.MemberListDecorators.__getDecorators(arguments[0]), $1?$2:null]"}}]})});var lu,ib=f(()=>{"use strict";a();P();w();lu=h({name:"MessageAccessoriesAPI",description:"API to add message accessories.",authors:[p.Cyn],patches:[{find:".Messages.REMOVE_ATTACHMENT_BODY",replacement:{match:/(?<=.container\)?,children:)(\[.+?\])/,replace:"Vencord.Api.MessageAccessories._modifyAccessories($1,this.props)"}}]})});var cu,sb=f(()=>{"use strict";a();P();w();cu=h({name:"MessageDecorationsAPI",description:"API to add decorations to messages",authors:[p.TheSun],patches:[{find:'"Message Username"',replacement:{match:/\.Messages\.GUILD_COMMUNICATION_DISABLED_BOTTOM_SHEET_TITLE.+?}\),\i(?=\])/,replace:"$&,...Vencord.Api.MessageDecorations.__addDecorationsToMessage(arguments[0])"}}]})});var uu,ab=f(()=>{"use strict";a();P();w();uu=h({name:"MessageEventsAPI",description:"Api required by anything using message events.",authors:[p.Arjix,p.hunt,p.Ven],patches:[{find:".Messages.EDIT_TEXTAREA_HELP",replacement:{match:/(?<=,channel:\i\}\)\.then\().+?(?=return \i\.content!==this\.props\.message\.content&&\i\((.+?)\))/,replace:(e,t)=>`async ${e}if(await Vencord.Api.MessageEvents._handlePreEdit(${t}))return Promise.resolve({shoudClear:true,shouldRefocus:true});`}},{find:".handleSendMessage,onResize",replacement:{match:/(type:this\.props\.chatInputType.+?\.then\()(\i=>\{.+?let (\i)=\i\.\i\.parse\((\i),.+?let (\i)=\i\.\i\.getSendMessageOptionsForReply\(\i\);)(?<=\)\(({.+?})\)\.then.+?)/,replace:(e,t,o,r,i,s,l)=>`${t}async ${o}if(await Vencord.Api.MessageEvents._handlePreSend(${i}.id,${r},${l},${s}))return{shoudClear:true,shouldRefocus:true};`}},{find:'("interactionUsernameProfile',replacement:{match:/let\{id:\i}=(\i),{id:\i}=(\i);return \i\.useCallback\((\i)=>\{/,replace:(e,t,o,r)=>`const vcMsg=${t},vcChan=${o};${e}Vencord.Api.MessageEvents._handleClick(vcMsg, vcChan, ${r});`}}]})});var pu,lb=f(()=>{"use strict";a();P();w();pu=h({name:"MessagePopoverAPI",description:"API to add buttons to message popovers.",authors:[p.KingFish,p.Ven,p.Nuckyz],patches:[{find:"Messages.MESSAGE_UTILITIES_A11Y_LABEL",replacement:{match:/\i&&!\i\?\(0,\i\.jsxs?\)\(.{0,200}renderEmojiPicker:.{0,500}\?(\i)\(\{key:"reply-other"/,replace:(e,t)=>{let o=e.match(/message:(.{1,3}),/)?.[1];if(!o)throw new Error("Could not find message variable");return`...Vencord.Api.MessagePopover._buildPopoverElements(${o},${t}),${e}`}}}]})});var du,cb=f(()=>{"use strict";a();P();w();du=h({name:"MessageUpdaterAPI",description:"API for updating and re-rendering messages.",authors:[p.Nuckyz],patches:[{find:"}renderEmbeds(",replacement:{match:/(?<=this.props,\i,\[)"message",/,replace:""}}]})});var mu,ub=f(()=>{"use strict";a();P();w();mu=h({name:"NoticesAPI",description:"Fixes notices being automatically dismissed",authors:[p.Ven],required:!0,patches:[{find:'"NoticeStore"',replacement:[{match:/(?<=!1;)\i=null;(?=.{0,80}getPremiumSubscription\(\))/g,replace:"if(Vencord.Api.Notices.currentNotice)return false;$&"},{match:/(?<=,NOTICE_DISMISS:function\(\i\){)return null!=(\i)/,replace:'if($1.id=="VencordNotice")return($1=null,Vencord.Api.Notices.nextNotice(),true);$&'}]}]})});var fu,pb=f(()=>{"use strict";a();P();w();fu=h({name:"ServerListAPI",authors:[p.kemo],description:"Api required for plugins that modify the server list",patches:[{find:"Messages.DISCODO_DISABLED",replacement:{match:/(?<=Messages\.DISCODO_DISABLED.+?return)(\(.{0,75}?tutorialContainer.+?}\))(?=}function)/,replace:"[$1].concat(Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.Above))"}},{find:"Messages.SERVERS,children",replacement:{match:/(?<=Messages\.SERVERS,children:).+?default:return null\}\}\)/,replace:"Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.In).concat($&)"}}]})});var gu,db=f(()=>{"use strict";a();P();w();gu=h({name:"UserSettingsAPI",description:"Patches Discord's UserSettings to expose their group and name.",authors:[p.Nuckyz],patches:[{find:",updateSetting:",replacement:[{match:/(?<=INFREQUENT_USER_ACTION.{0,20},)useSetting:/,replace:"userSettingsAPIGroup:arguments[0],userSettingsAPIName:arguments[1],$&"},{match:/updateSetting:.{0,100}SELECTIVELY_SYNCED_USER_SETTINGS_UPDATE/,replace:"userSettingsAPIGroup:arguments[0].userSettingsAPIGroup,userSettingsAPIName:arguments[0].userSettingsAPIName,$&"},{match:/updateSetting:.{0,60}USER_SETTINGS_OVERRIDE_CLEAR/,replace:"userSettingsAPIGroup:arguments[0].userSettingsAPIGroup,userSettingsAPIName:arguments[0].userSettingsAPIName,$&"}]}]})});var mb,hu,fb=f(()=>{"use strict";a();_();P();ke();w();mb=A({disableAnalytics:{type:3,description:"Disable Discord's tracking (analytics/'science')",default:!0,restartNeeded:!0}}),hu=h({name:"NoTrack",description:"Disable Discord's tracking (analytics/'science'), metrics and Sentry crash reporting",authors:[p.Cyn,p.Ven,p.Nuckyz,p.Arrow],required:!0,settings:mb,patches:[{find:"AnalyticsActionHandlers.handle",predicate:()=>mb.store.disableAnalytics,replacement:{match:/^.+$/,replace:"()=>{}"}},{find:".METRICS,",replacement:[{match:/this\._intervalId=/,replace:"this._intervalId=void 0&&"},{match:/(?:increment|distribution)\(\i(?:,\i)?\){/g,replace:"$&return;"}]},{find:".installedLogHooks)",replacement:{match:"getDebugLogging(){",replace:"getDebugLogging(){return false;"}}],startAt:"Init",start(){Object.defineProperty(Function.prototype,"g",{configurable:!0,set(e){Object.defineProperty(this,"g",{value:e,configurable:!0,enumerable:!0,writable:!0});let{stack:t}=new Error;if(!(t?.includes("discord.com")||t?.includes("discordapp.com"))||!String(this).includes("exports:{}")||this.c!=null)return;let o=t?.match(/\/assets\/.+?\.js/)?.[0];if(!o)return;let r=new XMLHttpRequest;if(r.open("GET",o,!1),r.send(),!!r.responseText.includes("window.DiscordSentry="))throw new Q("NoTrack","#8caaee").info("Disabling Sentry by erroring its WebpackInstance"),Reflect.deleteProperty(Function.prototype,"g"),Reflect.deleteProperty(window,"DiscordSentry"),new Error("Sentry successfully disabled")}}),Object.defineProperty(window,"DiscordSentry",{configurable:!0,set(){new Q("NoTrack","#8caaee").error("Failed to disable Sentry. Falling back to deleting window.DiscordSentry"),Reflect.deleteProperty(Function.prototype,"g"),Reflect.deleteProperty(window,"DiscordSentry")}})}})});function Z4(){return n(zo,{title:"Backup & Restore"},n(At,{className:q("vc-settings-card","vc-backup-restore-card")},n(pe,{flexDirection:"column"},n("strong",null,"Warning"),n("span",null,"Importing a settings file will overwrite your current settings."))),n(Z,{variant:"text-md/normal",className:G.bottom8},"You can import and export your Vencord settings as a JSON file. This allows you to easily transfer your settings to another device, or recover your settings after reinstalling Vencord or Discord."),n(Z,{variant:"text-md/normal",className:G.bottom8},"Settings Export contains:",n("ul",null,n("li",null,"\u2014 Custom QuickCSS"),n("li",null,"\u2014 Theme Links"),n("li",null,"\u2014 Plugin Settings"))),n(pe,null,n(T,{onClick:()=>gS(),size:T.Sizes.SMALL},"Import Settings"),n(T,{onClick:mS,size:T.Sizes.SMALL},"Export Settings")))}var gb,hb=f(()=>{"use strict";a();Rt();Ze();be();_a();b();Xn();gb=Lo(Z4,"Backup & Restore")});function yb(e){let t={display:e.inline?"inline-grid":"grid",gridTemplateColumns:`repeat(${e.columns}, 1fr)`,gap:e.gap,...e.style};return n("div",{...e,style:t},e.children)}var vb=f(()=>{"use strict";a()});function X4(e){try{return new URL(e),!0}catch{return"Invalid URL"}}async function J4(){let e=await fetch(new URL("/v1/",Cr()),{method:"DELETE",headers:{Authorization:await as()}});if(!e.ok){Bc.error(`Failed to erase data, API returned ${e.status}`),Ue({title:"Cloud Integrations",body:`Could not erase all data (API returned ${e.status}), please contact support.`,color:"var(--red-360)"});return}j.cloud.authenticated=!1,await Fc(),Ue({title:"Cloud Integrations",body:"Successfully erased all data.",color:"var(--green-360)"})}function Q4(){let{cloud:e}=Pt(["cloud.authenticated","cloud.settingsSync"]),t=e.authenticated&&e.settingsSync;return n(S.FormSection,{title:"Settings Sync",className:G.top16},n(S.FormText,{variant:"text-md/normal",className:G.bottom20},"Synchronize your settings to the cloud. This allows easy synchronization across multiple devices with minimal effort."),n(Lt,{key:"cloud-sync",disabled:!e.authenticated,value:e.settingsSync,onChange:o=>{e.settingsSync=o}},"Settings Sync"),n("div",{className:"vc-cloud-settings-sync-grid"},n(T,{size:T.Sizes.SMALL,disabled:!t,onClick:()=>ls(!0)},"Sync to Cloud"),n(oe,{text:"This will overwrite your local settings with the ones on the cloud. Use wisely!"},({onMouseLeave:o,onMouseEnter:r})=>n(T,{onMouseLeave:o,onMouseEnter:r,size:T.Sizes.SMALL,color:T.Colors.RED,disabled:!t,onClick:()=>$c(!0,!0)},"Sync from Cloud")),n(T,{size:T.Sizes.SMALL,color:T.Colors.RED,disabled:!t,onClick:()=>hS()},"Delete Cloud Settings")))}function V4(){let e=Pt(["cloud.authenticated","cloud.url"]);return n(zo,{title:"Vencord Cloud"},n(S.FormSection,{title:"Cloud Settings",className:G.top16},n(S.FormText,{variant:"text-md/normal",className:G.bottom20},"Vencord comes with a cloud integration that adds goodies like settings sync across devices. It ",n(qe,{href:"https://vencord.dev/cloud/privacy"},"respects your privacy"),", and the ",n(qe,{href:"https://github.com/Vencord/Backend"},"source code")," is AGPL 3.0 licensed so you can host it yourself."),n(Lt,{key:"backend",value:e.cloud.authenticated,onChange:t=>{t?ch():e.cloud.authenticated=t},note:"This will request authorization if you have not yet set up cloud integrations."},"Enable Cloud Integrations"),n(S.FormTitle,{tag:"h5"},"Backend URL"),n(S.FormText,{className:G.bottom8},"Which backend to use when using cloud integrations."),n(ba,{key:"backendUrl",value:e.cloud.url,onChange:async t=>{e.cloud.url=t,e.cloud.authenticated=!1,Fc()},validate:X4}),n(yb,{columns:2,gap:"1em",className:G.top8},n(T,{size:T.Sizes.MEDIUM,disabled:!e.cloud.authenticated,onClick:async()=>{await Fc(),e.cloud.authenticated=!1,await ch()}},"Reauthorise"),n(T,{size:T.Sizes.MEDIUM,color:T.Colors.RED,disabled:!e.cloud.authenticated,onClick:()=>rt.show({title:"Are you sure?",body:"Once your data is erased, we cannot recover it. There's no going back!",onConfirm:J4,confirmText:"Erase it!",confirmColor:"vc-cloud-erase-data-danger-btn",cancelText:"Nevermind"})},"Erase All Data")),n(S.FormDivider,{className:G.top16})),n(Q4,null))}var Sb,bb=f(()=>{"use strict";a();zn();_();Pc();vb();ho();uh();Ze();_a();b();Xn();Sb=Lo(V4,"Cloud")});var uz,Tb=f(()=>{"use strict";a();Ic();Mr();Ze();Ko();Cn();$();b();Xn();uz=ro(function({find:e,setModule:t,setError:o}){let r=Yi(e),i=Object.keys(r),s=i.length;s===0?o("No match. Perhaps that module is lazy loaded?"):s!==1?o("Multiple matches. Please refine your filter"):t([i[0],r[i[0]]])})});var wb,xb=f(()=>{"use strict";a();Wh();Xn();wb=Lo(jh,"Plugins")});function oR({link:e}){let[t,o,r]=st(()=>fetch(e).then(s=>{if(s.status>300)throw`${s.status} ${s.statusText}`;let l=s.headers.get("Content-Type");if(!l?.startsWith("text/css")&&!l?.startsWith("text/plain"))throw"Not a CSS file. Remember to use the raw link!";return"Okay!"})),i=r?"Checking...":o?`Error: ${o instanceof Error?o.message:String(o)}`:"Valid!";return n(S.FormText,{style:{color:r?"var(--text-muted)":o?"var(--text-danger)":"var(--text-positive)"}},i)}function nR({themeLinks:e}){return e.length?n(d,null,n(S.FormTitle,{className:G.top20,tag:"h5"},"Validator"),n(S.FormText,null,"This section will tell you whether your themes can successfully be loaded"),n("div",null,e.map(t=>n(At,{style:{padding:".5em",marginBottom:".5em",marginTop:".5em"},key:t},n(S.FormTitle,{tag:"h5",style:{overflowWrap:"break-word"}},t),n(oR,{link:t}))))):null}function rR({theme:e,enabled:t,onChange:o,onDelete:r}){return n(Yc,{name:e.name,description:e.description,author:e.author,enabled:t,setEnabled:o,infoButton:!1,footer:n(pe,{flexDirection:"row",style:{gap:"0.2em"}},!!e.website&&n(qe,{href:e.website},"Website"),!!(e.website&&e.invite)&&" \u2022 ",!!e.invite&&n(qe,{href:`https://discord.gg/${e.invite}`,onClick:async i=>{i.preventDefault(),e.invite!=null&&Ti(e.invite).catch(()=>it("Invalid or expired invite"))}},"Discord Server"))})}function iR(){let e=Pt(["themeLinks","enabledThemes"]),t=xt(null),[o,r]=K(0),[i,s]=K(e.themeLinks.join(`
|
|
`)),[l,u]=K(null),[c,,m]=st(VencordNative.themes.getThemesDir);ce(()=>{g()},[]);async function g(){let I=await VencordNative.themes.getThemesList();u(I)}function y(I,R){if(R){if(e.enabledThemes.includes(I))return;e.enabledThemes=[...e.enabledThemes,I]}else e.enabledThemes=e.enabledThemes.filter(D=>D!==I)}async function v(I){if(I.stopPropagation(),I.preventDefault(),!I.currentTarget?.files?.length)return;let{files:R}=I.currentTarget,D=Array.from(R,B=>{let{name:z}=B;if(!!z.endsWith(".css"))return new Promise((Y,ee)=>{let J=new FileReader;J.onload=()=>{VencordNative.themes.uploadTheme(z,J.result).then(Y).catch(ee)},J.readAsText(B)})});await Promise.all(D),g()}function M(){return n(d,null,n(At,{className:"vc-settings-card"},n(S.FormTitle,{tag:"h5"},"Find Themes:"),n("div",{style:{marginBottom:".5em",display:"flex",flexDirection:"column"}},n(qe,{style:{marginRight:".5em"},href:"https://betterdiscord.app/themes"},"BetterDiscord Themes"),n(qe,{href:"https://github.com/search?q=discord+theme"},"GitHub")),n(S.FormText,null,'If using the BD site, click on "Download" and place the downloaded .theme.css file into your themes folder.')),n(S.FormSection,{title:"Local Themes"},n(At,{className:"vc-settings-quick-actions-card"},n(d,null,n(T,{onClick:()=>Uc(c),size:T.Sizes.SMALL,disabled:m},"Open Themes Folder"),n(T,{onClick:g,size:T.Sizes.SMALL},"Load missing Themes"),n(T,{onClick:()=>VencordNative.quickCss.openEditor(),size:T.Sizes.SMALL},"Edit QuickCSS"),Vencord.Settings.plugins.ClientTheme.enabled&&n(T,{onClick:()=>ue(I=>n(jc,{...I,plugin:Vencord.Plugins.plugins.ClientTheme,onRestartNeeded:()=>{}})),size:T.Sizes.SMALL},"Edit ClientTheme"))),n("div",{className:tR("grid")},l?.map(I=>n(rR,{key:I.fileName,enabled:e.enabledThemes.includes(I.fileName),onChange:R=>y(I.fileName,R),onDelete:async()=>{y(I.fileName,!1),await VencordNative.themes.deleteTheme(I.fileName),g()},theme:I})))))}function x(){e.themeLinks=[...new Set(i.trim().split(/\n+/).map(I=>I.trim()).filter(Boolean))]}function N(){return n(d,null,n(At,{className:"vc-settings-card vc-text-selectable"},n(S.FormTitle,{tag:"h5"},"Paste links to css files here"),n(S.FormText,null,"One link per line"),n(S.FormText,null,"Make sure to use direct links to files (raw or github.io)!")),n(S.FormSection,{title:"Online Themes",tag:"h5"},n(na,{value:i,onChange:s,className:q(eR.textarea,"vc-settings-theme-links"),placeholder:"Theme Links",spellCheck:!1,onBlur:x,rows:10}),n(nR,{themeLinks:e.themeLinks})))}return n(zo,{title:"Themes"},n(rn,{type:"top",look:"brand",className:"vc-settings-tab-bar",selectedItem:o,onItemSelect:r},n(rn.Item,{className:"vc-settings-tab-bar-item",id:0},"Local Themes"),n(rn.Item,{className:"vc-settings-tab-bar-item",id:1},"Online Themes")),o===0&&M(),o===1&&N())}var Oz,_z,eR,tR,Pb,Ib=f(()=>{"use strict";a();_();Ve();Rt();bt();ho();qc();pt();Ze();be();$e();qn();ft();$();b();Dh();Xn();Oz=C("resolveInvite"),_z=Qe(e=>e.prototype?.activateUploadDialogue&&e.prototype.setRef),eR=Qe(e=>typeof e.textarea=="string"),tR=Te("vc-settings-theme-");Pb=Lo(iR,"Themes")});function Mb(e,t){return async()=>{e(!0);try{await t()}catch(o){Ai.error("Failed to update",o);let r;if(!o)r=`An unknown error occurred (error is undefined).
|
|
Please try again.`;else if(o.code&&o.cmd){let{code:i,path:s,cmd:l,stderr:u}=o;i==="ENOENT"?r=`Command \`${s}\` not found.
|
|
Please install it and try again`:(r=`An error occurred while running \`${l}\`:
|
|
`,r+=u||`Code \`${i}\`. See the console for more info`)}else r="An unknown error occurred. See the console for more info.";rt.show({title:"Oops!",body:n(mo,null,r.split(`
|
|
`).map(i=>n("div",null,Pe.parse(i))))})}finally{e(!1)}}}function Ab({repo:e,hash:t,disabled:o=!1}){return n(qe,{href:`${e}/commit/${t}`,disabled:o},t)}function Nb({updates:e,repo:t,repoPending:o}){return n(At,{style:{padding:"0 0.5em"}},e.map(({hash:r,author:i,message:s})=>n("div",{style:{marginTop:"0.5em",marginBottom:"0.5em"}},n("code",null,n(Ab,{repo:t,hash:r,disabled:o})),n("span",{style:{marginLeft:"0.5em",color:"var(--text-normal)"}},s," - ",i))))}function sR(e){let[t,o]=H.useState(_r),[r,i]=H.useState(!1),[s,l]=H.useState(!1),u=(t?.length??0)>0;return n(d,null,!t&&ds?n(d,null,n(S.FormText,null,"Failed to check updates. Check the console for more info"),n(mo,{style:{padding:"1em"}},n("p",null,ds.stderr||ds.stdout||"An unknown error occurred"))):n(S.FormText,{className:G.bottom8},u?t.length===1?"There is 1 Update":`There are ${t.length} Updates`:"Up to Date!"),u&&n(Nb,{updates:t,...e}),n(pe,{className:q(G.bottom8,G.top8)},u&&n(T,{size:T.Sizes.SMALL,disabled:s||r,onClick:Mb(l,async()=>{await Br()&&(o([]),await new Promise(c=>{rt.show({title:"Update Success!",body:"Successfully updated. Restart now to apply the changes?",confirmText:"Restart",cancelText:"Not now!",onConfirm(){vo(),c()},onCancel:c})}))})},"Update Now"),n(T,{size:T.Sizes.SMALL,disabled:s||r,onClick:Mb(i,async()=>{await Zn()?o(_r):(o([]),V.show({message:"No updates found!",id:V.genId(),type:V.Type.MESSAGE,options:{position:V.Position.BOTTOM}}))})},"Check for Updates")))}function aR(e){return n(d,null,n(S.FormText,{className:G.bottom8},"Your local copy has more recent commits. Please stash or reset them."),n(Nb,{...e,updates:_r}))}function Cb(){let e=Pt(["autoUpdate","autoUpdateNotification"]),[t,o,r]=st(Lh,{fallbackValue:"Loading..."});H.useEffect(()=>{o&&Ai.error("Failed to retrieve repo",o)},[o]);let i={repo:t,repoPending:r};return n(zo,{title:"Vencord Updater"},n(S.FormTitle,{tag:"h5"},"Updater Settings"),n(Lt,{value:e.autoUpdate,onChange:s=>e.autoUpdate=s,note:"Automatically update Vencord without confirmation prompt"},"Automatically update"),n(Lt,{value:e.autoUpdateNotification,onChange:s=>e.autoUpdateNotification=s,note:"Shows a notification when Vencord automatically updates",disabled:!e.autoUpdate},"Get notified when an automatic update completes"),n(S.FormTitle,{tag:"h5"},"Repo"),n(S.FormText,{className:"vc-text-selectable"},r?t:o?"Failed to retrieve - check console":n(qe,{href:t},t.split("/").slice(-2).join("/"))," ","(",n(Ab,{hash:yn,repo:t,disabled:r}),")"),n(S.FormDivider,{className:G.top8+" "+G.bottom8}),n(S.FormTitle,{tag:"h5"},"Updates"),ja?n(aR,{...i}):n(sR,{...i}))}var Rb,yu,vu=f(()=>{"use strict";a();_();yi();Rt();ho();Ze();be();$e();qn();ft();Ni();b();us();Xn();Rb=Lo(Cb,"Updater"),yu=function(){let e=Lo(Cb,"Updater");try{ue(Lo(t=>n(fe,{...t,size:"medium"},n(we,{className:"vc-updater-modal"},n(ut,{onClick:t.onClose,className:"vc-updater-modal-close-button"}),n(e,null))),"UpdaterModal"))}catch{Oh()}}});function mR(){let[e,,t]=st(VencordNative.settings.getSettingsDir,{fallbackValue:"Loading..."}),o=Pt(),r=H.useMemo(()=>Math.random()>.5?kb:Db,[]),i=navigator.platform.toLowerCase().startsWith("win"),l=navigator.platform.toLowerCase().startsWith("mac"),u=[{key:"useQuickCss",title:"Enable Custom CSS",note:"Loads your Custom CSS"},{key:"enableReactDevtools",title:"Enable React Developer Tools",note:"Requires a full restart"},i?{key:"winNativeTitleBar",title:"Use Windows' native title bar instead of Discord's custom one",note:"Requires a full restart"}:{key:"frameless",title:"Disable the window frame",note:"Requires a full restart"},{key:"transparent",title:"Enable window transparency.",note:"You need a theme that supports transparency or this will do nothing. WILL STOP THE WINDOW FROM BEING RESIZABLE!! Requires a full restart"},i&&{key:"winCtrlQ",title:"Register Ctrl+Q as shortcut to close Discord (Alternative to Alt+F4)",note:"Requires a full restart"},{key:"disableMinSize",title:"Disable minimum window size",note:"Requires a full restart"}];return n(zo,{title:"Vencord Settings"},n(fR,{image:r}),n(S.FormSection,{title:"Quick Actions"},n(At,{className:Yh("quick-actions-card")},n(T,{onClick:ka,look:T.Looks.BLANK},n(lR,null)),n(T,{onClick:()=>VencordNative.quickCss.openEditor(),look:T.Looks.BLANK},n(cR,null)),n(T,{onClick:vo,look:T.Looks.BLANK},n(uR,null)),n(T,{onClick:()=>Uc(e),look:T.Looks.BLANK,disabled:t},n(pR,null)),n(T,{onClick:()=>VencordNative.native.openExternal("https://github.com/Vendicated/Vencord"),look:T.Looks.BLANK,disabled:t},n(dR,null)))),n(S.FormDivider,null),n(S.FormSection,{className:G.top16,title:"Settings",tag:"h5"},n(S.FormText,{className:G.bottom20,style:{color:"var(--text-muted)"}},"Hint: You can change the position of this settings section in the"," ",n(T,{look:T.Looks.BLANK,style:{color:"var(--text-link)",display:"inline-block"},onClick:()=>Wc(Vencord.Plugins.plugins.Settings)},"settings of the Settings plugin"),"!"),u.map(c=>c&&n(Lt,{key:c.key,value:o[c.key],onChange:m=>o[c.key]=m,note:c.note},c.title))),l&&n(d,null,n(S.FormTitle,{tag:"h5"},"Window vibrancy style (requires restart)"),n(Fo,{className:G.bottom20,placeholder:"Window vibrancy style",options:[{label:"No vibrancy",value:void 0},{label:"Under Page (window tinting)",value:"under-page"},{label:"Content",value:"content"},{label:"Window",value:"window"},{label:"Selection",value:"selection"},{label:"Titlebar",value:"titlebar"},{label:"Header",value:"header"},{label:"Sidebar",value:"sidebar"},{label:"Tooltip",value:"tooltip"},{label:"Menu",value:"menu"},{label:"Popover",value:"popover"},{label:"Fullscreen UI (transparent but slightly muted)",value:"fullscreen-ui"},{label:"HUD (Most transparent)",value:"hud"}],select:c=>o.macosVibrancyStyle=c,isSelected:c=>o.macosVibrancyStyle===c,serialize:ns})),n(S.FormSection,{className:G.top16,title:"Vencord Notifications",tag:"h5"},n(pe,null,n(T,{onClick:kc},"Notification Settings"),n(T,{onClick:ka},"View Notification Log"))))}function fR({image:e}){return n(At,{className:Yh("card","donate")},n("div",null,n(S.FormTitle,{tag:"h5"},"Support the Project"),n(S.FormText,null,"Please consider supporting the development of Vencord by donating!"),n(ya,{style:{transform:"translateX(-1em)"}})),n("img",{role:"presentation",src:e,alt:"",height:128,style:{imageRendering:e===Db?"pixelated":void 0,marginLeft:"auto",transform:e===kb?"rotate(10deg)":void 0}}))}var Yh,kb,Db,Qa,lR,cR,uR,pR,dR,Lb,Eb=f(()=>{"use strict";a();Lc();_();Ve();yc();qc();Ze();be();qn();ft();b();Ca();Zg();Xn();Yh=Te("vc-settings-"),kb="https://cdn.discordapp.com/emojis/1026533090627174460.png",Db="https://media.discordapp.net/stickers/1039992459209490513.png",Qa=(e,t)=>()=>n(xr,{text:t},n(e,{className:Yh("quick-actions-img")})),lR=Qa($g,"Open Notification Log"),cR=Qa(Hg,"Edit QuickCSS"),uR=Qa(Gg,"Relaunch Discord"),pR=Qa(Ug,"Open Settings Directory"),dR=Qa(Na,"View Vencord's GitHub Repository");Lb=Lo(mR,"Vencord Settings")});var hs,Zh=f(()=>{"use strict";a();_();hb();bb();Tb();xb();Ib();vu();Eb();P();w();b();us();hs=h({name:"Settings",description:"Adds Settings UI and debug info",authors:[p.Ven,p.Megu],required:!0,patches:[{find:".versionHash",replacement:[{match:/\[\(0,\i\.jsxs?\)\((.{1,10}),(\{[^{}}]+\{.{0,20}.versionHash,.+?\})\)," "/,replace:(e,t,o)=>(o=o.replace(/children:\[.+\]/,""),`${e},$self.makeInfoElements(${t}, ${o})`)},{match:/copyValue:\i\.join\(" "\)/,replace:"$& + $self.getInfoString()"}]},{find:"Messages.ACTIVITY_SETTINGS",replacement:[{match:/(?<=section:(.{0,50})\.DIVIDER\}\))([,;])(?=.{0,200}(\i)\.push.{0,100}label:(\i)\.header)/,replace:(e,t,o,r,i)=>`${o} $self.addSettings(${r}, ${i}, ${t}) ${o}`},{match:/({(?=.+?function (\i).{0,120}(\i)=\i\.useMemo.{0,30}return \i\.useMemo\(\(\)=>\i\(\3).+?function\(\){return )\2(?=})/,replace:(e,t,o)=>`${t}$self.wrapSettingsHook(${o})`}]},{find:"Messages.USER_SETTINGS_ACTIONS_MENU_LABEL",replacement:{match:/(?<=function\((\i),\i\)\{)(?=let \i=Object.values\(\i.\i\).*?(\i\.\i)\.open\()/,replace:"$2.open($1);return;"}}],customSections:[],makeSettingsCategories(e){return[{section:e.HEADER,label:"Vencord",className:"vc-settings-header"},{section:"VencordSettings",label:"Vencord",element:Lb,className:"vc-settings"},{section:"VencordPlugins",label:"Plugins",element:wb,className:"vc-plugins"},{section:"VencordThemes",label:"Themes",element:Pb,className:"vc-themes"},{section:"VencordUpdater",label:"Updater",element:Rb,className:"vc-updater"},{section:"VencordCloud",label:"Cloud",element:Sb,className:"vc-cloud"},{section:"VencordSettingsSync",label:"Backup & Restore",element:gb,className:"vc-backup-restore"},!1,...this.customSections.map(t=>t(e)),{section:e.DIVIDER}].filter(Boolean)},isRightSpot({header:e,settings:t}){let o=t?.[0];if(o==="LOGOUT"||o==="SOCIAL_LINKS")return!0;let{settingsLocation:r}=j.plugins.Settings;if(r==="bottom")return o==="LOGOUT";if(r==="belowActivity")return o==="CHANGELOG";if(!e)return;let i={top:Se.Messages.USER_SETTINGS,aboveNitro:Se.Messages.BILLING_SETTINGS,belowNitro:Se.Messages.APP_SETTINGS,aboveActivity:Se.Messages.ACTIVITY_SETTINGS};return e===i[r]},patchedSettings:new WeakSet,addSettings(e,t,o){this.patchedSettings.has(e)||!this.isRightSpot(t)||(this.patchedSettings.add(e),e.push(...this.makeSettingsCategories(o)))},wrapSettingsHook(e){return(...t)=>{let o=e(...t);return this.patchedSettings.has(o)||o.unshift(...this.makeSettingsCategories({HEADER:"HEADER",DIVIDER:"DIVIDER",CUSTOM:"CUSTOM"})),o}},options:{settingsLocation:{type:4,description:"Where to put the Vencord settings section",options:[{label:"At the very top",value:"top"},{label:"Above the Nitro section",value:"aboveNitro",default:!0},{label:"Below the Nitro section",value:"belowNitro"},{label:"Above Activity Settings",value:"aboveActivity"},{label:"Below Activity Settings",value:"belowActivity"},{label:"At the very bottom",value:"bottom"}]}},get electronVersion(){return VencordNative.native.getVersions().electron||window.armcord?.electron||null},get chromiumVersion(){try{return VencordNative.native.getVersions().chrome||navigator.userAgentData?.brands?.find(e=>e.brand==="Chromium"||e.brand==="Google Chrome")?.version||null}catch{return null}},get additionalInfo(){return" (Standalone)"},getInfoRows(){let{electronVersion:e,chromiumVersion:t,additionalInfo:o}=this,r=[`Vencord ${yn}${o}`];return e&&r.push(`Electron ${e}`),t&&r.push(`Chromium ${t}`),r},getInfoString(){return`
|
|
`+this.getInfoRows().join(`
|
|
`)},makeInfoElements(e,t){return this.getInfoRows().map((o,r)=>n(e,{key:r,...t},o))}})});var Xh={};lt(Xh,{_modifyAccessories:()=>gR,accessories:()=>Su,addAccessory:()=>Ri,removeAccessory:()=>Va});function Ri(e,t,o){Su.set(e,{callback:t,position:o})}function Va(e){Su.delete(e)}function gR(e,t){for(let o of Su.values()){let r=o.callback(t);if(r!=null){if(!Array.isArray(r))r=[r];else if(r.length===0)continue;e.splice(o.position!=null?o.position<0?e.length+o.position:o.position:e.length,0,...r.filter(i=>i!=null))}}return e}var Su,el=f(()=>{"use strict";a();Su=new Map});var Qh={};lt(Qh,{UserSettings:()=>Jh,getUserSetting:()=>Ob,getUserSettingLazy:()=>jo});function Ob(e,t){if(!Vencord.Plugins.isPluginEnabled("UserSettingsAPI"))throw new Error("Cannot use UserSettingsAPI without setting as dependency.");for(let o in Jh){let r=Jh[o];if(r.userSettingsAPIGroup===e&&r.userSettingsAPIName===t)return r}}function jo(e,t){return Tt(()=>Ob(e,t))}var Jh,Fr=f(()=>{"use strict";a();Mo();ke();$();Jh=Ao(()=>{let e=wr('"textAndImages","renderSpoilers"');return e==null?new Q("UserSettingsAPI ").error("Didn't find settings module."):$t(e)})});async function Fb(){let e=await Zn();return e&&(await Br(),vo()),e}async function Ub(){let{RELEASE_CHANNEL:e}=window.GLOBAL_ENV,t=(()=>`Discord Desktop v${DiscordNative.app.getVersion()}`)(),o={Vencord:`v1.9.3 \u2022 [${yn}](<https://github.com/Vendicated/Vencord/commit/${yn}>)${hs.additionalInfo} - ${Intl.DateTimeFormat("en-GB",{dateStyle:"medium"}).format(1719685832207)}`,Client:`${e} ~ ${t}`,Platform:window.navigator.platform};o["Last Crash Reason"]=(await gc(()=>DiscordNative.processUtils.getLastCrash(),void 0))?.rendererCrashReason??"N/A";let r={"NoRPC enabled":Vencord.Plugins.isPluginEnabled("NoRPC"),"Activity Sharing disabled":gc(()=>!TR.getSetting(),!1),"Vencord DevBuild":!1,"Has UserPlugins":Object.values(ps).some(s=>s.userPlugin),"More than two weeks out of date":1719685832207<Date.now()-12096e5},i=`>>> ${Object.entries(o).map(([s,l])=>`**${s}**: ${l}`).join(`
|
|
`)}`;return i+=`
|
|
`+Object.entries(r).filter(([,s])=>s).map(([s])=>`\u26A0\uFE0F ${s}`).join(`
|
|
`),i.trim()}function $b(){let e=s=>s.endsWith("API")||et[s].required,t=Object.keys(et).filter(s=>Vencord.Plugins.isPluginEnabled(s)&&!e(s)),o=t.filter(s=>!ps[s].userPlugin),r=t.filter(s=>ps[s].userPlugin),i=`**Enabled Plugins (${o.length}):**
|
|
${Ii(o.join(", "))}`;return r.length&&(i+=`**Enabled UserPlugins (${r.length}):**
|
|
${Ii(r.join(", "))}`),i}var hR,_b,yR,vR,Bb,SR,bR,TR,wR,xR,bu,Gb=f(()=>{"use strict";a();el();_();Fr();re();Rt();ho();vu();P();pt();ke();Ze();be();qn();Xc();Cn();w();Ni();b();us();Rr();Zh();hR="1015060230222131221",_b="1017176847865352332",yR="1222936386626129920",vR=/```js\n(.+?)```/s,Bb=[hi,"1024286218801926184","1033680203433660458"],SR=["1026534353167208489","1026504932959977532","1042507929485586532"],bR=async function(){}.constructor,TR=jo("status","showCurrentGame");wR=qa(Zn),xR=A({}).withPrivateSettings(),bu=h({name:"SupportHelper",required:!0,description:"Helps us provide support to you",authors:[p.Ven],dependencies:["CommandsAPI","UserSettingsAPI","MessageAccessoriesAPI"],settings:xR,patches:[{find:".BEGINNING_DM.format",replacement:{match:/BEGINNING_DM\.format\(\{.+?\}\),(?=.{0,100}userId:(\i\.getRecipientId\(\)))/,replace:"$& $self.ContributorDmWarningCard({ userId: $1 }),"}}],commands:[{name:"vencord-debug",description:"Send Vencord debug info",predicate:e=>Fn(L.getCurrentUser()?.id)||Bb.includes(e.channel.id),execute:async()=>({content:await Ub()})},{name:"vencord-plugins",description:"Send Vencord plugin list",predicate:e=>Fn(L.getCurrentUser()?.id)||Bb.includes(e.channel.id),execute:()=>({content:$b()})}],flux:{async CHANNEL_SELECT({channelId:e}){if(e!==hi)return;let t=L.getCurrentUser()?.id;if(!t||Fn(t))return;if(await wR().catch(()=>{}),Mi)return rt.show({title:"Hold on!",body:n("div",null,n(S.FormText,null,"You are using an outdated version of Vencord! Chances are, your issue is already fixed."),n(S.FormText,{className:G.top8},"Please first update before asking for support!")),onCancel:()=>yu(),cancelText:"View Updates",confirmText:"Update & Restart Now",onConfirm:Fb,secondaryConfirmText:"I know what I'm doing or I can't update"});let o=Be.getSelfMember(hR)?.roles;!o||SR.some(r=>o.includes(r))}},ContributorDmWarningCard:k.wrap(({userId:e})=>!Fn(e)||Le.isFriend(e)||Fn(L.getCurrentUser()?.id)?null:n(At,{className:`vc-plugins-restart-card ${G.top8}`},"Please do not private message Vencord plugin developers for support!",n("br",null),"Instead, use the Vencord support channel: ",Pe.parse("https://discord.com/channels/1015060230222131221/1026515880080842772"),!te.getChannel(hi)&&" (Click the link to join)"),{noop:!0}),start(){Ri("vencord-debug",e=>{let t=[];if((e.channel.id===yR||e.channel.id===hi&&e.message.author.id===_b)&&e.message.content?.includes("update")&&t.push(n(T,{key:"vc-update",color:T.Colors.GREEN,onClick:async()=>{try{await Fb()?it("Success! Restarting...",V.Type.SUCCESS):it("Already up to date!",V.Type.MESSAGE)}catch(r){new Q(this.name).error("Error while updating:",r),it("Failed to update :(",V.Type.FAILURE)}}},"Update Now")),e.channel.id===hi&&((e.message.content.includes("/vencord-debug")||e.message.content.includes("/vencord-plugins"))&&t.push(n(T,{key:"vc-dbg",onClick:async()=>Nc(e.channel.id,{content:await Ub()})},"Run /vencord-debug"),n(T,{key:"vc-plg-list",onClick:async()=>Nc(e.channel.id,{content:$b()})},"Run /vencord-plugins")),e.message.author.id===_b)){let r=vR.exec(e.message.content||e.message.embeds[0]?.rawDescription||"");r&&t.push(n(T,{key:"vc-run-snippet",onClick:async()=>{try{await bR(r[1])(),it("Success!",V.Type.SUCCESS)}catch(i){new Q(this.name).error("Error while running snippet:",i),it("Failed to run snippet :(",V.Type.FAILURE)}}},"Run Snippet"))}return t.length?n(pe,null,t):null})}})});var Tu,Hb=f(()=>{"use strict";a();P();w();Tu=h({name:"AlwaysAnimate",description:"Animates anything that can be animated",authors:[p.FieryFlames],patches:[{find:"canAnimate:",all:!0,noWarn:!0,replacement:{match:/canAnimate:.+?([,}].*?\))/g,replace:(e,t)=>t.match(/}=.+/)==null?`canAnimate:!0${t}`:e}},{find:".Messages.GUILD_OWNER,",replacement:{match:/(?<=\.activityEmoji,.+?animate:)\i/,replace:"!0"}},{find:".animatedBannerHoverLayer,onMouseEnter:",replacement:{match:/(?<=guildBanner:\i,animate:)\i(?=}\))/,replace:"!0"}}]})});var Vh,wu,zb=f(()=>{"use strict";a();_();P();w();Vh=A({domain:{type:3,default:!0,description:"Remove the untrusted domain popup when opening links",restartNeeded:!0},file:{type:3,default:!0,description:"Remove the 'Potentially Dangerous Download' popup when opening links",restartNeeded:!0}}),wu=h({name:"AlwaysTrust",description:"Removes the annoying untrusted domain and suspicious file popup",authors:[p.zt,p.Trwy],patches:[{find:'="MaskedLinkStore",',replacement:{match:/(?<=isTrustedDomain\(\i\){)return \i\(\i\)/,replace:"return true"},predicate:()=>Vh.store.domain},{find:"bitbucket.org",replacement:{match:/function \i\(\i\){(?=.{0,60}\.parse\(\i\))/,replace:"$&return null;"},predicate:()=>Vh.store.file}],settings:Vh})});var PR,IR,MR,Ur,xu,jb=f(()=>{"use strict";a();_();re();P();w();$();PR=ye(".actionBarIcon)"),IR=C("popFirstFile","update"),MR=/\.tar\.\w+$/,Ur=A({anonymiseByDefault:{description:"Whether to anonymise file names by default",type:3,default:!0},method:{description:"Anonymising method",type:4,options:[{label:"Random Characters",value:0,default:!0},{label:"Consistent",value:1},{label:"Timestamp",value:2}]},randomisedLength:{description:"Random characters length",type:1,default:7,disabled:()=>Ur.store.method!==0},consistent:{description:"Consistent filename",type:0,default:"image",disabled:()=>Ur.store.method!==1}}),xu=h({name:"AnonymiseFileNames",authors:[p.fawn],description:"Anonymise uploaded file names",patches:[{find:"instantBatchUpload:function",replacement:{match:/uploadFiles:(\i),/,replace:"uploadFiles:(...args)=>(args[0].uploads.forEach(f=>f.filename=$self.anonymise(f)),$1(...args)),"}},{find:'addFilesTo:"message.attachments"',replacement:{match:/(\i.uploadFiles\((\i),)/,replace:"$2.forEach(f=>f.filename=$self.anonymise(f)),$1"}},{find:".Messages.ATTACHMENT_UTILITIES_SPOILER",replacement:{match:/(?<=children:\[)(?=.{10,80}tooltip:.{0,100}\i\.\i\.Messages\.ATTACHMENT_UTILITIES_SPOILER)/,replace:"arguments[0].canEdit!==false?$self.renderIcon(arguments[0]):null,"}}],settings:Ur,renderIcon:k.wrap(({upload:e,channelId:t,draftType:o})=>{let r=e.anonymise??Ur.store.anonymiseByDefault;return n(PR,{tooltip:r?"Using anonymous file name":"Using normal file name",onClick:()=>{e.anonymise=!r,IR.update(t,e.id,o,{})}},r?n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M17.06 13C15.2 13 13.64 14.33 13.24 16.1C12.29 15.69 11.42 15.8 10.76 16.09C10.35 14.31 8.79 13 6.94 13C4.77 13 3 14.79 3 17C3 19.21 4.77 21 6.94 21C9 21 10.68 19.38 10.84 17.32C11.18 17.08 12.07 16.63 13.16 17.34C13.34 19.39 15 21 17.06 21C19.23 21 21 19.21 21 17C21 14.79 19.23 13 17.06 13M6.94 19.86C5.38 19.86 4.13 18.58 4.13 17S5.39 14.14 6.94 14.14C8.5 14.14 9.75 15.42 9.75 17S8.5 19.86 6.94 19.86M17.06 19.86C15.5 19.86 14.25 18.58 14.25 17S15.5 14.14 17.06 14.14C18.62 14.14 19.88 15.42 19.88 17S18.61 19.86 17.06 19.86M22 10.5H2V12H22V10.5M15.53 2.63C15.31 2.14 14.75 1.88 14.22 2.05L12 2.79L9.77 2.05L9.72 2.04C9.19 1.89 8.63 2.17 8.43 2.68L6 9H18L15.56 2.68L15.53 2.63Z"})):n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{transform:"scale(-1,1)"}},n("path",{fill:"currentColor",d:"M22.11 21.46L2.39 1.73L1.11 3L6.31 8.2L6 9H7.11L8.61 10.5H2V12H10.11L13.5 15.37C13.38 15.61 13.3 15.85 13.24 16.1C12.29 15.69 11.41 15.8 10.76 16.09C10.35 14.31 8.79 13 6.94 13C4.77 13 3 14.79 3 17C3 19.21 4.77 21 6.94 21C9 21 10.68 19.38 10.84 17.32C11.18 17.08 12.07 16.63 13.16 17.34C13.34 19.39 15 21 17.06 21C17.66 21 18.22 20.86 18.72 20.61L20.84 22.73L22.11 21.46M6.94 19.86C5.38 19.86 4.13 18.58 4.13 17C4.13 15.42 5.39 14.14 6.94 14.14C8.5 14.14 9.75 15.42 9.75 17C9.75 18.58 8.5 19.86 6.94 19.86M17.06 19.86C15.5 19.86 14.25 18.58 14.25 17C14.25 16.74 14.29 16.5 14.36 16.25L17.84 19.73C17.59 19.81 17.34 19.86 17.06 19.86M22 12H15.2L13.7 10.5H22V12M17.06 13C19.23 13 21 14.79 21 17C21 17.25 20.97 17.5 20.93 17.73L19.84 16.64C19.68 15.34 18.66 14.32 17.38 14.17L16.29 13.09C16.54 13.03 16.8 13 17.06 13M12.2 9L7.72 4.5L8.43 2.68C8.63 2.17 9.19 1.89 9.72 2.04L9.77 2.05L12 2.79L14.22 2.05C14.75 1.88 15.32 2.14 15.54 2.63L15.56 2.68L18 9H12.2Z"})))},{noop:!0}),anonymise(e){if((e.anonymise??Ur.store.anonymiseByDefault)===!1)return e.filename;let t=e.filename,r=MR.exec(t)?.index??t.lastIndexOf("."),i=r!==-1?t.slice(r):"";switch(Ur.store.method){case 0:let s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";return Array.from({length:Ur.store.randomisedLength},()=>s[Math.floor(Math.random()*s.length)]).join("")+i;case 1:return Ur.store.consistent+i;case 2:return Date.now()+i}}})});function NR(e){F.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e,socketId:"AppleMusic"})}function tl(e,t){return e.replaceAll("{name}",t.name).replaceAll("{album}",t.album).replaceAll("{artist}",t.artist)}function Wb(e,t){let o=e==="Album"?t.albumArtwork:t.artistArtwork;if(!!o)return fi.fetchAssetIds(qb,[o]).then(r=>r[0])}var AR,qb,Eo,Pu,Kb=f(()=>{"use strict";a();_();P();w();b();AR=VencordNative.pluginHelpers.AppleMusicRichPresence,qb="1239490006054207550";Eo=A({activityType:{type:4,description:"Which type of activity",options:[{label:"Playing",value:0,default:!0},{label:"Listening",value:2}]},refreshInterval:{type:5,description:"The interval between activity refreshes (seconds)",markers:[1,2,2.5,3,5,10,15],default:5,restartNeeded:!0},enableTimestamps:{type:3,description:"Whether or not to enable timestamps",default:!0},enableButtons:{type:3,description:"Whether or not to enable buttons",default:!0},nameString:{type:0,description:"Activity name format string",default:"Apple Music"},detailsString:{type:0,description:"Activity details format string",default:"{name}"},stateString:{type:0,description:"Activity state format string",default:"{artist}"},largeImageType:{type:4,description:"Activity assets large image type",options:[{label:"Album artwork",value:"Album",default:!0},{label:"Artist artwork",value:"Artist"},{label:"Disabled",value:"Disabled"}]},largeTextString:{type:0,description:"Activity assets large text format string",default:"{album}"},smallImageType:{type:4,description:"Activity assets small image type",options:[{label:"Album artwork",value:"Album"},{label:"Artist artwork",value:"Artist",default:!0},{label:"Disabled",value:"Disabled"}]},smallTextString:{type:0,description:"Activity assets small text format string",default:"{artist}"}});Pu=h({name:"AppleMusicRichPresence",description:"Discord rich presence for your Apple Music!",authors:[p.RyanCaoDev],hidden:!navigator.platform.startsWith("Mac"),reporterTestable:2,settingsAboutComponent(){return n(d,null,n(S.FormText,null,"For the customizable activity format strings, you can use several special strings to include track data in activities!"," ",n("code",null,"{name}")," is replaced with the track name; ",n("code",null,"{artist}")," is replaced with the artist(s)' name(s); and ",n("code",null,"{album}")," is replaced with the album name."))},settings:Eo,start(){this.updatePresence(),this.updateInterval=setInterval(()=>{this.updatePresence()},Eo.store.refreshInterval*1e3)},stop(){clearInterval(this.updateInterval),F.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:null})},updatePresence(){this.getActivity().then(e=>{NR(e)})},async getActivity(){let e=await AR.fetchTrackData();if(!e)return null;let[t,o]=await Promise.all([Wb(Eo.store.largeImageType,e),Wb(Eo.store.smallImageType,e)]),r={};Eo.store.largeImageType!=="Disabled"&&(r.large_image=t,r.large_text=tl(Eo.store.largeTextString,e)),Eo.store.smallImageType!=="Disabled"&&(r.small_image=o,r.small_text=tl(Eo.store.smallTextString,e));let i=[];return Eo.store.enableButtons&&(e.appleMusicLink&&i.push({label:"Listen on Apple Music",url:e.appleMusicLink}),e.songLink&&i.push({label:"View on SongLink",url:e.songLink})),{application_id:qb,name:tl(Eo.store.nameString,e),details:tl(Eo.store.detailsString,e),state:tl(Eo.store.stateString,e),timestamps:Eo.store.enableTimestamps?{start:Date.now()-e.playerPosition*1e3,end:Date.now()-e.playerPosition*1e3+e.duration*1e3}:void 0,assets:r,buttons:i.length?i.map(s=>s.label):void 0,metadata:{button_urls:i.map(s=>s.url)||void 0},type:Eo.store.activityType,flags:1}}})});function RR(e,t){let o=te.getChannel(e)?.guild_id;CR({guildId:o,channelId:e,messageId:t,jumpType:"INSTANT"})}function kR(e){let{embeds:[t]}=e,o=t.fields.find(({rawName:r})=>r==="channel_id");return o?o.rawValue:null}var CR,Iu,Yb=f(()=>{"use strict";a();re();P();w();$();b();({selectChannel:CR}=C("selectChannel","selectVoiceChannel"));Iu=h({name:"AutomodContext",description:"Allows you to jump to the messages surrounding an automod hit.",authors:[p.JohnyTheCarrot],patches:[{find:".Messages.GUILD_AUTOMOD_REPORT_ISSUES",replacement:{match:/\.Messages\.ACTIONS.+?}\)(?=,(\(0.{0,40}\.dot.*?}\)),)/,replace:(e,t)=>`${e},${t},$self.renderJumpButton({message:arguments[0].message})`}}],renderJumpButton:k.wrap(({message:e})=>{let t=kR(e);return t?n(T,{style:{padding:"2px 8px"},look:T.Looks.LINK,size:T.Sizes.SMALL,color:T.Colors.LINK,onClick:()=>RR(t,e.id)},n(Z,{color:"text-link",variant:"text-xs/normal"},"Jump to Surrounding")):null},{noop:!0})})});var Mu,Zb=f(()=>{"use strict";a();P();w();Mu=h({name:"BANger",description:"Replaces the GIF in the ban dialogue with a custom one.",authors:[p.Xinto,p.Glitch],patches:[{find:"BAN_CONFIRM_TITLE.",replacement:{match:/src:\i\("?\d+"?\)/g,replace:"src: Vencord.Settings.plugins.BANger.source"}}],options:{source:{description:"Source to replace ban GIF with (Video or Gif)",type:0,default:"https://i.imgur.com/wp5q52C.mp4",restartNeeded:!0}}})});var Xb,Jb,DR,Qb,Vb=f(()=>{"use strict";a();re();$();b();e1();Xb=me("ChannelRTCStore"),Jb=C("a","animated","useTransition"),DR=ve('("guildsnav")'),Qb=k.wrap(e=>{let t=Fe([ys],()=>ys.getExpandedFolders()),o=Fe([Xb],()=>Xb.isFullscreenInContext()),r=n(DR,{...e,isBetterFolders:!0,betterFoldersExpandedIds:t}),i=!!t.size,s=document.querySelector(e.className.split(" ").map(u=>`.${u}`).join("")),l={display:o?"none":"flex"};return!s||!Bt.store.sidebarAnim?i?n("div",{style:l},r):null:n(Jb.Transition,{items:i,from:{width:0},enter:{width:s.getBoundingClientRect().width},leave:{width:0},config:{duration:200}},(u,c)=>c&&n(Jb.animated.div,{style:{...u,...l}},r))},{noop:!0})});function OR(e){return ER.getGuildFolders().find(t=>t.guildIds.includes(e))}function t2(){for(let e of ys.getExpandedFolders())o1.toggleGuildFolderExpand(e)}var LR,ER,ys,o1,e2,t1,Bt,Au,e1=f(()=>{"use strict";a();_();P();w();$();b();Vb();LR=Qe(e=>e.prototype?.moveNextTo),ER=me("SortedGuildStore"),ys=me("ExpandedGuildFolderStore"),o1=C("move","toggleGuildFolderExpand"),e2=null,t1=!1;Bt=A({sidebar:{type:3,description:"Display servers from folder on dedicated sidebar",restartNeeded:!0,default:!0},sidebarAnim:{type:3,description:"Animate opening the folder sidebar",default:!0},closeAllFolders:{type:3,description:"Close all folders when selecting a server not in a folder",default:!1},closeAllHomeButton:{type:3,description:"Close all folders when clicking on the home button",restartNeeded:!0,default:!1},closeOthers:{type:3,description:"Close other folders when opening a folder",default:!1},forceOpen:{type:3,description:"Force a folder to open when switching to a server of that folder",default:!1},keepIcons:{type:3,description:"Keep showing guild icons in the primary guild bar folder when it's open in the BetterFolders sidebar",restartNeeded:!0,default:!1},showFolderIcon:{type:4,description:"Show the folder icon above the folder guilds in the BetterFolders sidebar",options:[{label:"Never",value:0},{label:"Always",value:1,default:!0},{label:"When more than one folder is expanded",value:2}],restartNeeded:!0}}),Au=h({name:"BetterFolders",description:"Shows server folders on dedicated sidebar and adds folder related improvements",authors:[p.juby,p.AutumnVN,p.Nuckyz],settings:Bt,patches:[{find:'("guildsnav")',predicate:()=>Bt.store.sidebar,replacement:[{match:/let{disableAppDownload:\i=\i\.isPlatformEmbedded,isOverlay:.+?(?=}=\i,)/,replace:"$&,isBetterFolders"},{match:/\[(\i)\]=(\(0,\i\.\i\).{0,40}getGuildsTree\(\).+?}\))(?=,)/,replace:(e,t,o)=>`[betterFoldersOriginalTree]=${o},${t}=$self.getGuildTree(!!arguments[0].isBetterFolders,betterFoldersOriginalTree,arguments[0].betterFoldersExpandedIds)`},{match:/lastTargetNode:\i\[\i\.length-1\].+?Fragment.+?\]}\)\]/,replace:"$&.filter($self.makeGuildsBarGuildListFilter(!!arguments[0].isBetterFolders))"},{match:/unreadMentionsIndicatorBottom,.+?}\)\]/,replace:"$&.filter($self.makeGuildsBarTreeFilter(!!arguments[0].isBetterFolders))"},{match:/(?<=\.Messages\.SERVERS.+?switch\((\i)\.type\){case \i\.\i\.FOLDER:.+?folderNode:\i,)/,replace:'isBetterFolders:typeof isBetterFolders!=="undefined"?isBetterFolders:false,'}]},{find:".toggleGuildFolderExpand(",predicate:()=>Bt.store.sidebar&&Bt.store.showFolderIcon!==1,replacement:[{match:/(\],\(\)=>)(\i\.\i)\.isFolderExpanded\(\i\)\)/,replace:(e,t,o)=>`${t}${o}.getExpandedFolders())`},{match:/(?<=folderNode:(\i),expanded:)\i(?=,)/,replace:(e,t)=>`typeof ${e}==="boolean"?${e}:${e}.has(${t}.id),betterFoldersExpandedIds:${e} instanceof Set?${e}:void 0`}]},{find:".FOLDER_ITEM_GUILD_ICON_MARGIN);",predicate:()=>Bt.store.sidebar,replacement:[{predicate:()=>Bt.store.keepIcons,match:/(?<=let{folderNode:\i,setNodeRef:\i,.+?expanded:(\i),.+?;)(?=let)/,replace:(e,t)=>`${t}=!!arguments[0].isBetterFolders&&${t};`},{predicate:()=>!Bt.store.keepIcons,match:/(?<=\.Messages\.SERVER_FOLDER_PLACEHOLDER.+?useTransition\)\()/,replace:"!!arguments[0].isBetterFolders&&"},{predicate:()=>!Bt.store.keepIcons,match:/expandedFolderBackground,.+?,(?=\i\(\(\i,\i,\i\)=>{let{key.{0,45}ul)(?<=selected:\i,expanded:(\i),.+?)/,replace:(e,t)=>`${e}!arguments[0].isBetterFolders&&${t}?null:`},{predicate:()=>Bt.store.showFolderIcon!==1,match:/(?<=\.wrapper,children:\[)/,replace:"$self.shouldShowFolderIconAndBackground(!!arguments[0].isBetterFolders,arguments[0].betterFoldersExpandedIds)&&"},{predicate:()=>Bt.store.showFolderIcon!==1,match:/(?<=\.expandedFolderBackground.+?}\),)(?=\i,)/,replace:"!$self.shouldShowFolderIconAndBackground(!!arguments[0].isBetterFolders,arguments[0].betterFoldersExpandedIds)?null:"}]},{find:"APPLICATION_LIBRARY,render:",predicate:()=>Bt.store.sidebar,replacement:{match:/(?<=({className:\i\.guilds,themeOverride:\i})\))/,replace:",$self.FolderSideBar($1)"}},{find:".Messages.DISCODO_DISABLED",predicate:()=>Bt.store.closeAllHomeButton,replacement:{match:/(?<=onClick:\(\)=>{)(?=.{0,300}"discodo")/,replace:"$self.closeFolders();"}}],flux:{CHANNEL_SELECT(e){if(!(!Bt.store.closeAllFolders&&!Bt.store.forceOpen)&&e2!==e.guildId){e2=e.guildId;let t=OR(e.guildId);t?.folderId?Bt.store.forceOpen&&!ys.isFolderExpanded(t.folderId)&&o1.toggleGuildFolderExpand(t.folderId):Bt.store.closeAllFolders&&t2()}},TOGGLE_GUILD_FOLDER_EXPAND(e){Bt.store.closeOthers&&!t1&&(t1=!0,F.wait(()=>{let t=ys.getExpandedFolders();if(t.size>1)for(let o of t)o!==e.folderId&&o1.toggleGuildFolderExpand(o);t1=!1}))}},getGuildTree(e,t,o){return wt(()=>{if(!e||o==null)return t;let r=new LR;return r.root.children=t.root.children.filter(i=>o.has(i.id)),r.nodes=Object.fromEntries(Object.entries(t.nodes).filter(([i,s])=>o.has(s.id)||o.has(s.parentId))),r},[e,t,o])},makeGuildsBarGuildListFilter(e){return t=>e?t?.props?.["aria-label"]===Se.Messages.SERVERS:!0},makeGuildsBarTreeFilter(e){return t=>e?t?.props?.onScroll!=null:!0},shouldShowFolderIconAndBackground(e,t){if(!e)return!0;switch(Bt.store.showFolderIcon){case 0:return!1;case 1:return!0;case 2:return(t?.size??0)>1;default:return!0}},FolderSideBar:e=>n(Qb,{...e}),closeFolders:t2})});var Nu,o2=f(()=>{"use strict";a();P();w();Nu=h({name:"BetterGifAltText",authors:[p.Ven],description:"Change GIF alt text from simply being 'GIF' to containing the gif tags / filename",patches:[{find:'"onCloseImage",',replacement:{match:/(return.{0,10}\.jsx.{0,50}isWindowFocused)/,replace:"$self.altify(e);$1"}},{find:".Messages.GIF,",replacement:{match:/alt:(\i)=(\i\.\i\.Messages\.GIF)(?=,[^}]*\}=(\i))/,replace:"alt_$$:$1=$self.altify($3)||$2"}}],altify(e){if(e.alt??="GIF",e.alt!=="GIF")return e.alt;let t=e.original||e.src;try{t=decodeURI(t)}catch{}let o=t.slice(t.lastIndexOf("/")+1).replace(/\d/g,"").replace(/.gif$/,"").split(/[,\-_ ]+/g).slice(0,20).join(" ");return o.length>300&&(o=o.slice(0,300)+"..."),o&&(e.alt+=` - ${o}`),e.alt}})});var Cu,n2=f(()=>{"use strict";a();P();w();Cu=h({name:"BetterGifPicker",description:"Makes the gif picker open the favourite category by default",authors:[p.Samwich],patches:[{find:'"state",{resultType:',replacement:[{match:/(?<="state",{resultType:)null/,replace:'"Favorites"'}]}]})});var _R,Ru,r2=f(()=>{"use strict";a();_();re();P();Ko();w();$();_R=C("section","lastSection"),Ru=h({name:"BetterNotesBox",description:"Hide notes or disable spellcheck (Configure in settings!!)",authors:[p.Ven],patches:[{find:"hideNote:",all:!0,noWarn:!0,predicate:()=>Vencord.Settings.plugins.BetterNotesBox.hide,replacement:{match:/hideNote:.+?(?=([,}].*?\)))/g,replace:(e,t)=>{if(t.match(/}=.+/)){let r=e.match(Kt(/hideNote:(\i)=!?\d/));return r?`hideNote:${r[1]}=!0`:e}return"hideNote:!0"}}},{find:"Messages.NOTE_PLACEHOLDER",replacement:{match:/\.NOTE_PLACEHOLDER,/,replace:"$&spellCheck:!Vencord.Settings.plugins.BetterNotesBox.noSpellCheck,"}},{find:".popularApplicationCommandIds,",replacement:{match:/lastSection:(!?\i)}\),/,replace:"$&$self.patchPadding({lastSection:$1}),"}}],options:{hide:{type:3,description:"Hide notes",default:!1,restartNeeded:!0},noSpellCheck:{type:3,description:"Disable spellcheck in notes",disabled:()=>j.plugins.BetterNotesBox.hide,default:!1}},patchPadding:k.wrap(({lastSection:e})=>e?n("div",{className:_R.lastSection}):null)})});function FR(){return n("svg",{role:"img",width:"18",height:"18",fill:"none",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"m13.96 5.46 4.58 4.58a1 1 0 0 0 1.42 0l1.38-1.38a2 2 0 0 0 0-2.82l-3.18-3.18a2 2 0 0 0-2.82 0l-1.38 1.38a1 1 0 0 0 0 1.42ZM2.11 20.16l.73-4.22a3 3 0 0 1 .83-1.61l7.87-7.87a1 1 0 0 1 1.42 0l4.58 4.58a1 1 0 0 1 0 1.42l-7.87 7.87a3 3 0 0 1-1.6.83l-4.23.73a1.5 1.5 0 0 1-1.73-1.73Z"}))}function UR(){return n("svg",{width:"18",height:"18",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M 12,0 C 5.3733333,0 0,5.3733333 0,12 c 0,6.626667 5.3733333,12 12,12 1.106667,0 2,-0.893333 2,-2 0,-0.52 -0.2,-0.986667 -0.52,-1.346667 -0.306667,-0.346666 -0.506667,-0.813333 -0.506667,-1.32 0,-1.106666 0.893334,-2 2,-2 h 2.36 C 21.013333,17.333333 24,14.346667 24,10.666667 24,4.7733333 18.626667,0 12,0 Z M 4.6666667,12 c -1.1066667,0 -2,-0.893333 -2,-2 0,-1.1066667 0.8933333,-2 2,-2 1.1066666,0 2,0.8933333 2,2 0,1.106667 -0.8933334,2 -2,2 z M 8.666667,6.6666667 c -1.106667,0 -2.0000003,-0.8933334 -2.0000003,-2 0,-1.1066667 0.8933333,-2 2.0000003,-2 1.106666,0 2,0.8933333 2,2 0,1.1066666 -0.893334,2 -2,2 z m 6.666666,0 c -1.106666,0 -2,-0.8933334 -2,-2 0,-1.1066667 0.893334,-2 2,-2 1.106667,0 2,0.8933333 2,2 0,1.1066666 -0.893333,2 -2,2 z m 4,5.3333333 c -1.106666,0 -2,-0.893333 -2,-2 0,-1.1066667 0.893334,-2 2,-2 1.106667,0 2,0.8933333 2,2 0,1.106667 -0.893333,2 -2,2 z"}))}var i2,BR,s2,ku,a2=f(()=>{"use strict";a();_();Fr();bt();P();pt();w();$();b();i2=C("open","selectRole","updateGuild"),BR=jo("appearance","developerMode");s2=A({roleIconFileFormat:{type:4,description:"File format to use when viewing role icons",options:[{label:"png",value:"png",default:!0},{label:"webp",value:"webp"},{label:"jpg",value:"jpg"}]}}),ku=h({name:"BetterRoleContext",description:"Adds options to copy role color / edit role / view role icon when right clicking roles in the user profile",authors:[p.Ven,p.goodbee],dependencies:["UserSettingsAPI"],settings:s2,start(){BR.updateSetting(!0)},contextMenus:{"dev-context"(e,{id:t}){let o=wi();if(!o)return;let r=se.getRole(o.id,t);!r||(r.colorString&&e.push(n(E.MenuItem,{id:"vc-copy-role-color",label:"Copy Role Color",action:()=>Et.copy(r.colorString),icon:UR})),r.icon&&e.push(n(E.MenuItem,{id:"vc-view-role-icon",label:"View Role Icon",action:()=>{Go(`${location.protocol}//${window.GLOBAL_ENV.CDN_HOST}/role-icons/${r.id}/${r.icon}.${s2.store.roleIconFileFormat}`)},icon:dn})),We.getGuildPermissionProps(o).canManageRoles&&e.push(n(E.MenuItem,{id:"vc-edit-role",label:"Edit Role",action:async()=>{await i2.open(o.id,"ROLES"),i2.selectRole(t)},icon:FR})))}}})});var Du,l2=f(()=>{"use strict";a();_();P();w();b();Du=h({name:"BetterRoleDot",authors:[p.Ven,p.AutumnVN],description:"Copy role colour on RoleDot (accessibility setting) click. Also allows using both RoleDot and coloured names simultaneously",patches:[{find:".dotBorderBase",replacement:{match:/,viewBox:"0 0 20 20"/,replace:"$&,onClick:()=>$self.copyToClipBoard(arguments[0].color),style:{cursor:'pointer'}"}},{find:'"dot"===',all:!0,noWarn:!0,predicate:()=>j.plugins.BetterRoleDot.bothStyles,replacement:{match:/"(?:username|dot)"===\i(?!\.\i)/g,replace:"true"}},{find:".ADD_ROLE_A11Y_LABEL",all:!0,predicate:()=>j.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!j.plugins.BetterRoleDot.bothStyles,noWarn:!0,replacement:{match:/"dot"===\i/,replace:"true"}},{find:".roleVerifiedIcon",all:!0,predicate:()=>j.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!j.plugins.BetterRoleDot.bothStyles,noWarn:!0,replacement:{match:/"dot"===\i/,replace:"true"}}],options:{bothStyles:{type:3,description:"Show both role dot and coloured names",restartNeeded:!0,default:!1},copyRoleColorInProfilePopout:{type:3,description:"Allow click on role dot in profile popout to copy role color",restartNeeded:!0,default:!1}},copyToClipBoard(e){Et.copy(e),V.show({message:"Copied to Clipboard!",type:V.Type.SUCCESS,id:V.genId(),options:{duration:1e3,position:V.Position.BOTTOM}})}})});var c2,u2,p2,d2,m2,f2,g2,h2,y2,v2=f(()=>{"use strict";a();ft();$();c2=e=>n("svg",{...e,fill:"currentColor",viewBox:"0 0 16 16"},n("path",{d:"M13.545 2.907a13.227 13.227 0 0 0-3.257-1.011.05.05 0 0 0-.052.025c-.141.25-.297.577-.406.833a12.19 12.19 0 0 0-3.658 0 8.258 8.258 0 0 0-.412-.833.051.051 0 0 0-.052-.025c-1.125.194-2.22.534-3.257 1.011a.041.041 0 0 0-.021.018C.356 6.024-.213 9.047.066 12.032c.001.014.01.028.021.037a13.276 13.276 0 0 0 3.995 2.02.05.05 0 0 0 .056-.019c.308-.42.582-.863.818-1.329a.05.05 0 0 0-.01-.059.051.051 0 0 0-.018-.011 8.875 8.875 0 0 1-1.248-.595.05.05 0 0 1-.02-.066.051.051 0 0 1 .015-.019c.084-.063.168-.129.248-.195a.05.05 0 0 1 .051-.007c2.619 1.196 5.454 1.196 8.041 0a.052.052 0 0 1 .053.007c.08.066.164.132.248.195a.051.051 0 0 1-.004.085 8.254 8.254 0 0 1-1.249.594.05.05 0 0 0-.03.03.052.052 0 0 0 .003.041c.24.465.515.909.817 1.329a.05.05 0 0 0 .056.019 13.235 13.235 0 0 0 4.001-2.02.049.049 0 0 0 .021-.037c.334-3.451-.559-6.449-2.366-9.106a.034.034 0 0 0-.02-.019Zm-8.198 7.307c-.789 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.45.73 1.438 1.613 0 .888-.637 1.612-1.438 1.612Zm5.316 0c-.788 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.451.73 1.438 1.613 0 .888-.631 1.612-1.438 1.612Z"})),u2=e=>n("svg",{...e,fill:"currentColor",viewBox:"0 0 512 512"},n("path",{d:"M188.8,255.93A67.2,67.2,0,1,0,256,188.75,67.38,67.38,0,0,0,188.8,255.93Z"}),n("path",{d:"M476.75,217.79s0,0,0,.05a206.63,206.63,0,0,0-7-28.84h-.11a202.16,202.16,0,0,1,7.07,29h0a203.5,203.5,0,0,0-7.07-29H314.24c19.05,17,31.36,40.17,31.36,67.05a86.55,86.55,0,0,1-12.31,44.73L231,478.45a2.44,2.44,0,0,1,0,.27V479h0v-.26A224,224,0,0,0,256,480c6.84,0,13.61-.39,20.3-1a222.91,222.91,0,0,0,29.78-4.74C405.68,451.52,480,362.4,480,255.94A225.25,225.25,0,0,0,476.75,217.79Z"}),n("path",{d:"M256,345.5c-33.6,0-61.6-17.91-77.29-44.79L76,123.05l-.14-.24A224,224,0,0,0,207.4,474.55l0-.05,77.69-134.6A84.13,84.13,0,0,1,256,345.5Z"}),n("path",{d:"M91.29,104.57l77.35,133.25A89.19,89.19,0,0,1,256,166H461.17a246.51,246.51,0,0,0-25.78-43.94l.12.08A245.26,245.26,0,0,1,461.17,166h.17a245.91,245.91,0,0,0-25.66-44,2.63,2.63,0,0,1-.35-.26A223.93,223.93,0,0,0,91.14,104.34l.14.24Z"})),p2=e=>n("svg",{...e,fill:"currentColor",viewBox:"0 0 24 24"},n("path",{d:"M21.86 17.86q.14 0 .25.12.1.13.1.25t-.11.33l-.32.46-.43.53-.44.5q-.21.25-.38.42l-.22.23q-.58.53-1.34 1.04-.76.51-1.6.91-.86.4-1.74.64t-1.67.24q-.9 0-1.69-.28-.8-.28-1.48-.78-.68-.5-1.22-1.17-.53-.66-.92-1.44-.38-.77-.58-1.6-.2-.83-.2-1.67 0-1 .32-1.96.33-.97.87-1.8.14.95.55 1.77.41.82 1.02 1.5.6.68 1.38 1.21.78.54 1.64.9.86.36 1.77.56.92.2 1.8.2 1.12 0 2.18-.24 1.06-.23 2.06-.72l.2-.1.2-.05zm-15.5-1.27q0 1.1.27 2.15.27 1.06.78 2.03.51.96 1.24 1.77.74.82 1.66 1.4-1.47-.2-2.8-.74-1.33-.55-2.48-1.37-1.15-.83-2.08-1.9-.92-1.07-1.58-2.33T.36 14.94Q0 13.54 0 12.06q0-.81.32-1.49.31-.68.83-1.23.53-.55 1.2-.96.66-.4 1.35-.66.74-.27 1.5-.39.78-.12 1.55-.12.7 0 1.42.1.72.12 1.4.35.68.23 1.32.57.63.35 1.16.83-.35 0-.7.07-.33.07-.65.23v-.02q-.63.28-1.2.74-.57.46-1.05 1.04-.48.58-.87 1.26-.38.67-.65 1.39-.27.71-.42 1.44-.15.72-.15 1.38zM11.96.06q1.7 0 3.33.39 1.63.38 3.07 1.15 1.43.77 2.62 1.93 1.18 1.16 1.98 2.7.49.94.76 1.96.28 1 .28 2.08 0 .89-.23 1.7-.24.8-.69 1.48-.45.68-1.1 1.22-.64.53-1.45.88-.54.24-1.11.36-.58.13-1.16.13-.42 0-.97-.03-.54-.03-1.1-.12-.55-.1-1.05-.28-.5-.19-.84-.5-.12-.09-.23-.24-.1-.16-.1-.33 0-.15.16-.35.16-.2.35-.5.2-.28.36-.68.16-.4.16-.95 0-1.06-.4-1.96-.4-.91-1.06-1.64-.66-.74-1.52-1.28-.86-.55-1.79-.89-.84-.3-1.72-.44-.87-.14-1.76-.14-1.55 0-3.06.45T.94 7.55q.71-1.74 1.81-3.13 1.1-1.38 2.52-2.35Q6.68 1.1 8.37.58q1.7-.52 3.58-.52Z"})),d2=e=>n("svg",{...e,fill:"currentColor",viewBox:"0 0 512 512"},n("path",{d:"M130.22 127.548C130.38 127.558 130.3 127.558 130.22 127.548V127.548ZM481.64 172.898C471.03 147.398 449.56 119.898 432.7 111.168C446.42 138.058 454.37 165.048 457.4 185.168C457.405 185.306 457.422 185.443 457.45 185.578C429.87 116.828 383.098 89.1089 344.9 28.7479C329.908 5.05792 333.976 3.51792 331.82 4.08792L331.7 4.15792C284.99 30.1109 256.365 82.5289 249.12 126.898C232.503 127.771 216.219 131.895 201.19 139.035C199.838 139.649 198.736 140.706 198.066 142.031C197.396 143.356 197.199 144.87 197.506 146.323C197.7 147.162 198.068 147.951 198.586 148.639C199.103 149.327 199.76 149.899 200.512 150.318C201.264 150.737 202.096 150.993 202.954 151.071C203.811 151.148 204.676 151.045 205.491 150.768L206.011 150.558C221.511 143.255 238.408 139.393 255.541 139.238C318.369 138.669 352.698 183.262 363.161 201.528C350.161 192.378 326.811 183.338 304.341 187.248C392.081 231.108 368.541 381.784 246.951 376.448C187.487 373.838 149.881 325.467 146.421 285.648C146.421 285.648 157.671 243.698 227.041 243.698C234.541 243.698 255.971 222.778 256.371 216.698C256.281 214.698 213.836 197.822 197.281 181.518C188.434 172.805 184.229 168.611 180.511 165.458C178.499 163.75 176.392 162.158 174.201 160.688C168.638 141.231 168.399 120.638 173.51 101.058C148.45 112.468 128.96 130.508 114.8 146.428H114.68C105.01 134.178 105.68 93.7779 106.25 85.3479C106.13 84.8179 99.022 89.0159 98.1 89.6579C89.5342 95.7103 81.5528 102.55 74.26 110.088C57.969 126.688 30.128 160.242 18.76 211.318C14.224 231.701 12 255.739 12 263.618C12 398.318 121.21 507.508 255.92 507.508C376.56 507.508 478.939 420.281 496.35 304.888C507.922 228.192 481.64 173.82 481.64 172.898Z"})),m2=e=>n("svg",{...e,fill:"currentColor",viewBox:"0 0 512 512"},n("path",{d:"M483.049 159.706c10.855-24.575 21.424-60.438 21.424-87.871 0-72.722-79.641-98.371-209.673-38.577-107.632-7.181-211.221 73.67-237.098 186.457 30.852-34.862 78.271-82.298 121.977-101.158C125.404 166.85 79.128 228.002 43.992 291.725 23.246 329.651 0 390.94 0 436.747c0 98.575 92.854 86.5 180.251 42.006 31.423 15.43 66.559 15.573 101.695 15.573 97.124 0 184.249-54.294 216.814-146.022H377.927c-52.509 88.593-196.819 52.996-196.819-47.436H509.9c6.407-43.581-1.655-95.715-26.851-141.162zM64.559 346.877c17.711 51.15 53.703 95.871 100.266 123.304-88.741 48.94-173.267 29.096-100.266-123.304zm115.977-108.873c2-55.151 50.276-94.871 103.98-94.871 53.418 0 101.981 39.72 103.981 94.871H180.536zm184.536-187.6c21.425-10.287 48.563-22.003 72.558-22.003 31.422 0 54.274 21.717 54.274 53.722 0 20.003-7.427 49.007-14.569 67.867-26.28-42.292-65.986-81.584-112.263-99.586z"})),f2=e=>n("svg",{...e,fill:"currentColor",viewBox:"0 0 496 512"},n("path",{d:"M313.9 32.7c-170.2 0-252.6 223.8-147.5 355.1 36.5 45.4 88.6 75.6 147.5 75.6 36.3 0 70.3-11.1 99.4-30.4-43.8 39.2-101.9 63-165.3 63-3.9 0-8 0-11.9-.3C104.6 489.6 0 381.1 0 248 0 111 111 0 248 0h.8c63.1.3 120.7 24.1 164.4 63.1-29-19.4-63.1-30.4-99.3-30.4zm101.8 397.7c-40.9 24.7-90.7 23.6-132-5.8 56.2-20.5 97.7-91.6 97.7-176.6 0-84.7-41.2-155.8-97.4-176.6 41.8-29.2 91.2-30.3 132.9-5 105.9 98.7 105.5 265.7-1.2 364z"})),g2=e=>n("svg",{...e,fill:"currentColor",viewBox:"0 0 512 512"},n("path",{d:"M274.69,274.69l-37.38-37.38L166,346ZM256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8ZM411.85,182.79l14.78-6.13A8,8,0,0,1,437.08,181h0a8,8,0,0,1-4.33,10.46L418,197.57a8,8,0,0,1-10.45-4.33h0A8,8,0,0,1,411.85,182.79ZM314.43,94l6.12-14.78A8,8,0,0,1,331,74.92h0a8,8,0,0,1,4.33,10.45l-6.13,14.78a8,8,0,0,1-10.45,4.33h0A8,8,0,0,1,314.43,94ZM256,60h0a8,8,0,0,1,8,8V84a8,8,0,0,1-8,8h0a8,8,0,0,1-8-8V68A8,8,0,0,1,256,60ZM181,74.92a8,8,0,0,1,10.46,4.33L197.57,94a8,8,0,1,1-14.78,6.12l-6.13-14.78A8,8,0,0,1,181,74.92Zm-63.58,42.49h0a8,8,0,0,1,11.31,0L140,128.72A8,8,0,0,1,140,140h0a8,8,0,0,1-11.31,0l-11.31-11.31A8,8,0,0,1,117.41,117.41ZM60,256h0a8,8,0,0,1,8-8H84a8,8,0,0,1,8,8h0a8,8,0,0,1-8,8H68A8,8,0,0,1,60,256Zm40.15,73.21-14.78,6.13A8,8,0,0,1,74.92,331h0a8,8,0,0,1,4.33-10.46L94,314.43a8,8,0,0,1,10.45,4.33h0A8,8,0,0,1,100.15,329.21Zm4.33-136h0A8,8,0,0,1,94,197.57l-14.78-6.12A8,8,0,0,1,74.92,181h0a8,8,0,0,1,10.45-4.33l14.78,6.13A8,8,0,0,1,104.48,193.24ZM197.57,418l-6.12,14.78a8,8,0,0,1-14.79-6.12l6.13-14.78A8,8,0,1,1,197.57,418ZM264,444a8,8,0,0,1-8,8h0a8,8,0,0,1-8-8V428a8,8,0,0,1,8-8h0a8,8,0,0,1,8,8Zm67-6.92h0a8,8,0,0,1-10.46-4.33L314.43,418a8,8,0,0,1,4.33-10.45h0a8,8,0,0,1,10.45,4.33l6.13,14.78A8,8,0,0,1,331,437.08Zm63.58-42.49h0a8,8,0,0,1-11.31,0L372,383.28A8,8,0,0,1,372,372h0a8,8,0,0,1,11.31,0l11.31,11.31A8,8,0,0,1,394.59,394.59ZM286.25,286.25,110.34,401.66,225.75,225.75,401.66,110.34ZM437.08,331h0a8,8,0,0,1-10.45,4.33l-14.78-6.13a8,8,0,0,1-4.33-10.45h0A8,8,0,0,1,418,314.43l14.78,6.12A8,8,0,0,1,437.08,331ZM444,264H428a8,8,0,0,1-8-8h0a8,8,0,0,1,8-8h16a8,8,0,0,1,8,8h0A8,8,0,0,1,444,264Z"})),h2=e=>n("svg",{...e,fill:"currentColor",viewBox:"0 0 16 16"},n("path",{"fill-rule":"evenodd",d:"M4.475 5.458c-.284 0-.514-.237-.47-.517C4.28 3.24 5.576 2 7.825 2c2.25 0 3.767 1.36 3.767 3.215 0 1.344-.665 2.288-1.79 2.973-1.1.659-1.414 1.118-1.414 2.01v.03a.5.5 0 0 1-.5.5h-.77a.5.5 0 0 1-.5-.495l-.003-.2c-.043-1.221.477-2.001 1.645-2.712 1.03-.632 1.397-1.135 1.397-2.028 0-.979-.758-1.698-1.926-1.698-1.009 0-1.71.529-1.938 1.402-.066.254-.278.461-.54.461h-.777ZM7.496 14c.622 0 1.095-.474 1.095-1.09 0-.618-.473-1.092-1.095-1.092-.606 0-1.087.474-1.087 1.091S6.89 14 7.496 14Z"})),y2=Dt(()=>ta("M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38"))});function nl(e){return`${e.os} \xB7 ${e.platform}`}function rl(){return vt.set(S2(),Oo)}async function b2(){(await vt.get(S2())||new Map).forEach((t,o)=>{Oo.set(o,t)})}function T2(e){switch(e){case"Windows Mobile":case"Windows":return"#55a6ef";case"Linux":return"#cdcd31";case"Android":return"#7bc958";case"Mac OS X":case"iOS":return"";default:return"#f3799a"}}function w2(e){switch(e){case"Discord Android":case"Discord iOS":case"Discord Client":return c2;case"Android Chrome":case"Chrome iOS":case"Chrome":return u2;case"Edge":return p2;case"Firefox":return d2;case"Internet Explorer":return m2;case"Opera Mini":case"Opera":return f2;case"Mobile Safari":case"Safari":return g2;case"BlackBerry":case"Facebook Mobile":case"Android Mobile":return y2;default:return h2}}var S2,Oo,n1=f(()=>{"use strict";a();Jn();b();v2();S2=()=>`BetterSessions_savedSessions_${L.getCurrentUser().id}`,Oo=new Map});function x2({props:e,session:t,state:o}){let[r,i]=o,[s,l]=H.useState(Oo.get(t.id_hash)?.name??"");function u(){Oo.set(t.id_hash,{name:s,isNew:!1}),i(s!==""?`${s}*`:nl(t.client_info)),rl(),e.onClose()}return n(fe,{...e},n(Ee,null,n(S.FormTitle,{tag:"h4"},"Rename")),n(we,null,n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"New device name"),n(je,{style:{marginBottom:"10px"},placeholder:nl(t.client_info),value:s,onChange:l,onKeyDown:c=>{c.key==="Enter"&&u()}}),n(T,{style:{marginBottom:"20px",paddingLeft:"1px",paddingRight:"1px",opacity:.6},look:T.Looks.LINK,color:T.Colors.LINK,size:T.Sizes.NONE,onClick:()=>l("")},"Reset Name")),n(ct,null,n(T,{color:T.Colors.BRAND,onClick:u},"Save"),n(T,{color:T.Colors.TRANSPARENT,look:T.Looks.LINK,onClick:()=>e.onClose()},"Cancel")))}var P2=f(()=>{"use strict";a();$e();b();n1()});function I2({session:e,state:t}){return n(T,{look:T.Looks.LINK,color:T.Colors.LINK,size:T.Sizes.NONE,style:{paddingTop:"0px",paddingBottom:"0px",top:"-2px"},onClick:()=>ue(o=>n(x2,{props:o,session:e,state:t}))},"Rename")}var M2=f(()=>{"use strict";a();$e();b();P2()});var $R,GR,A2,HR,zR,r1,Lu,N2=f(()=>{"use strict";a();zn();_();re();P();w();$();b();M2();n1();$R=me("AuthSessionsStore"),GR=C("saveAccountChanges","open"),A2=C("timestampTooltip","blockquoteContainer"),HR=C("sessionIcon"),zR=Xo("BlobMask"),r1=A({backgroundCheck:{type:3,description:"Check for new sessions in the background, and display notifications when they are detected",default:!1,restartNeeded:!0},checkInterval:{description:"How often to check for new sessions in the background (if enabled), in minutes",type:1,default:20,restartNeeded:!0}}),Lu=h({name:"BetterSessions",description:"Enhances the sessions (devices) menu. Allows you to view exact timestamps, give each session a custom name, and receive notifications about new sessions.",authors:[p.amia],settings:r1,patches:[{find:"Messages.AUTH_SESSIONS_SESSION_LOG_OUT",replacement:[{match:/({variant:"eyebrow",className:\i\.sessionInfoRow,children:).{70,110}{children:"\\xb7"}\),\(0,\i\.\i\)\("span",{children:\i\[\d+\]}\)\]}\)\]/,replace:"$1$self.renderName(arguments[0])"},{match:/({variant:"text-sm\/medium",className:\i\.sessionInfoRow,children:.{70,110}{children:"\\xb7"}\),\(0,\i\.\i\)\("span",{children:)(\i\[\d+\])}/,replace:"$1$self.renderTimestamp({ ...arguments[0], timeLabel: $2 })}"},{match:/\.currentSession:null\),children:\[(?<=,icon:(\i)\}.+?)/,replace:"$& $self.renderIcon({ ...arguments[0], DeviceIcon: $1 }), false &&"}]}],renderName:k.wrap(({session:e})=>{let t=Oo.get(e.id_hash),o=H.useState(t?.name?`${t.name}*`:nl(e.client_info)),[r,i]=o;return n(d,null,n("span",null,r),(t==null||t.isNew)&&n("div",{className:"vc-plugins-badge",style:{backgroundColor:"#ED4245",marginLeft:"2px"}},"NEW"),n(I2,{session:e,state:o}))},{noop:!0}),renderTimestamp:k.wrap(({session:e,timeLabel:t})=>n(oe,{text:e.approx_last_used_time.toLocaleString(),tooltipClassName:A2.timestampTooltip},o=>n("span",{...o,className:A2.timestamp},t)),{noop:!0}),renderIcon:k.wrap(({session:e,DeviceIcon:t})=>{let o=w2(e.client_info.platform);return n(zR,{style:{cursor:"unset"},selected:!1,lowerBadge:n("div",{style:{width:"20px",height:"20px",display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",borderRadius:"50%",backgroundColor:"var(--interactive-normal)",color:"var(--background-secondary)"}},n(o,{width:14,height:14})),lowerBadgeSize:{width:20,height:20}},n("div",{className:HR.sessionIcon,style:{backgroundColor:T2(e.client_info.os)}},n(t,{width:28,height:28,color:"currentColor"})))},{noop:!0}),async checkNewSessions(){let e=await St.get({url:yt.Endpoints.AUTH_SESSIONS});for(let t of e.body.user_sessions)Oo.has(t.id_hash)||(Oo.set(t.id_hash,{name:"",isNew:!0}),Ue({title:"BetterSessions",body:`New session:
|
|
${t.client_info.os} \xB7 ${t.client_info.platform} \xB7 ${t.client_info.location}`,permanent:!0,onClick:()=>GR.open("Sessions")}));rl()},flux:{USER_SETTINGS_ACCOUNT_RESET_AND_CLOSE_FORM(){let e=$R.getSessions().map(t=>t.id_hash);e.forEach(t=>{Oo.has(t)||Oo.set(t,{name:"",isNew:!1})}),e.length>0&&Oo.forEach((t,o)=>{e.includes(o)||Oo.delete(o)}),Oo.forEach(t=>{t.isNew=!1}),rl()}},async start(){await b2(),this.checkNewSessions(),r1.store.backgroundCheck&&(this.checkInterval=setInterval(this.checkNewSessions,r1.store.checkInterval*60*1e3))},stop(){clearInterval(this.checkInterval)}})});function WR({mode:e,baseLayer:t=!1,...o}){let r=e==="HIDDEN",i=xt(null);ce(()=>()=>{Pr.dispatch("LAYER_POP_START"),Pr.dispatch("LAYER_POP_COMPLETE")},[]);let s=n("div",{ref:i,"aria-hidden":r,className:jR({[Eu.layer]:!0,[Eu.baseLayer]:t,"stop-animations":r}),style:{opacity:r?0:void 0},...o});return t?s:n(ia,{containerRef:i},s)}var jR,Eu,vs,Ou,C2=f(()=>{"use strict";a();_();Ve();P();ke();w();$();b();jR=Te("");ht(["animating","baseLayer","bg","layer","layers"],e=>Eu=e);vs=A({disableFade:{description:"Disable the crossfade animation",type:3,default:!0,restartNeeded:!0},organizeMenu:{description:"Organizes the settings cog context menu into categories",type:3,default:!0},eagerLoad:{description:"Removes the loading delay when opening the menu for the first time",type:3,default:!0,restartNeeded:!0}});Ou=h({name:"BetterSettings",description:"Enhances your settings-menu-opening experience",authors:[p.Kyuuhachi],settings:vs,patches:[{find:"this.renderArtisanalHack()",replacement:[{match:/(?<=\((\i),"contextType",\i\.\i\);)/,replace:"$1=$self.Layer;",predicate:()=>vs.store.disableFade},{match:/createPromise:\(\)=>([^:}]*?),webpackId:"?\d+"?,name:(?!="CollectiblesShop")"[^"]+"/g,replace:"$&,_:$1",predicate:()=>vs.store.eagerLoad}]},{find:'minimal:"contentColumnMinimal"',replacement:[{match:/\(0,\i\.useTransition\)\((\i)/,replace:"(_cb=>_cb(void 0,$1))||$&"},{match:/\i\.animated\.div/,replace:'"div"'}],predicate:()=>vs.store.disableFade},{find:"Messages.USER_SETTINGS_WITH_BUILD_OVERRIDE.format",replacement:{match:/(\i)\(this,"handleOpenSettingsContextMenu",.{0,100}?null!=\i&&.{0,100}?(await Promise\.all[^};]*?\)\)).*?,(?=\1\(this)/,replace:"$&(async ()=>$2)(),"},predicate:()=>vs.store.eagerLoad},{find:"Messages.USER_SETTINGS_ACTIONS_MENU_LABEL",replacement:{match:/(EXPERIMENTS:.+?)(\(0,\i.\i\)\(\))(?=\.filter\(\i=>\{let\{section:\i\}=)/,replace:"$1$self.wrapMenu($2)"}}],Layer(e){return!ia||!Pr||!Eu?(new Q("BetterSettings").error("Failed to find some components"),e.children):n(WR,{...e})},wrapMenu(e){if(!vs.store.organizeMenu)return e;let t=[{label:null,items:[]}];for(let o of e)o.section==="HEADER"?t.push({label:o.label,items:[]}):o.section==="DIVIDER"?t.push({label:Se.Messages.OTHER_OPTIONS,items:[]}):t.at(-1).items.push(o);return{filter(o){for(let r of t)r.items=r.items.filter(o);return this},map(o){return t.filter(r=>r.items.length>0).map(({label:r,items:i})=>{let s=i.map(o);return r?n(E.MenuItem,{id:r.replace(/\W/,"_"),label:r,children:s,action:s[0].props.action}):s})}}}})});var _u,R2=f(()=>{"use strict";a();P();w();_u=h({name:"BetterUploadButton",authors:[p.fawn,p.Ven],description:"Upload with a single click, open menu with right click",patches:[{find:"Messages.CHAT_ATTACH_UPLOAD_OR_INVITE",replacement:{match:/CHAT_ATTACH_UPLOAD_OR_INVITE,onDoubleClick:(.+?:void 0),\.\.\.(\i),/,replace:"$&onClick:$1,onContextMenu:$2.onClick,"}}]})});var k2,D2,L2=f(()=>{"use strict";a();$();k2=me("ApplicationStreamPreviewStore"),D2=me("ApplicationStreamingStore")});var qR,E2,KR,YR,Bu,O2=f(()=>{"use strict";a();bt();P();pt();w();b();L2();qR=async({guildId:e,channelId:t,ownerId:o})=>{let r=await k2.getPreviewURL(e,t,o);!r||Go(r)},E2=(e,{userId:t})=>{let o=D2.getAnyStreamForUser(t);if(!o)return;let r=n(E.MenuItem,{label:"View Stream Preview",id:"view-stream-preview",icon:Lg,action:()=>o&&qR(o),disabled:!o});e.push(n(E.MenuSeparator,null),r)},KR=(e,{stream:t})=>E2(e,{userId:t.ownerId}),YR=(e,{user:t})=>{if(t)return E2(e,{userId:t.id})},Bu=h({name:"BiggerStreamPreview",description:"This plugin allows you to enlarge stream previews",authors:[p.phil],contextMenus:{"user-context":YR,"stream-context":KR}})});function _2(){il.textContent=`
|
|
.vc-nsfw-img [class^=imageWrapper] img,
|
|
.vc-nsfw-img [class^=wrapperPaused] video {
|
|
filter: blur(${j.plugins.BlurNSFW.blurAmount}px);
|
|
transition: filter 0.2s;
|
|
}
|
|
.vc-nsfw-img [class^=imageWrapper]:hover img,
|
|
.vc-nsfw-img [class^=wrapperPaused]:hover video {
|
|
filter: unset;
|
|
}
|
|
`}var il,Fu,B2=f(()=>{"use strict";a();_();P();w();Fu=h({name:"BlurNSFW",description:"Blur attachments in NSFW channels until hovered",authors:[p.Ven],patches:[{find:".embedWrapper,embed",replacement:[{match:/\.embedWrapper(?=.+?channel_id:(\i)\.id)/g,replace:"$&+($1.nsfw?' vc-nsfw-img':'')"}]}],options:{blurAmount:{type:1,description:"Blur Amount",default:10,onChange:_2}},start(){il=document.createElement("style"),il.id="VcBlurNsfw",document.head.appendChild(il),_2()},stop(){il?.remove()}})});function ZR(e){let t=j.plugins.CallTimer.format==="human",o=g=>t?g:g.toString().padStart(2,"0"),r=g=>t?g:"",i=t?" ":":",s=Math.floor(e/864e5),l=Math.floor(e%864e5/36e5),u=Math.floor(e%864e5%36e5/6e4),c=Math.floor(e%864e5%36e5%6e4/1e3),m="";return s&&(m+=`${s}d `),(l||m)&&(m+=`${o(l)}${r("h")}${i}`),(u||m||!t)&&(m+=`${o(u)}${r("m")}${i}`),m+=`${o(c)}${r("s")}`,m}var Uu,F2=f(()=>{"use strict";a();_();re();P();ft();w();Uu=h({name:"CallTimer",description:"Adds a timer to vcs",authors:[p.Ven],startTime:0,interval:void 0,options:{format:{type:4,description:"The timer format. This can be any valid moment.js format",options:[{label:"30d 23:00:42",value:"stopwatch",default:!0},{label:"30d 23h 00m 42s",value:"human"}]}},patches:[{find:"renderConnectionStatus(){",replacement:{match:/(?<=renderConnectionStatus\(\)\{.+\.channel,children:)\i/,replace:"[$&, $self.renderTimer(this.props.channel.id)]"}}],renderTimer(e){return n(k,{noop:!0},n(this.Timer,{channelId:e}))},Timer({channelId:e}){let t=ga({deps:[e]});return n("p",{style:{margin:0}},"Connected for ",n("span",{style:{fontFamily:"var(--font-code)"}},ZR(t)))}})});var p1={};lt(p1,{_handleClick:()=>QR,_handlePreEdit:()=>JR,_handlePreSend:()=>XR,addClickListener:()=>c1,addPreEditListener:()=>ki,addPreSendListener:()=>bo,removeClickListener:()=>u1,removePreEditListener:()=>Di,removePreSendListener:()=>To});async function XR(e,t,o,r){o.replyOptions=r;for(let i of s1)try{if((await i(e,t,o))?.cancel)return!0}catch(s){i1.error(`MessageSendHandler: Listener encountered an unknown error
|
|
`,s)}return!1}async function JR(e,t,o){for(let r of a1)try{if((await r(e,t,o))?.cancel)return!0}catch(i){i1.error(`MessageEditHandler: Listener encountered an unknown error
|
|
`,i)}return!1}function bo(e){return s1.add(e),e}function ki(e){return a1.add(e),e}function To(e){return s1.delete(e)}function Di(e){return a1.delete(e)}function QR(e,t,o){e=Gt.getMessage(t.id,e.id)??e;for(let r of l1)try{r(e,t,o)}catch(i){i1.error(`MessageClickHandler: Listener encountered an unknown error
|
|
`,i)}}function c1(e){return l1.add(e),e}function u1(e){return l1.delete(e)}var i1,s1,a1,l1,Rn=f(()=>{"use strict";a();ke();b();i1=new Q("MessageEvents","#e5c890"),s1=new Set,a1=new Set;l1=new Set});var U2,$2=f(()=>{"use strict";a();U2=["action_object_map","action_type_map","action_ref_map","spm@*.aliexpress.com","scm@*.aliexpress.com","aff_platform","aff_trace_key","algo_expid@*.aliexpress.*","algo_pvid@*.aliexpress.*","btsid","ws_ab_test","pd_rd_*@amazon.*","_encoding@amazon.*","psc@amazon.*","tag@amazon.*","ref_@amazon.*","pf_rd_*@amazon.*","pf@amazon.*","crid@amazon.*","keywords@amazon.*","sprefix@amazon.*","sr@amazon.*","ie@amazon.*","node@amazon.*","qid@amazon.*","callback@bilibili.com","cvid@bing.com","form@bing.com","sk@bing.com","sp@bing.com","sc@bing.com","qs@bing.com","pq@bing.com","sc_cid","mkt_tok","trk","trkCampaign","ga_*","gclid","gclsrc","hmb_campaign","hmb_medium","hmb_source","spReportId","spJobID","spUserID","spMailingID","itm_*","s_cid","elqTrackId","elqTrack","assetType","assetId","recipientId","campaignId","siteId","mc_cid","mc_eid","pk_*","sc_campaign","sc_channel","sc_content","sc_medium","sc_outcome","sc_geo","sc_country","nr_email_referer","vero_conv","vero_id","yclid","_openstat","mbid","cmpid","cid","c_id","campaign_id","Campaign","hash@ebay.*","fb_action_ids","fb_action_types","fb_ref","fb_source","fbclid","refsrc@facebook.com","hrc@facebook.com","gs_l","gs_lcp@google.*","ved@google.*","ei@google.*","sei@google.*","gws_rd@google.*","gs_gbg@google.*","gs_mss@google.*","gs_rn@google.*","_hsenc","_hsmi","__hssc","__hstc","hsCtaTracking","source@sourceforge.net","position@sourceforge.net","t@*.twitter.com","s@*.twitter.com","ref_*@*.twitter.com","t@*.x.com","s@*.x.com","ref_*@*.x.com","t@*.fixupx.com","s@*.fixupx.com","ref_*@*.fixupx.com","t@*.fxtwitter.com","s@*.fxtwitter.com","ref_*@*.fxtwitter.com","t@*.twittpr.com","s@*.twittpr.com","ref_*@*.twittpr.com","t@*.fixvx.com","s@*.fixvx.com","ref_*@*.fixvx.com","tt_medium","tt_content","lr@yandex.*","redircnt@yandex.*","feature@*.youtube.com","kw@*.youtube.com","si@*.youtube.com","pp@*.youtube.com","si@*.youtu.be","wt_zmc","utm_source","utm_content","utm_medium","utm_campaign","utm_term","si@open.spotify.com","igshid","igsh","share_id@reddit.com"]});var G2,VR,$u,H2=f(()=>{"use strict";a();Rn();P();w();$2();G2=/[\\^$.*+?()[\]{}|]/g,VR=RegExp(G2.source),$u=h({name:"ClearURLs",description:"Removes tracking garbage from URLs",authors:[p.adryd],dependencies:["MessageEventsAPI"],escapeRegExp(e){return e&&VR.test(e)?e.replace(G2,"\\$&"):e||""},createRules(){let e=U2;this.universalRules=new Set,this.rulesByHost=new Map,this.hostRules=new Map;for(let t of e){let o=t.split("@"),r=new RegExp("^"+this.escapeRegExp(o[0]).replace(/\\\*/,".+?")+"$");if(!o[1]){this.universalRules.add(r);continue}let i=new RegExp("^(www\\.)?"+this.escapeRegExp(o[1]).replace(/\\\./,"\\.").replace(/^\\\*\\\./,"(.+?\\.)?").replace(/\\\*/,".+?")+"$"),s=i.toString();this.hostRules.set(s,i),this.rulesByHost.get(s)==null&&this.rulesByHost.set(s,new Set),this.rulesByHost.get(s).add(r)}},removeParam(e,t,o){(t===e||e instanceof RegExp&&e.test(t))&&o.delete(t)},replacer(e){try{var t=new URL(e)}catch{return e}return t.searchParams.entries().next().done?e:(this.universalRules.forEach(o=>{t.searchParams.forEach((r,i,s)=>{this.removeParam(o,i,s)})}),this.hostRules.forEach((o,r)=>{!o.test(t.hostname)||this.rulesByHost.get(r).forEach(i=>{t.searchParams.forEach((s,l,u)=>{this.removeParam(i,l,u)})})}),t.toString())},onSend(e){e.content.match(/http(s)?:\/\//)&&(e.content=e.content.replace(/(https?:\/\/[^\s<]+[^<.,:;"'>)|\]\s])/g,t=>this.replacer(t)))},start(){this.createRules(),this.preSend=bo((e,t)=>this.onSend(t)),this.preEdit=ki((e,t,o)=>this.onSend(o))},stop(){To(this.preSend),Di(this.preEdit)}})});var z2=f(()=>{});function Z2(e){let t=e.toString(16).padStart(6,"0");sl.store.color=t,X2(t)}function j2(e){o3({theme:e})}function n3(){let e=Fe([W2],()=>W2.theme),t=e==="light",o=t?"dark":"light",i=Fe([q2],()=>q2.gradientPreset)!==void 0,s=u3(sl.store.color),l=!1,u=!0;return(t&&s<.26||!t&&s>.12)&&(l=!0),s<.26&&s>.12&&(u=!1),t&&s>.65&&(l=!0,u=!1),n("div",{className:"client-theme-settings"},n("div",{className:"client-theme-container"},n("div",{className:"client-theme-settings-labels"},n(S.FormTitle,{tag:"h3"},"Theme Color"),n(S.FormText,null,"Add a color to your Discord client theme")),n(e3,{color:parseInt(sl.store.color,16),onChange:Z2,showEyeDropper:!1,suggestedColors:t3})),(l||i)&&n(d,null,n(S.FormDivider,{className:q(G.top8,G.bottom8)}),n("div",{className:`client-theme-contrast-warning ${l?t?"theme-dark":"theme-light":""}`},n("div",{className:"client-theme-warning"},n(S.FormText,null,"Warning, your theme won't look good:"),l&&n(S.FormText,null,"Selected color won't contrast well with text"),i&&n(S.FormText,null,"Nitro themes aren't supported")),l&&u&&n(T,{onClick:()=>j2(o),color:T.Colors.RED},"Switch to ",o," mode"),i&&n(T,{onClick:()=>j2(e),color:T.Colors.RED},"Disable Nitro Theme"))))}function Y2(e,t,o){return Object.entries(e).filter(([r])=>r.search(t)>-1).map(([r,i])=>{let s=i-e[o],l=s>=0?"+":"-";return`${r}: var(--theme-h) var(--theme-s) calc(var(--theme-l) ${l} ${Math.abs(s).toFixed(2)}%);`}).join(`
|
|
`)}function s3(e){let t={},o=K2.exec(e);for(;o!==null;){let[,r,i]=o;t[r]=parseFloat(i),o=K2.exec(e)}d1("clientThemeOffsets",[`.theme-light {
|
|
${Y2(t,r3,"--primary-345-hsl")}
|
|
}`,`.theme-dark {
|
|
${Y2(t,i3,"--primary-600-hsl")}
|
|
}`].join(`
|
|
|
|
`))}function a3(e){let t=/\.theme-light[^{]*\{[^}]*var\(--white-500\)[^}]*}/gm,o=[...e.matchAll(t)].flat(),r=/^([^{]*)\{background:var\(--white-500\)/m,i=/^([^{]*)\{background-color:var\(--white-500\)/m,s=Hu(o,x=>Gu(x,r)).join(`,
|
|
`),l=Hu(o,x=>Gu(x,i)).join(`,
|
|
`),u=`${s} {
|
|
background: var(--primary-100)
|
|
}`,c=`${l} {
|
|
background-color: var(--primary-100)
|
|
}`,m=/\.theme-light\{([^}]*--[^:}]*(?:background|bg)[^:}]*:var\(--white-500\)[^}]*)\}/m,g=/^(--[^:]*(?:background|bg)[^:]*):var\(--white-500\)/m,y=Hu(o,x=>Gu(x,m)).map(x=>x.split(";")).flat(),M=`.theme-light {
|
|
${Hu(y,x=>Gu(x,g)).map(x=>`${x}: var(--primary-100);`).join(`
|
|
`)}
|
|
}`;d1("clientThemeLightModeFixes",[u,c,M].join(`
|
|
|
|
`))}function Gu(e,t){let o=e.match(t);return o===null?null:o[1]}function Hu(e,t){return e.map(t).filter(Boolean)}function X2(e){let{hue:t,saturation:o,lightness:r}=c3(e),i=document.getElementById("clientThemeVars");i||(i=d1("clientThemeVars")),i.textContent=`:root {
|
|
--theme-h: ${t};
|
|
--theme-s: ${o}%;
|
|
--theme-l: ${r}%;
|
|
}`}function d1(e,t=""){let o=document.createElement("style");return o.setAttribute("id",e),o.textContent=t.split(`
|
|
`).map(r=>r.trim()).join(`
|
|
`),document.body.appendChild(o),o}async function l3(){let e="",t=document.querySelectorAll('link[rel="stylesheet"]');for(let o of t){let r=o.getAttribute("href");if(!r)continue;let i=await fetch(r);e+=await i.text()}return e}function c3(e){let t=parseInt(e.substring(0,2),16)/255,o=parseInt(e.substring(2,4),16)/255,r=parseInt(e.substring(4,6),16)/255,i=Math.max(t,o,r),s=Math.min(t,o,r),l=i-s,u,c,m;return m=(i+s)/2,l===0?(u=0,c=0):(c=l/(1-Math.abs(2*m-1)),i===t?u=(o-r)/l%6:i===o?u=(r-t)/l+2:u=(t-o)/l+4,u*=60,u<0&&(u+=360)),c*=100,m*=100,{hue:u,saturation:c,lightness:m}}function u3(e){let t=s=>s<=.03928?s/12.92:((s+.055)/1.055)**2.4,o=t(parseInt(e.substring(0,2),16)/255),r=t(parseInt(e.substring(2,4),16)/255),i=t(parseInt(e.substring(4,6),16)/255);return o*.2126+r*.7152+i*.0722}var e3,t3,o3,W2,q2,sl,zu,K2,r3,i3,J2=f(()=>{"use strict";a();z2();_();P();Ze();be();w();$();b();e3=ve(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR",".BACKGROUND_PRIMARY)"),t3=["#1E1514","#172019","#13171B","#1C1C28","#402D2D","#3A483D","#344242","#313D4B","#2D2F47","#322B42","#3C2E42","#422938","#b6908f","#bfa088","#d3c77d","#86ac86","#88aab3","#8693b5","#8a89ba","#ad94bb"];o3=ye('type:"UNSYNCED_USER_SETTINGS_UPDATE",settings:{useSystemTheme:"system"===');W2=me("ThemeStore"),q2=me("ClientThemesBackgroundStore");sl=A({color:{description:"Color your Discord client theme will be based around. Light mode isn't supported",type:6,default:"313338",component:()=>n(n3,null)},resetColor:{description:"Reset Theme Color",type:6,default:"313338",component:()=>n(T,{onClick:()=>Z2(3224376)},"Reset Theme Color")}}),zu=h({name:"ClientTheme",authors:[p.F53,p.Nuckyz],description:"Recreation of the old client theme experiment. Add a color to your Discord client theme",settings:sl,startAt:"DOMContentLoaded",async start(){X2(sl.store.color);let e=await l3();s3(e),a3(e)},stop(){document.getElementById("clientThemeVars")?.remove(),document.getElementById("clientThemeOffsets")?.remove()}}),K2=/(--primary-\d{3}-hsl):.*?(\S*)%;/g,r3=/^--primary-[1-5]\d{2}-hsl/g,i3=/^--primary-[5-9]\d{2}-hsl/g});var ju,Q2=f(()=>{"use strict";a();P();w();ju=h({name:"ColorSighted",description:"Removes the colorblind-friendly icons from statuses, just like 2015-2017 Discord",authors:[p.lewisakura],patches:[{find:"Masks.STATUS_ONLINE",replacement:{match:/Masks\.STATUS_(?:IDLE|DND|STREAMING|OFFLINE)/g,replace:"Masks.STATUS_ONLINE"}},{find:".AVATAR_STATUS_MOBILE_16;",replacement:{match:/(fromIsMobile:\i=!0,.+?)status:(\i)/,replace:'$1status_$:$2="online"'}}]})});var PY,V2=f(()=>{"use strict";a();ke();Ko();$();$();PY=new Q("LazyChunkLoader")});function m1(){function e(i){let s=new Map;return function(...l){let u=String(l);if(s.has(u))return s.get(u);let c=br(i(...l)),m=(()=>{switch(c.length){case 0:return null;case 1:return c[0];default:let g=[...new Set(c)];return g.length>1&&console.warn(`Warning: This filter matches ${c.length} modules. Make it more specific!
|
|
`,g),c[0]}})();return m&&u&&s.set(u,m),m}}let t,o=e(i=>i),r=e(ae.byProps);return{...Object.fromEntries(Object.keys(es).map(i=>[i,{getter:()=>es[i]}])),wp:rc,wpc:{getter:()=>Yo},wreq:{getter:()=>$t},wpsearch:Yi,wpex:oa,wpexs:i=>oa(wr(i)),loadLazyChunks:()=>{throw new Error("loadLazyChunks is dev only.")},find:o,findAll:br,findByProps:r,findAllByProps:(...i)=>br(ae.byProps(...i)),findByCode:e(ae.byCode),findAllByCode:i=>br(ae.byCode(i)),findComponentByCode:e(ae.componentByCode),findAllComponentsByCode:(...i)=>br(ae.componentByCode(...i)),findExportedComponent:(...i)=>r(...i)[i[0]],findStore:e(ae.byStoreName),PluginsApi:{getter:()=>Vencord.Plugins},plugins:{getter:()=>Vencord.Plugins.plugins},Settings:{getter:()=>Vencord.Settings},Api:{getter:()=>Vencord.Api},Util:{getter:()=>Vencord.Util},reload:()=>location.reload(),restart:vo,canonicalizeMatch:Kt,canonicalizeReplace:Xs,canonicalizeReplacement:Js,fakeRender:(i,s)=>{let l=t?.deref(),u=l?.closed===!1?l:window.open("about:blank","Fake Render","popup,width=500,height=500");t=new WeakRef(u),u.focus();let c=u.document;c.body.style.margin="1em",u.prepared||(u.prepared=!0,[...document.querySelectorAll("style"),...document.querySelectorAll("link[rel=stylesheet]")].forEach(m=>{let g=m.cloneNode(!0);m.parentElement?.tagName==="HEAD"?c.head.append(g):g.id?.startsWith("vencord-")||g.id?.startsWith("vcd-")?c.documentElement.append(g):c.body.append(g)})),li.render(H.createElement(i,s),c.body.appendChild(document.createElement("div")))},preEnable:i=>(Vencord.Settings.plugins[i]??={enabled:!0}).enabled=!0,channel:{getter:()=>pn(),preload:!1},channelId:{getter:()=>xe.getChannelId(),preload:!1},guild:{getter:()=>wi(),preload:!1},guildId:{getter:()=>Uo.getGuildId(),preload:!1},me:{getter:()=>L.getCurrentUser(),preload:!1},meId:{getter:()=>L.getCurrentUser().id,preload:!1},messages:{getter:()=>Gt.getMessages(xe.getChannelId()),preload:!1},Stores:{getter:()=>Object.fromEntries(ci.Store.getAll().map(i=>[i.getName(),i]).filter(([i])=>i.length>1))}}}function eT(e,t,o){let r=t.getter();if(!r||t.preload===!1)return r;let i=r[on]?o?r[on]():r[En]:r;return i&&f1(window.shortcutList,e,{value:i}),i}var f1,Wu,tT=f(()=>{"use strict";a();P();pt();Mo();qn();Ko();w();$();$();b();V2();f1=(e,t,o)=>(Object.hasOwn(o,"value")&&(o.writable=!0),Object.defineProperty(e,t,{configurable:!0,enumerable:!0,...o}));Wu=h({name:"ConsoleShortcuts",description:"Adds shorter Aliases for many things on the window. Run `shortcutList` for a list.",authors:[p.Ven],startAt:"Init",start(){let e=m1();window.shortcutList={};for(let[t,o]of Object.entries(e))"getter"in o?(f1(window.shortcutList,t,{get:()=>eT(t,o,!0)}),f1(window,t,{get:()=>window.shortcutList[t]})):(window.shortcutList[t]=o,window[t]=o);ri.then(()=>{setTimeout(()=>this.eagerLoad(!1),1e3),VencordNative.pluginHelpers.ConsoleShortcuts.initDevtoolsOpenEagerLoad()})},async eagerLoad(e){await ri;let t=m1();for(let[o,r]of Object.entries(t))if(!(!Object.hasOwn(r,"getter")||r.preload===!1))try{eT(o,r,e)}catch{}},stop(){delete window.shortcutList;for(let e in m1())delete window[e]}})});function d3(e,t){let{id:o,name:r}=e.dataset;return o?`<${e?.firstChild.src.match(/https:\/\/cdn\.discordapp\.com\/emojis\/\d+\.(\w+)/)?.[1]==="gif"?"a":""}:${r.replace(/~\d+$/,"")}:${o}>`:t?p3(r):`:${r}:`}var p3,oT,qu,nT=f(()=>{"use strict";a();_();P();be();w();$();b();({convertNameToSurrogate:p3}=C("convertNameToSurrogate"));oT=A({copyUnicode:{type:3,description:"Copy the raw unicode character instead of :name: for default emojis (\u{1F47D})",default:!0}}),qu=h({name:"CopyEmojiMarkdown",description:"Allows you to copy emojis as formatted string (<:blobcatcozy:1026533070955872337>)",authors:[p.HappyEnderman,p.Vishnya],settings:oT,contextMenus:{"expression-picker"(e,{target:t}){t.dataset.type==="emoji"&&e.push(n(E.MenuItem,{id:"vc-copy-emoji-markdown",label:"Copy Emoji Markdown",action:()=>{po(d3(t,oT.store.copyUnicode),"Success! Copied emoji markdown.")}}))}}})});var m3,Ku,rT=f(()=>{"use strict";a();bt();P();w();b();m3=(e,{user:t})=>{!t||e.push(n(E.MenuItem,{id:"vc-copy-user-url",label:"Copy User URL",action:()=>Et.copy(`<https://discord.com/users/${t.id}>`),icon:xi}))},Ku=h({name:"CopyUserURLs",authors:[p.castdrian],description:"Adds a 'Copy User URL' option to the user context menu.",contextMenus:{"user-context":m3}})});var kn,f3,g3,g1,iT,h1,y1,Yu,sT=f(()=>{"use strict";a();zn();_();P();ke();$e();w();Ni();$();b();kn=new Q("CrashHandler"),{ModalStack:f3,DraftManager:g3}=Ao(()=>{let[e,t]=Tr(ae.byProps("pushLazy","popAll"),ae.byProps("clearDraft","saveDraft"));return{ModalStack:e,DraftManager:t}}),g1=A({attemptToPreventCrashes:{type:3,description:"Whether to attempt to prevent Discord crashes.",default:!0},attemptToNavigateToHome:{type:3,description:"Whether to attempt to navigate to the home when preventing Discord crashes.",default:!1}}),iT=!1,h1=!1,y1=!0,Yu=h({name:"CrashHandler",description:"Utility plugin for handling and possibly recovering from crashes without a restart",authors:[p.Nuckyz],enabledByDefault:!0,settings:g1,patches:[{find:".Messages.ERRORS_UNEXPECTED_CRASH",replacement:{match:/this\.setState\((.+?)\)/,replace:"$self.handleCrash(this,$1);"}}],handleCrash(e,t){e.setState(t),!h1&&(h1=!0,setTimeout(()=>{try{if(!y1){try{Ue({color:"#eed202",title:"Discord has crashed!",body:"Awn :( Discord has crashed two times rapidly, not attempting to recover.",noPersist:!0})}catch{}return}y1=!1,setTimeout(()=>y1=!0,1e3)}catch{}try{iT||(iT=!0,Wa("Uh oh, Discord has just crashed... but good news, there is a Vencord update available that might fix this issue! Would you like to update now?",!0))}catch{}try{g1.store.attemptToPreventCrashes&&this.handlePreventCrash(e)}catch(o){kn.error("Failed to handle crash",o)}},1))},handlePreventCrash(e){try{Ue({color:"#eed202",title:"Discord has crashed!",body:"Attempting to recover...",noPersist:!0})}catch{}try{let t=xe.getChannelId();for(let o in Yt)!Number.isNaN(Number(o))||g3.clearDraft(t,Yt[o])}catch(t){kn.debug("Failed to clear drafts.",t)}try{ma.closeExpressionPicker()}catch(t){kn.debug("Failed to close expression picker.",t)}try{F.dispatch({type:"CONTEXT_MENU_CLOSE"})}catch(t){kn.debug("Failed to close open context menu.",t)}try{f3.popAll()}catch(t){kn.debug("Failed to close old modals.",t)}try{An()}catch(t){kn.debug("Failed to close all open modals.",t)}try{F.dispatch({type:"USER_PROFILE_MODAL_CLOSE"})}catch(t){kn.debug("Failed to close user popout.",t)}try{F.dispatch({type:"LAYER_POP_ALL"})}catch(t){kn.debug("Failed to pop all layers.",t)}if(g1.store.attemptToNavigateToHome)try{Bn.transitionTo("/channels/@me")}catch(t){kn.debug("Failed to navigate to home",t)}setImmediate(()=>h1=!1);try{e.setState({error:null,info:null})}catch(t){kn.debug("Failed to update crash handler component.",t)}}})});var Zu,aT=f(()=>{"use strict";a();_();P();w();Zu=h({name:"CtrlEnterSend",authors:[p.UlyssesZhan],description:"Use Ctrl+Enter to send messages (customizable)",settings:A({submitRule:{description:"The way to send a message",type:4,options:[{label:"Ctrl+Enter (Enter or Shift+Enter for new line) (cmd+enter on macOS)",value:"ctrl+enter"},{label:"Shift+Enter (Enter for new line)",value:"shift+enter"},{label:"Enter (Shift+Enter for new line; Discord default)",value:"enter"}],default:"ctrl+enter"},sendMessageInTheMiddleOfACodeBlock:{description:"Whether to send a message in the middle of a code block",type:3,default:!0}}),patches:[{find:".ENTER&&(!",replacement:{match:/(?<=(\i)\.which===\i\.\i.ENTER&&).{0,100}(\(0,\i\.\i\)\(\i\)).{0,100}(?=&&\(\i\.preventDefault)/,replace:"$self.shouldSubmit($1, $2)"}}],shouldSubmit(e,t){let o=!1;switch(this.settings.store.submitRule){case"shift+enter":o=e.shiftKey;break;case"ctrl+enter":o=navigator.platform.includes("Mac")?e.metaKey:e.ctrlKey;break;case"enter":o=!e.shiftKey&&!e.ctrlKey;break}return this.settings.store.sendMessageInTheMiddleOfACodeBlock||(o&&=!t),o}})});function Xu(e){return Boolean(e)}function Qn(e){return e!=null}var Ss=f(()=>{"use strict";a()});async function cT(e){return/https?:\/\/(cdn|media)\.discordapp\.(com|net)\/attachments\//.test(e)?"mp:"+e.replace(/https?:\/\/(cdn|media)\.discordapp\.(com|net)\//,""):(await fi.fetchAssetIds(Li.store.appID,[e]))[0]}function eo(){Ju(!0),j.plugins.CustomRPC.enabled&&Ju()}function dT(){return Li.store.type!==1}function S3(e){return!dT()&&!/https?:\/\/(www\.)?(twitch\.tv|youtube\.com)\/\w+/.test(e)?"Streaming link must be a valid URL.":!0}function uT(){return Li.store.timestampMode!==3}function pT(e){return/https?:\/\/(?!i\.)?imgur\.com\//.test(e)?"Imgur link must be a direct link to the image. (e.g. https://i.imgur.com/...)":/https?:\/\/(?!media\.)?tenor\.com\//.test(e)?"Tenor link must be a direct link to the image. (e.g. https://media.tenor.com/...)":!0}async function mT(){let{appID:e,appName:t,details:o,state:r,type:i,streamLink:s,startTime:l,endTime:u,imageBig:c,imageBigTooltip:m,imageSmall:g,imageSmallTooltip:y,buttonOneText:v,buttonOneURL:M,buttonTwoText:x,buttonTwoURL:N}=Li.store;if(!t)return;let I={application_id:e||"0",name:t,state:r,details:o,type:i,flags:1<<0};switch(i===1&&(I.url=s),Li.store.timestampMode){case 1:I.timestamps={start:Date.now()};break;case 2:I.timestamps={start:Date.now()-(new Date().getHours()*3600+new Date().getMinutes()*60+new Date().getSeconds())*1e3};break;case 3:(l||u)&&(I.timestamps={},l&&(I.timestamps.start=l),u&&(I.timestamps.end=u));break;case 0:default:break}v&&(I.buttons=[v,x].filter(Xu),I.metadata={button_urls:[M,N].filter(Xu)}),c&&(I.assets={large_image:await cT(c),large_text:m||void 0}),g&&(I.assets={...I.assets,small_image:await cT(g),small_text:y||void 0});for(let R in I){if(R==="type")continue;let D=I[R];(!D||D.length===0)&&delete I[R]}return I}async function Ju(e){let t=await mT();F.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e?null:t,socketId:"CustomRPC"})}var h3,y3,v3,lT,Li,Qu,fT=f(()=>{"use strict";a();_();Fr();yi();ho();P();Ss();Ze();be();ft();w();$();b();h3=ye("profileThemeStyle:","--profile-gradient-primary-color"),y3=ve("onOpenGameProfile"),v3=C("activity","buttonColor"),lT=jo("status","showCurrentGame");Li=A({appID:{type:0,description:"Application ID (required)",onChange:eo,isValid:e=>e?e&&!/^\d+$/.test(e)?"Application ID must be a number.":!0:"Application ID is required."},appName:{type:0,description:"Application name (required)",onChange:eo,isValid:e=>e?e.length>128?"Application name must be not longer than 128 characters.":!0:"Application name is required."},details:{type:0,description:"Details (line 1)",onChange:eo,isValid:e=>e&&e.length>128?"Details (line 1) must be not longer than 128 characters.":!0},state:{type:0,description:"State (line 2)",onChange:eo,isValid:e=>e&&e.length>128?"State (line 2) must be not longer than 128 characters.":!0},type:{type:4,description:"Activity type",onChange:eo,options:[{label:"Playing",value:0,default:!0},{label:"Streaming",value:1},{label:"Listening",value:2},{label:"Watching",value:3},{label:"Competing",value:5}]},streamLink:{type:0,description:"Twitch.tv or Youtube.com link (only for Streaming activity type)",onChange:eo,disabled:dT,isValid:S3},timestampMode:{type:4,description:"Timestamp mode",onChange:eo,options:[{label:"None",value:0,default:!0},{label:"Since discord open",value:1},{label:"Same as your current time",value:2},{label:"Custom",value:3}]},startTime:{type:1,description:"Start timestamp in milliseconds (only for custom timestamp mode)",onChange:eo,disabled:uT,isValid:e=>e&&e<0?"Start timestamp must be greater than 0.":!0},endTime:{type:1,description:"End timestamp in milliseconds (only for custom timestamp mode)",onChange:eo,disabled:uT,isValid:e=>e&&e<0?"End timestamp must be greater than 0.":!0},imageBig:{type:0,description:"Big image key/link",onChange:eo,isValid:pT},imageBigTooltip:{type:0,description:"Big image tooltip",onChange:eo,isValid:e=>e&&e.length>128?"Big image tooltip must be not longer than 128 characters.":!0},imageSmall:{type:0,description:"Small image key/link",onChange:eo,isValid:pT},imageSmallTooltip:{type:0,description:"Small image tooltip",onChange:eo,isValid:e=>e&&e.length>128?"Small image tooltip must be not longer than 128 characters.":!0},buttonOneText:{type:0,description:"Button 1 text",onChange:eo,isValid:e=>e&&e.length>31?"Button 1 text must be not longer than 31 characters.":!0},buttonOneURL:{type:0,description:"Button 1 URL",onChange:eo},buttonTwoText:{type:0,description:"Button 2 text",onChange:eo,isValid:e=>e&&e.length>31?"Button 2 text must be not longer than 31 characters.":!0},buttonTwoURL:{type:0,description:"Button 2 URL",onChange:eo}});Qu=h({name:"CustomRPC",description:"Allows you to set a custom rich presence.",authors:[p.captain,p.AutumnVN,p.nin0dev],dependencies:["UserSettingsAPI"],start:Ju,stop:()=>Ju(!0),settings:Li,settingsAboutComponent:()=>{let e=st(mT),t=lT.useSetting(),{profileThemeStyle:o}=h3({});return n(d,null,!t&&n(mo,{className:q(G.top16,G.bottom16),style:{padding:"1em"}},n(S.FormTitle,null,"Notice"),n(S.FormText,null,"Game activity isn't enabled, people won't be able to see your custom rich presence!"),n(T,{color:T.Colors.TRANSPARENT,className:G.top8,onClick:()=>lT.updateSetting(!0)},"Enable")),n(S.FormText,null,"Go to ",n(qe,{href:"https://discord.com/developers/applications"},"Discord Developer Portal")," to create an application and get the application ID."),n(S.FormText,null,"Upload images in the Rich Presence tab to get the image keys."),n(S.FormText,null,"If you want to use image link, download your image and reupload the image to ",n(qe,{href:"https://imgur.com"},"Imgur"),' and get the image link by right-clicking the image and select "Copy image address".'),n(S.FormDivider,{className:G.top8}),n("div",{style:{width:"284px",...o}},e[0]&&n(y3,{activity:e[0],className:v3.activity,channelId:xe.getChannelId(),guild:se.getGuild(Uo.getLastSelectedGuildId()),application:{id:Li.store.appID},user:L.getCurrentUser()})))}})});var v1,Vu,gT=f(()=>{"use strict";a();Jn();_();Er();P();w();b();v1=A({idleTimeout:{description:"Minutes before Discord goes idle (0 to disable auto-idle)",type:5,markers:Vt(0,60,5),default:10,stickToMarkers:!1,restartNeeded:!0},remainInIdle:{description:"When you come back to Discord, remain idle until you confirm you want to go online",type:3,default:!0}}),Vu=h({name:"CustomIdle",description:"Allows you to set the time before Discord goes idle (or disable auto-idle)",authors:[p.newwares],settings:v1,patches:[{find:'type:"IDLE",idle:',replacement:[{match:/(?<=Date\.now\(\)-\i>)\i\.\i/,replace:"$self.getIdleTimeout()"},{match:/Math\.min\((\i\.\i\.getSetting\(\)\*\i\.\i\.\i\.SECOND),\i\.\i\)/,replace:"$1"},{match:/\i\.\i\.dispatch\({type:"IDLE",idle:!1}\)/,replace:"$self.handleOnline()"},{match:/(setInterval\(\i,\.25\*)\i\.\i/,replace:"$1$self.getIntervalDelay()"}]}],getIntervalDelay(){return Math.min(6e5,this.getIdleTimeout())},handleOnline(){if(!v1.store.remainInIdle){F.dispatch({type:"IDLE",idle:!1});return}let e="Welcome back! Click the button to go online. Click the X to stay idle until reload.";Vn.currentNotice?.[1]===e||Vn.noticesQueue.some(([,t])=>t===e)||Vn.showNotice(e,"Exit idle",()=>{Vn.popNotice(),F.dispatch({type:"IDLE",idle:!1})})},getIdleTimeout(){let{idleTimeout:e}=v1.store;return e===0?1/0:e*6e4}})});var hT=f(()=>{});async function T3(){try{let{embed:e}=this.props,{replaceElements:t}=S1.store;if(!e||e.dearrow||e.provider?.name!=="YouTube"||!e.video?.url)return;let o=b3.exec(e.video.url)?.[1];if(!o)return;let r=await fetch(`https://sponsor.ajay.app/api/branding?videoID=${o}`);if(!r.ok)return;let{titles:i,thumbnails:s}=await r.json(),l=i[0]?.votes>=0,u=s[0]?.votes>=0&&!s[0].original;if(!l&&!u)return;e.dearrow={enabled:!0},l&&t!==2&&(e.dearrow.oldTitle=e.rawTitle,e.rawTitle=i[0].title.replace(/(^|\s)>(\S)/g,"$1$2")),u&&t!==1&&(e.dearrow.oldThumb=e.thumbnail.proxyURL,e.thumbnail.proxyURL=`https://dearrow-thumb.ajay.app/api/v1/getThumbnail?videoID=${o}&time=${s[0].timestamp}`),this.forceUpdate()}catch(e){new Q("Dearrow").error("Failed to dearrow embed",e)}}function w3({component:e}){let{embed:t}=e.props;return t?.dearrow?n(oe,{text:t.dearrow.enabled?"This embed has been dearrowed, click to restore":"Click to dearrow"},({onMouseEnter:o,onMouseLeave:r})=>n("button",{onMouseEnter:o,onMouseLeave:r,className:"vc-dearrow-toggle-"+(t.dearrow.enabled?"on":"off"),onClick:()=>{let{enabled:i,oldThumb:s,oldTitle:l}=t.dearrow;t.dearrow.enabled=!i,l&&(t.dearrow.oldTitle=t.rawTitle,t.rawTitle=l),s&&(t.dearrow.oldThumb=t.thumbnail.proxyURL,t.thumbnail.proxyURL=s),e.forceUpdate()}},n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24px",height:"24px",viewBox:"0 0 36 36","aria-label":"Toggle Dearrow"},n("path",{fill:"#1213BD",d:"M36 18.302c0 4.981-2.46 9.198-5.655 12.462s-7.323 5.152-12.199 5.152s-9.764-1.112-12.959-4.376S0 23.283 0 18.302s2.574-9.38 5.769-12.644S13.271 0 18.146 0s9.394 2.178 12.589 5.442C33.931 8.706 36 13.322 36 18.302z"}),n("path",{fill:"#88c9f9",d:"m 30.394282,18.410186 c 0,3.468849 -1.143025,6.865475 -3.416513,9.137917 -2.273489,2.272442 -5.670115,2.92874 -9.137918,2.92874 -3.467803,0 -6.373515,-1.147212 -8.6470033,-3.419654 -2.2734888,-2.272442 -3.5871299,-5.178154 -3.5871299,-8.647003 0,-3.46885 0.9420533,-6.746149 3.2144954,-9.0196379 2.2724418,-2.2734888 5.5507878,-3.9513905 9.0196378,-3.9513905 3.46885,0 6.492841,1.9322561 8.76633,4.204698 2.273489,2.2724424 3.788101,5.2974804 3.788101,8.7663304 z"}),n("path",{fill:"#0a62a5",d:"m 23.95823,17.818306 c 0,3.153748 -2.644888,5.808102 -5.798635,5.808102 -3.153748,0 -5.599825,-2.654354 -5.599825,-5.808102 0,-3.153747 2.446077,-5.721714 5.599825,-5.721714 3.153747,0 5.798635,2.567967 5.798635,5.721714 z"})))):null}var b3,S1,ep,yT=f(()=>{"use strict";a();hT();_();re();P();ke();w();b();b3=/https:\/\/www\.youtube\.com\/embed\/([a-zA-Z0-9_-]{11})/;S1=A({hideButton:{description:"Hides the Dearrow button from YouTube embeds",type:3,default:!1,restartNeeded:!0},replaceElements:{description:"Choose which elements of the embed will be replaced",type:4,restartNeeded:!0,options:[{label:"Everything (Titles & Thumbnails)",value:0,default:!0},{label:"Titles",value:1},{label:"Thumbnails",value:2}]}}),ep=h({name:"Dearrow",description:"Makes YouTube embed titles and thumbnails less sensationalist, powered by Dearrow",authors:[p.Ven],settings:S1,embedDidMount:T3,renderButton(e){return n(k,{noop:!0},n(w3,{component:e}))},patches:[{find:"this.renderInlineMediaEmbed",replacement:[{match:/render\(\)\{.{0,30}let\{embed:/,replace:"componentDidMount=$self.embedDidMount;$&"},{match:/children:\[(?=null!=\i\?(\i)\.renderSuppressButton)/,replace:"children:[$self.renderButton($1),",predicate:()=>!S1.store.hideButton}]}]})});var vT=f(()=>{});var x3,$r,ST,bT,TT,Ei,tp,bs,al,b1,Gr=f(()=>{"use strict";a();x3="https://decor.fieryflames.dev",$r=x3+"/api",ST=$r+"/authorize",bT="https://ugc.decor.fieryflames.dev",TT="1096966363416899624",Ei="100101099111114",tp="11497119",bs="1096357702931841148",al="dXp2SdxDcP",b1=1e3*60*60*4});var P3,Hr,ll=f(()=>{"use strict";a();Jn();Mo();ke();$e();b();Gr();P3={async getItem(e){return vt.get(e).then(t=>t??null)},async setItem(e,t){await vt.set(e,t)},async removeItem(e){await vt.del(e)}},Hr=Tt(()=>gi(mg((e,t)=>({token:null,tokens:{},init:()=>{e({token:t().tokens[L.getCurrentUser().id]??null})},setToken:o=>e({token:o,tokens:{...t().tokens,[L.getCurrentUser().id]:o}}),remove:o=>{let{tokens:r,init:i}=t(),s={...r};delete s[o],e({tokens:s}),i()},async authorize(){return new Promise((o,r)=>ue(i=>n(aa,{...i,scopes:["identify"],responseType:"code",redirectUri:ST,permissions:0n,clientId:TT,cancelCompletesFlow:!1,callback:async s=>{try{let l=new URL(s.location);l.searchParams.append("client","vencord");let u=await fetch(l);if(u?.ok){let c=await u.text();t().setToken(c)}else throw new Error("Request not OK");o(void 0)}catch(l){l instanceof Error&&(it(`Failed to authorize: ${l.message}`,V.Type.FAILURE),new Q("Decor").error("Failed to authorize",l),r(l))}}}),{onCloseCallback(){r(new Error("Authorization cancelled"))}}))},isAuthorized:()=>!!t().token}),{name:"decor-auth",getStorage:()=>P3,partialize:e=>({tokens:e.tokens}),onRehydrateStorage:()=>e=>e?.init()})))});async function op(e,t){let o=await fetch(e,{...t,headers:{...t?.headers,Authorization:`Bearer ${Hr.getState().token}`}});if(o.ok)return o;throw new Error(await o.text())}var wT,xT,PT,T1,IT,MT,np=f(()=>{"use strict";a();Gr();ll();wT=async e=>{if(e?.length===0)return{};let t=new URL($r+"/users");return e&&e.length!==0&&t.searchParams.set("ids",JSON.stringify(e)),await fetch(t).then(o=>o.json())},xT=async(e="@me")=>op($r+`/users/${e}/decorations`).then(t=>t.json()),PT=async(e="@me")=>op($r+`/users/${e}/decoration`).then(t=>t.json()),T1=async(e,t="@me")=>{let o=new FormData;return e?"hash"in e?o.append("hash",e.hash):"file"in e&&(o.append("image",e.file),o.append("alt",e.alt??"null")):o.append("hash","null"),op($r+`/users/${t}/decoration`,{method:"PUT",body:o}).then(r=>e&&"file"in e?r.json():r.text())},IT=async e=>{await op($r+`/decorations/${e}`,{method:"DELETE"})},MT=async()=>fetch($r+"/decorations/presets").then(e=>e.json())});function w1(e){return`${e.animated?"a_":""}${e.hash}`}function rp(e){return{asset:w1(e),skuId:Ei}}var ip=f(()=>{"use strict";a();Gr()});function AT(e){let[t,o]=K(e?er.getState().getAsset(e.id)??null:null);return ce(()=>{let r=er.subscribe(i=>{if(!e)return;let s=i.getAsset(e.id);!s||t!==s&&o(s)});if(e){let{fetch:i}=er.getState();i(e.id)}return r},[]),t?{asset:t,skuId:Ei}:null}var er,x1=f(()=>{"use strict";a();Mr();Mo();b();np();Gr();er=Tt(()=>gi((e,t)=>({usersDecorations:new Map,fetchQueue:new Set,bulkFetch:ro(async()=>{let{fetchQueue:o,usersDecorations:r}=t();if(o.size===0)return;e({fetchQueue:new Set});let i=[...o],s=await wT(i),l=new Map(r),u=new Date;for(let c of i){let m=s[c]??null;l.set(c,{asset:m,fetchedAt:u})}e({usersDecorations:l})}),async fetch(o,r=!1){let{usersDecorations:i,fetchQueue:s,bulkFetch:l}=t(),{fetchedAt:u}=i.get(o)??{};u&&!r&&Date.now()-u.getTime()<b1||(e({fetchQueue:new Set(s).add(o)}),l())},async fetchMany(o){if(!o.length)return;let{usersDecorations:r,fetchQueue:i,bulkFetch:s}=t(),l=new Set(i),u=Date.now();for(let c of o){let{fetchedAt:m}=r.get(c)??{};m&&u-m.getTime()<b1||l.add(c)}e({fetchQueue:l}),s()},get(o){return t().usersDecorations.get(o)},getAsset(o){return t().usersDecorations.get(o)?.asset},has(o){return t().usersDecorations.has(o)},set(o,r){let{usersDecorations:i}=t(),s=new Map(i);s.set(o,{asset:r,fetchedAt:new Date}),e({usersDecorations:s})}})))});var Dn,Ts=f(()=>{"use strict";a();Mo();b();np();ip();x1();Dn=Tt(()=>gi((e,t)=>({decorations:[],selectedDecoration:null,async fetch(){let o=await xT(),r=await PT();e({decorations:o,selectedDecoration:r})},async create(o){let r=await T1(o);e({decorations:[...t().decorations,r]})},async delete(o){let r=typeof o=="object"?o.hash:o;await IT(r);let{selectedDecoration:i,decorations:s}=t(),l={decorations:s.filter(u=>u.hash!==r),selectedDecoration:i?.hash===r?null:i};e(l)},async select(o){t().selectedDecoration!==o&&(e({selectedDecoration:o}),T1(o),er.getState().set(L.getCurrentUser().id,o?w1(o):null))},clear:()=>e({decorations:[],selectedDecoration:null})})))});var Ge,ws,xs,NT,zr=f(()=>{"use strict";a();Ve();$();Ge=Te("vc-decor-"),ws=C("modalFooterShopButton"),xs=On([".COLLECTIBLES_SHOP_FULLSCREEN&&"]),NT=On(["stickerInspected]:"])});var cl,CT,sp,P1,RT,Oi=f(()=>{"use strict";a();$();b();CT=e=>cl=e,sp=ec(()=>{let e=tc(".shopPreviewBanner");return H.memo(e)}),RT=e=>P1=e});function I1(e){return n(cl,{...e,isSelected:!1},n(Og,null),n(Z,{variant:"text-xs/normal",color:"header-primary"},Se.Messages.CREATE))}var kT=f(()=>{"use strict";a();bt();b();Oi()});function M1(e){return n(cl,{...e},n(_g,null),n(Z,{variant:"text-xs/normal",color:"header-primary"},Se.Messages.NONE))}var DT=f(()=>{"use strict";a();bt();b();Oi()});function A1({decoration:e}){let{delete:t}=Dn();return n(E.Menu,{navId:Ge("decoration-context-menu"),onClose:Jt.closeContextMenu,"aria-label":"Decoration Options"},n(E.MenuItem,{id:Ge("decoration-context-menu-copy-hash"),label:"Copy Decoration Hash",icon:xa,action:()=>Et.copy(e.hash)}),e.authorId===L.getCurrentUser().id&&n(E.MenuItem,{id:Ge("decoration-context-menu-delete"),label:"Delete Decoration",color:"danger",icon:Pi,action:()=>rt.show({title:"Delete Decoration",body:`Are you sure you want to delete ${e.alt}?`,confirmText:"Delete",confirmColor:Ge("danger-btn"),cancelText:"Cancel",onConfirm(){t(e)}})}))}var LT=f(()=>{"use strict";a();bt();b();Ts();zr()});function N1(e){let{decoration:t}=e;return n(P1,{...e,onContextMenu:o=>{Jt.openContextMenu(o,()=>n(A1,{decoration:t}))},avatarDecoration:rp(t)})}var ET=f(()=>{"use strict";a();b();ip();Oi();LT()});function C1({renderItem:e,getItemKey:t,itemKeyPrefix:o,items:r}){return n("div",{className:Ge("sectioned-grid-list-grid")},r.map(i=>n(H.Fragment,{key:`${o?`${o}-`:""}${t(i)}`},e(i))))}var OT=f(()=>{"use strict";a();b();zr()});function R1(e){return n("div",{className:q(Ge("sectioned-grid-list-container"),I3.thin)},e.sections.map(t=>n("div",{key:e.getSectionKey(t),className:Ge("sectioned-grid-list-section")},e.renderSectionHeader(t),n(C1,{renderItem:e.renderItem,getItemKey:e.getItemKey,itemKeyPrefix:e.getSectionKey(t),items:t.items}))))}var I3,_T=f(()=>{"use strict";a();be();$();zr();OT();I3=C("managedReactiveScroller")});function C3(e){let[t,o]=K(null);return ce(()=>{if(!e)return;let r=URL.createObjectURL(e);return o(r),()=>{URL.revokeObjectURL(r),o(null)}},[e]),t}function R3(e){let[t,o]=K(""),[r,i]=K(null),[s,l]=K(!1),[u,c]=K(null);ce(()=>{u&&c(null)},[r]);let{create:m}=Dn(),g=C3(r),y=wt(()=>g?{asset:g,skuId:tp}:null,[g]);return n(fe,{...e,size:"medium",className:ws.modal},n(Ee,{separator:!1,className:Ge("modal-header")},n(Z,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Create Decoration"),n(ut,{onClick:e.onClose})),n(we,{className:Ge("create-decoration-modal-content"),scrollbarType:"none"},n(k,null,n(A3,{messageType:N3.WARNING},"Make sure your decoration does not violate ",n(qe,{href:"https://github.com/decor-discord/.github/blob/main/GUIDELINES.md"},"the guidelines")," before submitting it."),n("div",{className:Ge("create-decoration-modal-form-preview-container")},n("div",{className:Ge("create-decoration-modal-form")},u!==null&&n(Z,{color:"text-danger",variant:"text-xs/normal"},u.message),n(S.FormSection,{title:"File"},n(M3,{filename:r?.name,placeholder:"Choose a file",buttonText:"Browse",filters:[{name:"Decoration file",extensions:["png","apng"]}],onFileSelect:i}),n(S.FormText,{type:"description",className:G.top8},"File should be APNG or PNG.")),n(S.FormSection,{title:"Name"},n(je,{placeholder:"Companion Cube",value:t,onChange:o}),n(S.FormText,{type:"description",className:G.top8},"This name will be used when referring to this decoration."))),n("div",null,n(sp,{avatarDecorationOverride:y,user:L.getCurrentUser()}))),n(S.FormText,{type:"description",className:G.bottom16},n("br",null),"You can receive updates on your decoration's review by joining ",n(qe,{href:`https://discord.gg/${al}`,onClick:async v=>{v.preventDefault(),se.getGuild(bs)?(An(),F.dispatch({type:"LAYER_POP_ALL"}),Bn.transitionToGuild(bs)):await Ti(al)&&(An(),F.dispatch({type:"LAYER_POP_ALL"}))}},"Decor's Discord server"),"."))),n(ct,{className:Ge("modal-footer")},n(T,{onClick:()=>{l(!0),m({alt:t,file:r}).then(e.onClose).catch(v=>{l(!1),c(v)})},disabled:!r||!t,submitting:s},"Submit for Review"),n(T,{onClick:e.onClose,color:T.Colors.PRIMARY,look:T.Looks.LINK},"Cancel")))}var M3,A3,N3,ap,k1=f(()=>{"use strict";a();re();ho();pt();Ze();$e();$();b();Gr();Ts();zr();Oi();M3=ve("fileUploadInput,"),{HelpMessage:A3,HelpMessageTypes:N3}=oo('POSITIVE=3]="POSITIVE',{HelpMessageTypes:ae.byProps("POSITIVE","WARNING"),HelpMessage:ae.byCode(".iconDiv")});ap=()=>Promise.all([xs(),NT()]).then(()=>ue(e=>n(R3,{...e})))});function k3(e){return n(fe,{...e,size:"small",className:ws.modal},n(Ee,{separator:!1,className:Ge("modal-header")},n(Z,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Hold on"),n(ut,{onClick:e.onClose})),n(we,{scrollbarType:"none"},n(S.FormText,null,"By submitting a decoration, you agree to ",n(qe,{href:"https://github.com/decor-discord/.github/blob/main/GUIDELINES.md"},"the guidelines"),". Not reading these guidelines may get your account suspended from creating more decorations in the future.")),n(ct,{className:Ge("modal-footer")},n(T,{onClick:()=>{Ps.store.agreedToGuidelines=!0,e.onClose(),ap()}},"Continue"),n(T,{onClick:e.onClose,color:T.Colors.PRIMARY,look:T.Looks.LINK},"Go Back")))}var BT,FT=f(()=>{"use strict";a();ho();$e();b();lp();zr();k1();BT=()=>xs().then(()=>ue(e=>n(k3,{...e})))});function L3(){let[e,t]=K([]);return ce(()=>{MT().then(t)},[]),e}function E3({section:e}){let t=typeof e.subtitle<"u",o=typeof e.authorIds<"u",[r,i]=K([]);return ce(()=>{(async()=>{if(!!e.authorIds)for(let s of e.authorIds){let l=L.getUser(s)??await no.getUser(s);i(u=>[...u,l])}})()},[e.authorIds]),n("div",null,n(pe,null,n(S.FormTitle,{style:{flexGrow:1}},e.title),o&&n(D3,{users:r,guildId:void 0,renderIcon:!1,max:5,showDefaultAvatarsForNullUsers:!0,size:16,showUserPopout:!0,className:G.bottom8})),t&&n(S.FormText,{type:"description",className:G.bottom8},e.subtitle))}function O3(e){let[t,o]=K(void 0),r=typeof t<"u",i=t!=null?rp(t):t,{decorations:s,selectedDecoration:l,fetch:u,select:c}=Dn();ce(()=>{u()},[]);let m=r?t:l,g=typeof m?.authorId<"u",y=s.some(D=>D.reviewed===!1),v=L3(),M=v.flatMap(D=>D.decorations),x=v.find(D=>D.id===m?.presetId),N=typeof x<"u",R=[{title:"Your Decorations",subtitle:"You can delete your own decorations by right clicking on them.",sectionKey:"ownDecorations",items:["none",...s.filter(D=>!M.some(B=>B.hash===D.hash)),"create"]},...v.map(D=>({title:D.name,subtitle:D.description||void 0,sectionKey:`preset-${D.id}`,items:D.decorations,authorIds:D.authorIds}))];return n(fe,{...e,size:"dynamic",className:ws.modal},n(Ee,{separator:!1,className:Ge("modal-header")},n(Z,{color:"header-primary",variant:"heading-lg/semibold",tag:"h1",style:{flexGrow:1}},"Change Decoration"),n(ut,{onClick:e.onClose})),n(we,{className:Ge("change-decoration-modal-content"),scrollbarType:"none"},n(k,null,n(R1,{renderItem:D=>{if(typeof D=="string")switch(D){case"none":return n(M1,{className:Ge("change-decoration-modal-decoration"),isSelected:m===null,onSelect:()=>o(null)});case"create":return n(oe,{text:"You already have a decoration pending review",shouldShow:y},B=>n(I1,{className:Ge("change-decoration-modal-decoration"),...B,onSelect:y?()=>{}:Ps.store.agreedToGuidelines?ap:BT}))}else return n(oe,{text:"Pending review",shouldShow:D.reviewed===!1},B=>n(N1,{...B,className:Ge("change-decoration-modal-decoration"),onSelect:D.reviewed!==!1?()=>o(D):()=>{},isSelected:m?.hash===D.hash,decoration:D}))},getItemKey:D=>typeof D=="string"?D:D.hash,getSectionKey:D=>D.sectionKey,renderSectionHeader:D=>n(E3,{section:D}),sections:R}),n("div",{className:Ge("change-decoration-modal-preview")},n(sp,{avatarDecorationOverride:i,user:L.getCurrentUser()}),N&&n(S.FormTitle,{className:""},"Part of the ",x.name," Preset"),typeof m=="object"&&n(Z,{variant:"text-sm/semibold",color:"header-primary"},m?.alt),g&&n(Z,{key:`createdBy-${m.authorId}`},"Created by ",Pe.parse(`<@${m.authorId}>`))))),n(ct,{className:q(Ge("change-decoration-modal-footer",Ge("modal-footer")))},n("div",{className:Ge("change-decoration-modal-footer-btn-container")},n(T,{onClick:()=>{c(t).then(e.onClose)},disabled:!r},"Apply"),n(T,{onClick:e.onClose,color:T.Colors.PRIMARY,look:T.Looks.LINK},"Cancel")),n("div",{className:Ge("change-decoration-modal-footer-btn-container")},n(T,{onClick:()=>rt.show({title:"Log Out",body:"Are you sure you want to log out of Decor?",confirmText:"Log Out",confirmColor:Ge("danger-btn"),cancelText:"Cancel",onConfirm(){Hr.getState().remove(L.getCurrentUser().id),e.onClose()}}),color:T.Colors.PRIMARY,look:T.Looks.LINK},"Log Out"),n(oe,{text:"Join Decor's Discord Server for notifications on your decoration's review, and when new presets are released"},D=>n(T,{...D,onClick:async()=>{se.getGuild(bs)?(e.onClose(),F.dispatch({type:"LAYER_POP_ALL"}),Bn.transitionToGuild(bs)):await Ti(al)&&(An(),F.dispatch({type:"LAYER_POP_ALL"}))},color:T.Colors.PRIMARY,look:T.Looks.LINK},"Discord Server")))))}var D3,D1,UT=f(()=>{"use strict";a();re();Rt();pt();Ze();be();$e();$();b();np();Gr();ll();Ts();ip();lp();zr();Oi();kT();DT();ET();_T();k1();FT();D3=ve("defaultRenderUser","showDefaultAvatarsForNullUsers");D1=()=>xs().then(()=>ue(e=>n(O3,{...e})))});function ul({hideTitle:e=!1,hideDivider:t=!1,noMargin:o=!1}){let r=Hr(),{selectedDecoration:i,select:s,fetch:l}=Dn();return ce(()=>{r.isAuthorized()&&l()},[r.token]),n(_3,{title:!e&&"Decor",hasBackground:!0,hideDivider:t,className:o&&Ge("section-remove-margin")},n(pe,null,n(T,{onClick:()=>{r.isAuthorized()?D1():r.authorize().then(D1).catch(()=>{})},size:T.Sizes.SMALL},"Change Decoration"),i&&r.isAuthorized()&&n(T,{onClick:()=>s(null),color:T.Colors.PRIMARY,size:T.Sizes.SMALL,look:T.Looks.LINK},"Remove Decoration")))}var _3,L1=f(()=>{"use strict";a();Rt();$();b();ll();Ts();zr();UT();_3=ye(".customizationSectionBackground")});var Ps,lp=f(()=>{"use strict";a();_();ho();Ze();be();$e();w();b();L1();Ps=A({changeDecoration:{type:6,description:"Change your avatar decoration",component(){return Vencord.Plugins.plugins.Decor.started?n("div",null,n(ul,{hideTitle:!0,hideDivider:!0,noMargin:!0}),n(S.FormText,{type:"description",className:q(G.top8,G.bottom8)},"You can also access Decor decorations from the ",n(qe,{href:"/settings/profile-customization",onClick:e=>{e.preventDefault(),An(),F.dispatch({type:"USER_SETTINGS_MODAL_SET_SECTION",section:"Profile Customization"})}},"Profiles")," page.")):n(S.FormText,null,"Enable Decor and restart your client to change your avatar decoration.")}},agreedToGuidelines:{type:3,description:"Agreed to guidelines",hidden:!0,default:!1}})});var cp,$T=f(()=>{"use strict";a();vT();re();P();w();b();Gr();ll();Ts();x1();lp();Oi();L1();cp=h({name:"Decor",description:"Create and use your own custom avatar decorations, or pick your favorite from the presets.",authors:[p.FieryFlames],patches:[{find:"getAvatarDecorationURL:",replacement:{match:/(?<=function \i\(\i\){)(?=let{avatarDecoration)/,replace:"const vcDecorDecoration=$self.getDecorAvatarDecorationURL(arguments[0]);if(vcDecorDecoration)return vcDecorDecoration;"}},{find:"DefaultCustomizationSections",replacement:{match:/(?<=USER_SETTINGS_AVATAR_DECORATION},"decoration"\),)/,replace:"$self.DecorSection(),"}},{find:".decorationGridItem,",replacement:[{match:/(?<==)\i=>{let{children.{20,100}decorationGridItem/,replace:"$self.DecorationGridItem=$&"},{match:/(?<==)\i=>{let{user:\i,avatarDecoration.{300,600}decorationGridItemChurned/,replace:"$self.DecorationGridDecoration=$&"},{match:/(?<=\.\i\.PREMIUM_PURCHASE&&\i)(?<=avatarDecoration:(\i).+?)/,replace:"||$1.skuId===$self.SKU_ID"}]},{find:"isAvatarDecorationAnimating:",group:!0,replacement:[{match:/(?<=TryItOut:\i,guildId:\i}\),)(?<=user:(\i).+?)/,replace:"vcDecorAvatarDecoration=$self.useUserDecorAvatarDecoration($1),"},{match:/(?<={avatarDecoration:).{1,20}?(?=,)(?<=avatarDecorationOverride:(\i).+?)/,replace:"$1??vcDecorAvatarDecoration??($&)"},{match:/(?<=size:\i}\),\[)/,replace:"vcDecorAvatarDecoration,"}]},{find:"renderAvatarWithPopout(){",replacement:[{match:/(?<=\i\)\({avatarDecoration:)(\i).avatarDecoration(?=,)/,replace:"$self.useUserDecorAvatarDecoration($1)??$&"}]}],settings:Ps,flux:{CONNECTION_OPEN:()=>{Hr.getState().init(),Dn.getState().clear(),er.getState().fetch(L.getCurrentUser().id,!0)},USER_PROFILE_MODAL_OPEN:e=>{er.getState().fetch(e.userId,!0)}},set DecorationGridItem(e){CT(e)},set DecorationGridDecoration(e){RT(e)},SKU_ID:Ei,useUserDecorAvatarDecoration:AT,async start(){er.getState().fetch(L.getCurrentUser().id,!0)},getDecorAvatarDecorationURL({avatarDecoration:e,canAnimate:t}){if(e?.skuId===Ei){let o=e.asset.split("_");return e.asset.startsWith("a_")&&!t&&o.shift(),`${bT}/${o.join("_")}.png`}else if(e?.skuId===tp)return e.asset},DecorSection:k.wrap(ul)})});var up,GT=f(()=>{"use strict";a();_();P();w();gn("DisableCallIdle","DisableDMCallIdle");up=h({name:"DisableCallIdle",description:"Disables automatically getting kicked from a DM voice call after 3 minutes and being moved to an AFK voice channel.",authors:[p.Nuckyz],patches:[{find:".Messages.BOT_CALL_IDLE_DISCONNECT",replacement:{match:/,?(?=\i\(this,"idleTimeout",new \i\.\i\))/,replace:";return;"}},{find:"handleIdleUpdate(){",replacement:{match:/(?<=_initialize\(\){)/,replace:"return;"}}]})});var pp,HT=f(()=>{"use strict";a();P();w();b();pp=h({name:"DontRoundMyTimestamps",authors:[p.Lexi],description:"Always rounds relative timestamps down, so 7.6y becomes 7y instead of 8y",start(){Ir.relativeTimeRounding(Math.floor)},stop(){Ir.relativeTimeRounding(Math.round)}})});function E1(e){return e.t==="Emoji"?`${location.protocol}//${window.GLOBAL_ENV.CDN_HOST}/emojis/${e.id}.${e.isAnimated?"gif":"png"}?size=4096&lossless=true`:`${window.GLOBAL_ENV.MEDIA_PROXY_ENDPOINT}/stickers/${e.id}.${U3[e.format_type]}?size=4096&lossless=true`}async function zT(e){let t=B3.getStickerById(e);if(t)return t;let{body:o}=await St.get({url:yt.Endpoints.STICKER(e)});return F.dispatch({type:"STICKER_FETCH_SUCCESS",sticker:o}),o}async function $3(e,t){let o=new FormData;o.append("name",t.name),o.append("tags",t.tags),o.append("description",t.description),o.append("file",await jT(E1(t)));let{body:r}=await St.post({url:yt.Endpoints.GUILD_STICKER_PACKS(e),body:o});F.dispatch({type:"GUILD_STICKERS_CREATE_SUCCESS",guildId:e,sticker:{...r,user:L.getCurrentUser()}})}async function G3(e,t){let o=await jT(E1(t)),r=await new Promise(i=>{let s=new FileReader;s.onload=()=>i(s.result),s.readAsDataURL(o)});return F3({guildId:e,name:t.name.split("~")[0],image:r})}function H3(e){let t=L.getCurrentUser().id;return Object.values(se.getGuilds()).filter(o=>{if(!(o.ownerId===t||(We.getGuildPermissions({id:o.id})&Ie.CREATE_GUILD_EXPRESSIONS)===Ie.CREATE_GUILD_EXPRESSIONS))return!1;if(e.t==="Sticker")return!0;let{isAnimated:i}=e,s=o.getMaxEmojiSlots(),{emojis:l}=sn.getGuilds()[o.id],u=0;for(let c of l)c.animated===i&&!c.managed&&u++;return u<s}).sort((o,r)=>o.name.localeCompare(r.name))}async function jT(e){let t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch ${e} - ${t.status}`);return t.blob()}async function z3(e,t){try{t.t==="Sticker"?await $3(e,t):await G3(e,t),V.show({message:`Successfully cloned ${t.name} to ${se.getGuild(e)?.name??"your server"}!`,type:V.Type.SUCCESS,id:V.genId()})}catch(o){let r="Something went wrong (check console!)";try{r=JSON.parse(o.text).message}catch{}new Q("EmoteCloner").error("Failed to clone",t.name,"to",e,o),V.show({message:"Failed to clone: "+r,type:V.Type.FAILURE,id:V.genId()})}}function q3({data:e}){let[t,o]=H.useState(!1),[r,i]=H.useState(e.name),[s,l]=H.useReducer(c=>c+1,0),u=H.useMemo(()=>H3(e),[e.id,s]);return n(d,null,n(S.FormTitle,{className:G.top20},"Custom Name"),n(ba,{value:r,onChange:c=>{e.name=c,i(c)},validate:c=>e.t==="Emoji"&&c.length>2&&c.length<32&&W3.test(c)||e.t==="Sticker"&&c.length>2&&c.length<30||"Name must be between 2 and 32 characters and only contain alphanumeric characters"}),n("div",{style:{display:"flex",flexWrap:"wrap",gap:"1em",padding:"1em 0.5em",justifyContent:"center",alignItems:"center"}},u.map(c=>n(oe,{text:c.name},({onMouseLeave:m,onMouseEnter:g})=>n("div",{onMouseLeave:m,onMouseEnter:g,role:"button","aria-label":"Clone to "+c.name,"aria-disabled":t,style:{borderRadius:"50%",backgroundColor:"var(--background-secondary)",display:"inline-flex",justifyContent:"center",alignItems:"center",width:"4em",height:"4em",cursor:t?"not-allowed":"pointer",filter:t?"brightness(50%)":"none"},onClick:t?void 0:async()=>{o(!0),z3(c.id,e).finally(()=>{l(),o(!1)})}},c.icon?n("img",{"aria-hidden":!0,style:{borderRadius:"50%",width:"100%",height:"100%"},src:c.getIconURL(512,!0),alt:c.name}):n(S.FormText,{style:{fontSize:j3(c.acronym),width:"100%",overflow:"hidden",whiteSpace:"nowrap",textAlign:"center",cursor:t?"not-allowed":"pointer"}},c.acronym))))))}function dp(e,t){return n(E.MenuItem,{id:"emote-cloner",key:"emote-cloner",label:`Clone ${e}`,action:()=>Sa(async()=>{let o=await t(),r={t:e,...o},i=E1(r);return s=>n(fe,{...s},n(Ee,null,n("img",{role:"presentation","aria-hidden":!0,src:i,alt:"",height:24,width:24,style:{marginRight:"0.5em"}}),n(S.FormText,null,"Clone ",r.name)),n(we,null,n(q3,{data:r})))})})}function WT(e){return new URL(e).pathname.endsWith(".gif")}var B3,F3,U3,j3,W3,K3,Y3,mp,qT=f(()=>{"use strict";a();So();Pc();P();ke();Ze();$e();w();$();b();B3=me("StickersStore"),F3=ye(".GUILD_EMOJIS(","EMOJI_UPLOAD_START"),U3=[,"png","png","json","gif"];j3=e=>[20,20,18,18,16,14,12][e.length]??4,W3=/^\w+$/i;K3=(e,t)=>{let{favoriteableId:o,itemHref:r,itemSrc:i,favoriteableType:s}=t??{};if(!o)return;let l=(()=>{switch(s){case"emoji":let u=t.message.content.match(RegExp(`<a?:(\\w+)(?:~\\d+)?:${o}>|https://cdn\\.discordapp\\.com/emojis/${o}\\.`)),c=t.message.reactions.find(y=>y.emoji.id===o);if(!u&&!c)return;let m=(u&&u[1])??c?.emoji.name??"FakeNitroEmoji";return dp("Emoji",()=>({id:o,name:m,isAnimated:WT(r??i)}));case"sticker":return t.message.stickerItems.find(y=>y.id===o)?.format_type===3?void 0:dp("Sticker",()=>zT(o))}})();l&&tt("copy-link",e)?.push(l)},Y3=(e,t)=>{let{id:o,name:r,type:i}=t?.target?.dataset??{};if(!!o)if(i==="emoji"&&r){let s=t.target.firstChild;e.push(dp("Emoji",()=>({id:o,name:r,isAnimated:s&&WT(s.src)})))}else i==="sticker"&&!t.target.className?.includes("lottieCanvas")&&e.push(dp("Sticker",()=>zT(o)))},mp=h({name:"EmoteCloner",description:"Allows you to clone Emotes & Stickers to your own server (right click them)",tags:["StickerCloner"],authors:[p.Ven,p.Nuckyz],contextMenus:{message:K3,"expression-picker":Y3}})});var O1,KT=f(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/experiments/hideBugReport.css",{name:"src/plugins/experiments/hideBugReport.css",source:`#staff-help-popout-staff-help-bug-reporter {
|
|
display: none;
|
|
}
|
|
`,classNames:{},dom:null});O1="src/plugins/experiments/hideBugReport.css"});var fp,YT,gp,ZT=f(()=>{"use strict";a();_();Ve();re();yi();P();Ze();w();$();b();KT();fp=C("key","combo"),YT=A({toolbarDevMenu:{type:3,description:"Change the Help (?) toolbar button (top right in chat) to Discord's developer menu",default:!1,restartNeeded:!0}}),gp=h({name:"Experiments",description:"Enable Access to Experiments & other dev-only features in Discord!",authors:[p.Megu,p.Ven,p.Nickyux,p.BanTheNons,p.Nuckyz],settings:YT,patches:[{find:"Object.defineProperties(this,{isDeveloper",replacement:{match:/(?<={isDeveloper:\{[^}]+?,get:\(\)=>)\i/,replace:"true"}},{find:'type:"user",revision',replacement:{match:/!(\i)&&"CONNECTION_OPEN".+?;/g,replace:"$1=!0;"}},{find:'H1,title:"Experiments"',replacement:{match:'title:"Experiments",children:[',replace:"$&$self.WarningCard(),"}},{find:"toolbar:function",replacement:{match:/\i\.isStaff\(\)/,replace:"true"},predicate:()=>YT.store.toolbarDevMenu},{find:"useCanFavoriteChannel",replacement:{match:/!\(\i\.isDM\(\)\|\|\i\.isThread\(\)\)/,replace:"true"}}],start:()=>zt(O1),stop:()=>go(O1),settingsAboutComponent:()=>{let e=navigator.platform.includes("Mac"),t=e?"cmd":"ctrl",o=e?"opt":"alt";return n(H.Fragment,null,n(S.FormTitle,{tag:"h3"},"More Information"),n(S.FormText,{variant:"text-md/normal"},"You can open Discord's DevTools via "," ",n("div",{className:fp.combo,style:{display:"inline-flex"}},n("kbd",{className:fp.key},t)," +"," ",n("kbd",{className:fp.key},o)," +"," ",n("kbd",{className:fp.key},"O")," ")))},WarningCard:k.wrap(()=>n(mo,{id:"vc-experiments-warning-card",className:G.bottom16},n(S.FormTitle,{tag:"h2"},"Hold on!!"),n(S.FormText,null,"Experiments are unreleased Discord features. They might not work, or even break your client or get your account disabled."),n(S.FormText,{className:G.top8},"Only use experiments if you know what you're doing. Vencord is not responsible for any damage caused by enabling experiments. If you don't know what an experiment does, ignore it. Do not ask us what experiments do either, we probably don't know."),n(S.FormText,{className:G.top8},'No, you cannot use server-side features like checking the "Send to Client" box.')),{noop:!0})})});var hp,XT=f(()=>{"use strict";a();P();w();hp=h({name:"F8Break",description:"Pause the client when you press F8 with DevTools (+ breakpoints) open.",authors:[p.lewisakura],start(){window.addEventListener("keydown",this.event)},stop(){window.removeEventListener("keydown",this.event)},event(e){if(e.code==="F8")debugger}})});var QT=oi((EV,JT)=>{"use strict";a();var tr=JT.exports;(function e(t,o,r){function i(u,c){if(!o[u]){if(!t[u]){var m=typeof qi=="function"&&qi;if(!c&&m)return m(u,!0);if(s)return s(u,!0);throw new Error("Cannot find module '"+u+"'")}var g=o[u]={exports:{}};t[u][0].call(g.exports,function(y){var v=t[u][1][y];return i(v||y)},g,g.exports,e,t,o,r)}return o[u].exports}for(var s=typeof qi=="function"&&qi,l=0;l<r.length;l++)i(r[l]);return i})({1:[function(e,t,o){(function(r,i){var s,l;s=this,l=function(){"use strict";function u(O){return typeof O=="function"}var c=Array.isArray?Array.isArray:function(O){return Object.prototype.toString.call(O)==="[object Array]"},m=0,g=void 0,y=void 0,v=function(O,X){B[m]=O,B[m+1]=X,(m+=2)===2&&(y?y(z):ne())},M=typeof window<"u"?window:void 0,x=M||{},N=x.MutationObserver||x.WebKitMutationObserver,I=typeof tr>"u"&&r!==void 0&&{}.toString.call(r)==="[object process]",R=typeof Uint8ClampedArray<"u"&&typeof importScripts<"u"&&typeof MessageChannel<"u";function D(){var O=setTimeout;return function(){return O(z,1)}}var B=new Array(1e3);function z(){for(var O=0;O<m;O+=2)(0,B[O])(B[O+1]),B[O]=void 0,B[O+1]=void 0;m=0}var Y,ee,J,U,ne=void 0;function ie(O,X){var de=this,le=new this.constructor(Ke);le[he]===void 0&&yr(le);var Re=de._state;if(Re){var Je=arguments[Re-1];v(function(){return Ut(Re,le,Je,de._result)})}else Io(de,le,O,X);return le}function Ne(O){if(O&&typeof O=="object"&&O.constructor===this)return O;var X=new this(Ke);return Ae(X,O),X}ne=I?function(){return r.nextTick(z)}:N?(ee=0,J=new N(z),U=document.createTextNode(""),J.observe(U,{characterData:!0}),function(){U.data=ee=++ee%2}):R?((Y=new MessageChannel).port1.onmessage=z,function(){return Y.port2.postMessage(0)}):M===void 0&&typeof e=="function"?function(){try{var O=Function("return this")().require("vertx");return(g=O.runOnLoop||O.runOnContext)!==void 0?function(){g(z)}:D()}catch{return D()}}():D();var he=Math.random().toString(36).substring(2);function Ke(){}var Ce=void 0,Oe=1,He=2;function ze(O,X,de){v(function(le){var Re=!1,Je=function(qt,Ln,ti,oC){try{qt.call(Ln,ti,oC)}catch(nC){return nC}}(de,X,function(qt){Re||(Re=!0,X!==qt?Ae(le,qt):gt(le,qt))},function(qt){Re||(Re=!0,Ye(le,qt))},le._label);!Re&&Je&&(Re=!0,Ye(le,Je))},O)}function _e(O,X,de){X.constructor===O.constructor&&de===ie&&X.constructor.resolve===Ne?function(le,Re){Re._state===Oe?gt(le,Re._result):Re._state===He?Ye(le,Re._result):Io(Re,void 0,function(Je){return Ae(le,Je)},function(Je){return Ye(le,Je)})}(O,X):de===void 0?gt(O,X):u(de)?ze(O,X,de):gt(O,X)}function Ae(O,X){if(O===X)Ye(O,new TypeError("You cannot resolve a promise with itself"));else if(function(le){var Re=typeof le;return le!==null&&(Re=="object"||Re=="function")}(X)){var de=void 0;try{de=X.then}catch(le){return void Ye(O,le)}_e(O,X,de)}else gt(O,X)}function Ft(O){O._onerror&&O._onerror(O._result),Wt(O)}function gt(O,X){O._state===Ce&&(O._result=X,O._state=Oe,O._subscribers.length!==0&&v(Wt,O))}function Ye(O,X){O._state===Ce&&(O._state=He,O._result=X,v(Ft,O))}function Io(O,X,de,le){var Re=O._subscribers,Je=Re.length;O._onerror=null,Re[Je]=X,Re[Je+Oe]=de,Re[Je+He]=le,Je===0&&O._state&&v(Wt,O)}function Wt(O){var X=O._subscribers,de=O._state;if(X.length!==0){for(var le=void 0,Re=void 0,Je=O._result,qt=0;qt<X.length;qt+=3)le=X[qt],Re=X[qt+de],le?Ut(de,le,Re,Je):Re(Je);O._subscribers.length=0}}function Ut(O,X,de,le){var Re=u(de),Je=void 0,qt=void 0,Ln=!0;if(Re){try{Je=de(le)}catch(ti){Ln=!1,qt=ti}if(X===Je)return void Ye(X,new TypeError("A promises callback cannot return that same promise."))}else Je=le;X._state!==Ce||(Re&&Ln?Ae(X,Je):Ln===!1?Ye(X,qt):O===Oe?gt(X,Je):O===He&&Ye(X,Je))}var Qr=0;function yr(O){O[he]=Qr++,O._state=void 0,O._result=void 0,O._subscribers=[]}var vr=(Vr.prototype._enumerate=function(O){for(var X=0;this._state===Ce&&X<O.length;X++)this._eachEntry(O[X],X)},Vr.prototype._eachEntry=function(O,X){var de=this._instanceConstructor,le=de.resolve;if(le===Ne){var Re=void 0,Je=void 0,qt=!1;try{Re=O.then}catch(ti){qt=!0,Je=ti}if(Re===ie&&O._state!==Ce)this._settledAt(O._state,X,O._result);else if(typeof Re!="function")this._remaining--,this._result[X]=O;else if(de===to){var Ln=new de(Ke);qt?Ye(Ln,Je):_e(Ln,O,Re),this._willSettleAt(Ln,X)}else this._willSettleAt(new de(function(ti){return ti(O)}),X)}else this._willSettleAt(le(O),X)},Vr.prototype._settledAt=function(O,X,de){var le=this.promise;le._state===Ce&&(this._remaining--,O===He?Ye(le,de):this._result[X]=de),this._remaining===0&>(le,this._result)},Vr.prototype._willSettleAt=function(O,X){var de=this;Io(O,void 0,function(le){return de._settledAt(Oe,X,le)},function(le){return de._settledAt(He,X,le)})},Vr);function Vr(O,X){this._instanceConstructor=O,this.promise=new O(Ke),this.promise[he]||yr(this.promise),c(X)?(this.length=X.length,this._remaining=X.length,this._result=new Array(this.length),this.length===0?gt(this.promise,this._result):(this.length=this.length||0,this._enumerate(X),this._remaining===0&>(this.promise,this._result))):Ye(this.promise,new Error("Array Methods must be provided an Array"))}var to=(ei.prototype.catch=function(O){return this.then(null,O)},ei.prototype.finally=function(O){var X=this.constructor;return u(O)?this.then(function(de){return X.resolve(O()).then(function(){return de})},function(de){return X.resolve(O()).then(function(){throw de})}):this.then(O,O)},ei);function ei(O){this[he]=Qr++,this._result=this._state=void 0,this._subscribers=[],Ke!==O&&(typeof O!="function"&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof ei?function(X,de){try{de(function(le){Ae(X,le)},function(le){Ye(X,le)})}catch(le){Ye(X,le)}}(this,O):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return to.prototype.then=ie,to.all=function(O){return new vr(this,O).promise},to.race=function(O){var X=this;return c(O)?new X(function(de,le){for(var Re=O.length,Je=0;Je<Re;Je++)X.resolve(O[Je]).then(de,le)}):new X(function(de,le){return le(new TypeError("You must pass an array to race."))})},to.resolve=Ne,to.reject=function(O){var X=new this(Ke);return Ye(X,O),X},to._setScheduler=function(O){y=O},to._setAsap=function(O){v=O},to._asap=v,to.polyfill=function(){var O=void 0;if(i!==void 0)O=i;else if(typeof tr<"u")O=tr;else try{O=Function("return this")()}catch{throw new Error("polyfill failed because global object is unavailable in this environment")}var X=O.Promise;if(X){var de=null;try{de=Object.prototype.toString.call(X.resolve())}catch{}if(de==="[object Promise]"&&!X.cast)return}O.Promise=to},to.Promise=to},typeof o=="object"&&t!==void 0?t.exports=l():typeof define=="function"&&define.amd?define(l):s.ES6Promise=l()}).call(this,e("VCmEsw"),typeof tr<"u"?tr:typeof window<"u"?window:{})},{VCmEsw:2}],2:[function(e,t,o){var r=t.exports={};function i(){}r.nextTick=function(){var s=typeof window<"u"&&window.setImmediate,l=typeof window<"u"&&window.postMessage&&window.addEventListener;if(s)return function(c){return window.setImmediate(c)};if(l){var u=[];return window.addEventListener("message",function(c){var m=c.source;m!==window&&m!==null||c.data!=="process-tick"||(c.stopPropagation(),0<u.length&&u.shift()())},!0),function(c){u.push(c),window.postMessage("process-tick","*")}}return function(c){setTimeout(c,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.on=i,r.addListener=i,r.once=i,r.off=i,r.removeListener=i,r.removeAllListeners=i,r.emit=i,r.binding=function(s){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(s){throw new Error("process.chdir is not supported")}},{}],3:[function(e,t,o){"use strict";t.exports=function(){this.width=0,this.height=0,this.numPlays=0,this.playTime=0,this.frames=[],this.play=function(){u||c||(this.rewind(),u=!0,requestAnimationFrame(g))},this.rewind=function(){s=i=0,l=null,c=u=!1},this.addContext=function(v){if(0<m.length){var M=m[0].getImageData(0,0,this.width,this.height);v.putImageData(M,0,0)}m.push(v),v._apng_animation=this},this.removeContext=function(v){var M=m.indexOf(v);M!==-1&&(m.splice(M,1),m.length===0&&this.rewind(),"_apng_animation"in v&&delete v._apng_animation)},this.isPlayed=function(){return u},this.isFinished=function(){return c};var r=this,i=0,s=0,l=null,u=!1,c=!1,m=[],g=function(v){for(;u&&i<=v;)y(v);u&&requestAnimationFrame(g)},y=function(v){var M=s++%r.frames.length,x=r.frames[M];if(r.numPlays==0||s/r.frames.length<=r.numPlays){for(M==0&&(m.forEach(function(N){N.clearRect(0,0,r.width,r.height)}),l=null,x.disposeOp==2&&(x.disposeOp=1)),l&&l.disposeOp==1?m.forEach(function(N){N.clearRect(l.left,l.top,l.width,l.height)}):l&&l.disposeOp==2&&m.forEach(function(N){N.putImageData(l.iData,l.left,l.top)}),(l=x).iData=null,l.disposeOp==2&&(l.iData=m[0].getImageData(x.left,x.top,x.width,x.height)),x.blendOp==0&&m.forEach(function(N){N.clearRect(x.left,x.top,x.width,x.height)}),m.forEach(function(N){N.drawImage(x.img,x.left,x.top)}),i==0&&(i=v);v>i+r.playTime;)i+=r.playTime;i+=x.delay}else c=!(u=!1)}}},{}],4:[function(e,t,o){"use strict";for(var r=new Uint32Array(256),i=0;i<256;i++){for(var s=i,l=0;l<8;l++)s=1&s?3988292384^s>>>1:s>>>1;r[i]=s}t.exports=function(u,c,m){for(var g=-1,y=c=c||0,v=c+(m=m||u.length-c);y<v;y++)g=g>>>8^r[255&(g^u[y])];return-1^g}},{}],5:[function(e,t,o){(function(r){"use strict";var i=e("./support-test"),s=e("./parser"),l=e("./loader"),u=r.APNG={};u.checkNativeFeatures=i.checkNativeFeatures,u.ifNeeded=i.ifNeeded,u.parseBuffer=function(m){return s(m)};var c={};u.parseURL=function(m){return m in c||(c[m]=l(m).then(s)),c[m]},u.animateContext=function(m,g){return u.parseURL(m).then(function(y){return y.addContext(g),y.play(),y})},u.animateImage=function(m){return m.setAttribute("data-is-apng","progress"),u.parseURL(m.src).then(function(g){m.setAttribute("data-is-apng","yes");var y=document.createElement("canvas");y.width=g.width,y.height=g.height,Array.prototype.slice.call(m.attributes).forEach(function(R){["alt","src","usemap","ismap","data-is-apng","width","height"].indexOf(R.nodeName)==-1&&y.setAttributeNode(R.cloneNode(!1))}),y.setAttribute("data-apng-src",m.src),m.alt!=""&&y.appendChild(document.createTextNode(m.alt));var v="",M="",x=0,N="";m.style.width!=""&&m.style.width!="auto"?v=m.style.width:m.hasAttribute("width")&&(v=m.getAttribute("width")+"px"),m.style.height!=""&&m.style.height!="auto"?M=m.style.height:m.hasAttribute("height")&&(M=m.getAttribute("height")+"px"),v!=""&&M==""&&(x=parseFloat(v),N=v.match(/\D+$/)[0],M=Math.round(y.height*x/y.width)+N),M!=""&&v==""&&(x=parseFloat(M),N=M.match(/\D+$/)[0],v=Math.round(y.width*x/y.height)+N),y.style.width=v,y.style.height=M;var I=m.parentNode;I.insertBefore(y,m),I.removeChild(m),g.addContext(y.getContext("2d")),g.play()},function(){m.setAttribute("data-is-apng","no")})},u.releaseCanvas=function(m){var g=m.getContext("2d");"_apng_animation"in g&&g._apng_animation.removeContext(g)}}).call(this,typeof tr<"u"?tr:typeof window<"u"?window:{})},{"./loader":6,"./parser":7,"./support-test":8}],6:[function(e,t,o){"use strict";var r=r||e("es6-promise").Promise;t.exports=function(i){return new r(function(s,l){var u=new XMLHttpRequest;u.open("GET",i),u.responseType="arraybuffer",u.onload=function(){this.status==200?s(this.response):l(this)},u.send()})}},{"es6-promise":1}],7:[function(e,t,o){"use strict";var r=r||e("es6-promise").Promise,i=e("./animation"),s=e("./crc32"),l=new Uint8Array([137,80,78,71,13,10,26,10]);t.exports=function(N){var I=new Uint8Array(N);return new r(function(R,D){for(var B=0;B<l.length;B++)if(l[B]!=I[B])return void D("Not a PNG file (invalid file signature)");var z=!1;if(u(I,function(ze){return ze!="acTL"||!(z=!0)}),z){var Y=[],ee=[],J=null,U=null,ne=new i;if(u(I,function(ze,_e,Ae,Ft){switch(ze){case"IHDR":J=_e.subarray(Ae+8,Ae+8+Ft),ne.width=c(_e,Ae+8),ne.height=c(_e,Ae+12);break;case"acTL":ne.numPlays=c(_e,Ae+8+4);break;case"fcTL":U&&ne.frames.push(U),(U={}).width=c(_e,Ae+8+4),U.height=c(_e,Ae+8+8),U.left=c(_e,Ae+8+12),U.top=c(_e,Ae+8+16);var gt=m(_e,Ae+8+20),Ye=m(_e,Ae+8+22);Ye==0&&(Ye=100),U.delay=1e3*gt/Ye,U.delay<=10&&(U.delay=100),ne.playTime+=U.delay,U.disposeOp=g(_e,Ae+8+24),U.blendOp=g(_e,Ae+8+25),U.dataParts=[];break;case"fdAT":U&&U.dataParts.push(_e.subarray(Ae+8+4,Ae+8+Ft));break;case"IDAT":U&&U.dataParts.push(_e.subarray(Ae+8,Ae+8+Ft));break;case"IEND":ee.push(y(_e,Ae,12+Ft));break;default:Y.push(y(_e,Ae,12+Ft))}}),U&&ne.frames.push(U),ne.frames.length!=0)for(var ie=0,Ne=new Blob(Y),he=new Blob(ee),Ke=0;Ke<ne.frames.length;Ke++){U=ne.frames[Ke];var Ce=[];Ce.push(l),J.set(M(U.width),0),J.set(M(U.height),4),Ce.push(x("IHDR",J)),Ce.push(Ne);for(var Oe=0;Oe<U.dataParts.length;Oe++)Ce.push(x("IDAT",U.dataParts[Oe]));Ce.push(he);var He=URL.createObjectURL(new Blob(Ce,{type:"image/png"}));delete U.dataParts,Ce=null,U.img=document.createElement("img"),U.img.onload=function(){URL.revokeObjectURL(this.src),++ie==ne.frames.length&&R(ne)},U.img.onerror=function(){D("Image creation error")},U.img.src=He}else D("Not an animated PNG")}else D("Not an animated PNG")})};var u=function(N,I){var R=8;do{var D=c(N,R),B=v(N,R+4,4),z=I(B,N,R,D);R+=12+D}while(z!==!1&&B!="IEND"&&R<N.length)},c=function(N,I){var R=0;R+=N[0+I]<<24>>>0;for(var D=1;D<4;D++)R+=N[D+I]<<8*(3-D);return R},m=function(N,I){for(var R=0,D=0;D<2;D++)R+=N[D+I]<<8*(1-D);return R},g=function(N,I){return N[I]},y=function(N,I,R){var D=new Uint8Array(R);return D.set(N.subarray(I,I+R)),D},v=function(N,I,R){var D=Array.prototype.slice.call(N.subarray(I,I+R));return String.fromCharCode.apply(String,D)},M=function(N){return[N>>>24&255,N>>>16&255,N>>>8&255,255&N]},x=function(N,I){var R=N.length+I.length,D=new Uint8Array(new ArrayBuffer(R+8));D.set(M(I.length),0),D.set(function(z){for(var Y=[],ee=0;ee<z.length;ee++)Y.push(z.charCodeAt(ee));return Y}(N),4),D.set(I,8);var B=s(D,4,R);return D.set(M(B),R+4),D}},{"./animation":3,"./crc32":4,"es6-promise":1}],8:[function(e,t,o){(function(r){"use strict";var i,s,l=l||e("es6-promise").Promise,u=(i=function(c){var m=document.createElement("canvas"),g={TypedArrays:"ArrayBuffer"in r,BlobURLs:"URL"in r,requestAnimationFrame:"requestAnimationFrame"in r,pageProtocol:location.protocol=="http:"||location.protocol=="https:",canvas:"getContext"in document.createElement("canvas"),APNG:!1};if(g.canvas){var y=new Image;y.onload=function(){var v=m.getContext("2d");v.drawImage(y,0,0),g.APNG=v.getImageData(0,0,1,1).data[3]===0,c(g)},y.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACGFjVEwAAAABAAAAAcMq2TYAAAANSURBVAiZY2BgYPgPAAEEAQB9ssjfAAAAGmZjVEwAAAAAAAAAAQAAAAEAAAAAAAAAAAD6A+gBAbNU+2sAAAARZmRBVAAAAAEImWNgYGBgAAAABQAB6MzFdgAAAABJRU5ErkJggg=="}else c(g)},s=null,function(c){return s=s||new l(i),c&&s.then(c),s});t.exports={checkNativeFeatures:u,ifNeeded:function(c){return c===void 0&&(c=!1),u().then(function(m){if(m.APNG&&!c)reject();else{var g=!0;for(var y in m)m.hasOwnProperty(y)&&y!="APNG"&&(g=g&&m[y])}})}}}).call(this,typeof tr<"u"?tr:typeof window<"u"?window:{})},{"es6-promise":1}]},{},[5])});var VT,ew,tw,ow,yp=f(()=>{"use strict";a();Mo();VT=xn(()=>QT().APNG),ew="https://unpkg.com/@vap/shiki-worker@0.0.8/dist/index.min.js",tw="https://unpkg.com/@vap/shiki@0.10.3/dist/onig.wasm",ow=xn(()=>import("https://unpkg.com/stegcloak-dist@1.0.0/index.js"))});var $1=oi(U1=>{a();var sw=Object.defineProperty,Z3=e=>sw(e,"__esModule",{value:!0}),X3=(e,t)=>{for(var o in t)sw(e,o,{get:t[o],enumerable:!0})};Z3(U1);X3(U1,{GIFEncoder:()=>mw,applyPalette:()=>ik,default:()=>gk,nearestColor:()=>ck,nearestColorIndex:()=>pw,nearestColorIndexWithDistance:()=>dw,prequantize:()=>rk,quantize:()=>ok,snapColorsToPalette:()=>lk});var J3={signature:"GIF",version:"89a",trailer:59,extensionIntroducer:33,applicationExtensionLabel:255,graphicControlExtensionLabel:249,imageSeparator:44,signatureSize:3,versionSize:3,globalColorTableFlagMask:128,colorResolutionMask:112,sortFlagMask:8,globalColorTableSizeMask:7,applicationIdentifierSize:8,applicationAuthCodeSize:3,disposalMethodMask:28,userInputFlagMask:2,transparentColorFlagMask:1,localColorTableFlagMask:128,interlaceFlagMask:64,idSortFlagMask:32,localColorTableSizeMask:7};function aw(e=256){let t=0,o=new Uint8Array(e);return{get buffer(){return o.buffer},reset(){t=0},bytesView(){return o.subarray(0,t)},bytes(){return o.slice(0,t)},writeByte(i){r(t+1),o[t]=i,t++},writeBytes(i,s=0,l=i.length){r(t+l);for(let u=0;u<l;u++)o[t++]=i[u+s]},writeBytesView(i,s=0,l=i.byteLength){r(t+l),o.set(i.subarray(s,s+l),t),t+=l}};function r(i){var s=o.length;if(s>=i)return;var l=1024*1024;i=Math.max(i,s*(s<l?2:1.125)>>>0),s!=0&&(i=Math.max(i,256));let u=o;o=new Uint8Array(i),t>0&&o.set(u.subarray(0,t),0)}}var _1=12,nw=5003,Q3=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function V3(e,t,o,r,i=aw(512),s=new Uint8Array(256),l=new Int32Array(nw),u=new Int32Array(nw)){let c=l.length,m=Math.max(2,r);s.fill(0),u.fill(0),l.fill(-1);let g=0,y=0,v=m+1,M=v,x=!1,N=M,I=(1<<N)-1,R=1<<v-1,D=R+1,B=R+2,z=0,Y=o[0],ee=0;for(let ne=c;ne<65536;ne*=2)++ee;ee=8-ee,i.writeByte(m),U(R);let J=o.length;for(let ne=1;ne<J;ne++){e:{let ie=o[ne],Ne=(ie<<_1)+Y,he=ie<<ee^Y;if(l[he]===Ne){Y=u[he];break e}let Ke=he===0?1:c-he;for(;l[he]>=0;)if(he-=Ke,he<0&&(he+=c),l[he]===Ne){Y=u[he];break e}U(Y),Y=ie,B<1<<_1?(u[he]=B++,l[he]=Ne):(l.fill(-1),B=R+2,x=!0,U(R))}}return U(Y),U(D),i.writeByte(0),i.bytesView();function U(ne){for(g&=Q3[y],y>0?g|=ne<<y:g=ne,y+=N;y>=8;)s[z++]=g&255,z>=254&&(i.writeByte(z),i.writeBytesView(s,0,z),z=0),g>>=8,y-=8;if((B>I||x)&&(x?(N=M,I=(1<<N)-1,x=!1):(++N,I=N===_1?1<<N:(1<<N)-1)),ne==D){for(;y>0;)s[z++]=g&255,z>=254&&(i.writeByte(z),i.writeBytesView(s,0,z),z=0),g>>=8,y-=8;z>0&&(i.writeByte(z),i.writeBytesView(s,0,z),z=0)}}}var ek=V3;function lw(e,t,o){return e<<8&63488|t<<2&992|o>>3}function cw(e,t,o,r){return e>>4|t&240|(o&240)<<4|(r&240)<<8}function uw(e,t,o){return e>>4<<8|t&240|o>>4}function vp(e,t,o){return e<t?t:e>o?o:e}function pl(e){return e*e}function rw(e,t,o){var r=0,i=1e100;let s=e[t],l=s.cnt,u=s.ac,c=s.rc,m=s.gc,g=s.bc;for(var y=s.fw;y!=0;y=e[y].fw){let M=e[y],x=M.cnt,N=l*x/(l+x);if(!(N>=i)){var v=0;o&&(v+=N*pl(M.ac-u),v>=i)||(v+=N*pl(M.rc-c),!(v>=i)&&(v+=N*pl(M.gc-m),!(v>=i)&&(v+=N*pl(M.bc-g),!(v>=i)&&(i=v,r=y))))}}s.err=i,s.nn=r}function B1(){return{ac:0,rc:0,gc:0,bc:0,cnt:0,nn:0,fw:0,bk:0,tm:0,mtm:0,err:0}}function tk(e,t){let o=t==="rgb444"?4096:65536,r=new Array(o),i=e.length;if(t==="rgba4444")for(let s=0;s<i;++s){let l=e[s],u=l>>24&255,c=l>>16&255,m=l>>8&255,g=l&255,y=cw(g,m,c,u),v=y in r?r[y]:r[y]=B1();v.rc+=g,v.gc+=m,v.bc+=c,v.ac+=u,v.cnt++}else if(t==="rgb444")for(let s=0;s<i;++s){let l=e[s],u=l>>16&255,c=l>>8&255,m=l&255,g=uw(m,c,u),y=g in r?r[g]:r[g]=B1();y.rc+=m,y.gc+=c,y.bc+=u,y.cnt++}else for(let s=0;s<i;++s){let l=e[s],u=l>>16&255,c=l>>8&255,m=l&255,g=lw(m,c,u),y=g in r?r[g]:r[g]=B1();y.rc+=m,y.gc+=c,y.bc+=u,y.cnt++}return r}function ok(e,t,o={}){let{format:r="rgb565",clearAlpha:i=!0,clearAlphaColor:s=0,clearAlphaThreshold:l=0,oneBitAlpha:u=!1}=o;if(!e||!e.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(e instanceof Uint8Array)&&!(e instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");let c=new Uint32Array(e.buffer),m=o.useSqrt!==!1,g=r==="rgba4444",y=tk(c,r),v=y.length,M=v-1,x=new Uint32Array(v+1);for(var N=0,R=0;R<v;++R){let Oe=y[R];if(Oe!=null){var I=1/Oe.cnt;g&&(Oe.ac*=I),Oe.rc*=I,Oe.gc*=I,Oe.bc*=I,y[N++]=Oe}}pl(t)/N<.022&&(m=!1);for(var R=0;R<N-1;++R)y[R].fw=R+1,y[R+1].bk=R,m&&(y[R].cnt=Math.sqrt(y[R].cnt));m&&(y[R].cnt=Math.sqrt(y[R].cnt));var D,B,z;for(R=0;R<N;++R){rw(y,R,!1);var Y=y[R].err;for(B=++x[0];B>1&&(z=B>>1,!(y[D=x[z]].err<=Y));B=z)x[B]=D;x[B]=R}var ee=N-t;for(R=0;R<ee;){for(var J;;){var U=x[1];if(J=y[U],J.tm>=J.mtm&&y[J.nn].mtm<=J.tm)break;J.mtm==M?U=x[1]=x[x[0]--]:(rw(y,U,!1),J.tm=R);var Y=y[U].err;for(B=1;(z=B+B)<=x[0]&&(z<x[0]&&y[x[z]].err>y[x[z+1]].err&&z++,!(Y<=y[D=x[z]].err));B=z)x[B]=D;x[B]=U}var ne=y[J.nn],ie=J.cnt,Ne=ne.cnt,I=1/(ie+Ne);g&&(J.ac=I*(ie*J.ac+Ne*ne.ac)),J.rc=I*(ie*J.rc+Ne*ne.rc),J.gc=I*(ie*J.gc+Ne*ne.gc),J.bc=I*(ie*J.bc+Ne*ne.bc),J.cnt+=ne.cnt,J.mtm=++R,y[ne.bk].fw=ne.fw,y[ne.fw].bk=ne.bk,ne.mtm=M}let he=[];var Ke=0;for(R=0;;++Ke){let Ce=vp(Math.round(y[R].rc),0,255),Oe=vp(Math.round(y[R].gc),0,255),He=vp(Math.round(y[R].bc),0,255),ze=255;g&&(ze=vp(Math.round(y[R].ac),0,255),u&&(ze=ze<=(typeof u=="number"?u:127)?0:255),i&&ze<=l&&(Ce=Oe=He=s,ze=0));let _e=g?[Ce,Oe,He,ze]:[Ce,Oe,He];if(nk(he,_e)||he.push(_e),(R=y[R].fw)==0)break}return he}function nk(e,t){for(let o=0;o<e.length;o++){let r=e[o],i=r[0]===t[0]&&r[1]===t[1]&&r[2]===t[2],s=r.length>=4&&t.length>=4?r[3]===t[3]:!0;if(i&&s)return!0}return!1}function bp(e,t){var o=0,r;for(r=0;r<e.length;r++){let i=e[r]-t[r];o+=i*i}return o}function Sp(e,t){return t>1?Math.round(e/t)*t:e}function rk(e,{roundRGB:t=5,roundAlpha:o=10,oneBitAlpha:r=null}={}){let i=new Uint32Array(e.buffer);for(let s=0;s<i.length;s++){let l=i[s],u=l>>24&255,c=l>>16&255,m=l>>8&255,g=l&255;u=Sp(u,o),r&&(u=u<=(typeof r=="number"?r:127)?0:255),g=Sp(g,t),m=Sp(m,t),c=Sp(c,t),i[s]=u<<24|c<<16|m<<8|g<<0}}function ik(e,t,o="rgb565"){if(!e||!e.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(e instanceof Uint8Array)&&!(e instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");if(t.length>256)throw new Error("applyPalette() only works with 256 colors or less");let r=new Uint32Array(e.buffer),i=r.length,s=o==="rgb444"?4096:65536,l=new Uint8Array(i),u=new Array(s),c=o==="rgba4444";if(o==="rgba4444")for(let m=0;m<i;m++){let g=r[m],y=g>>24&255,v=g>>16&255,M=g>>8&255,x=g&255,N=cw(x,M,v,y),I=N in u?u[N]:u[N]=sk(x,M,v,y,t);l[m]=I}else{let m=o==="rgb444"?uw:lw;for(let g=0;g<i;g++){let y=r[g],v=y>>16&255,M=y>>8&255,x=y&255,N=m(x,M,v),I=N in u?u[N]:u[N]=ak(x,M,v,t);l[g]=I}}return l}function sk(e,t,o,r,i){let s=0,l=1e100;for(let u=0;u<i.length;u++){let c=i[u],m=c[3],g=_i(m-r);if(g>l)continue;let y=c[0];if(g+=_i(y-e),g>l)continue;let v=c[1];if(g+=_i(v-t),g>l)continue;let M=c[2];g+=_i(M-o),!(g>l)&&(l=g,s=u)}return s}function ak(e,t,o,r){let i=0,s=1e100;for(let l=0;l<r.length;l++){let u=r[l],c=u[0],m=_i(c-e);if(m>s)continue;let g=u[1];if(m+=_i(g-t),m>s)continue;let y=u[2];m+=_i(y-o),!(m>s)&&(s=m,i=l)}return i}function lk(e,t,o=5){if(!e.length||!t.length)return;let r=e.map(l=>l.slice(0,3)),i=o*o,s=e[0].length;for(let l=0;l<t.length;l++){let u=t[l];u.length<s?u=[u[0],u[1],u[2],255]:u.length>s?u=u.slice(0,3):u=u.slice();let c=dw(r,u.slice(0,3),bp),m=c[0],g=c[1];g>0&&g<=i&&(e[m]=u)}}function _i(e){return e*e}function pw(e,t,o=bp){let r=1/0,i=-1;for(let s=0;s<e.length;s++){let l=e[s],u=o(t,l);u<r&&(r=u,i=s)}return i}function dw(e,t,o=bp){let r=1/0,i=-1;for(let s=0;s<e.length;s++){let l=e[s],u=o(t,l);u<r&&(r=u,i=s)}return[i,r]}function ck(e,t,o=bp){return e[pw(e,t,o)]}function mw(e={}){let{initialCapacity:t=4096,auto:o=!0}=e,r=aw(t),i=5003,s=new Uint8Array(256),l=new Int32Array(i),u=new Int32Array(i),c=!1;return{reset(){r.reset(),c=!1},finish(){r.writeByte(J3.trailer)},bytes(){return r.bytes()},bytesView(){return r.bytesView()},get buffer(){return r.buffer},get stream(){return r},writeHeader:m,writeFrame(g,y,v,M={}){let{transparent:x=!1,transparentIndex:N=0,delay:I=0,palette:R=null,repeat:D=0,colorDepth:B=8,dispose:z=-1}=M,Y=!1;if(o?c||(Y=!0,m(),c=!0):Y=Boolean(M.first),y=Math.max(0,Math.floor(y)),v=Math.max(0,Math.floor(v)),Y){if(!R)throw new Error("First frame must include a { palette } option");pk(r,y,v,R,B),iw(r,R),D>=0&&dk(r,D)}let ee=Math.round(I/10);uk(r,z,ee,x,N);let J=Boolean(R)&&!Y;mk(r,y,v,J?R:null),J&&iw(r,R),fk(r,g,y,v,B,s,l,u)}};function m(){fw(r,"GIF89a")}}function uk(e,t,o,r,i){e.writeByte(33),e.writeByte(249),e.writeByte(4),i<0&&(i=0,r=!1);var s,l;r?(s=1,l=2):(s=0,l=0),t>=0&&(l=t&7),l<<=2;let u=0;e.writeByte(0|l|u|s),jr(e,o),e.writeByte(i||0),e.writeByte(0)}function pk(e,t,o,r,i=8){let u=F1(r.length)-1,c=1<<7|i-1<<4|0<<3|u,m=0,g=0;jr(e,t),jr(e,o),e.writeBytes([c,m,g])}function dk(e,t){e.writeByte(33),e.writeByte(255),e.writeByte(11),fw(e,"NETSCAPE2.0"),e.writeByte(3),e.writeByte(1),jr(e,t),e.writeByte(0)}function iw(e,t){let o=1<<F1(t.length);for(let r=0;r<o;r++){let i=[0,0,0];r<t.length&&(i=t[r]),e.writeByte(i[0]),e.writeByte(i[1]),e.writeByte(i[2])}}function mk(e,t,o,r){if(e.writeByte(44),jr(e,0),jr(e,0),jr(e,t),jr(e,o),r){let l=F1(r.length)-1;e.writeByte(128|l)}else e.writeByte(0)}function fk(e,t,o,r,i=8,s,l,u){ek(o,r,t,i,e,s,l,u)}function jr(e,t){e.writeByte(t&255),e.writeByte(t>>8&255)}function fw(e,t){for(var o=0;o<t.length;o++)e.writeByte(t.charCodeAt(o))}function F1(e){return Math.max(Math.ceil(Math.log2(e)),1)}var gk=mw});function vw(e,t){let o=t?.fields?.find(i=>i.localName===e);return o?Object.values(o).find(i=>typeof i=="function")?.():void 0}function Ip(e,t){let o=te.getChannel(e);return!o||o.isPrivate()?!0:We.can(t,o)}var Is,Bi,Tp,gw,Pp,Fi,G1,hk,wp,H1,z1,xp,hw,ot,yk,vk,yw,Sk,Mp,Sw=f(()=>{"use strict";a();Rn();_();P();yp();pt();ke();w();$();b();Is=ql($1()),Bi=me("StickersStore"),Tp=me("UserSettingsProtoStore"),gw=C("readerFactory");Pp=Ao(()=>pa.PreloadedUserSettingsActionCreators),Fi=Ao(()=>vw("appearance",Pp.ProtoClass)),G1=Ao(()=>vw("clientThemeSettings",Fi)),hk=ye(".getUserIsAdmin("),wp=`[${3},${4}].includes(fakeNitroIntention)`,H1=/\/emojis\/(\d+?)\.(png|webp|gif)/,z1=/\/stickers\/(\d+?)\./,xp=/\/attachments\/\d+?\/\d+?\/(\d+?)\.gif/,hw=/\[.+?\]\((https?:\/\/.+?)\)/,ot=A({enableEmojiBypass:{description:"Allows sending fake emojis (also bypasses missing permission to use custom emojis)",type:3,default:!0,restartNeeded:!0},emojiSize:{description:"Size of the emojis when sending",type:5,default:48,markers:[32,48,64,128,160,256,512]},transformEmojis:{description:"Whether to transform fake emojis into real ones",type:3,default:!0,restartNeeded:!0},enableStickerBypass:{description:"Allows sending fake stickers (also bypasses missing permission to use stickers)",type:3,default:!0,restartNeeded:!0},stickerSize:{description:"Size of the stickers when sending",type:5,default:160,markers:[32,64,128,160,256,512]},transformStickers:{description:"Whether to transform fake stickers into real ones",type:3,default:!0,restartNeeded:!0},transformCompoundSentence:{description:"Whether to transform fake stickers and emojis in compound sentences (sentences with more content than just the fake emoji or sticker link)",type:3,default:!1},enableStreamQualityBypass:{description:"Allow streaming in nitro quality",type:3,default:!0,restartNeeded:!0},useHyperLinks:{description:"Whether to use hyperlinks when sending fake emojis and stickers",type:3,default:!0},hyperLinkText:{description:"What text the hyperlink should use. {{NAME}} will be replaced with the emoji/sticker name.",type:0,default:"{{NAME}}"},disableEmbedPermissionCheck:{description:"Whether to disable the embed permission check when sending fake emojis and stickers",type:3,default:!1}});yk=e=>Ip(e,Ie.USE_EXTERNAL_EMOJIS),vk=e=>Ip(e,Ie.USE_EXTERNAL_STICKERS),yw=e=>Ip(e,Ie.EMBED_LINKS),Sk=e=>Ip(e,Ie.ATTACH_FILES),Mp=h({name:"FakeNitro",authors:[p.Arjix,p.D3SOX,p.Ven,p.fawn,p.captain,p.Nuckyz,p.AutumnVN],description:"Allows you to stream in nitro quality, send fake emojis/stickers, use client themes and custom Discord notifications.",dependencies:["MessageEventsAPI"],settings:ot,patches:[{find:".PREMIUM_LOCKED;",group:!0,predicate:()=>ot.store.enableEmojiBypass,replacement:[{match:/(?<=\.USE_EXTERNAL_EMOJIS.+?;)(?<=intention:(\i).+?)/,replace:(e,t)=>`const fakeNitroIntention=${t};`},{match:/&&!\i&&!\i(?=\)return \i\.\i\.DISALLOW_EXTERNAL;)/,replace:e=>`${e}&&!${wp}`},{match:/!\i\.available(?=\)return \i\.\i\.GUILD_SUBSCRIPTION_UNAVAILABLE;)/,replace:e=>`${e}&&!${wp}`},{match:/!\i\.\i\.canUseEmojisEverywhere\(\i\)/,replace:e=>`(${e}&&!${wp})`},{match:/(?<=\|\|)\i\.\i\.canUseAnimatedEmojis\(\i\)/,replace:e=>`(${e}||${wp})`}]},{find:".getUserIsAdmin(",replacement:{match:/(function \i\(\i,\i)\){(.{0,250}.getUserIsAdmin\(.+?return!1})/,replace:(e,t,o)=>`${t},fakeNitroOriginal){if(!fakeNitroOriginal)return false;${o}`}},{find:"canUseCustomStickersEverywhere:function",predicate:()=>ot.store.enableStickerBypass,replacement:{match:/canUseCustomStickersEverywhere:function\(\i\){/,replace:"$&return true;"}},{find:'"SENDABLE"',predicate:()=>ot.store.enableStickerBypass,replacement:{match:/\i\.available\?/,replace:"true?"}},{find:"canUseHighVideoUploadQuality:function",predicate:()=>ot.store.enableStreamQualityBypass,replacement:["canUseHighVideoUploadQuality","canStreamQuality"].map(e=>({match:new RegExp(`${e}:function\\(\\i(?:,\\i)?\\){`,"g"),replace:"$&return true;"}))},{find:"STREAM_FPS_OPTION.format",predicate:()=>ot.store.enableStreamQualityBypass,replacement:{match:/guildPremiumTier:\i\.\i\.TIER_\d,?/g,replace:""}},{find:"canUseClientThemes:function",replacement:{match:/canUseClientThemes:function\(\i\){/,replace:"$&return true;"}},{find:'"UserSettingsProtoStore"',replacement:[{match:/CONNECTION_OPEN:function\((\i)\){/,replace:(e,t)=>`${e}$self.handleProtoChange(${t}.userSettingsProto,${t}.user);`},{match:/let{settings:/,replace:"arguments[0].local||$self.handleProtoChange(arguments[0].settings.proto);$&"}]},{find:",updateTheme(",replacement:{match:/(function \i\(\i\){let{backgroundGradientPresetId:(\i).+?)(\i\.\i\.updateAsync.+?theme=(.+?),.+?},\i\))/,replace:(e,t,o,r,i)=>`${t}$self.handleGradientThemeSelect(${o},${i},()=>${r});`}},{find:'["strong","em","u","text","inlineCode","s","spoiler"]',replacement:[{predicate:()=>ot.store.transformEmojis,match:/1!==(\i)\.length\|\|1!==\i\.length/,replace:(e,t)=>`${e}||$self.shouldKeepEmojiLink(${t}[0])`},{predicate:()=>ot.store.transformEmojis||ot.store.transformStickers,match:/(?=return{hasSpoilerEmbeds:\i,content:(\i)})/,replace:(e,t)=>`${t}=$self.patchFakeNitroEmojisOrRemoveStickersLinks(${t},arguments[2]?.formatInline);`}]},{find:"}renderEmbeds(",replacement:[{predicate:()=>ot.store.transformEmojis||ot.store.transformStickers,match:/(renderEmbeds\((\i)\){)(.+?embeds\.map\(\((\i),\i\)?=>{)/,replace:(e,t,o,r,i)=>`${t}const fakeNitroMessage=${o};${r}if($self.shouldIgnoreEmbed(${i},fakeNitroMessage))return null;`},{predicate:()=>ot.store.transformStickers,match:/renderStickersAccessories\((\i)\){let (\i)=\(0,\i\.\i\)\(\i\).+?;/,replace:(e,t,o)=>`${e}${o}=$self.patchFakeNitroStickers(${o},${t});`},{predicate:()=>ot.store.transformStickers,match:/renderAttachments\(\i\){let{attachments:(\i).+?;/,replace:(e,t)=>`${e}${t}=$self.filterAttachments(${t});`}]},{find:".Messages.STICKER_POPOUT_UNJOINED_PRIVATE_GUILD_DESCRIPTION.format",predicate:()=>ot.store.transformStickers,replacement:[{match:/let{renderableSticker:(\i).{0,270}sticker:\i,channel:\i,/,replace:(e,t)=>`${e}fakeNitroRenderableSticker:${t},`},{match:/(let \i,{sticker:\i,channel:\i,closePopout:\i.+?}=(\i).+?;)(.+?description:)(\i)(?=,sticker:\i)/,replace:(e,t,o,r,i)=>`${t}let{fakeNitroRenderableSticker}=${o};${r}$self.addFakeNotice(${0},${i},!!fakeNitroRenderableSticker?.fake)`}]},{find:".EMOJI_UPSELL_POPOUT_MORE_EMOJIS_OPENED,",predicate:()=>ot.store.transformEmojis,replacement:{match:/isDiscoverable:\i,shouldHideRoleSubscriptionCTA:\i,(?<={node:(\i),.+?)/,replace:(e,t)=>`${e}fakeNitroNode:${t},`}},{find:".Messages.EMOJI_POPOUT_UNJOINED_DISCOVERABLE_GUILD_DESCRIPTION",predicate:()=>ot.store.transformEmojis,replacement:{match:/(?<=emojiDescription:)(\i)(?<=\1=\i\((\i)\).+?)/,replace:(e,t,o)=>`$self.addFakeNotice(${1},${t},!!${o}?.fakeNitroNode?.fake)`}},{find:"canUsePremiumAppIcons:function",replacement:{match:/canUsePremiumAppIcons:function\(\i\){/,replace:"$&return true;"}},{find:/\.getCurrentDesktopIcon.{0,25}\.isPremium/,replacement:{match:/\i\.\i\.isPremium\(\i\.\i\.getCurrentUser\(\)\)/,replace:"true"}},{find:'type:"GUILD_SOUNDBOARD_SOUND_CREATE"',replacement:{match:/(?<=type:"(?:SOUNDBOARD_SOUNDS_RECEIVED|GUILD_SOUNDBOARD_SOUND_CREATE|GUILD_SOUNDBOARD_SOUND_UPDATE|GUILD_SOUNDBOARD_SOUNDS_UPDATE)".+?available:)\i\.available/g,replace:"true"}},{find:"canUseCustomNotificationSounds:function",replacement:{match:/canUseCustomNotificationSounds:function\(\i\){/,replace:"$&return true;"}}],get guildId(){return wi()?.id},get canUseEmotes(){return(L.getCurrentUser().premiumType??0)>0},get canUseStickers(){return(L.getCurrentUser().premiumType??0)>1},handleProtoChange(e,t){try{if(e==null||typeof e=="string")return;if((t?.premium_type??L?.getCurrentUser()?.premiumType??0)!==2){if(e.appearance??=Fi.create(),Tp.settings.appearance?.theme!=null){let r=Fi.create({theme:Tp.settings.appearance.theme});e.appearance.theme=r.theme}if(Tp.settings.appearance?.clientThemeSettings?.backgroundGradientPresetId?.value!=null){let r=G1.create({backgroundGradientPresetId:{value:Tp.settings.appearance.clientThemeSettings.backgroundGradientPresetId.value}});e.appearance.clientThemeSettings??=r,e.appearance.clientThemeSettings.backgroundGradientPresetId=r.backgroundGradientPresetId}}}catch(o){new Q("FakeNitro").error(o)}},handleGradientThemeSelect(e,t,o){if((L?.getCurrentUser()?.premiumType??0)===2||e==null)return o();if(!Pp||!Fi||!G1||!gw)return;let i=Pp.getCurrentValue().appearance,s=i!=null?Fi.fromBinary(Fi.toBinary(i),gw):Fi.create();s.theme=t;let l=G1.create({backgroundGradientPresetId:{value:e}});s.clientThemeSettings??=l,s.clientThemeSettings.backgroundGradientPresetId=l.backgroundGradientPresetId;let u=Pp.ProtoClass.create();u.appearance=s,F.dispatch({type:"USER_SETTINGS_PROTO_UPDATE",local:!0,partial:!0,settings:{type:1,proto:u}})},trimContent(e){let t=e[0];typeof t=="string"?(e[0]=t.trimStart(),e[0]||e.shift()):typeof t?.props?.children=="string"&&(t.props.children=t.props.children.trimStart(),t.props.children||e.shift());let o=e.length-1,r=e[o];typeof r=="string"?(e[o]=r.trimEnd(),e[o]||e.pop()):typeof r?.props?.children=="string"&&(r.props.children=r.props.children.trimEnd(),r.props.children||e.pop())},clearEmptyArrayItems(e){return e.filter(t=>t!=null)},ensureChildrenIsArray(e){Array.isArray(e.props.children)||(e.props.children=[e.props.children])},patchFakeNitroEmojisOrRemoveStickersLinks(e,t){if((e.length>1||typeof e[0]?.type=="string")&&!ot.store.transformCompoundSentence)return e;let o=e.length,r=u=>{if(ot.store.transformEmojis){let c=u.props.href.match(H1);if(c){let m=null;try{m=new URL(u.props.href)}catch{}let g=sn.getCustomEmojiById(c[1])?.name??m?.searchParams.get("name")??"FakeNitroEmoji";return Pe.defaultRules.customEmoji.react({jumboable:!t&&e.length===1&&typeof e[0].type!="string",animated:c[2]==="gif",emojiId:c[1],name:g,fake:!0},void 0,{key:String(o++)})}}if(ot.store.transformStickers){if(z1.test(u.props.href))return null;let c=u.props.href.match(xp);if(c&&Bi.getStickerById(c[1]))return null}return u},i=u=>u?.props?.trusted!=null?r(u):u?.props?.children!=null?Array.isArray(u.props.children)?(u.props.children=l(u.props.children),u.props.children.length===0?null:u):(u.props.children=s(u.props.children),u):u,s=u=>{let c=i(u);if(c?.type==="ul"||c?.type==="ol"){if(this.ensureChildrenIsArray(c),c.props.children.length===0)return null;let m=!1;for(let[g,y]of c.props.children.entries()){if(y==null){delete c.props.children[g];continue}this.ensureChildrenIsArray(y),y.props.children.length>0?m=!0:delete c.props.children[g]}if(!m)return null;c.props.children=this.clearEmptyArrayItems(c.props.children)}return c},l=u=>{for(let[c,m]of u.entries())u[c]=s(m);return u=this.clearEmptyArrayItems(u),u};try{let u=l(di.cloneDeep(e));return this.trimContent(u),u}catch(u){return new Q("FakeNitro").error(u),e}},patchFakeNitroStickers(e,t){let o=[],r=t.content.split(/\s/);ot.store.transformCompoundSentence?o.push(...r):r.length===1&&o.push(r[0]),o.push(...t.attachments.filter(i=>i.content_type==="image/gif").map(i=>i.url));for(let i of o){if(!ot.store.transformCompoundSentence&&!i.startsWith("http")&&!hw.test(i))continue;let s=i.match(z1);if(s){let u=null;try{u=new URL(i)}catch{}let c=Bi.getStickerById(s[1])?.name??u?.searchParams.get("name")??"FakeNitroSticker";e.push({format_type:1,id:s[1],name:c,fake:!0});continue}let l=i.match(xp);if(l){if(!Bi.getStickerById(l[1]))continue;let u=Bi.getStickerById(l[1])?.name??"FakeNitroSticker";e.push({format_type:2,id:l[1],name:u,fake:!0})}}return e},shouldIgnoreEmbed(e,t){let o=t.content.split(/\s/);if(o.length>1&&!ot.store.transformCompoundSentence)return!1;switch(e.type){case"image":{if(!ot.store.transformCompoundSentence&&!o.some(r=>r===e.url||r.match(hw)?.[1]===e.url))return!1;if(ot.store.transformEmojis&&H1.test(e.url))return!0;if(ot.store.transformStickers){if(z1.test(e.url))return!0;let r=e.url.match(xp);if(r&&Bi.getStickerById(r[1]))return!0}break}}return!1},filterAttachments(e){return e.filter(t=>{if(t.content_type!=="image/gif")return!0;let o=t.url.match(xp);return!(o&&Bi.getStickerById(o[1]))})},shouldKeepEmojiLink(e){return e.target&&H1.test(e.target)},addFakeNotice(e,t,o){if(!o)return t;switch(t=Array.isArray(t)?t:[t],e){case 0:return t.push(" This is a FakeNitro sticker and renders like a real sticker only for you. Appears as a link to non-plugin users."),t;case 1:return t.push(" This is a FakeNitro emoji and renders like a real emoji only for you. Appears as a link to non-plugin users."),t}},getStickerLink(e){return`https://media.discordapp.net/stickers/${e}.png?size=${ot.store.stickerSize}`},async sendAnimatedSticker(e,t,o){let{parseURL:r}=VT(),{frames:i,width:s,height:l}=await r(e),u=(0,Is.GIFEncoder)(),c=ot.store.stickerSize,m=document.createElement("canvas");m.width=c,m.height=c;let g=m.getContext("2d",{willReadFrequently:!0}),y=c/Math.max(s,l);g.scale(y,y);let v;for(let x of i){let{left:N,top:I,width:R,height:D,img:B,delay:z,blendOp:Y,disposeOp:ee}=x;v=g.getImageData(N,I,R,D),Y===0&&g.clearRect(N,I,R,D),g.drawImage(B,N,I,R,D);let{data:J}=g.getImageData(0,0,c,c),U=(0,Is.quantize)(J,256),ne=(0,Is.applyPalette)(J,U);u.writeFrame(ne,c,c,{transparent:!0,palette:U,delay:z}),ee===1?g.clearRect(N,I,R,D):ee===2&&g.putImageData(v,N,I)}u.finish();let M=new File([u.bytesView()],`${t}.gif`,{type:"image/gif"});da.promptToUpload([M],te.getChannel(o),Yt.ChannelMessage)},canUseEmote(e,t){return e.type===0?!0:e.available===!1||hk(e,this.guildId,!0)?!1:this.canUseEmotes?e.guildId===this.guildId||yk(t):!e.animated&&e.guildId===this.guildId},start(){let e=ot.store;if(!e.enableEmojiBypass&&!e.enableStickerBypass)return;function t(r,i){return!r[i]||/\s/.test(r[i])?"":" "}function o(){return new Promise(r=>{rt.show({title:"Hold on!",body:n("div",null,n(S.FormText,null,"You are trying to send/edit a message that contains a FakeNitro emoji or sticker, however you do not have permissions to embed links in the current channel. Are you sure you want to send this message? Your FakeNitro items will appear as a link only."),n(S.FormText,{type:S.FormText.Types.DESCRIPTION},"You can disable this notice in the plugin settings.")),confirmText:"Send Anyway",cancelText:"Cancel",secondaryConfirmText:"Do not show again",onConfirm:()=>r(!0),onCloseCallback:()=>setImmediate(()=>r(!1)),onConfirmSecondary(){ot.store.disableEmbedPermissionCheck=!0,r(!0)}})})}this.preSend=bo(async(r,i,s)=>{let{guildId:l}=this,u=!1;e:{if(!e.enableStickerBypass)break e;let c=Bi.getStickerById(s.stickers?.[0]);if(!c||"pack_id"in c)break e;let m=this.canUseStickers&&vk(r);if(c.available!==!1&&(m||c.guild_id===l))break e;let g=this.getStickerLink(c.id);if(c.format_type===4&&g.includes(".png")&&(g=g.replace(".png",".gif")),c.format_type===2)return Sk(r)?this.sendAnimatedSticker(g,c.id,r):rt.show({title:"Hold on!",body:n("div",null,n(S.FormText,null,"You cannot send this message because it contains an animated FakeNitro sticker, and you do not have permissions to attach files in the current channel. Please remove the sticker to proceed."))}),{cancel:!0};{u=!0;let y=new URL(g);y.searchParams.set("name",c.name);let v=e.hyperLinkText.replaceAll("{{NAME}}",c.name);i.content+=`${t(i.content,i.content.length-1)}${e.useHyperLinks?`[${v}](${y})`:y}`,s.stickers.length=0}}if(e.enableEmojiBypass)for(let c of i.validNonShortcutEmojis){if(this.canUseEmote(c,r))continue;u=!0;let m=`<${c.animated?"a":""}:${c.originalName||c.name}:${c.id}>`,g=new URL(Ct.getEmojiURL({id:c.id,animated:c.animated,size:e.emojiSize}));g.searchParams.set("size",e.emojiSize.toString()),g.searchParams.set("name",c.name);let y=e.hyperLinkText.replaceAll("{{NAME}}",c.name);i.content=i.content.replace(m,(v,M,x)=>`${t(x,M-1)}${e.useHyperLinks?`[${y}](${g})`:g}${t(x,M+v.length)}`)}return u&&!e.disableEmbedPermissionCheck&&!yw(r)&&!await o()?{cancel:!0}:{cancel:!1}}),this.preEdit=ki(async(r,i,s)=>{if(!e.enableEmojiBypass)return;let l=!1;return s.content=s.content.replace(/(?<!\\)<a?:(?:\w+):(\d+)>/ig,(u,c,m,g)=>{let y=sn.getCustomEmojiById(c);if(y==null||this.canUseEmote(y,r))return u;l=!0;let v=new URL(Ct.getEmojiURL({id:y.id,animated:y.animated,size:e.emojiSize}));v.searchParams.set("size",e.emojiSize.toString()),v.searchParams.set("name",y.name);let M=e.hyperLinkText.replaceAll("{{NAME}}",y.name);return`${t(g,m-1)}${e.useHyperLinks?`[${M}](${v})`:v}${t(g,m+u.length)}`}),l&&!e.disableEmbedPermissionCheck&&!yw(r)&&!await o()?{cancel:!0}:{cancel:!1}})},stop(){To(this.preSend),Di(this.preEdit)}})});var bw=f(()=>{});function Tw(...e){let t={};function o(i){for(let s=e.length-1;s>=0;s--)if(i in e[s])return e[s];return t}let r={ownKeys(){return e.reduce((i,s)=>(i.push(...Reflect.ownKeys(s)),i),Reflect.ownKeys(t))}};for(let i of["defineProperty","deleteProperty","get","getOwnPropertyDescriptor","has","set"])r[i]=function(s,...l){return Reflect[i](o(l[0]),...l)};return new Proxy(t,r)}var ww,xw=f(()=>{"use strict";a();ww=Tw;typeof module<"u"&&(module.exports=Tw)});function Pw(e,t){let o=`[#${e.toString(16).padStart(6,"0")},#${t.toString(16).padStart(6,"0")}]`,r="",i=Array.from(o).map(s=>s.codePointAt(0)).filter(s=>s>=32&&s<=127).map(s=>String.fromCodePoint(s+917504)).join("");return(r||"")+" "+i}function Iw(e){if(e==null)return null;let t=e.match(/\u{e005b}\u{e0023}([\u{e0061}-\u{e0066}\u{e0041}-\u{e0046}\u{e0030}-\u{e0039}]+?)\u{e002c}\u{e0023}([\u{e0061}-\u{e0066}\u{e0041}-\u{e0046}\u{e0030}-\u{e0039}]+?)\u{e005d}/u);if(t!=null){let o=[...t[0]].map(i=>String.fromCodePoint(i.codePointAt(0)-917504)).join("");return o.substring(1,o.length-1).split(",").map(i=>parseInt(i.replace("#","0x"),16))}else return null}var Mw,Aw,bk,Tk,Ap,Nw=f(()=>{"use strict";a();bw();_();re();P();Ze();be();ft();w();$();b();xw();Mw=A({nitroFirst:{description:"Default color source if both are present",type:4,options:[{label:"Nitro colors",value:!0,default:!0},{label:"Fake colors",value:!1}]}}),Aw=ve(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR",".BACKGROUND_PRIMARY)"),bk=ve("isTryItOutFlow:","pendingThemeColors:","pendingAvatarDecoration:","EDIT_PROFILE_BANNER"),Tk=On(["USER_SETTINGS_PROFILE_COLOR_DEFAULT_BUTTON.format"],/createPromise:\(\)=>\i\.\i(\("?.+?"?\)).then\(\i\.bind\(\i,"?(.+?)"?\)\)/),Ap=h({name:"FakeProfileThemes",description:"Allows profile theming by hiding the colors in your bio thanks to invisible 3y3 encoding",authors:[p.Alyxia,p.Remty],patches:[{find:"UserProfileStore",replacement:{match:/(?<=getUserProfile\(\i\){return )(\i\[\i\])/,replace:"$self.colorDecodeHook($1)"}},{find:".USER_SETTINGS_RESET_PROFILE_THEME",replacement:{match:/RESET_PROFILE_THEME}\)(?<=color:(\i),.{0,500}?color:(\i),.{0,500}?)/,replace:"$&,$self.addCopy3y3Button({primary:$1,accent:$2})"}}],settingsAboutComponent:()=>{let e=Iw(Qt.getUserProfile(L.getCurrentUser().id).bio)??[0,0],[t,o]=K(e[0]),[r,i]=K(e[1]),[,,s]=st(Tk);return n(S.FormSection,null,n(S.FormTitle,{tag:"h3"},"Usage"),n(S.FormText,null,"After enabling this plugin, you will see custom colors in the profiles of other people using compatible plugins."," ",n("br",null),"To set your own colors:",n("ul",null,n("li",null,"\u2022 use the color pickers below to choose your colors"),n("li",null,'\u2022 click the "Copy 3y3" button'),n("li",null,"\u2022 paste the invisible text anywhere in your bio")),n("br",null),n(S.FormDivider,{className:q(G.top8,G.bottom8)}),n(S.FormTitle,{tag:"h3"},"Color pickers"),!s&&n(Qi,{direction:Qi.Direction.HORIZONTAL,style:{gap:"1rem"}},n(Aw,{color:t,label:n(Z,{variant:"text-xs/normal",style:{marginTop:"4px"}},"Primary"),onChange:l=>{o(l)}}),n(Aw,{color:r,label:n(Z,{variant:"text-xs/normal",style:{marginTop:"4px"}},"Accent"),onChange:l=>{i(l)}}),n(T,{onClick:()=>{let l=Pw(t,r);po(l)},color:T.Colors.PRIMARY,size:T.Sizes.XLARGE},"Copy 3y3")),n(S.FormDivider,{className:q(G.top8,G.bottom8)}),n(S.FormTitle,{tag:"h3"},"Preview"),n("div",{className:"vc-fpt-preview"},n(bk,{user:L.getCurrentUser(),pendingThemeColors:[t,r],onAvatarChange:()=>{},onBannerChange:()=>{},canUsePremiumCustomization:!0,hideExampleButton:!0,hideFakeActivity:!0,isTryItOutFlow:!0}))))},settings:Mw,colorDecodeHook(e){if(e){if(Mw.store.nitroFirst&&e.themeColors)return e;let t=Iw(e.bio);if(t)return ww(e,{premiumType:2,themeColors:t})}return e},addCopy3y3Button:k.wrap(function({primary:e,accent:t}){return n(T,{onClick:()=>{let o=Pw(e,t);po(o)},color:T.Colors.PRIMARY,size:T.Sizes.XLARGE,className:G.left16},"Copy 3y3")},{noop:!0})})});var Np,Cw=f(()=>{"use strict";a();P();w();b();Np=h({name:"FavoriteEmojiFirst",authors:[p.Aria,p.Ven],description:"Puts your favorite emoji first in the emoji autocomplete.",patches:[{find:"renderResults({results:",replacement:[{match:/let \i=.{1,100}renderResults\({results:(\i)\.query\.results,/,replace:"$self.sortEmojis($1);$&"}]},{find:"numLockedEmojiResults:",replacement:[{match:/,maxCount:(\i)(.{1,500}\i)=(\i)\.slice\(0,(\i-\i\.length)\)/,replace:",maxCount:Infinity$2=($3.sliceTo = $4, $3)"}]}],sortEmojis({query:e}){if(e?.type!=="EMOJIS_AND_STICKERS"||e.typeInfo?.sentinel!==":"||!e.results?.emojis?.length)return;let t=sn.getDisambiguatedEmojiContext();e.results.emojis=e.results.emojis.sort((o,r)=>{let i=t.isFavoriteEmojiWithoutFetchingLatest(o),s=t.isFavoriteEmojiWithoutFetchingLatest(r);return i&&!s?-1:!i&&s?1:0}).slice(0,e.results.emojis.sliceTo??1/0)}})});function xk({instance:e,SearchBarComponent:t}){let[o,r]=K(""),i=xt(null),s=dc(l=>{r(l);let{props:u}=e;if(l===""){u.favorites=u.favCopy,e.forceUpdate();return}i.current?.containerRef?.current.closest("#gif-picker-tab-panel")?.querySelector('[class|="content"]')?.firstElementChild?.scrollTo(0,0);let c=u.favCopy.map(m=>({score:Pk(l.toLowerCase(),kw(m.url??m.src).replace(/(%20|[_-])/g," ").toLowerCase()),gif:m})).filter(m=>m.score!=null);c.sort((m,g)=>g.score-m.score),u.favorites=c.map(m=>m.gif),e.forceUpdate()},[e.state]);return ce(()=>()=>{e.dead=!0},[]),n(t,{ref:i,autoFocus:!0,className:wk.searchBar,size:t.Sizes.MEDIUM,onChange:s,onClear:()=>{r(""),e.props.favCopy!=null&&(e.props.favorites=e.props.favCopy,e.forceUpdate())},query:o,placeholder:"Search Favorite Gifs"})}function kw(e){let t;try{t=new URL(e)}catch{return e}switch(Rw.store.searchOption){case"url":return t.href;case"path":return t.host==="media.discordapp.net"||t.host==="tenor.com"?t.pathname.split("/").at(-1)??t.pathname:t.pathname;case"hostandpath":return t.host==="media.discordapp.net"||t.host==="tenor.com"?`${t.host} ${t.pathname.split("/").at(-1)??t.pathname}`:`${t.host} ${t.pathname}`;default:return""}}function Pk(e,t){let o=0,r=0;for(let i=0;i<t.length;i++)if(t[i]===e[o]?(r++,o++):r--,o===e.length)return r;return null}var wk,Rw,Cp,Dw=f(()=>{"use strict";a();_();re();P();w();$();b();wk=C("searchBar","searchBarFullRow"),Rw=A({searchOption:{type:4,description:"The part of the url you want to search",options:[{label:"Entire Url",value:"url"},{label:"Path Only (/somegif.gif)",value:"path"},{label:"Host & Path (tenor.com somgif.gif)",value:"hostandpath",default:!0}]}}),Cp=h({name:"FavoriteGifSearch",authors:[p.Aria],description:"Adds a search bar to favorite gifs.",patches:[{find:"renderHeaderContent()",replacement:[{match:/(renderHeaderContent\(\).{1,150}FAVORITES:return)(.{1,150});(case.{1,200}default:return\(0,\i\.jsx\)\((?<searchComp>\i\..{1,10}),)/,replace:"$1 this.state.resultType === 'Favorites' ? $self.renderSearchBar(this, $<searchComp>) : $2;$3"},{match:/(,suggestions:\i,favorites:)(\i),/,replace:"$1$self.getFav($2),favCopy:$2,"}]}],settings:Rw,getTargetString:kw,instance:null,renderSearchBar(e,t){return this.instance=e,n(k,{noop:!0},n(xk,{instance:e,SearchBarComponent:t}))},getFav(e){if(!this.instance||this.instance.dead)return e;let{favorites:t}=this.instance.props;return t!=null&&t?.length!==e.length?t:e}})});var Rp,Lw=f(()=>{"use strict";a();P();w();Rp=h({name:"FixCodeblockGap",description:"Removes the gap between codeblocks and text below it",authors:[p.Grzesiek11],patches:[{find:String.raw`/^${"```"}(?:([a-z0-9_+\-.#]+?)\n)?\n*([^\n][^]*?)\n*${"```"}`,replacement:{match:String.raw`/^${"```"}(?:([a-z0-9_+\-.#]+?)\n)?\n*([^\n][^]*?)\n*${"```"}`,replace:"$&\\n?"}}]})});var kp,Ew=f(()=>{"use strict";a();_();Er();P();w();kp=h({name:"FixSpotifyEmbeds",description:"Fixes spotify embeds being incredibly loud by letting you customise the volume",authors:[p.Ven],settings:A({volume:{type:5,description:"The volume % to set for spotify embeds. Anything above 10% is veeeery loud",markers:Vt(0,100,10),stickToMarkers:!1,default:10}})})});var Dp,Ow=f(()=>{"use strict";a();P();w();Dp=h({name:"FixYoutubeEmbeds",description:"Bypasses youtube videos being blocked from display on Discord (for example by UMG)",authors:[p.coolelectronics]})});var Lp,_w=f(()=>{"use strict";a();P();w();b();Lp=h({name:"ForceOwnerCrown",description:"Force the owner crown next to usernames even if the server is large.",authors:[p.D3SOX,p.Nickyux],patches:[{find:".PREMIUM_GUILD_SUBSCRIPTION_TOOLTIP",replacement:{match:/,isOwner:(\i),/,replace:",_isOwner:$1=$self.isGuildOwner(e),"}}],isGuildOwner(e){if(!e?.user?.id||e.channel?.type===3)return e.isOwner;let t=e.guildId??e.channel?.guild_id,o=e.user.id;return se.getGuild(t)?.ownerId===o}})});var j1,Ep,Bw=f(()=>{"use strict";a();Do();P();w();$();j1=C("createFriendInvite"),Ep=h({name:"FriendInvites",description:"Create and manage friend invite links via slash commands (/create friend invite, /view friend invites, /revoke friend invites).",authors:[p.afn,p.Dziurwa],dependencies:["CommandsAPI"],commands:[{name:"create friend invite",description:"Generates a friend invite link.",inputType:3,execute:async(e,t)=>{let o=await j1.createFriendInvite();Me(t.channel.id,{content:`
|
|
discord.gg/${o.code} \xB7
|
|
Expires: <t:${new Date(o.expires_at).getTime()/1e3}:R> \xB7
|
|
Max uses: \`${o.max_uses}\`
|
|
`.trim().replace(/\s+/g," ")})}},{name:"view friend invites",description:"View a list of all generated friend invites.",inputType:3,execute:async(e,t)=>{let r=(await j1.getAllFriendInvites()).map(i=>`
|
|
_discord.gg/${i.code}_ \xB7
|
|
Expires: <t:${new Date(i.expires_at).getTime()/1e3}:R> \xB7
|
|
Times used: \`${i.uses}/${i.max_uses}\`
|
|
`.trim().replace(/\s+/g," "));Me(t.channel.id,{content:r.join(`
|
|
`)||"You have no active friend invites!"})}},{name:"revoke friend invites",description:"Revokes all generated friend invites.",inputType:3,execute:async(e,t)=>{await j1.revokeFriendInvites(),Me(t.channel.id,{content:"All friend invites have been revoked."})}}]})});var Fw,Ik,W1,q1,Mk,Ak,Op,Uw=f(()=>{"use strict";a();re();P();pt();ke();w();$();b();Fw=C("memberSinceWrapper"),Ik=C("memberSince"),W1=ye('month:"short",day:"numeric"'),q1=C("getLocale"),Mk=C("lastSection"),Ak=Qe(e=>e.section!==void 0&&Object.values(e).length===1),Op=h({name:"FriendsSince",description:"Shows when you became friends with someone in the user popout",authors:[p.Elvyra,p.Antti],patches:[{find:".USER_PROFILE}};return",replacement:{match:/,{userId:(\i.id).{0,30}}\)/,replace:"$&,$self.friendsSinceOld({ userId: $1 })"}},{find:".PROFILE_PANEL,",replacement:{match:/,{userId:([^,]+?)}\)/,replace:"$&,$self.friendsSinceOld({ userId: $1 })"}},{find:".userInfoSectionHeader,",replacement:{match:/(\.Messages\.USER_PROFILE_MEMBER_SINCE.+?userId:(.+?),textClassName:)(\i\.userInfoText)}\)/,replace:(e,t,o,r)=>`${t}!$self.getFriendSince(${o}) ? ${r} : void 0 }), $self.friendsSinceOld({ userId: ${o}, textClassName: ${r} })`}},{find:".PANEL}),nicknameIcons",replacement:{match:/USER_PROFILE_MEMBER_SINCE,.{0,100}userId:(\i\.id)}\)}\)/,replace:"$&,$self.friendsSinceNew({userId:$1,isSidebar:true})"}},{find:'action:"PRESS_APP_CONNECTION"',replacement:{match:/USER_PROFILE_MEMBER_SINCE,.{0,100}userId:(\i\.id),.{0,100}}\)}\),/,replace:"$&,$self.friendsSinceNew({userId:$1,isSidebar:false}),"}}],getFriendSince(e){try{return Le.isFriend(e)?Le.getSince(e):null}catch(t){return new Q("FriendsSince").error(t),null}},friendsSinceOld:k.wrap(({userId:e,textClassName:t})=>{if(!Le.isFriend(e))return null;let o=Le.getSince(e);return o?n("div",{className:Mk.section},n(ra,{variant:"eyebrow"},"Friends Since"),n("div",{className:Fw.memberSinceWrapper},!!pn()?.guild_id&&n("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 24 24",fill:"var(--interactive-normal)"},n("path",{d:"M13 10a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z"}),n("path",{d:"M3 5v-.75C3 3.56 3.56 3 4.25 3s1.24.56 1.33 1.25C6.12 8.65 9.46 12 13 12h1a8 8 0 0 1 8 8 2 2 0 0 1-2 2 .21.21 0 0 1-.2-.15 7.65 7.65 0 0 0-1.32-2.3c-.15-.2-.42-.06-.39.17l.25 2c.02.15-.1.28-.25.28H9a2 2 0 0 1-2-2v-2.22c0-1.57-.67-3.05-1.53-4.37A15.85 15.85 0 0 1 3 5Z"})),n(Z,{variant:"text-sm/normal",className:t},W1(o,q1.getLocale())))):null},{noop:!0}),friendsSinceNew:k.wrap(({userId:e,isSidebar:t})=>{if(!Le.isFriend(e))return null;let o=Le.getSince(e);return o?n("section",{className:Ak.section},n(ra,{variant:"text-xs/semibold",style:t?{}:{color:"var(--header-secondary)"}},"Friends Since"),t?n(Z,{variant:"text-sm/normal"},W1(o,q1.getLocale())):n("div",{className:Fw.memberSinceWrapper},n("div",{className:Ik.memberSince},!!pn()?.guild_id&&n("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 24 24",fill:"var(--interactive-normal)"},n("path",{d:"M13 10a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z"}),n("path",{d:"M3 5v-.75C3 3.56 3.56 3 4.25 3s1.24.56 1.33 1.25C6.12 8.65 9.46 12 13 12h1a8 8 0 0 1 8 8 2 2 0 0 1-2 2 .21.21 0 0 1-.2-.15 7.65 7.65 0 0 0-1.32-2.3c-.15-.2-.42-.06-.39.17l.25 2c.02.15-.1.28-.25.28H9a2 2 0 0 1-2-2v-2.22c0-1.57-.67-3.05-1.53-4.37A15.85 15.85 0 0 1 3 5Z"})),n(Z,{variant:"text-sm/normal"},W1(o,q1.getLocale()))))):null},{noop:!0})})});var K1,$w=f(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/gameActivityToggle/style.css",{name:"src/plugins/gameActivityToggle/style.css",source:`[class*="panels"] [class*="avatarWrapper"] {
|
|
min-width: 88px;
|
|
}
|
|
`,classNames:{},dom:null});K1="src/plugins/gameActivityToggle/style.css"});function Ck(e){let{oldIcon:t}=Hw.use(["oldIcon"]),o=t?"M23 2.27 21.73 1 1 21.73 2.27 23 23 2.27Z":"M22.7 2.7a1 1 0 0 0-1.4-1.4l-20 20a1 1 0 1 0 1.4 1.4Z",r=t?"M23.27 4.54 19.46.73 .73 19.46 4.54 23.27 23.27 4.54Z":"M23.27 4.73 19.27 .73 -.27 20.27 3.73 24.27Z";return function(){return n("svg",{width:"20",height:"20",viewBox:"0 0 24 24"},n("path",{fill:!e&&!t?"var(--status-danger)":"currentColor",mask:e?void 0:"url(#gameActivityMask)",d:"M3.06 20.4q-1.53 0-2.37-1.065T.06 16.74l1.26-9q.27-1.8 1.605-2.97T6.06 3.6h11.88q1.8 0 3.135 1.17t1.605 2.97l1.26 9q.21 1.53-.63 2.595T20.94 20.4q-.63 0-1.17-.225T18.78 19.5l-2.7-2.7H7.92l-2.7 2.7q-.45.45-.99.675t-1.17.225Zm14.94-7.2q.51 0 .855-.345T19.2 12q0-.51-.345-.855T18 10.8q-.51 0-.855.345T16.8 12q0 .51.345 .855T18 13.2Zm-2.4-3.6q.51 0 .855-.345T16.8 8.4q0-.51-.345-.855T15.6 7.2q-.51 0-.855.345T14.4 8.4q0 .51.345 .855T15.6 9.6ZM6.9 13.2h1.8v-2.1h2.1v-1.8h-2.1v-2.1h-1.8v2.1h-2.1v1.8h2.1v2.1Z"}),!e&&n(d,null,n("path",{fill:"var(--status-danger)",d:o}),n("mask",{id:"gameActivityMask"},n("rect",{fill:"white",x:"0",y:"0",width:"24",height:"24"}),n("path",{fill:"black",d:r}))))}}function Rk(){let e=Gw.useSetting();return n(Nk,{tooltipText:e?"Disable Game Activity":"Enable Game Activity",icon:Ck(e),role:"switch","aria-checked":!e,onClick:()=>Gw.updateSetting(t=>!t)})}var Nk,Gw,Hw,_p,zw=f(()=>{"use strict";a();_();Ve();Fr();re();P();w();$();$w();Nk=ve("Button.Sizes.NONE,disabled:"),Gw=jo("status","showCurrentGame");Hw=A({oldIcon:{type:3,description:"Use the old icon style before Discord icon redesign",default:!1}}),_p=h({name:"GameActivityToggle",description:"Adds a button next to the mic and deafen button to toggle game activity.",authors:[p.Nuckyz,p.RuukuLada],dependencies:["UserSettingsAPI"],settings:Hw,patches:[{find:".Messages.ACCOUNT_SPEAKING_WHILE_MUTED",replacement:{match:/this\.renderNameZone\(\).+?children:\[/,replace:"$&$self.GameActivityToggleButton(),"}}],GameActivityToggleButton:k.wrap(Rk,{noop:!0}),start(){zt(K1)},stop(){go(K1)}})});var Bp,jw=f(()=>{"use strict";a();P();pt();w();b();Bp=h({name:"GifPaste",description:"Makes picking a gif in the gif picker insert a link into the chatbox instead of instantly sending it",authors:[p.Ven],patches:[{find:'"handleSelectGIF",',replacement:{match:/"handleSelectGIF",(\i)=>\{/,replace:'"handleSelectGIF",$1=>{if (!this.props.className) return $self.handleSelect($1);'}}],handleSelect(e){e&&($n(e.url+" "),ma.closeExpressionPicker())}})});function qw(e,t,o){let r=Co.getSendMessageOptionsForReply({channel:e,message:t,shouldMention:!0,showMentionToggle:!0});if(Fp.store.greetMode==="Message"||o.length>1){r.stickerIds=o;let i={content:"",tts:!1,invalidEmojis:[],validNonShortcutEmojis:[]};Co._sendMessage(e.id,i,r)}else Co.sendGreetMessage(e.id,o[0],r)}function kk({channel:e,message:t}){let o=Fp.use(["greetMode","multiGreetChoices"]),{greetMode:r,multiGreetChoices:i=[]}=o;return n(E.Menu,{navId:"greet-sticker-picker",onClose:()=>F.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Greet Sticker Picker"},n(E.MenuGroup,{label:"Greet Mode"},Object.values(Kw).map(s=>n(E.MenuRadioItem,{key:s,group:"greet-mode",id:"greet-mode-"+s,label:s,checked:s===r,action:()=>o.greetMode=s}))),n(E.MenuSeparator,null),n(E.MenuGroup,{label:"Greet Stickers"},Ww.map(s=>n(E.MenuItem,{key:s.id,id:"greet-"+s.id,label:s.description.split(" ")[0],action:()=>qw(e,t,[s.id])}))),Fp.store.unholyMultiGreetEnabled?n(d,null,n(E.MenuSeparator,null),n(E.MenuItem,{label:"Unholy Multi-Greet",id:"unholy-multi-greet"},Ww.map(s=>{let l=i.some(u=>u===s.id);return n(E.MenuCheckboxItem,{key:s.id,id:"multi-greet-"+s.id,label:s.description.split(" ")[0],checked:l,disabled:!l&&i.length>=3,action:()=>{o.multiGreetChoices=l?i.filter(u=>u!==s.id):[...i,s.id]}})}),n(E.MenuSeparator,null),n(E.MenuItem,{id:"multi-greet-submit",label:"Send Greets",action:()=>qw(e,t,i),disabled:i.length===0}))):null)}var Kw,Fp,Ww,Up,Yw=f(()=>{"use strict";a();_();P();w();$();b();Kw=(o=>(o.Greet="Greet",o.NormalMessage="Message",o))(Kw||{}),Fp=A({greetMode:{type:4,options:[{label:"Greet (you can only greet 3 times)",value:"Greet",default:!0},{label:"Normal Message (you can greet spam)",value:"Message"}],description:"Choose the greet mode"}}).withPrivateSettings(),Ww=Qe(e=>Array.isArray(e)&&e[0]?.name==="Wave");Up=h({name:"GreetStickerPicker",description:"Allows you to use any greet sticker instead of only the random one by right-clicking the 'Wave to say hi!' button",authors:[p.Ven],settings:Fp,patches:[{find:"Messages.WELCOME_CTA_LABEL",replacement:{match:/innerClassName:\i\.welcomeCTAButton,(?<={channel:\i,message:\i}=(\i).{0,400}?)/,replace:"$&onContextMenu:(vcEvent)=>$self.pickSticker(vcEvent, $1),"}}],pickSticker(e,t){t.message.deleted||Jt.openContextMenu(e,()=>n(kk,{...t}))}})});var Y1={};lt(Y1,{_buildPopoverElements:()=>Lk,addButton:()=>vn,buttons:()=>$p,removeButton:()=>Qo});function vn(e,t){$p.set(e,t)}function Qo(e){$p.delete(e)}function Lk(e,t){let o=[];for(let[r,i]of $p.entries())try{let s=i(e);s&&(s.key??=r,o.push(t(s)))}catch(s){Dk.error(`[${r}]`,s)}return o}var Dk,$p,Ui=f(()=>{"use strict";a();ke();Dk=new Q("MessagePopover"),$p=new Map});var dl,Xw,ml,Zw,Ek,Gp,Jw=f(()=>{"use strict";a();cn();Ui();bt();P();w();b();Xw="HideAttachments_HiddenIds",ml=new Set,Zw=()=>It(Xw).then(e=>(ml=e??new Set,ml)),Ek=e=>Ht(Xw,e),Gp=h({name:"HideAttachments",description:"Hide attachments and Embeds for individual messages via hover button",authors:[p.Ven],dependencies:["MessagePopoverAPI"],async start(){dl=document.createElement("style"),dl.id="VencordHideAttachments",document.head.appendChild(dl),await Zw(),await this.buildCss(),vn("HideAttachments",e=>{if(!e.attachments.length&&!e.embeds.length&&!e.stickerItems.length)return null;let t=ml.has(e.id);return{label:t?"Show Attachments":"Hide Attachments",icon:t?Ia:Ma,message:e,channel:te.getChannel(e.channel_id),onClick:()=>this.toggleHide(e.id)}})},stop(){dl.remove(),ml.clear(),Qo("HideAttachments")},async buildCss(){let e=[...ml].map(t=>`#message-accessories-${t}`).join(",");dl.textContent=`
|
|
:is(${e}) :is([class*="embedWrapper"], [class*="clickableSticker"]) {
|
|
/* important is not necessary, but add it to make sure bad themes won't break it */
|
|
display: none !important;
|
|
}
|
|
:is(${e})::after {
|
|
content: "Attachments hidden";
|
|
color: var(--text-muted);
|
|
font-size: 80%;
|
|
}
|
|
`},async toggleHide(e){let t=await Zw();t.delete(e)||t.add(e),await Ek(t),await this.buildCss()}})});var Hp,Qw=f(()=>{"use strict";a();P();w();Hp=h({name:"iLoveSpam",description:"Do not hide messages from 'likely spammers'",authors:[p.botato,p.Nyako],patches:[{find:"hasFlag:{writable",replacement:{match:/if\((\i)<=(?:1<<30|1073741824)\)return/,replace:"if($1===(1<<20))return false;$&"}}]})});function tx(e,t,o,r){return n(oe,{text:t},i=>n("button",{...i,onClick:s=>Fk(s,e),style:{all:"unset",cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"center"}},n("svg",{width:"24",height:"24",viewBox:"0 -960 960 960"},n("path",{fill:r,d:o}))))}function ex(e,t=!1){let o=wo.use(["ignoredActivities"]),{ignoredActivities:r=[]}=o;return r.some(i=>i.id===e.id)?Bk(e,"var(--status-danger)"):_k(e,t?"var(--green-300)":"var(--primary-400)")}function Fk(e,t){e.stopPropagation();let o=Wr().findIndex(r=>r.id===t.id);o===-1?wo.store.ignoredActivities=Wr().concat(t):wo.store.ignoredActivities=Wr().filter((r,i)=>i!==o),Ok.updateSetting(r=>r)}function Uk(){return n(pe,{flexDirection:"column"},n(S.FormText,{type:S.FormText.Types.DESCRIPTION},"Import the application id of the CustomRPC plugin to the allowed list"),n("div",null,n(T,{onClick:()=>{let e=j.plugins.CustomRPC?.appID;if(!e)return it("CustomRPC application ID is not set.",V.Type.FAILURE);Z1?.(e)&&it("CustomRPC application ID is already added.",V.Type.FAILURE)}},"Import CustomRPC ID")))}function $k(e){let[t,o]=K(wo.store.allowedIds??"");Z1=i=>{let s=new Set(t.split(",").map(c=>c.trim()).filter(Boolean)),l=s.has(i)||(s.add(i),!1),u=Array.from(s).join(", ");return o(u),e.setValue(u),l},ce(()=>()=>{Z1=null},[]);function r(i){o(i),e.setValue(i)}return n(S.FormSection,null,n(S.FormTitle,{tag:"h3"},"Allowed List"),n(S.FormText,{className:G.bottom8,type:S.FormText.Types.DESCRIPTION},"Comma separated list of activity IDs to allow (Useful for allowing RPC activities and CustomRPC)"),n(je,{type:"text",value:t,onChange:r,placeholder:"235834946571337729, 343383572805058560"}))}function Wr(){return wo.store.ignoredActivities??=[]}function Gk(e,t){if(t&&wo.store.allowedIds.includes(t))return!1;switch(e){case 0:return wo.store.ignorePlaying;case 1:return wo.store.ignoreStreaming;case 2:return wo.store.ignoreListening;case 3:return wo.store.ignoreWatching;case 5:return wo.store.ignoreCompeting}return!1}var Vw,Ok,_k,Bk,Z1,wo,zp,ox=f(()=>{"use strict";a();cn();_();Fr();re();Rt();P();Ze();w();$();b();Vw=me("RunningGameStore"),Ok=jo("status","showCurrentGame");_k=(e,t)=>tx(e,"Disable Activity","M480-320q75 0 127.5-52.5T660-500q0-75-52.5-127.5T480-680q-75 0-127.5 52.5T300-500q0 75 52.5 127.5T480-320Zm0-72q-45 0-76.5-31.5T372-500q0-45 31.5-76.5T480-608q45 0 76.5 31.5T588-500q0 45-31.5 76.5T480-392Zm0 192q-146 0-266-81.5T40-500q54-137 174-218.5T480-800q146 0 266 81.5T920-500q-54 137-174 218.5T480-200Zm0-300Zm0 220q113 0 207.5-59.5T832-500q-50-101-144.5-160.5T480-720q-113 0-207.5 59.5T128-500q50 101 144.5 160.5T480-280Z",t),Bk=(e,t)=>tx(e,"Enable Activity","m644-428-58-58q9-47-27-88t-93-32l-58-58q17-8 34.5-12t37.5-4q75 0 127.5 52.5T660-500q0 20-4 37.5T644-428Zm128 126-58-56q38-29 67.5-63.5T832-500q-50-101-143.5-160.5T480-720q-29 0-57 4t-55 12l-62-62q41-17 84-25.5t90-8.5q151 0 269 83.5T920-500q-23 59-60.5 109.5T772-302Zm20 246L624-222q-35 11-70.5 16.5T480-200q-151 0-269-83.5T40-500q21-53 53-98.5t73-81.5L56-792l56-56 736 736-56 56ZM222-624q-29 26-53 57t-41 67q50 101 143.5 160.5T480-280q20 0 39-2.5t39-5.5l-36-38q-11 3-21 4.5t-21 1.5q-75 0-127.5-52.5T300-500q0-11 1.5-21t4.5-21l-84-82Zm319 93Zm-151 75Z",t);Z1=null;wo=A({importCustomRPC:{type:6,description:"",component:()=>n(Uk,null)},allowedIds:{type:6,description:"",default:"",onChange(e){let t=new Set(e.split(",").map(o=>o.trim()).filter(Boolean));wo.store.allowedIds=Array.from(t).join(", ")},component:e=>n($k,{setValue:e.setValue})},ignorePlaying:{type:3,description:"Ignore all playing activities (These are usually game and RPC activities)",default:!1},ignoreStreaming:{type:3,description:"Ignore all streaming activities",default:!1},ignoreListening:{type:3,description:"Ignore all listening activities (These are usually spotify activities)",default:!1},ignoreWatching:{type:3,description:"Ignore all watching activities",default:!1},ignoreCompeting:{type:3,description:"Ignore all competing activities (These are normally special game activities)",default:!1}}).withPrivateSettings();zp=h({name:"IgnoreActivities",authors:[p.Nuckyz],description:"Ignore activities from showing up on your status ONLY. You can configure which ones are specifically ignored from the Registered Games and Activities tabs, or use the general settings below.",dependencies:["UserSettingsAPI"],settings:wo,patches:[{find:'="LocalActivityStore",',replacement:[{match:/HANG_STATUS.+?(?=!\i\(\)\(\i,\i\)&&)(?<=(\i)\.push.+?)/,replace:(e,t)=>`${e}${t}=${t}.filter($self.isActivityNotIgnored);`}]},{find:'="ActivityTrackingStore",',replacement:{match:/getVisibleRunningGames\(\).+?;(?=for)(?<=(\i)=\i\.\i\.getVisibleRunningGames.+?)/,replace:(e,t)=>`${e}${t}=${t}.filter(({id,name})=>$self.isActivityNotIgnored({type:0,application_id:id,name}));`}},{find:".Messages.SETTINGS_GAMES_TOGGLE_OVERLAY",replacement:{match:/\.Messages\.SETTINGS_GAMES_TOGGLE_OVERLAY.+?}\(\),(?<={overlay:\i,.+?=(\i),.+?)(?=!(\i))/,replace:(e,t,o)=>`${e}$self.renderToggleGameActivityButton(${t},${o}),`}},{find:".activityTitleText,variant",replacement:{match:/\.activityTitleText.+?children:(\i)\.name.*?}\),/,replace:(e,t)=>`${e}$self.renderToggleActivityButton(${t}),`}},{find:".activityCardDetails,children",replacement:{match:/\.activityCardDetails.+?children:(\i\.application)\.name.*?}\),/,replace:(e,t)=>`${e}$self.renderToggleActivityButton(${t}),`}}],async start(){let e=await It("IgnoreActivities_ignoredActivities");if(e!=null&&(wo.store.ignoredActivities=Array.from(e.values()).map(t=>({...t,name:"Unknown Name"})),xg("IgnoreActivities_ignoredActivities")),Wr().length!==0){let t=Vw.getGamesSeen();for(let[o,r]of Wr().entries())r.type===0&&(t.some(i=>i.id===r.id||i.exePath===r.id)||Wr().splice(o,1))}},isActivityNotIgnored(e){if(Gk(e.type,e.application_id))return!1;if(e.application_id!=null)return!Wr().some(t=>t.id===e.application_id)||wo.store.allowedIds.includes(e.application_id);{let t=Vw.getRunningGames().find(o=>o.name===e.name)?.exePath;if(t)return!Wr().some(o=>o.id===t)}return!0},renderToggleGameActivityButton(e,t){return n(k,{noop:!0},n("div",{style:{marginLeft:12,zIndex:0}},ex({id:e.id??e.exePath,name:e.name,type:0},t)))},renderToggleActivityButton(e){return n(k,{noop:!0},ex({id:e.id,name:e.name,type:1}))}})});var jp,nx=f(()=>{"use strict";a();P();w();jp=h({name:"ImageLink",description:"Never hide image links in messages, even if it's the only content",authors:[p.Kyuuhachi,p.Sqaaakoi],patches:[{find:"unknownUserMentionPlaceholder:",replacement:{match:/\i\.has\(\i\.type\)&&\(0,\i\.\i\)\(\i\)/,replace:"false"}}]})});var fl,X1=f(()=>{"use strict";a();fl="vc-imgzoom-magnify-modal"});function J1(e,t){e()?t():requestAnimationFrame(()=>J1(e,t))}var rx=f(()=>{"use strict";a()});var Hk,Q1,ix=f(()=>{"use strict";a();Ve();re();b();X1();V1();rx();Hk=Te("vc-imgzoom-"),Q1=k.wrap(({instance:e,size:t,zoom:o})=>{let[r,i]=K(!1),[s,l]=K({x:0,y:0}),[u,c]=K({x:0,y:0}),[m,g]=K(0),y=xt(!1),v=xt(o),M=xt(t),x=xt(null),N=xt(null),I=xt(null),R=xt(null);if(H.useLayoutEffect(()=>{let B=ie=>{ie.key==="Shift"&&(y.current=!0)},z=ie=>{ie.key==="Shift"&&(y.current=!1)},Y=()=>{N.current&&I.current&&(N.current.currentTime=I.current.currentTime)},ee=ie=>{if(!!x.current)if(e.state.mouseOver&&e.state.mouseDown){let Ne=M.current/2,he={x:ie.pageX,y:ie.pageY},Ke=-((he.x-x.current.getBoundingClientRect().left)*v.current-Ne),Ce=-((he.y-x.current.getBoundingClientRect().top)*v.current-Ne);l({x:ie.x-Ne,y:ie.y-Ne}),c({x:Ke,y:Ce}),g(1)}else g(0)},J=ie=>{e.state.mouseOver&&ie.button===0&&(v.current=dt.store.zoom,M.current=dt.store.size,document.getElementById("image-context")&&F.dispatch({type:"CONTEXT_MENU_CLOSE"}),ee(ie),g(1))},U=()=>{g(0),dt.store.saveZoomValues&&(dt.store.zoom=v.current,dt.store.size=M.current)},ne=async ie=>{if(e.state.mouseOver&&e.state.mouseDown&&!y.current){let Ne=v.current+ie.deltaY/100*(dt.store.invertScroll?-1:1)*dt.store.zoomSpeed;v.current=Ne<=1?1:Ne,ee(ie)}if(e.state.mouseOver&&e.state.mouseDown&&y.current){let Ne=M.current+ie.deltaY*(dt.store.invertScroll?-1:1)*dt.store.zoomSpeed;M.current=Ne<=50?50:Ne,ee(ie)}};return J1(()=>e.state.readyState==="READY",()=>{let ie=document.getElementById(fl);x.current=ie,ie.querySelector("img,video")?.setAttribute("draggable","false"),e.props.animated&&(I.current=ie.querySelector("video"),I.current.addEventListener("timeupdate",Y)),i(!0)}),document.addEventListener("keydown",B),document.addEventListener("keyup",z),document.addEventListener("mousemove",ee),document.addEventListener("mousedown",J),document.addEventListener("mouseup",U),document.addEventListener("wheel",ne),()=>{document.removeEventListener("keydown",B),document.removeEventListener("keyup",z),document.removeEventListener("mousemove",ee),document.removeEventListener("mousedown",J),document.removeEventListener("mouseup",U),document.removeEventListener("wheel",ne),dt.store.saveZoomValues&&(dt.store.zoom=v.current,dt.store.size=M.current)}},[]),!r)return null;let D=x.current?.getBoundingClientRect();return D?n("div",{className:Hk("lens",{"nearest-neighbor":dt.store.nearestNeighbour,square:dt.store.square}),style:{opacity:m,width:M.current+"px",height:M.current+"px",transform:`translate(${s.x}px, ${s.y}px)`}},e.props.animated?n("video",{ref:N,style:{position:"absolute",left:`${u.x}px`,top:`${u.y}px`},width:`${D.width*v.current}px`,height:`${D.height*v.current}px`,poster:e.props.src,src:I.current?.src??e.props.src,autoPlay:!0,loop:!0,muted:!0}):n("img",{ref:R,style:{position:"absolute",transform:`translate(${u.x}px, ${u.y}px)`},width:`${D.width*v.current}px`,height:`${D.height*v.current}px`,src:e.props.src,alt:""})):null},{noop:!0})});var ey,sx=f(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/imageZoom/styles.css",{name:"src/plugins/imageZoom/styles.css",source:`.vc-imgzoom-lens {
|
|
position: absolute;
|
|
inset: 0;
|
|
z-index: 9999;
|
|
border: 2px solid grey;
|
|
border-radius: 50%;
|
|
overflow: hidden;
|
|
cursor: none;
|
|
box-shadow: inset 0 0 10px 2px grey;
|
|
filter: drop-shadow(0 0 2px grey);
|
|
pointer-events: none;
|
|
|
|
/* negate the border offsetting the lens */
|
|
margin: -2px;
|
|
}
|
|
|
|
.vc-imgzoom-square {
|
|
border-radius: 0;
|
|
}
|
|
|
|
.vc-imgzoom-nearest-neighbor>img {
|
|
image-rendering: pixelated;
|
|
|
|
/* https://googlechrome.github.io/samples/image-rendering-pixelated/index.html */
|
|
}
|
|
|
|
/* make the carousel take up less space so we can click the backdrop and exit out of it */
|
|
[class*="modalCarouselWrapper_"] {
|
|
top: 0 !important;
|
|
}
|
|
|
|
[class*="carouselModal_"] {
|
|
height: 0 !important;
|
|
}
|
|
`,classNames:{},dom:null});ey="src/plugins/imageZoom/styles.css"});var dt,zk,Wp,V1=f(()=>{"use strict";a();_();Ve();Er();Mr();P();w();b();ix();X1();sx();dt=A({saveZoomValues:{type:3,description:"Whether to save zoom and lens size values",default:!0},invertScroll:{type:3,description:"Invert scroll",default:!0},nearestNeighbour:{type:3,description:"Use Nearest Neighbour Interpolation when scaling images",default:!1},square:{type:3,description:"Make the lens square",default:!1},zoom:{description:"Zoom of the lens",type:5,markers:Vt(1,50,4),default:2,stickToMarkers:!1},size:{description:"Radius / Size of the lens",type:5,markers:Vt(50,1e3,50),default:100,stickToMarkers:!1},zoomSpeed:{description:"How fast the zoom / lens size changes",type:5,markers:Vt(.1,5,.2),default:.5,stickToMarkers:!1}}),zk=e=>{let{square:t,nearestNeighbour:o}=dt.use(["square","nearestNeighbour"]);e.push(n(E.MenuGroup,{id:"image-zoom"},n(E.MenuCheckboxItem,{id:"vc-square",label:"Square Lens",checked:t,action:()=>{dt.store.square=!t}}),n(E.MenuCheckboxItem,{id:"vc-nearest-neighbour",label:"Nearest Neighbour",checked:o,action:()=>{dt.store.nearestNeighbour=!o}}),n(E.MenuControlItem,{id:"vc-zoom",label:"Zoom",control:(r,i)=>n(E.MenuSliderControl,{ref:i,...r,minValue:1,maxValue:50,value:dt.store.zoom,onChange:ro(s=>dt.store.zoom=s,100)})}),n(E.MenuControlItem,{id:"vc-size",label:"Lens Size",control:(r,i)=>n(E.MenuSliderControl,{ref:i,...r,minValue:50,maxValue:1e3,value:dt.store.size,onChange:ro(s=>dt.store.size=s,100)})}),n(E.MenuControlItem,{id:"vc-zoom-speed",label:"Zoom Speed",control:(r,i)=>n(E.MenuSliderControl,{ref:i,...r,minValue:.1,maxValue:5,value:dt.store.zoomSpeed,onChange:ro(s=>dt.store.zoomSpeed=s,100),renderValue:s=>`${s.toFixed(3)}x`})})))},Wp=h({name:"ImageZoom",description:"Lets you zoom in to images and gifs. Use scroll wheel to zoom in and shift + scroll wheel to increase lens radius / size",authors:[p.Aria],tags:["ImageUtilities"],patches:[{find:"Messages.OPEN_IN_BROWSER",replacement:{match:/return.{1,200}\.wrapper.{1,200}src:\i,/g,replace:`$&id: '${fl}',`}},{find:".handleImageLoad)",replacement:[{match:/placeholderVersion:\i,/,replace:"...$self.makeProps(this),$&"},{match:/componentDidMount\(\){/,replace:"$&$self.renderMagnifier(this);"},{match:/componentWillUnmount\(\){/,replace:"$&$self.unMountMagnifier();"}]},{find:".carouselModal",replacement:{match:/(?<=\.carouselModal.{0,100}onClick:)\i,/,replace:"()=>{},"}}],settings:dt,contextMenus:{"image-context":zk},currentMagnifierElement:null,element:null,Magnifier:Q1,root:null,makeProps(e){return{onMouseOver:()=>this.onMouseOver(e),onMouseOut:()=>this.onMouseOut(e),onMouseDown:t=>this.onMouseDown(t,e),onMouseUp:()=>this.onMouseUp(e),id:e.props.id}},renderMagnifier(e){e.props.id===fl&&(this.currentMagnifierElement||(this.currentMagnifierElement=n(Q1,{size:dt.store.size,zoom:dt.store.zoom,instance:e}),this.root=li.createRoot(this.element),this.root.render(this.currentMagnifierElement)))},unMountMagnifier(){this.root?.unmount(),this.currentMagnifierElement=null,this.root=null},onMouseOver(e){e.setState(t=>({...t,mouseOver:!0}))},onMouseOut(e){e.setState(t=>({...t,mouseOver:!1}))},onMouseDown(e,t){e.button===0&&t.setState(o=>({...o,mouseDown:!0}))},onMouseUp(e){e.setState(t=>({...t,mouseDown:!1}))},start(){zt(ey),this.element=document.createElement("div"),this.element.classList.add("MagnifierContainer"),document.body.appendChild(this.element)},stop(){go(ey),this.root&&this.root.unmount(),this.element?.remove()}})});var ax,qp,lx=f(()=>{"use strict";a();_();P();w();$();b();cx();ax=me("UserAffinitiesStore"),qp=h({name:"ImplicitRelationships",description:"Shows your implicit relationships in the Friends tab.",authors:[p.Dolfies],patches:[{find:".FRIENDS_ALL_HEADER",replacement:{match:/toString\(\)\}\);case (\i\.\i)\.BLOCKED/,replace:'toString()});case $1.IMPLICIT:return "Implicit \u2014 "+arguments[1];case $1.BLOCKED'}},{find:"FriendsEmptyState: Invalid empty state",replacement:{match:/case (\i\.\i)\.ONLINE:(?=return (\i)\.SECTION_ONLINE)/,replace:"case $1.ONLINE:case $1.IMPLICIT:"}},{find:".FRIENDS_SECTION_ONLINE",replacement:{match:/(\(0,\i\.jsx\)\(\i\.TabBar\.Item,\{id:\i\.\i)\.BLOCKED,className:([^\s]+?)\.item,children:\i\.\i\.Messages\.BLOCKED\}\)/,replace:'$1.IMPLICIT,className:$2.item,children:"Implicit"}),$&'}},{find:'"FriendsStore"',replacement:{match:/(?<=case (\i\.\i)\.BLOCKED:return (\i)\.type===\i\.\i\.BLOCKED)/,replace:";case $1.IMPLICIT:return $2.type===5"}},{find:'"FriendsStore',replacement:{match:/(\i\.\i)\.fetchRelationships\(\)/,replace:"$1.fetchRelationships(),$self.fetchImplicitRelationships()"}},{find:"getRelationshipCounts(){",replacement:{predicate:()=>j.plugins.ImplicitRelationships.sortByAffinity,match:/\}\)\.sortBy\((.+?)\)\.value\(\)/,replace:"}).sortBy(row => $self.wrapSort(($1), row)).value()"}},{find:".REQUEST_GUILD_MEMBERS",replacement:{match:/\.send\(8,{/,replace:"$&nonce:arguments[1].nonce,"}},{find:"GUILD_MEMBERS_REQUEST:",replacement:{match:/presences:!!(\i)\.presences/,replace:"$&,nonce:$1.nonce"}},{find:".not_found",replacement:{match:/notFound:(\i)\.not_found/,replace:"$&,nonce:$1.nonce"}}],settings:A({sortByAffinity:{type:3,default:!0,description:"Whether to sort implicit relationships by their affinity to you.",restartNeeded:!0}}),wrapSort(e,t){return t.type===5?-ax.getUserAffinity(t.user.id)?.affinity:e(t)},async fetchImplicitRelationships(){let e=ax.getUserAffinitiesUserIds(),t=Array.from(e).filter(g=>!Le.getRelationshipType(g)),o=new Set(Object.values(te.getSortedPrivateChannels()).flatMap(g=>g.recipients)),r=t.filter(g=>!L.getUser(g)||o.has(g)),i=Object.keys(se.getGuilds()),s=uo.fromTimestamp(Date.now()),l=i.length*Math.ceil(r.length/100),u=new Set(r),c=Le.getRelationships(),m=({chunks:g})=>{for(let y of g){let{nonce:v,members:M}=y;if(v!==s)return;M.forEach(x=>{u.delete(x.user.id)}),t.map(x=>L.getUser(x)).filter(x=>x&&!u.has(x.id)).forEach(x=>c[x.id]=5),Le.emitChange(),--l===0&&F.unsubscribe("GUILD_MEMBERS_CHUNK_BATCH",m)}};F.subscribe("GUILD_MEMBERS_CHUNK_BATCH",m);for(let g=0;g<r.length;g+=100)F.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:i,userIds:r.slice(g,g+100),nonce:s})},start(){yt.FriendsSections.IMPLICIT="IMPLICIT"}})});var ux=f(()=>{});var ny={};lt(ny,{ChatBarButton:()=>qo,_injectButtons:()=>Wk,addChatBarButton:()=>Wo,removeChatBarButton:()=>Sn});function Wk(e,t){if(!t.disabled)for(let[o,r]of oy)e.push(n(k,{noop:!0,key:o,onError:i=>jk.error(`Failed to render ${o}`,i.error)},n(r,{...t,isMainChat:t.type.analyticsName==="normal"})))}var ty,oy,jk,Wo,Sn,qo,or=f(()=>{"use strict";a();ux();re();ke();$();b();ht(["buttonContainer","channelTextArea"],e=>ty=e);oy=new Map,jk=new Q("ChatButtons");Wo=(e,t)=>oy.set(e,t),Sn=e=>oy.delete(e),qo=k.wrap(e=>n(oe,{text:e.tooltip},({onMouseEnter:t,onMouseLeave:o})=>n("div",{className:`expression-picker-chat-input-button ${ty?.buttonContainer??""} vc-chatbar-button`},n(T,{"aria-label":e.tooltip,size:"",look:cc.BLANK,onMouseEnter:t,onMouseLeave:o,innerClassName:`${sc.button} ${ty?.button}`,onClick:e.onClick,onContextMenu:e.onContextMenu,...e.buttonProps},n("div",{className:sc.buttonWrapper},e.children)))),{noop:!0})});var ry={};lt(ry,{updateMessage:()=>$i});function $i(e,t,o){let r=fc.getOrCreate(e);if(!r.has(t))return;let i=r.update(t,s=>o?s.merge(o):new s.constructor(s));fc.commit(i),Gt.emitChange()}var gl=f(()=>{"use strict";a();b()});function qk(e){let t=e?.message?.content,[o,r]=H.useState("password");return n(fe,{...e},n(Ee,null,n(S.FormTitle,{tag:"h4"},"Decrypt Message")),n(we,null,n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Message with Encryption"),n(je,{defaultValue:t,disabled:!0}),n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Password"),n(je,{style:{marginBottom:"20px"},onChange:r})),n(ct,null,n(T,{color:T.Colors.GREEN,onClick:()=>{let i=iy(t,o,!0);!i||!e?.message||(Vencord.Plugins.plugins.InvisibleChat.buildEmbed(e?.message,i),e.onClose())}},"Decrypt"),n(T,{color:T.Colors.TRANSPARENT,look:T.Looks.LINK,style:{left:15,position:"absolute"},onClick:e.onClose},"Cancel")))}function px(e){ue(t=>n(qk,{...t,...e}))}var dx=f(()=>{"use strict";a();$e();b();Kp()});function Kk(e){let[t,o]=H.useState(""),[r,i]=H.useState(""),[s,l]=H.useState("password"),[u,c]=H.useState(!1),m=t&&(u||r&&r.trim().split(" ").length>1);return n(fe,{...e},n(Ee,null,n(S.FormTitle,{tag:"h4"},"Encrypt Message")),n(we,null,n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Secret"),n(je,{onChange:g=>{o(g)}}),n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Cover (2 or more Words!!)"),n(je,{disabled:u,onChange:g=>{i(g)}}),n(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Password"),n(je,{style:{marginBottom:"20px"},defaultValue:"password",onChange:g=>{l(g)}}),n(Lt,{value:u,onChange:g=>{c(g)}},"Don't use a Cover")),n(ct,null,n(T,{color:T.Colors.GREEN,disabled:!m,onClick:()=>{if(!m)return;let g=gx(t,s,u?"d d":r),y=u?g.replaceAll("d",""):g;!y||($n(y),e.onClose())}},"Send"),n(T,{color:T.Colors.TRANSPARENT,look:T.Looks.LINK,style:{left:15,position:"absolute"},onClick:()=>{e.onClose()}},"Cancel")))}function mx(){ue(e=>n(Kk,{...e}))}var fx=f(()=>{"use strict";a();pt();$e();b();Kp()});function Yk(){return n("svg",{fill:"var(--header-secondary)",width:24,height:24,viewBox:"0 0 64 64"},n("path",{d:"M 32 9 C 24.832 9 19 14.832 19 22 L 19 27.347656 C 16.670659 28.171862 15 30.388126 15 33 L 15 49 C 15 52.314 17.686 55 21 55 L 43 55 C 46.314 55 49 52.314 49 49 L 49 33 C 49 30.388126 47.329341 28.171862 45 27.347656 L 45 22 C 45 14.832 39.168 9 32 9 z M 32 13 C 36.963 13 41 17.038 41 22 L 41 27 L 23 27 L 23 22 C 23 17.038 27.037 13 32 13 z"}))}function Zk(){return n(oe,{text:"This message has a hidden message! (InvisibleChat)"},({onMouseEnter:e,onMouseLeave:t})=>n("img",{"aria-label":"Hidden Message Indicator (InvisibleChat)",onMouseEnter:e,onMouseLeave:t,src:"https://github.com/SammCheese/invisible-chat/raw/NewReplugged/src/assets/lock.png",width:20,height:20,style:{transform:"translateY(4p)",paddingInline:4}}))}function gx(e,t,o){return sy.hide(e+"\u200B",t,o)}function iy(e,t,o){let r=sy.reveal(e,t);return o?r.replace("\u200B",""):r}function Jk(e){return e.endsWith("\u200B")}async function Qk(e){let t=hx.store.savedPasswords.split(",").map(r=>r.trim());if(!e?.content||!t?.length)return!1;let{content:o}=e;/^\W/.test(e.content)&&(o=`d ${e.content}d`);for(let r=0;r<t.length;r++){let i=iy(o,t[r],!1);if(Jk(i))return i}return!1}var sy,Xk,hx,Yp,Kp=f(()=>{"use strict";a();or();Ui();gl();_();re();P();yp();w();b();dx();fx();Xk=({isMainChat:e})=>e?n(qo,{tooltip:"Encrypt Message",onClick:()=>mx(),buttonProps:{"aria-haspopup":"dialog"}},n("svg",{"aria-hidden":!0,role:"img",width:"24",height:"24",viewBox:"0 0 64 64",style:{scale:"1.39",translate:"0 -1px"}},n("path",{fill:"currentColor",d:"M 32 9 C 24.832 9 19 14.832 19 22 L 19 27.347656 C 16.670659 28.171862 15 30.388126 15 33 L 15 49 C 15 52.314 17.686 55 21 55 L 43 55 C 46.314 55 49 52.314 49 49 L 49 33 C 49 30.388126 47.329341 28.171862 45 27.347656 L 45 22 C 45 14.832 39.168 9 32 9 z M 32 13 C 36.963 13 41 17.038 41 22 L 41 27 L 23 27 L 23 22 C 23 17.038 27.037 13 32 13 z"}))):null,hx=A({savedPasswords:{type:0,default:"password, Password",description:"Saved Passwords (Seperated with a , )"}}),Yp=h({name:"InvisibleChat",description:"Encrypt your Messages in a non-suspicious way!",authors:[p.SammCheese],dependencies:["MessagePopoverAPI","ChatInputButtonAPI","MessageUpdaterAPI"],reporterTestable:8,settings:hx,patches:[{find:".Messages.MESSAGE_EDITED,",replacement:{match:/let\{className:\i,message:\i[^}]*\}=(\i)/,replace:"try {$1 && $self.INV_REGEX.test($1.message.content) ? $1.content.push($self.indicator()) : null } catch {};$&"}}],EMBED_API_URL:"https://embed.sammcheese.net",INV_REGEX:new RegExp(/( \u200c|\u200d |[\u2060-\u2064])[^\u200b]/),URL_REGEX:new RegExp(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/),async start(){vn("InvisibleChat",t=>this.INV_REGEX.test(t?.content)?{label:"Decrypt Message",icon:this.popOverIcon,message:t,channel:te.getChannel(t.channel_id),onClick:async()=>{await Qk(t).then(o=>o?void this.buildEmbed(t,o):void px({message:t}))}}:null),Wo("InvisibleChat",Xk);let{default:e}=await ow();sy=new e(!0,!1)},stop(){Qo("InvisibleChat"),Qo("InvisibleChat")},async getEmbed(e){let{body:t}=await St.post({url:yt.Endpoints.UNFURL_EMBED_URLS,body:{urls:[e]}});return await t.embeds[0]},async buildEmbed(e,t){let o=t.match(this.URL_REGEX);if(e.embeds.push({type:"rich",title:"Decrypted Message",color:"0x45f5f5",description:t,footer:{text:"Made with \u2764\uFE0F by c0dine and Sammy!"}}),o?.length){let r=await this.getEmbed(new URL(o[0]));r&&e.embeds.push(r)}$i(e.channel_id,e.id,{embeds:e.embeds})},popOverIcon:()=>n(Yk,null),indicator:k.wrap(Zk,{noop:!0})})});function yx(e,t){!te.hasChannel(t)||Bn.transitionTo(`/channels/${e??"@me"}/${t}`)}var Zp,Vo,Xp,vx=f(()=>{"use strict";a();cn();P();w();b();Zp=!1;Xp=h({name:"KeepCurrentChannel",description:"Attempt to navigate to the channel you were in before switching accounts or loading Discord.",authors:[p.Nuckyz],flux:{LOGOUT(e){({isSwitchingAccount:Zp}=e)},CONNECTION_OPEN(){!Zp||(Zp=!1,Vo?.channelId&&yx(Vo.guildId,Vo.channelId))},async CHANNEL_SELECT({guildId:e,channelId:t}){Zp||(Vo={guildId:e,channelId:t},await Ht("KeepCurrentChannel_previousData",Vo))}},async start(){Vo=await It("KeepCurrentChannel_previousData"),Vo?Vo.channelId&&yx(Vo.guildId,Vo.channelId):(Vo={guildId:Uo.getGuildId(),channelId:xe.getChannelId()??null},await Ht("KeepCurrentChannel_previousData",Vo))}})});async function ay(e){return(await fi.fetchAssetIds(ly,[e]))[0]}function tD(e){F.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e,socketId:"LastFM"})}var ly,Vk,Sx,eD,xo,Jp,bx=f(()=>{"use strict";a();_();ho();P();ke();w();$();b();ly="1108588077900898414",Vk="2a96cbd8b46e442fc41c2b86b821562f",Sx=new Q("LastFMRichPresence"),eD=C("getLocalPresence");xo=A({username:{description:"last.fm username",type:0},apiKey:{description:"last.fm api key",type:0},shareUsername:{description:"show link to last.fm profile",type:3,default:!1},shareSong:{description:"show link to song on last.fm",type:3,default:!0},hideWithSpotify:{description:"hide last.fm presence if spotify is running",type:3,default:!0},statusName:{description:"custom status text",type:0,default:"some music"},nameFormat:{description:"Show name of song and artist in status name",type:4,options:[{label:"Use custom status name",value:"status-name",default:!0},{label:"Use format 'artist - song'",value:"artist-first"},{label:"Use format 'song - artist'",value:"song-first"},{label:"Use artist name only",value:"artist"},{label:"Use song name only",value:"song"},{label:"Use album name (falls back to custom status text if song has no album)",value:"album"}]},useListeningStatus:{description:'show "Listening to" status instead of "Playing"',type:3,default:!1},missingArt:{description:"When album or album art is missing",type:4,options:[{label:"Use large Last.fm logo",value:"lastfmLogo",default:!0},{label:"Use generic placeholder",value:"placeholder"}]},showLastFmLogo:{description:"show the Last.fm logo by the album cover",type:3,default:!0}}),Jp=h({name:"LastFMRichPresence",description:"Little plugin for Last.fm rich presence",authors:[p.dzshn,p.RuiNtD,p.blahajZip,p.archeruwu],settingsAboutComponent:()=>n(d,null,n(S.FormTitle,{tag:"h3"},"How to get an API key"),n(S.FormText,null,"An API key is required to fetch your current track. To get one, you can visit ",n(qe,{href:"https://www.last.fm/api/account/create"},"this page")," and fill in the following information: ",n("br",null)," ",n("br",null),"Application name: Discord Rich Presence ",n("br",null),"Application description: (personal use) ",n("br",null)," ",n("br",null),"And copy the API key (not the shared secret!)")),settings:xo,start(){this.updatePresence(),this.updateInterval=setInterval(()=>{this.updatePresence()},16e3)},stop(){clearInterval(this.updateInterval)},async fetchTrackData(){if(!xo.store.username||!xo.store.apiKey)return null;try{let e=new URLSearchParams({method:"user.getrecenttracks",api_key:xo.store.apiKey,user:xo.store.username,limit:"1",format:"json"}),t=await fetch(`https://ws.audioscrobbler.com/2.0/?${e}`);if(!t.ok)throw`${t.status} ${t.statusText}`;let o=await t.json();if(o.error)return Sx.error("Error from Last.fm API",`${o.error}: ${o.message}`),null;let r=o.recenttracks?.track[0];return r?.["@attr"]?.nowplaying?{name:r.name||"Unknown",album:r.album["#text"],artist:r.artist["#text"]||"Unknown",url:r.url,imageUrl:r.image?.find(i=>i.size==="large")?.["#text"]}:null}catch(e){return Sx.error("Failed to query Last.fm API",e),null}},async updatePresence(){tD(await this.getActivity())},getLargeImage(e){if(e.imageUrl&&!e.imageUrl.includes(Vk))return e.imageUrl;if(xo.store.missingArt==="placeholder")return"placeholder"},async getActivity(){if(xo.store.hideWithSpotify){for(let s of eD.getActivities())if(s.type===2&&s.application_id!==ly)return null}let e=await this.fetchTrackData();if(!e)return null;let t=this.getLargeImage(e),o=t?{large_image:await ay(t),large_text:e.album||void 0,...xo.store.showLastFmLogo&&{small_image:await ay("lastfm-small"),small_text:"Last.fm"}}:{large_image:await ay("lastfm-large"),large_text:e.album||void 0},r=[];xo.store.shareUsername&&r.push({label:"Last.fm Profile",url:`https://www.last.fm/user/${xo.store.username}`}),xo.store.shareSong&&r.push({label:"View Song",url:e.url});let i=(()=>{switch(xo.store.nameFormat){case"artist-first":return e.artist+" - "+e.name;case"song-first":return e.name+" - "+e.artist;case"artist":return e.artist;case"song":return e.name;case"album":return e.album||xo.store.statusName;default:return xo.store.statusName}})();return{application_id:ly,name:i,details:e.name,state:e.artist,assets:o,buttons:r.length?r.map(s=>s.label):void 0,metadata:{button_urls:r.map(s=>s.url)},type:xo.store.useListeningStatus?2:0,flags:1}}})});var Tx,wx=f(()=>{a();Tx=`# Blank lines and lines starting with "#" are ignored
|
|
|
|
Explode
|
|
Read if cute
|
|
Have a nice day!
|
|
Starting Lightcord...
|
|
Loading 0BDFDB.plugin.js...
|
|
Installing BetterDiscord...
|
|
h
|
|
shhhhh did you know that you're my favourite user? But don't tell the others!!
|
|
Today's video is sponsored by Raid Shadow Legends, one of the biggest mobile role-playing games of 2019 and it's totally free!
|
|
Never gonna give you up, Never gonna let you down
|
|
( \u0361\xB0 \u035C\u0296 \u0361\xB0)
|
|
(\uFF89\u25D5\u30EE\u25D5)\uFF89*:\uFF65\uFF9F\u2727
|
|
You look so pretty today!
|
|
Thinking of a funny quote...
|
|
3.141592653589793
|
|
meow
|
|
Welcome, friend
|
|
If you, or someone you love, has Ligma, please see the Ligma health line at https://bit.ly/ligma_hotline
|
|
Trans Rights
|
|
I\u2019d just like to interject for a moment. What you\u2019re refering to as Linux, is in fact, GNU/Linux, or as I\u2019ve recently taken to calling it, GNU plus Linux.
|
|
You're doing good today!
|
|
Don't worry, it's nothing 9 cups of coffee couldn't solve!
|
|
\uFFFD(repeat like 30 times)
|
|
a light amount of tomfoolery is okay
|
|
do you love?
|
|
horror
|
|
so eepy
|
|
So without further ado, let's just jump right into it!
|
|
Dying is absolutely safe
|
|
hey you! you're cute :))
|
|
heya ~
|
|
<:trolley:997086295010594867>
|
|
Time is gone, space is insane. Here it comes, here again.
|
|
sometimes it's okay to just guhhhhhhhhhhhhhh
|
|
Welcome to nginx!`});var oD,nD,cy,Qp,xx=f(()=>{"use strict";a();_();P();ke();w();wx();oD=Tx.split(`
|
|
`).map(e=>/^\s*[^#\s]/.test(e)&&e.trim()).filter(Boolean),nD="Did you really disable all loading quotes? What a buffoon you are...",cy=A({replaceEvents:{description:"Should this plugin also apply during events with special event themed quotes? (e.g. Halloween)",type:3,default:!0},enablePluginPresetQuotes:{description:"Enable the quotes preset by this plugin",type:3,default:!0},enableDiscordPresetQuotes:{description:"Enable Discord's preset quotes (including event quotes, during events)",type:3,default:!1},additionalQuotes:{description:"Additional custom quotes to possibly appear, separated by the below delimiter",type:0,default:""},additionalQuotesDelimiter:{description:"Delimiter for additional quotes",type:0,default:"|"}}),Qp=h({name:"LoadingQuotes",description:"Replace Discords loading quotes",authors:[p.Ven,p.KraXen72,p.UlyssesZhan],settings:cy,patches:[{find:".LOADING_DID_YOU_KNOW",replacement:[{match:/"_loadingText".+?(?=(\i)\[.{0,10}\.random)/,replace:"$&$self.mutateQuotes($1),"},{match:/"_eventLoadingText".+?(?=(\i)\[.{0,10}\.random)/,replace:"$&$self.mutateQuotes($1),",predicate:()=>cy.store.replaceEvents}]}],mutateQuotes(e){try{let{enableDiscordPresetQuotes:t,additionalQuotes:o,additionalQuotesDelimiter:r,enablePluginPresetQuotes:i}=cy.store;t||(e.length=0),i&&e.push(...oD),e.push(...o.split(r).filter(Boolean)),e.length||e.push(nD)}catch(t){new Q("LoadingQuotes").error("Failed to mutate quotes",t)}}})});var rD,iD,Vp,Px=f(()=>{"use strict";a();P();w();$();rD=/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/,iD=C("insertText","selectCommandOption"),Vp=h({name:"MaskedLinkPaste",authors:[p.TheSun],description:"Pasting a link while having text selected will paste a hyperlink",patches:[{find:".selection,preventEmojiSurrogates:",replacement:{match:/(?<=\i.delete.{0,50})(\i)\.insertText\((\i)\)/,replace:"$self.handlePaste($1, $2, () => $&)"}}],handlePaste(e,t,o){t&&rD.test(t)&&e.operations?.[0]?.type==="remove_text"?iD.insertText(e,`[${e.operations[0].text}](${t})`):o()}})});var Ix=f(()=>{});var ed,Mx=f(()=>{"use strict";a();Mo();be();Si();b();ed=Tt(()=>{let e=new $o,t=new Map;class o extends ci.Store{getCount(i){return t.get(i)}async _ensureCount(i){t.has(i)||await la.preload(i,_n.getDefaultChannel(i).id)}ensureCount(i){t.has(i)||e.push(()=>this._ensureCount(i).then(()=>an(200),()=>an(200)))}}return new o(F,{GUILD_MEMBER_LIST_UPDATE({guildId:r,groups:i}){t.set(r,i.reduce((s,l)=>s+(l.id==="offline"?0:l.count),0))},ONLINE_GUILD_MEMBER_COUNT_UPDATE({guildId:r,count:i}){t.set(r,i)}})})});function dy({isTooltip:e,tooltipGuildId:t}){let o=Fe([xe],()=>pn()),r=e?t:o.guild_id,i=Fe([uy],()=>uy.getMemberCount(r)),s=Fe([ed],()=>ed.getCount(r)),{groups:l}=Fe([py],()=>py.getProps(r,o?.id));if(!e&&(l.length>=1||l[0].id!=="unknown")&&(s=l.reduce((c,m)=>c+(m.id==="offline"?0:m.count),0)),ce(()=>{ed.ensureCount(r)},[r]),i==null)return null;let u=s!=null?td(s):"?";return n("div",{className:Ms("widget",{tooltip:e,"member-list":!e})},n(oe,{text:`${u} online in this channel`,position:"bottom"},c=>n("div",{...c},n("span",{className:Ms("online-dot")}),n("span",{className:Ms("online")},u))),n(oe,{text:`${td(i)} total server members`,position:"bottom"},c=>n("div",{...c},n("span",{className:Ms("total-dot")}),n("span",{className:Ms("total")},td(i)))))}var Ax=f(()=>{"use strict";a();pt();b();my();Mx()});var uy,py,fy,sD,td,Ms,od,my=f(()=>{"use strict";a();Ix();_();Ve();re();P();w();$();Ax();uy=me("GuildMemberCountStore"),py=me("ChannelMemberStore"),fy=A({toolTip:{type:3,description:"If the member count should be displayed on the server tooltip",default:!0,restartNeeded:!0},memberList:{type:3,description:"If the member count should be displayed on the member list",default:!0,restartNeeded:!0}}),sD=new Intl.NumberFormat,td=e=>sD.format(e),Ms=Te("vc-membercount-"),od=h({name:"MemberCount",description:"Shows the amount of online & total members in the server member list and tooltip",authors:[p.Ven,p.Commandtechno],settings:fy,patches:[{find:"{isSidebarVisible:",replacement:{match:/(?<=let\{className:(\i),.+?children):\[(\i\.useMemo[^}]+"aria-multiselectable")/,replace:":[$1?.startsWith('members')?$self.render():null,$2"},predicate:()=>fy.store.memberList},{find:".invitesDisabledTooltip",replacement:{match:/\.VIEW_AS_ROLES_MENTIONS_WARNING.{0,100}(?=])/,replace:"$&,$self.renderTooltip(arguments[0].guild)"},predicate:()=>fy.store.toolTip}],render:k.wrap(dy,{noop:!0}),renderTooltip:k.wrap(e=>n(dy,{isTooltip:!0,tooltipGuildId:e.id}),{noop:!0})})});var Nx,aD,gy,Cx,Rx,As,nd,kx=f(()=>{"use strict";a();Rn();_();P();w();$();b();Nx=C("deleteMessage","startEditMessage"),aD=C("isEditing","isEditingAny"),gy=!1,Cx=e=>e.key==="Backspace"&&(gy=!0),Rx=e=>e.key==="Backspace"&&(gy=!1),As=A({enableDeleteOnClick:{type:3,description:"Enable delete on click while holding backspace",default:!0},enableDoubleClickToEdit:{type:3,description:"Enable double click to edit",default:!0},enableDoubleClickToReply:{type:3,description:"Enable double click to reply",default:!0},requireModifier:{type:3,description:"Only do double click actions when shift/ctrl is held",default:!1}}),nd=h({name:"MessageClickActions",description:"Hold Backspace and click to delete, double click to edit/reply",authors:[p.Ven],dependencies:["MessageEventsAPI"],settings:As,start(){document.addEventListener("keydown",Cx),document.addEventListener("keyup",Rx),this.onClick=c1((e,t,o)=>{let r=e.author.id===L.getCurrentUser().id;if(gy)As.store.enableDeleteOnClick&&(r||We.can(Ie.MANAGE_MESSAGES,t))&&(e.deleted?F.dispatch({type:"MESSAGE_DELETE",channelId:t.id,id:e.id,mlDeleted:!0}):Nx.deleteMessage(t.id,e.id),o.preventDefault());else{if(o.detail<2||As.store.requireModifier&&!o.ctrlKey&&!o.shiftKey||t.guild_id&&!We.can(Ie.SEND_MESSAGES,t)||e.deleted===!0)return;if(r){if(!As.store.enableDoubleClickToEdit||aD.isEditing(t.id,e.id))return;Nx.startEditMessage(t.id,e.id,e.content),o.preventDefault()}else{if(!As.store.enableDoubleClickToReply)return;let i=64;if(e.hasFlag(i))return;let s=o.shiftKey&&!As.store.requireModifier,l=Vencord.Plugins.plugins.NoReplyMention,u=Vencord.Plugins.isPluginEnabled("NoReplyMention")?l.shouldMention(e,s):!s;F.dispatch({type:"CREATE_PENDING_REPLY",channel:t,message:e,shouldMention:u,showMentionToggle:t.guild_id!==null})}}})},stop(){u1(this.onClick),document.removeEventListener("keydown",Cx),document.removeEventListener("keyup",Rx)}})});var Dx,lD,rd,Lx=f(()=>{"use strict";a();_();re();P();Ss();w();$();b();Dx=1471228928,lD=Xo("HiddenVisually"),rd=h({name:"MessageLatency",description:"Displays an indicator for messages that took \u2265n seconds to send",authors:[p.arHSM],settings:A({latency:{type:1,description:"Threshold in seconds for latency indicator",default:2},detectDiscordKotlin:{type:3,description:"Detect old Discord Android clients",default:!0},showMillis:{type:3,description:"Show milliseconds",default:!1}}),patches:[{find:"showCommunicationDisabledStyles",replacement:{match:/(message:(\i),avatar:\i,username:\(0,\i.jsxs\)\(\i.Fragment,\{children:\[)(\i&&)/,replace:"$1$self.Tooltip()({ message: $2 }),$3"}}],stringDelta(e,t){let o={days:Math.round(e/864e5),hours:Math.round(e/36e5%24),minutes:Math.round(e/6e4%60),seconds:Math.round(e/1e3%60),milliseconds:Math.round(e%1e3)},r=l=>o[l]>0?`${o[l]} ${o[l]>1?l:l.substring(0,l.length-1)}`:null;return Object.keys(o).reduce((l,u)=>{let c=r(u);return l+(Qn(c)?(l!==""?(t?u==="milliseconds":u==="seconds")?" and ":" ":"")+c:"")},"")||"0 seconds"},latencyTooltipData(e){let{latency:t,detectDiscordKotlin:o,showMillis:r}=this.settings.store,{id:i,nonce:s}=e;if(!Qn(s)||e.bot)return null;let l=!1,u=uo.extractTimestamp(i)-uo.extractTimestamp(s);r||(u=Math.round(u/1e3)*1e3),-u>=Dx-864e5&&(l=o,u+=Dx);let c=Math.abs(u),m=c!==u,g=t*1e3,y=c>=g?this.stringDelta(c,r):null,v=2*60*1e3,M=l?["status-positive","status-positive","text-muted"]:u>=v||m?["text-muted","text-muted","text-muted"]:u>=g*2?["status-danger","text-muted","text-muted"]:["status-warning","status-warning","text-muted"];return c>=g||l?{delta:y,ahead:m,fill:M,isDiscordKotlin:l}:null},Tooltip(){return k.wrap(({message:e})=>{let t=this.latencyTooltipData(e);if(!Qn(t))return null;let o;return t.delta?o=(t.ahead?`This user's clock is ${t.delta} ahead.`:`This message was sent with a delay of ${t.delta}.`)+(t.isDiscordKotlin?" User is suspected to be on an old Discord Android client.":""):o="User is suspected to be on an old Discord Android client",n(oe,{text:o,position:"top"},r=>n(d,null,n(this.Icon,{delta:t.delta,fill:t.fill,props:r}),n(lD,null,"Delayed Message")))})},Icon({delta:e,fill:t,props:o}){return n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",width:"12",height:"12",role:"img",fill:"none",style:{marginRight:"8px",verticalAlign:-1},"aria-label":e??"Old Discord Android client","aria-hidden":"false",...o},n("path",{fill:`var(--${t[0]})`,d:"M4.8001 12C4.8001 11.5576 4.51344 11.2 4.16023 11.2H2.23997C1.88676 11.2 1.6001 11.5576 1.6001 12V13.6C1.6001 14.0424 1.88676 14.4 2.23997 14.4H4.15959C4.5128 14.4 4.79946 14.0424 4.79946 13.6L4.8001 12Z"}),n("path",{fill:`var(--${t[1]})`,d:"M9.6001 7.12724C9.6001 6.72504 9.31337 6.39998 8.9601 6.39998H7.0401C6.68684 6.39998 6.40011 6.72504 6.40011 7.12724V13.6727C6.40011 14.0749 6.68684 14.4 7.0401 14.4H8.9601C9.31337 14.4 9.6001 14.0749 9.6001 13.6727V7.12724Z"}),n("path",{fill:`var(--${t[2]})`,d:"M14.4001 2.31109C14.4001 1.91784 14.1134 1.59998 13.7601 1.59998H11.8401C11.4868 1.59998 11.2001 1.91784 11.2001 2.31109V13.6888C11.2001 14.0821 11.4868 14.4 11.8401 14.4H13.7601C14.1134 14.4 14.4001 14.0821 14.4001 13.6888V2.31109Z"}))}})});async function mD(e,t){let o=Ns.get(t);if(o)return o.message;Ns.set(t,{fetched:!1});let i=(await St.get({url:yt.Endpoints.MESSAGES(e),query:{limit:1,around:t},retries:2}).catch(()=>null))?.body?.[0];if(!i)return;let s=Gt.getMessages(i.channel_id).receiveMessage(i).get(i.id);return Ns.set(s.id,{message:s,fetched:!0}),s}function fD(e){let t=[];for(let{content_type:o,height:r,width:i,url:s,proxy_url:l}of e.attachments??[])o?.startsWith("image/")&&t.push({height:r,width:i,url:s,proxyURL:l});for(let{type:o,image:r,thumbnail:i,url:s}of e.embeds??[])o==="image"?t.push({...r??i}):s&&o==="gifv"&&!_x.test(s)&&t.push({height:i.height,width:i.width,url:s});return t}function gD(e,t){return!e&&!t?"":e?t?`[no content, ${e} attachment${e!==1?"s":""} and ${t} embed${t!==1?"s":""}]`:`[no content, ${e} attachment${e!==1?"s":""}]`:`[no content, ${t} embed${t!==1?"s":""}]`}function hD(e){return!!(e.components.length||e.attachments.some(t=>!t.content_type?.startsWith("image/"))||e.embeds.some(t=>t.type!=="image"&&(t.type!=="gifv"||_x.test(t.url))))}function yD(e,t){if(e>t){let s=Math.min(e,400);return{width:s,height:Math.round(t/(e/s))}}let i=Math.min(t,300);return{width:Math.round(e/(t/i)),height:i}}function vD(e,t){return new Proxy(e,{get(o,r){return r==="vencordEmbeddedBy"?t:Reflect.get(...arguments)}})}function SD({message:e}){let t=e.vencordEmbeddedBy??[],o=[];for(let[r,i,s]of e.content.matchAll(yy)){if(t.includes(s)||t.length>2)continue;let l=te.getChannel(i);if(!l||!l.isPrivate()&&!We.can(Ie.VIEW_CHANNEL,l))continue;let{listMode:u,idList:c}=id.store,m=[l.guild_id,i,e.author.id].some(M=>M&&c.includes(M));if(u==="blacklist"&&m||u==="whitelist"&&!m)continue;let g=Ns.get(s)?.message;if(!g)if(g??=Gt.getMessage(i,s),g)Ns.set(s,{message:g,fetched:!0});else{dD.unshift(()=>mD(i,s).then(M=>M&&$i(e.channel_id,e.id)));continue}let y={message:vD(g,[...t,e.id]),channel:l},v=id.store.automodEmbeds;o.push(v==="always"||v==="prefer"&&!hD(g)?n(TD,{...y}):n(bD,{...y}))}return o.length?n(d,null,o):null}function Bx(e){return e.isDM()?["Direct Message",Ct.getUserAvatarURL(L.getUser(e.recipients[0]))]:e.isGroupDM()?["Group DM",Ct.getChannelIconURL(e)]:["Server",Ct.getGuildIconURL(se.getGuild(e.guild_id))]}function bD({message:e,channel:t}){let o=Ox.useSetting(),r=L.getUser(te.getChannel(t.id).recipients?.[0]),[i,s]=Bx(t);return n(cD,{embed:{rawDescription:"",color:"var(--background-secondary)",author:{name:n(Z,{variant:"text-xs/medium",tag:"span"},n("span",null,i," - "),Pe.parse(t.isDM()?`<@${r.id}>`:`<#${t.id}>`)),iconProxyURL:s}},renderDescription:()=>n("div",{key:e.id,className:q(Ex.message,id.store.messageBackgroundColor&&Ex.searchResult)},n(pD,{id:`message-link-embeds-${e.id}`,message:e,channel:t,subscribeToComponentDispatch:!1,compact:o}))})}function TD(e){let{message:t,channel:o}=e,r=Ox.useSetting(),i=fD(t),{parse:s}=Pe,[l,u]=Bx(o);return n(uD,{channel:o,childrenAccessories:n(Z,{color:"text-muted",variant:"text-xs/medium",tag:"span",className:`${hy.embedAuthor} ${hy.embedMargin}`},u&&n("img",{src:u,className:hy.embedAuthorIcon,alt:""}),n("span",null,n("span",null,l," - "),o.isDM()?Pe.parse(`<@${te.getChannel(o.id).recipients[0]}>`):Pe.parse(`<#${o.id}>`))),compact:r,content:n(d,null,t.content||t.attachments.length<=i.length?s(t.content):[gD(t.attachments.length,t.embeds.length)],i.map(c=>{let{width:m,height:g}=yD(c.width,c.height);return n("div",null,n("img",{src:c.url,width:m,height:g}))})),hideTimestamp:!1,message:t,_messageEmbed:"automod"})}var Ns,cD,uD,pD,Ex,hy,Ox,yy,_x,dD,id,sd,Fx=f(()=>{"use strict";a();el();gl();_();Fr();re();P();be();Si();w();$();b();Ns=new Map,cD=ve(".inlineMediaEmbed"),uD=ve(".withFooter]:","childrenMessageContent:"),pD=ve("childrenExecutedCommand:",".hideAccessories"),Ex=C("message","searchResult"),hy=C("embedAuthorIcon","embedAuthor","embedAuthor"),Ox=jo("textAndImages","messageDisplayCompact"),yy=/(?<!<)https?:\/\/(?:\w+\.)?discord(?:app)?\.com\/channels\/(?:\d{17,20}|@me)\/(\d{17,20})\/(\d{17,20})/g,_x=/^https:\/\/(?:www\.)?tenor\.com\//,dD=new $o,id=A({messageBackgroundColor:{description:"Background color for messages in rich embeds",type:3},automodEmbeds:{description:"Use automod embeds instead of rich embeds (smaller but less info)",type:4,options:[{label:"Always use automod embeds",value:"always"},{label:"Prefer automod embeds, but use rich embeds if some content can't be shown",value:"prefer"},{label:"Never use automod embeds",value:"never",default:!0}]},listMode:{description:"Whether to use ID list as blacklist or whitelist",type:4,options:[{label:"Blacklist",value:"blacklist",default:!0},{label:"Whitelist",value:"whitelist"}]},idList:{description:"Guild/channel/user IDs to blacklist or whitelist (separate with comma)",type:0,default:""},clearMessageCache:{type:6,description:"Clear the linked message cache",component:()=>n(T,{onClick:()=>Ns.clear()},"Clear the linked message cache")}});sd=h({name:"MessageLinkEmbeds",description:"Adds a preview to messages that link another message",authors:[p.TheSun,p.Ven,p.RyanCaoDev],dependencies:["MessageAccessoriesAPI","MessageUpdaterAPI","UserSettingsAPI"],settings:id,start(){Ri("messageLinkEmbed",e=>yy.test(e.message.content)?(yy.lastIndex=0,n(k,null,n(SD,{message:e.message}))):null,4)},stop(){Va("messageLinkEmbed")}})});var Ux=f(()=>{});var vy,$x=f(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/messageLogger/deleteStyleOverlay.css",{name:"src/plugins/messageLogger/deleteStyleOverlay.css",source:`.messagelogger-deleted {
|
|
background-color: hsla(var(--red-430-hsl, 0 85% 61%) / 15%) !important;
|
|
}
|
|
`,classNames:{},dom:null});vy="src/plugins/messageLogger/deleteStyleOverlay.css"});var Sy,Gx=f(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/messageLogger/deleteStyleText.css",{name:"src/plugins/messageLogger/deleteStyleText.css",source:`/* Message content highlighting */
|
|
.messagelogger-deleted [class*="contents"] > :is(div, h1, h2, h3, p) {
|
|
color: var(--status-danger, #f04747) !important;
|
|
}
|
|
|
|
/* Markdown title highlighting */
|
|
.messagelogger-deleted [class*="contents"] :is(h1, h2, h3) {
|
|
color: var(--status-danger, #f04747) !important;
|
|
}
|
|
|
|
/* Bot "thinking" text highlighting */
|
|
.messagelogger-deleted [class*="colorStandard"] {
|
|
color: var(--status-danger, #f04747) !important;
|
|
}
|
|
|
|
/* Embed highlighting */
|
|
.messagelogger-deleted article :is(div, span, h1, h2, h3, p) {
|
|
color: var(--status-danger, #f04747) !important;
|
|
}
|
|
|
|
.messagelogger-deleted a {
|
|
color: var(--red-460, #be3535) !important;
|
|
text-decoration: underline;
|
|
}
|
|
`,classNames:{},dom:null});Sy="src/plugins/messageLogger/deleteStyleText.css"});function Hx(){j.plugins.MessageLogger.deleteStyle==="text"?(zt(Sy),go(vy)):(go(Sy),zt(vy))}var wD,zx,jx,xD,by,ad,Wx=f(()=>{"use strict";a();Ux();So();gl();_();Ve();re();P();ke();w();$();b();$x();Gx();wD=C("edited","communicationDisabled","isSystemMessage");zx="ml-remove-history",jx="ml-toggle-style",xD=(e,t)=>{let{message:o}=t,{deleted:r,editHistory:i,id:s,channel_id:l}=o;if(!r&&!i?.length)return;e:{if(!r)break e;let u=document.getElementById(`chat-messages-${l}-${s}`);if(!u)break e;e.push(n(E.MenuItem,{id:jx,key:jx,label:"Toggle Deleted Highlight",action:()=>u.classList.toggle("messagelogger-deleted")}))}e.push(n(E.MenuItem,{id:zx,key:zx,label:"Remove Message History",color:"danger",action:()=>{r?F.dispatch({type:"MESSAGE_DELETE",channelId:l,id:s,mlDeleted:!0}):o.editHistory=[]}}))},by=(e,{channel:t})=>{let o=Gt.getMessages(t?.id);if(!o?.some(i=>i.deleted||i.editHistory?.length))return;(tt("mark-channel-read",e)??e).push(n(E.MenuItem,{id:"vc-ml-clear-channel",label:"Clear Message Log",color:"danger",action:()=>{o.forEach(i=>{i.deleted?F.dispatch({type:"MESSAGE_DELETE",channelId:t.id,id:i.id,mlDeleted:!0}):$i(t.id,i.id,{editHistory:[]})})}}))},ad=h({name:"MessageLogger",description:"Temporarily logs deleted and edited messages.",authors:[p.rushii,p.Ven,p.AutumnVN,p.Nickyux],dependencies:["MessageUpdaterAPI"],contextMenus:{message:xD,"channel-context":by,"user-context":by,"gdm-context":by},start(){Hx()},renderEdits:k.wrap(({message:{id:e,channel_id:t}})=>{let o=Fe([Gt],()=>Gt.getMessage(t,e),null,(r,i)=>r?.editHistory===i?.editHistory);return n(d,null,o.editHistory?.map(r=>n("div",{className:"messagelogger-edited"},Pe.parse(r.content),n(No,{timestamp:r.timestamp,isEdited:!0,isInline:!1},n("span",{className:wD.edited}," ","(",Se.Messages.MESSAGE_EDITED,")")))))},{noop:!0}),makeEdit(e,t){return{timestamp:new Date(e.edited_timestamp),content:t.content}},options:{deleteStyle:{type:4,description:"The style of deleted messages",default:"text",options:[{label:"Red text",value:"text",default:!0},{label:"Red overlay",value:"overlay"}],onChange:()=>Hx()},logDeletes:{type:3,description:"Whether to log deleted messages",default:!0},logEdits:{type:3,description:"Whether to log edited messages",default:!0},ignoreBots:{type:3,description:"Whether to ignore messages by bots",default:!1},ignoreSelf:{type:3,description:"Whether to ignore messages by yourself",default:!1},ignoreUsers:{type:0,description:"Comma-separated list of user IDs to ignore",default:""},ignoreChannels:{type:0,description:"Comma-separated list of channel IDs to ignore",default:""},ignoreGuilds:{type:0,description:"Comma-separated list of guild IDs to ignore",default:""}},handleDelete(e,t,o){try{if(e==null||!o&&!e.has(t.id))return e;let r=i=>{let s=e.get(i);if(!s)return;let l=64;t.mlDeleted||(s.flags&l)===l||this.shouldIgnore(s)?e=e.remove(i):e=e.update(i,c=>c.set("deleted",!0).set("attachments",c.attachments.map(m=>(m.deleted=!0,m))))};o?t.ids.forEach(r):r(t.id)}catch(r){new Q("MessageLogger").error("Error during handleDelete",r)}return e},shouldIgnore(e,t=!1){let{ignoreBots:o,ignoreSelf:r,ignoreUsers:i,ignoreChannels:s,ignoreGuilds:l,logEdits:u,logDeletes:c}=j.plugins.MessageLogger,m=L.getCurrentUser().id;return o&&e.author?.bot||r&&e.author?.id===m||i.includes(e.author?.id)||s.includes(e.channel_id)||s.includes(te.getChannel(e.channel_id)?.parent_id)||(t?!u:!c)||l.includes(te.getChannel(e.channel_id)?.guild_id)||e.channel_id==="1026515880080842772"&&e.author?.id==="1017176847865352332"},patches:[{find:'"MessageStore"',replacement:[{match:/MESSAGE_DELETE:function\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?},/,replace:"MESSAGE_DELETE:function($1){ var cache = $2getOrCreate($1.channelId); cache = $self.handleDelete(cache, $1, false); $2commit(cache);},"},{match:/MESSAGE_DELETE_BULK:function\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?},/,replace:"MESSAGE_DELETE_BULK:function($1){ var cache = $2getOrCreate($1.channelId); cache = $self.handleDelete(cache, $1, true); $2commit(cache);},"},{match:/(MESSAGE_UPDATE:function\((\i)\).+?)\.update\((\i)/,replace:"$1.update($3,m => (($2.message.flags & 64) === 64 || $self.shouldIgnore($2.message, true)) ? m : $2.message.edited_timestamp && $2.message.content !== m.content ? m.set('editHistory',[...(m.editHistory || []), $self.makeEdit($2.message, m)]) : m).update($3"},{match:/(?<=getLastEditableMessage\(\i\)\{.{0,200}\.find\((\i)=>)/,replace:"!$1.deleted &&"}]},{find:"}addReaction(",replacement:[{match:/this\.customRenderedContent=(\i)\.customRenderedContent,/,replace:"this.customRenderedContent = $1.customRenderedContent,this.deleted = $1.deleted || false,this.editHistory = $1.editHistory || [],"}]},{find:"THREAD_STARTER_MESSAGE?null===",replacement:[{match:/(?<=null!=\i\.edited_timestamp\)return )\i\(\i,\{reactions:(\i)\.reactions.{0,50}\}\)/,replace:"Object.assign($&,{ deleted:$1.deleted, editHistory:$1.editHistory, attachments:$1.attachments })"},{match:/attachments:(\i)\((\i)\)/,replace:"attachments: $1((() => { if ($self.shouldIgnore($2)) return $2; let old = arguments[1]?.attachments; if (!old) return $2; let new_ = $2.attachments?.map(a => a.id) ?? []; let diff = old.filter(a => !new_.includes(a.id)); old.forEach(a => a.deleted = true); $2.attachments = [...diff, ...$2.attachments]; return $2;})()),deleted: arguments[1]?.deleted,editHistory: arguments[1]?.editHistory"},{match:/(\((\i)\){return null==\2\.attachments.+?)spoiler:/,replace:"$1deleted: arguments[0]?.deleted,spoiler:"}]},{find:".removeMosaicItemHoverButton",group:!0,replacement:[{match:/(className:\i,item:\i),/,replace:"$1,item: deleted,"},{match:/\[\i\.obscured\]:.+?,/,replace:"$& 'messagelogger-deleted-attachment': deleted,"}]},{find:"Message must not be a thread starter message",replacement:[{match:/\)\("li",\{(.+?),className:/,replace:')("li",{$1,className:(arguments[0].message.deleted ? "messagelogger-deleted " : "")+'}]},{find:'Messages.MESSAGE_EDITED,")"',replacement:[{match:/(\)\("div",\{id:.+?children:\[)/,replace:"$1 (!!arguments[0].message.editHistory?.length && $self.renderEdits(arguments[0])),"}]},{find:'"ReferencedMessageStore"',replacement:[{match:/MESSAGE_DELETE:function\((\i)\).+?},/,replace:"MESSAGE_DELETE:function($1){},"},{match:/MESSAGE_DELETE_BULK:function\((\i)\).+?},/,replace:"MESSAGE_DELETE_BULK:function($1){},"}]},{find:"useMessageMenu:",replacement:[{match:/children:(\[""===.+?\])/,replace:"children:arguments[0].message.deleted?[]:$1"}]}]})});function qx(e){cs({name:e.name,description:e.name,inputType:1,execute:async(t,o)=>await ld(e.name)?(j.plugins.MessageTags.clyde&&Me(o.channel.id,{content:`${qr} The tag **${e.name}** has been sent!`}),{content:e.message.replaceAll("\\n",`
|
|
`)}):(Me(o.channel.id,{content:`${qr} The tag **${e.name}** does not exist anymore! Please reload ur Discord to fix :)`}),{content:`/${e.name}`}),[PD]:!0},"CustomTags")}var qr,ud,PD,cd,ld,ID,MD,pd,Kx=f(()=>{"use strict";a();Do();cn();_();P();w();qr="<:luna:1035316192220553236>",ud="MessageTags_TAGS",PD=Symbol("MessageTags"),cd=()=>It(ud).then(e=>e??[]),ld=e=>It(ud).then(t=>(t??[]).find(o=>o.name===e)??null),ID=async e=>{let t=await cd();return t.push(e),Ht(ud,t),t},MD=async e=>{let t=await cd();return t=await t.filter(o=>o.name!==e),Ht(ud,t),t};pd=h({name:"MessageTags",description:"Allows you to save messages and to use them with a simple command.",authors:[p.Luna],options:{clyde:{name:"Clyde message on send",description:"If enabled, clyde will send you an ephemeral message when a tag was used.",type:3,default:!0}},dependencies:["CommandsAPI"],async start(){for(let e of await cd())qx(e)},commands:[{name:"tags",description:"Manage all the tags for yourself",inputType:0,options:[{name:"create",description:"Create a new tag",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0},{name:"message",description:"The message that you will send when using this tag",type:3,required:!0}]},{name:"list",description:"List all tags from yourself",type:1,options:[]},{name:"delete",description:"Remove a tag from your yourself",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0}]},{name:"preview",description:"Preview a tag without sending it publicly",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0}]}],async execute(e,t){switch(e[0].name){case"create":{let o=Ot(e[0].options,"tag-name",""),r=Ot(e[0].options,"message","");if(await ld(o))return Me(t.channel.id,{content:`${qr} A Tag with the name **${o}** already exists!`});let i={name:o,enabled:!0,message:r};qx(i),await ID(i),Me(t.channel.id,{content:`${qr} Successfully created the tag **${o}**!`});break}case"delete":{let o=Ot(e[0].options,"tag-name","");if(!await ld(o))return Me(t.channel.id,{content:`${qr} A Tag with the name **${o}** does not exist!`});Ha(o),await MD(o),Me(t.channel.id,{content:`${qr} Successfully deleted the tag **${o}**!`});break}case"list":{Me(t.channel.id,{embeds:[{title:"All Tags:",description:(await cd()).map(o=>`\`${o.name}\`: ${o.message.slice(0,72).replaceAll("\\n"," ")}${o.message.length>72?"...":""}`).join(`
|
|
`)||`${qr} Woops! There are no tags yet, use \`/tags create\` to create one!`,color:14122879,type:"rich"}]});break}case"preview":{let o=Ot(e[0].options,"tag-name",""),r=await ld(o);if(!r)return Me(t.channel.id,{content:`${qr} A Tag with the name **${o}** does not exist!`});Me(t.channel.id,{content:r.message.replaceAll("\\n",`
|
|
`)});break}default:{Me(t.channel.id,{content:"Invalid sub-command"});break}}}}]})});function AD(e){let t="";for(let o=0;o<e.length;o++)t+=o%2?e[o].toUpperCase():e[o].toLowerCase();return t}var dd,Yx=f(()=>{"use strict";a();Do();P();w();dd=h({name:"MoreCommands",description:"echo, lenny, mock",authors:[p.Arjix,p.echo,p.Samu],dependencies:["CommandsAPI"],commands:[{name:"echo",description:"Sends a message as Clyde (locally)",options:[Lr],inputType:3,execute:(e,t)=>{let o=Ot(e,"message","");Me(t.channel.id,{content:o})}},{name:"lenny",description:"Sends a lenny face",options:[Lr],execute:e=>({content:Ot(e,"message","")+" ( \u0361\xB0 \u035C\u0296 \u0361\xB0)"})},{name:"mock",description:"mOcK PeOpLe",options:[Ga],execute:e=>({content:AD(Ot(e,"message",""))})}]})});var md,Zx=f(()=>{"use strict";a();Do();P();w();md=h({name:"MoreKaomoji",description:"Adds more Kaomoji to discord. \u30FD(\xB4\u25BD`)/",authors:[p.JacobTm],dependencies:["CommandsAPI"],commands:[{name:"dissatisfaction",description:" \uFF1E\uFE4F\uFF1C"},{name:"smug",description:"\u0CA0_\u0CA0"},{name:"happy",description:"\u30FD(\xB4\u25BD`)/"},{name:"crying",description:"\u0CA5_\u0CA5"},{name:"angry",description:"\u30FD(\uFF40\u0414\xB4)\uFF89"},{name:"anger",description:"\u30FD(\uFF4F`\u76BF\u2032\uFF4F)\uFF89"},{name:"joy",description:"<(\uFFE3\uFE36\uFFE3)>"},{name:"blush",description:"\u0AEE \u02F6\u1D54 \u1D55 \u1D54\u02F6 \u10D0"},{name:"confused",description:"(\u2022\u0E34_\u2022\u0E34)?"},{name:"sleeping",description:"(\u1D17_\u1D17)"},{name:"laughing",description:"o(\u2267\u25BD\u2266)o"}].map(e=>({...e,options:[Lr],execute:t=>({content:Ot(t,"message","")+" "+e.description})}))})});function CD(e){Rs.store.tagSettings??=Jx;let[t,o]=K(Rs.store.tagSettings),r=i=>{o(i),e.setValue(i)};return n(pe,{flexDirection:"column"},Cs.map(i=>n(At,{style:{padding:"1em 1em 0"}},n(S.FormTitle,{style:{width:"fit-content"}},n(oe,{text:i.description},({onMouseEnter:s,onMouseLeave:l})=>n("div",{onMouseEnter:s,onMouseLeave:l},i.displayName," Tag ",n(nr,{type:nr.Types[i.name]})))),n(je,{type:"text",value:t[i.name]?.text??i.displayName,placeholder:`Text on tag (default: ${i.displayName})`,onChange:s=>{t[i.name].text=s,r(t)},className:G.bottom16}),n(Lt,{value:t[i.name]?.showInChat??!0,onChange:s=>{t[i.name].showInChat=s,r(t)},hideBorder:!0},"Show in messages"),n(Lt,{value:t[i.name]?.showInNotChat??!0,onChange:s=>{t[i.name].showInNotChat=s,r(t)},hideBorder:!0},"Show in member list and profiles"))))}var ND,nr,Xx,Cs,Jx,Rs,fd,Qx=f(()=>{"use strict";a();_();Rt();P();Ze();w();$();b();ND=ye(".getCurrentUser()",".computeLurkerPermissionsAllowList()"),nr=Qe(e=>e.Types?.[0]==="BOT"),Xx=(e,t)=>!!e?.webhookId&&t.isNonUserBot(),Cs=[{name:"WEBHOOK",displayName:"Webhook",description:"Messages sent by webhooks",condition:Xx},{name:"OWNER",displayName:"Owner",description:"Owns the server",condition:(e,t,o)=>se.getGuild(o?.guild_id)?.ownerId===t.id},{name:"ADMINISTRATOR",displayName:"Admin",description:"Has the administrator permission",permissions:["ADMINISTRATOR"]},{name:"MODERATOR_STAFF",displayName:"Staff",description:"Can manage the server, channels or roles",permissions:["MANAGE_GUILD","MANAGE_CHANNELS","MANAGE_ROLES"]},{name:"MODERATOR",displayName:"Mod",description:"Can manage messages or kick/ban people",permissions:["MANAGE_MESSAGES","KICK_MEMBERS","BAN_MEMBERS"]},{name:"VOICE_MODERATOR",displayName:"VC Mod",description:"Can manage voice chats",permissions:["MOVE_MEMBERS","MUTE_MEMBERS","DEAFEN_MEMBERS"]},{name:"CHAT_MODERATOR",displayName:"Chat Mod",description:"Can timeout people",permissions:["MODERATE_MEMBERS"]}],Jx=Object.fromEntries(Cs.map(({name:e,displayName:t})=>[e,{text:t,showInChat:!0,showInNotChat:!0}]));Rs=A({dontShowForBots:{description:"Don't show extra tags for bots (excluding webhooks)",type:3},dontShowBotTag:{description:"Only show extra tags for bots / Hide [BOT] text",type:3},tagSettings:{type:6,component:CD,description:"fill me"}}),fd=h({name:"MoreUserTags",description:"Adds tags for webhooks and moderative roles (owner, admin, etc.)",authors:[p.Cyn,p.TheSun,p.RyanCaoDev,p.LordElias,p.AutumnVN],settings:Rs,patches:[{find:".ORIGINAL_POSTER=",replacement:{match:/\((\i)=\{\}\)\)\[(\i)\.BOT/,replace:"($1=$self.getTagTypes()))[$2.BOT"}},{find:".DISCORD_SYSTEM_MESSAGE_BOT_TAG_TOOLTIP_OFFICIAL,",replacement:[{match:/(switch\((\i)\){.+?)case (\i(?:\.\i)?)\.BOT:default:(\i)=.{0,40}(\i\.\i\.Messages)\.APP_TAG/,replace:(e,t,o,r,i,s)=>`${t}default:{${i} = $self.getTagText(${r}[${o}], ${s})}`},{match:/(\i)=(\i)===\i(?:\.\i)?\.ORIGINAL_POSTER/,replace:"$1=$self.isOPTag($2)"},{match:/.botText,children:(\i)}\)]/,replace:"$&,'data-tag':$1.toLowerCase()"}]},{find:".Types.ORIGINAL_POSTER",replacement:{match:/;return\((\(null==\i\?void 0:\i\.isSystemDM\(\).+?.Types.ORIGINAL_POSTER\)),null==(\i)\)/,replace:";$1;$2=$self.getTag({...arguments[0],origType:$2,location:'chat'});return $2 == null"}},{find:".Messages.GUILD_OWNER,",replacement:{match:/(?<type>\i)=\(null==.{0,100}\.BOT;return null!=(?<user>\i)&&\i\.bot/,replace:"$<type> = $self.getTag({user: $<user>, channel: arguments[0].channel, origType: $<user>.bot ? 0 : null, location: 'not-chat' }); return typeof $<type> === 'number'"}},{find:".hasAvatarForGuild(null==",replacement:{match:/(?=usernameIcon:)/,replace:"moreTags_channelId:arguments[0].channelId,"}},{find:'copyMetaData:"User Tag"',replacement:{match:/(?=,botClass:)/,replace:",moreTags_channelId:arguments[0].moreTags_channelId"}},{find:",overrideDiscriminator:",replacement:[{match:/user:\i,nick:\i,/,replace:"$&moreTags_channelId,"},{match:/,botType:(\i\((\i)\)),/g,replace:",botType:$self.getTag({user:$2,channelId:moreTags_channelId,origType:$1,location:'not-chat'}),"}]}],start(){Rs.store.tagSettings??=Jx,Rs.store.tagSettings.CHAT_MODERATOR??={text:"Chat Mod",showInChat:!0,showInNotChat:!0}},getPermissions(e,t){let o=se.getGuild(t?.guild_id);if(!o)return[];let r=ND({user:e,context:o,overwrites:t.permissionOverwrites});return Object.entries(Ie).map(([i,s])=>r&s?i:"").filter(Boolean)},getTagTypes(){let e={},t=100;return Cs.forEach(({name:o})=>{e[o]=++t,e[t]=o,e[`${o}-BOT`]=++t,e[t]=`${o}-BOT`,e[`${o}-OP`]=++t,e[t]=`${o}-OP`}),e},isOPTag:e=>e===nr.Types.ORIGINAL_POSTER||Cs.some(t=>e===nr.Types[`${t.name}-OP`]),getTagText(e,t){if(!e)return t.APP_TAG;let[o,r]=e.split("-"),i=Cs.find(({name:l})=>o===l);if(!i||r==="BOT"&&o!=="WEBHOOK"&&this.settings.store.dontShowForBots)return t.APP_TAG;let s=Rs.store.tagSettings?.[i.name]?.text||i.displayName;switch(r){case"OP":return`${t.BOT_TAG_FORUM_ORIGINAL_POSTER} \u2022 ${s}`;case"BOT":return`${t.APP_TAG} \u2022 ${s}`;default:return s}},getTag({message:e,user:t,channelId:o,origType:r,location:i,channel:s}){if(!t)return null;if(i==="chat"&&t.id==="1")return nr.Types.OFFICIAL;if(t.isClyde())return nr.Types.AI;let l=typeof r=="number"?r:null;if(s??=te.getChannel(o),!s)return l;let u=this.settings.store,c=this.getPermissions(t,s);for(let m of Cs)if(!(i==="chat"&&!u.tagSettings[m.name].showInChat)&&!(i==="not-chat"&&!u.tagSettings[m.name].showInNotChat)&&!(m.name!=="OWNER"&&se.getGuild(s?.guild_id)?.ownerId===t.id&&i==="chat"&&!u.tagSettings.OWNER.showInChat||i==="not-chat"&&!u.tagSettings.OWNER.showInNotChat)&&(m.permissions?.some(g=>c.includes(g))||m.condition?.(e,t,s))){(s.isForumPost()||s.isMediaPost())&&s.ownerId===t.id?l=nr.Types[`${m.name}-OP`]:t.bot&&!Xx(e,t)&&!u.dontShowBotTag?l=nr.Types[`${m.name}-BOT`]:l=nr.Types[m.name];break}return l}})});function DD(e,t){let o=0,r=0;for(;(r=e.indexOf(t,r)+1)!==0;)o++;return o}function LD(e,t){if(!t.global)throw new Error("pattern must be global");let o=0;for(;t.test(e);)o++;return o}function OD(e){let t=DD(e,wy)+LD(e,ED);return Math.min(t,10)}function Ty(){if(!Kr.store.triggerWhenUnfocused&&!document.hasFocus())return;let e=document.createElement("audio");e.src=Kr.store.quality==="HD"?kD:RD,e.volume=Kr.store.volume,e.play()}var wy,RD,kD,Kr,gd,ED,Vx=f(()=>{"use strict";a();_();Nh();P();be();w();b();wy="\u{1F5FF}",RD="https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai.mp3",kD="https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai_hd.wav",Kr=A({volume:{description:"Volume of the \u{1F5FF}\u{1F5FF}\u{1F5FF}",type:5,markers:Vt(0,1,.1),default:.5,stickToMarkers:!1},quality:{description:"Quality of the \u{1F5FF}\u{1F5FF}\u{1F5FF}",type:4,options:[{label:"Normal",value:"Normal",default:!0},{label:"HD",value:"HD"}]},triggerWhenUnfocused:{description:"Trigger the \u{1F5FF} even when the window is unfocused",type:3,default:!0},ignoreBots:{description:"Ignore bots",type:3,default:!0},ignoreBlocked:{description:"Ignore blocked users",type:3,default:!0}}),gd=h({name:"Moyai",authors:[p.Megu,p.Nuckyz],description:"\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}",settings:Kr,flux:{async MESSAGE_CREATE({optimistic:e,type:t,message:o,channelId:r}){if(e||t!=="MESSAGE_CREATE"||o.state==="SENDING"||Kr.store.ignoreBots&&o.author?.bot||Kr.store.ignoreBlocked&&Le.isBlocked(o.author?.id)||!o.content||r!==xe.getChannelId())return;let i=OD(o.content);for(let s=0;s<i;s++)Ty(),await an(300)},MESSAGE_REACTION_ADD({optimistic:e,type:t,channelId:o,userId:r,messageAuthorId:i,emoji:s}){if(e||t!=="MESSAGE_REACTION_ADD"||Kr.store.ignoreBots&&L.getUser(r)?.bot||Kr.store.ignoreBlocked&&Le.isBlocked(i)||o!==xe.getChannelId())return;let l=s.name.toLowerCase();l!==wy&&!l.includes("moyai")&&!l.includes("moai")||Ty()},VOICE_CHANNEL_EFFECT_SEND({emoji:e}){if(!e?.name)return;let t=e.name.toLowerCase();t!==wy&&!t.includes("moyai")&&!t.includes("moai")||Ty()}}});ED=/<a?:\w*moy?ai\w*:\d{17,20}>/gi});function UD(e){return e.name||e.recipients.map(L.getUser).filter(Qn).map(t=>Le.getNickname(t.id)||BD.getName(t)).join(", ")}var _D,BD,Yr,FD,hd,eP=f(()=>{"use strict";a();re();P();Ss();w();$();b();_D=C("selectPrivateChannel"),BD=C("getGlobalName"),Yr=C("emptyIconFriends","emptyIconGuilds"),FD=C("guildNick","guildAvatarWithoutIcon");hd=h({name:"MutualGroupDMs",description:"Shows mutual group dms in profiles",authors:[p.amia],patches:[{find:".Messages.MUTUAL_GUILDS_WITH_END_COUNT",replacement:{match:/(?<=\.tabBarItem.{0,50}MUTUAL_GUILDS.+?}\),)(?=.+?(\(0,\i\.jsxs?\)\(.{0,100}id:))/,replace:'$self.isBotOrSelf(arguments[0].user)?null:$1"MUTUAL_GDMS",children:"Mutual Groups"}),'}},{find:".USER_INFO_CONNECTIONS:case",replacement:{match:/(?<={user:(\i),onClose:(\i)}\);)(?=case \i\.\i\.MUTUAL_FRIENDS)/,replace:'case "MUTUAL_GDMS":return $self.renderMutualGDMs({user: $1, onClose: $2});'}},{find:".MUTUAL_FRIENDS?(",replacement:[{match:/(?<=onItemSelect:\i,children:)(\i)\.map/,replace:"[...$1, ...($self.isBotOrSelf(arguments[0].user) ? [] : [{section:'MUTUAL_GDMS',text:'Mutual Groups'}])].map"},{match:/\(0,\i\.jsx\)\(\i,\{items:\i,section:(\i)/,replace:"$1==='MUTUAL_GDMS'?$self.renderMutualGDMs(arguments[0]):$&"}]}],isBotOrSelf:e=>e.bot||e.id===L.getCurrentUser().id,renderMutualGDMs:k.wrap(({user:e,onClose:t})=>{let o=te.getSortedPrivateChannels().filter(r=>r.isGroupDM()&&r.recipients.includes(e.id)).map(r=>n(Xi,{className:Yr.listRow,onClick:()=>{t(),_D.selectPrivateChannel(r.id)}},n(Ji,{src:Ct.getChannelIconURL({id:r.id,icon:r.icon,size:32}),size:"SIZE_40",className:Yr.listAvatar}),n("div",{className:Yr.listRowContent},n("div",{className:Yr.listName},UD(r)),n("div",{className:FD.guildNick},r.recipients.length+1," Members"))));return n(Zi,{className:Yr.listScroller,fade:!0,onClose:t},o.length>0?o:n("div",{className:Yr.empty},n("div",{className:Yr.emptyIconFriends}),n("div",{className:Yr.emptyText},"No group dms in common")))})})});function nP(e){e==="@me"||e==="null"||e==null||(tP(e,{muted:rr.store.guild,suppress_everyone:rr.store.everyone,suppress_roles:rr.store.role,mute_scheduled_events:rr.store.events,notify_highlights:rr.store.highlights?1:0}),rr.store.messages!==3&&tP(e,{message_notifications:rr.store.messages}),rr.store.showAllChannels&&GD(e)&&$D(e))}var tP,$D,GD,rr,oP,yd,rP=f(()=>{"use strict";a();So();_();bt();P();w();$();b();({updateGuildNotificationSettings:tP}=C("updateGuildNotificationSettings")),{toggleShowAllChannels:$D}=oo(".onboardExistingMember(",{toggleShowAllChannels:e=>{let t=String(e);return t.length<100&&!t.includes("onboardExistingMember")&&!t.includes("getOptedInChannels")}}),GD=ye(".COMMUNITY)||",".isOptInEnabled("),rr=A({guild:{description:"Mute Guild automatically",type:3,default:!0},messages:{description:"Server Notification Settings",type:4,options:[{label:"All messages",value:0},{label:"Only @mentions",value:1},{label:"Nothing",value:2},{label:"Server default",value:3,default:!0}]},everyone:{description:"Suppress @everyone and @here",type:3,default:!0},role:{description:"Suppress All Role @mentions",type:3,default:!0},highlights:{description:"Suppress Highlights automatically",type:3,default:!0},events:{description:"Mute New Events automatically",type:3,default:!0},showAllChannels:{description:"Show all channels automatically",type:3,default:!0}}),oP=e=>(t,{guild:o})=>{if(!o)return;tt("privacy",t)?.push(n(E.MenuItem,{label:"Apply NewGuildSettings",id:"vc-newguildsettings-apply",icon:e?Aa:void 0,action:()=>nP(o.id)}))};gn("NewGuildSettings","MuteNewGuild");yd=h({name:"NewGuildSettings",description:"Automatically mute new servers and change various other settings upon joining",tags:["MuteNewGuild","mute","server"],authors:[p.Glitch,p.Nuckyz,p.carince,p.Mopi,p.GabiRP],contextMenus:{"guild-context":oP(!1),"guild-header-popout":oP(!0)},patches:[{find:",acceptInvite(",replacement:{match:/INVITE_ACCEPT_SUCCESS.+?,(\i)=null!==.+?;/,replace:(e,t)=>`${e}$self.applyDefaultSettings(${t});`}},{find:"{joinGuild:",replacement:{match:/guildId:(\i),lurker:(\i).{0,20}}\)\);/,replace:(e,t,o)=>`${e}if(!${o})$self.applyDefaultSettings(${t});`}}],settings:rr,applyDefaultSettings:nP})});var HD,vd,iP=f(()=>{"use strict";a();_();P();ke();w();$();HD=C("getRelationships","isBlocked"),vd=h({name:"NoBlockedMessages",description:"Hides all blocked messages from chat completely.",authors:[p.rushii,p.Samu],patches:[{find:"Messages.BLOCKED_MESSAGES_HIDE",replacement:[{match:/let\{[^}]*collapsedReason[^}]*\}/,replace:"return null;$&"}]},...['="MessageStore",','"displayName","ReadStateStore")'].map(e=>({find:e,predicate:()=>j.plugins.NoBlockedMessages.ignoreBlockedMessages===!0,replacement:[{match:/(?<=MESSAGE_CREATE:function\((\i)\){)/,replace:(t,o)=>`if($self.isBlocked(${o}.message))return;`}]}))],options:{ignoreBlockedMessages:{description:"Completely ignores (recent) incoming messages from blocked users (locally).",type:3,default:!1,restartNeeded:!0}},isBlocked(e){try{return HD.isBlocked(e.author.id)}catch(t){new Q("NoBlockedMessages").error("Failed to check if user is blocked:",t)}}})});var Sd,sP=f(()=>{"use strict";a();P();w();Sd=h({name:"NoDefaultHangStatus",description:"Disable the default hang status when joining voice channels",authors:[p.D3SOX],patches:[{find:".CHILLING)",replacement:{match:/{enableHangStatus:(\i),/,replace:"{_enableHangStatus:$1=false,"}}]})});var bd,aP=f(()=>{"use strict";a();P();w();bd=h({name:"NoDevtoolsWarning",description:"Disables the 'HOLD UP' banner in the console. As a side effect, also prevents Discord from hiding your token, which prevents random logouts.",authors:[p.Ven],patches:[{find:"setDevtoolsCallbacks",replacement:{match:/if\(null!=\i&&"0.0.0"===\i\.remoteApp\.getVersion\(\)\)/,replace:"if(true)"}}]})});var Td,lP=f(()=>{"use strict";a();P();w();Td=h({name:"NoF1",description:"Disables F1 help bind.",authors:[p.Cyn],patches:[{find:',"f1"],comboKeysBindGlobal:',replacement:{match:',"f1"],comboKeysBindGlobal:',replace:"],comboKeysBindGlobal:"}}]})});var cP,wd,uP=f(()=>{"use strict";a();_();P();w();cP=A({inlineVideo:{description:"Play videos without carousel modal",type:3,default:!0,restartNeeded:!0}}),wd=h({name:"NoMosaic",authors:[p.AutumnVN],description:"Removes Discord new image mosaic",tags:["image","mosaic","media"],settings:cP,patches:[{find:'=>"IMAGE"===',replacement:{match:/=>"IMAGE"===\i\|\|"VIDEO"===\i;/,replace:"=>false;"}},{find:"renderAttachments(",predicate:()=>cP.store.inlineVideo,replacement:{match:/url:(\i)\.url\}\);return /,replace:"$&$1.content_type?.startsWith('image/')&&"}}]})});var xd,pP=f(()=>{"use strict";a();P();w();xd=h({name:"NoOnboardingDelay",description:"Skips the slow and annoying onboarding delay",authors:[p.nekohaxx],patches:[{find:"Messages.ONBOARDING_COVER_WELCOME_SUBTITLE",replacement:{match:"3e3",replace:"0"}}]})});var zD,ks,Pd,dP=f(()=>{"use strict";a();_();P();w();$();zD=C("getMessageRequestsCount"),ks=A({hideFriendRequestsCount:{type:3,description:"Hide incoming friend requests count",default:!0,restartNeeded:!0},hideMessageRequestsCount:{type:3,description:"Hide message requests count",default:!0,restartNeeded:!0},hidePremiumOffersCount:{type:3,description:"Hide nitro offers count",default:!0,restartNeeded:!0}}),Pd=h({name:"NoPendingCount",description:"Removes the ping count of incoming friend requests, message requests, and nitro offers.",authors:[p.amia],settings:ks,patches:[{find:"getPendingCount(){",predicate:()=>ks.store.hideFriendRequestsCount,replacement:{match:/(?<=getPendingCount\(\)\{)/,replace:"return 0;"}},{find:'location:"use-message-requests-count"',predicate:()=>ks.store.hideMessageRequestsCount,replacement:{match:/getNonChannelAckId\(\i\.\i\.MESSAGE_REQUESTS\).+?return /,replace:"$&0;"}},{find:"getMessageRequestsCount(){",predicate:()=>ks.store.hideMessageRequestsCount,replacement:{match:/(?<=getMessageRequestsCount\(\)\{)/,replace:"return 0;"}},{find:".getSpamChannelsCount(),",predicate:()=>ks.store.hideMessageRequestsCount,replacement:{match:/(?<=getSpamChannelsCount\(\),\i=)\i\.getMessageRequestsCount\(\)/,replace:"$self.getRealMessageRequestCount()"}},{find:"showProgressBadge:",predicate:()=>ks.store.hidePremiumOffersCount,replacement:{match:/(?<=\{unviewedTrialCount:(\i),unviewedDiscountCount:(\i)\}.{0,200}\i=)\1\+\2/,replace:"0"}}],getRealMessageRequestCount(){return zD.getMessageRequestChannelIds().size}})});var Id,mP=f(()=>{"use strict";a();P();w();Id=h({name:"NoProfileThemes",description:"Completely removes Nitro profile themes",authors:[p.TheKodeToad],patches:[{find:".NITRO_BANNER,",replacement:{match:/=(?=\i\.\i\.isPremiumAtLeast\(null==(\i))/,replace:"=(arguments[0]?.bannerSrc||$1?.banner)&&"}},{find:".avatarPositionPremiumNoBanner,default:",replacement:{match:/\.avatarPositionPremiumNoBanner(?=,default:\i\.(\i))/,replace:".$1"}},{find:"hasThemeColors(){",replacement:{match:/get canUsePremiumProfileCustomization\(\){return /,replace:"$&false &&"}}]})});var Md,fP=f(()=>{"use strict";a();P();w();Md=h({name:"NoRPC",description:"Disables Discord's RPC server.",authors:[p.Cyn],patches:[{find:'.ensureModule("discord_rpc")',replacement:{match:/\.ensureModule\("discord_rpc"\)\.then\(\(.+?\)}\)}/,replace:'.ensureModule("discord_rpc")}'}}]})});var Ad,Nd,gP=f(()=>{"use strict";a();_();P();w();Ad=A({userList:{description:"List of users to allow or exempt pings for (separated by commas or spaces)",type:0,default:"1234567890123445,1234567890123445"},shouldPingListed:{description:"Behaviour",type:4,options:[{label:"Do not ping the listed users",value:!1},{label:"Only ping the listed users",value:!0,default:!0}]},inverseShiftReply:{description:"Invert Discord's shift replying behaviour (enable to make shift reply mention user)",type:3,default:!1}}),Nd=h({name:"NoReplyMention",description:"Disables reply pings by default",authors:[p.DustyAngel47,p.axyie,p.pylix,p.outfoxxed],settings:Ad,shouldMention(e,t){let o=Ad.store.userList.includes(e.author.id),r=Ad.store.shouldPingListed?o:!o;return Ad.store.inverseShiftReply?t!==r:!t&&r},patches:[{find:',"Message")}function',replacement:{match:/:(\i),shouldMention:!(\i)\.shiftKey/,replace:":$1,shouldMention:$self.shouldMention($1,$2.shiftKey)"}}]})});var Cd,hP=f(()=>{"use strict";a();P();w();Cd=h({name:"NoScreensharePreview",description:"Disables screenshare previews from being sent.",authors:[p.Nuckyz],patches:[{find:'"ApplicationStreamPreviewUploadManager"',replacement:{match:/await \i\.\i\.(makeChunkedRequest\(|post\(\{url:)\i\.\i\.STREAM_PREVIEW.+?\}\)/g,replace:"0"}}]})});var xy,Rd,yP=f(()=>{"use strict";a();_();P();w();xy=A({shownEmojis:{description:"The types of emojis to show in the autocomplete menu.",type:4,default:"onlyUnicode",options:[{label:"Only unicode emojis",value:"onlyUnicode"},{label:"Unicode emojis and server emojis from current server",value:"currentServer"},{label:"Unicode emojis and all server emojis (Discord default)",value:"all"}]}}),Rd=h({name:"NoServerEmojis",authors:[p.UlyssesZhan],description:"Do not show server emojis in the autocomplete menu.",settings:xy,patches:[{find:"}searchWithoutFetchingLatest(",replacement:{match:/searchWithoutFetchingLatest.{20,300}get\((\i).{10,40}?reduce\(\((\i),(\i)\)=>\{/,replace:"$& if ($self.shouldSkip($1, $3)) return $2;"}}],shouldSkip(e,t){return t.type!=="GUILD_EMOJI"?!1:xy.store.shownEmojis==="onlyUnicode"?!0:xy.store.shownEmojis==="currentServer"?t.guildId!==e:!1}})});var kd,vP=f(()=>{"use strict";a();P();w();kd=h({name:"NoSystemBadge",description:"Disables the taskbar and system tray unread count badge.",authors:[p.rushii],patches:[{find:",setSystemTrayApplications",replacement:[{match:/setBadge\(\i\).+?},/,replace:"setBadge(){},"},{match:/setSystemTrayIcon\(\i\).+?},/,replace:"setSystemTrayIcon(){},"}]}]})});var Dd,SP=f(()=>{"use strict";a();P();w();Dd=h({name:"NoTypingAnimation",authors:[p.AutumnVN],description:"Disables the CPU-intensive typing dots animation",patches:[{find:"dotCycle",replacement:{match:/document.hasFocus\(\)/,replace:"false"}}]})});var Ld,bP=f(()=>{"use strict";a();P();w();Ld=h({name:"NoUnblockToJump",description:"Allows you to jump to messages of blocked users without unblocking them",authors:[p.dzshn],patches:[{find:'.id,"Search Results"',replacement:{match:/if\(.{1,10}\)(.{1,10}\.show\({.{1,50}UNBLOCK_TO_JUMP_TITLE)/,replace:"if(false)$1"}},{find:"renderJumpButton()",replacement:{match:/if\(.{1,10}\)(.{1,10}\.show\({.{1,50}UNBLOCK_TO_JUMP_TITLE)/,replace:"if(false)$1"}},{find:"flash:!0,returnMessageId",replacement:{match:/.\?(.{1,10}\.show\({.{1,50}UNBLOCK_TO_JUMP_TITLE)/,replace:"false?$1"}}]})});var Ed,TP=f(()=>{"use strict";a();P();w();Ed=h({name:"NormalizeMessageLinks",description:"Strip canary/ptb from message links",authors:[p.bb010g],patches:[{find:".Messages.COPY_MESSAGE_LINK,",replacement:{match:/\.concat\(location\.host\)/,replace:".concat($self.normalizeHost(location.host))"}}],normalizeHost(e){return e.replace(/(^|\b)(canary\.|ptb\.)(discord.com)$/,"$1$3")}})});var jD,Od,wP=f(()=>{"use strict";a();_();P();w();jD=A({notificationVolume:{type:5,description:"Notification volume",markers:[0,25,50,75,100],default:100,stickToMarkers:!1}}),Od=h({name:"NotificationVolume",description:"Save your ears and set a separate volume for notifications and in-app sounds",authors:[p.philipbry],settings:jD,patches:[{find:"_ensureAudio(){",replacement:{match:/(?=Math\.min\(\i\.\i\.getOutputVolume\(\)\/100)/,replace:"$self.settings.store.notificationVolume/100*"}}]})});var _d,xP=f(()=>{"use strict";a();P();w();_d=h({name:"NSFWGateBypass",description:"Allows you to access NSFW channels without setting/verifying your age",authors:[p.Commandtechno],patches:[{find:".nsfwAllowed=null",replacement:{match:/(?<=\.nsfwAllowed=)null!==.+?(?=[,;])/,replace:"!0"}}]})});var hl,Bd,PP=f(()=>{"use strict";a();_();P();w();b();hl=A({channelToAffect:{type:4,description:"Select the type of DM for the plugin to affect",options:[{label:"Both",value:"both_dms",default:!0},{label:"User DMs",value:"user_dm"},{label:"Group DMs",value:"group_dm"}]},allowMentions:{type:3,description:"Receive audio pings for @mentions",default:!1},allowEveryone:{type:3,description:"Receive audio pings for @everyone and @here in group DMs",default:!1}}),Bd=h({name:"OnePingPerDM",description:"If unread messages are sent by a user in DMs multiple times, you'll only receive one audio ping. Read the messages to reset the limit",authors:[p.ProffDea],settings:hl,patches:[{find:".getDesktopType()===",replacement:[{match:/(\i\.\i\.getDesktopType\(\)===\i\.\i\.NEVER)\)/,replace:"$&if(!$self.isPrivateChannelRead(arguments[0]?.message))return;else "},{match:/sound:(\i\?\i:void 0,soundpack:\i,volume:\i,onClick)/,replace:"sound:!$self.isPrivateChannelRead(arguments[0]?.message)?undefined:$1"}]}],isPrivateChannelRead(e){let t=te.getChannel(e.channel_id)?.type;return t!==1&&t!==3||t===1&&hl.store.channelToAffect==="group_dm"||t===3&&hl.store.channelToAffect==="user_dm"||hl.store.allowMentions&&e.mentions.some(o=>o.id===L.getCurrentUser().id)||hl.store.allowEveryone&&e.mention_everyone?!0:ui.getOldestUnreadMessageId(e.channel_id)===e.id}})});var Fd,IP=f(()=>{"use strict";a();P();w();Fd=h({name:"oneko",description:"cat follow mouse (real)",authors:[p.Ven,p.adryd],start(){fetch("https://raw.githubusercontent.com/adryd325/oneko.js/8fa8a1864aa71cd7a794d58bc139e755e96a236c/oneko.js").then(e=>e.text()).then(e=>e.replace("./oneko.gif","https://raw.githubusercontent.com/adryd325/oneko.js/14bab15a755d0e35cd4ae19c931d96d306f99f42/oneko.gif").replace("(isReducedMotion)","(false)")).then(eval)},stop(){document.getElementById("oneko")?.remove()}})});var WD,qD,KD,YD,ZD,Gi,XD,Ud,MP=f(()=>{"use strict";a();_();P();w();b();WD=/^https:\/\/(spotify\.link|s\.team)\/.+$/,qD=/^https:\/\/open\.spotify\.com\/(track|album|artist|playlist|user|episode)\/(.+)(?:\?.+?)?$/,KD=/^https:\/\/(steamcommunity\.com|(?:help|store)\.steampowered\.com)\/.+$/,YD=/^https:\/\/store\.epicgames\.com\/(.+)$/,ZD=/^https:\/\/tidal\.com\/browse\/(track|album|artist|playlist|user|video|mix)\/(.+)(?:\?.+?)?$/,Gi=A({spotify:{type:3,description:"Open Spotify links in the Spotify app",default:!0},steam:{type:3,description:"Open Steam links in the Steam app",default:!0},epic:{type:3,description:"Open Epic Games links in the Epic Games Launcher",default:!0},tidal:{type:3,description:"Open Tidal links in the Tidal app",default:!0}}),XD=VencordNative.pluginHelpers.OpenInApp,Ud=h({name:"OpenInApp",description:"Open Spotify, Tidal, Steam and Epic Games URLs in their respective apps instead of your browser",authors:[p.Ven],settings:Gi,patches:[{find:"trackAnnouncementMessageLinkClicked({",replacement:{match:/function (\i\(\i,\i\)\{)(?=.{0,100}trusted:)/,replace:"async function $1 if(await $self.handleLink(...arguments)) return;"}},{find:"WEB_OPEN(",predicate:()=>!1,replacement:{match:/\i\.\i\.isProtocolRegistered\(\)(.{0,100})window.open/g,replace:"true$1VencordNative.native.openExternal"}},{find:".CONNECTED_ACCOUNT_VIEWED,",replacement:{match:/(?<=href:\i,onClick:\i=>\{)(?=.{0,10}\i=(\i)\.type,.{0,100}CONNECTED_ACCOUNT_VIEWED)/,replace:"$self.handleAccountView(arguments[0],$1.type,$1.id);"}}],async handleLink(e,t){if(!e)return!1;let o=e.href;WD.test(o)&&(t?.preventDefault(),o=await XD.resolveRedirect(o));e:{if(!Gi.store.spotify)break e;let r=qD.exec(o);if(!r)break e;let[,i,s]=r;return VencordNative.native.openExternal(`spotify:${i}:${s}`),t?.preventDefault(),!0}e:{if(!Gi.store.steam||!KD.test(o))break e;return VencordNative.native.openExternal(`steam://openurl/${o}`),t?.preventDefault(),it("Opened link in Steam",V.Type.SUCCESS),!0}e:{if(!Gi.store.epic)break e;let r=YD.exec(o);if(!r)break e;return VencordNative.native.openExternal(`com.epicgames.launcher://store/${r[1]}`),t?.preventDefault(),!0}e:{if(!Gi.store.tidal)break e;let r=ZD.exec(o);if(!r)break e;let[,i,s]=r;return VencordNative.native.openExternal(`tidal://${i}/${s}`),t?.preventDefault(),!0}return t?.defaultPrevented?(window.open(o,"_blank"),!0):!1},handleAccountView(e,t,o){t==="spotify"&&Gi.store.spotify?(VencordNative.native.openExternal(`spotify:user:${o}`),e.preventDefault()):t==="steam"&&Gi.store.steam&&(VencordNative.native.openExternal(`steam://openurl/https://steamcommunity.com/profiles/${o}`),it("Opened link in Steam",V.Type.SUCCESS),e.preventDefault())}})});var Py,$d,AP=f(()=>{"use strict";a();_();P();w();Py=A({defaultLayout:{type:4,options:[{label:"List",value:1,default:!0},{label:"Gallery",value:2}],description:"Which layout to use as default"},defaultSortOrder:{type:4,options:[{label:"Recently Active",value:0,default:!0},{label:"Date Posted",value:1}],description:"Which sort order to use as default"}}),$d=h({name:"OverrideForumDefaults",description:"Allows you to override default forum layout/sort order. you can still change it on a per-channel basis",authors:[p.Inbestigator],patches:[{find:"getDefaultLayout(){",replacement:[{match:/getDefaultLayout\(\){/,replace:"$&return $self.getLayout();"},{match:/getDefaultSortOrder\(\){/,replace:"$&return $self.getSortOrder();"}]}],getLayout:()=>Py.store.defaultLayout,getSortOrder:()=>Py.store.defaultSortOrder,settings:Py})});function CP(e){F.dispatch({type:"POGGERMODE_SETTINGS_UPDATE",settings:{enabled:e,settingsVisible:e}})}function RP(e){let t={screenshakeEnabledLocations:{0:!0,1:!0,2:!0},shakeIntensity:1,confettiSize:16,confettiCount:5,combosRequiredCount:1};switch(e){case 0:{Object.assign(t,{screenshakeEnabledLocations:{0:!0,1:!1,2:!1},combosRequiredCount:5});break}case 1:{Object.assign(t,{confettiSize:12,confettiCount:8});break}case 2:{Object.assign(t,{shakeIntensity:20,confettiSize:25,confettiCount:15});break}}F.dispatch({type:"POGGERMODE_SETTINGS_UPDATE",settings:t})}var NP,Gd,kP=f(()=>{"use strict";a();_();P();w();b();NP=A({superIntensePartyMode:{description:"Party intensity",type:4,options:[{label:"Normal",value:0,default:!0},{label:"Better",value:1},{label:"Project X",value:2}],restartNeeded:!1,onChange:RP}});gn("PartyMode","Party mode \u{1F389}");Gd=h({name:"PartyMode",description:"Allows you to use party mode cause the party never ends \u2728",authors:[p.UwUDev],reporterTestable:2,settings:NP,start(){CP(!0),RP(NP.store.superIntensePartyMode)},stop(){CP(!1)}})});function QD(e){let{enableInvitesDisabled:t}=JD?.getCurrentConfig?.({guildId:e})??{enableInvitesDisabled:!0};return t&&!se.getGuild(e).hasFeature("INVITES_DISABLED")}function VD(e){let o=[...se.getGuild(e).features,"INVITES_DISABLED"];St.patch({url:yt.Endpoints.GUILD(e),body:{features:o}})}var JD,Hd,DP=f(()=>{"use strict";a();re();P();w();$();b();JD=Qe(e=>e.definition?.id==="2022-07_invites_disabled");Hd=h({name:"PauseInvitesForever",tags:["DisableInvitesForever"],description:"Brings back the option to pause invites indefinitely that stupit Discord removed.",authors:[p.Dolfies,p.amia],patches:[{find:"Messages.GUILD_INVITE_DISABLE_ACTION_SHEET_DESCRIPTION",group:!0,replacement:[{match:/children:\i\.\i\.\i\.GUILD_INVITE_DISABLE_ACTION_SHEET_DESCRIPTION/,replace:"children: $self.renderInvitesLabel({guildId:arguments[0].guildId,setChecked})"},{match:/\.INVITES_DISABLED\)(?=.+?\.Messages\.INVITES_PERMANENTLY_DISABLED_TIP.+?checked:(\i)).+?\[\1,(\i)\]=\i.useState\(\i\)/,replace:"$&,setChecked=$2"}]}],renderInvitesLabel:k.wrap(({guildId:e,setChecked:t})=>n("div",null,Se.Messages.GUILD_INVITE_DISABLE_ACTION_SHEET_DESCRIPTION,QD(e)&&n("a",{role:"button",onClick:()=>{t(!0),VD(e)}}," Pause Indefinitely.")))})});var Iy,zd,LP=f(()=>{"use strict";a();_();P();Ko();w();Iy=A({lockout:{type:3,default:!0,description:`Bypass the permission lockout prevention ("Pretty sure you don't want to do this")`,restartNeeded:!0},onboarding:{type:3,default:!0,description:'Bypass the onboarding requirements ("Making this change will make your server incompatible [...]")',restartNeeded:!0}}),zd=h({name:"PermissionFreeWill",description:"Disables the client-side restrictions for channel permission management.",authors:[p.lewisakura],patches:[{find:".STAGE_CHANNEL_CANNOT_OVERWRITE_PERMISSION",replacement:[{match:/case"DENY":.{0,50}if\((?=\i\.\i\.can)/,replace:"$&true||"}],predicate:()=>Iy.store.lockout},{find:".ONBOARDING_CHANNEL_THRESHOLD_WARNING",replacement:[{match:/{(\i:function\(\){return \i},?){2}}/,replace:e=>e.replaceAll(Kt(/return \i/g),"return ()=>Promise.resolve(true)")}],predicate:()=>Iy.store.onboarding}],settings:Iy})});var EP=f(()=>{});function eL(e){return Yn(e.toLowerCase().split("_"))}function jd(e){return e=OP[e]||e,Se.Messages[e]||eL(e)}function _P(e){e==="USE_APPLICATION_COMMANDS"?e="USE_APPLICATION_COMMANDS_GUILD":e==="SEND_VOICE_MESSAGES"?e="SEND_VOICE_MESSAGE_GUILD":e!=="STREAM"&&(e=OP[e]||e);let t=Se.Messages[`ROLE_PERMISSIONS_${e}_DESCRIPTION`];return t?.hasMarkdown?Pe.parse(t.message):typeof t=="string"?t:""}function Wd({id:e},t){let o=se.getRoles(e);return[...t.roles,e].map(r=>o[r]).sort((r,i)=>i.position-r.position)}function BP(e){switch(ir.store.permissionsSortOrder){case 0:return e.sort((t,o)=>o.position-t.position);case 1:return e.sort((t,o)=>t.position-o.position);default:return e}}function qd(e,t){let o=se.getRoles(t);return e.sort((r,i)=>{if(r.type!==0||i.type!==0)return 0;let s=o[r.id];return o[i.id].position-s.position})}var so,OP,yl=f(()=>{"use strict";a();Ve();Cn();b();Sl();vl();so=Te("vc-permviewer-");OP={MANAGE_GUILD:"MANAGE_SERVER",MANAGE_GUILD_EXPRESSIONS:"MANAGE_EXPRESSIONS",CREATE_GUILD_EXPRESSIONS:"CREATE_EXPRESSIONS",MODERATE_MEMBERS:"MODERATE_MEMBER",STREAM:"VIDEO",SEND_VOICE_MESSAGES:"ROLE_PERMISSIONS_SEND_VOICE_MESSAGE"}});function My(){return n("svg",{height:"24",width:"24",viewBox:"0 0 24 24"},n("title",null,"Denied"),n("path",{fill:"var(--status-danger)",d:"M18.4 4L12 10.4L5.6 4L4 5.6L10.4 12L4 18.4L5.6 20L12 13.6L18.4 20L20 18.4L13.6 12L20 5.6L18.4 4Z"}))}function Ay(){return n("svg",{height:"24",width:"24",viewBox:"0 0 24 24"},n("title",null,"Allowed"),n("path",{fill:"var(--text-positive)",d:"M8.99991 16.17L4.82991 12L3.40991 13.41L8.99991 19L20.9999 7.00003L19.5899 5.59003L8.99991 16.17ZZ"}))}function UP(){return n("svg",{height:"24",width:"24",viewBox:"0 0 16 16"},n("g",null,n("title",null,"Not overwritten"),n("polygon",{fill:"var(--text-normal)",points:"12 2.32 10.513 2 4 13.68 5.487 14"})))}var $P=f(()=>{"use strict";a()});function oL(e,t,o){return ue(r=>n(sL,{modalProps:r,permissions:e,guild:t,header:o}))}function nL({permissions:e,guild:t,modalProps:o,header:r}){e.sort((c,m)=>c.type-m.type),Fe([Be],()=>Be.getMemberIds(t.id),null,(c,m)=>c.length===m.length),ce(()=>{let c=e.filter(m=>m.type===1&&!Be.isMember(t.id,m.id)).map(({id:m})=>m);F.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[t.id],userIds:c})},[]);let[i,s]=K(0),l=e[i],u=se.getRoles(t.id);return n(fe,{...o,size:"large"},n(Ee,null,n(Z,{className:so("perms-title"),variant:"heading-lg/semibold"},r," permissions:"),n(ut,{onClick:o.onClose})),n(we,null,!l&&n("div",{className:so("perms-no-perms")},n(Z,{variant:"heading-lg/normal"},"No permissions to display!")),l&&n("div",{className:so("perms-container")},n("div",{className:so("perms-list")},e.map((c,m)=>{let g=L.getUser(c.id??""),y=u[c.id??""];return n("button",{className:so("perms-list-item-btn"),onClick:()=>s(m)},n("div",{className:so("perms-list-item",{"perms-list-item-active":i===m}),onContextMenu:v=>{c.type===0?Jt.openContextMenu(v,()=>n(rL,{guild:t,roleId:c.id,onClose:o.onClose})):c.type===1&&Jt.openContextMenu(v,()=>n(iL,{userId:c.id,onClose:o.onClose}))}},(c.type===0||c.type===2)&&n("span",{className:so("perms-role-circle"),style:{backgroundColor:y?.colorString??"var(--primary-300)"}}),c.type===1&&g!==void 0&&n("img",{className:so("perms-user-img"),src:g.getAvatarURL(void 0,void 0,!1)}),n(Z,{variant:"text-md/normal"},c.type===0?y?.name??"Unknown Role":c.type===1?(g&&Gn(g))??"Unknown User":n(pe,{style:{gap:"0.2em",justifyItems:"center"}},"@owner",n(Dg,{height:18,width:18,"aria-hidden":"true"})))))})),n("div",{className:so("perms-perms")},Object.entries(Ie).map(([c,m])=>n("div",{className:so("perms-perms-item")},n("div",{className:so("perms-perms-item-icon")},(()=>{let{permissions:g,overwriteAllow:y,overwriteDeny:v}=l;return g?(g&m)===m?Ay():My():y&&(y&m)===m?Ay():v&&(v&m)===m?My():UP()})()),n(Z,{variant:"text-md/normal"},jd(c)),n(oe,{text:_P(c)||"No Description"},g=>n(Pa,{...g}))))))))}function rL({guild:e,roleId:t,onClose:o}){return n(E.Menu,{navId:so("role-context-menu"),onClose:Jt.closeContextMenu,"aria-label":"Role Options"},n(E.MenuItem,{id:"vc-copy-role-id",label:Se.Messages.COPY_ID_ROLE,action:()=>{Et.copy(t)}}),ir.store.unsafeViewAsRole&&n(E.MenuItem,{id:"vc-pw-view-as-role",label:Se.Messages.VIEW_AS_ROLE,action:()=>{let r=se.getRole(e.id,t);!r||(o(),F.dispatch({type:"IMPERSONATE_UPDATE",guildId:e.id,data:{type:"ROLES",roles:{[t]:r}}}))}}))}function iL({userId:e,onClose:t}){return n(E.Menu,{navId:so("user-context-menu"),onClose:Jt.closeContextMenu,"aria-label":"User Options"},n(E.MenuItem,{id:"vc-copy-user-id",label:Se.Messages.COPY_ID_USER,action:()=>{Et.copy(e)}}))}var sL,Ds,vl=f(()=>{"use strict";a();re();Rt();bt();pt();$e();b();Sl();yl();$P();sL=k.wrap(nL),Ds=oL});function lL({guild:e,guildMember:t,showBorder:o,forceOpen:r=!1}){let i=ir.use(["permissionsSortOrder"]),[s,l]=wt(()=>{let I=[],R=Wd(e,t),D=R.map(B=>({type:0,...B}));if(e.ownerId===t.userId){D.push({type:2,permissions:Object.values(Ie).reduce((z,Y)=>z|Y,0n)});let B=Se.Messages.GUILD_OWNER||"Server Owner";I.push({permission:B,roleColor:"var(--primary-300)",rolePosition:1/0})}BP(R);for(let[B,z]of Object.entries(Ie))for(let{permissions:Y,colorString:ee,position:J}of R)if((Y&z)===z){I.push({permission:jd(B),roleColor:ee||"var(--primary-300)",rolePosition:J});break}return I.sort((B,z)=>z.rolePosition-B.rolePosition),[D,I]},[i.permissionsSortOrder]),{root:u,role:c,roleRemoveButton:m,roleNameOverflow:g,roles:y,rolePill:v,rolePillBorder:M,roleCircle:x,roleName:N}=aL;return n(wa,{forceOpen:r,headerText:"Permissions",moreTooltipText:"Role Details",onMoreClick:()=>Ds(s,e,t.nick||L.getUser(t.userId).username),onDropDownClick:I=>ir.store.defaultPermissionsDropdownState=!I,defaultState:ir.store.defaultPermissionsDropdownState,buttons:[n(oe,{text:`Sorting by ${i.permissionsSortOrder===0?"Highest Role":"Lowest Role"}`},I=>n("button",{...I,className:so("userperms-sortorder-btn"),onClick:()=>{i.permissionsSortOrder=i.permissionsSortOrder===0?1:0}},n("svg",{width:"20",height:"20",viewBox:"0 96 960 960",transform:i.permissionsSortOrder===0?"scale(1 1)":"scale(1 -1)"},n("path",{fill:"var(--text-normal)",d:"M440 896V409L216 633l-56-57 320-320 320 320-56 57-224-224v487h-80Z"}))))]},l.length>0&&n("div",{className:q(u,y)},l.map(({permission:I,roleColor:R})=>n("div",{className:q(c,v,o?M:null)},n("div",{className:m},n("span",{className:x,style:{backgroundColor:R}})),n("div",{className:N},n(Z,{className:g,variant:"text-xs/medium"},I))))))}var aL,Ny,GP=f(()=>{"use strict";a();re();Mc();be();$();b();Sl();yl();vl();aL=Ao(()=>Object.assign({},...Tr(ae.byProps("roles","rolePill","rolePillBorder"),ae.byProps("roleCircle","dotBorderBase","dotBorderColor"),ae.byProps("roleNameOverflow","root","roleName","roleRemoveButton"))));Ny=k.wrap(lL,{noop:!0})});function Cy(e,t,o){return o===0&&!Be.isMember(e,t)?null:n(E.MenuItem,{id:"perm-viewer-permissions",label:"Permissions",action:()=>{let r=se.getGuild(e),i,s;switch(o){case 0:{let l=Be.getMember(e,t);i=Wd(r,l).map(u=>({type:0,...u})),r.ownerId===t&&i.push({type:2,permissions:Object.values(Ie).reduce((u,c)=>u|c,0n)}),s=l.nick??L.getUser(l.userId).username;break}case 1:{let l=te.getChannel(t);i=qd(Object.values(l.permissionOverwrites).map(({id:u,allow:c,deny:m,type:g})=>({type:g,id:u,overwriteAllow:c,overwriteDeny:m})),e),s=l.name;break}default:{i=Object.values(se.getRoles(r.id)).map(l=>({type:0,...l})),s=r.name;break}}Ds(i,r,s)}})}function Yd(e,t){return(o,r)=>{if(!r||t===0&&!r.user||t===2&&!r.guild||t===1&&(!r.channel||!r.guild))return;let i=tt(e,o),s=(()=>{switch(t){case 0:return Cy(r.guildId,r.user.id,t);case 1:return Cy(r.guild.id,r.channel.id,t);case 2:return Cy(r.guild.id);default:return null}})();s!=null&&(i?i.push(s):e==="roles"&&r.guildId&&o.splice(-1,0,n(E.MenuGroup,null,s)))}}var cL,Kd,ir,Zd,Sl=f(()=>{"use strict";a();EP();So();_();re();bt();P();be();w();$();b();vl();GP();yl();cL=C("container","scroller","list"),Kd=C("button","buttonInner","icon","text"),ir=A({permissionsSortOrder:{description:"The sort method used for defining which role grants an user a certain permission",type:4,options:[{label:"Highest Role",value:0,default:!0},{label:"Lowest Role",value:1}]},defaultPermissionsDropdownState:{description:"Whether the permissions dropdown on user popouts should be open by default",type:3,default:!1}});Zd=h({name:"PermissionsViewer",description:"View the permissions a user or channel has, and the roles of a server",authors:[p.Nuckyz,p.Ven],settings:ir,patches:[{find:".popularApplicationCommandIds,",replacement:{match:/showBorder:(.{0,60})}\),(?<=guild:(\i),guildMember:(\i),.+?)/,replace:(e,t,o,r)=>`${e}$self.UserPermissions(${o},${r},${t}),`}},{find:".VIEW_ALL_ROLES,",replacement:{match:/children:"\+"\.concat\(\i\.length-\i\.length\).{0,20}\}\),/,replace:"$&$self.ViewPermissionsButton(arguments[0]),"}}],UserPermissions:(e,t,o)=>!!t&&n(Ny,{guild:e,guildMember:t,showBorder:o}),ViewPermissionsButton:k.wrap(({guild:e,guildMember:t})=>n(si,{position:"bottom",align:"center",renderPopout:()=>n(uc,{className:cL.container,style:{width:"500px"}},n(Ny,{guild:e,guildMember:t,showBorder:!0,forceOpen:!0}))},o=>n(xr,{text:"View Permissions"},n(T,{...o,color:T.Colors.CUSTOM,look:T.Looks.FILLED,size:T.Sizes.NONE,innerClassName:q(Kd.buttonInner,Kd.icon),className:q(Kd.button,Kd.icon,"vc-permviewer-role-button")},n(Bg,{height:"16",width:"16"})))),{noop:!0}),contextMenus:{"user-context":Yd("roles",0),"channel-context":Yd(["mute-channel","unmute-channel"],1),"guild-context":Yd("privacy",2),"guild-header-popout":Yd("privacy",2)}})});function HP(e){let t=e instanceof File,o=t?URL.createObjectURL(e):e;return new Promise((r,i)=>{let s=new Image;s.onload=()=>{t&&URL.revokeObjectURL(o),r(s)},s.onerror=(l,u,c,m,g)=>i(g||l),s.crossOrigin="Anonymous",s.src=o})}async function fL(e,t,o){for(let r of e)switch(r.name){case"image":let i=mL.getUpload(t.channel.id,r.name,Yt.SlashCommand);if(i){if(!i.isImage)throw mi.clearAll(t.channel.id,Yt.SlashCommand),"Upload is not an image";return i.item.file}break;case"url":return r.value;case"user":try{return(await no.getUser(r.value)).getAvatarURL(o?void 0:t.guild?.id,2048).replace(/\?size=\d+$/,"?size=2048")}catch(s){throw console.error(`[petpet] Failed to fetch user
|
|
`,s),mi.clearAll(t.channel.id,Yt.SlashCommand),"Failed to fetch user. Check the console for more info."}}return mi.clearAll(t.channel.id,Yt.SlashCommand),null}var Ls,uL,pL,Xd,dL,mL,Jd,zP=f(()=>{"use strict";a();Do();P();Mo();w();$();b();Ls=ql($1()),uL=20,pL=128,Xd=10,dL=xn(()=>Promise.all(Array.from({length:Xd},(e,t)=>HP(`https://raw.githubusercontent.com/VenPlugs/petpet/main/frames/pet${t}.gif`)))),mL=C("getUploads");Jd=h({name:"petpet",description:"Adds a /petpet slash command to create headpet gifs from any image",authors:[p.Ven],dependencies:["CommandsAPI"],commands:[{inputType:0,name:"petpet",description:"Create a petpet gif. You can only specify one of the image options",options:[{name:"delay",description:"The delay between each frame. Defaults to 20.",type:4},{name:"resolution",description:"Resolution for the gif. Defaults to 120. If you enter an insane number and it freezes Discord that's your fault.",type:4},{name:"image",description:"Image attachment to use",type:11},{name:"url",description:"URL to fetch image from",type:3},{name:"user",description:"User whose avatar to use as image",type:6},{name:"no-server-pfp",description:"Use the normal avatar instead of the server specific one when using the 'user' option",type:5}],execute:async(e,t)=>{let o=await dL(),r=Ot(e,"no-server-pfp",!1);try{var i=await fL(e,t,r);if(!i)throw"No Image specified!"}catch(v){mi.clearAll(t.channel.id,Yt.SlashCommand),Me(t.channel.id,{content:String(v)});return}let s=await HP(i),l=Ot(e,"delay",uL),u=Ot(e,"resolution",pL),c=(0,Ls.GIFEncoder)(),m=document.createElement("canvas");m.width=m.height=u;let g=m.getContext("2d");mi.clearAll(t.channel.id,Yt.SlashCommand);for(let v=0;v<Xd;v++){g.clearRect(0,0,m.width,m.height);let M=v<Xd/2?v:Xd-v,x=.8+M*.02,N=.8-M*.05,I=(1-x)*.5+.1,R=1-N-.08;g.drawImage(s,I*u,R*u,x*u,N*u),g.drawImage(o[v],0,0,u,u);let{data:D}=g.getImageData(0,0,u,u),B=(0,Ls.quantize)(D,256),z=(0,Ls.applyPalette)(D,B);c.writeFrame(z,u,u,{transparent:!0,palette:B,delay:l})}c.finish();let y=new File([c.bytesView()],"petpet.gif",{type:"image/gif"});setTimeout(()=>da.promptToUpload([y],t.channel,Yt.ChannelMessage),10)}}]})});var jP=f(()=>{});var WP,Qd,qP=f(()=>{"use strict";a();jP();_();re();P();w();b();WP=A({loop:{description:"Whether to make the PiP video loop or not",type:3,default:!0,restartNeeded:!1}}),Qd=h({name:"PictureInPicture",description:"Adds picture in picture to videos (next to the Download button)",authors:[p.Nobody],settings:WP,patches:[{find:".nonMediaMosaicItem]",replacement:{match:/\.nonMediaMosaicItem\]:!(\i).{0,10}children:\[(\S)/,replace:"$&,$1&&$2&&$self.renderPiPButton(),"}}],renderPiPButton:k.wrap(()=>n(oe,{text:"Toggle Picture in Picture"},e=>n("div",{...e,className:"vc-pip-button",role:"button",style:{cursor:"pointer",paddingTop:"4px",paddingLeft:"4px",paddingRight:"4px"},onClick:t=>{let o=t.currentTarget.parentNode.parentNode.querySelector("video"),r=document.body.appendChild(o.cloneNode(!0));r.loop=WP.store.loop,r.style.display="none",r.onleavepictureinpicture=()=>r.remove();function i(){r.currentTime=o.currentTime,r.requestPictureInPicture(),o.pause(),r.play()}r.readyState===4?i():r.onloadedmetadata=i}},n("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M21 3a1 1 0 0 1 1 1v7h-2V5H4v14h6v2H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h18zm0 10a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1v-6a1 1 0 0 1 1-1h8zm-1 2h-6v4h6v-4z"})))),{noop:!0})})});var KP=f(()=>{});var YP,Vd=f(()=>{"use strict";a();YP=[1752220,3066993,3447003,10181046,15277667,15844367,15105570,15158332,9807270,6323595,1146986,2067276,2123412,7419530,11342935,12745742,11027200,10038562,9936031,5533306]});async function sr(e){let{id:t}=L.getCurrentUser();await Ht(ZP+t,e)}async function ky(){let e=L.getCurrentUser()?.id;await hL(e),await bL(e),ao()}async function hL(e){ge=await It(ZP+e)??[]}function JP(e){return ge.find(t=>t.id===e)}async function QP(e){ge.push(e),await sr(ge)}async function VP(e){let t=ge.findIndex(o=>o.id===e.id);t!==-1&&(ge[t]=e,await sr(ge))}async function eI(e,t){let o=ge.find(r=>r.id===t);!o||o.channels.includes(e)||(o.channels.push(e),await sr(ge))}async function tI(e){let t=ge.find(o=>o.channels.includes(e));!t||(t.channels=t.channels.filter(o=>o!==e),await sr(ge))}async function oI(e){!ge.find(o=>o.id===e)||(ge=ge.filter(o=>o.id!==e),await sr(ge))}async function nI(e,t=!0){let o=ge.find(r=>r.id===e);!o||(o.collapsed=t,await sr(ge))}function Tl(e){return ge.some(t=>t.channels.includes(e))}function rI(){return ge.length}function iI(){if(en.store.pinOrder===0){let e=Oy.getPrivateChannelIds();return ge.filter(t=>!t.collapsed).flatMap(t=>e.filter(o=>t.channels.includes(o)))}return ge.filter(e=>!e.collapsed).flatMap(e=>e.channels)}function sI(){return ge.reduce((e,t)=>(e.push(t.channels.length===0?1:t.channels.length),e),[])}function cI(e,t,o){!e[t]||!e[o]||([e[t],e[o]]=[e[o],e[t]])}async function Ly(e,t){let o=ge.findIndex(i=>i.id===e),r=o+t;cI(ge,o,r),await sr(ge)}async function Ey(e,t){let o=ge.find(s=>s.channels.includes(e));if(!o)return;let r=o.channels.indexOf(e),i=r+t;cI(o.channels,r,i),await sr(ge)}async function vL(){if(ge.some(o=>o.id==="oldPins"))return await Ht(Ry,!0);let e=yL(),t=[...new Set(e)].filter(o=>!ge.some(r=>r.channels.includes(o)));t?.length&&ge.push({id:"oldPins",name:"Pins",color:10070709,channels:t}),await Ht(Ry,!0)}async function SL(e){let t=await It(gL+e);ge.length===0&&t?.length&&ge.push(...t.filter(o=>o.id!=="oldPins")),await Ht(XP,!0)}async function bL(e){let t=await It(XP),o=await It(Ry);t&&o||(t||await SL(e),o||await vL(),await sr(ge))}var ZP,Ry,XP,gL,ge,aI,bl,lI,Dy,yL,tm=f(()=>{"use strict";a();cn();_();b();Vd();wl();ZP="PinDMsCategories-",Ry="PinDMsMigratedPinDMs",XP="PinDMsMigratedOldCategories",gL="BetterPinDMsCategories-",ge=[];aI=(e,t,o)=>{let r=e[t],i=e[t+o];return r&&i},bl=(e,t)=>{let o=ge.findIndex(r=>r.id===e);return aI(ge,o,t)},lI=e=>bl(e,-1)||bl(e,1),Dy=(e,t)=>{let o=ge.find(i=>i.channels.includes(e));if(!o)return!1;let r=o.channels.indexOf(e);return aI(o.channels,r,t)};yL=()=>(j.plugins.PinDMs.pinnedDMs||void 0)?.split(",")});function IL(e,t){let[o,r]=K(null);return ce(()=>{e?r(JP(e)):t&&r({id:V.genId(),name:`Pin Category ${ge.length+1}`,color:10070709,collapsed:!1,channels:[t]})},[e,t]),{category:o,setCategory:r}}function ML({categoryId:e,modalProps:t,initalChannelId:o}){let{category:r,setCategory:i}=IL(e,o);if(!r)return null;let s=async l=>{l.preventDefault(),e?await VP(r):await QP(r),ao(),t.onClose()};return n(fe,{...t},n(Ee,null,n(Z,{variant:"heading-lg/semibold",style:{flexGrow:1}},e?"Edit":"New"," Category")),n("form",{onSubmit:s},n(we,{className:PL("content")},n(S.FormSection,null,n(S.FormTitle,null,"Name"),n(je,{value:r.name,onChange:l=>i({...r,name:l})})),n(S.FormDivider,null),n(S.FormSection,null,n(S.FormTitle,null,"Color"),n(xL,{key:r.name,defaultColor:10070709,colors:YP,onChange:l=>i({...r,color:l}),value:r.color,renderDefaultButton:()=>null,renderCustomButton:()=>n(wL,{color:r.color,onChange:l=>i({...r,color:l}),key:r.name,showEyeDropper:!1})}))),n(ct,null,n(T,{type:"submit",onClick:s,disabled:!r.name},e?"Save":"Create"))))}var wL,xL,_y,PL,om,By=f(()=>{"use strict";a();Ve();$e();$();b();Vd();tm();wl();wL=ve(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR",".BACKGROUND_PRIMARY)"),xL=Xo("ColorPicker","CustomColorPicker"),_y=On(['name:"UserSettings"'],/createPromise:.{0,20}Promise\.all\((\[\i\.\i\("?.+?"?\).+?\])\).then\(\i\.bind\(\i,"?(.+?)"?\)\).{0,50}"UserSettings"/),PL=Te("vc-pindms-modal-");om=(e,t)=>Sa(async()=>(await _y(),o=>n(ML,{categoryId:e,modalProps:o,initalChannelId:t})))});function uI(e){let t=Tl(e);return n(E.MenuItem,{id:"pin-dm",label:"Pin DMs"},!t&&n(d,null,n(E.MenuItem,{id:"vc-add-category",label:"Add Category",color:"brand",action:()=>om(null,e)}),n(E.MenuSeparator,null),ge.map(o=>n(E.MenuItem,{id:`pin-category-${o.name}`,label:o.name,action:()=>eI(e,o.id).then(ao)}))),t&&n(d,null,n(E.MenuItem,{id:"unpin-dm",label:"Unpin DM",color:"danger",action:()=>tI(e).then(ao)}),en.store.pinOrder===1&&Dy(e,-1)&&n(E.MenuItem,{id:"move-up",label:"Move Up",action:()=>Ey(e,-1).then(ao)}),en.store.pinOrder===1&&Dy(e,1)&&n(E.MenuItem,{id:"move-down",label:"Move Down",action:()=>Ey(e,1).then(ao)})))}var AL,NL,pI,dI=f(()=>{"use strict";a();So();b();tm();wl();By();AL=(e,t)=>{tt("leave-channel",e)?.unshift(uI(t.channel.id))},NL=(e,t)=>{let o=tt("close-dm",e);if(o){let r=o.findIndex(i=>i?.props?.id==="close-dm");o.splice(r,0,uI(t.channel.id))}},pI={"gdm-context":AL,"user-context":NL}});var mI,Oy,fI,ao,en,nm,wl=f(()=>{"use strict";a();KP();_();re();P();be();w();$();b();dI();By();Vd();tm();mI=C("privateChannelsHeaderContainer"),Oy=me("PrivateChannelSortStore"),ao=()=>fI?.props?._forceUpdate?.(),en=A({pinOrder:{type:4,description:"Which order should pinned DMs be displayed in?",options:[{label:"Most recent message",value:0,default:!0},{label:"Custom (right click channels to reorder)",value:1}],onChange:()=>ao()},dmSectioncollapsed:{type:3,description:"Collapse DM sections",default:!1,onChange:()=>ao()}}),nm=h({name:"PinDMs",description:"Allows you to pin private channels to the top of your DM list. To pin/unpin or reorder pins, right click DMs",authors:[p.Ven,p.Aria],settings:en,contextMenus:pI,patches:[{find:".privateChannelsHeaderContainer,",replacement:[{match:/(?<=\i,{channels:\i,)privateChannelIds:(\i)/,replace:"privateChannelIds:$1.filter(c=>!$self.isPinned(c))"},{match:/(?<=renderRow:this\.renderRow,)sections:\[.+?1\)]/,replace:"...$self.makeProps(this,{$&})"},{match:/"renderRow",(\i)=>{(?<="renderDM",.+?(\i\.\i),\{channel:.+?)/,replace:"$&if($self.isChannelIndex($1.section, $1.row))return $self.renderChannel($1.section,$1.row,$2)();"},{match:/"renderSection",(\i)=>{/,replace:"$&if($self.isCategoryIndex($1.section))return $self.renderCategory($1);"},{match:/(?<=span",{)className:\i\.headerText,/,replace:"...$self.makeSpanProps(),$&"},{match:/(?<="getRowHeight",.{1,100}return 1===)\i/,replace:"($&-$self.categoryLen())"},{match:/"getRowHeight",\((\i),(\i)\)=>{/,replace:"$&if($self.isChannelHidden($1,$2))return 0;"},{match:/(?<=scrollTo\(\{to:\i\}\):\(\i\+=)(\d+)\*\(.+?(?=,)/,replace:"$self.getScrollOffset(arguments[0],$1,this.props.padding,this.state.preRenderedChildren,$&)"},{match:/(scrollToChannel\(\i\){.{1,300})(this\.props\.privateChannelIds)/,replace:"$1[...$2,...$self.getAllUncollapsedChannels()]"}]},{find:'.FRIENDS},"friends"',replacement:{match:/(?<=\i=\i=>{).{1,100}premiumTabSelected.{1,800}showDMHeader:.+?,/,replace:"let forceUpdate = Vencord.Util.useForceUpdater();$&_forceUpdate:forceUpdate,"}},{find:".APPLICATION_STORE&&",replacement:{match:/(?<=\i=__OVERLAY__\?\i:\[\.\.\.\i\(\),\.\.\.)\i/,replace:"$self.getAllUncollapsedChannels().concat($&.filter(c=>!$self.isPinned(c)))"}},{find:".getFlattenedGuildIds()],",replacement:{match:/(?<=\i===\i\.ME\?)\i\.\i\.getPrivateChannelIds\(\)/,replace:"$self.getAllUncollapsedChannels().concat($&.filter(c=>!$self.isPinned(c)))"}}],sections:null,set _instance(e){this.instance=e,fI=e},startAt:"WebpackReady",start:ky,flux:{CONNECTION_OPEN:ky},isPinned:Tl,categoryLen:rI,getSections:sI,getAllUncollapsedChannels:iI,requireSettingsMenu:_y,makeProps(e,{sections:t}){return this._instance=e,this.sections=t,this.sections.splice(1,0,...this.getSections()),this.instance?.props?.privateChannelIds?.length===0&&(this.sections[this.sections.length-1]=0),{sections:this.sections,chunkSize:this.getChunkSize()}},makeSpanProps(){return{onClick:()=>this.collapseDMList(),role:"button",style:{cursor:"pointer"}}},getChunkSize(){let e=this.getSections();return(e.length*40+e.reduce((o,r)=>o+=r+44,0)+256)*1.5},isCategoryIndex(e){return this.sections&&e>0&&e<this.sections.length-1},isChannelIndex(e,t){if(en.store.dmSectioncollapsed&&e!==0)return!0;let o=ge[e-1];return this.isCategoryIndex(e)&&(o?.channels?.length===0||o?.channels[t])},isDMSectioncollapsed(){return en.store.dmSectioncollapsed},collapseDMList(){en.store.dmSectioncollapsed=!en.store.dmSectioncollapsed,ao()},isChannelHidden(e,t){if(e===0)return!1;if(en.store.dmSectioncollapsed&&this.getSections().length+1===e)return!0;if(!this.instance||!this.isChannelIndex(e,t))return!1;let o=ge[e-1];return o?o.collapsed&&this.instance.props.selectedChannelId!==this.getCategoryChannels(o)[t]:!1},getScrollOffset(e,t,o,r,i){return Tl(e)?t*(this.getAllUncollapsedChannels().indexOf(e)+r)+o:(t+o)*2+t*this.getAllUncollapsedChannels().length+i},renderCategory:k.wrap(({section:e})=>{let t=ge[e-1];return t?n("h2",{className:q(mI.privateChannelsHeaderContainer,"vc-pindms-section-container",t.collapsed?"vc-pindms-collapsed":""),style:{color:`#${t.color.toString(16).padStart(6,"0")}`},onClick:async()=>{await nI(t.id,!t.collapsed),ao()},onContextMenu:o=>{Jt.openContextMenu(o,()=>n(E.Menu,{navId:"vc-pindms-header-menu",onClose:()=>F.dispatch({type:"CONTEXT_MENU_CLOSE"}),color:"danger","aria-label":"Pin DMs Category Menu"},n(E.MenuItem,{id:"vc-pindms-edit-category",label:"Edit Category",action:()=>om(t.id,null)}),lI(t.id)&&n(d,null,bl(t.id,-1)&&n(E.MenuItem,{id:"vc-pindms-move-category-up",label:"Move Up",action:()=>Ly(t.id,-1).then(()=>ao())}),bl(t.id,1)&&n(E.MenuItem,{id:"vc-pindms-move-category-down",label:"Move Down",action:()=>Ly(t.id,1).then(()=>ao())})),n(E.MenuSeparator,null),n(E.MenuItem,{id:"vc-pindms-delete-category",color:"danger",label:"Delete Category",action:()=>oI(t.id).then(()=>ao())})))}},n("span",{className:mI.headerText},t?.name??"uh oh"),n("svg",{className:"vc-pindms-collapse-icon","aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M9.3 5.3a1 1 0 0 0 0 1.4l5.29 5.3-5.3 5.3a1 1 0 1 0 1.42 1.4l6-6a1 1 0 0 0 0-1.4l-6-6a1 1 0 0 0-1.42 0Z"}))):null},{noop:!0}),renderChannel(e,t,o){return k.wrap(()=>{let{channel:r,category:i}=this.getChannel(e,t,this.instance.props.channels);return!r||!i||this.isChannelHidden(e,t)?null:n(o,{channel:r,selected:this.instance.props.selectedChannelId===r.id},r.id)},{noop:!0})},getChannel(e,t,o){let r=ge[e-1];if(!r)return{channel:null,category:null};let i=this.getCategoryChannels(r)[t];return{channel:o[i],category:r}},getCategoryChannels(e){return e.channels.length===0?[]:en.store.pinOrder===0?Oy.getPrivateChannelIds().filter(t=>e.channels.includes(t)):e?.channels??[]}})});var rm,gI=f(()=>{"use strict";a();P();w();rm=h({name:"PlainFolderIcon",description:"Doesn't show the small guild icons in folders",authors:[p.botato],patches:[{find:".expandedFolderIconWrapper",replacement:[{match:/\(\w\|\|\w\)&&(\(.{0,40}\(.{1,3}\.animated)/,replace:"$1"}]}]})});var hI=f(()=>{});var $y={};lt($y,{__getDecorators:()=>RL,addDecorator:()=>Fy,decorators:()=>im,removeDecorator:()=>Uy});function Fy(e,t,o){im.set(e,{decorator:t,onlyIn:o})}function Uy(e){im.delete(e)}function RL(e){let t=!!e.guildId;return Array.from(im.values(),o=>{let{decorator:r,onlyIn:i}=o;return!i||i==="guilds"&&t||i==="dms"&&!t?r(e):null})}var im,Gy=f(()=>{"use strict";a();im=new Map});var jy={};lt(jy,{__addDecorationsToMessage:()=>kL,addDecoration:()=>Hy,decorations:()=>sm,removeDecoration:()=>zy});function Hy(e,t){sm.set(e,t)}function zy(e){sm.delete(e)}function kL(e){return[...sm.values()].map(t=>t(e))}var sm,Wy=f(()=>{"use strict";a();sm=new Map});function am(e,t){return({color:o,tooltip:r,small:i})=>n(oe,{text:r},s=>n("svg",{...s,height:(t?.height??20)-(i?3:0),width:(t?.width??20)-(i?3:0),viewBox:t?.viewBox??"0 0 24 24",fill:o},n("path",{d:e})))}function TI(e){if(e.id===L.getCurrentUser().id){let t=DL.getSessions();if(typeof t!="object")return null;let o=Object.values(t).sort(({status:s},{status:l})=>s===l?0:s==="online"?1:l==="online"?-1:s==="idle"?1:l==="idle"?-1:0),r=Object.values(o).reduce((s,l)=>(l.clientInfo.client!=="unknown"&&(s[l.clientInfo.client]=l.status),s),{}),{clientStatuses:i}=In.getState();i[L.getCurrentUser().id]=r}}function EL({userId:e}){let t=L.getUser(e);if(!t||t.bot)return[];TI(t);let o=In.getState()?.clientStatuses?.[t.id];return o?Object.entries(o).map(([r,i])=>({component:()=>n("span",{className:"vc-platform-indicator"},n(bI,{key:r,platform:r,status:i,small:!1})),key:`vc-platform-indicator-${r}`})):[]}var DL,yI,LL,bI,vI,SI,qy,lm,wI=f(()=>{"use strict";a();hI();nu();Gy();Wy();_();re();P();w();$();b();DL=me("SessionsStore");yI={desktop:am("M4 2.5c-1.103 0-2 .897-2 2v11c0 1.104.897 2 2 2h7v2H7v2h10v-2h-4v-2h7c1.103 0 2-.896 2-2v-11c0-1.103-.897-2-2-2H4Zm16 2v9H4v-9h16Z"),web:am("M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2Zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93Zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39Z"),mobile:am("M 187 0 L 813 0 C 916.277 0 1000 83.723 1000 187 L 1000 1313 C 1000 1416.277 916.277 1500 813 1500 L 187 1500 C 83.723 1500 0 1416.277 0 1313 L 0 187 C 0 83.723 83.723 0 187 0 Z M 125 1000 L 875 1000 L 875 250 L 125 250 Z M 500 1125 C 430.964 1125 375 1180.964 375 1250 C 375 1319.036 430.964 1375 500 1375 C 569.036 1375 625 1319.036 625 1250 C 625 1180.964 569.036 1125 500 1125 Z",{viewBox:"0 0 1000 1500",height:17,width:17}),embedded:am("M14.8 2.7 9 3.1V47h3.3c1.7 0 6.2.3 10 .7l6.7.6V2l-4.2.2c-2.4.1-6.9.3-10 .5zm1.8 6.4c1 1.7-1.3 3.6-2.7 2.2C12.7 10.1 13.5 8 15 8c.5 0 1.2.5 1.6 1.1zM16 33c0 6-.4 10-1 10s-1-4-1-10 .4-10 1-10 1 4 1 10zm15-8v23.3l3.8-.7c2-.3 4.7-.6 6-.6H43V3h-2.2c-1.3 0-4-.3-6-.6L31 1.7V25z",{viewBox:"0 0 50 50"})},LL=C("useStatusFillColor","StatusTypes"),bI=({platform:e,status:t,small:o})=>{let r=e==="embedded"?"Console":e[0].toUpperCase()+e.slice(1),i=yI[e]??yI.desktop;return n(i,{color:LL.useStatusFillColor(t),tooltip:r,small:o})};vI=({user:e,wantMargin:t=!0,wantTopMargin:o=!1,small:r=!1})=>{if(!e||e.bot)return null;TI(e);let i=In.getState()?.clientStatuses?.[e.id];if(!i)return null;let s=Object.entries(i).map(([l,u])=>n(bI,{key:l,platform:l,status:u,small:r}));return s.length?n("span",{className:"vc-platform-indicator",style:{marginLeft:t?4:0,top:o?2:0,gap:2}},s):null},SI={getBadges:EL,position:0},qy={list:{description:"In the member list",onEnable:()=>Fy("platform-indicator",e=>n(k,{noop:!0},n(vI,{user:e.user,small:!0}))),onDisable:()=>Uy("platform-indicator")},badges:{description:"In user profiles, as badges",onEnable:()=>Ky(SI),onDisable:()=>Yy(SI)},messages:{description:"Inside messages",onEnable:()=>Hy("platform-indicator",e=>n(k,{noop:!0},n(vI,{user:e.message?.author,wantTopMargin:!0}))),onDisable:()=>zy("platform-indicator")}},lm=h({name:"PlatformIndicators",description:"Adds platform indicators (Desktop, Mobile, Web...) to users",authors:[p.kemo,p.TheSun,p.Nuckyz,p.Ven],dependencies:["MessageDecorationsAPI","MemberListDecoratorsAPI"],start(){let e=j.plugins.PlatformIndicators,{displayMode:t}=e;t&&(t!=="both"?e[t]=!0:(e.list=!0,e.badges=!0),e.messages=!0,delete e.displayMode),Object.entries(qy).forEach(([o,r])=>{e[o]&&r.onEnable()})},stop(){Object.entries(qy).forEach(([e,t])=>{t.onDisable()})},patches:[{find:".Masks.STATUS_ONLINE_MOBILE",predicate:()=>j.plugins.PlatformIndicators.colorMobileIndicator,replacement:[{match:/\.STATUS_TYPING;switch(?=.+?(if\(\i\)return \i\.\i\.Masks\.STATUS_ONLINE_MOBILE))/,replace:".STATUS_TYPING;$1;switch"},{match:/switch\(\i\)\{case \i\.\i\.ONLINE:(if\(\i\)return\{[^}]+\})/,replace:"$1;$&"}]},{find:".AVATAR_STATUS_MOBILE_16;",predicate:()=>j.plugins.PlatformIndicators.colorMobileIndicator,replacement:[{match:/\i===\i\.\i\.ONLINE&&(?=.{0,70}\.AVATAR_STATUS_MOBILE_16;)/,replace:""},{match:/(?<=\(\i\.status,)(\i)(?=,(\i),\i\))/,replace:(e,t,o)=>`${o}?"online":${t}`},{match:/(?<=\i&&!\i)&&\i===\i\.\i\.ONLINE/,replace:""}]},{find:"}isMobileOnline(",predicate:()=>j.plugins.PlatformIndicators.colorMobileIndicator,replacement:{match:/(?<=\i\[\i\.\i\.MOBILE\])===\i\.\i\.ONLINE/,replace:"!= null"}}],options:{...Object.fromEntries(Object.entries(qy).map(([e,t])=>[e,{type:3,description:`Show indicators ${t.description.toLowerCase()}`,restartNeeded:!0,default:!0}])),colorMobileIndicator:{type:3,description:"Whether to make the mobile indicator match the color of the user status.",default:!0,restartNeeded:!0}}})});var PI,xI,OL,_L,BL,cm,II=f(()=>{"use strict";a();or();Do();P();w();$();b();PI=C("getUploads"),xI=e=>ua.getDraft(e,Yt.ChannelMessage),OL=e=>new Promise(t=>{let o=new Image;o.onload=()=>t({width:o.width,height:o.height}),o.onerror=()=>t(null),o.src=e}),_L=async e=>await Promise.all(PI.getUploads(e,Yt.ChannelMessage).map(async t=>{let{isImage:o,filename:r,spoiler:i,item:{file:s}}=t,l=URL.createObjectURL(s),u={id:$a(),filename:i?"SPOILER_"+r:r,content_type:void 0,size:await t.getSize(),spoiler:i,url:l+"#",proxy_url:l+"#"};if(o){let c=await OL(l);if(!c)return u;u.width=c.width,u.height=c.height}return u})),BL=({isMainChat:e,isEmpty:t,type:{attachments:o}})=>{let r=xe.getChannelId(),i=Fe([ua],()=>xI(r));if(!e)return null;let s=o&&PI.getUploads(r,Yt.ChannelMessage).length>0;return!(!t&&i?.length>0)&&!s?null:n(qo,{tooltip:"Preview Message",onClick:async()=>Me(r,{content:xI(r),author:L.getCurrentUser(),attachments:s?await _L(r):void 0}),buttonProps:{style:{translate:"0 2px"}}},n("svg",{fill:"currentColor",fillRule:"evenodd",width:"24",height:"24",viewBox:"0 0 24 24",style:{scale:"1.096",translate:"0 -1px"}},n("path",{d:"M22.89 11.7c.07.2.07.4 0 .6C22.27 13.9 19.1 21 12 21c-7.11 0-10.27-7.11-10.89-8.7a.83.83 0 0 1 0-.6C1.73 10.1 4.9 3 12 3c7.11 0 10.27 7.11 10.89 8.7Zm-4.5-3.62A15.11 15.11 0 0 1 20.85 12c-.38.88-1.18 2.47-2.46 3.92C16.87 17.62 14.8 19 12 19c-2.8 0-4.87-1.38-6.39-3.08A15.11 15.11 0 0 1 3.15 12c.38-.88 1.18-2.47 2.46-3.92C7.13 6.38 9.2 5 12 5c2.8 0 4.87 1.38 6.39 3.08ZM15.56 11.77c.2-.1.44.02.44.23a4 4 0 1 1-4-4c.21 0 .33.25.23.44a2.5 2.5 0 0 0 3.32 3.32Z"})))},cm=h({name:"PreviewMessage",description:"Lets you preview your message before sending it.",authors:[p.Aria],dependencies:["ChatInputButtonAPI"],startAt:"Init",start:()=>Wo("previewMessage",BL),stop:()=>Sn("previewMessage")})});var MI=f(()=>{});function Zy(){return n(H.Fragment,null,n(S.FormTitle,{tag:"h3"},"More Information"),n(S.FormText,null,"To add your own pronouns, visit"," ",n(qe,{href:"https://pronoundb.org"},"pronoundb.org")),n(S.FormDivider,null),n(S.FormText,null,"The two pronoun formats are lowercase and capitalized. Example:",n("ul",null,n("li",null,"Lowercase: they/them"),n("li",null,"Capitalized: They/Them")),'Text like "Ask me my pronouns" or "Any pronouns" will always be capitalized. ',n("br",null),n("br",null),"You can also configure whether or not to display pronouns for the current user (since you probably already know them)"))}var AI=f(()=>{"use strict";a();ho();b()});var ar,um=f(()=>{"use strict";a();_();w();pm();ar=A({pronounsFormat:{type:4,description:"The format for pronouns to appear in chat",options:[{label:"Lowercase",value:"LOWERCASE",default:!0},{label:"Capitalized",value:"CAPITALIZED"}]},pronounSource:{type:4,description:"Where to source pronouns from",options:[{label:"Prefer PronounDB, fall back to Discord",value:0,default:!0},{label:"Prefer Discord, fall back to PronounDB (might lead to inconsistency between pronouns in chat and profile)",value:1}]},showSelf:{type:3,description:"Enable or disable showing pronouns for the current user",default:!0},showInMessages:{type:3,description:"Show in messages",default:!0},showInProfile:{type:3,description:"Show in profile",default:!0}})});var Es,NI=f(()=>{"use strict";a();Es={he:"He/Him",it:"It/Its",she:"She/Her",they:"They/Them",any:"Any pronouns",other:"Other pronouns",ask:"Ask me my pronouns",avoid:"Avoid pronouns, use my name",unspecified:"No pronouns specified."}});function UL(e,t=!1){let o=Qt.getUserProfile(e)?.pronouns;return t?o:Qt.getGuildMemberProfile(e,pn()?.guild_id)?.pronouns||o}function mm(e,t=!1){let o=UL(e,t)?.trim().replace($L," "),[r]=st(()=>GL(e),{fallbackValue:kI(e),onError:i=>console.error("Fetching pronouns failed: ",i)});return ar.store.pronounSource===1&&o?[o,"Discord"]:r&&r!==Es.unspecified?[r,"PronounDB"]:[o,"Discord"]}function RI(e,t=!1){let o=mm(e,t);return!ar.store.showInProfile||!ar.store.showSelf&&e===L.getCurrentUser().id?CI:o}function kI(e){let t=dm[e]?DI(dm[e].sets):void 0;return t&&t!==Es.unspecified?t:t||null}function GL(e){return new Promise(t=>{let o=kI(e);if(o)return t(o);if(e in Os)return Os[e].push(t);Os[e]=[t],FL()})}async function HL(e){let t=new URLSearchParams;t.append("platform","discord"),t.append("ids",e.join(","));try{return await(await fetch("https://pronoundb.org/api/v2/lookup?"+t.toString(),{method:"GET",headers:{Accept:"application/json","X-PronounDB-Source":PS}})).json().then(r=>(Object.assign(dm,r),r))}catch(o){console.error("PronounDB fetching failed: ",o);let r=Object.fromEntries(e.map(i=>[i,{sets:{}}]));return Object.assign(dm,r),r}}function DI(e){if(!e||!e.en)return Es.unspecified;let t=e.en,{pronounsFormat:o}=j.plugins.PronounDB;if(t.length===1)return o==="CAPITALIZED"||["any","ask","avoid","other","unspecified"].includes(t[0])?Es[t[0]]:Es[t[0]].toLowerCase();let r=t.map(i=>i[0].toUpperCase()+i.slice(1)).join("/");return o==="CAPITALIZED"?r:r.toLowerCase()}var CI,dm,Os,FL,$L,pm=f(()=>{"use strict";a();_();Mr();Mh();pt();ft();b();um();NI();CI=[null,""],dm={},Os={},FL=ro(async()=>{let e=Object.keys(Os),t=await HL(e);for(let o of e)Os[o]?.forEach(r=>r(t[o]?DI(t[o].sets):"")),delete Os[o]});$L=/\n+/g});function LI(e){return!(!ar.store.showInMessages||e.author.bot||e.author.system||e.type===zL||!ar.store.showSelf&&e.author.id===L.getCurrentUser().id)}function jL({message:e}){let[t]=mm(e.author.id);return t?n("span",{className:q(fm.timestampInline,fm.timestamp)},"\u2022 ",t):null}var fm,zL,EI,OI,WL,_I=f(()=>{"use strict";a();re();be();$();b();pm();um();fm=C("timestampInline"),zL=24;EI=k.wrap(({message:e})=>LI(e)?n(jL,{message:e}):null,{noop:!0}),OI=k.wrap(({message:e})=>LI(e)?n(WL,{message:e}):null,{noop:!0});WL=k.wrap(({message:e})=>{let[t]=mm(e.author.id);return t?n("span",{className:q(fm.timestampInline,fm.timestamp,"vc-pronoundb-compact")},"\u2022 ",t):null},{noop:!0})});var BI,gm,FI=f(()=>{"use strict";a();MI();P();w();AI();_I();pm();um();BI={match:/text:(.{0,10}.Messages\.USER_PROFILE_PRONOUNS)(?=,)/,replace:'$& + (typeof vcPronounSource !== "undefined" ? ` (${vcPronounSource})` : "")'},gm=h({name:"PronounDB",authors:[p.Tyman,p.TheKodeToad,p.Ven,p.Elvyra],description:"Adds pronouns to user messages using pronoundb",patches:[{find:"showCommunicationDisabledStyles",replacement:[{match:/("span",{id:\i,className:\i,children:\i}\))/,replace:"$1, $self.CompactPronounsChatComponentWrapper(arguments[0])"},{match:/(?<=return\s*\(0,\i\.jsxs?\)\(.+!\i&&)(\(0,\i.jsxs?\)\(.+?\{.+?\}\))/,replace:"[$1, $self.PronounsChatComponentWrapper(arguments[0])]"}]},{find:".pronouns,children",replacement:[{match:/{user:(\i),[^}]*,pronouns:(\i),[^}]*}=\i.*?;(?=return)/,replace:"$&let vcPronounSource;[$2,vcPronounSource]=$self.useProfilePronouns($1.id);"},BI]},{find:".nameTagSmall)",replacement:[{match:/\.getName\(\i\);(?<=displayProfile.{0,200})/,replace:"$&const [vcPronounce,vcPronounSource]=$self.useProfilePronouns(arguments[0].user.id,true);if(arguments[0].displayProfile&&vcPronounce)arguments[0].displayProfile.pronouns=vcPronounce;"},BI]}],settings:ar,settingsAboutComponent:Zy,PronounsChatComponentWrapper:EI,CompactPronounsChatComponentWrapper:OI,useProfilePronouns:RI})});var hm,UI=f(()=>{"use strict";a();Ui();P();pt();w();b();hm=h({name:"QuickMention",authors:[p.kemo],description:"Adds a quick mention button to the message actions bar",dependencies:["MessagePopoverAPI"],start(){vn("QuickMention",e=>{let t=te.getChannel(e.channel_id);return t.guild_id&&!We.can(Ie.SEND_MESSAGES,t)?null:{label:"Quick Mention",icon:this.Icon,message:e,channel:t,onClick:()=>$n(`<@${e.author.id}> `)}})},stop(){Qo("QuickMention")},Icon:()=>n("svg",{className:"icon",height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor"},n("path",{d:"M12 2C6.486 2 2 6.486 2 12C2 17.515 6.486 22 12 22C14.039 22 15.993 21.398 17.652 20.259L16.521 18.611C15.195 19.519 13.633 20 12 20C7.589 20 4 16.411 4 12C4 7.589 7.589 4 12 4C16.411 4 20 7.589 20 12V12.782C20 14.17 19.402 15 18.4 15L18.398 15.018C18.338 15.005 18.273 15 18.209 15H18C17.437 15 16.6 14.182 16.6 13.631V12C16.6 9.464 14.537 7.4 12 7.4C9.463 7.4 7.4 9.463 7.4 12C7.4 14.537 9.463 16.6 12 16.6C13.234 16.6 14.35 16.106 15.177 15.313C15.826 16.269 16.93 17 18 17L18.002 16.981C18.064 16.994 18.129 17 18.195 17H18.4C20.552 17 22 15.306 22 12.782V12C22 6.486 17.514 2 12 2ZM12 14.599C10.566 14.599 9.4 13.433 9.4 11.999C9.4 10.565 10.566 9.399 12 9.399C13.434 9.399 14.6 10.565 14.6 11.999C14.6 13.433 13.434 14.599 12 14.599Z"}))})});function KI(e,t){let o=e.findIndex(r=>r.id===t);return o===-1?o:e.length-o-1}function HI({channelId:e,messageId:t,_isQuickEdit:o}){if(o)return;let r=L.getCurrentUser().id,i=Gt.getMessages(e)._array.filter(s=>s.author.id===r);vm=KI(i,t)}function zI({message:e,_isQuickReply:t}){t||(ym=KI(Gt.getMessages(e.channel_id)._array,e.id))}function jI(e){let t=e.key==="ArrowUp";!t&&e.key!=="ArrowDown"||!YL(e)||ZL(e)||(e.shiftKey?QL(t):JL(t))}function YI(e,t){let o=document.getElementById("message-content-"+t);if(!o)return;let r=Math.max(document.documentElement.clientHeight,window.innerHeight),i=o.getBoundingClientRect();(i.bottom<200||i.top-r>=-200)&&qL.jumpToMessage({channelId:e,messageId:t,flash:!1,jumpType:"INSTANT"})}function ZI(e,t){let o=Gt.getMessages(xe.getChannelId())._array;if(!t){let l=L.getCurrentUser().id;o=o.filter(u=>u.author.id===l)}Vencord.Plugins.isPluginEnabled("NoBlockedMessages")&&(o=o.filter(l=>!KL.isBlocked(l.author.id)));let r=l=>e?Math.min(o.length-1,l+1):Math.max(-1,l-1),i=l=>{do l=r(l);while(l!==-1&&o[o.length-l-1]?.deleted===!0);return l},s;return t?ym=s=i(ym):vm=s=i(vm),s===-1?void 0:o[o.length-s-1]}function XL(e){let{enabled:t,userList:o,shouldPingListed:r}=j.plugins.NoReplyMention,i=!t||r===o.includes(e.author.id);switch(qI.store.shouldMention){case 2:return i;case 0:return!1;default:return!0}}function JL(e){let t=te.getChannel(xe.getChannelId());if(t.guild_id&&!We.can(Ie.SEND_MESSAGES,t))return;let o=ZI(e,!0);if(!o)return void F.dispatch({type:"DELETE_PENDING_REPLY",channelId:xe.getChannelId()});let r=te.getChannel(o.channel_id),i=L.getCurrentUser().id;F.dispatch({type:"CREATE_PENDING_REPLY",channel:r,message:o,shouldMention:XL(o),showMentionToggle:r.guild_id!==null&&o.author.id!==i,_isQuickReply:!0}),YI(r.id,o.id)}function QL(e){let t=te.getChannel(xe.getChannelId());if(t.guild_id&&!We.can(Ie.SEND_MESSAGES,t))return;let o=ZI(e,!1);if(!o)return F.dispatch({type:"MESSAGE_END_EDIT",channelId:xe.getChannelId()});F.dispatch({type:"MESSAGE_START_EDIT",channelId:o.channel_id,messageId:o.id,content:o.content,_isQuickEdit:!0}),YI(o.channel_id,o.id)}var qL,KL,WI,ym,vm,qI,Sm,$I,GI,YL,ZL,XI=f(()=>{"use strict";a();_();P();w();$();b();qL=C("jumpToMessage"),KL=C("getRelationships","isBlocked"),WI=navigator.platform.includes("Mac"),ym=-1,vm=-1,qI=A({shouldMention:{type:4,description:"Ping reply by default",options:[{label:"Follow NoReplyMention",value:2,default:!0},{label:"Enabled",value:1},{label:"Disabled",value:0}]}}),Sm=h({name:"QuickReply",authors:[p.fawn,p.Ven,p.pylix],description:"Reply to (ctrl + up/down) and edit (ctrl + shift + up/down) messages via keybinds",settings:qI,start(){F.subscribe("DELETE_PENDING_REPLY",$I),F.subscribe("MESSAGE_END_EDIT",GI),F.subscribe("MESSAGE_START_EDIT",HI),F.subscribe("CREATE_PENDING_REPLY",zI),document.addEventListener("keydown",jI)},stop(){F.unsubscribe("DELETE_PENDING_REPLY",$I),F.unsubscribe("MESSAGE_END_EDIT",GI),F.unsubscribe("MESSAGE_START_EDIT",HI),F.unsubscribe("CREATE_PENDING_REPLY",zI),document.removeEventListener("keydown",jI)}}),$I=()=>ym=-1,GI=()=>vm=-1;YL=e=>WI?e.metaKey:e.ctrlKey,ZL=e=>e.altKey||!WI&&e.metaKey});var Xy,bm,JI=f(()=>{"use strict";a();P();w();b();bm=h({name:"ReactErrorDecoder",description:'Replaces "Minifed React Error" with the actual error.',authors:[p.Cyn,p.maisymoe],patches:[{find:'"https://reactjs.org/docs/error-decoder.html?invariant="',replacement:{match:/(function .\(.\)){(for\(var .="https:\/\/reactjs\.org\/docs\/error-decoder\.html\?invariant="\+.,.=1;.<arguments\.length;.\+\+\).\+="&args\[\]="\+encodeURIComponent\(arguments\[.\]\);return"Minified React error #"\+.\+"; visit "\+.\+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.")}/,replace:(e,t,o)=>`${t}{var decoded=$self.decodeError.apply(null, arguments);if(decoded)return decoded;${o}}`}}],async start(){let e=`https://raw.githubusercontent.com/facebook/react/v${H.version}/scripts/error-codes/codes.json`;Xy=await fetch(e).then(t=>t.json()).catch(t=>console.error(`[ReactErrorDecoder] Failed to fetch React error codes
|
|
`,t))},stop(){Xy=void 0},decodeError(e,...t){let o=0;return Xy?.[e]?.replace(/%s/g,()=>{let r=t[o];return o++,r})}})});var QI=f(()=>{});var Qy={};lt(Qy,{ServerListRenderPosition:()=>Tm,addServerListElement:()=>xl,removeServerListElement:()=>Pl,renderAll:()=>o6});function Jy(e){return e===0?e6:t6}function xl(e,t){Jy(e).add(t)}function Pl(e,t){Jy(e).delete(t)}var VL,Tm,e6,t6,o6,wm=f(()=>{"use strict";a();ke();VL=new Q("ServerListAPI"),Tm=(o=>(o[o.Above=0]="Above",o[o.In=1]="In",o))(Tm||{}),e6=new Set,t6=new Set;o6=e=>{let t=[];for(let o of Jy(e))try{t.unshift(o())}catch(r){VL.error("Failed to render server list element:",r)}return t}});function r6(){let e=[];Object.values(se.getGuilds()).forEach(t=>{_n.getChannels(t.id).SELECTABLE.concat(_n.getChannels(t.id).VOCAL).concat(Object.values(n6.getActiveJoinedThreadsForGuild(t.id)).flatMap(o=>Object.values(o))).forEach(o=>{!ui.hasUnread(o.channel.id)||e.push({channelId:o.channel.id,messageId:ui.lastMessageId(o.channel.id),readStateType:0})})}),F.dispatch({type:"BULK_ACK",context:"APP",channels:e})}var n6,i6,xm,VI=f(()=>{"use strict";a();QI();wm();re();P();w();$();b();n6=me("ActiveJoinedThreadsStore");i6=()=>n(T,{onClick:r6,size:T.Sizes.MIN,color:T.Colors.CUSTOM,className:"vc-ranb-button"},"Read All"),xm=h({name:"ReadAllNotificationsButton",description:"Read all server notifications with a single button click!",authors:[p.kemo],dependencies:["ServerListAPI"],renderReadAllButton:k.wrap(i6,{noop:!0}),start(){xl(0,this.renderReadAllButton)},stop(){Pl(0,this.renderReadAllButton)}})});var _o,Pm=f(()=>{"use strict";a();_();w();_o=A({notices:{type:3,description:"Also show a notice at the top of your screen when removed (use this if you don't want to miss any notifications).",default:!1},offlineRemovals:{type:3,description:"Notify you when starting discord if you were removed while offline.",default:!0},friends:{type:3,description:"Notify when a friend removes you",default:!0},friendRequestCancels:{type:3,description:"Notify when a friend request is cancelled",default:!0},servers:{type:3,description:"Notify when removed from a server",default:!0},groups:{type:3,description:"Notify when removed from a group chat",default:!0}})});var Vy=f(()=>{"use strict";a()});async function l6(){vt.delMany(["relationship-notifier-guilds","relationship-notifier-groups","relationship-notifier-friends"])}async function t0(){await l6();let[e,t,o]=await vt.getMany([eM(),tM(),oM()]);if(await Promise.all([Im(),Mm(),Il()]),_o.store.offlineRemovals){if(_o.store.groups&&t?.size)for(let[r,i]of t)Bs.has(r)||lr(`You are no longer in the group ${i.name}.`,i.iconURL);if(_o.store.servers&&e?.size)for(let[r,i]of e)!_s.has(r)&&!e0.isUnavailable(r)&&lr(`You are no longer in the server ${i.name}.`,i.iconURL);if(_o.store.friends&&o?.friends.length)for(let r of o.friends){if(Hi.friends.includes(r))continue;let i=await no.getUser(r).catch(()=>{});i&&lr(`You are no longer friends with ${Gn(i)}.`,i.getAvatarURL(void 0,void 0,!1),()=>Ho(i.id))}if(_o.store.friendRequestCancels&&o?.requests?.length)for(let r of o.requests){if(Hi.requests.includes(r)||[1,2,4].includes(Le.getRelationshipType(r)))continue;let i=await no.getUser(r).catch(()=>{});i&&lr(`Friend request from ${Gn(i)} has been revoked.`,i.getAvatarURL(void 0,void 0,!1),()=>Ho(i.id))}}}function lr(e,t,o){_o.store.notices&&Vn.showNotice(e,"OK",()=>Vn.popNotice()),Ue({title:"Relationship Notifier",body:e,icon:t,onClick:o})}function nM(e){return _s.get(e)}function o0(e){_s.delete(e),Im()}async function Im(){_s.clear();let e=L.getCurrentUser().id;for(let[t,{name:o,icon:r}]of Object.entries(se.getGuilds()))Be.isMember(t,e)&&_s.set(t,{id:t,name:o,iconURL:r&&`https://cdn.discordapp.com/icons/${t}/${r}.png`});await vt.set(eM(),_s)}function rM(e){return Bs.get(e)}function n0(e){Bs.delete(e),Mm()}async function Mm(){Bs.clear();for(let{type:e,id:t,name:o,rawRecipients:r,icon:i}of te.getSortedPrivateChannels())e===3&&Bs.set(t,{id:t,name:o||r.map(s=>s.username).join(", "),iconURL:i&&`https://cdn.discordapp.com/channel-icons/${t}/${i}.png`});await vt.set(tM(),Bs)}async function Il(){Hi.friends=[],Hi.requests=[];let e=Le.getRelationships();for(let t in e)switch(e[t]){case 1:Hi.friends.push(t);break;case 3:Hi.requests.push(t);break}await vt.set(oM(),Hi)}var e0,_s,Bs,Hi,eM,tM,oM,r0=f(()=>{"use strict";a();Jn();zn();pt();$();b();Pm();Vy();e0=me("GuildAvailabilityStore"),_s=new Map,Bs=new Map,Hi={friends:[],requests:[]},eM=()=>`relationship-notifier-guilds-${L.getCurrentUser().id}`,tM=()=>`relationship-notifier-groups-${L.getCurrentUser().id}`,oM=()=>`relationship-notifier-friends-${L.getCurrentUser().id}`});async function lM({relationship:{type:e,id:t}}){if(i0===t){i0=void 0;return}let o=await no.getUser(t).catch(()=>null);if(!!o)switch(e){case 1:_o.store.friends&&lr(`${Gn(o)} removed you as a friend.`,o.getAvatarURL(void 0,void 0,!1),()=>Ho(o.id));break;case 3:_o.store.friendRequestCancels&&lr(`A friend request from ${Gn(o)} has been removed.`,o.getAvatarURL(void 0,void 0,!1),()=>Ho(o.id));break}}function cM({guild:{id:e,unavailable:t}}){if(!_o.store.servers||t||e0.isUnavailable(e))return;if(s0===e){o0(e),s0=void 0;return}let o=nM(e);o&&(o0(e),lr(`You were removed from the server ${o.name}.`,o.iconURL))}function uM({channel:{id:e,type:t}}){if(!_o.store.groups||t!==3)return;if(a0===e){n0(e),a0=void 0;return}let o=rM(e);o&&(n0(e),lr(`You were removed from the group ${o.name}.`,o.iconURL))}var i0,s0,a0,iM,sM,aM,pM=f(()=>{"use strict";a();pt();b();Pm();Vy();r0();iM=e=>i0=e,sM=e=>s0=e,aM=e=>a0=e});var Am,dM=f(()=>{"use strict";a();P();w();pM();Pm();r0();Am=h({name:"RelationshipNotifier",description:"Notifies you when a friend, group chat, or server removes you.",authors:[p.nick],settings:_o,patches:[{find:"removeRelationship:(",replacement:{match:/(removeRelationship:\((\i),\i,\i\)=>)/,replace:"$1($self.removeFriend($2),0)||"}},{find:"async leaveGuild(",replacement:{match:/(leaveGuild\((\i)\){)/,replace:"$1$self.removeGuild($2);"}},{find:"},closePrivateChannel(",replacement:{match:/(closePrivateChannel\((\i)\){)/,replace:"$1$self.removeGroup($2);"}}],flux:{GUILD_CREATE:Im,GUILD_DELETE:cM,CHANNEL_CREATE:Mm,CHANNEL_DELETE:uM,RELATIONSHIP_ADD:Il,RELATIONSHIP_UPDATE:Il,RELATIONSHIP_REMOVE(e){lM(e),Il()},CONNECTION_OPEN:t0},async start(){setTimeout(()=>{t0()},5e3)},removeFriend:iM,removeGroup:aM,removeGuild:sM})});function u6(e,t){open(t+encodeURIComponent(e.trim()),"_blank")}function p6(e){let t={};return Ml.store.customEngineName&&Ml.store.customEngineURL&&(t[Ml.store.customEngineName]=Ml.store.customEngineURL),t={...t,...c6},n(E.MenuItem,{label:"Search Text",key:"search-text",id:"vc-search-text"},Object.keys(t).map(o=>{let r="vc-search-content-"+o;return n(E.MenuItem,{key:r,id:r,label:n(Qi,{style:{alignItems:"center",gap:"0.5em"}},n("img",{style:{borderRadius:"50%"},"aria-hidden":"true",height:16,width:16,src:`https://www.google.com/s2/favicons?domain=${t[o]}&sz=64`}),o),action:()=>u6(e,t[o])})}))}var c6,Ml,d6,Nm,mM=f(()=>{"use strict";a();So();_();P();w();b();c6={Google:"https://www.google.com/search?q=",DuckDuckGo:"https://duckduckgo.com/",Brave:"https://search.brave.com/search?q=",Bing:"https://www.bing.com/search?q=",Yahoo:"https://search.yahoo.com/search?p=",Yandex:"https://yandex.com/search/?text=",GitHub:"https://github.com/search?q=",Reddit:"https://www.reddit.com/search?q=",Wikipedia:"https://wikipedia.org/w/index.php?search="},Ml=A({customEngineName:{description:"Name of the custom search engine",type:0,placeholder:"Google"},customEngineURL:{description:"The URL of your Engine",type:0,placeholder:"https://google.com/search?q="}});d6=(e,t)=>{let o=document.getSelection()?.toString();if(!o)return;let r=tt("search-google",e);if(r){let i=r.findIndex(s=>s?.props?.id==="search-google");i!==-1&&(r[i]=p6(o))}},Nm=h({name:"ReplaceGoogleSearch",description:"Replaces the Google search with different Engines",authors:[p.Moxxie,p.Ethan],settings:Ml,contextMenus:{message:d6}})});var fM=f(()=>{});function hM(e){return n("i",{className:g6.separator,"aria-hidden":!0,...e})}function h6({referencedMessage:e,baseMessage:t}){if(e.state!==0)return null;let o=e.message.timestamp,r=t.timestamp;return n(No,{className:"vc-reply-timestamp",compact:gM(o,r),timestamp:o,isInline:!1},n(hM,null,"["),gM(o,r)?f6(o,"LT"):m6(o),n(hM,null,"]"))}var m6,f6,gM,g6,Cm,yM=f(()=>{"use strict";a();fM();re();P();w();$();b();({calendarFormat:m6,dateFormat:f6,isSameDay:gM}=oo("millisecondsInUnit:",{calendarFormat:ae.byCode("sameElse"),dateFormat:ae.byCode('":'),isSameDay:ae.byCode("Math.abs(+")})),g6=C("separator","latin24CompactTimeStamp");Cm=h({name:"ReplyTimestamp",description:"Shows a timestamp on replied-message previews",authors:[p.Kyuuhachi],patches:[{find:".REPLY_QUOTE_MESSAGE_BLOCKED",replacement:{match:/(?<="aria-label":\i,children:\[)(?=\i,\i,\i\])/,replace:"$self.ReplyTimestamp(arguments[0]),"}}],ReplyTimestamp:k.wrap(h6,{noop:!0})})});var y6,v6,Rm,vM=f(()=>{"use strict";a();P();w();$();y6=C("spoilerContent"),v6=C("messagesWrapper"),Rm=h({name:"RevealAllSpoilers",description:"Reveal all spoilers in a message by Ctrl-clicking a spoiler, or in the chat with Ctrl+Shift-click",authors:[p.whqwert],patches:[{find:".removeObscurity,",replacement:{match:/(?<="removeObscurity",(\i)=>{)/,replace:(e,t)=>`$self.reveal(${t});`}}],reveal(e){let{ctrlKey:t,shiftKey:o,target:r}=e;if(!t)return;let{spoilerContent:i,hidden:s}=y6,{messagesWrapper:l}=v6,u=o?document.querySelector(`div.${l}`):r.parentElement;for(let c of u.querySelectorAll(`span.${i}.${s}`))c.click()}})});function SM(e,t){open(t+encodeURIComponent(e),"_blank")}function bM(e){return n(E.MenuItem,{label:"Search Image",key:"search-image",id:"search-image"},Object.keys(km).map((t,o)=>{let r="search-image-"+t;return n(E.MenuItem,{key:r,id:r,label:n(pe,{style:{alignItems:"center",gap:"0.5em"}},n("img",{style:{borderRadius:o>=3?"50%":void 0},"aria-hidden":"true",height:16,width:16,src:new URL("/favicon.ico",km[t]).toString().replace("lens.","")}),t),action:()=>SM(e,km[t])})}),n(E.MenuItem,{key:"search-image-all",id:"search-image-all",label:n(pe,{style:{alignItems:"center",gap:"0.5em"}},n(Hn,{height:16,width:16}),"All"),action:()=>Object.values(km).forEach(t=>SM(e,t))}))}var km,S6,b6,Dm,TM=f(()=>{"use strict";a();So();Rt();bt();P();w();b();km={Google:"https://lens.google.com/uploadbyurl?url=",Yandex:"https://yandex.com/images/search?rpt=imageview&url=",SauceNAO:"https://saucenao.com/search.php?url=",IQDB:"https://iqdb.org/?url=",TinEye:"https://www.tineye.com/search?url=",ImgOps:"https://imgops.com/start?url="};S6=(e,t)=>{if(t?.reverseImageSearchType!=="img")return;let o=t.itemHref??t.itemSrc;tt("copy-link",e)?.push(bM(o))},b6=(e,t)=>{if(!t?.src)return;(tt("copy-native-link",e)??e).push(bM(t.src))},Dm=h({name:"ReverseImageSearch",description:"Adds ImageSearch to image context menus",authors:[p.Ven,p.Nuckyz],tags:["ImageUtilities"],patches:[{find:".Messages.MESSAGE_ACTIONS_MENU_LABEL,shouldHideMediaOptions",replacement:{match:/favoriteableType:\i,(?<=(\i)\.getAttribute\("data-type"\).+?)/,replace:(e,t)=>`${e}reverseImageSearchType:${t}.getAttribute("data-role"),`}}],contextMenus:{message:S6,"image-context":b6}})});var wM=f(()=>{});async function l0(){Mt=await PM()??{}}async function PM(){return(await vt.get(xM))?.[L.getCurrentUser()?.id]}async function cr(){return(await PM())?.token}async function Al(e){return vt.update(xM,t=>(t??={},Mt=t[L.getCurrentUser().id]??={},e.token&&(Mt.token=e.token),e.user&&(Mt.user=e.user),t))}function Fs(e){ue(t=>n(T6,{...t,scopes:["identify"],responseType:"code",redirectUri:"https://manti.vendicated.dev/api/reviewdb/auth",permissions:0n,clientId:"915703782174752809",cancelCompletesFlow:!1,callback:async o=>{try{let r=new URL(o.location);r.searchParams.append("clientMod","vencord");let i=await fetch(r,{headers:{Accept:"application/json"}});if(!i.ok){let{message:l}=await i.json();it(l||"An error occured while authorizing",V.Type.FAILURE);return}let{token:s}=await i.json();Al({token:s}),it("Successfully logged in!",V.Type.SUCCESS),e?.()}catch(r){new Q("ReviewDB").error("Failed to authorize",r)}}}))}var xM,T6,Mt,ur=f(()=>{"use strict";a();Jn();ke();$e();$();b();xM="rdb-auth",{OAuth2AuthorizeModal:T6}=C("OAuth2AuthorizeModal"),Mt={}});var Nl=f(()=>{"use strict";a()});function IM(e,t){let o=L.getCurrentUser().id;return o===e||t.sender.discordID===o||Mt.user?.type===1}function MM(e,t){let o=L.getCurrentUser().id;return e===o&&t.sender.discordID!==o}function AM(e){return e.sender.discordID!==L.getCurrentUser().id}function lo(e,t=V.Type.MESSAGE){V.show({id:V.genId(),message:e,type:t,options:{position:V.Position.BOTTOM}})}var Nt,pr=f(()=>{"use strict";a();Ve();b();ur();Nl();Nt=Te("vc-rdb-")});function w6(e){return n(oe,{text:"Unblock user"},t=>n("div",{...t,role:"button",onClick:e.onClick,className:Nt("block-modal-unblock")},n("svg",{height:"20",viewBox:"0 -960 960 960",width:"20",fill:"var(--status-danger)"},n("path",{d:"M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q54 0 104-17.5t92-50.5L228-676q-33 42-50.5 92T160-480q0 134 93 227t227 93Zm252-124q33-42 50.5-92T800-480q0-134-93-227t-227-93q-54 0-104 17.5T284-732l448 448Z"}))))}function x6({user:e,isBusy:t,setIsBusy:o}){let[r,i]=K(!1);return r?null:n("div",{className:Nt("block-modal-row")},n("img",{src:e.profilePhoto,alt:""}),n(S.FormText,{className:Nt("block-modal-username")},e.username),n(w6,{onClick:t?void 0:async()=>{o(!0);try{await Em(e.discordID),i(!0)}finally{o(!1)}}}))}function P6(){let[e,t]=K(!1),[o,r,i]=st(NM,{onError:s=>new Q("ReviewDB").error("Failed to fetch blocks",s),fallbackValue:[]});return i?null:r?n(S.FormText,null,"Failed to fetch blocks: $",String(r)):o.length?n(d,null,o.map(s=>n(x6,{key:s.discordID,user:s,isBusy:e,setIsBusy:t}))):n(S.FormText,null,"No blocked users.")}function Lm(){ue(e=>n(fe,{...e},n(Ee,{className:Nt("block-modal-header")},n(S.FormTitle,{style:{margin:0}},"Blocked Users"),n(ut,{onClick:e.onClose})),n(we,{className:Nt("block-modal")},Mt.token?n(P6,null):n(S.FormText,null,"You are not logged into ReviewDB!"))))}var c0=f(()=>{"use strict";a();ke();$e();ft();b();ur();Us();pr()});var bn,Cl=f(()=>{"use strict";a();_();w();b();ur();c0();pr();bn=A({authorize:{type:6,description:"Authorize with ReviewDB",component:()=>n(T,{onClick:()=>Fs()},"Authorize with ReviewDB")},notifyReviews:{type:3,description:"Notify about new reviews on startup",default:!0},showWarning:{type:3,description:"Display warning to be respectful at the top of the reviews list",default:!0},hideTimestamps:{type:3,description:"Hide timestamps on reviews",default:!1},hideBlockedUsers:{type:3,description:"Hide reviews from blocked users",default:!0},buttons:{type:6,description:"ReviewDB buttons",component:()=>n("div",{className:Nt("button-grid")},n(T,{onClick:Lm},"Manage Blocked Users"),n(T,{color:T.Colors.GREEN,onClick:()=>{VencordNative.native.openExternal("https://github.com/sponsors/mantikafasi")}},"Support ReviewDB development"),n(T,{onClick:async()=>{let e="https://reviewdb.mantikafasi.dev",t=await cr();t&&(e+="/api/redirect?token="+encodeURIComponent(t)),VencordNative.native.openExternal(e)}},"ReviewDB website"),n(T,{onClick:()=>{VencordNative.native.openExternal("https://discord.gg/eWPBSbvznt")}},"ReviewDB Support Server"))}}).withPrivateSettings()});async function zi(e,t={}){return fetch(CM+e,{...t,headers:{...t.headers,Authorization:await cr()||""}})}async function RM(e,t=0){let o=0;bn.store.showWarning||(o|=M6);let r=new URLSearchParams({flags:String(o),offset:String(t)}),i=await fetch(`${CM}/users/${e}/reviews?${r}`),s=i.ok?await i.json():{message:i.status===429?"You are sending requests too fast. Wait a few seconds and try again.":"An Error occured while fetching reviews. Please try again later.",reviews:[],updated:!1,hasNextPage:!1,reviewCount:0};return i.ok?s:(lo(s.message,V.Type.FAILURE),{...s,reviews:[{id:0,comment:s.message,star:0,timestamp:0,type:3,sender:{id:0,username:"ReviewDB",profilePhoto:"https://cdn.discordapp.com/avatars/1134864775000629298/3f87ad315b32ee464d84f1270c8d1b37.png?size=256&format=webp&quality=lossless",discordID:"1134864775000629298",badges:[]}}]})}async function kM(e){return await cr()?await zi(`/users/${e.userid}/reviews`,{method:"PUT",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}).then(async o=>{let r=await o.json();return lo(r.message),o.ok?r:null}):(lo("Please authorize to add a review."),Fs(),null)}async function DM(e){return await zi(`/users/${e}/reviews`,{method:"DELETE",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({reviewid:e})}).then(async t=>{let o=await t.json();return lo(o.message),t.ok?o:null})}async function LM(e){let t=await zi("/reports",{method:"PUT",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({reviewid:e})}).then(o=>o.json());lo(t.message)}async function EM(e,t){if(!(await zi("/blocks",{method:"PATCH",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify({action:e,discordId:t})})).ok)lo(`Failed to ${e} user`,V.Type.FAILURE);else if(lo(`Successfully ${e}ed user`,V.Type.SUCCESS),Mt?.user?.blockedUsers){let r=e==="block"?[...Mt.user.blockedUsers,t]:Mt.user.blockedUsers.filter(i=>i!==t);Al({user:{...Mt.user,blockedUsers:r}})}}async function NM(){let e=await zi("/blocks",{method:"GET",headers:{Accept:"application/json"}});if(!e.ok)throw new Error(`${e.status}: ${e.statusText}`);return e.json()}function _M(e){return zi("/users",{method:"POST"}).then(t=>t.json())}async function BM(e){return zi(`/notifications?id=${e}`,{method:"PATCH"})}var CM,Om,M6,OM,Em,Us=f(()=>{"use strict";a();b();ur();Nl();Cl();pr();CM="https://manti.vendicated.dev/api/reviewdb",Om=50,M6=2;OM=e=>EM("block",e),Em=e=>EM("unblock",e)});function FM({onClick:e}){return n(oe,{text:"Delete Review"},t=>n("div",{...t,className:q(_m.button,_m.dangerous),onClick:e,role:"button"},n(Pi,{width:"20",height:"20"})))}function UM({onClick:e}){return n(oe,{text:"Report Review"},t=>n("div",{...t,className:_m.button,onClick:e,role:"button"},n("svg",{width:"20",height:"20",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M20,6.002H14V3.002C14,2.45 13.553,2.002 13,2.002H4C3.447,2.002 3,2.45 3,3.002V22.002H5V14.002H10.586L8.293,16.295C8.007,16.581 7.922,17.011 8.076,17.385C8.23,17.759 8.596,18.002 9,18.002H20C20.553,18.002 21,17.554 21,17.002V7.002C21,6.45 20.553,6.002 20,6.002Z"}))))}function $M({onClick:e,isBlocked:t}){return n(oe,{text:`${t?"Unblock":"Block"} user`},o=>n("div",{...o,className:_m.button,onClick:e,role:"button"},n("svg",{height:"20",viewBox:"0 -960 960 960",width:"20",fill:"currentColor"},t?n("path",{d:"M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"}):n("path",{d:"M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q54 0 104-17.5t92-50.5L228-676q-33 42-50.5 92T160-480q0 134 93 227t227 93Zm252-124q33-42 50.5-92T800-480q0-134-93-227t-227-93q-54 0-104 17.5T284-732l448 448Z"}))))}var _m,GM=f(()=>{"use strict";a();bt();be();$();b();_m=C("button","wrapper","disabled","separator")});function Bm(e){let t=e.redirectURL?ai:o=>n("span",{...o,role:"button"},o.children);return n(oe,{text:e.name},({onMouseEnter:o,onMouseLeave:r})=>n(t,{className:Nt("blocked-badge"),href:e.redirectURL,onClick:e.onClick},n("img",{className:Nt("badge"),width:"22px",height:"22px",onMouseEnter:o,onMouseLeave:r,src:e.icon,alt:e.description})))}var HM=f(()=>{"use strict";a();b();pr()});var Fm,u0=f(()=>{"use strict";a();pt();be();ft();$();b();ur();Nl();Us();Cl();pr();c0();GM();HM();Fm=Dt(()=>{let e=ae.byProps,[{cozyMessage:t,buttons:o,message:r,buttonsInner:i,groupStart:s},{container:l,isHeader:u},{avatar:c,clickable:m,username:g,wrapper:y,cozy:v},M,x]=Tr(e("cozyMessage"),e("container","isHeader"),e("avatar","zalgo"),e("button","wrapper","selected"),e("botTagRegular")),N=new Intl.DateTimeFormat;return function({review:R,refetch:D,profileId:B}){let[z,Y]=K(!1);function ee(){Ho(R.sender.discordID)}function J(){rt.show({title:"Are you sure?",body:"Do you really want to delete this review?",confirmText:"Delete",cancelText:"Nevermind",onConfirm:async()=>{if(await cr())DM(R.id).then(Ne=>{Ne&&D()});else return lo("You must be logged in to delete reviews.")}})}function U(){rt.show({title:"Are you sure?",body:"Do you really you want to report this review?",confirmText:"Report",cancelText:"Nevermind",onConfirm:async()=>{if(await cr())LM(R.id);else return lo("You must be logged in to report reviews.")}})}let ne=Mt?.user?.blockedUsers?.includes(R.sender.discordID)??!1;function ie(){if(ne)return Em(R.sender.discordID);rt.show({title:"Are you sure?",body:"Do you really you want to block this user? They will be unable to leave further reviews on your profile. You can unblock users in the plugin settings.",confirmText:"Block",cancelText:"Nevermind",onConfirm:async()=>{if(await cr())OM(R.sender.discordID);else return lo("You must be logged in to block users.")}})}return n("div",{className:q(Nt("review"),t,y,r,s,v),style:{marginLeft:"0px",paddingLeft:"52px"}},n("img",{className:q(c,m),onClick:ee,src:R.sender.profilePhoto||"/assets/1f0bfc0865d324c2587920a7d80c609b.png?size=128",style:{left:"0px",zIndex:0}}),n("div",{style:{display:"inline-flex",justifyContent:"center",alignItems:"center"}},n("span",{className:q(m,g),style:{color:"var(--channels-default)",fontSize:"14px"},onClick:()=>ee()},R.sender.username),R.type===3&&n("span",{className:q(x.botTagVerified,x.botTagRegular,x.px,x.rem),style:{marginLeft:"4px"}},n("span",{className:x.botText},"System"))),ne&&n(Bm,{name:"You have blocked this user",description:"You have blocked this user",icon:"/assets/aaee57e0090991557b66.svg",type:0,onClick:()=>Lm()}),R.sender.badges.map(Ne=>n(Bm,{...Ne})),!bn.store.hideTimestamps&&R.type!==3&&n(No,{timestamp:new Date(R.timestamp*1e3)},N.format(R.timestamp*1e3)),n("div",{className:Nt("review-comment")},R.comment.length>200&&!z?[Pe.parseGuildEventDescription(R.comment.substring(0,200)),"...",n("br",null),n("a",{onClick:()=>Y(!0)},"Read more")]:Pe.parseGuildEventDescription(R.comment)),R.id!==0&&n("div",{className:q(l,u,o),style:{padding:"0px"}},n("div",{className:q(M.wrapper,i)},AM(R)&&n(UM,{onClick:U}),MM(B,R)&&n($M,{isBlocked:ne,onClick:ie}),IM(B,R)&&n(FM,{onClick:J}))))}})});function Rl({discordId:e,name:t,onFetchReviews:o,refetchSignal:r,scrollToTop:i,page:s=1,showInput:l=!1,hideOwnReview:u=!1}){let[c,m]=Jo(!0),[g]=st(()=>RM(e,(s-1)*Om),{fallbackValue:null,deps:[r,c,s],onSuccess:y=>{bn.store.hideBlockedUsers&&(y.reviews=y.reviews?.filter(v=>!Le.isBlocked(v.sender.discordID))),i?.(),o(y)}});return g?n(d,null,n(k6,{refetch:m,reviews:g.reviews,hideOwnReview:u,profileId:e}),l&&n(p0,{name:t,discordId:e,refetch:m,isAuthor:g.reviews?.some(y=>y.sender.discordID===L.getCurrentUser().id)})):null}function k6({refetch:e,reviews:t,hideOwnReview:o,profileId:r}){let i=L.getCurrentUser().id;return n("div",{className:Nt("view")},t?.map(s=>(s.sender.discordID!==i||!o)&&n(Fm,{key:s.id,review:s,refetch:e,profileId:r})),t?.length===0&&n(S.FormText,{className:Nt("placeholder")},"Looks like nobody reviewed this user yet. You could be the first!"))}function p0({discordId:e,isAuthor:t,refetch:o,name:r,modalKey:i}){let{token:s}=Mt,l=xt(null),u=N6.FORM;u.disableAutoFocus=!0;let c=R6({id:"0",type:1});return n(d,null,n("div",{onClick:()=>{s||(lo("Opening authorization window..."),Fs())}},n(C6,{className:Nt("input"),channel:c,placeholder:s?t?`Update review for @${r}`:`Review @${r}`:"You need to authorize to review users!",type:u,disableThemedBackground:!0,setEditorRef:m=>l.current=m,parentModalKey:i,textValue:"",onSubmit:async m=>{if(await kM({userid:e,comment:m.value})){o();let y=l.current.ref.current.getSlateEditor();A6.delete(y,{at:{anchor:zM.start(y,[]),focus:zM.end(y,[])}})}return{shouldClear:!1,shouldRefocus:!0}}})))}var A6,zM,N6,C6,R6,d0=f(()=>{"use strict";a();ft();$();b();ur();Us();Cl();pr();u0();A6=C("insertNodes","textToText"),zM=C("start","end","toSlateRange"),N6=C("FORM"),C6=ve("disableThemedBackground","CHANNEL_TEXT_AREA"),R6=ye(".GUILD_TEXT])","fromServer)")});function D6({modalProps:e,modalKey:t,discordId:o,name:r}){let[i,s]=K(),[l,u]=Jo(!0),[c,m]=K(1),g=xt(null),y=i?.reviewCount,v=i?.reviews.find(M=>M.sender.discordID===Mt.user?.discordID);return n(k,null,n(fe,{...e,size:"medium"},n(Ee,null,n(Z,{variant:"heading-lg/semibold",className:Nt("modal-header")},r,"'s Reviews",!!y&&n("span",null," (",y," Reviews)")),n(ut,{onClick:e.onClose})),n(we,{scrollerRef:g},n("div",{className:Nt("modal-reviews")},n(Rl,{discordId:o,name:r,page:c,refetchSignal:l,onFetchReviews:s,scrollToTop:()=>g.current?.scrollTo({top:0,behavior:"smooth"}),hideOwnReview:!0}))),n(ct,{className:Nt("modal-footer")},n("div",null,v&&n(Fm,{refetch:u,review:v,profileId:o}),n(p0,{isAuthor:v!=null,discordId:o,name:r,refetch:u,modalKey:t}),!!y&&n(pc,{currentPage:c,maxVisiblePages:5,pageSize:Om,totalCount:y,onPageChange:m})))))}function kl(e,t){let o="vc-rdb-modal-"+Date.now();ue(r=>n(D6,{modalKey:o,modalProps:r,discordId:e,name:t}),{modalKey:o})}var jM=f(()=>{"use strict";a();re();$e();ft();b();ur();Us();pr();u0();d0()});var she,Dl,WM,m0,Um,qM=f(()=>{"use strict";a();wM();re();Mc();bt();P();be();w();$();b();ur();jM();d0();Nl();Us();Cl();pr();she=C("container","scroller","list"),Dl=C("button","buttonInner","icon","text"),WM=(e,{guild:t})=>{!t||e.push(n(E.MenuItem,{label:"View Reviews",id:"vc-rdb-server-reviews",icon:Hn,action:()=>kl(t.id,t.name)}))},m0=(e,{user:t})=>{!t||e.push(n(E.MenuItem,{label:"View Reviews",id:"vc-rdb-user-reviews",icon:Hn,action:()=>kl(t.id,t.username)}))},Um=h({name:"ReviewDB",description:"Review other users (Adds a new settings to profiles)",authors:[p.mantikafasi,p.Ven],settings:bn,contextMenus:{"guild-header-popout":WM,"guild-context":WM,"user-context":m0,"user-profile-actions":m0,"user-profile-overflow-menu":m0},patches:[{find:"showBorder:null",replacement:{match:/user:(\i),setNote:\i,canDM.+?\}\)/,replace:"$&,$self.getReviewsComponent($1)"}},{find:".BITE_SIZE,user:",replacement:{match:/(?<=\.BITE_SIZE,children:\[)\(0,\i\.jsx\)\(\i\.\i,\{user:(\i),/,replace:"$self.BiteSizeReviewsButton({user:$1}),$&"}}],flux:{CONNECTION_OPEN:l0},async start(){let e=bn.store,{lastReviewId:t,notifyReviews:o}=e;await l0(),setTimeout(async()=>{if(!Mt.token)return;let r=await _M(Mt.token);if(Al({user:r}),o&&t&&t<r.lastReviewID&&(e.lastReviewId=r.lastReviewID,r.lastReviewID!==0&&lo("You have new reviews on your profile!")),r.notification){let i=r.notification.type===1?{cancelText:"Appeal",confirmText:"Ok",onCancel:async()=>VencordNative.native.openExternal("https://reviewdb.mantikafasi.dev/api/redirect?"+new URLSearchParams({token:Mt.token,page:"dashboard/appeal"}))}:{};rt.show({title:r.notification.title,body:Pe.parse(r.notification.content,!1),...i}),BM(r.notification.id)}},4e3)},getReviewsComponent:k.wrap(e=>{let[t,o]=K();return n(wa,{headerText:"User Reviews",onMoreClick:()=>kl(e.id,e.username),moreTooltipText:t&&t>50?`View all ${t} reviews`:"Open Review Modal",onDropDownClick:r=>bn.store.reviewsDropdownState=!r,defaultState:bn.store.reviewsDropdownState},n(Rl,{discordId:e.id,name:e.username,onFetchReviews:r=>o(r.reviewCount),showInput:!0}))},{message:"Failed to render Reviews"}),BiteSizeReviewsButton:k.wrap(({user:e})=>n(xr,{text:"View Reviews"},n(T,{onClick:()=>kl(e.id,e.username),look:T.Looks.FILLED,size:T.Sizes.NONE,color:Dl.color,className:q(Dl.button,Dl.banner),innerClassName:q(Dl.buttonInner,Dl.banner)},n(Fg,{height:16,width:16}))),{noop:!0})})});var ji,$m,KM=f(()=>{"use strict";a();_();re();P();w();b();ji=A({chatMentions:{type:3,default:!0,description:"Show role colors in chat mentions (including in the message box)",restartNeeded:!0},memberList:{type:3,default:!0,description:"Show role colors in member list role headers",restartNeeded:!0},voiceUsers:{type:3,default:!0,description:"Show role colors in the voice chat user list",restartNeeded:!0},reactorsList:{type:3,default:!0,description:"Show role colors in the reactors list",restartNeeded:!0}}),$m=h({name:"RoleColorEverywhere",authors:[p.KingFish,p.lewisakura,p.AutumnVN],description:"Adds the top role color anywhere possible",patches:[{find:'location:"UserMention',replacement:[{match:/user:(\i),channel:(\i).{0,400}?"@"\.concat\(.+?\)/,replace:"$&,color:$self.getUserColor($1?.id,{channelId:$2?.id})"}],predicate:()=>ji.store.chatMentions},{find:".userTooltip,children",replacement:[{match:/let\{id:(\i),guildId:(\i)[^}]*\}.*?\.\i,{(?=children)/,replace:"$&color:$self.getUserColor($1,{guildId:$2}),"}],predicate:()=>ji.store.chatMentions},{find:'tutorialId:"whos-online',replacement:[{match:/null,\i," — ",\i\]/,replace:"null,$self.roleGroupColor(arguments[0])]"}],predicate:()=>ji.store.memberList},{find:".Messages.THREAD_BROWSER_PRIVATE",replacement:[{match:/children:\[\i," — ",\i\]/,replace:"children:[$self.roleGroupColor(arguments[0])]"}],predicate:()=>ji.store.memberList},{find:"renderPrioritySpeaker",replacement:[{match:/renderName\(\){.+?usernameSpeaking\]:.+?(?=children)/,replace:"$&...$self.getVoiceProps(this.props),"}],predicate:()=>ji.store.voiceUsers},{find:".reactorDefault",replacement:{match:/,onContextMenu:e=>.{0,15}\((\i),(\i),(\i)\).{0,250}tag:"strong"/,replace:"$&,style:{color:$self.getColor($2?.id,$1)}"},predicate:()=>ji.store.reactorsList}],settings:ji,getColor(e,{channelId:t,guildId:o}){return(o??=te.getChannel(t)?.guild_id)?Be.getMember(o,e)?.colorString??null:null},getUserColor(e,t){let o=this.getColor(e,t);return o&&parseInt(o.slice(1),16)},roleGroupColor:k.wrap(({id:e,count:t,title:o,guildId:r,label:i})=>{let s=se.getRole(r,e);return n("span",{style:{color:s?.colorString,fontWeight:"unset",letterSpacing:".05em"}},o??i," \u2014 ",t)},{noop:!0}),getVoiceProps({user:{id:e},guildId:t}){return{style:{color:this.getColor(e,{guildId:t})}}}})});var YM,L6,Gm,ZM=f(()=>{"use strict";a();So();bt();P();w();$();b();YM=ye(".TEXTAREA_FOCUS)","showMentionToggle:"),L6=(e,{message:t})=>{if(xe.getChannelId()!==t.channel_id)return;let o=te.getChannel(t?.channel_id);if(!o||o.guild_id&&!We.can(Ie.SEND_MESSAGES,o))return;let r=tt("pin",e);if(r&&!r.some(s=>s?.props?.id==="reply")){let s=r.findIndex(l=>l?.props.id==="pin");r.splice(s+1,0,n(E.MenuItem,{id:"reply",label:Se.Messages.MESSAGE_ACTION_REPLY,icon:Cc,action:l=>YM(o,t,l)}));return}let i=tt("mark-unread",e);if(i&&!i.some(s=>s?.props?.id==="reply")){i.unshift(n(E.MenuItem,{id:"reply",label:Se.Messages.MESSAGE_ACTION_REPLY,icon:Cc,action:s=>YM(o,t,s)}));return}},Gm=h({name:"SearchReply",description:"Adds a reply button to search results",authors:[p.Aria],contextMenus:{message:L6}})});var Hm,XM=f(()=>{"use strict";a();P();w();Hm=h({name:"SecretRingToneEnabler",description:"Always play the secret version of the discord ringtone (except during special ringtone events)",authors:[p.AndrewDLO,p.FieryFlames],patches:[{find:'"call_ringing_beat"',replacement:{match:/500!==\i\(\)\.random\(1,1e3\)/,replace:"false"}}]})});var E6,O6,JM,zm,QM=f(()=>{"use strict";a();Jn();_();P();w();$();b();E6=C("allSummaries","findSummary"),O6=ye(".people)),startId:",".type}"),JM=A({summaryExpiryThresholdDays:{type:5,description:"The time in days before a summary is removed. Note that only up to 50 summaries are kept per channel",markers:[1,3,5,7,10,15,20,25,30],stickToMarkers:!1,default:3}}),zm=h({name:"Summaries",description:"Enables Discord's experimental Summaries feature on every server, displaying AI generated summaries of conversations",authors:[p.mantikafasi],settings:JM,patches:[{find:"SUMMARIZEABLE.has",replacement:{match:/\i\.hasFeature\(\i\.\i\.SUMMARIES_ENABLED\w+?\)/g,replace:"true"}},{find:"RECEIVE_CHANNEL_SUMMARY(",replacement:{match:/shouldFetch\((\i),\i\){/,replace:"$& if(!$self.shouldFetch($1)) return false;"}}],flux:{CONVERSATION_SUMMARY_UPDATE(e){let t=e.summaries.map(o=>({...O6(o),time:Date.now()}));vt.update("summaries-data",o=>(o??={},o[e.channel_id]?o[e.channel_id].unshift(...t):o[e.channel_id]=t,o[e.channel_id].length>50&&(o[e.channel_id]=o[e.channel_id].slice(0,50)),o))}},async start(){await vt.update("summaries-data",e=>{e??={};for(let t of Object.keys(e)){for(let o=e[t].length-1;o>=0;o--)e[t][o].time<Date.now()-1e3*60*60*24*JM.store.summaryExpiryThresholdDays&&e[t].splice(o,1);e[t].length===0&&delete e[t]}return Object.assign(E6.allSummaries(),e),e})},shouldFetch(e){let t=te.getChannel(e);return se.getGuild(t.guild_id).hasFeature("SUMMARIES_ENABLED_GA")}})});var VM=f(()=>{});function tA(e){let t=e.slice(1,-1).replace(/(\d)(AM|PM)$/i,"$1 $2"),o=new Date(`${new Date().toDateString()} ${t}`).getTime()/1e3;return isNaN(o)?e:(Date.now()/1e3>o&&(o+=86400),`<t:${Math.round(o)}:t>`)}function B6({rootProps:e,close:t}){let[o,r]=K(),[i,s]=K(""),l=Math.round((new Date(o).getTime()||Date.now())/1e3),u=(g,y)=>`<t:${g}${y&&`:${y}`}>`,[c,m]=wt(()=>{let g=u(l,i);return[g,Pe.parse(g)]},[l,i]);return n(fe,{...e},n(Ee,{className:jm("modal-header")},n(S.FormTitle,{tag:"h2"},"Timestamp Picker"),n(ut,{onClick:t})),n(we,{className:jm("modal-content")},n("input",{type:"datetime-local",value:o,onChange:g=>r(g.currentTarget.value),style:{colorScheme:is()===2?"light":"dark"}}),n(S.FormTitle,null,"Timestamp Format"),n(Fo,{options:_6.map(g=>({label:g,value:g})),isSelected:g=>g===i,select:g=>s(g),serialize:g=>g,renderOptionLabel:g=>n("div",{className:jm("format-label")},Pe.parse(u(l,g.value))),renderOptionValue:()=>m}),n(S.FormTitle,{className:G.bottom8},"Preview"),n(S.FormText,{className:jm("preview-text")},m," (",c,")")),n(ct,null,n(T,{onClick:()=>{$n(c+" "),t()}},"Insert")))}var eA,_6,jm,F6,Wm,oA=f(()=>{"use strict";a();VM();or();Rn();_();Ve();P();pt();Ze();$e();w();b();eA=A({replaceMessageContents:{description:"Replace timestamps in message contents",type:3,default:!0}});_6=["","t","T","d","D","f","F","R"],jm=Te("vc-st-");F6=({isMainChat:e})=>e?n(qo,{tooltip:"Insert Timestamp",onClick:()=>{let t=ue(o=>n(B6,{rootProps:o,close:()=>Un(t)}))},buttonProps:{"aria-haspopup":"dialog"}},n("svg",{"aria-hidden":"true",role:"img",width:"24",height:"24",viewBox:"0 0 24 24",style:{scale:"1.2"}},n("g",{fill:"none","fill-rule":"evenodd"},n("path",{fill:"currentColor",d:"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7v-5z"}),n("rect",{width:"24",height:"24"})))):null,Wm=h({name:"SendTimestamps",description:"Send timestamps easily via chat box button & text shortcuts. Read the extended description!",authors:[p.Ven,p.Tyler,p.Grzesiek11],dependencies:["MessageEventsAPI","ChatInputButtonAPI"],settings:eA,start(){Wo("SendTimestamps",F6),this.listener=bo((e,t)=>{eA.store.replaceMessageContents&&(t.content=t.content.replace(/`\d{1,2}:\d{2} ?(?:AM|PM)?`/gi,tA))})},stop(){Sn("SendTimestamps"),To(this.listener)},settingsAboutComponent(){let e=["12:00","3:51","17:59","24:00","12:00 AM","0:13PM"].map(t=>`\`${t}\``);return n(d,null,n(S.FormText,null,"To quickly send send time only timestamps, include timestamps formatted as `HH:MM` (including the backticks!) in your message"),n(S.FormText,null,"See below for examples. If you need anything more specific, use the Date button in the chat bar!"),n(S.FormText,null,"Examples:",n("ul",null,e.map(t=>n("li",{key:t},n("code",null,t)," ","->"," ",Pe.parse(tA(t)))))))}})});var nA=f(()=>{});function sA(e){ue(t=>n(fe,{...t,size:"medium"},n($6,{guild:e})))}function iA(e){return n(No,{timestamp:new Date(e)})}function $6({guild:e}){let[t,o]=K(),[r,i]=K();ce(()=>{qm.friends=!1,qm.blocked=!1},[]);let[s,l]=K(0),u=e.banner&&Ct.getGuildBannerURL(e,!0).replace(/\?size=\d+$/,"?size=1024"),c=e.icon&&Ct.getGuildIconURL({id:e.id,icon:e.icon,canAnimate:!0,size:512});return n("div",{className:Bo("root")},u&&s===0&&n("img",{className:Bo("banner"),src:u,alt:"",onClick:()=>Go(u)}),n("div",{className:Bo("header")},c?n("img",{src:c,alt:"",onClick:()=>Go(c)}):n("div",{"aria-hidden":!0,className:q(rA.childWrapper,rA.acronym)},e.acronym),n("div",{className:Bo("name-and-description")},n(S.FormTitle,{tag:"h5",className:Bo("name")},e.name),e.description&&n(S.FormText,null,e.description))),n(rn,{type:"top",look:"brand",className:Bo("tab-bar"),selectedItem:s,onItemSelect:l},n(rn.Item,{className:Bo("tab",{selected:s===0}),id:0},"Server Info"),n(rn.Item,{className:Bo("tab",{selected:s===1}),id:1},"Friends",t!==void 0?` (${t})`:""),n(rn.Item,{className:Bo("tab",{selected:s===2}),id:2},"Blocked Users",r!==void 0?` (${r})`:"")),n("div",{className:Bo("tab-content")},s===0&&n(H6,{guild:e}),s===1&&n(z6,{guild:e,setCount:o}),s===2&&n(j6,{guild:e,setCount:i})))}function G6(e,t){let o=Be.getMember(e,t.id)?.avatar,r=o?Ct.getGuildMemberAvatarURLSimple({userId:t.id,avatar:o,guildId:e,canAnimate:!0}):Ct.getUserAvatarURL(t,!0);return n("div",{className:Bo("owner")},n("img",{src:r,alt:"",onClick:()=>Go(r)}),Pe.parse(`<@${t.id}>`))}function H6({guild:e}){let[t]=st(()=>no.getUser(e.ownerId),{deps:[e.ownerId],fallbackValue:null}),o={"Server Owner":t?G6(e.id,t):"Loading...","Created At":iA(uo.extractTimestamp(e.id)),"Joined At":e.joinedAt?iA(e.joinedAt.getTime()):"-","Vanity Link":e.vanityURLCode?n("a",null,`discord.gg/${e.vanityURLCode}`):"-","Preferred Locale":e.preferredLocale||"-","Verification Level":["None","Low","Medium","High","Highest"][e.verificationLevel]||"?","Nitro Boosts":`${e.premiumSubscriberCount??0} (Level ${e.premiumTier??0})`,Channels:_n.getChannels(e.id)?.count-1||"?",Roles:Object.keys(se.getRoles(e.id)).length-1};return n("div",{className:Bo("info")},Object.entries(o).map(([r,i])=>n("div",{className:Bo("server-info-pair"),key:r},n(S.FormTitle,{tag:"h5"},r),typeof i=="string"?n("span",null,i):i)))}function z6({guild:e,setCount:t}){return aA("friends",e,Le.getFriendIDs(),t)}function j6({guild:e,setCount:t}){let o=Object.keys(Le.getRelationships()).filter(r=>Le.isBlocked(r));return aA("blocked",e,o,t)}function aA(e,t,o,r){let i=[],s=[];for(let l of o)Be.isMember(t.id,l)?s.push(l):i.push(l);return Fe([Be],()=>Be.getMemberIds(t.id),null,(l,u)=>l.length===u.length),ce(()=>{!qm[e]&&i.length&&(qm[e]=!0,F.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[t.id],userIds:i}))},[]),ce(()=>r(s.length),[s.length]),n(Zi,{fade:!0,className:Bo("scroller")},s.map(l=>n(U6,{user:L.getUser(l),status:In.getStatus(l)||"offline",onSelect:()=>Ho(l),onContextMenu:()=>{}})))}var rA,U6,Bo,qm,lA=f(()=>{"use strict";a();nA();Ve();pt();be();$e();ft();$();b();rA=C("icon","acronym","childWrapper"),U6=ve(".listName,discriminatorClass"),Bo=Te("vc-gp-");qm={friends:!1,blocked:!1}});var cA,Km,uA=f(()=>{"use strict";a();So();_();P();w();b();lA();cA=(e,{guild:t})=>{tt("privacy",e)?.push(n(E.MenuItem,{id:"vc-server-info",label:"Server Info",action:()=>sA(t)}))};gn("ServerInfo","ServerProfile");Km=h({name:"ServerInfo",description:"Allows you to view info about a server",authors:[p.Ven,p.Nuckyz],tags:["guild","info","ServerProfile"],contextMenus:{"guild-context":cA,"guild-header-popout":cA}})});function W6(){return mA=Jo(),n("span",{id:"vc-friendcount",style:{display:"inline-block",width:"100%",fontSize:"12px",fontWeight:"600",color:"var(--header-secondary)",textTransform:"uppercase",textAlign:"center"}},g0," online")}function q6(){return fA=Jo(),n("span",{id:"vc-guildcount",style:{display:"inline-block",width:"100%",fontSize:"12px",fontWeight:"600",color:"var(--header-secondary)",textTransform:"uppercase",textAlign:"center"}},dA," servers")}function pA(){g0=0;let e=Le.getRelationships();for(let t of Object.keys(e))e[t]===1&&In.getStatus(t)!=="offline"&&(g0+=1);mA?.()}function f0(){dA=se.getGuildCount(),fA?.()}var g0,dA,mA,fA,Ym,gA=f(()=>{"use strict";a();wm();_();re();P();ft();w();b();g0=0,dA=0;Ym=h({name:"ServerListIndicators",description:"Add online friend count or server count in the server list",authors:[p.dzshn],dependencies:["ServerListAPI"],options:{mode:{description:"mode",type:4,options:[{label:"Only online friend count",value:2,default:!0},{label:"Only server count",value:1},{label:"Both server and online friend counts",value:3}]}},renderIndicator:()=>{let{mode:e}=j.plugins.ServerListIndicators;return n(k,{noop:!0},n("div",{style:{marginBottom:"4px"}},!!(e&2)&&n(W6,null),!!(e&1)&&n(q6,null)))},flux:{PRESENCE_UPDATES:pA,GUILD_CREATE:f0,GUILD_DELETE:f0},start(){xl(0,this.renderIndicator),pA(),f0()},stop(){Pl(0,this.renderIndicator)}})});var hA=f(()=>{});var yA,vA=f(()=>{a();yA=`/* eslint-disable simple-header/header */
|
|
import React from "react";
|
|
|
|
const handleClick = async () =>
|
|
console.log((await import("@webpack/common")).Clipboard.copy("\\u200b"));
|
|
|
|
export const Example: React.FC<{
|
|
real: boolean,
|
|
shigged?: number,
|
|
}> = ({ real, shigged }) => <>
|
|
<p>{\`Shigg\${real ? \`ies\${shigged === 0x1B ? "t" : ""}\` : "y"}\`}</p>
|
|
<button onClick={handleClick}>Click Me</button>
|
|
</>;`});var bA=oi((L1e,h0)=>{"use strict";a();var K6=Object.prototype.hasOwnProperty,Po="~";function Ll(){}Object.create&&(Ll.prototype=Object.create(null),new Ll().__proto__||(Po=!1));function Y6(e,t,o){this.fn=e,this.context=t,this.once=o||!1}function SA(e,t,o,r,i){if(typeof o!="function")throw new TypeError("The listener must be a function");var s=new Y6(o,r||e,i),l=Po?Po+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function Zm(e,t){--e._eventsCount===0?e._events=new Ll:delete e._events[t]}function co(){this._events=new Ll,this._eventsCount=0}co.prototype.eventNames=function(){var t=[],o,r;if(this._eventsCount===0)return t;for(r in o=this._events)K6.call(o,r)&&t.push(Po?r.slice(1):r);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(o)):t};co.prototype.listeners=function(t){var o=Po?Po+t:t,r=this._events[o];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,l=new Array(s);i<s;i++)l[i]=r[i].fn;return l};co.prototype.listenerCount=function(t){var o=Po?Po+t:t,r=this._events[o];return r?r.fn?1:r.length:0};co.prototype.emit=function(t,o,r,i,s,l){var u=Po?Po+t:t;if(!this._events[u])return!1;var c=this._events[u],m=arguments.length,g,y;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),m){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,o),!0;case 3:return c.fn.call(c.context,o,r),!0;case 4:return c.fn.call(c.context,o,r,i),!0;case 5:return c.fn.call(c.context,o,r,i,s),!0;case 6:return c.fn.call(c.context,o,r,i,s,l),!0}for(y=1,g=new Array(m-1);y<m;y++)g[y-1]=arguments[y];c.fn.apply(c.context,g)}else{var v=c.length,M;for(y=0;y<v;y++)switch(c[y].once&&this.removeListener(t,c[y].fn,void 0,!0),m){case 1:c[y].fn.call(c[y].context);break;case 2:c[y].fn.call(c[y].context,o);break;case 3:c[y].fn.call(c[y].context,o,r);break;case 4:c[y].fn.call(c[y].context,o,r,i);break;default:if(!g)for(M=1,g=new Array(m-1);M<m;M++)g[M-1]=arguments[M];c[y].fn.apply(c[y].context,g)}}return!0};co.prototype.on=function(t,o,r){return SA(this,t,o,r,!1)};co.prototype.once=function(t,o,r){return SA(this,t,o,r,!0)};co.prototype.removeListener=function(t,o,r,i){var s=Po?Po+t:t;if(!this._events[s])return this;if(!o)return Zm(this,s),this;var l=this._events[s];if(l.fn)l.fn===o&&(!i||l.once)&&(!r||l.context===r)&&Zm(this,s);else{for(var u=0,c=[],m=l.length;u<m;u++)(l[u].fn!==o||i&&!l[u].once||r&&l[u].context!==r)&&c.push(l[u]);c.length?this._events[s]=c.length===1?c[0]:c:Zm(this,s)}return this};co.prototype.removeAllListeners=function(t){var o;return t?(o=Po?Po+t:t,this._events[o]&&Zm(this,o)):(this._events=new Ll,this._eventsCount=0),this};co.prototype.off=co.prototype.removeListener;co.prototype.addListener=co.prototype.on;co.prefixed=Po;co.EventEmitter=co;typeof h0<"u"&&(h0.exports=co)});var b0=oi($s=>{"use strict";a();Object.defineProperty($s,"__esModule",{value:!0});$s.Channel=$s.ChannelPort=void 0;var Z6=bA(),Xm="vapIpc",y0=Symbol.for("vapIpc.edgeCreate"),v0=class{_pipes=new Map;_listeners=new Map;_createListenerMap(){return new Map}_emit(t,o,...r){for(let[i,s]of this._listeners.entries()){if(i===t)continue;let l=s.get(o);l&&l(...r)}}createPipe(t){let o=this.getPipe(t);if(o)return o;let r=this._createListenerMap();this._listeners.set(t,r);let i={emit:this._emit.bind(this,t),listen:(s,l)=>void r.set(s,l)};return this._pipes.set(t,i),i}getPipe(t){return this._pipes.get(t)??null}};$s.ChannelPort=v0;var S0=class{id;_edges=new Map;_callbacks=new Map;_callers=new Map;_edgePipes=new Map;_pipes=[];_emitter=new Z6.EventEmitter;_logger;_destroyed=!1;constructor(t){this.id=t}addPipe(t){t.listen(`${Xm}:handshake`,o=>{this._handleHandshake(t,o)}),t.listen(`${Xm}:message`,o=>{this._handleMessage(t,o)}),this._pipes.push(t),this._logger?.log(`Adding pipe to channel "${this.id}"`)}setLogger(t){this._logger=t}_handleHandshake(t,o){if(this.id===o.id)return;this._logger?.log(`\u{1F91D} "${o.id}" -> "${this.id}" (edges: [${o.channelIds.join(", ")}])`);let r=this._edges.get(o.id);if(r){let i=o.channelIds.filter(s=>!r?.channelIds.includes(s));if(i.includes(this.id)&&i.splice(i.indexOf(this.id),1),!i.length)return;this._edges.set(o.id,{...o,channelIds:[...r.channelIds,...i]})}else{let i=[...o.channelIds].filter(s=>s!==this.id);this._edges.set(o.id,{...o,channelIds:i}),this._edgePipes.set(o.id,t)}this._emitter.emit(y0,o),this.handshakeAll()}_handleMessage(t,o){if(o.proxiedBy===this.id)return;if(o.destination!==this.id)return this._emitMessage({...o,proxiedBy:this.id});if(!o.nonce)return void this._emitter.emit(o.name,o.data);let r=this._callbacks.get(o.nonce);if(r)return void r(o.data);let i=this._callers.get(o.name);if(i){i(o.data).catch(s=>(console.error(s),new Error(s?.message??`${s}`))).then(s=>{this._emitMessage({name:o.name,source:this.id,destination:o.source,data:s,nonce:o.nonce})});return}}_emitHandshake(t){let o=this.getEdge();t.emit(`${Xm}:handshake`,o)}_emitMessage(t){let o=this.findEdgeId(t.destination);if(!o)return;this._edgePipes.get(o)?.emit(`${Xm}:message`,t)}getEdge(){let t=[...this._edges.keys(),...[...this._edges.values()].map(o=>o.channelIds).flat()].filter((o,r,i)=>i.indexOf(o)===r);return{id:this.id,channelIds:t}}findEdgeId(t){for(let o of this._edges.values())if(o.id===t||o.channelIds.includes(t))return o.id;return null}waitForEdge(t){let o=this.findEdgeId(t);return o?Promise.resolve(o):new Promise(r=>{let i=s=>{(s.id===t||s.channelIds.includes(t))&&(this._emitter.off(y0,i),r(s.id))};this._emitter.on(y0,i)})}createNonce(){return Math.random().toString(16).slice(2)}send(t){this._emitMessage({...t,source:this.id})}call(t,o={timeout:1e4}){let r=this.createNonce(),i=new Promise((s,l)=>{let u=setTimeout(()=>{this._callbacks.delete(r),l(new Error("Call timed out"))},o.timeout);this._callbacks.set(r,c=>{this._callbacks.delete(r),clearTimeout(u),o.signal?.aborted?o.signal.reason instanceof Error&&l(o.signal.reason):c instanceof Error?l(c):s(c)})});return this._emitMessage({...t,source:this.id,nonce:r}),i}on(t,o){return this._emitter.on(t,o),this}off(t,o){return this._emitter.off(t,o),this}once(t,o){this._emitter.once(t,o)}onCall(t,o){this._callers.set(t,async(...r)=>await o(...r))}removeCaller(){}handshakeAll(){this._pipes.forEach(t=>this._emitHandshake(t))}destroy(){this._emitter.removeAllListeners(),this._callbacks.clear(),this._callers.clear(),this._edgePipes.clear(),this._pipes=[],this._destroyed=!0}};$s.Channel=S0});var x0=oi(Gs=>{"use strict";a();Object.defineProperty(Gs,"__esModule",{value:!0});Gs.RemoteClient=Gs.RemoteHost=void 0;var T0=class{channel;constructor(t,o){this.channel=t;for(let[r,i]of Object.entries(o))t.onCall(r,async s=>await i(...s));t.handshakeAll()}};Gs.RemoteHost=T0;var w0=class{hostName;channel;constructor(t,o){this.hostName=t,this.channel=o}async connect(){await this.channel.waitForEdge(this.hostName)}run(t,...o){return this.channel.call({name:t,destination:this.hostName,data:o})}};Gs.RemoteClient=w0});var xA=oi(Hs=>{"use strict";a();Object.defineProperty(Hs,"__esModule",{value:!0});Hs.WorkerClient=Hs.createWorkerHost=void 0;var TA=b0(),wA=x0(),X6=(e,t)=>{let o=new TA.Channel(e);return o.addPipe({emit:(r,i)=>postMessage({event:r,data:i}),listen:(r,i)=>addEventListener("message",({data:s})=>{s.event===r&&i(s.data)})}),new wA.RemoteHost(o,t)};Hs.createWorkerHost=X6;var P0=class extends wA.RemoteClient{workerOpts;worker;workerListeners=[];url;constructor(t,o,r,i={}){let s=new TA.Channel(t);if(super(o,s),this.workerOpts=i,r instanceof Blob){let l=new Blob([r],{type:"text/javascript"});this.url=URL.createObjectURL(l)}else this.url=r}async init(){let t=this.worker=new Worker(this.url,this.workerOpts);this.channel.addPipe({emit:(o,r)=>t.postMessage({event:o,data:r}),listen:(o,r)=>{let i=s=>{let{event:l,data:u}=s.data;l===o&&r(u)};this.workerListeners.push(i),t.addEventListener("message",i)}}),await this.connect()}destroy(){if(this.worker){for(let t of this.workerListeners)this.worker.removeEventListener("message",t);this.worker.terminate()}this.channel.destroy(),this.url.startsWith("blob:")&&URL.revokeObjectURL(this.url)}};Hs.WorkerClient=P0});var PA=oi(dr=>{"use strict";a();var J6=dr&&dr.__createBinding||(Object.create?function(e,t,o,r){r===void 0&&(r=o);var i=Object.getOwnPropertyDescriptor(t,o);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,r,i)}:function(e,t,o,r){r===void 0&&(r=o),e[r]=t[o]}),I0=dr&&dr.__exportStar||function(e,t){for(var o in e)o!=="default"&&!Object.prototype.hasOwnProperty.call(t,o)&&J6(t,e,o)};Object.defineProperty(dr,"__esModule",{value:!0});I0(b0(),dr);I0(x0(),dr);I0(xA(),dr)});function A0(e){Jm.id!==e.id&&(Object.assign(Jm,e),M0.forEach(t=>t(e)))}var Jm,M0,IA,N0=f(()=>{"use strict";a();b();Jm={id:null,theme:null},M0=new Set,IA=()=>{let[,e]=H.useState(Jm);return H.useEffect(()=>(M0.add(e),()=>void M0.delete(e)),[]),Jm}});function Wi(e){if(Object.prototype.hasOwnProperty.call(zs,e))return zs[e];let t=Object.values(zs).find(o=>o.aliases?.includes(e));return t?(o8.set(e,t),t):null}var Q6,V6,MA,e8,t8,zs,AA,NA,o8,Qm=f(()=>{"use strict";a();Q6="Vap0r1ze/vapcord",V6="88a7032a59cca40da170926651b08201ea3b965a",MA=`https://raw.githubusercontent.com/${Q6}/${V6}/assets/shiki-codeblocks`,e8=e=>`${MA}/${e}`,t8=`${MA}/languages.json`,zs={},AA=async()=>{let e=await fetch(t8).then(o=>o.json()),t=Object.fromEntries(e.map(o=>[o.id,{...o,grammarUrl:e8(o.fileName)}]));Object.assign(zs,t)},NA=e=>e.grammar?Promise.resolve(e.grammar):fetch(e.grammarUrl).then(t=>t.json()),o8=new Map});var n8,r8,at,mr,C0=f(()=>{"use strict";a();n8="shikijs/shiki",r8="0b28ad8ccfbf2615f2d9d38ea8255416b8ac3043",at=e=>`https://raw.githubusercontent.com/${n8}/${r8}/packages/shiki/themes/${e}.json`,mr={DarkPlus:at("dark-plus"),MaterialCandy:"https://raw.githubusercontent.com/millsp/material-candy/master/material-candy.json",DraculaSoft:at("dracula-soft"),Dracula:at("dracula"),GithubDarkDimmed:at("github-dark-dimmed"),GithubDark:at("github-dark"),GithubLight:at("github-light"),LightPlus:at("light-plus"),MaterialDarker:at("material-darker"),MaterialDefault:at("material-default"),MaterialLighter:at("material-lighter"),MaterialOcean:at("material-ocean"),MaterialPalenight:at("material-palenight"),MinDark:at("min-dark"),MinLight:at("min-light"),Monokai:at("monokai"),Nord:at("nord"),OneDarkPro:at("one-dark-pro"),Poimandres:at("poimandres"),RosePineDawn:at("rose-pine-dawn"),RosePineMoon:at("rose-pine-moon"),RosePine:at("rose-pine"),SlackDark:at("slack-dark"),SlackOchin:at("slack-ochin"),SolarizedDark:at("solarized-dark"),SolarizedLight:at("solarized-light"),VitesseDark:at("vitesse-dark"),VitesseLight:at("vitesse-light"),CssVariables:at("css-variables")}});var RA,R0,CA,De,El=f(()=>{"use strict";a();yp();RA=ql(PA());N0();Qm();C0();R0=Object.values(mr),De={client:null,currentTheme:null,currentThemeUrl:null,timeoutMs:1e4,languages:zs,themes:mr,loadedThemes:new Set,loadedLangs:new Set,clientPromise:new Promise(e=>CA=e),init:async e=>{let t=await fetch(ew).then(i=>i.blob()),o=De.client=new RA.WorkerClient("shiki-client","shiki-host",t,{name:"ShikiWorker"});await o.init();let r=e||R0[0];await AA(),await o.run("setOnigasm",{wasm:tw}),await o.run("setHighlighter",{theme:r,langs:[]}),De.loadedThemes.add(r),await De._setTheme(r),CA(o)},_setTheme:async e=>{De.currentThemeUrl=e;let{themeData:t}=await De.client.run("getTheme",{theme:e});De.currentTheme=JSON.parse(t),A0({id:e,theme:De.currentTheme})},loadTheme:async e=>{let t=await De.clientPromise;De.loadedThemes.has(e)||(await t.run("loadTheme",{theme:e}),De.loadedThemes.add(e))},setTheme:async e=>{await De.clientPromise,e||=R0[0],De.loadedThemes.has(e)||await De.loadTheme(e),await De._setTheme(e)},loadLang:async e=>{let t=await De.clientPromise,o=Wi(e);!o||De.loadedLangs.has(o.id)||(await t.run("loadLanguage",{lang:{...o,grammar:o.grammar??await NA(o)}}),De.loadedLangs.add(o.id))},tokenizeCode:async(e,t)=>{let o=await De.clientPromise,r=Wi(t);return r?(De.loadedLangs.has(r.id)||await De.loadLang(r.id),await o.run("codeToThemedTokens",{code:e,lang:t,theme:De.currentThemeUrl??R0[0]})):[]},destroy(){De.currentTheme=null,De.currentThemeUrl=null,A0({id:null,theme:null}),De.client?.destroy()}}});var Ol,k0=f(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/shikiCodeblocks.desktop/devicon.css",{name:"src/plugins/shikiCodeblocks.desktop/devicon.css",source:`@import url("https://cdn.jsdelivr.net/gh/devicons/devicon@v2.10.1/devicon.min.css");
|
|
`,classNames:{},dom:null});Ol="src/plugins/shikiCodeblocks.desktop/devicon.css"});var _l=f(()=>{"use strict";a()});var s8,Zr,D0=f(()=>{"use strict";a();_();Ve();be();Cn();w();El();C0();k0();_l();s8=Object.keys(mr),Zr=A({theme:{type:4,description:"Default themes",options:s8.map(e=>({label:Yn(bh(e)),value:mr[e],default:mr[e]===mr.DarkPlus})),onChange:De.setTheme},customTheme:{type:0,description:"A link to a custom vscode theme",placeholder:mr.MaterialCandy,onChange:e=>{De.setTheme(e||Zr.store.theme)}},tryHljs:{type:4,description:"Use the more lightweight default Discord highlighter and theme.",options:[{label:"Never",value:"NEVER"},{label:"Prefer Shiki instead of Highlight.js",value:"SECONDARY",default:!0},{label:"Prefer Highlight.js instead of Shiki",value:"PRIMARY"},{label:"Always",value:"ALWAYS"}]},useDevIcon:{type:4,description:"How to show language icons on codeblocks",options:[{label:"Disabled",value:"DISABLED"},{label:"Colorless",value:"GREYSCALE",default:!0},{label:"Colored",value:"COLOR"}],onChange:e=>{e==="DISABLED"?go(Ol):zt(Ol)}},bgOpacity:{type:5,description:"Background opacity",markers:[0,20,40,60,80,100],default:100,componentProps:{stickToMarkers:!1,onValueRender:null}}},{theme:{disabled(){return!!this.store.customTheme}},customTheme:{isValid(e){if(!e)return!0;let t=hg(e);return t?t.pathname.endsWith(".json")?!0:"Must be a json file":"Must be a valid URL"}}})});function DA(e,t){let o=Zr.use(e),[r,i]=H.useState(!1),s={...o,...t},l=s.customTheme||s.theme;if(t){let u=De.currentThemeUrl&&l&&l!==De.currentThemeUrl,c=Object.keys(t).length===0;r&&(!u||c)&&i(!1),!r&&u&&(i(!0),De.setTheme(l))}return{...s,isThemeLoading:l!==De.currentThemeUrl}}var LA=f(()=>{"use strict";a();b();El();D0()});function EA(e){return e=e.slice(1),e.length<6&&(e=e.split("").map(t=>t+t).join("")),e.length===6&&(e+="ff"),e.length>6&&(e=e.slice(0,6)),e.split(/(..)/).filter(Boolean).map(t=>parseInt(t,16))}var OA=f(()=>{"use strict";a()});var Tn,_A,Bl=f(()=>{"use strict";a();Ve();b();Qm();_l();Tn=Te("shiki-"),_A=({lang:e,tryHljs:t})=>{let o=e?pi?.getLanguage?.(e):null,i=(e?Wi(e):null)?.name;switch(t){case"ALWAYS":return!0;case"PRIMARY":return!!o||e==="";case"SECONDARY":return!i&&!!o;case"NEVER":return!1;default:return!1}}});function BA(e){let[t,o]=H.useState(!1);function r(i){Et.copy(i),o(!0),setTimeout(()=>{o(!1)},e)}return[t,r]}var FA=f(()=>{"use strict";a();b()});function UA({content:e,...t}){let[o,r]=BA(1e3);return n("button",{...t,style:{...t.style,cursor:o?"default":void 0},onClick:()=>r(e)},o?"Copied!":"Copy")}var $A=f(()=>{"use strict";a();FA()});function GA({content:e,theme:t}){let o=[];return Et.SUPPORTS_COPY&&o.push(n(UA,{content:e,className:Tn("btn"),style:{backgroundColor:t.accentBgColor,color:t.accentFgColor}})),n("div",{className:Tn("btns")},o)}var HA=f(()=>{"use strict";a();b();Bl();$A()});var zA,jA=f(()=>{"use strict";a();b();Bl();zA=({theme:e,useHljs:t,lang:o,content:r,tokens:i})=>{let s;if(t)try{let{value:u}=pi.highlight(o,r,!0);s=u.split(`
|
|
`).map((c,m)=>n("span",{key:m,dangerouslySetInnerHTML:{__html:c}}))}catch{s=r.split(`
|
|
`).map(u=>n("span",null,u))}else s=(i??r.split(`
|
|
`).map(c=>[{color:e.plainColor,content:c}])).map(c=>c.length===0?n("span",null,`
|
|
`):n(d,null,c.map(({content:m,color:g,fontStyle:y},v)=>n("span",{key:v,style:{color:g,fontStyle:(y??0)&1?"italic":void 0,fontWeight:(y??0)&2?"bold":void 0,textDecoration:(y??0)&4?"underline":void 0}},m))));let l=s.map((u,c)=>n("tr",{key:c},n("td",{style:{color:e.plainColor}},c+1),n("td",null,u)));return n("table",{className:Tn("table")},...l)}});function WA({langName:e,useDevIcon:t,shikiLang:o}){return e?n("div",{className:Tn("lang")},t!=="DISABLED"&&o?.devicon&&n("i",{className:`${Tn("devicon")} devicon-${o.devicon}${t==="COLOR"?" colored":""}`}),e):n(d,null)}var qA=f(()=>{"use strict";a();_l();Bl()});var Vm,a8,KA=f(()=>{"use strict";a();re();ft();b();Qm();El();LA();N0();OA();Bl();HA();jA();qA();Vm=e=>n("pre",{className:Tn("container")},n(k,null,n(a8,{...e}))),a8=({lang:e,content:t,isPreview:o,tempSettings:r})=>{let{tryHljs:i,useDevIcon:s,bgOpacity:l}=DA(["tryHljs","useDevIcon","bgOpacity"],r),{id:u,theme:c}=IA(),m=e?Wi(e):null,g=_A({lang:e,tryHljs:i}),[y,v]=Sg(!0),[M]=st(async()=>!m||g||!v?null:await De.tokenizeCode(t,e),{fallbackValue:null,deps:[e,t,u,v]}),x={plainColor:c?.fg||"var(--text-normal)",accentBgColor:c?.colors?.["statusBar.background"]||(g?"#7289da":"#007BC8"),accentFgColor:c?.colors?.["statusBar.foreground"]||"#FFF",backgroundColor:c?.colors?.["editor.background"]||"var(--background-secondary)"},N;return e&&(N=g?pi?.getLanguage?.(e)?.name:m?.name),n("div",{ref:y,className:Tn("root",{plain:!N,preview:o}),style:{backgroundColor:g?x.backgroundColor:`rgba(${EA(x.backgroundColor).concat(l/100).join(", ")})`,color:x.plainColor}},n("code",null,n(WA,{langName:N,useDevIcon:s,shikiLang:m}),n(zA,{theme:x,useHljs:g,lang:e,content:t,tokens:M}),!o&&n(GA,{content:t,theme:x})))}});var YA,ZA,XA=f(()=>{"use strict";a();YA=new Map,ZA=()=>{YA.forEach(e=>e.remove()),YA.clear()}});var ef,JA=f(()=>{"use strict";a();hA();Ve();P();w();vA();El();KA();k0();D0();_l();XA();ef=h({name:"ShikiCodeblocks",description:"Brings vscode-style codeblocks into Discord, powered by Shiki",authors:[p.Vap],reporterTestable:8,settings:Zr,patches:[{find:"codeBlock:{react(",replacement:{match:/codeBlock:\{react\((\i),(\i),(\i)\)\{/,replace:"$&return $self.renderHighlighter($1,$2,$3);"}},{find:".PREVIEW_NUM_LINES",replacement:{match:/(?<=function \i\((\i)\)\{)(?=let\{text:\i,language:)/,replace:"return $self.renderHighlighter({lang:$1.language,content:$1.text});"}}],start:async()=>{Zr.store.useDevIcon!=="DISABLED"&&zt(Ol),await De.init(Zr.store.customTheme||Zr.store.theme)},stop:()=>{De.destroy(),ZA()},settingsAboutComponent:({tempSettings:e})=>Vm({lang:"tsx",content:yA,isPreview:!0,tempSettings:e}),shiki:De,createHighlighter:Vm,renderHighlighter:({lang:e,content:t})=>Vm({lang:e?.toLowerCase(),content:t,isPreview:!1})})});var tf,QA=f(()=>{"use strict";a();P();w();tf=h({name:"ShowAllMessageButtons",description:"Always show all message buttons no matter if you are holding the shift key or not.",authors:[p.Nuckyz],patches:[{find:".Messages.MESSAGE_UTILITIES_A11Y_LABEL",replacement:{match:/isExpanded:\i&&(.+?),/,replace:"isExpanded:$1,"}}]})});var of,VA=f(()=>{"use strict";a();P();w();of=h({name:"ShowAllRoles",description:"Show all roles in new profiles.",authors:[p.Luna],patches:[{find:".Messages.VIEW_ALL_ROLES",replacement:{match:/return null!=\i(?=\?\i\.slice)/,replace:"return false"}}]})});var eN=f(()=>{});function oN(){let e=sa(tN.colors.INTERACTIVE_MUTED).hex(),t=sa(tN.colors.INTERACTIVE_ACTIVE).hex();return n(l8,{color:e,forcedIconColor:t,size:16,tooltipText:Se.Messages.CONNECTION_VERIFIED})}var tN,l8,nN=f(()=>{"use strict";a();$();b();tN=Qe(e=>e.colors?.INTERACTIVE_MUTED?.css),l8=ve(".CONNECTIONS_ROLE_OFFICIAL_ICON_TOOLTIP")});function rN({id:e,theme:t,simplified:o}){let r=Qt.getUserProfile(e);if(!r)return null;let i=r.connectedAccounts;if(!i?.length)return null;let s=n(pe,{style:{marginTop:o?void 0:"8px",gap:f8(nf.store.iconSpacing),flexWrap:"wrap"}},i.map(l=>n(y8,{connection:l,theme:t})));return o?s:n(c8,null,n(Z,{tag:"h2",variant:"eyebrow",style:{color:"var(--header-primary)"}},"Connections"),s)}function y8({connection:e,theme:t}){let o=d8.get(p8(e.type)),r=o.getPlatformUserUrl?.(e),i=n("img",{"aria-label":e.name,src:t==="light"?o.icon.lightSVG:o.icon.darkSVG,style:{width:nf.store.iconSize,height:nf.store.iconSize}}),s=r?xi:xa;return n(oe,{text:n("span",{className:"vc-sc-tooltip"},n("span",{className:"vc-sc-connection-name"},e.name),e.verified&&n(oN,null),n(s,{height:16,width:16})),key:e.id},l=>r?n("a",{...l,className:"vc-user-connection",href:r,target:"_blank",onClick:u=>{Vencord.Plugins.isPluginEnabled("OpenInApp")&&Vencord.Plugins.plugins.OpenInApp.handleLink(u.currentTarget,u)}},i):n("button",{...l,className:"vc-user-connection",onClick:()=>po(e.name)},i))}var c8,u8,p8,d8,m8,f8,nf,g8,h8,rf,iN=f(()=>{"use strict";a();eN();_();re();Rt();bt();P();be();w();$();b();nN();c8=ve(".lastSection","children:"),u8=me("ThemeStore"),p8=ye(".TWITTER_LEGACY:"),d8=C("isSupported","getByUrl"),m8=ye(".getPreviewThemeColors","primaryColor:"),f8=e=>(e??0)*2+4,nf=A({iconSize:{type:1,description:"Icon size (px)",default:32},iconSpacing:{type:4,description:"Icon margin",default:1,options:[{label:"Compact",value:0},{label:"Cozy",value:1},{label:"Roomy",value:2}]}}),g8=k.wrap(e=>n(rN,{...e,id:e.user.id,theme:m8(e).theme}),{noop:!0}),h8=k.wrap(e=>n(rN,{...e,theme:u8.theme}),{noop:!0});rf=h({name:"ShowConnections",description:"Show connected accounts in user popouts",authors:[p.TheKodeToad],patches:[{find:"{isUsingGuildBio:null!==(",replacement:{match:/,theme:\i\}\)(?=,.{0,150}setNote:)/,replace:"$&,$self.profilePopoutComponent({ user: arguments[0].user, displayProfile: arguments[0].displayProfile })"}},{find:".PROFILE_PANEL,",replacement:{match:/\(0,\i\.jsx\)\(\i\.\i,\{\}\).{0,100}setNote:(?=.+?channelId:(\i).id)/,replace:"$self.profilePanelComponent({ id: $1.recipients[0] }),$&"}},{find:/\.BITE_SIZE,onOpenProfile:\i,usernameIcon:/,replacement:{match:/currentUser:\i,guild:\i,onOpenProfile:.+?}\)(?=])(?<=user:(\i),bio:null==(\i)\?.+?)/,replace:"$&,$self.profilePopoutComponent({ user: $1, displayProfile: $2, simplified: true })"}}],settings:nf,profilePopoutComponent:g8,profilePanelComponent:h8})});var sN=f(()=>{});function N8({channel:e}){let{defaultAllowedUsersAndRolesDropdownState:t}=fr.use(["defaultAllowedUsersAndRolesDropdownState"]),[o,r]=K([]),{type:i,topic:s,lastMessageId:l,defaultForumLayout:u,lastPinTimestamp:c,defaultAutoArchiveDuration:m,availableTags:g,id:y,rateLimitPerUser:v,defaultThreadRateLimitPerUser:M,defaultSortOrder:x,defaultReactionEmoji:N,bitrate:I,rtcRegion:R,videoQualityMode:D,permissionOverwrites:B,guild_id:z}=e;return ce(()=>{let Y=[],ee=se.getGuild(z).ownerId;Be.getMember(z,ee)||Y.push(ee),Object.values(B).forEach(({type:J,id:U})=>{J===1&&!Be.getMember(z,U)&&Y.push(U)}),Y.length>0&&F.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[z],userIds:Y}),j.plugins.PermissionsViewer.enabled&&r(qd(Object.values(B).map(J=>({type:J.type,id:J.id,overwriteAllow:J.allow,overwriteDeny:J.deny})),z))},[y]),n("div",{className:aN.auto+" "+aN.customTheme+" "+v8.chatContent+" shc-lock-screen-outer-container"},n("div",{className:"shc-lock-screen-container"},n("img",{className:"shc-lock-screen-logo",src:A8}),n("div",{className:"shc-lock-screen-heading-container"},n(Z,{variant:"heading-xxl/bold"},"This is a ",We.can(Ie.VIEW_CHANNEL,e)?"locked":"hidden"," ",x8[i]," channel."),e.isNSFW()&&n(oe,{text:"NSFW"},({onMouseLeave:Y,onMouseEnter:ee})=>n("svg",{onMouseLeave:Y,onMouseEnter:ee,className:"shc-lock-screen-heading-nsfw-icon",width:"32",height:"32",viewBox:"0 0 48 48","aria-hidden":!0,role:"img"},n("path",{fill:"currentColor",d:"M.7 43.05 24 2.85l23.3 40.2Zm23.55-6.25q.75 0 1.275-.525.525-.525.525-1.275 0-.75-.525-1.3t-1.275-.55q-.8 0-1.325.55-.525.55-.525 1.3t.55 1.275q.55.525 1.3.525Zm-1.85-6.1h3.65V19.4H22.4Z"})))),!e.isGuildVoice()&&!e.isGuildStageVoice()&&n(Z,{variant:"text-lg/normal"},"You can not see the ",e.isForumChannel()?"posts":"messages"," of this channel.",e.isForumChannel()&&s&&s.length>0&&" However you may see its guidelines:"),e.isForumChannel()&&s&&s.length>0&&n("div",{className:"shc-lock-screen-topic-container"},Pe.parseTopic(s,!1,{channelId:y})),l&&n(Z,{variant:"text-md/normal"},"Last ",e.isForumChannel()?"post":"message"," created:",n(No,{timestamp:new Date(uo.extractTimestamp(l))})),c&&n(Z,{variant:"text-md/normal"},"Last message pin: ",n(No,{timestamp:new Date(c)})),(v??0)>0&&n(Z,{variant:"text-md/normal"},"Slowmode: ",Ua(v,"seconds")),(M??0)>0&&n(Z,{variant:"text-md/normal"},"Default thread slowmode: ",Ua(M,"seconds")),(e.isGuildVoice()||e.isGuildStageVoice())&&I!=null&&n(Z,{variant:"text-md/normal"},"Bitrate: ",I," bits"),R!==void 0&&n(Z,{variant:"text-md/normal"},"Region: ",R??"Automatic"),(e.isGuildVoice()||e.isGuildStageVoice())&&n(Z,{variant:"text-md/normal"},"Video quality mode: ",M8[D??1]),(m??0)>0&&n(Z,{variant:"text-md/normal"},"Default inactivity duration before archiving ",e.isForumChannel()?"posts":"threads",":"," "+Ua(m,"minutes")),u!=null&&n(Z,{variant:"text-md/normal"},"Default layout: ",I8[u]),x!=null&&n(Z,{variant:"text-md/normal"},"Default sort order: ",P8[x]),N!=null&&n("div",{className:"shc-lock-screen-default-emoji-container"},n(Z,{variant:"text-md/normal"},"Default reaction emoji:"),Pe.defaultRules[N.emojiName?"emoji":"customEmoji"].react({name:N.emojiName?T8.convertSurrogateToName(N.emojiName):sn.getCustomEmojiById(N.emojiId)?.name??"",emojiId:N.emojiId??void 0,surrogate:N.emojiName??void 0,src:N.emojiName?w8.getURL(N.emojiName):void 0},void 0,{key:"0"})),e.hasFlag(16)&&n(Z,{variant:"text-md/normal"},"Posts on this forum require a tag to be set."),g&&g.length>0&&n("div",{className:"shc-lock-screen-tags-container"},n(Z,{variant:"text-lg/bold"},"Available tags:"),n("div",{className:"shc-lock-screen-tags"},g.map(Y=>n(b8,{tag:Y})))),n("div",{className:"shc-lock-screen-allowed-users-and-roles-container"},n("div",{className:"shc-lock-screen-allowed-users-and-roles-container-title"},j.plugins.PermissionsViewer.enabled&&n(oe,{text:"Permission Details"},({onMouseLeave:Y,onMouseEnter:ee})=>n("button",{onMouseLeave:Y,onMouseEnter:ee,className:"shc-lock-screen-allowed-users-and-roles-container-permdetails-btn",onClick:()=>Ds(o,se.getGuild(e.guild_id),e.name)},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},n("path",{fill:"currentColor",d:"M7 12.001C7 10.8964 6.10457 10.001 5 10.001C3.89543 10.001 3 10.8964 3 12.001C3 13.1055 3.89543 14.001 5 14.001C6.10457 14.001 7 13.1055 7 12.001ZM14 12.001C14 10.8964 13.1046 10.001 12 10.001C10.8954 10.001 10 10.8964 10 12.001C10 13.1055 10.8954 14.001 12 14.001C13.1046 14.001 14 13.1055 14 12.001ZM19 10.001C20.1046 10.001 21 10.8964 21 12.001C21 13.1055 20.1046 14.001 19 14.001C17.8954 14.001 17 13.1055 17 12.001C17 10.8964 17.8954 10.001 19 10.001Z"})))),n(Z,{variant:"text-lg/bold"},"Allowed users and roles:"),n(oe,{text:t?"Hide Allowed Users and Roles":"View Allowed Users and Roles"},({onMouseLeave:Y,onMouseEnter:ee})=>n("button",{onMouseLeave:Y,onMouseEnter:ee,className:"shc-lock-screen-allowed-users-and-roles-container-toggle-btn",onClick:()=>fr.store.defaultAllowedUsersAndRolesDropdownState=!t},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24",transform:t?"scale(1 -1)":"scale(1 1)"},n("path",{fill:"currentColor",d:"M16.59 8.59003L12 13.17L7.41 8.59003L6 10L12 16L18 10L16.59 8.59003Z"}))))),t&&n(S8,{channel:e}))))}var aN,v8,S8,b8,T8,w8,x8,P8,I8,M8,A8,lN,cN=f(()=>{"use strict";a();_();re();Cn();$();b();vl();yl();L0();aN=C("auto","managedReactiveScroller"),v8=C("chat","content","noChat","chatContent"),S8=ve(".Messages.ROLE_REQUIRED_SINGLE_USER_MESSAGE"),b8=Ki(e=>{if(typeof e!="function")return!1;let t=Function.prototype.toString.call(e);return t.includes(".Messages.FORUM_TAG_A11Y_FILTER_BY_TAG")&&!t.includes("increasedActivityPill")}),T8=C("convertSurrogateToName"),w8=C("getURL","getEmojiColors"),x8={[0]:"text",[5]:"announcement",[15]:"forum",[2]:"voice",[13]:"stage"},P8={[0]:"Latest activity",[1]:"Creation date"},I8={[0]:"Not set",[1]:"List view",[2]:"Gallery view"},M8={[1]:"Automatic",[2]:"720p"},A8="/assets/433e3ec4319a9d11b0cbe39342614982.svg";lN=k.wrap(N8)});var uN,pN,fr,sf,L0=f(()=>{"use strict";a();sN();_();re();P();Ko();w();$();b();cN();uN=C("modeMuted","modeSelected","unread","icon"),pN=1n<<20n,fr=A({hideUnreads:{description:"Hide Unreads",type:3,default:!0,restartNeeded:!0},showMode:{description:"The mode used to display hidden channels.",type:4,options:[{label:"Plain style with Lock Icon instead",value:0,default:!0},{label:"Muted style with hidden eye icon on the right",value:1}],restartNeeded:!0},defaultAllowedUsersAndRolesDropdownState:{description:"Whether the allowed users and roles dropdown on hidden channels should be open by default",type:3,default:!0}}),sf=h({name:"ShowHiddenChannels",description:"Show channels that you do not have access to view.",authors:[p.BigDuck,p.AverageReactEnjoyer,p.D3SOX,p.Ven,p.Nuckyz,p.Nickyux,p.dzshn],settings:fr,patches:[{find:'"placeholder-channel-id"',replacement:[{match:/if\(!\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL.+?{if\(this\.id===\i\).+?threadIds:\[\]}}/,replace:""},{match:/(?<=&&)(?=!\i\.\i\.hasUnread\(this\.record\.id\))/,replace:"$self.isHiddenChannel(this.record)||"},{match:/(activeJoinedRelevantThreads:.{0,50}VIEW_CHANNEL.+?renderLevel:(.+?),threadIds.+?renderLevel:).+?(?=,threadIds)/g,replace:(e,t,o)=>`${t}${o}`},{match:/(getRenderLevel\(\i\){.+?return)!\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL,this\.record\)\|\|/,replace:(e,t)=>`${t} `}]},{find:"VoiceChannel, transitionTo: Channel does not have a guildId",replacement:[{match:/(?<=getCurrentClientVoiceChannelId\((\i)\.guild_id\);return)/,replace:(e,t)=>`!$self.isHiddenChannel(${t})&&`},{match:/(?=&&\i\.\i\.selectVoiceChannel\((\i)\.id\))/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`},{match:/!__OVERLAY__&&\((?<=selectVoiceChannel\((\i)\.id\).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t},true)||`}]},{find:".AUDIENCE),{isSubscriptionGated",replacement:{match:/!(\i)\.isRoleSubscriptionTemplatePreviewChannel\(\)/,replace:(e,t)=>`${e}&&!$self.isHiddenChannel(${t})`}},{find:'tutorialId:"instant-invite"',replacement:[...["renderEditButton","renderInviteButton"].map(e=>({match:new RegExp(`(?<=${e}\\(\\){)`,"g"),replace:"if($self.isHiddenChannel(this.props.channel))return null;"}))]},{find:"VoiceChannel.renderPopout: There must always be something to render",all:!0,replacement:{match:/(?<="renderOpenChatButton",\(\)=>{)/,replace:"if($self.isHiddenChannel(this.props.channel))return null;"}},{find:".Messages.CHANNEL_TOOLTIP_DIRECTORY",predicate:()=>fr.store.showMode===0,replacement:{match:/(?=switch\((\i)\.type\).{0,30}\.GUILD_ANNOUNCEMENT.{0,70}\(0,\i\.\i\))/,replace:(e,t)=>`if($self.isHiddenChannel(${t}))return $self.LockIcon;`}},{find:"UNREAD_IMPORTANT:",predicate:()=>fr.store.showMode===1,replacement:[{match:/{channel:(\i),name:\i,muted:(\i).+?;/,replace:(e,t,o)=>`${e}${o}=$self.isHiddenChannel(${t})?true:${o};`},{match:/\.name\),.{0,120}\.children.+?:null(?<=,channel:(\i).+?)/,replace:(e,t)=>`${e},$self.isHiddenChannel(${t})?$self.HiddenChannelIcon():null`},{match:/(?<=\.wrapper:\i\.notInteractive,)(.+?)if\((\i)\)return (\i\.MUTED);/,replace:(e,t,o,r)=>`${o}?${r}:"",${t}if(${o})return "";`}]},{find:"UNREAD_IMPORTANT:",replacement:[{predicate:()=>fr.store.hideUnreads===!1&&fr.store.showMode===1,match:/\.LOCKED;if\((?<={channel:(\i).+?)/,replace:(e,t)=>`${e}!$self.isHiddenChannel(${t})&&`},{predicate:()=>fr.store.hideUnreads===!0,match:/{channel:(\i),name:\i,.+?unread:(\i).+?;/,replace:(e,t,o)=>`${e}${o}=$self.isHiddenChannel(${t})?false:${o};`}]},{find:'="ChannelListUnreadsStore",',replacement:{match:/(?<=\.id\)\))(?=&&\(0,\i\.\i\)\((\i)\))/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`}},{find:"renderBottomUnread(){",replacement:{match:/(?<=!0\))(?=&&\(0,\i\.\i\)\((\i\.record)\))/,replace:"&&!$self.isHiddenChannel($1)"}},{find:"ignoreRecents:!0",replacement:{match:/(?<=\.id\)\))(?=&&\(0,\i\.\i\)\((\i)\))/,replace:"&&!$self.isHiddenChannel($1)"}},{find:"Missing channel in Channel.renderHeaderToolbar",replacement:[{match:/(?<="renderHeaderToolbar",\(\)=>{.+?case \i\.\i\.GUILD_TEXT:)(?=.+?(\i\.push.{0,50}channel:(\i)},"notifications"\)\)))(?<=isLurking:(\i).+?)/,replace:(e,t,o,r)=>`if(!${r}&&$self.isHiddenChannel(${o})){${t};break;}`},{match:/(?<="renderHeaderToolbar",\(\)=>{.+?case \i\.\i\.GUILD_MEDIA:)(?=.+?(\i\.push.{0,40}channel:(\i)},"notifications"\)\)))(?<=isLurking:(\i).+?)/,replace:(e,t,o,r)=>`if(!${r}&&$self.isHiddenChannel(${o})){${t};break;}`},{match:/"renderMobileToolbar",\(\)=>{.+?case \i\.\i\.GUILD_DIRECTORY:(?<=let{channel:(\i).+?)/,replace:(e,t)=>`${e}if($self.isHiddenChannel(${t}))break;`},{match:/(?<="renderHeaderBar",\(\)=>{.+?hideSearch:(\i)\.isDirectory\(\))/,replace:(e,t)=>`||$self.isHiddenChannel(${t})`},{match:/(?<=renderSidebar\(\){)/,replace:"if($self.isHiddenChannel(this.props.channel))return null;"},{match:/(?<=renderChat\(\){)/,replace:"if($self.isHiddenChannel(this.props.channel))return $self.HiddenChannelLockScreen(this.props.channel);"}]},{find:'"MessageManager"',replacement:{match:/"Skipping fetch because channelId is a static route"\);return}(?=.+?getChannel\((\i)\))/,replace:(e,t)=>`${e}if($self.isHiddenChannel({channelId:${t}}))return;`}},{find:'"alt+shift+down"',replacement:{match:/(?<=getChannel\(\i\);return null!=(\i))(?=.{0,150}?>0\)&&\(0,\i\.\i\)\(\i\))/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`}},{find:".APPLICATION_STORE&&null!=",replacement:{match:/(?<=getState\(\)\.channelId.{0,30}?\(0,\i\.\i\)\(\i\))(?=\.map\()/,replace:".filter(e=>!$self.isHiddenChannel(e))"}},{find:".Messages.ROLE_REQUIRED_SINGLE_USER_MESSAGE",replacement:[{match:/ADMINISTRATOR\)\|\|(?<=context:(\i)}.+?)(?=(.+?)VIEW_CHANNEL)/,replace:(e,t,o)=>`${e}!Vencord.Webpack.Common.PermissionStore.can(${pN}n,${t})?${o}CONNECT):`},{match:/permissionOverwrites\[.+?\i=(?<=context:(\i)}.+?)(?=(.+?)VIEW_CHANNEL)/,replace:(e,t,o)=>`${e}!Vencord.Webpack.Common.PermissionStore.can(${pN}n,${t})?${o}CONNECT):`},{match:/sortBy.{0,30}?\.filter\(\i=>(?<=channel:(\i).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?true:`},{match:/forceRoles:.+?.value\(\)(?<=channel:(\i).+?)/,replace:(e,t)=>`${e}.reduce(...$self.makeAllowedRolesReduce(${t}.guild_id))`},{match:/MANAGE_ROLES.{0,90}?return(?=\(.+?(\(0,\i\.jsxs\)\("div",{className:\i\.members.+?guildId:(\i)\.guild_id.+?roleColor.+?\]}\)))/,replace:(e,t,o)=>(t=t.replace(Kt(/(?<=users:\i)/),`,shcChannel:${o}`),t=t.replace(Kt(/1!==\i\.length/),"true"),`${e} $self.isHiddenChannel(${o},true)?${t}:`)}]},{find:'+1]})},"overflow"))',replacement:[{match:/maxUsers:\i,users:\i.+?}=(\i).*?;/,replace:(e,t)=>`${e}let{shcChannel}=${t};`},{match:/\i>0(?=&&.{0,60}renderPopout)/,replace:e=>`($self.isHiddenChannel(typeof shcChannel!=="undefined"?shcChannel:void 0,true)?true:${e})`},{match:/(?<=\.value\(\),(\i)=.+?length-)1(?=\]=.{0,60}renderPopout)/,replace:(e,t)=>`($self.isHiddenChannel(typeof shcChannel!=="undefined"?shcChannel:void 0,true)&&${t}<=0?0:1)`},{match:/(?<="\+",)(\i)\+1/,replace:(e,t)=>`$self.isHiddenChannel(typeof shcChannel!=="undefined"?shcChannel:void 0,true)&&${t}<=0?"":${e}`}]},{find:".Messages.CHANNEL_CALL_CURRENT_SPEAKER.format",replacement:[{match:/"more-options-popout"\)\),(?<=channel:(\i).+?inCall:(\i).+?)/,replace:(e,t,o)=>`${e}${o}||!$self.isHiddenChannel(${t},true)&&`},{match:/"popup".{0,100}?if\((?<=channel:(\i).+?inCall:(\i).+?)/,replace:(e,t,o)=>`${e}(${o}||!$self.isHiddenChannel(${t},true))&&`}]},{find:".Messages.EMBEDDED_ACTIVITIES_DEVELOPER_ACTIVITY_SHELF_FETCH_ERROR",replacement:[{match:/renderContent\(\i\){.+?this\.renderVoiceChannelEffects.+?children:/,replace:"$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?$self.HiddenChannelLockScreen(this.props.channel):"},{match:/renderContent\(\i\){.+?disableGradients:/,replace:"$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)||"},{match:/(?:{|,)render(?!Header|ExternalHeader).{0,30}?:/g,replace:"$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?()=>null:"},{match:/callContainer,(?<=\i\.callContainer,)/,replace:'$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?"":'}]},{find:'"HasBeenInStageChannel"',replacement:[{match:/"124px".+?children:(?<=let \i,{channel:(\i).+?)(?=.{0,20}?}\)}function)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?$self.HiddenChannelLockScreen(${t}):`},{match:/render(?:BottomLeft|BottomCenter|BottomRight|ChatToasts):\(\)=>(?<=let \i,{channel:(\i).+?)/g,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?null:`},{match:/"124px".+?disableGradients:(?<=let \i,{channel:(\i).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})||`},{match:/"124px".+?style:(?<=let \i,{channel:(\i).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?void 0:`}]},{find:".Messages.STAGE_FULL_MODERATOR_TITLE",replacement:[{match:/\(0,\i\.jsx\)\(\i\.\i\.Divider.+?}\)]}\)(?=.+?:(\i)\.guild_id)/,replace:(e,t)=>`$self.isHiddenChannel(${t})?null:(${e})`},{match:/"recents".+?&&(?=\(.+?channelId:(\i)\.id,showRequestToSpeakSidebar)/,replace:(e,t)=>`${e}!$self.isHiddenChannel(${t})&&`}]},{find:",queryStaticRouteChannels(",replacement:[{match:/(?<=queryChannels\(\i\){.+?getChannels\(\i)(?=\))/,replace:",true"},{match:/(?<=queryChannels\(\i\){.+?\)\((\i)\.type\))(?=&&!\i\.\i\.can\()/,replace:"&&!$self.isHiddenChannel($1)"}]},{find:'"^/guild-stages/(\\\\d+)(?:/)?(\\\\d+)?"',replacement:{match:/\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL,\i\)/,replace:"true"}},{find:'className:"channelMention",children',replacement:{match:/(?<=getChannel\(\i\);if\(null!=(\i))(?=.{0,100}?selectVoiceChannel)/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`}},{find:'="GuildChannelStore",',replacement:[{match:/isChannelGated\(.+?\)(?=&&)/,replace:e=>`${e}&&false`},{match:/(?<=getChannels\(\i)(\){.+?)return (.+?)}/,replace:(e,t,o)=>`,shouldIncludeHidden${t}return $self.resolveGuildChannels(${o},shouldIncludeHidden??arguments[0]==="@favorites");}`}]},{find:".Messages.FORM_LABEL_MUTED",replacement:{match:/(?<=getChannels\(\i)(?=\))/,replace:",true"}},{find:'="NowPlayingViewStore",',replacement:{match:/(getVoiceStateForUser.{0,150}?)&&\i\.\i\.canWithPartialContext.{0,20}VIEW_CHANNEL.+?}\)(?=\?)/,replace:"$1"}}],isHiddenChannel(e,t=!1){try{return!e||(e.channelId&&(e=te.getChannel(e.channelId)),!e||e.isDM()||e.isGroupDM()||e.isMultiUserDM())?!1:!We.can(Ie.VIEW_CHANNEL,e)||t&&!We.can(Ie.CONNECT,e)}catch(o){return console.error("[ViewHiddenChannels#isHiddenChannel]: ",o),!1}},resolveGuildChannels(e,t){if(t)return e;let o={};for(let[r,i]of Object.entries(e)){if(!Array.isArray(i)){o[r]=i;continue}o[r]??=[];for(let s of i)(s.channel.id===null||!this.isHiddenChannel(s.channel))&&o[r].push(s)}return o},makeAllowedRolesReduce(e){return[(t,o,r,i)=>{if(r!==0)return t;let s=i.find(l=>l.id===e);return s?[s]:i},[]]},HiddenChannelLockScreen:e=>n(lN,{channel:e}),LockIcon:k.wrap(()=>n("svg",{className:uN.icon,height:"18",width:"20",viewBox:"0 0 24 24","aria-hidden":!0,role:"img"},n("path",{className:"shc-evenodd-fill-current-color",d:"M17 11V7C17 4.243 14.756 2 12 2C9.242 2 7 4.243 7 7V11C5.897 11 5 11.896 5 13V20C5 21.103 5.897 22 7 22H17C18.103 22 19 21.103 19 20V13C19 11.896 18.103 11 17 11ZM12 18C11.172 18 10.5 17.328 10.5 16.5C10.5 15.672 11.172 15 12 15C12.828 15 13.5 15.672 13.5 16.5C13.5 17.328 12.828 18 12 18ZM15 11H9V7C9 5.346 10.346 4 12 4C13.654 4 15 5.346 15 7V11Z"})),{noop:!0}),HiddenChannelIcon:k.wrap(()=>n(oe,{text:"Hidden Channel"},({onMouseLeave:e,onMouseEnter:t})=>n("svg",{onMouseLeave:e,onMouseEnter:t,className:uN.icon+" shc-hidden-channel-icon",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":!0,role:"img"},n("path",{className:"shc-evenodd-fill-current-color",d:"m19.8 22.6-4.2-4.15q-.875.275-1.762.413Q12.95 19 12 19q-3.775 0-6.725-2.087Q2.325 14.825 1 11.5q.525-1.325 1.325-2.463Q3.125 7.9 4.15 7L1.4 4.2l1.4-1.4 18.4 18.4ZM12 16q.275 0 .512-.025.238-.025.513-.1l-5.4-5.4q-.075.275-.1.513-.025.237-.025.512 0 1.875 1.312 3.188Q10.125 16 12 16Zm7.3.45-3.175-3.15q.175-.425.275-.862.1-.438.1-.938 0-1.875-1.312-3.188Q13.875 7 12 7q-.5 0-.938.1-.437.1-.862.3L7.65 4.85q1.025-.425 2.1-.638Q10.825 4 12 4q3.775 0 6.725 2.087Q21.675 8.175 23 11.5q-.575 1.475-1.512 2.738Q20.55 15.5 19.3 16.45Zm-4.625-4.6-3-3q.7-.125 1.288.112.587.238 1.012.688.425.45.613 1.038.187.587.087 1.162Z"}))),{noop:!0})})});var gr,af,dN=f(()=>{"use strict";a();_();P();w();gr=A({showTimeouts:{type:3,description:"Show member timeout icons in chat.",default:!0},showInvitesPaused:{type:3,description:"Show the invites paused tooltip in the server list.",default:!0},showModView:{type:3,description:"Show the member mod view context menu item in all servers.",default:!0},disableDiscoveryFilters:{type:3,description:"Disable filters in Server Discovery search that hide servers that don't meet discovery criteria.",default:!0},disableDisallowedDiscoveryFilters:{type:3,description:"Disable filters in Server Discovery search that hide NSFW & disallowed servers.",default:!0}});gn("ShowHiddenThings","ShowTimeouts");af=h({name:"ShowHiddenThings",tags:["ShowTimeouts","ShowInvitesPaused","ShowModView","DisableDiscoveryFilters"],description:"Displays various hidden & moderator-only things regardless of permissions.",authors:[p.Dolfies],patches:[{find:"showCommunicationDisabledStyles",predicate:()=>gr.store.showTimeouts,replacement:{match:/&&\i\.\i\.canManageUser\(\i\.\i\.MODERATE_MEMBERS,\i\.author,\i\)/,replace:""}},{find:"2022-07_invites_disabled",predicate:()=>gr.store.showInvitesPaused,replacement:{match:/\i\.\i\.can\(\i\.\i.MANAGE_GUILD,\i\)/,replace:"true"}},{find:/context:\i,checkElevated:!1\}\),\i\.\i.{0,200}autoTrackExposure/,predicate:()=>gr.store.showModView,replacement:{match:/return \i\.\i\(\i\.\i\(\{user:\i,context:\i,checkElevated:!1\}\),\i\.\i\)/,replace:"return true"}},{find:"prod_discoverable_guilds",predicate:()=>gr.store.disableDiscoveryFilters,replacement:{match:/\{"auto_removed:.*?\}/,replace:"{}"}},{find:'">200"',predicate:()=>gr.store.disableDiscoveryFilters,replacement:{match:'">200"',replace:'">0"'}},{find:'"horny","fart"',predicate:()=>gr.store.disableDisallowedDiscoveryFilters,replacement:{match:/=\["egirl",.+?\]/,replace:"=[]"}},{find:'"pepe","nude"',predicate:()=>gr.store.disableDisallowedDiscoveryFilters,replacement:{match:/(?<=[?=])\["pepe",.+?\]/,replace:"[]"}},{find:".GUILD_DISCOVERY_VALID_TERM",predicate:()=>gr.store.disableDisallowedDiscoveryFilters,all:!0,replacement:{match:/\i\.\i\.get\(\{url:\i\.\i\.GUILD_DISCOVERY_VALID_TERM,query:\{term:\i\},oldFormErrors:!0\}\);/g,replace:"Promise.resolve({ body: { valid: true } });"}}],settings:gr})});var mN=f(()=>{});var Fl,lf,fN=f(()=>{"use strict";a();mN();_();re();P();w();Fl=A({mode:{type:4,description:"How to display usernames and nicks",options:[{label:"Username then nickname",value:"user-nick",default:!0},{label:"Nickname then username",value:"nick-user"},{label:"Username only",value:"user"}]},displayNames:{type:3,description:"Use display names in place of usernames",default:!1},inReplies:{type:3,default:!1,description:"Also apply functionality to reply previews"}}),lf=h({name:"ShowMeYourName",description:"Display usernames next to nicks, or no nicks at all",authors:[p.Rini,p.TheKodeToad],patches:[{find:'?"@":"")',replacement:{match:/(?<=onContextMenu:\i,children:).*?\)}/,replace:"$self.renderUsername(arguments[0])}"}}],settings:Fl,renderUsername:k.wrap(({author:e,message:t,isRepliedMessage:o,withMentionPrefix:r,userOverride:i})=>{try{let s=i??t.author,{username:l}=s;Fl.store.displayNames&&(l=s.globalName||l);let{nick:u}=e,c=r?"@":"";return o&&!Fl.store.inReplies||l===u.toLowerCase()?n(d,null,c,u):Fl.store.mode==="user-nick"?n(d,null,c,l," ",n("span",{className:"vc-smyn-suffix"},u)):Fl.store.mode==="nick-user"?n(d,null,c,u," ",n("span",{className:"vc-smyn-suffix"},l)):n(d,null,c,l)}catch{return n(d,null,e?.nick)}},{noop:!0})})});var gN=f(()=>{});function yN(e,t){let o=te.getChannel(e.channel_id)?.guild_id;if(!o)return null;let r=Be.getMember(o,e.author.id);if(!r?.communicationDisabledUntil)return null;let i=()=>n(C8,{deadline:new Date(r.communicationDisabledUntil),showUnits:!0,stopAtOneSec:!0});return t?i():Se.Messages.GUILD_ENABLE_COMMUNICATION_TIME_REMAINING.format({username:e.author.username,countdown:i})}var C8,hN,cf,vN=f(()=>{"use strict";a();gN();_();re();P();w();$();b();C8=Ki(e=>e.prototype?.render?.toString().includes(".MAX_AGE_NEVER")),hN=A({displayStyle:{description:"How to display the timeout duration",type:4,options:[{label:"In the Tooltip",value:"tooltip"},{label:"Next to the timeout icon",value:"ssalggnikool",default:!0}]}});cf=h({name:"ShowTimeoutDuration",description:"Shows how much longer a user's timeout will last, either in the timeout icon tooltip or next to it",authors:[p.Ven,p.Sqaaakoi],settings:hN,patches:[{find:".GUILD_COMMUNICATION_DISABLED_ICON_TOOLTIP_BODY",replacement:[{match:/(\i)\.Tooltip,{(text:.{0,30}\.Messages\.GUILD_COMMUNICATION_DISABLED_ICON_TOOLTIP_BODY)/,replace:"$self.TooltipWrapper,{message:arguments[0].message,$2"}]}],TooltipWrapper:k.wrap(({message:e,children:t,text:o})=>hN.store.displayStyle==="tooltip"?n(oe,{children:t,text:yN(e,!1)}):n("div",{className:"vc-std-wrapper"},n(oe,{text:o,children:t}),n(Z,{variant:"text-md/normal",color:"status-danger"},yN(e,!0)," timeout remaining")),{noop:!0})})});var E0,O0,R8,uf,SN=f(()=>{"use strict";a();or();Rn();_();P();w();b();E0=!1,O0=A({persistState:{type:3,description:"Whether to persist the state of the silent message toggle when changing channels",default:!1,onChange(e){e===!1&&(E0=!1)}},autoDisable:{type:3,description:"Automatically disable the silent message toggle again after sending one",default:!0}}),R8=({isMainChat:e})=>{let[t,o]=K(E0);function r(i){O0.store.persistState&&(E0=i),o(i)}return ce(()=>{let i=(s,l)=>{t&&(O0.store.autoDisable&&r(!1),l.content.startsWith("@silent ")||(l.content="@silent "+l.content))};return bo(i),()=>void To(i)},[t]),e?n(qo,{tooltip:t?"Disable Silent Message":"Enable Silent Message",onClick:()=>r(!t)},n("svg",{width:"24",height:"24",viewBox:"0 0 24 24",style:{scale:"1.2"}},n("path",{fill:"currentColor",mask:"url(#vc-silent-msg-mask)",d:"M18 10.7101C15.1085 9.84957 13 7.17102 13 4c0-.30736.0198-.6101.0582-.907C12.7147 3.03189 12.3611 3 12 3 8.686 3 6 5.686 6 9v5c0 1.657-1.344 3-3 3v1h18v-1c-1.656 0-3-1.343-3-3v-3.2899ZM8.55493 19c.693 1.19 1.96897 2 3.44497 2s2.752-.81 3.445-2H8.55493ZM18.2624 5.50209 21 2.5V1h-4.9651v1.49791h2.4411L16 5.61088V7h5V5.50209h-2.7376Z"}),!t&&n(d,null,n("mask",{id:"vc-silent-msg-mask"},n("path",{fill:"#fff",d:"M0 0h24v24H0Z"}),n("path",{stroke:"#000","stroke-width":"5.99068",d:"M0 24 24 0"})),n("path",{fill:"var(--status-danger)",d:"m21.178 1.70703 1.414 1.414L4.12103 21.593l-1.414-1.415L21.178 1.70703Z"})))):null},uf=h({name:"SilentMessageToggle",authors:[p.Nuckyz,p.CatNoir],description:"Adds a button to the chat bar to toggle sending a silent message.",dependencies:["MessageEventsAPI","ChatInputButtonAPI"],settings:O0,start:()=>Wo("SilentMessageToggle",R8),stop:()=>Sn("SilentMessageToggle")})});var wn,k8,D8,pf,bN=f(()=>{"use strict";a();or();Do();So();_();P();w();b();wn=A({showIcon:{type:3,default:!1,description:"Show an icon for toggling the plugin",restartNeeded:!0},contextMenu:{type:3,description:"Add option to toggle the functionality in the chat input context menu",default:!0},isEnabled:{type:3,description:"Toggle functionality",default:!0}}),k8=({isMainChat:e})=>{let{isEnabled:t,showIcon:o}=wn.use(["isEnabled","showIcon"]),r=()=>wn.store.isEnabled=!wn.store.isEnabled;return!e||!o?null:n(qo,{tooltip:t?"Disable Silent Typing":"Enable Silent Typing",onClick:r},n("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},n("path",{fill:"currentColor",d:"M528 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h480c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM128 180v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm-336 96v-40c0-6.627-5.373-12-12-12H76c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm288 0v-40c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h232c6.627 0 12-5.373 12-12zm96 0v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12z"}),t&&n("path",{d:"M13 432L590 48",stroke:"var(--red-500)","stroke-width":"72","stroke-linecap":"round"})))},D8=e=>{let{isEnabled:t,contextMenu:o}=wn.use(["isEnabled","contextMenu"]);if(!o)return;let r=tt("submit-button",e);if(!r)return;let i=r.findIndex(s=>s?.props?.id==="submit-button");r.splice(i+1,0,n(E.MenuCheckboxItem,{id:"vc-silent-typing",label:"Enable Silent Typing",checked:t,action:()=>wn.store.isEnabled=!wn.store.isEnabled}))},pf=h({name:"SilentTyping",authors:[p.Ven,p.Rini,p.ImBanana],description:"Hide that you are typing",dependencies:["CommandsAPI","ChatInputButtonAPI"],settings:wn,contextMenus:{"textarea-context":D8},patches:[{find:'.dispatch({type:"TYPING_START_LOCAL"',replacement:{match:/startTyping\(\i\){.+?},stop/,replace:"startTyping:$self.startTyping,stop"}}],commands:[{name:"silenttype",description:"Toggle whether you're hiding that you're typing or not.",inputType:0,options:[{name:"value",description:"whether to hide or not that you're typing (default is toggle)",required:!1,type:5}],execute:async(e,t)=>{wn.store.isEnabled=!!Ot(e,"value",!wn.store.isEnabled),Me(t.channel.id,{content:wn.store.isEnabled?"Silent typing enabled!":"Silent typing disabled!"})}}],async startTyping(e){wn.store.isEnabled||F.dispatch({type:"TYPING_START_LOCAL",channelId:e})},start:()=>Wo("SilentTyping",k8),stop:()=>Sn("SilentTyping")})});var TN,df,wN=f(()=>{"use strict";a();_();Rt();P();w();b();TN=A({showDates:{type:3,description:"Show dates on friend requests",default:!1,restartNeeded:!0}}),df=h({name:"SortFriendRequests",authors:[p.Megu],description:"Sorts friend requests by date of receipt",settings:TN,patches:[{find:"getRelationshipCounts(){",replacement:{match:/\}\)\.sortBy\((.+?)\)\.value\(\)/,replace:"}).sortBy(row => $self.wrapSort(($1), row)).value()"}},{find:".Messages.FRIEND_REQUEST_CANCEL",replacement:{predicate:()=>TN.store.showDates,match:/subText:(\i)(?=,className:\i\.userInfo}\))(?<=user:(\i).+?)/,replace:(e,t,o)=>`subText:$self.makeSubtext(${t},${o})`}}],wrapSort(e,t){return t.type===3||t.type===4?-this.getSince(t.user):e(t)},getSince(e){return new Date(Le.getSince(e.id))},makeSubtext(e,t){let o=this.getSince(t);return n(pe,{flexDirection:"row",style:{gap:0,flexWrap:"wrap",lineHeight:"0.9rem"}},n("span",null,e),!isNaN(o.getTime())&&n("span",null,"Received \u2014 ",o.toDateString()))}})});var xN,PN=f(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/spotifyControls/hoverOnly.css",{name:"src/plugins/spotifyControls/hoverOnly.css",source:`.vc-spotify-button-row {
|
|
height: 0;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: 0.2s;
|
|
transition-property: height;
|
|
}
|
|
|
|
#vc-spotify-player:hover .vc-spotify-button-row {
|
|
opacity: 1;
|
|
height: 32px;
|
|
pointer-events: auto;
|
|
|
|
/* only transition opacity on show to prevent clipping */
|
|
transition-property: height, opacity;
|
|
}
|
|
`,classNames:{},dom:null});xN="src/plugins/spotifyControls/hoverOnly.css"});var IN=f(()=>{});var nt,MN=f(()=>{"use strict";a();_();$();b();nt=Ao(()=>{let{Store:e}=ci,t=ea("getActiveSocketAndDevice"),o=C("vcSpotifyMarker"),r="https://api.spotify.com/v1/me/player";class i extends e{mPosition=0;start=0;track=null;device=null;isPlaying=!1;repeat="off";shuffle=!1;volume=0;isSettingPosition=!1;openExternal(u){let c=j.plugins.SpotifyControls.useSpotifyUris||Vencord.Plugins.isPluginEnabled("OpenInApp")?"spotify:"+u.replaceAll("/",(m,g)=>g===0?"":":"):"https://open.spotify.com"+u;VencordNative.native.openExternal(c)}get position(){let u=this.mPosition;return this.isPlaying&&(u+=Date.now()-this.start),u}set position(u){this.mPosition=u,this.start=Date.now()}prev(){this.req("post","/previous")}next(){this.req("post","/next")}setVolume(u){this.req("put","/volume",{query:{volume_percent:Math.round(u)}}).then(()=>{this.volume=u,this.emitChange()})}setPlaying(u){this.req("put",u?"/play":"/pause")}setRepeat(u){this.req("put","/repeat",{query:{state:u}})}setShuffle(u){this.req("put","/shuffle",{query:{state:u}}).then(()=>{this.shuffle=u,this.emitChange()})}seek(u){return this.isSettingPosition?Promise.resolve():(this.isSettingPosition=!0,this.req("put","/seek",{query:{position_ms:Math.round(u)}}).catch(c=>{console.error("[VencordSpotifyControls] Failed to seek",c),this.isSettingPosition=!1}))}req(u,c,m={}){this.device?.is_active&&((m.query??={}).device_id=this.device.id);let{socket:g}=t.getActiveSocketAndDevice();return o[u](g.accountId,g.accessToken,{url:r+c,...m})}}let s=new i(F,{SPOTIFY_PLAYER_STATE(l){s.track=l.track,s.device=l.device??null,s.isPlaying=l.isPlaying??!1,s.volume=l.volumePercent??0,s.repeat=l.actual_repeat||"off",s.position=l.position??0,s.isSettingPosition=!1,s.emitChange()},SPOTIFY_SET_DEVICES({devices:l}){s.device=l.find(u=>u.is_active)??l[0]??null,s.emitChange()}});return s})});function _0(e){let t=e/1e3/60,o=Math.floor(t),r=Math.floor((t-o)*60);return`${o.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`}function js(e,t){return()=>n("svg",{className:q(mt("button-icon"),mt(t)),height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":t,focusable:!1},n("path",{d:e}))}function Ul(e){return n("button",{className:mt("button"),...e},e.children)}function U8({name:e,path:t}){let o=`spotify-copy-${e}`,r=`spotify-open-${e}`;return n(E.Menu,{navId:`spotify-${e}-menu`,onClose:()=>F.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":`Spotify ${e} Menu`},n(E.MenuItem,{key:o,id:o,label:`Copy ${e} Link`,action:()=>po("https://open.spotify.com"+t),icon:xi}),n(E.MenuItem,{key:r,id:r,label:`Open ${e} in Spotify`,action:()=>nt.openExternal(t),icon:Hn}))}function $8(e,t){return o=>Jt.openContextMenu(o,()=>n(U8,{name:e,path:t}))}function G8(){let[e,t,o]=Fe([nt],()=>[nt.isPlaying,nt.shuffle,nt.repeat]),[r,i]=(()=>{switch(o){case"off":return["context","repeat-off"];case"context":return["track","repeat-context"];case"track":return["off","repeat-track"];default:throw new Error(`Invalid repeat state ${o}`)}})();return n(pe,{className:mt("button-row"),style:{gap:0}},n(Ul,{className:q(mt("button"),mt(t?"shuffle-on":"shuffle-off")),onClick:()=>nt.setShuffle(!t)},n(F8,null)),n(Ul,{onClick:()=>nt.prev()},n(O8,null)),n(Ul,{onClick:()=>nt.setPlaying(!e)},e?n(E8,null):n(L8,null)),n(Ul,{onClick:()=>nt.next()},n(_8,null)),n(Ul,{className:q(mt("button"),mt(i)),onClick:()=>nt.setRepeat(r),style:{position:"relative"}},o==="track"&&n("span",{className:mt("repeat-1")},"1"),n(B8,null)))}function z8(){let{duration:e}=nt.track,[t,o,r]=Fe([nt],()=>[nt.mPosition,nt.isSettingPosition,nt.isPlaying]),[i,s]=K(t);return ce(()=>{if(r&&!o){s(nt.position);let l=setInterval(()=>{s(u=>u+1e3)},1e3);return()=>clearInterval(l)}},[t,o,r]),n("div",{id:mt("progress-bar")},n(S.FormText,{variant:"text-xs/medium",className:mt("progress-time")+" "+mt("time-left"),"aria-label":"Progress"},_0(i)),n(E.MenuSliderControl,{minValue:0,maxValue:e,value:i,onChange:l=>{o||(s(l),H8(l))},renderValue:_0}),n(S.FormText,{variant:"text-xs/medium",className:mt("progress-time")+" "+mt("time-right"),"aria-label":"Total Duration"},_0(e)))}function j8({track:e}){let t=Fe([nt],()=>nt.volume);return n(E.Menu,{navId:"spotify-album-menu",onClose:()=>F.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Spotify Album Menu"},n(E.MenuItem,{key:"open-album",id:"open-album",label:"Open Album",action:()=>nt.openExternal(`/album/${e.album.id}`),icon:Hn}),n(E.MenuItem,{key:"view-cover",id:"view-cover",label:"View Album Cover",action:()=>Go(e.album.image.url),icon:dn}),n(E.MenuControlItem,{id:"spotify-volume",key:"spotify-volume",label:"Volume",control:(o,r)=>n(E.MenuSliderControl,{...o,ref:r,value:t,minValue:0,maxValue:100,onChange:ro(i=>nt.setVolume(i))})}))}function B0(e,t,o){return t?{role:"link",onClick:()=>nt.openExternal(o),onContextMenu:$8(e,o)}:{}}function W8({track:e}){let t=e?.album?.image,[o,r]=K(!1),i=n(d,null,t&&n("img",{id:mt("album-image"),src:t.url,alt:"Album Image",onClick:()=>r(!o),onContextMenu:s=>{Jt.openContextMenu(s,()=>n(j8,{track:e}))}}));return o&&t?n("div",{id:mt("album-expanded-wrapper")},i):n("div",{id:mt("info-wrapper")},i,n("div",{id:mt("titles")},n(S.FormText,{variant:"text-sm/semibold",id:mt("song-title"),className:mt("ellipoverflow"),title:e.name,...B0("Song",e.id,`/track/${e.id}`)},e.name),e.artists.some(s=>s.name)&&n(S.FormText,{variant:"text-sm/normal",className:mt("ellipoverflow")},"by\xA0",e.artists.map((s,l)=>n(H.Fragment,{key:s.name},n("span",{className:mt("artist"),style:{fontSize:"inherit"},title:s.name,...B0("Artist",s.id,`/artist/${s.id}`)},s.name),l!==e.artists.length-1&&n("span",{className:mt("comma")},", ")))),e.album.name&&n(S.FormText,{variant:"text-sm/normal",className:mt("ellipoverflow")},"on\xA0",n("span",{id:mt("album-title"),className:mt("album"),style:{fontSize:"inherit"},title:e.album.name,...B0("Album",e.album.id,`/album/${e.album.id}`)},e.album.name))))}function AN(){let e=Fe([nt],()=>nt.track,null,(l,u)=>l?.id?l.id===u?.id:l?.name===u?.name),t=Fe([nt],()=>nt.device,null,(l,u)=>l?.id===u?.id),o=Fe([nt],()=>nt.isPlaying),[r,i]=K(!1);if(H.useEffect(()=>{if(i(!1),!o){let l=setTimeout(()=>i(!0),3e5);return()=>clearTimeout(l)}},[o]),!e||!t?.is_active||r)return null;let s={"--vc-spotify-track-image":`url(${e?.album?.image?.url||""})`};return n("div",{id:mt("player"),style:s},n(W8,{track:e}),n(z8,null),n(G8,null))}var mt,L8,E8,O8,_8,B8,F8,H8,NN=f(()=>{"use strict";a();IN();Rt();bt();Mr();pt();be();b();MN();mt=e=>`vc-spotify-${e}`;L8=js("M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69L9.54 5.98C8.87 5.55 8 6.03 8 6.82z","play"),E8=js("M8 19c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2v10c0 1.1.9 2 2 2zm6-12v10c0 1.1.9 2 2 2s2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2z","pause"),O8=js("M7 6c.55 0 1 .45 1 1v10c0 .55-.45 1-1 1s-1-.45-1-1V7c0-.55.45-1 1-1zm3.66 6.82l5.77 4.07c.66.47 1.58-.01 1.58-.82V7.93c0-.81-.91-1.28-1.58-.82l-5.77 4.07c-.57.4-.57 1.24 0 1.64z","previous"),_8=js("M7.58 16.89l5.77-4.07c.56-.4.56-1.24 0-1.63L7.58 7.11C6.91 6.65 6 7.12 6 7.93v8.14c0 .81.91 1.28 1.58.82zM16 7v10c0 .55.45 1 1 1s1-.45 1-1V7c0-.55-.45-1-1-1s-1 .45-1 1z","next"),B8=js("M7 7h10v1.79c0 .45.54.67.85.35l2.79-2.79c.2-.2.2-.51 0-.71l-2.79-2.79c-.31-.31-.85-.09-.85.36V5H6c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1V7zm10 10H7v-1.79c0-.45-.54-.67-.85-.35l-2.79 2.79c-.2.2-.2.51 0 .71l2.79 2.79c.31.31.85.09.85-.36V19h11c.55 0 1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1v3z","repeat"),F8=js("M10.59 9.17L6.12 4.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41l4.46 4.46 1.42-1.4zm4.76-4.32l1.19 1.19L4.7 17.88c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L17.96 7.46l1.19 1.19c.31.31.85.09.85-.36V4.5c0-.28-.22-.5-.5-.5h-3.79c-.45 0-.67.54-.36.85zm-.52 8.56l-1.41 1.41 3.13 3.13-1.2 1.2c-.31.31-.09.85.36.85h3.79c.28 0 .5-.22.5-.5v-3.79c0-.45-.54-.67-.85-.35l-1.19 1.19-3.13-3.14z","shuffle");H8=ro(e=>{nt.seek(e)})});function CN(e){(e?zt:go)(xN)}var mf,RN=f(()=>{"use strict";a();_();Ve();re();P();w();PN();NN();mf=h({name:"SpotifyControls",description:"Adds a Spotify player above the account panel",authors:[p.Ven,p.afn,p.KraXen72,p.Av32000],options:{hoverControls:{description:"Show controls on hover",type:3,default:!1,onChange:e=>CN(e)},useSpotifyUris:{type:3,description:"Open Spotify URIs instead of Spotify URLs. Will only work if you have Spotify installed and might not work on all platforms",default:!1}},patches:[{find:'"AccountConnected"',replacement:{match:/(?<=\i\.jsxs?\)\()(\i),{(?=[^}]*?userTag:\i,hidePrivateData:)/,replace:"$self.PanelWrapper,{VencordOriginal:$1,"}},{find:".PLAYER_DEVICES",replacement:[{match:/get:(\i)\.bind\(null,(\i\.\i)\.get\)/,replace:"post:$1.bind(null,$2.post),vcSpotifyMarker:1,$&"},{match:/202===\i\.status/,replace:"false"}]},{find:'repeat:"off"!==',replacement:{match:/repeat:"off"!==(.{1,3}),/,replace:"actual_repeat:$1,$&"}},{find:"artists.filter",replacement:{match:/(?<=artists.filter\(\i=>).{0,10}\i\.id\)&&/,replace:""}}],start:()=>CN(j.plugins.SpotifyControls.hoverControls),PanelWrapper({VencordOriginal:e,...t}){return n(d,null,n(k,{fallback:()=>n("div",{className:"vc-spotify-fallback"},n("p",null,"Failed to render Spotify Modal :("),n("p",null,"Check the console for errors"))},n(AN,null)),n(e,{...t}))}})});var F0,ff,kN=f(()=>{"use strict";a();_();P();w();F0=A({noSpotifyAutoPause:{description:"Disable Spotify auto-pause",type:3,default:!0,restartNeeded:!0},keepSpotifyActivityOnIdle:{description:"Keep Spotify activity playing when idling",type:3,default:!1,restartNeeded:!0}}),ff=h({name:"SpotifyCrack",description:"Free listen along, no auto-pausing in voice chat, and allows activity to continue playing when idling",authors:[p.Cyn,p.Nuckyz],settings:F0,patches:[{find:'dispatch({type:"SPOTIFY_PROFILE_UPDATE"',replacement:{match:/SPOTIFY_PROFILE_UPDATE.+?isPremium:(?="premium"===(\i)\.body\.product)/,replace:(e,t)=>`${e}(${t}.body.product="premium")&&`}},{find:'"displayName","SpotifyStore")',replacement:[{predicate:()=>F0.store.noSpotifyAutoPause,match:/(?<=function \i\(\){)(?=.{0,200}SPOTIFY_AUTO_PAUSED\))/,replace:"return;"},{predicate:()=>F0.store.keepSpotifyActivityOnIdle,match:/(shouldShowActivity\(\){.{0,50})&&!\i\.\i\.isIdle\(\)/,replace:"$1"}]}]})});function $0(e,t){t={invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};let o=q8.getPendingReply(e);Co.sendMessage(e,t,void 0,Co.getSendMessageOptionsForReply(o)).then(()=>{o&&F.dispatch({type:"DELETE_PENDING_REPLY",channelId:e})})}var U0,q8,gf,DN=f(()=>{"use strict";a();Do();P();w();$();b();U0=C("getPlayerState"),q8=C("getPendingReply");gf=h({name:"SpotifyShareCommands",description:"Share your current Spotify track, album or artist via slash command (/track, /album, /artist)",authors:[p.katlyn],dependencies:["CommandsAPI"],commands:[{name:"track",description:"Send your current Spotify track to chat",inputType:0,options:[],execute:(e,t)=>{let o=U0.getTrack();if(o===null){Me(t.channel.id,{content:"You're not listening to any music."});return}$0(t.channel.id,{content:`https://open.spotify.com/track/${o.id}`})}},{name:"album",description:"Send your current Spotify album to chat",inputType:0,options:[],execute:(e,t)=>{let o=U0.getTrack();if(o===null){Me(t.channel.id,{content:"You're not listening to any music."});return}$0(t.channel.id,{content:`https://open.spotify.com/album/${o.album.id}`})}},{name:"artist",description:"Send your current Spotify artist to chat",inputType:0,options:[],execute:(e,t)=>{let o=U0.getTrack();if(o===null){Me(t.channel.id,{content:"You're not listening to any music."});return}$0(t.channel.id,{content:o.artists[0].external_urls.spotify})}}]})});function K8({emoji:e,prefix:t,log:o,delta:r,instance:i}){return n(H.Fragment,null,n("span",null,i.sinceStart.toFixed(3),"s"),n("span",null,i.sinceLast.toFixed(3),"s"),n("span",null,r?.toFixed(0)??""),n("span",null,n("pre",null,e," ",t??" ",o)))}function Y8({title:e,logs:t,traceEnd:o}){let r=t.find(l=>l.timestamp)?.timestamp??0,i=r,s=t.map(l=>{let u=l.timestamp??i,c=(u-r)/1e3,m=(u-i)/1e3;return i=u,{sinceStart:c,sinceLast:m}});return n(S.FormSection,{title:e,tag:"h1"},n("code",null,o&&n("div",{style:{color:"var(--header-primary)",marginBottom:5,userSelect:"text"}},"Trace ended at: ",new Date(o).toTimeString()),n("div",{style:{color:"var(--header-primary)",display:"grid",gridTemplateColumns:"repeat(3, auto) 1fr",gap:"2px 10px",userSelect:"text"}},n("span",null,"Start"),n("span",null,"Interval"),n("span",null,"Delta"),n("span",{style:{marginBottom:5}},"Event"),$l.logs.map((l,u)=>n(K8,{key:u,...l,instance:s[u]})))))}function Z8({trace:e}){let t=e.split(`
|
|
`);return n(S.FormSection,{title:"Server Trace",tag:"h2"},n("code",null,n(pe,{flexDirection:"column",style:{color:"var(--header-primary)",gap:5,userSelect:"text"}},t.map(o=>n("span",null,o)))))}function X8(){if(!$l?.logs)return n("div",null,"Loading...");let e=$l.logGroups.find(t=>t.serverTrace)?.serverTrace;return n(H.Fragment,null,n(Y8,{title:"Startup Timings",logs:$l.logs,traceEnd:$l.endTime_}),n("div",{style:{marginTop:5}},"\xA0"),e&&n(Z8,{trace:e}))}var $l,LN,EN=f(()=>{"use strict";a();re();Rt();$();b();$l=C("markWithDelta","markAndLog","markAt");LN=k.wrap(X8)});var hf,ON=f(()=>{"use strict";a();P();w();EN();hf=h({name:"StartupTimings",description:"Adds Startup Timings to the Settings menu",authors:[p.Megu],patches:[{find:"Messages.ACTIVITY_SETTINGS",replacement:{match:/(?<=}\)([,;])(\i\.settings)\.forEach.+?(\i)\.push.+}\)}\))/,replace:(e,t,o,r)=>`${t}${o}?.[0]==="CHANGELOG"&&${r}.push({section:"StartupTimings",label:"Startup Timings",element:$self.StartupTimingPage})`}}],StartupTimingPage:LN})});function _N({streamKey:e},t){!e.endsWith(L.getCurrentUser().id)||F.dispatch({type:"STREAMER_MODE_UPDATE",key:"enabled",value:t})}var yf,BN=f(()=>{"use strict";a();P();w();b();yf=h({name:"StreamerModeOnStream",description:"Automatically enables streamer mode when you start streaming in Discord",authors:[p.Kodarru],flux:{STREAM_CREATE:e=>_N(e,!0),STREAM_DELETE:e=>_N(e,!1)}})});var vf,Sf,FN=f(()=>{"use strict";a();_();P();w();b();vf=A({superReactByDefault:{type:3,description:"Reaction picker will default to Super Reactions",default:!0},unlimitedSuperReactionPlaying:{type:3,description:"Remove the limit on Super Reactions playing at once",default:!1},superReactionPlayingLimit:{description:"Max Super Reactions to play at once",type:5,default:20,markers:[5,10,20,40,60,80,100],stickToMarkers:!0}},{superReactionPlayingLimit:{disabled(){return this.store.unlimitedSuperReactionPlaying}}}),Sf=h({name:"SuperReactionTweaks",description:"Customize the limit of Super Reactions playing at once, and super react by default",authors:[p.FieryFlames,p.ant0n],patches:[{find:",BURST_REACTION_EFFECT_PLAY",replacement:{match:/(BURST_REACTION_EFFECT_PLAY:\i=>{.{50,100})(\i\(\i,\i\))>=\d+/,replace:"$1!$self.shouldPlayBurstReaction($2)"}},{find:".EMOJI_PICKER_CONSTANTS_EMOJI_CONTAINER_PADDING_HORIZONTAL)",replacement:{match:/(openPopoutType:void 0(?=.+?isBurstReaction:(\i).+?(\i===\i\.\i.REACTION)).+?\[\2,\i\]=\i\.useState\().+?\)/,replace:(e,t,o,r)=>`${t}$self.shouldSuperReactByDefault&&${r})`}}],settings:vf,shouldPlayBurstReaction(e){return!!(vf.store.unlimitedSuperReactionPlaying||e<=vf.store.superReactionPlayingLimit)},get shouldSuperReactByDefault(){return vf.store.superReactByDefault&&L.getCurrentUser().premiumType!=null}})});function zN(e){let t=e.match(/^(\/)?(.+?)(?:\/([gimsuyv]*))?$/);return t?new RegExp(t[2],t[3]?.split("").filter((o,r,i)=>i.indexOf(o)===r).join("")??"g"):new RegExp(e)}function Q8(e){try{return zN(e),null}catch(t){return n("span",{style:{color:"var(--text-danger)"}},String(t))}}function G0({initialValue:e,onChange:t,placeholder:o}){let[r,i]=K(e);return n(je,{placeholder:o,value:r,onChange:i,spellCheck:!1,onBlur:()=>r!==e&&t(r)})}function UN({title:e,rulesArray:t,rulesKey:o,update:r}){let i=e==="Using Regex";async function s(u){u!==t.length-1&&(t.splice(u,1),await vt.set(o,t),r())}async function l(u,c,m){c===t.length-1&&t.push(HN()),t[c][m]=u,t[c].find===""&&t[c].replace===""&&t[c].onlyIfIncludes===""&&c!==t.length-1&&t.splice(c,1),await vt.set(o,t),r()}return n(d,null,n(S.FormTitle,{tag:"h4"},e),n(pe,{flexDirection:"column",style:{gap:"0.5em"}},t.map((u,c)=>n(H.Fragment,{key:`${u.find}-${c}`},n(pe,{flexDirection:"row",style:{gap:0}},n(pe,{flexDirection:"row",style:{flexGrow:1,gap:"0.5em"}},n(G0,{placeholder:"Find",initialValue:u.find,onChange:m=>l(m,c,"find")}),n(G0,{placeholder:"Replace",initialValue:u.replace,onChange:m=>l(m,c,"replace")}),n(G0,{placeholder:"Only if includes",initialValue:u.onlyIfIncludes,onChange:m=>l(m,c,"onlyIfIncludes")})),n(T,{size:T.Sizes.MIN,onClick:()=>s(c),style:{background:"none",color:"var(--status-danger)",...c===t.length-1?{visibility:"hidden",pointerEvents:"none"}:{}}},n(Pi,null))),i&&Q8(u.find)))))}function V8(){let[e,t]=K("");return n(d,null,n(S.FormTitle,{tag:"h4"},"Test Rules"),n(je,{placeholder:"Type a message",onChange:t}),n(je,{placeholder:"Message with rules applied",editable:!1,value:jN(e)}))}function jN(e){if(e.length===0)return e;if(Tf)for(let t of Tf)!t.find||t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)||(e=` ${e} `.replaceAll(t.find,t.replace.replaceAll("\\n",`
|
|
`)).replace(/^\s|\s$/g,""));if(wf){for(let t of wf)if(!!t.find&&!(t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)))try{let o=zN(t.find);e=e.replace(o,t.replace.replaceAll("\\n",`
|
|
`))}catch{new Q("TextReplace").error(`Invalid regex: ${t.find}`)}}return e=e.trim(),e}var $N,GN,HN,bf,Tf,wf,J8,eE,xf,WN=f(()=>{"use strict";a();Jn();Rn();_();Rt();bt();P();ke();ft();w();b();$N="TextReplace_rulesString",GN="TextReplace_rulesRegex",HN=()=>({find:"",replace:"",onlyIfIncludes:""}),bf=()=>[HN()],Tf=bf(),wf=bf(),J8=A({replace:{type:6,description:"",component:()=>{let e=Jo();return n(d,null,n(UN,{title:"Using String",rulesArray:Tf,rulesKey:$N,update:e}),n(UN,{title:"Using Regex",rulesArray:wf,rulesKey:GN,update:e}),n(V8,null))}}});eE="1102784112584040479",xf=h({name:"TextReplace",description:"Replace text in your messages. You can find pre-made rules in the #textreplace-rules channel in Vencord's Server",authors:[p.AutumnVN,p.TheKodeToad],dependencies:["MessageEventsAPI"],settings:J8,async start(){Tf=await vt.get($N)??bf(),wf=await vt.get(GN)??bf(),this.preSend=bo((e,t)=>{e!==eE&&(t.content=jN(t.content))})},stop(){To(this.preSend)}})});var Pf,qN=f(()=>{"use strict";a();P();w();b();Pf=h({name:"ThemeAttributes",description:"Adds data attributes to various elements for theming purposes",authors:[p.Ven,p.Board],patches:[{find:".tabBarRef",replacement:{match:/style:this\.getStyle\(\),role:"tab"/,replace:"$&,'data-tab-id':this.props.id"}},{find:".messageListItem",replacement:{match:/\.messageListItem(?=,"aria)/,replace:"$&,...$self.getMessageProps(arguments[0])"}},{find:".LABEL_WITH_ONLINE_STATUS",replacement:{match:/src:null!=\i\?(\i).{1,50}"aria-hidden":!0/,replace:"$&,style:$self.getAvatarStyles($1)"}},{find:"showCommunicationDisabledStyles",replacement:{match:/src:(\i),"aria-hidden":!0/,replace:"$&,style:$self.getAvatarStyles($1)"}}],getAvatarStyles(e){return Object.fromEntries([128,256,512,1024,2048,4096].map(t=>[`--avatar-url-${t}`,`url(${e.replace(/\d+$/,String(t))})`]))},getMessageProps(e){let t=e.message?.author,o=t?.id;return{"data-author-id":o,"data-author-username":t?.username,"data-is-self":o&&o===L.getCurrentUser()?.id}}})});var If,KN=f(()=>{"use strict";a();P();w();If=h({name:"TimeBarAllActivities",description:"Adds the Spotify time bar to all activities if they have start and end timestamps",authors:[p.fawn],patches:[{find:"}renderTimeBar(",replacement:{match:/renderTimeBar\((.{1,3})\){.{0,50}?let/,replace:"renderTimeBar($1){let"}}]})});var YN=f(()=>{});var jt,Gl=f(()=>{"use strict";a();_();w();jt=A({receivedInput:{type:0,description:"Input language for received messages",default:"auto",hidden:!0},receivedOutput:{type:0,description:"Output language for received messages",default:"en",hidden:!0},sentInput:{type:0,description:"Input language for sent messages",default:"auto",hidden:!0},sentOutput:{type:0,description:"Output language for sent messages",default:"en",hidden:!0},autoTranslate:{type:3,description:"Automatically translate your messages before sending. You can also shift/right click the translate button to toggle this",default:!1},showChatBarButton:{type:3,description:"Show translate button in chat bar",default:!0}}).withPrivateSettings()});var Mf,H0=f(()=>{"use strict";a();Mf={auto:"Detect language",af:"Afrikaans",sq:"Albanian",am:"Amharic",ar:"Arabic",hy:"Armenian",as:"Assamese",ay:"Aymara",az:"Azerbaijani",bm:"Bambara",eu:"Basque",be:"Belarusian",bn:"Bengali",bho:"Bhojpuri",bs:"Bosnian",bg:"Bulgarian",ca:"Catalan",ceb:"Cebuano",ny:"Chichewa","zh-CN":"Chinese (Simplified)","zh-TW":"Chinese (Traditional)",co:"Corsican",hr:"Croatian",cs:"Czech",da:"Danish",dv:"Dhivehi",doi:"Dogri",nl:"Dutch",en:"English",eo:"Esperanto",et:"Estonian",ee:"Ewe",tl:"Filipino",fi:"Finnish",fr:"French",fy:"Frisian",gl:"Galician",ka:"Georgian",de:"German",el:"Greek",gn:"Guarani",gu:"Gujarati",ht:"Haitian Creole",ha:"Hausa",haw:"Hawaiian",iw:"Hebrew",hi:"Hindi",hmn:"Hmong",hu:"Hungarian",is:"Icelandic",ig:"Igbo",ilo:"Ilocano",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",jw:"Javanese",kn:"Kannada",kk:"Kazakh",km:"Khmer",rw:"Kinyarwanda",gom:"Konkani",ko:"Korean",kri:"Krio",ku:"Kurdish (Kurmanji)",ckb:"Kurdish (Sorani)",ky:"Kyrgyz",lo:"Lao",la:"Latin",lv:"Latvian",ln:"Lingala",lt:"Lithuanian",lg:"Luganda",lb:"Luxembourgish",mk:"Macedonian",mai:"Maithili",mg:"Malagasy",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi","mni-Mtei":"Meiteilon (Manipuri)",lus:"Mizo",mn:"Mongolian",my:"Myanmar (Burmese)",ne:"Nepali",no:"Norwegian",or:"Odia (Oriya)",om:"Oromo",ps:"Pashto",fa:"Persian",pl:"Polish",pt:"Portuguese",pa:"Punjabi",qu:"Quechua",ro:"Romanian",ru:"Russian",sm:"Samoan",sa:"Sanskrit",gd:"Scots Gaelic",nso:"Sepedi",sr:"Serbian",st:"Sesotho",sn:"Shona",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",so:"Somali",es:"Spanish",su:"Sundanese",sw:"Swahili",sv:"Swedish",tg:"Tajik",ta:"Tamil",tt:"Tatar",te:"Telugu",th:"Thai",ti:"Tigrinya",ts:"Tsonga",tr:"Turkish",tk:"Turkmen",ak:"Twi",uk:"Ukrainian",ur:"Urdu",ug:"Uyghur",uz:"Uzbek",vi:"Vietnamese",cy:"Welsh",xh:"Xhosa",yi:"Yiddish",yo:"Yoruba",zu:"Zulu"}});async function Hl(e,t){let o=jt.store[e+"Input"],r=jt.store[e+"Output"],i="https://translate.googleapis.com/translate_a/single?"+new URLSearchParams({client:"gtx",sl:o,tl:r,dt:"t",dj:"1",source:"input",q:t}),s=await fetch(i);if(!s.ok)throw new Error(`Failed to translate "${t}" (${o} -> ${r})
|
|
${s.status} ${s.statusText}`);let{src:l,sentences:u}=await s.json();return{src:l,text:u.map(c=>c?.trans).filter(Boolean).join("")}}var hr,zl=f(()=>{"use strict";a();Ve();Gl();hr=Te("vc-trans-")});function oE({settingsKey:e,includeAuto:t}){let o=jt.use([e])[e],r=wt(()=>{let i=Object.entries(Mf).map(([s,l])=>({value:s,label:l}));return t||i.shift(),i},[]);return n("section",{className:G.bottom16},n(S.FormTitle,{tag:"h3"},jt.def[e].description),n(lc,{options:r,value:r.find(i=>i.value===o),placeholder:"Select a language",maxVisibleItems:5,closeOnSelect:!0,onChange:i=>jt.store[e]=i}))}function nE(){let e=jt.use(["autoTranslate"]).autoTranslate;return n(Lt,{value:e,onChange:t=>jt.store.autoTranslate=t,note:jt.def.autoTranslate.description,hideBorder:!0},"Auto Translate")}function ZN({rootProps:e}){return n(fe,{...e},n(Ee,{className:hr("modal-header")},n(S.FormTitle,{tag:"h2"},"Translate"),n(ut,{onClick:e.onClose})),n(we,{className:hr("modal-content")},tE.map(t=>n(oE,{key:t,settingsKey:t,includeAuto:t.endsWith("Input")})),n(S.FormDivider,{className:G.bottom16}),n(nE,null)))}var tE,XN=f(()=>{"use strict";a();Ze();$e();b();H0();Gl();zl();tE=["receivedInput","receivedOutput","sentInput","sentOutput"]});function Ws({height:e=24,width:t=24,className:o}){return n("svg",{viewBox:"0 96 960 960",height:e,width:t,className:q(hr("icon"),o)},n("path",{fill:"currentColor",d:"m475 976 181-480h82l186 480h-87l-41-126H604l-47 126h-82Zm151-196h142l-70-194h-2l-70 194Zm-466 76-55-55 204-204q-38-44-67.5-88.5T190 416h87q17 33 37.5 62.5T361 539q45-47 75-97.5T487 336H40v-80h280v-80h80v80h280v80H567q-22 69-58.5 135.5T419 598l98 99-30 81-127-122-200 200Z"}))}var JN,z0=f(()=>{"use strict";a();or();Ze();be();$e();b();Gl();XN();zl();JN=({isMainChat:e})=>{let{autoTranslate:t,showChatBarButton:o}=jt.use(["autoTranslate","showChatBarButton"]);if(!e||!o)return null;let r=()=>{let i=!t;jt.store.autoTranslate=i,i&&jt.store.showAutoTranslateAlert!==!1&&rt.show({title:"Vencord Auto-Translate Enabled",body:n(d,null,n(S.FormText,null,"You just enabled auto translate (by right clicking the Translate icon). Any message you send will automatically be translated before being sent."),n(S.FormText,{className:G.top16},"If this was an accident, disable it again, or it will change your message content before sending.")),cancelText:"Disable Auto-Translate",confirmText:"Got it",secondaryConfirmText:"Don't show again",onConfirmSecondary:()=>jt.store.showAutoTranslateAlert=!1,onCancel:()=>jt.store.autoTranslate=!1})};return n(qo,{tooltip:"Open Translate Modal",onClick:i=>{if(i.shiftKey)return r();ue(s=>n(ZN,{rootProps:s}))},onContextMenu:()=>r(),buttonProps:{"aria-haspopup":"dialog"}},n(Ws,{className:hr({"auto-translate":t,"chat-button":!0})}))}});function W0(e,t){j0.get(e)(t)}function rE({onDismiss:e}){return n("button",{onClick:e,className:hr("dismiss")},"Dismiss")}function QN({message:e}){let[t,o]=K();return ce(()=>{if(!e.vencordEmbeddedBy)return j0.set(e.id,o),()=>void j0.delete(e.id)},[]),t?n("span",{className:hr("accessory")},n(Ws,{width:16,height:16}),Pe.parse(t.text)," ","(translated from ",Mf[t.src]??t.src," - ",n(rE,{onDismiss:()=>o(void 0)}),")"):null}var j0,VN=f(()=>{"use strict";a();b();H0();z0();zl();j0=new Map});var iE,Af,e5=f(()=>{"use strict";a();YN();or();So();el();Rn();Ui();P();w();b();Gl();z0();VN();zl();iE=(e,{message:t})=>{if(!t.content)return;let o=tt("copy-text",e);!o||o.splice(o.findIndex(r=>r?.props?.id==="copy-text")+1,0,n(E.MenuItem,{id:"vc-trans",label:"Translate",icon:Ws,action:async()=>{let r=await Hl("received",t.content);W0(t.id,r)}}))},Af=h({name:"Translate",description:"Translate messages with Google Translate",authors:[p.Ven],dependencies:["MessageAccessoriesAPI","MessagePopoverAPI","MessageEventsAPI","ChatInputButtonAPI"],settings:jt,contextMenus:{message:iE},translate:Hl,start(){Ri("vc-translation",e=>n(QN,{message:e.message})),Wo("vc-translate",JN),vn("vc-translate",e=>e.content?{label:"Translate",icon:Ws,message:e,channel:te.getChannel(e.channel_id),onClick:async()=>{let t=await Hl("received",e.content);W0(e.id,t)}}:null),this.preSend=bo(async(e,t)=>{!jt.store.autoTranslate||!t.content||(t.content=(await Hl("sent",t.content)).text)})},stop(){To(this.preSend),Sn("vc-translate"),Qo("vc-translate"),Va("vc-translation")}})});var t5=f(()=>{});function q0({a:e,b:t,count:o}){return[n("strong",{key:"0"},e),", ",n("strong",{key:"1"},t),`, and ${o} others are typing...`]}var Nf,sE,Cf,K0=f(()=>{"use strict";a();_();re();P();pt();w();b();Nf=A({showAvatars:{type:3,default:!0,description:"Show avatars in the typing indicator"},showRoleColors:{type:3,default:!0,description:"Show role colors in the typing indicator"},alternativeFormatting:{type:3,default:!0,description:"Show a more useful message when several users are typing"}});sE=k.wrap(function({user:e,guildId:t}){return n("strong",{role:"button",onClick:()=>{Ho(e.id)},style:{display:"grid",gridAutoFlow:"column",gap:"4px",color:Nf.store.showRoleColors?Be.getMember(t,e.id)?.colorString:void 0,cursor:"pointer"}},Nf.store.showAvatars&&n("div",{style:{marginTop:"4px"}},n(Ji,{size:"SIZE_16",src:e.getAvatarURL(t,128)})),Be.getNick(t,e.id)||!t&&Le.getNickname(e.id)||e.globalName||e.username)},{noop:!0}),Cf=h({name:"TypingTweaks",description:"Show avatars and role colours in the typing indicator",authors:[p.zt],patches:[{find:"getCooldownTextStyle",replacement:{match:/(?<=children:\[(\i)\.length>0.{0,200}?"aria-atomic":!0,children:)\i/,replace:"$self.mutateChildren(this.props, $1, $&), style: $self.TYPING_TEXT_STYLE"}},{find:"getCooldownTextStyle",replacement:{match:/(?<=map\(\i=>)\i\.\i\.getName\(\i,this\.props\.channel\.id,(\i)\)/,replace:"$1"}},{find:"getCooldownTextStyle",replacement:{match:/(?<=(\i)\.length\?\i.\i\.Messages.THREE_USERS_TYPING\.format\({\i:(\i),(?:\i:)?(\i),\i:\i}\):)\i\.\i\.Messages\.SEVERAL_USERS_TYPING/,replace:(e,t,o,r)=>`$self.buildSeveralUsers({ a: ${o}, b: ${r}, count: ${t}.length - 2 })`},predicate:()=>Nf.store.alternativeFormatting}],settings:Nf,TYPING_TEXT_STYLE:{display:"grid",gridAutoFlow:"column",gridGap:"0.25em"},buildSeveralUsers:q0,mutateChildren(e,t,o){if(!Array.isArray(o))return o;let r=0;return o.map(i=>i.type==="strong"?n(sE,{...e,user:t[r++]}):i)}})});function Xr(e,t){let o=L.getUser(t);return Be.getNick(e,t)??o.globalName??o.username}function uE({channelId:e}){let t=Fe([o5],()=>({...o5.getTypingUsers(e)}),null,(u,c)=>{let m=Object.keys(u),g=Object.keys(c);return m.length===g.length&&g.every(y=>u[y]!=null)}),o=Fe([xe],()=>xe.getChannelId()),r=te.getChannel(e).guild_id;if(!qs.store.includeMutedChannels&&cE.isChannelMuted(r,e)||!qs.store.includeCurrentChannel&&o===e)return null;let i=L.getCurrentUser()?.id,s=Object.keys(t).filter(u=>u!==i&&!(Le.isBlocked(u)&&!qs.store.includeBlockedUsers)),l;switch(s.length){case 0:break;case 1:{l=Se.Messages.ONE_USER_TYPING.format({a:Xr(r,s[0])});break}case 2:{l=Se.Messages.TWO_USERS_TYPING.format({a:Xr(r,s[0]),b:Xr(r,s[1])});break}case 3:{l=Se.Messages.THREE_USERS_TYPING.format({a:Xr(r,s[0]),b:Xr(r,s[1]),c:Xr(r,s[2])});break}default:{l=j.plugins.TypingTweaks.enabled?q0({a:Xr(r,s[0]),b:Xr(r,s[1]),count:s.length-2}):Se.Messages.SEVERAL_USERS_TYPING;break}}return s.length>0?n(oe,{text:l},u=>n("div",{className:"vc-typing-indicator",...u},(qs.store.indicatorMode&2)===2&&n(lE,{users:s.map(c=>L.getUser(c)),guildId:r,renderIcon:!1,max:3,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,size:16,className:"vc-typing-indicator-avatars"}),(qs.store.indicatorMode&1)===1&&n("div",{className:"vc-typing-indicator-dots"},n(aE,{dotRadius:3,themed:!0})))):null}var aE,lE,o5,cE,qs,Rf,n5=f(()=>{"use strict";a();t5();_();re();P();w();$();b();K0();aE=Xo("Dots","AnimatedDots"),lE=ve("defaultRenderUser","showDefaultAvatarsForNullUsers"),o5=me("TypingStore"),cE=me("UserGuildSettingsStore");qs=A({includeCurrentChannel:{type:3,description:"Whether to show the typing indicator for the currently selected channel",default:!0},includeMutedChannels:{type:3,description:"Whether to show the typing indicator for muted channels.",default:!1},includeBlockedUsers:{type:3,description:"Whether to show the typing indicator for blocked users.",default:!1},indicatorMode:{type:4,description:"How should the indicator be displayed?",options:[{label:"Avatars and animated dots",value:3,default:!0},{label:"Animated dots",value:1},{label:"Avatars",value:2}]}}),Rf=h({name:"TypingIndicator",description:"Adds an indicator if someone is typing on a channel.",authors:[p.Nuckyz,p.fawn,p.Sqaaakoi],settings:qs,patches:[{find:"UNREAD_IMPORTANT:",replacement:{match:/\.name\),.{0,120}\.children.+?:null(?<=,channel:(\i).+?)/,replace:"$&,$self.TypingIndicator($1.id)"}},{find:"M11 9H4C2.89543 9 2 8.10457 2 7V1C2 0.447715 1.55228 0 1 0C0.447715 0 0 0.447715 0 1V7C0 9.20914 1.79086 11 4 11H11C11.5523 11 12 10.5523 12 10C12 9.44771 11.5523 9 11 9Z",replacement:{match:/mentionsCount:\i.+?null(?<=channel:(\i).+?)/,replace:"$&,$self.TypingIndicator($1.id)"}}],TypingIndicator:e=>n(k,{noop:!0},n(uE,{channelId:e}))})});var kf,r5=f(()=>{"use strict";a();Rn();P();w();kf=h({name:"Unindent",description:"Trims leading indentation from codeblocks",authors:[p.Ven],dependencies:["MessageEventsAPI"],patches:[{find:"inQuote:",replacement:{match:/,content:([^,]+),inQuote/,replace:(e,t)=>`,content:Vencord.Plugins.plugins.Unindent.unindent(${t}),inQuote`}}],unindent(e){e=e.replace(/\t/g," ");let t=e.match(/^ *(?=\S)/gm)?.reduce((o,r)=>Math.min(o,r.length),1/0)??0;return t?e.replace(new RegExp(`^ {${t}}`,"gm"),""):e},unindentMsg(e){e.content=e.content.replace(/```(.|\n)*?```/g,t=>{let o=t.split(`
|
|
`);if(o.length<2)return t;let r="";return o[o.length-1]==="```"&&(r=o.pop()),`${o[0]}
|
|
${this.unindent(o.slice(1).join(`
|
|
`))}
|
|
${r}`})},start(){this.preSend=bo((e,t)=>this.unindentMsg(t)),this.preEdit=ki((e,t,o)=>this.unindentMsg(o))},stop(){To(this.preSend),Di(this.preEdit)}})});var pE,Df,i5=f(()=>{"use strict";a();_();Er();P();w();pE=A({zoomMultiplier:{type:5,description:"Zoom multiplier",markers:Vt(2,16),default:4}}),Df=h({name:"UnlockedAvatarZoom",description:"Allows you to zoom in further in the image crop tool when changing your avatar",authors:[p.nakoyasha],settings:pE,patches:[{find:".Messages.AVATAR_UPLOAD_EDIT_MEDIA",replacement:{match:/maxValue:\d/,replace:"maxValue:$self.settings.store.zoomMultiplier"}}]})});var Y0,dE,Lf,s5=f(()=>{"use strict";a();So();bt();P();w();b();Y0=1<<2,dE=(e,{channel:t,message:{author:o,embeds:r,flags:i,id:s}})=>{let l=(i&Y0)!==0;if(!l&&!r.length)return;let u=t.isPrivate()||!!(We.getChannelPermissions({id:t.id})&Ie.EMBED_LINKS);if(o.id===L.getCurrentUser().id&&!u)return;let c=tt("delete",e),m=c?.findIndex(g=>g?.props?.id==="delete");!m||!c||c.splice(m-1,0,n(E.MenuItem,{id:"unsuppress-embeds",key:"unsuppress-embeds",label:l?"Unsuppress Embeds":"Suppress Embeds",color:l?void 0:"danger",icon:l?Ia:Ma,action:()=>St.patch({url:yt.Endpoints.MESSAGE(t.id,s),body:{flags:l?i&~Y0:i|Y0}})}))},Lf=h({name:"UnsuppressEmbeds",authors:[p.rad,p.HypedDomi],description:"Allows you to unsuppress embeds in messages",contextMenus:{message:dE}})});var a5,Ef,l5=f(()=>{"use strict";a();Do();Gc();_();P();w();a5=A({resultsAmount:{type:1,description:"The amount of results you want to get (more gives better results, but is slower)",default:10}}),Ef=h({name:"UrbanDictionary",description:"Search for a word on Urban Dictionary via /urban slash command",authors:[p.jewdev],dependencies:["CommandsAPI"],settings:a5,commands:[{name:"urban",description:"Returns the definition of a word from Urban Dictionary",inputType:0,options:[{type:3,name:"word",description:"The word to search for on Urban Dictionary",required:!0}],execute:async(e,t)=>{try{let o=encodeURIComponent(e[0].value),{list:r}=await fetch(`https://api.urbandictionary.com/v0/define?term=${o}&per_page=${a5.store.resultsAmount}`).then(l=>l.json());if(!r.length)return void Me(t.channel.id,{content:"No results found."});let i=r.reduce((l,u)=>l.thumbs_up>u.thumbs_up?l:u),s=l=>l.replaceAll(`\r
|
|
`,`
|
|
`).replace(/([*>_`~\\])/gsi,"\\$1").replace(/\[(.+?)\]/g,(u,c)=>`[${c}](https://www.urbandictionary.com/define.php?term=${encodeURIComponent(c)} "Define '${c}' on Urban Dictionary")`).trim();return void Me(t.channel.id,{embeds:[{type:"rich",author:{name:`Uploaded by "${i.author}"`,url:`https://www.urbandictionary.com/author.php?author=${encodeURIComponent(i.author)}`},title:i.word,url:`https://www.urbandictionary.com/define.php?term=${encodeURIComponent(i.word)}`,description:s(i.definition),fields:[{name:"Example",value:s(i.example)},{name:"Want more definitions?",value:`Check out [more definitions](https://www.urbandictionary.com/define.php?term=${o} "Define "${e[0].value}" on Urban Dictionary") on Urban Dictionary.`}],color:16750848,footer:{text:`\u{1F44D} ${i.thumbs_up.toString()} | \u{1F44E} ${i.thumbs_down.toString()}`,icon_url:"https://www.urbandictionary.com/favicon.ico"},timestamp:new Date(i.written_on).toISOString()}]})}catch(o){Me(t.channel.id,{content:`Something went wrong: \`${o}\``})}}}]})});var c5=f(()=>{});var mE,fE,gE,u5,p5=f(()=>{"use strict";a();c5();$();b();mE=C("selectChannel","selectVoiceChannel"),fE=ye(".lastSection","children:"),gE=1n<<20n,u5=({channel:e,label:t,showHeader:o})=>n(fE,null,o&&n(S.FormTitle,{className:"vc-uvs-header"},"In a voice channel"),n(T,{className:"vc-uvs-button",color:T.Colors.TRANSPARENT,size:T.Sizes.SMALL,onClick:()=>{We.can(gE,e)?mE.selectVoiceChannel(e.id):V.show({message:"Insufficient permissions to enter the channel.",id:"user-voice-show-insufficient-permissions",type:V.Type.FAILURE,options:{position:V.Position.BOTTOM}})}},t))});var hE,Z0,d5,Of,m5=f(()=>{"use strict";a();_();re();P();w();$();b();p5();hE=me("VoiceStateStore"),Z0=A({showInUserProfileModal:{type:3,description:"Show a user's voice channel in their profile modal",default:!0},showVoiceChannelSectionHeader:{type:3,description:'Whether to show "IN A VOICE CHANNEL" above the join button',default:!0}}),d5=k.wrap(({user:e})=>{let{channelId:t}=hE.getVoiceStateForUser(e.id)??{};if(!t)return null;let o=te.getChannel(t);if(!o)return null;let r=se.getGuild(o.guild_id);if(!r)return null;let i=`${r.name} | ${o.name}`;return n(u5,{channel:o,label:i,showHeader:Z0.store.showVoiceChannelSectionHeader})}),Of=h({name:"UserVoiceShow",description:"Shows whether a User is currently in a voice channel somewhere in their profile",authors:[p.LordElias],settings:Z0,patchModal({user:e}){return Z0.store.showInUserProfileModal?n("div",{className:"vc-uvs-modal-margin"},n(d5,{user:e})):null},patchPopout:({user:e})=>{let t=e.id===L.getCurrentUser().id;return n("div",{className:t?"vc-uvs-popout-margin-self":""},n(d5,{user:e}))},patches:[{find:".popularApplicationCommandIds,",replacement:{match:/(?<=,)(?=!\i&&!\i&&.{0,50}setNote:)/,replace:"$self.patchPopout(arguments[0]),"}},{find:".Messages.MUTUAL_GUILDS_WITH_END_COUNT",replacement:{match:/\.body.+?displayProfile:\i}\),/,replace:"$&$self.patchModal(arguments[0]),"}}]})});var f5,g5=f(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/usrbg/index.css",{name:"src/plugins/usrbg/index.css",source:`:is([class*="userProfile"], [class*="userPopout"]) [class*="bannerPremium"] {
|
|
background: center / cover no-repeat;
|
|
}
|
|
|
|
[class*="NonPremium"]:has([class*="bannerPremium"]) [class*="avatarPositionNormal"],
|
|
[class*="PremiumWithoutBanner"]:has([class*="bannerPremium"]) [class*="avatarPositionPremiumNoBanner"] {
|
|
top: 76px;
|
|
}
|
|
|
|
[style*="background-image"] [class*="background_"] {
|
|
background-color: transparent !important;
|
|
}
|
|
`,classNames:{},dom:null});f5="src/plugins/usrbg/index.css"});var yE,_f,Bf,h5=f(()=>{"use strict";a();_();Ve();ho();P();w();g5();yE="https://usrbg.is-hardly.online/users",_f=A({nitroFirst:{description:"Banner to use if both Nitro and USRBG banners are present",type:4,options:[{label:"Nitro banner",value:!0,default:!0},{label:"USRBG banner",value:!1}]},voiceBackground:{description:"Use USRBG banners as voice chat backgrounds",type:3,default:!0,restartNeeded:!0}}),Bf=h({name:"USRBG",description:"Displays user banners from USRBG, allowing anyone to get a banner without Nitro",authors:[p.AutumnVN,p.katlyn,p.pylix,p.TheKodeToad],settings:_f,patches:[{find:".NITRO_BANNER,",replacement:{match:/\?\(0,\i\.jsx\)\(\i,{type:\i,shown/,replace:"&&$self.shouldShowBadge(arguments[0])$&"}},{find:".banner)==null",replacement:{match:/(?<=void 0:)\i.getPreviewBanner\(\i,\i,\i\)/,replace:"$self.patchBannerUrl(arguments[0])||$&"}},{find:'"data-selenium-video-tile":',predicate:()=>_f.store.voiceBackground,replacement:[{match:/(?<=function\((\i),\i\)\{)(?=let.{20,40},style:)/,replace:"$1.style=$self.getVoiceBackgroundStyles($1);"}]}],data:null,settingsAboutComponent:()=>n(qe,{href:"https://github.com/AutumnVN/usrbg#how-to-request-your-own-usrbg-banner"},"CLICK HERE TO GET YOUR OWN BANNER"),getVoiceBackgroundStyles({className:e,participantUserId:t}){if(e.includes("tile_")&&this.userHasBackground(t))return{backgroundImage:`url(${this.getImageUrl(t)})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}},patchBannerUrl({displayProfile:e}){if(!(e?.banner&&_f.store.nitroFirst)&&this.userHasBackground(e?.userId))return this.getImageUrl(e?.userId)},shouldShowBadge({displayProfile:e,user:t}){return e?.banner&&(!this.userHasBackground(t.id)||_f.store.nitroFirst)},userHasBackground(e){return!!this.data?.users[e]},getImageUrl(e){if(!this.userHasBackground(e))return null;let{endpoint:t,bucket:o,prefix:r,users:{[e]:i}}=this.data;return`${t}/${o}/${r}${e}?${i}`},async start(){zt(f5);let e=await fetch(yE);e.ok&&(this.data=await e.json())}})});var X0,J0,vE,Ff,y5=f(()=>{"use strict";a();P();w();$();b();X0=new Map,vE=ye(".createFromServer(",".isBlockedForMessage","messageReference:"),Ff=h({name:"ValidReply",description:'Fixes "Message could not be loaded" upon hovering over the reply',authors:[p.newwares],patches:[{find:"Messages.REPLY_QUOTE_MESSAGE_NOT_LOADED",replacement:{match:/Messages\.REPLY_QUOTE_MESSAGE_NOT_LOADED/,replace:"$&,onMouseEnter:()=>$self.fetchReply(arguments[0])"}},{find:"ReferencedMessageStore",replacement:{match:/constructor\(\)\{\i\(this,"_channelCaches",new Map\)/,replace:"$&;$self.setReplyStore(this);"}}],setReplyStore(e){J0=e},async fetchReply(e){let{channel_id:t,message_id:o}=e.baseMessage.messageReference;X0.has(o)||(X0.set(o,t),St.get({url:`/channels/${t}/messages`,query:{limit:1,around:o},retries:2}).then(r=>{let i=r?.body?.[0];!i||(i.id!==o?(J0.set(t,o,{state:2}),F.dispatch({type:"MESSAGE_DELETE",channelId:t,message:o})):(J0.set(i.channel_id,i.id,{state:0,message:vE(i)}),F.dispatch({type:"MESSAGE_UPDATE",message:i})))}).catch(()=>{}).finally(()=>{X0.delete(o)}))}})});async function bE(e){let t=L.getUser(e);if(t)return t;let o=await St.get({url:yt.Endpoints.USER(e)}).then(s=>(F.dispatch({type:"USER_UPDATE",user:s.body}),s.body));await F.dispatch({type:"USER_PROFILE_FETCH_FAILURE",userId:e}),t=L.getUser(e);let r=Object.entries(SE).filter(([s,l])=>!isNaN(l)&&t.hasFlag(l)).map(([s])=>v5[s.toLowerCase()]).filter(Qn);(o.premium_type||!o.bot&&(o.banner||o.avatar?.startsWith?.("a_")))&&r.push(v5.premium);let i=Qt.getUserProfile(e);return i.accentColor=o.accent_color,i.badges=r,i.banner=o.banner,i.premiumType=o.premium_type,t}function TE({data:e,UserMention:t,RoleMention:o,parse:r,props:i}){let[s,l]=K(e.userId);if(s)return n(t,{className:"mention",userId:s,channelId:e.channelId,inlinePreview:i.noStyleAndInteraction,key:i.key});let u=r(e.content,i);return n(o,{...e,inlinePreview:i.formatInline},n("span",{onMouseEnter:()=>{let c=u?.[0]?.props?.children;if(typeof c!="string")return;let m=c.match(/<@!?(\d+)>/)?.[1];if(!m||Uf.has(m))return;if(L.getUser(m))return l(m);let g=()=>{Uf.add(m),S5.unshift(()=>bE(m).then(()=>{l(m),Uf.delete(m)}).catch(y=>{y?.status===429&&(S5.unshift(()=>an(y?.body?.retry_after??1e3).then(g)),Uf.delete(m))}).finally(()=>an(300)))};g()}},u))}var SE,v5,Uf,S5,$f,b5=f(()=>{"use strict";a();re();P();Ss();be();Si();w();b();SE=yt.UserFlags,v5={active_developer:{id:"active_developer",description:"Active Developer",icon:"6bdc42827a38498929a4920da12695d9",link:"https://support-dev.discord.com/hc/en-us/articles/10113997751447"},bug_hunter_level_1:{id:"bug_hunter_level_1",description:"Discord Bug Hunter",icon:"2717692c7dca7289b35297368a940dd0",link:"https://support.discord.com/hc/en-us/articles/360046057772-Discord-Bugs"},bug_hunter_level_2:{id:"bug_hunter_level_2",description:"Discord Bug Hunter",icon:"848f79194d4be5ff5f81505cbd0ce1e6",link:"https://support.discord.com/hc/en-us/articles/360046057772-Discord-Bugs"},certified_moderator:{id:"certified_moderator",description:"Moderator Programs Alumni",icon:"fee1624003e2fee35cb398e125dc479b",link:"https://discord.com/safety"},discord_employee:{id:"staff",description:"Discord Staff",icon:"5e74e9b61934fc1f67c65515d1f7e60d",link:"https://discord.com/company"},get staff(){return this.discord_employee},hypesquad:{id:"hypesquad",description:"HypeSquad Events",icon:"bf01d1073931f921909045f3a39fd264",link:"https://discord.com/hypesquad"},hypesquad_online_house_1:{id:"hypesquad_house_1",description:"HypeSquad Bravery",icon:"8a88d63823d8a71cd5e390baa45efa02",link:"https://discord.com/settings/hypesquad-online"},hypesquad_online_house_2:{id:"hypesquad_house_2",description:"HypeSquad Brilliance",icon:"011940fd013da3f7fb926e4a1cd2e618",link:"https://discord.com/settings/hypesquad-online"},hypesquad_online_house_3:{id:"hypesquad_house_3",description:"HypeSquad Balance",icon:"3aa41de486fa12454c3761e8e223442e",link:"https://discord.com/settings/hypesquad-online"},partner:{id:"partner",description:"Partnered Server Owner",icon:"3f9748e53446a137a052f3454e2de41e",link:"https://discord.com/partners"},premium:{id:"premium",description:"Subscriber",icon:"2ba85e8026a8614b640c2837bcdfe21b",link:"https://discord.com/settings/premium"},premium_early_supporter:{id:"early_supporter",description:"Early Supporter",icon:"7060786766c9c840eb3019e725d2b358",link:"https://discord.com/settings/premium"},verified_developer:{id:"verified_developer",description:"Early Verified Bot Developer",icon:"6df5892e0f35b051f8b61eace34f4967"}},Uf=new Set,S5=new $o(5);$f=h({name:"ValidUser",description:"Fix mentions for unknown users showing up as '@unknown-user' (hover over a mention to fix it)",authors:[p.Ven,p.Dolfies],tags:["MentionCacheFix"],patches:[{find:'className:"mention"',replacement:{match:/react(?=\(\i,\i,\i\).{0,100}return null==.{0,70}\?\(0,\i\.jsx\)\((\i\.\i),.+?jsx\)\((\i\.\i),\{className:"mention")/,replace:"react:(...args)=>$self.renderMention($1,$2,...args),originalReact"}},{find:"unknownUserMentionPlaceholder:",replacement:{match:/unknownUserMentionPlaceholder:/,replace:"$&false&&"}}],renderMention(e,t,o,r,i){return n(k,{noop:!0},n(TE,{key:"mention"+o.userId,RoleMention:e,UserMention:t,data:o,parse:r,props:i}))}})});var Q0,Gf,T5=f(()=>{"use strict";a();P();w();b();Q0={},Gf=h({name:"VoiceChatDoubleClick",description:"Join voice chats via double click instead of single click",authors:[p.Ven,p.D3SOX],patches:[...[".handleVoiceStatusClick",".handleClickChat"].map(e=>({find:e,replacement:[{match:/onClick:\(\)=>\{this.handleClick\(\)/g,replace:"onClick:()=>{$self.schedule(()=>{this.handleClick()},this)"}]})),{find:'className:"channelMention",children',replacement:{match:/onClick:(\i)(?=,.{0,30}className:"channelMention".+?(\i)\.inContent)/,replace:(e,t,o)=>`onClick:(vcDoubleClickEvt)=>$self.shouldRunOnClick(vcDoubleClickEvt,${o})&&${t}()`}}],shouldRunOnClick(e,{channelId:t}){let o=te.getChannel(t);return!o||![2,13].includes(o.type)?!0:e.detail>=2},schedule(e,t){let o=t.props.channel.id;if(xe.getVoiceChannelId()===o){e();return}let r=Q0[o]??={timeout:void 0,i:0};clearTimeout(r.timeout),++r.i>=2?(e(),delete Q0[o]):r.timeout=setTimeout(()=>{delete Q0[o]},500)}})});function zf(e,t=j.plugins.VcNarrator){if(!e)return;let o=new SpeechSynthesisUtterance(e),r=speechSynthesis.getVoices().find(i=>i.voiceURI===t.voice);!r&&(new Q("VcNarrator").error(`Voice "${t.voice}" not found. Resetting to default.`),r=speechSynthesis.getVoices().find(i=>i.default),t.voice=r?.voiceURI,!r)||(o.voice=r,o.volume=t.volume,o.rate=t.rate,speechSynthesis.speak(o))}function Hf(e){let t=j.plugins.VcNarrator.latinOnly?/[^\p{Script=Latin}\p{Number}\p{Punctuation}\s]/gu:/[^\p{Letter}\p{Number}\p{Punctuation}\s]/gu;return e.normalize("NFKC").replace(t,"").replace(/_{2,}/g,"_").trim()}function jf(e,t,o,r,i){return e.replaceAll("{{USER}}",Hf(t)||(t?"Someone":"")).replaceAll("{{CHANNEL}}",Hf(o)||"channel").replaceAll("{{DISPLAY_NAME}}",Hf(r)||(r?"Someone":"")).replaceAll("{{NICKNAME}}",Hf(i)||(i?"Someone":""))}function wE({channelId:e,oldChannelId:t},o){if(o&&e!==V0&&(t=V0,V0=e),e!==t){if(e)return[t?"move":"join",e];if(t)return["leave",t]}return["",""]}function xE(e,t){let o=Object.assign({},j.plugins.VcNarrator,e),r=L.getCurrentUser(),i=Uo.getGuildId();zf(jf(o[t+"Message"],r.username,"general",r.globalName??r.username,Be.getNick(i,r.id)??r.username),o)}var w5,V0,Wf,x5=f(()=>{"use strict";a();_();yi();P();ke();Ze();Cn();w();$();b();w5=C("getVoiceStatesForChannel","getCurrentClientVoiceChannelId");Wf=h({name:"VcNarrator",description:"Announces when users join, leave, or move voice channels via narrator",authors:[p.Ven],reporterTestable:2,flux:{VOICE_STATE_UPDATES({voiceStates:e}){let t=Uo.getGuildId(),o=xe.getVoiceChannelId(),r=L.getCurrentUser().id;if(te.getChannel(o)?.type!==13)for(let i of e){let{userId:s,channelId:l,oldChannelId:u}=i,c=s===r;if(!c&&(!o||l!==o&&u!==o))continue;let[m,g]=wE(i,c);if(!m)continue;let y=j.plugins.VcNarrator[m+"Message"],v=c&&!j.plugins.VcNarrator.sayOwnName?"":L.getUser(s).username,M=v&&(L.getUser(s).globalName??v),x=v&&(Be.getNick(t,s)??v),N=te.getChannel(g).name;zf(jf(y,v,N,M,x))}},AUDIO_TOGGLE_SELF_MUTE(){let e=xe.getVoiceChannelId(),t=w5.getVoiceStateForChannel(e);if(!t)return;let o=t.mute||t.selfMute?"unmute":"mute";zf(jf(j.plugins.VcNarrator[o+"Message"],"",te.getChannel(e).name,"",""))},AUDIO_TOGGLE_SELF_DEAF(){let e=xe.getVoiceChannelId(),t=w5.getVoiceStateForChannel(e);if(!t)return;let o=t.deaf||t.selfDeaf?"undeafen":"deafen";zf(jf(j.plugins.VcNarrator[o+"Message"],"",te.getChannel(e).name,"",""))}},start(){if(typeof speechSynthesis>"u"||speechSynthesis.getVoices().length===0){new Q("VcNarrator").warn("SpeechSynthesis not supported or no Narrator voices found. Thus, this plugin will not work. Check my Settings for more info");return}},optionsCache:null,get options(){return this.optionsCache??={voice:{type:4,description:"Narrator Voice",options:window.speechSynthesis?.getVoices().map(e=>({label:e.name,value:e.voiceURI,default:e.default}))??[]},volume:{type:5,description:"Narrator Volume",default:1,markers:[0,.25,.5,.75,1],stickToMarkers:!1},rate:{type:5,description:"Narrator Speed",default:1,markers:[.1,.5,1,2,5,10],stickToMarkers:!1},sayOwnName:{description:"Say own name",type:3,default:!1},latinOnly:{description:"Strip non latin characters from names before saying them",type:3,default:!1},joinMessage:{type:0,description:"Join Message",default:"{{USER}} joined"},leaveMessage:{type:0,description:"Leave Message",default:"{{USER}} left"},moveMessage:{type:0,description:"Move Message",default:"{{USER}} moved to {{CHANNEL}}"},muteMessage:{type:0,description:"Mute Message (only self for now)",default:"{{USER}} Muted"},unmuteMessage:{type:0,description:"Unmute Message (only self for now)",default:"{{USER}} unmuted"},deafenMessage:{type:0,description:"Deafen Message (only self for now)",default:"{{USER}} deafened"},undeafenMessage:{type:0,description:"Undeafen Message (only self for now)",default:"{{USER}} undeafened"}}},settingsAboutComponent({tempSettings:e}){let[t,o]=wt(()=>{let s=speechSynthesis.getVoices();return[s.length!==0,s.some(l=>l.lang.startsWith("en"))]},[]),r=wt(()=>Object.keys(Vencord.Plugins.plugins.VcNarrator.options).filter(s=>s.endsWith("Message")).map(s=>s.slice(0,-7)),[]),i=null;if(t)o||(i=n(mo,null,"You don't have any English voices installed, so the narrator might sound weird"));else{let s="No narrator voices found. ";s+=navigator.platform?.toLowerCase().includes("linux")?"Install speech-dispatcher or espeak and run Discord with the --enable-speech-dispatcher flag":"Try installing some in the Narrator settings of your Operating System",i=n(mo,null,s)}return n(S.FormSection,null,n(S.FormText,null,"You can customise the spoken messages below. You can disable specific messages by setting them to nothing"),n(S.FormText,null,"The special placeholders ",n("code",null,"{{USER}}"),", ",n("code",null,"{{DISPLAY_NAME}}"),", ",n("code",null,"{{NICKNAME}}")," and ",n("code",null,"{{CHANNEL}}")," ","will be replaced with the user's name (nothing if it's yourself), the user's display name, the user's nickname on current server and the channel's name respectively"),o&&n(d,null,n(S.FormTitle,{className:G.top20,tag:"h3"},"Play Example Sounds"),n("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"1rem"},className:"vc-narrator-buttons"},r.map(s=>n(T,{key:s,onClick:()=>xE(e,s)},Yn([s]))))),i)}})});var P5=f(()=>{});function IE(e){let{useQuickCss:t}=Pt(["useQuickCss"]),o=[];for(let r of Object.values(Vencord.Plugins.plugins))r.toolboxActions&&Vencord.Plugins.isPluginEnabled(r.name)&&o.push(n(E.MenuGroup,{label:r.name,key:`vc-toolbox-${r.name}`},Object.entries(r.toolboxActions).map(([i,s])=>{let l=`vc-toolbox-${r.name}-${i}`;return n(E.MenuItem,{id:l,key:l,label:i,action:s})})));return n(E.Menu,{navId:"vc-toolbox",onClose:e},n(E.MenuItem,{id:"vc-toolbox-notifications",label:"Open Notification Log",action:ka}),n(E.MenuCheckboxItem,{id:"vc-toolbox-quickcss-toggle",checked:t,label:"Enable QuickCSS",action:()=>{j.useQuickCss=!t}}),n(E.MenuItem,{id:"vc-toolbox-quickcss",label:"Open QuickCSS",action:()=>VencordNative.quickCss.openEditor()}),...o)}function ME(e){return n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 27 27",width:24,height:24},n("path",{fill:"currentColor",d:e?"M9 0h1v1h1v2h1v2h3V3h1V1h1V0h1v2h1v2h1v7h-1v-1h-3V9h1V6h-1v4h-3v1h1v-1h2v1h3v1h-1v1h-3v2h1v1h1v1h1v3h-1v4h-2v-1h-1v-4h-1v4h-1v1h-2v-4H9v-3h1v-1h1v-1h1v-2H9v-1H8v-1h3V6h-1v3h1v1H8v1H7V4h1V2h1M5 19h2v1h1v1h1v3H4v-1h2v-1H4v-2h1m15-1h2v1h1v2h-2v1h2v1h-5v-3h1v-1h1m4 3h4v1h-4":"M0 0h7v1H6v1H5v1H4v1H3v1H2v1h5v1H0V6h1V5h1V4h1V3h1V2h1V1H0m13 2h5v1h-1v1h-1v1h-1v1h3v1h-5V7h1V6h1V5h1V4h-3m8 5h1v5h1v-1h1v1h-1v1h1v-1h1v1h-1v3h-1v1h-2v1h-1v1h1v-1h2v-1h1v2h-1v1h-2v1h-1v-1h-1v1h-6v-1h-1v-1h-1v-2h1v1h2v1h3v1h1v-1h-1v-1h-3v-1h-4v-4h1v-2h1v-1h1v-1h1v2h1v1h1v-1h1v1h-1v1h2v-2h1v-2h1v-1h1M8 14h2v1H9v4h1v2h1v1h1v1h1v1h4v1h-6v-1H5v-1H4v-5h1v-1h1v-2h2m17 3h1v3h-1v1h-1v1h-1v2h-2v-2h2v-1h1v-1h1m1 0h1v3h-1v1h-2v-1h1v-1h1"}))}function AE(){let[e,t]=K(!1);return n(si,{position:"bottom",align:"right",animation:si.Animation.NONE,shouldShow:e,onRequestClose:()=>t(!1),renderPopout:()=>IE(()=>t(!1))},(o,{isShown:r})=>n(PE,{className:"vc-toolbox-btn",onClick:()=>t(i=>!i),tooltip:r?null:"Vencord Toolbox",icon:()=>ME(r),selected:r}))}function NE({children:e}){return e.splice(e.length-1,0,n(k,{noop:!0},n(AE,null))),n(d,null,e)}var PE,qf,I5=f(()=>{"use strict";a();P5();Lc();_();re();P();w();$();b();PE=Xo("Icon","Divider");qf=h({name:"VencordToolbox",description:"Adds a button next to the inbox button in the channel header that houses Vencord quick actions",authors:[p.Ven,p.AutumnVN],patches:[{find:"toolbar:function",replacement:{match:/(?<=toolbar:function.{0,100}\()\i.Fragment,/,replace:"$self.ToolboxFragmentWrapper,"}}],ToolboxFragmentWrapper:k.wrap(NE,{fallback:()=>n("p",{style:{color:"red"}},"Failed to render :(")})})});function Ks(e){let t=e.startsWith("/")?"png":ev.store.format,o=new URL(e,window.location.href);o.searchParams.set("size",ev.store.imgSize),o.pathname=o.pathname.replace(/\.(png|jpe?g|webp)$/,`.${t}`),e=o.toString(),o.searchParams.set("size","4096");let r=o.toString();Go(e,{original:r,height:256})}var ev,CE,RE,kE,Kf,M5=f(()=>{"use strict";a();_();bt();P();pt();w();b();ev=A({format:{type:4,description:"Choose the image format to use for non animated images. Animated images will always use .gif",options:[{label:"webp",value:"webp",default:!0},{label:"png",value:"png"},{label:"jpg",value:"jpg"}]},imgSize:{type:4,description:"The image size to use",options:["128","256","512","1024","2048","4096"].map(e=>({label:e,value:e,default:e==="1024"}))}});CE=(e,{user:t,guildId:o})=>{if(!t)return;let r=Be.getMember(o,t.id)?.avatar||null;e.splice(-1,0,n(E.MenuGroup,null,n(E.MenuItem,{id:"view-avatar",label:"View Avatar",action:()=>Ks(Ct.getUserAvatarURL(t,!0)),icon:dn}),r&&n(E.MenuItem,{id:"view-server-avatar",label:"View Server Avatar",action:()=>Ks(Ct.getGuildMemberAvatarURLSimple({userId:t.id,avatar:r,guildId:o,canAnimate:!0})),icon:dn})))},RE=(e,{guild:t})=>{if(!t)return;let{id:o,icon:r,banner:i}=t;!i&&!r||e.splice(-1,0,n(E.MenuGroup,null,r?n(E.MenuItem,{id:"view-icon",label:"View Icon",action:()=>Ks(Ct.getGuildIconURL({id:o,icon:r,canAnimate:!0})),icon:dn}):null,i?n(E.MenuItem,{id:"view-banner",label:"View Banner",action:()=>Ks(Ct.getGuildBannerURL(t,!0)),icon:dn}):null))},kE=(e,{channel:t})=>{!t||e.splice(-1,0,n(E.MenuGroup,null,n(E.MenuItem,{id:"view-group-channel-icon",label:"View Icon",action:()=>Ks(Ct.getChannelIconURL(t)),icon:dn})))},Kf=h({name:"ViewIcons",authors:[p.Ven,p.TheKodeToad,p.Nuckyz,p.nyx],description:"Makes avatars and banners in user profiles clickable, adds View Icon/Banner entries in the user, server and group channel context menu.",tags:["ImageUtilities"],settings:ev,openImage:Ks,contextMenus:{"user-context":CE,"guild-context":RE,"gdm-context":kE},patches:[...[".MODAL,hasProfileEffect",".FULL_SIZE,hasProfileEffect:"].map(e=>({find:e,replacement:{match:/\{src:(\i)(?=,avatarDecoration)/,replace:"{src:$1,onClick:()=>$self.openImage($1)"}})),...[".NITRO_BANNER,","=!1,canUsePremiumCustomization:"].map(e=>({find:e,replacement:{match:/style:\{(?=backgroundImage:(null!=\i)\?"url\("\.concat\((\i),)/,replace:'onClick:ev=>$1&&ev.target.style.backgroundImage&&$self.openImage($2),style:{cursor:$1?"pointer":void 0,'}})),{find:".avatarPositionPanel",replacement:{match:/(avatarWrapperNonUserBot.{0,50})onClick:(\i\|\|\i)\?void 0(?<=,avatarSrc:(\i).+?)/,replace:'$1style:($2)?{cursor:"pointer"}:{},onClick:$2?()=>{$self.openImage($3)}'}},{find:".canUsePremiumProfileCustomization,{avatarSrc:",replacement:{match:/children:\(0,\i\.jsx\)\(\i,{src:(\i)/,replace:'style:{cursor:"pointer"},onClick:()=>{$self.openImage($1)},$&'}},{find:/\.recipients\.length>=2(?!<isMultiUserDM.{0,50})/,replacement:{match:/null==\i\.icon\?.+?src:(\(0,\i\.\i\).+?\))(?=[,}])/,replace:(e,t)=>`${e},onClick:()=>$self.openImage(${t})`}},{find:".cursorPointer:null,children",replacement:{match:/.Avatar,.+?src:(.+?\))(?=[,}])/,replace:(e,t)=>`${e},onClick:()=>$self.openImage(${t})`}},{find:'experimentLocation:"empty_messages"',replacement:{match:/.Avatar,.+?src:(.+?\))(?=[,}])/,replace:(e,t)=>`${e},onClick:()=>$self.openImage(${t})`}}]})});function DE(e){return Object.fromEntries(Object.entries(e).sort(([t],[o])=>t.localeCompare(o)))}function LE(e){let t=DE(JSON.parse(JSON.stringify(e)));for(let r of["email","phone","mfaEnabled","personalConnectionId"])delete t.author[r];let o=t;return delete o.editHistory,delete o.deleted,o.attachments?.forEach(r=>delete r.deleted),t}function C5(e,t,o){let r=ue(i=>n(k,null,n(fe,{...i,size:"large"},n(Ee,null,n(Z,{variant:"heading-lg/semibold",style:{flexGrow:1}},"View Raw"),n(ut,{onClick:()=>Un(r)})),n(we,null,n("div",{style:{padding:"16px 0"}},!!o&&n(d,null,n(S.FormTitle,{tag:"h5"},"Content"),n(Ta,{content:o,lang:""}),n(S.FormDivider,{className:G.bottom20})),n(S.FormTitle,{tag:"h5"},t," Data"),n(Ta,{content:e,lang:"json"}))),n(ct,null,n(pe,{cellSpacing:10},n(T,{onClick:()=>po(e,`${t} data copied to clipboard!`)},"Copy ",t," JSON"),!!o&&n(T,{onClick:()=>po(o,"Content copied to clipboard!")},"Copy Raw Content"))))))}function A5(e){e=LE(e);let t=JSON.stringify(e,null,4);return C5(t,"Message",e.content)}function tv(e){return(t,o)=>{let r=o[e.toLowerCase()];if(!r||o.label===Se.Messages.CHANNEL_ACTIONS_MENU_LABEL)return;let i=t.at(-1);if(i?.key==="developer-actions"){let s=i.props;Array.isArray(s.children)||(s.children=[s.children]),t=s.children}t.splice(-1,0,n(E.MenuItem,{id:`vc-view-${e.toLowerCase()}-raw`,label:"View Raw",action:()=>C5(JSON.stringify(r,null,4),e),icon:N5}))}}var N5,Yf,Zf,R5=f(()=>{"use strict";a();Ui();_();Ic();re();Rt();P();Ze();be();$e();w();b();N5=()=>n("svg",{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",width:"18",height:"18"},n("path",{d:"M12.9297 3.25007C12.7343 3.05261 12.4154 3.05226 12.2196 3.24928L11.5746 3.89824C11.3811 4.09297 11.3808 4.40733 11.5739 4.60245L16.5685 9.64824C16.7614 9.84309 16.7614 10.1569 16.5685 10.3517L11.5739 15.3975C11.3808 15.5927 11.3811 15.907 11.5746 16.1017L12.2196 16.7507C12.4154 16.9477 12.7343 16.9474 12.9297 16.7499L19.2604 10.3517C19.4532 10.1568 19.4532 9.84314 19.2604 9.64832L12.9297 3.25007Z"}),n("path",{d:"M8.42616 4.60245C8.6193 4.40733 8.61898 4.09297 8.42545 3.89824L7.78047 3.24928C7.58466 3.05226 7.26578 3.05261 7.07041 3.25007L0.739669 9.64832C0.5469 9.84314 0.546901 10.1568 0.739669 10.3517L7.07041 16.7499C7.26578 16.9474 7.58465 16.9477 7.78047 16.7507L8.42545 16.1017C8.61898 15.907 8.6193 15.5927 8.42616 15.3975L3.43155 10.3517C3.23869 10.1569 3.23869 9.84309 3.43155 9.64824L8.42616 4.60245Z"}));Yf=A({clickMethod:{description:"Change the button to view the raw content/data of any message.",type:4,options:[{label:"Left Click to view the raw content.",value:"Left",default:!0},{label:"Right click to view the raw content.",value:"Right"}]}});Zf=h({name:"ViewRaw",description:"Copy and view the raw content/data of any message, channel or guild",authors:[p.KingFish,p.Ven,p.rad,p.ImLvna],dependencies:["MessagePopoverAPI"],settings:Yf,contextMenus:{"guild-context":tv("Guild"),"channel-context":tv("Channel"),"user-context":tv("User")},start(){vn("ViewRaw",e=>{let t=()=>{Yf.store.clickMethod==="Right"?po(e.content):A5(e)},o=i=>{Yf.store.clickMethod==="Left"?(i.preventDefault(),i.stopPropagation(),po(e.content)):(i.preventDefault(),i.stopPropagation(),A5(e))};return{label:Yf.store.clickMethod==="Right"?"Copy Raw (Left Click) / View Raw (Right Click)":"View Raw (Left Click) / Copy Raw (Right Click)",icon:N5,message:e,channel:te.getChannel(e.channel_id),onClick:t,onContextMenu:o}})},stop(){Qo("ViewRaw")}})});var k5=f(()=>{});var Xf,D5=f(()=>{"use strict";a();k5();P();w();Xf=h({name:"VoiceDownload",description:"Adds a download to voice messages. (Opens a new browser tab)",authors:[p.puv],patches:[{find:"rippleContainer,children",replacement:{match:/\(0,\i\.jsx\).{0,150},children:.{0,50}\("source",{src:(\i)}\)}\)/,replace:"[$&, $self.renderDownload($1)]"}}],renderDownload(e){return n("a",{className:"vc-voice-download",href:e,onClick:t=>t.stopPropagation(),"aria-label":"Download voice message",target:"_blank"},n(this.Icon,null))},Icon:()=>n("svg",{height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor"},n("path",{d:"M12 2a1 1 0 0 1 1 1v10.59l3.3-3.3a1 1 0 1 1 1.4 1.42l-5 5a1 1 0 0 1-1.4 0l-5-5a1 1 0 1 1 1.4-1.42l3.3 3.3V3a1 1 0 0 1 1-1ZM3 20a1 1 0 1 0 0 2h18a1 1 0 1 0 0-2H3Z"}))})});var L5=f(()=>{});var Ys,Jf=f(()=>{"use strict";a();_();w();Ys=A({noiseSuppression:{type:3,description:"Noise Suppression",default:!0},echoCancellation:{type:3,description:"Echo Cancellation",default:!0}})});var ov,Jr,jl=f(()=>{"use strict";a();Ve();$();ov=me("MediaEngineStore"),Jr=Te("vc-vmsg-")});var EE,E5,O5=f(()=>{"use strict";a();b();Jf();jl();EE=VencordNative.pluginHelpers.VoiceMessages,E5=({setAudioBlob:e,onRecordingChange:t})=>{let[o,r]=K(!1),i=l=>{r(l),t?.(l)};function s(){let l=DiscordNative.nativeModules.requireModule("discord_voice");!o?l.startLocalAudioRecording({echoCancellation:Ys.store.echoCancellation,noiseCancellation:Ys.store.noiseSuppression,deviceId:ov.getInputDeviceId()},c=>{c?i(!0):it("Failed to start recording",V.Type.FAILURE)}):l.stopLocalAudioRecording(async c=>{if(c){let m=await EE.readRecording(c);m?e(new Blob([m],{type:"audio/ogg; codecs=opus"})):it("Failed to finish recording",V.Type.FAILURE)}i(!1)})}return n(T,{onClick:s},o?"Stop":"Start"," recording")}});var OE,_5,B5=f(()=>{"use strict";a();ft();$();jl();OE=ve("waveform:","onVolumeChange"),_5=({src:e,waveform:t,recording:o})=>{let r=ga({deps:[o]}),i=o?Math.floor(r/1e3):0,s=Math.floor(i/60)+":"+(i%60).toString().padStart(2,"0");return e&&!o?n(OE,{key:e,src:e,waveform:t}):n("div",{className:Jr("preview",o?"preview-recording":[])},n("div",{className:Jr("preview-indicator")}),n("div",{className:Jr("preview-time")},s),n("div",{className:Jr("preview-label")},o?"RECORDING":"----"))}});var F5=f(()=>{"use strict";a();b();Jf();jl()});function $E(e,t){let o=xe.getChannelId(),r=BE.getPendingReply(o);r&&F.dispatch({type:"DELETE_PENDING_REPLY",channelId:o});let i=new _E({file:new File([e],"voice-message.ogg",{type:"audio/ogg; codecs=opus"}),isThumbnail:!1,platform:1},o,!1,0);i.on("complete",()=>{St.post({url:yt.Endpoints.MESSAGES(o),body:{flags:1<<13,channel_id:o,content:"",nonce:uo.fromTimestamp(Date.now()),sticker_ids:[],type:0,attachments:[{id:"0",filename:i.filename,uploaded_filename:i.uploadedFilename,waveform:t.waveform,duration_secs:t.duration}],message_reference:r?Co.getSendMessageOptionsForReply(r)?.messageReference:null}})}),i.on("error",()=>it("Failed to upload voice message",V.Type.FAILURE)),i.upload()}function GE(){let[e,t]=K();return[e,r=>{e&&URL.revokeObjectURL(e),t(URL.createObjectURL(r))}]}function HE({modalProps:e}){let[t,o]=K(!1),[r,i]=K(),[s,l]=GE();ce(()=>()=>{s&&URL.revokeObjectURL(s)},[s]);let[u]=st(async()=>{if(!r)return U5;let g=await new AudioContext().decodeAudioData(await r.arrayBuffer()),y=g.getChannelData(0),v=new Uint8Array(di.clamp(Math.floor(g.duration*10),Math.min(32,y.length),256)),M=Math.floor(y.length/v.length);for(let I=0;I<v.length;I++){let R=0;for(let D=0;D<M;D++){let B=I*M+D;R+=y[B]**2}v[I]=~~(Math.sqrt(R/M)*255)}let x=Math.max(...v),N=1+(255/x-1)*Math.min(1,100*(x/255)**3);for(let I=0;I<v.length;I++)v[I]=Math.min(255,~~(v[I]*N));return{waveform:window.btoa(String.fromCharCode(...v)),duration:g.duration}},{deps:[r],fallbackValue:U5}),c=r&&(!r.type.startsWith("audio/ogg")||r.type.includes("codecs")&&!r.type.includes("opus"));return n(fe,{...e},n(Ee,null,n(S.FormTitle,null,"Record Voice Message")),n(we,{className:Jr("modal")},n("div",{className:Jr("buttons")},n(FE,{setAudioBlob:m=>{i(m),l(m)},onRecordingChange:o}),n(T,{onClick:async()=>{let m=await uS("audio/*");m&&(i(m),l(m))}},"Upload File")),n(S.FormTitle,null,"Preview"),n(_5,{src:s,waveform:u.waveform,recording:t}),c&&n(At,{className:`vc-plugins-restart-card ${G.top16}`},n(S.FormText,null,"Voice Messages have to be OggOpus to be playable on iOS. This file is ",n("code",null,r.type)," so it will not be playable on iOS."),n(S.FormText,{className:G.top8},"To fix it, first convert it to OggOpus, for example using the ",n(qe,{href:"https://convertio.co/mp3-opus/"},"convertio web converter")))),n(ct,null,n(T,{disabled:!r,onClick:()=>{$E(r,u),e.onClose(),it("Now sending voice message... Please be patient",V.Type.MESSAGE)}},"Send")))}var _E,BE,nv,FE,UE,Qf,U5,$5=f(()=>{"use strict";a();L5();bt();ho();P();Ze();$e();ft();w();ph();$();b();O5();Jf();jl();B5();F5();_E=Qe(e=>e.prototype?.trackUploadFinished),BE=me("PendingReplyStore"),nv=C("optionName","optionIcon","optionLabel"),FE=E5,UE=(e,t)=>{t.channel.guild_id&&!(We.can(Ie.SEND_VOICE_MESSAGES,t.channel)&&We.can(Ie.SEND_MESSAGES,t.channel))||e.push(n(E.MenuItem,{id:"vc-send-vmsg",label:n("div",{className:nv.optionLabel},n(Eg,{className:nv.optionIcon,height:24,width:24}),n("div",{className:nv.optionName},"Send voice message")),action:()=>ue(o=>n(HE,{modalProps:o}))}))},Qf=h({name:"VoiceMessages",description:"Allows you to send voice messages like on mobile. To do so, right click the upload button and click Send Voice Message",authors:[p.Ven,p.Vap,p.Nickyux],settings:Ys,contextMenus:{"channel-attach":UE}}),U5={waveform:"AAAAAAAAAAAA",duration:1}});var zE,Vf,G5=f(()=>{"use strict";a();_();Er();P();w();zE=A({multiplier:{description:"Volume Multiplier",type:5,markers:Vt(1,5,1),default:2,stickToMarkers:!0}}),Vf=h({name:"VolumeBooster",authors:[p.Nuckyz],description:"Allows you to set the user and stream volume above the default maximum.",settings:zE,patches:[...[".Messages.USER_VOLUME","currentVolume:"].map(e=>({find:e,replacement:{match:/(?<=maxValue:\i\.\i)\?(\d+?):(\d+?)(?=,)/,replace:(t,o,r)=>`?${o}*$self.settings.store.multiplier:${r}*$self.settings.store.multiplier`}})),{find:"AudioContextSettingsMigrated",replacement:[{match:/(?<=isLocalMute\(\i,\i\),volume:.+?volume:)\i(?=})/,replace:"$&>200?200:$&"},{match:/(?<=Object\.entries\(\i\.localMutes\).+?volume:).+?(?=,)/,replace:"$&>200?200:$&"},{match:/(?<=Object\.entries\(\i\.localVolumes\).+?volume:).+?(?=})/,replace:"$&>200?200:$&"}]},{find:'="MediaEngineStore",',replacement:[{match:/(\.settings\.audioContextSettings.+?)(\i\[\i\])=(\i\.volume)(.+?setLocalVolume\(\i,).+?\)/,replace:(e,t,o,r,i)=>t+`(${o}>200?void 0:${o}=${r})`+i+`${o}??${r})`}]}]})});var eg,H5=f(()=>{"use strict";a();P();w();eg=h({name:"WatchTogetherAdblock",description:"Block ads in the YouTube WatchTogether activity via AdGuard",authors:[p.ImLvna]})});function KE(e,t,o){let r=t.name+(t.id?`:${t.id}`:"");return St.get({url:yt.Endpoints.REACTIONS(e.channel_id,e.id,r),query:{limit:100,type:o},oldFormErrors:!0}).then(i=>F.dispatch({type:"MESSAGE_REACTION_ADD_USERS",channelId:e.channel_id,messageId:e.id,users:i.body,emoji:t,reactionType:o})).catch(console.error).finally(()=>an(250))}function YE(e,t,o){let r=`${e.id}:${t.name}:${t.id??""}:${o}`,i=z5[r]??={fetched:!1,users:{}};return i.fetched||(qE.unshift(()=>KE(e,t,o)),i.fetched=!0),i.users}function ZE(e){return function(o,r){return n(oe,{text:e.slice(4).map(i=>i.username).join(", ")},({onMouseEnter:i,onMouseLeave:s})=>n("div",{className:WE.moreUsers,onMouseEnter:i,onMouseLeave:s},"+",e.length-4))}}function XE(e){e.stopPropagation()}var jE,WE,rv,qE,z5,tg,j5=f(()=>{"use strict";a();re();P();be();Si();ft();w();$();b();jE=ve("defaultRenderUser","showDefaultAvatarsForNullUsers"),WE=C("moreUsers","emptyUser","avatarContainer","clickableAvatar"),rv=null,qE=new $o;tg=h({name:"WhoReacted",description:"Renders the avatars of users who reacted to a message",authors:[p.Ven,p.KannaDev,p.newwares],patches:[{find:",reactionRef:",replacement:{match:/(\i)\?null:\(0,\i\.jsx\)\(\i\.\i,{className:\i\.reactionCount,.*?}\),/,replace:"$&$1?null:$self.renderUsers(this.props),"}},{find:'"MessageReactionsStore"',replacement:{match:/(?<=CONNECTION_OPEN:function\(\){)(\i)={}/,replace:"$&;$self.reactions=$1"}},{find:"cleanAutomaticAnchor(){",replacement:{match:/constructor\(\i\)\{(?=.{0,100}automaticAnchor)/,replace:"$&$self.setScrollObj(this);"}}],setScrollObj(e){rv=e},renderUsers(e){return e.message.reactions.length>10?null:n(k,{noop:!0},n(this._renderUsers,{...e}))},_renderUsers({message:e,emoji:t,type:o}){let r=Jo();H.useLayoutEffect(()=>{rv?.scrollCounter>0&&rv.setAutomaticAnchor(null)}),H.useEffect(()=>{let l=u=>{u.messageId===e.id&&r()};return F.subscribe("MESSAGE_REACTION_ADD_USERS",l),()=>F.unsubscribe("MESSAGE_REACTION_ADD_USERS",l)},[e.id]);let i=YE(e,t,o),s=Object.values(i).filter(Boolean);for(let l of s)F.dispatch({type:"USER_UPDATE",user:l});return n("div",{style:{marginLeft:"0.5em",transform:"scale(0.9)"}},n("div",{onClick:XE},n(jE,{users:s,guildId:te.getChannel(e.channel_id)?.guild_id,renderIcon:!1,max:5,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:ZE(s)})))},set reactions(e){z5=e}})});var og,W5=f(()=>{"use strict";a();Do();P();w();og=h({name:"Wikisearch",description:"Searches Wikipedia for your requested query. (/wikisearch)",authors:[p.Samu],dependencies:["CommandsAPI"],commands:[{name:"wikisearch",description:"Searches Wikipedia for your request.",inputType:0,options:[{name:"search",description:"Word to search for",type:3,required:!0}],execute:async(e,t)=>{let o=Ot(e,"search","");if(!o)return Me(t.channel.id,{content:"No word was defined!"});let r=new URLSearchParams({action:"query",format:"json",list:"search",formatversion:"2",origin:"*",srsearch:o}),i=await fetch("https://en.wikipedia.org/w/api.php?"+r).then(c=>c.json()).catch(c=>(console.log(c),Me(t.channel.id,{content:"There was an error. Check the console for more info"}),null));if(!i)return;if(!i.query?.search?.length)return console.log(i),Me(t.channel.id,{content:"No results given"});let s=await fetch(`https://en.wikipedia.org/w/api.php?action=query&format=json&prop=info%7Cdescription%7Cimages%7Cimageinfo%7Cpageimages&list=&meta=&indexpageids=1&pageids=${i.query.search[0].pageid}&formatversion=2&origin=*`).then(c=>c.json()).then(c=>c.query.pages[0]).catch(c=>(console.log(c),Me(t.channel.id,{content:"There was an error. Check the console for more info"}),null));if(!s)return;let l=s.thumbnail,u=l&&{url:l.source.replace(/(50px-)/ig,"1000px-"),height:l.height*100,width:l.width*100};Me(t.channel.id,{embeds:[{type:"rich",title:i.query.search[0].title,url:`https://wikipedia.org/w/index.php?curid=${i.query.search[0].pageid}`,color:"0x8663BE",description:i.query.search[0].snippet.replace(/( |<([^>]+)>)/ig,"").replace(/(")/ig,'"')+"...",image:u,footer:{text:"Powered by the Wikimedia API"}}]})}}]})});function QE(e){return e.type===ng.DM&&Zt.store.dmNotifications||e.type===ng.GROUP_DM&&Zt.store.groupDmNotifications?!1:!Zt.store.serverNotifications}function VE(e,t,o){fetch(`https://cdn.discordapp.com/avatars/${o.author.id}/${o.author.avatar}.png?size=128`).then(r=>r.arrayBuffer()).then(r=>{let i={messageType:1,index:0,timeout:Zt.store.lengthBasedTimeout?Y5(t):Zt.store.timeout,height:K5(t),opacity:Zt.store.opacity,volume:Zt.store.volume,audioPath:Zt.store.soundPath,title:e,content:t,useBase64Icon:!0,icon:r,sourceApp:"Vencord"};q5.sendToOverlay(i)})}function eO(e,t){let o={messageType:1,index:0,timeout:Zt.store.lengthBasedTimeout?Y5(e):Zt.store.timeout,height:K5(e),opacity:Zt.store.opacity,volume:Zt.store.volume,audioPath:Zt.store.soundPath,title:t,content:e,useBase64Icon:!1,icon:null,sourceApp:"Vencord"};q5.sendToOverlay(o)}function tO(e,t){let o=L.getCurrentUser();return e.author.id===o.id||e.author.bot&&!Zt.store.botNotifications?!1:JE(e,t)}function K5(e){return e.length<=100?100:e.length<=200?150:e.length<=300?200:250}function Y5(e){return e.length<=100?3:e.length<=200?4:e.length<=300?5:6}var ng,JE,aIe,Zt,q5,rg,Z5=f(()=>{"use strict";a();_();Er();P();ke();w();$();b();ng=Qe(e=>e.ANNOUNCEMENT_THREAD===10),JE=ye(".SUPPRESS_NOTIFICATIONS))return!1"),aIe=new Q("XSOverlay"),Zt=A({botNotifications:{type:3,description:"Allow bot notifications",default:!1},serverNotifications:{type:3,description:"Allow server notifications",default:!0},dmNotifications:{type:3,description:"Allow Direct Message notifications",default:!0},groupDmNotifications:{type:3,description:"Allow Group DM notifications",default:!0},callNotifications:{type:3,description:"Allow call notifications",default:!0},pingColor:{type:0,description:"User mention color",default:"#7289da"},channelPingColor:{type:0,description:"Channel mention color",default:"#8a2be2"},soundPath:{type:0,description:"Notification sound (default/warning/error)",default:"default"},timeout:{type:1,description:"Notification duration (secs)",default:3},lengthBasedTimeout:{type:3,description:"Extend duration with message length",default:!0},opacity:{type:5,description:"Notif opacity",default:1,markers:Vt(0,1,.1)},volume:{type:5,description:"Volume",default:.2,markers:Vt(0,1,.1)}}),q5=VencordNative.pluginHelpers.XSOverlay,rg=h({name:"XSOverlay",description:"Forwards discord notifications to XSOverlay, for easy viewing in VR",authors:[p.Nyako],tags:["vr","notify"],reporterTestable:2,settings:Zt,flux:{CALL_UPDATE({call:e}){if(e?.ringing?.includes(L.getCurrentUser().id)&&Zt.store.callNotifications){let t=te.getChannel(e.channel_id);eO("Incoming call",`${t.name} is calling you...`)}},MESSAGE_CREATE({message:e,optimistic:t}){if(t)return;let o=te.getChannel(e.channel_id);if(!tO(e,e.channel_id))return;let r=Zt.store.pingColor.replaceAll("#","").trim(),i=Zt.store.channelPingColor.replaceAll("#","").trim(),s=e.content,l="";if(o.guild_id){let g=se.getGuild(o.guild_id);l=`${e.author.username} (${g.name}, #${o.name})`}switch(o.type){case ng.DM:l=e.author.username.trim();break;case ng.GROUP_DM:let g=o.name.trim()??o.rawRecipients.map(y=>y.username).join(", ");l=`${e.author.username} (${g})`;break}if(e.referenced_message&&(l+=" (reply)"),e.embeds.length>0&&(s+=" [embed] ",e.content===""&&(s="sent message embed(s)")),e.sticker_items&&(s+=" [sticker] ",e.content===""&&(s="sent a sticker")),e.attachments.filter(g=>typeof g?.content_type=="string"&&g?.content_type.startsWith("image")).forEach(g=>{s+=` [image: ${g.filename}] `}),e.attachments.filter(g=>g&&!g.content_type?.startsWith("image")).forEach(g=>{s+=` [attachment: ${g.filename}] `}),e.mentions.length>0&&(s=s.replace(/<@!?(\d{17,20})>/g,(g,y)=>`<color=#${r}><b>@${L.getUser(y)?.username||"unknown-user"}</color></b>`)),e.mention_roles.length>0)for(let g of e.mention_roles){let y=se.getRole(o.guild_id,g);if(!y)continue;let v=y.colorString??`#${r}`;s=s.replace(`<@&${g}>`,`<b><color=${v}>@${y.name}</color></b>`)}let c=s.match(new RegExp("(<a?:\\w+:\\d+>)","g")),m=s.match(new RegExp("<(#\\d+)>","g"));if(c)for(let g of c)s=s.replace(new RegExp(`${g}`,"g"),`:${g.split(":")[1]}:`);if(m)for(let g of m){let y=g.split("<#")[1];y=y.substring(0,y.length-1),s=s.replace(new RegExp(`${g}`,"g"),`<b><color=#${i}>#${te.getChannel(y).name}</color></b>`)}QE(o)||VE(l,s,e)}}})});var et,ps,QS,Rr=f(()=>{a();eb();tb();ob();nb();rb();ib();sb();ab();lb();cb();ub();pb();db();fb();Zh();Gb();Hb();zb();jb();Kb();Yb();Zb();e1();o2();n2();r2();a2();l2();N2();C2();R2();O2();B2();F2();H2();J2();Q2();tT();nT();rT();sT();aT();fT();gT();yT();$T();GT();HT();qT();ZT();XT();Sw();Nw();Cw();Dw();Lw();Ew();Ow();_w();Bw();Uw();zw();jw();Yw();Jw();Qw();ox();nx();V1();lx();Kp();vx();bx();xx();Px();my();kx();Lx();Fx();Wx();Kx();Yx();Zx();Qx();Vx();eP();rP();iP();sP();aP();lP();uP();pP();dP();mP();fP();gP();hP();yP();vP();SP();bP();TP();wP();xP();PP();IP();MP();AP();kP();DP();LP();Sl();zP();qP();wl();gI();wI();II();FI();UI();XI();JI();VI();dM();mM();yM();vM();TM();qM();KM();ZM();XM();QM();oA();uA();gA();JA();QA();VA();iN();L0();dN();fN();vN();SN();bN();wN();RN();kN();DN();ON();BN();FN();WN();qN();KN();e5();n5();K0();r5();i5();s5();l5();m5();h5();y5();b5();T5();x5();I5();M5();R5();D5();$5();G5();H5();j5();W5();Z5();et={[tu.name]:tu,[ru.name]:ru,[iu.name]:iu,[su.name]:su,[au.name]:au,[lu.name]:lu,[cu.name]:cu,[uu.name]:uu,[pu.name]:pu,[du.name]:du,[mu.name]:mu,[fu.name]:fu,[gu.name]:gu,[hu.name]:hu,[hs.name]:hs,[bu.name]:bu,[Tu.name]:Tu,[wu.name]:wu,[xu.name]:xu,[Pu.name]:Pu,[Iu.name]:Iu,[Mu.name]:Mu,[Au.name]:Au,[Nu.name]:Nu,[Cu.name]:Cu,[Ru.name]:Ru,[ku.name]:ku,[Du.name]:Du,[Lu.name]:Lu,[Ou.name]:Ou,[_u.name]:_u,[Bu.name]:Bu,[Fu.name]:Fu,[Uu.name]:Uu,[$u.name]:$u,[zu.name]:zu,[ju.name]:ju,[Wu.name]:Wu,[qu.name]:qu,[Ku.name]:Ku,[Yu.name]:Yu,[Zu.name]:Zu,[Qu.name]:Qu,[Vu.name]:Vu,[ep.name]:ep,[cp.name]:cp,[up.name]:up,[pp.name]:pp,[mp.name]:mp,[gp.name]:gp,[hp.name]:hp,[Mp.name]:Mp,[Ap.name]:Ap,[Np.name]:Np,[Cp.name]:Cp,[Rp.name]:Rp,[kp.name]:kp,[Dp.name]:Dp,[Lp.name]:Lp,[Ep.name]:Ep,[Op.name]:Op,[_p.name]:_p,[Bp.name]:Bp,[Up.name]:Up,[Gp.name]:Gp,[Hp.name]:Hp,[zp.name]:zp,[jp.name]:jp,[Wp.name]:Wp,[qp.name]:qp,[Yp.name]:Yp,[Xp.name]:Xp,[Jp.name]:Jp,[Qp.name]:Qp,[Vp.name]:Vp,[od.name]:od,[nd.name]:nd,[rd.name]:rd,[sd.name]:sd,[ad.name]:ad,[pd.name]:pd,[dd.name]:dd,[md.name]:md,[fd.name]:fd,[gd.name]:gd,[hd.name]:hd,[yd.name]:yd,[vd.name]:vd,[Sd.name]:Sd,[bd.name]:bd,[Td.name]:Td,[wd.name]:wd,[xd.name]:xd,[Pd.name]:Pd,[Id.name]:Id,[Md.name]:Md,[Nd.name]:Nd,[Cd.name]:Cd,[Rd.name]:Rd,[kd.name]:kd,[Dd.name]:Dd,[Ld.name]:Ld,[Ed.name]:Ed,[Od.name]:Od,[_d.name]:_d,[Bd.name]:Bd,[Fd.name]:Fd,[Ud.name]:Ud,[$d.name]:$d,[Gd.name]:Gd,[Hd.name]:Hd,[zd.name]:zd,[Zd.name]:Zd,[Jd.name]:Jd,[Qd.name]:Qd,[nm.name]:nm,[rm.name]:rm,[lm.name]:lm,[cm.name]:cm,[gm.name]:gm,[hm.name]:hm,[Sm.name]:Sm,[bm.name]:bm,[xm.name]:xm,[Am.name]:Am,[Nm.name]:Nm,[Cm.name]:Cm,[Rm.name]:Rm,[Dm.name]:Dm,[Um.name]:Um,[$m.name]:$m,[Gm.name]:Gm,[Hm.name]:Hm,[zm.name]:zm,[Wm.name]:Wm,[Km.name]:Km,[Ym.name]:Ym,[ef.name]:ef,[tf.name]:tf,[of.name]:of,[rf.name]:rf,[sf.name]:sf,[af.name]:af,[lf.name]:lf,[cf.name]:cf,[uf.name]:uf,[pf.name]:pf,[df.name]:df,[mf.name]:mf,[ff.name]:ff,[gf.name]:gf,[hf.name]:hf,[yf.name]:yf,[Sf.name]:Sf,[xf.name]:xf,[Pf.name]:Pf,[If.name]:If,[Af.name]:Af,[Rf.name]:Rf,[Cf.name]:Cf,[kf.name]:kf,[Df.name]:Df,[Lf.name]:Lf,[Ef.name]:Ef,[Of.name]:Of,[Bf.name]:Bf,[Ff.name]:Ff,[$f.name]:$f,[Gf.name]:Gf,[Wf.name]:Wf,[qf.name]:qf,[Kf.name]:Kf,[Zf.name]:Zf,[Xf.name]:Xf,[Qf.name]:Qf,[Vf.name]:Vf,[eg.name]:eg,[tg.name]:tg,[og.name]:og,[rg.name]:rg},ps={[tu.name]:{folderName:"_api/badges",userPlugin:!1},[ru.name]:{folderName:"_api/chatButtons.ts",userPlugin:!1},[iu.name]:{folderName:"_api/commands.ts",userPlugin:!1},[su.name]:{folderName:"_api/contextMenu.ts",userPlugin:!1},[au.name]:{folderName:"_api/memberListDecorators.ts",userPlugin:!1},[lu.name]:{folderName:"_api/messageAccessories.ts",userPlugin:!1},[cu.name]:{folderName:"_api/messageDecorations.ts",userPlugin:!1},[uu.name]:{folderName:"_api/messageEvents.ts",userPlugin:!1},[pu.name]:{folderName:"_api/messagePopover.ts",userPlugin:!1},[du.name]:{folderName:"_api/messageUpdater.ts",userPlugin:!1},[mu.name]:{folderName:"_api/notices.ts",userPlugin:!1},[fu.name]:{folderName:"_api/serverList.ts",userPlugin:!1},[gu.name]:{folderName:"_api/userSettings.ts",userPlugin:!1},[hu.name]:{folderName:"_core/noTrack.ts",userPlugin:!1},[hs.name]:{folderName:"_core/settings.tsx",userPlugin:!1},[bu.name]:{folderName:"_core/supportHelper.tsx",userPlugin:!1},[Tu.name]:{folderName:"alwaysAnimate",userPlugin:!1},[wu.name]:{folderName:"alwaysTrust",userPlugin:!1},[xu.name]:{folderName:"anonymiseFileNames",userPlugin:!1},[Pu.name]:{folderName:"appleMusic.desktop",userPlugin:!1},[Iu.name]:{folderName:"automodContext",userPlugin:!1},[Mu.name]:{folderName:"banger",userPlugin:!1},[Au.name]:{folderName:"betterFolders",userPlugin:!1},[Nu.name]:{folderName:"betterGifAltText",userPlugin:!1},[Cu.name]:{folderName:"betterGifPicker",userPlugin:!1},[Ru.name]:{folderName:"betterNotes",userPlugin:!1},[ku.name]:{folderName:"betterRoleContext",userPlugin:!1},[Du.name]:{folderName:"betterRoleDot",userPlugin:!1},[Lu.name]:{folderName:"betterSessions",userPlugin:!1},[Ou.name]:{folderName:"betterSettings",userPlugin:!1},[_u.name]:{folderName:"betterUploadButton",userPlugin:!1},[Bu.name]:{folderName:"biggerStreamPreview",userPlugin:!1},[Fu.name]:{folderName:"blurNsfw",userPlugin:!1},[Uu.name]:{folderName:"callTimer",userPlugin:!1},[$u.name]:{folderName:"clearURLs",userPlugin:!1},[zu.name]:{folderName:"clientTheme",userPlugin:!1},[ju.name]:{folderName:"colorSighted",userPlugin:!1},[Wu.name]:{folderName:"consoleShortcuts",userPlugin:!1},[qu.name]:{folderName:"copyEmojiMarkdown",userPlugin:!1},[Ku.name]:{folderName:"copyUserURLs",userPlugin:!1},[Yu.name]:{folderName:"crashHandler",userPlugin:!1},[Zu.name]:{folderName:"ctrlEnterSend",userPlugin:!1},[Qu.name]:{folderName:"customRPC",userPlugin:!1},[Vu.name]:{folderName:"customidle",userPlugin:!1},[ep.name]:{folderName:"dearrow",userPlugin:!1},[cp.name]:{folderName:"decor",userPlugin:!1},[up.name]:{folderName:"disableCallIdle",userPlugin:!1},[pp.name]:{folderName:"dontRoundMyTimestamps",userPlugin:!1},[mp.name]:{folderName:"emoteCloner",userPlugin:!1},[gp.name]:{folderName:"experiments",userPlugin:!1},[hp.name]:{folderName:"f8break",userPlugin:!1},[Mp.name]:{folderName:"fakeNitro",userPlugin:!1},[Ap.name]:{folderName:"fakeProfileThemes",userPlugin:!1},[Np.name]:{folderName:"favEmojiFirst",userPlugin:!1},[Cp.name]:{folderName:"favGifSearch",userPlugin:!1},[Rp.name]:{folderName:"fixCodeblockGap",userPlugin:!1},[kp.name]:{folderName:"fixSpotifyEmbeds.desktop",userPlugin:!1},[Dp.name]:{folderName:"fixYoutubeEmbeds.desktop",userPlugin:!1},[Lp.name]:{folderName:"forceOwnerCrown",userPlugin:!1},[Ep.name]:{folderName:"friendInvites",userPlugin:!1},[Op.name]:{folderName:"friendsSince",userPlugin:!1},[_p.name]:{folderName:"gameActivityToggle",userPlugin:!1},[Bp.name]:{folderName:"gifPaste",userPlugin:!1},[Up.name]:{folderName:"greetStickerPicker",userPlugin:!1},[Gp.name]:{folderName:"hideAttachments",userPlugin:!1},[Hp.name]:{folderName:"iLoveSpam",userPlugin:!1},[zp.name]:{folderName:"ignoreActivities",userPlugin:!1},[jp.name]:{folderName:"imageLink",userPlugin:!1},[Wp.name]:{folderName:"imageZoom",userPlugin:!1},[qp.name]:{folderName:"implicitRelationships",userPlugin:!1},[Yp.name]:{folderName:"invisibleChat.desktop",userPlugin:!1},[Xp.name]:{folderName:"keepCurrentChannel",userPlugin:!1},[Jp.name]:{folderName:"lastfm",userPlugin:!1},[Qp.name]:{folderName:"loadingQuotes",userPlugin:!1},[Vp.name]:{folderName:"maskedLinkPaste",userPlugin:!1},[od.name]:{folderName:"memberCount",userPlugin:!1},[nd.name]:{folderName:"messageClickActions",userPlugin:!1},[rd.name]:{folderName:"messageLatency",userPlugin:!1},[sd.name]:{folderName:"messageLinkEmbeds",userPlugin:!1},[ad.name]:{folderName:"messageLogger",userPlugin:!1},[pd.name]:{folderName:"messageTags",userPlugin:!1},[dd.name]:{folderName:"moreCommands",userPlugin:!1},[md.name]:{folderName:"moreKaomoji",userPlugin:!1},[fd.name]:{folderName:"moreUserTags",userPlugin:!1},[gd.name]:{folderName:"moyai",userPlugin:!1},[hd.name]:{folderName:"mutualGroupDMs",userPlugin:!1},[yd.name]:{folderName:"newGuildSettings",userPlugin:!1},[vd.name]:{folderName:"noBlockedMessages",userPlugin:!1},[Sd.name]:{folderName:"noDefaultHangStatus",userPlugin:!1},[bd.name]:{folderName:"noDevtoolsWarning",userPlugin:!1},[Td.name]:{folderName:"noF1",userPlugin:!1},[wd.name]:{folderName:"noMosaic",userPlugin:!1},[xd.name]:{folderName:"noOnboardingDelay",userPlugin:!1},[Pd.name]:{folderName:"noPendingCount",userPlugin:!1},[Id.name]:{folderName:"noProfileThemes",userPlugin:!1},[Md.name]:{folderName:"noRPC.discordDesktop",userPlugin:!1},[Nd.name]:{folderName:"noReplyMention",userPlugin:!1},[Cd.name]:{folderName:"noScreensharePreview",userPlugin:!1},[Rd.name]:{folderName:"noServerEmojis",userPlugin:!1},[kd.name]:{folderName:"noSystemBadge.discordDesktop",userPlugin:!1},[Dd.name]:{folderName:"noTypingAnimation",userPlugin:!1},[Ld.name]:{folderName:"noUnblockToJump",userPlugin:!1},[Ed.name]:{folderName:"normalizeMessageLinks",userPlugin:!1},[Od.name]:{folderName:"notificationVolume",userPlugin:!1},[_d.name]:{folderName:"nsfwGateBypass",userPlugin:!1},[Bd.name]:{folderName:"onePingPerDM",userPlugin:!1},[Fd.name]:{folderName:"oneko",userPlugin:!1},[Ud.name]:{folderName:"openInApp",userPlugin:!1},[$d.name]:{folderName:"overrideForumDefaults",userPlugin:!1},[Gd.name]:{folderName:"partyMode",userPlugin:!1},[Hd.name]:{folderName:"pauseInvitesForever",userPlugin:!1},[zd.name]:{folderName:"permissionFreeWill",userPlugin:!1},[Zd.name]:{folderName:"permissionsViewer",userPlugin:!1},[Jd.name]:{folderName:"petpet",userPlugin:!1},[Qd.name]:{folderName:"pictureInPicture",userPlugin:!1},[nm.name]:{folderName:"pinDms",userPlugin:!1},[rm.name]:{folderName:"plainFolderIcon",userPlugin:!1},[lm.name]:{folderName:"platformIndicators",userPlugin:!1},[cm.name]:{folderName:"previewMessage",userPlugin:!1},[gm.name]:{folderName:"pronoundb",userPlugin:!1},[hm.name]:{folderName:"quickMention",userPlugin:!1},[Sm.name]:{folderName:"quickReply",userPlugin:!1},[bm.name]:{folderName:"reactErrorDecoder",userPlugin:!1},[xm.name]:{folderName:"readAllNotificationsButton",userPlugin:!1},[Am.name]:{folderName:"relationshipNotifier",userPlugin:!1},[Nm.name]:{folderName:"replaceGoogleSearch",userPlugin:!1},[Cm.name]:{folderName:"replyTimestamp",userPlugin:!1},[Rm.name]:{folderName:"revealAllSpoilers",userPlugin:!1},[Dm.name]:{folderName:"reverseImageSearch",userPlugin:!1},[Um.name]:{folderName:"reviewDB",userPlugin:!1},[$m.name]:{folderName:"roleColorEverywhere",userPlugin:!1},[Gm.name]:{folderName:"searchReply",userPlugin:!1},[Hm.name]:{folderName:"secretRingTone",userPlugin:!1},[zm.name]:{folderName:"seeSummaries",userPlugin:!1},[Wm.name]:{folderName:"sendTimestamps",userPlugin:!1},[Km.name]:{folderName:"serverInfo",userPlugin:!1},[Ym.name]:{folderName:"serverListIndicators",userPlugin:!1},[ef.name]:{folderName:"shikiCodeblocks.desktop",userPlugin:!1},[tf.name]:{folderName:"showAllMessageButtons",userPlugin:!1},[of.name]:{folderName:"showAllRoles",userPlugin:!1},[rf.name]:{folderName:"showConnections",userPlugin:!1},[sf.name]:{folderName:"showHiddenChannels",userPlugin:!1},[af.name]:{folderName:"showHiddenThings",userPlugin:!1},[lf.name]:{folderName:"showMeYourName",userPlugin:!1},[cf.name]:{folderName:"showTimeoutDuration",userPlugin:!1},[uf.name]:{folderName:"silentMessageToggle",userPlugin:!1},[pf.name]:{folderName:"silentTyping",userPlugin:!1},[df.name]:{folderName:"sortFriendRequests",userPlugin:!1},[mf.name]:{folderName:"spotifyControls",userPlugin:!1},[ff.name]:{folderName:"spotifyCrack",userPlugin:!1},[gf.name]:{folderName:"spotifyShareCommands",userPlugin:!1},[hf.name]:{folderName:"startupTimings",userPlugin:!1},[yf.name]:{folderName:"streamerModeOnStream",userPlugin:!1},[Sf.name]:{folderName:"superReactionTweaks",userPlugin:!1},[xf.name]:{folderName:"textReplace",userPlugin:!1},[Pf.name]:{folderName:"themeAttributes",userPlugin:!1},[If.name]:{folderName:"timeBarAllActivities",userPlugin:!1},[Af.name]:{folderName:"translate",userPlugin:!1},[Rf.name]:{folderName:"typingIndicator",userPlugin:!1},[Cf.name]:{folderName:"typingTweaks",userPlugin:!1},[kf.name]:{folderName:"unindent",userPlugin:!1},[Df.name]:{folderName:"unlockedAvatarZoom",userPlugin:!1},[Lf.name]:{folderName:"unsuppressEmbeds",userPlugin:!1},[Ef.name]:{folderName:"urbanDictionary",userPlugin:!1},[Of.name]:{folderName:"userVoiceShow",userPlugin:!1},[Bf.name]:{folderName:"usrbg",userPlugin:!1},[Ff.name]:{folderName:"validReply",userPlugin:!1},[$f.name]:{folderName:"validUser",userPlugin:!1},[Gf.name]:{folderName:"vcDoubleClick",userPlugin:!1},[Wf.name]:{folderName:"vcNarrator",userPlugin:!1},[qf.name]:{folderName:"vencordToolbox",userPlugin:!1},[Kf.name]:{folderName:"viewIcons",userPlugin:!1},[Zf.name]:{folderName:"viewRaw",userPlugin:!1},[Xf.name]:{folderName:"voiceDownload",userPlugin:!1},[Qf.name]:{folderName:"voiceMessages",userPlugin:!1},[Vf.name]:{folderName:"volumeBooster.discordDesktop",userPlugin:!1},[eg.name]:{folderName:"watchTogetherAdblock.desktop",userPlugin:!1},[tg.name]:{folderName:"whoReacted",userPlugin:!1},[og.name]:{folderName:"wikisearch",userPlugin:!1},[rg.name]:{folderName:"xsOverlay.desktop",userPlugin:!1}},QS={"WebRichPresence (arRPC)":"web",DevCompanion:"dev",WebContextMenus:"web",WebKeybinds:"web",WebScreenShareFixes:"web"}});var sv={};lt(sv,{BadgePosition:()=>ou,_getBadges:()=>Kh,addBadge:()=>Ky,removeBadge:()=>Yy});function Ky(e){e.component&&=k.wrap(e.component,{noop:!0}),iv.add(e)}function Yy(e){return iv.delete(e)}function Kh(e){let t=[];for(let r of iv)if(!r.shouldShow||r.shouldShow(e)){let i=r.getBadges?r.getBadges(e).map(s=>(s.component&&=k.wrap(s.component,{noop:!0}),s)):[{...r,...e}];r.position===0?t.unshift(...i):t.push(...i)}let o=et.BadgeAPI.getDonorBadges(e.userId);return o&&t.unshift(...o),t}var ou,iv,nu=f(()=>{"use strict";a();re();Rr();ou=(o=>(o[o.START=0]="START",o[o.END=1]="END",o))(ou||{}),iv=new Set});var av={};lt(av,{Badges:()=>sO,ChatButtons:()=>fO,Commands:()=>nO,ContextMenu:()=>mO,DataStore:()=>vt,MemberListDecorators:()=>cO,MessageAccessories:()=>rO,MessageDecorations:()=>lO,MessageEvents:()=>oO,MessagePopover:()=>iO,MessageUpdater:()=>gO,Notices:()=>Vn,Notifications:()=>dO,ServerList:()=>aO,Settings:()=>uO,Styles:()=>pO,UserSettings:()=>hO});var oO,Vn,nO,vt,rO,iO,sO,aO,lO,cO,uO,pO,dO,mO,fO,gO,hO,Jn=f(()=>{"use strict";a();nu();or();Do();So();cn();Gy();el();Wy();Rn();Ui();gl();vh();zn();wm();_();Ve();Fr();oO=p1,Vn=yh,nO=Ih,vt=Mn,rO=Xh,iO=Y1,sO=sv,aO=Qy,lO=jy,cO=$y,uO=mh,pO=Ag,dO=Jg,mO=$h,fO=ny,gO=ry,hO=Qh});function yO(e,t,o){let r=t;if(t in e)return void o(e[r]);Object.defineProperty(e,t,{set(i){delete e[r],e[r]=i,o(i)},configurable:!0,enumerable:!1})}var X5=f(()=>{"use strict";a()});var lv={};lt(lv,{ChangeList:()=>Ka,Devs:()=>p,DevsById:()=>os,ImageModal:()=>Ng,LazyComponent:()=>Dt,Logger:()=>Q,Margins:()=>G,ModalCloseButton:()=>ut,ModalContent:()=>we,ModalFooter:()=>ct,ModalHeader:()=>Ee,ModalRoot:()=>fe,ModalSize:()=>Ro,Modals:()=>un,NoopComponent:()=>yC,Queue:()=>$o,REACT_GLOBAL:()=>fC,SUPPORT_CHANNEL_ID:()=>hi,SYM_LAZY_CACHED:()=>En,SYM_LAZY_GET:()=>on,Theme:()=>Ac,WEBPACK_CHUNK:()=>ts,ZWSP:()=>Fa,canonicalizeDescriptor:()=>Zl,canonicalizeFind:()=>ag,canonicalizeMatch:()=>Kt,canonicalizeReplace:()=>Xs,canonicalizeReplacement:()=>Js,checkIntersecting:()=>yg,classes:()=>q,closeAllModals:()=>An,closeModal:()=>Un,copyWithToast:()=>po,debounce:()=>ro,fetchUserProfile:()=>kg,formatDuration:()=>Ua,getCurrentChannel:()=>pn,getCurrentGuild:()=>wi,getTheme:()=>is,getUniqueUsername:()=>Gn,humanFriendlyJoin:()=>v4,identity:()=>ns,insertTextIntoChatInputBox:()=>$n,isMobile:()=>hC,isNonNullish:()=>Qn,isObject:()=>gC,isObjectEmpty:()=>fa,isPluginDev:()=>Fn,isTruthy:()=>Xu,localStorage:()=>vi,makeCodeblock:()=>Ii,makeLazy:()=>xn,mergeDefaults:()=>rs,onceDefined:()=>yO,onlyOnce:()=>qa,openImageModal:()=>Go,openInviteModal:()=>Ti,openModal:()=>ue,openModalLazy:()=>Sa,openPrivateChannel:()=>CC,openUserProfile:()=>Ho,parseUrl:()=>hg,pluralise:()=>vg,proxyLazy:()=>Tt,sendMessage:()=>Nc,sleep:()=>an,stripIndent:()=>S4,toInlineCode:()=>b4,tryOrElse:()=>gc,useAwaiter:()=>st,useForceUpdater:()=>Jo,useIntersection:()=>Sg,useTimer:()=>ga,wordsFromCamel:()=>Sh,wordsFromKebab:()=>p4,wordsFromPascal:()=>bh,wordsFromSnake:()=>u4,wordsFromTitle:()=>d4,wordsToCamel:()=>m4,wordsToKebab:()=>g4,wordsToPascal:()=>h4,wordsToSnake:()=>f4,wordsToTitle:()=>Yn});var J5=f(()=>{"use strict";a();Mr();X5();_h();P();pt();Ss();Mo();Yl();Sc();ke();Ze();bc();be();$e();Xc();Ko();Si();ft();Cn();});var pv={};lt(pv,{toggle:()=>cv});function uv(e){let t=document.createElement("style");return t.id=e,document.documentElement.append(t),t}async function vO(){let e=await VencordNative.themes.getSystemValues(),t=Object.entries(e).filter(([,o])=>o!=="#").map(([o,r])=>`--${o}: ${r};`).join("");uv("vencord-os-theme-values").textContent=`:root{${t}}`}async function cv(e){Zs?Zs.disabled=!e:e&&(Zs=uv("vencord-custom-css"),VencordNative.quickCss.addChangeListener(t=>{Zs.textContent=t,Zs.disabled=!j.useQuickCss}),Zs.textContent=await VencordNative.quickCss.get())}async function ig(){Q5??=uv("vencord-themes");let{themeLinks:e,enabledThemes:t}=j,o=[...e];{let r=t.map(i=>`vencord:///themes/${i}?v=${Date.now()}`);o.push(...r)}Q5.textContent=o.map(r=>`@import url("${r.trim()}");`).join(`
|
|
`)}var Zs,Q5,dv=f(()=>{"use strict";a();_();document.addEventListener("DOMContentLoaded",()=>{vO(),ig(),cv(j.useQuickCss),io.addChangeListener("useQuickCss",cv),io.addChangeListener("themeLinks",ig),io.addChangeListener("enabledThemes",ig),VencordNative.quickCss.addThemeChangeListener(ig)})});var mv={};lt(mv,{ChunkIdsRegex:()=>nc,Common:()=>es,DefaultExtractAndLoadChunksRegex:()=>oc,LazyComponentWebpack:()=>ec,_initWebpack:()=>Vl,_resolveReady:()=>Qs,beforeInitListeners:()=>Ql,cache:()=>Yo,extract:()=>oa,extractAndLoadChunks:()=>pg,extractAndLoadChunksLazy:()=>On,factoryListeners:()=>Vs,filters:()=>ae,find:()=>Zo,findAll:()=>br,findBulk:()=>Tr,findByCode:()=>ta,findByCodeLazy:()=>ye,findByProps:()=>ea,findByPropsLazy:()=>C,findComponentByCode:()=>tc,findComponentByCodeLazy:()=>ve,findComponentLazy:()=>Ki,findExportedComponentLazy:()=>Xo,findLazy:()=>Qe,findModuleFactory:()=>lg,findModuleId:()=>wr,findStore:()=>cg,findStoreLazy:()=>me,handleModuleNotFound:()=>Pn,lazyWebpackSearchHistory:()=>vv,mapMangledModule:()=>ug,mapMangledModuleLazy:()=>oo,moduleListeners:()=>Jl,onceReady:()=>ri,proxyLazyWebpack:()=>Ao,search:()=>Yi,subscriptions:()=>Sr,waitFor:()=>ht,wreq:()=>$t});var sg=f(()=>{"use strict";a();b();$()});function SO(e){function t(o){try{eC(o[1])}catch(r){tn.error("Error in handlePush",r)}return t.$$vencordOriginal.call(e,o)}t.$$vencordOriginal=e.push,t.toString=t.$$vencordOriginal.toString.bind(t.$$vencordOriginal),t.bind=(...o)=>t.$$vencordOriginal.bind(...o),Object.defineProperty(e,"push",{configurable:!0,get:()=>t,set(o){t.$$vencordOriginal=o}})}function eC(e){for(let t in e){let o=e[t],r=o,i=new Set,s=e[t]=function(u,c,m){$t==null;try{o(u,c,m)}catch(g){if(o===r)throw g;return tn.error("Error in patched module",g),void r(u,c,m)}if(c=u.exports,!!c){if(m.c){let g=!1;if(c===window)g=!0;else if(typeof c=="object")if(c?.default===window)g=!0;else for(let y in c)y.length<=3&&c[y]===window&&(g=!0);if(g){Object.defineProperty(m.c,t,{value:m.c[t],enumerable:!1,configurable:!0,writable:!0});return}}for(let g of Jl)try{g(c,t)}catch(y){tn.error(`Error in Webpack module listener:
|
|
`,y,g)}for(let[g,y]of Sr)try{if(c&&g(c))Sr.delete(g),y(c,t);else if(typeof c=="object")if(c.default&&g(c.default))Sr.delete(g),y(c.default,t);else for(let v in c)v.length<=3&&c[v]&&g(c[v])&&(Sr.delete(g),y(c[v],t))}catch(v){tn.error(`Error while firing callback for Webpack subscription:
|
|
`,v,g,y)}}};s.toString=r.toString.bind(r),s.original=r;for(let u of Vs)try{u(r)}catch(c){tn.error(`Error in Webpack factory listener:
|
|
`,c,u)}let l="0,"+o.toString().replaceAll(`
|
|
`,"");for(let u=0;u<fs.length;u++){let c=fs[u];if(c.predicate&&!c.predicate()||!(typeof c.find=="string"?l.includes(c.find):c.find.test(l)))continue;i.add(c.plugin);let g=nn(`patch by ${c.plugin}`,(M,x)=>l.replace(M,x)),y=o,v=l;for(let M of c.replacement){if(M.predicate&&!M.predicate())continue;let x=o,N=l;Js(M,c.plugin);try{let I=g(M.match,M.replace);if(I===l){if(c.noWarn||tn.warn(`Patch by ${c.plugin} had no effect (Module id is ${t}): ${M.match}`),c.group){tn.warn(`Undoing patch group ${c.find} by ${c.plugin} because replacement ${M.match} had no effect`),o=y,l=v,i.delete(c.plugin);break}continue}l=I,o=(0,eval)(`// Webpack Module ${t} - Patched by ${[...i].join(", ")}
|
|
${I}
|
|
//# sourceURL=WebpackModule${t}`)}catch(I){if(tn.error(`Patch by ${c.plugin} errored (Module id is ${t}): ${M.match}
|
|
`,I),i.delete(c.plugin),c.group){tn.warn(`Undoing patch group ${c.find} by ${c.plugin} because replacement ${M.match} errored`),o=y,l=v;break}o=x,l=N}}c.all||fs.splice(u--,1)}}}var tn,V5,tC=f(()=>{"use strict";a();P();ke();Ko();Xl();Ja();sg();tn=new Q("WebpackInterceptor","#8caaee");Object.defineProperty(window,ts,{configurable:!0,get:()=>V5,set:e=>{e?.push&&(e.push.$$vencordOriginal||(tn.info(`Patching ${ts}.push`),SO(e),delete window[ts],window[ts]=e)),V5=e}});Object.defineProperty(Function.prototype,"m",{configurable:!0,set(e){Object.defineProperty(this,"m",{value:e,configurable:!0,enumerable:!0,writable:!0});let{stack:t}=new Error;if(!(t?.includes("discord.com")||t?.includes("discordapp.com"))||Array.isArray(e))return;let o=t.match(/\/assets\/(.+?\.js)/)?.[1]??"";tn.info("Found Webpack module factory",o),eC(e),Object.defineProperty(this,"p",{configurable:!0,set(i){if(Object.defineProperty(this,"p",{value:i,configurable:!0,enumerable:!0,writable:!0}),clearTimeout(r),i==="/assets/"){tn.info(`Main Webpack found in ${o}, initializing internal references to WebpackRequire`),Vl(this);for(let s of Ql)s(this)}}});let r=setTimeout(()=>Reflect.deleteProperty(this,"p"),0)}})});var wO={};lt(wO,{Api:()=>av,Components:()=>Yg,PlainSettings:()=>Kn,Plugins:()=>Vc,QuickCss:()=>pv,Settings:()=>j,Updater:()=>Eh,Util:()=>lv,Webpack:()=>mv});async function bO(){if(j.cloud.authenticated&&!await It("Vencord_cloudSecret")){Ue({title:"Cloud Integrations",body:"We've noticed you have cloud integrations enabled in another client! Due to limitations, you will need to re-authenticate to continue using them. Click here to go to the settings page to do so!",color:"var(--yellow-360)",onClick:()=>mc.open("VencordCloud")});return}j.cloud.settingsSync&&j.cloud.authenticated&&(vi.Vencord_settingsDirty?(await ls(),delete vi.Vencord_settingsDirty):await $c(!1)&&Ue({title:"Cloud Settings",body:"Your settings have been updated! Click here to restart to fully apply changes!",color:"var(--green-360)",onClick:vo}))}async function TO(){await ri,Xa("WebpackReady"),bO();try{if(!await Zn())return;if(j.autoUpdate){await Br(),j.autoUpdateNotification&&setTimeout(()=>Ue({title:"Vencord has been updated!",body:"Click here to restart",permanent:!0,noPersist:!0,onClick:vo}),1e4);return}setTimeout(()=>Ue({title:"A Vencord update is available!",body:"Click here to view the update",permanent:!0,noPersist:!0,onClick:yu}),1e4)}catch(e){Ai.error("Failed to check for updates",e)}}var cx=f(()=>{a();Jn();Ca();Ja();J5();dv();Ni();sg();dv();tC();vu();w();cn();zn();_();Ja();Sc();qn();_a();Ni();sg();b();Xa("Init");TO();document.addEventListener("DOMContentLoaded",()=>{Xa("DOMContentLoaded"),j.winNativeTitleBar&&navigator.platform.toLowerCase().startsWith("win")&&document.head.append(Object.assign(document.createElement("style"),{id:"vencord-native-titlebar-style",textContent:"[class*=titleBar]{display: none!important}"}))},{once:!0})});cx();return gv(wO);})();
|
|
//# sourceURL=VencordRenderer
|
|
//# sourceMappingURL=vencord://renderer.js.map
|
|
/*! For license information please see renderer.js.LEGAL.txt */
|