// Vencord 96126fa // Standalone: true // Platform: Universal // Updater disabled: false "use strict";var Vencord=(()=>{var _w=Object.create;var Hs=Object.defineProperty;var Bw=Object.getOwnPropertyDescriptor;var Fw=Object.getOwnPropertyNames;var Uw=Object.getPrototypeOf,$w=Object.prototype.hasOwnProperty;var Rr=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var g=(e,t)=>()=>(e&&(t=e(e=0)),t);var rr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ue=(e,t)=>{for(var n in t)Hs(e,n,{get:t[n],enumerable:!0})},Ug=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Fw(t))!$w.call(e,i)&&i!==n&&Hs(e,i,{get:()=>t[i],enumerable:!(r=Bw(t,i))||r.enumerable});return e};var zs=(e,t,n)=>(n=e!=null?_w(Uw(e)):{},Ug(t||!e||!e.__esModule?Hs(n,"default",{value:e,enumerable:!0}):n,e)),Io=e=>Ug(Hs({},"__esModule",{value:!0}),e);var f,o,a=g(()=>{"use strict";f=Symbol.for("react.fragment"),o=(...e)=>(o=Vencord.Webpack.Common.React.createElement)(...e)});var ie,Je=g(()=>{"use strict";a();ie=class{constructor(t,n="white"){this.name=t;this.color=n}static makeTitle(t,n){return["%c %c %s ","",`background: ${t}; color: black; font-weight: bold; border-radius: 5px;`,n]}_log(t,n,r,i=""){console[t](`%c Vencord %c %c ${this.name} ${i}`,`background: ${n}; 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,...n){this._log("error","#e78284",n,t)}warn(...t){this._log("warn","#e5c890",t)}debug(...t){this._log("debug","#eebebe",t)}}});var $g,Y,ct=g(()=>{"use strict";a();$g="",Y={};for(let e of["top","bottom","left","right"])for(let t of[8,16,20]){let n=`vc-m-${e}-${t}`;Y[`${e}${t}`]=n,$g+=`.${n}{margin-${e}:${t}px;}`}document.addEventListener("DOMContentLoaded",()=>document.head.append(Object.assign(document.createElement("style"),{textContent:$g,id:"vencord-margins"})),{once:!0})});function Ao(e,t=5){let n=0,r;return()=>(!r&&t>n++&&(r=e(),!r&&t===n&&console.error("Lazy factory failed:",e)),r)}function Qe(e,t=5){let n=0,r=Object.assign(function(){},{[Pi]:void 0,[Ws](){return!r[Pi]&&t>n++&&(r[Pi]=e(),!r[Pi]&&t===n&&console.error("Lazy factory failed:",e)),r[Pi]}});return new Proxy(r,js)}var Gg,js,Ws,Pi,Zt=g(()=>{"use strict";a();Gg=["arguments","caller","prototype"],js={},Ws=Symbol.for("vencord.lazy.get"),Pi=Symbol.for("vencord.lazy.cached");for(let e of["apply","construct","defineProperty","deleteProperty","get","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf"])js[e]=(t,...n)=>Reflect[e](t[Ws](),...n);js.ownKeys=e=>{let t=e[Ws](),n=Reflect.ownKeys(t);for(let r of Gg)n.includes(r)||n.push(r);return n};js.getOwnPropertyDescriptor=(e,t)=>{if(typeof t=="string"&&Gg.includes(t))return Reflect.getOwnPropertyDescriptor(e,t);let n=Reflect.getOwnPropertyDescriptor(e[Ws](),t);return n&&Object.defineProperty(e,t,n),n}});var Gw,Pn,qs=g(()=>{"use strict";a();Je();Gw=(e,t,n)=>t,Pn=Gw});function Zs(e){if(In!==void 0)throw"no.";if(e.push([[Symbol("Vencord")],{},t=>mn=t]),e.pop(),!mn)return!1;In=mn.c;for(let t in In){let{exports:n}=In[t];if(!n)continue;let r=Number(t);for(let i of Ys)try{i(n,r)}catch(s){Ii.error("Error in webpack listener",s)}for(let[i,s]of Lr)try{if(i(n))Lr.delete(i),s(n,r);else if(typeof n=="object"){n.default&&i(n.default)&&(Lr.delete(i),s(n.default,r));for(let l in n)l.length<=3&&n[l]&&i(n[l])&&(Lr.delete(i),s(n[l],r))}}catch(l){Ii.error("Error while firing callback for webpack chunk",l)}}return!0}function Xs(e,...t){let n=new Error(`webpack.${e} found no module`);Ii.error(n,"Filter:",t)}function Lt(e){return Qe(()=>st(e))}function Er(e){if(typeof e!="function")throw new Error("Invalid filter. Expected a function got "+typeof e);let t=[];for(let n in In){let r=In[n];if(!!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 fn(e,t){return Qe(()=>zg(e,t))}function yt(...e){let t=st(ce.byProps(...e),{isIndirect:!0});return t||Xs("findByProps",...e),t}function A(...e){return Qe(()=>yt(...e))}function Bt(...e){let t=st(ce.byCode(...e),{isIndirect:!0});return t||Xs("findByCode",...e),t}function to(...e){return Qe(()=>Bt(...e))}function jg(e){let t=st(ce.byStoreName(e),{isIndirect:!0});return t||Xs("findStore",e),t}function Ie(e){return Qe(()=>jg(e))}function ut(e,t){if(typeof e=="string")e=ce.byProps(e);else if(Array.isArray(e))e=ce.byProps(...e);else if(typeof e!="function")throw new Error("filter must be a string, string[] or function, got "+typeof e);let[n,r]=st(e,{isIndirect:!0,isWaitFor:!0});if(n)return void t(n,r);Lr.set(e,t)}function Hw(e){Ys.add(e)}function zw(e){Ys.delete(e)}function ic(...e){let t={},n=mn.m;e:for(let r in n){let i=n[r].original??n[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 sc(e){let t=mn.m[e];if(!t)return null;let n=` // [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)(n)}var Ii,Ks,oc,mn,In,ce,Lr,Ys,st,rc,Hg,zg,j=g(()=>{"use strict";a();Zt();Je();qs();Ii=new ie("Webpack"),oc=new Promise(e=>Ks=e),ce={byProps:(...e)=>e.length===1?t=>t[e[0]]!==void 0:t=>e.every(n=>t[n]!==void 0),byCode:(...e)=>t=>{if(typeof t!="function")return!1;let n=Function.prototype.toString.call(t);for(let r of e)if(!n.includes(r))return!1;return!0},byStoreName:e=>t=>t.constructor?.displayName===e},Lr=new Map,Ys=new Set;st=Pn("find",function(t,{isIndirect:n=!1,isWaitFor:r=!1}={}){if(typeof t!="function")throw new Error("Invalid filter. Expected a function got "+typeof t);for(let i in In){let s=In[i];if(!!s?.exports){if(t(s.exports))return r?[s.exports,Number(i)]:s.exports;if(typeof s.exports=="object"){if(s.exports.default&&t(s.exports.default)){let l=s.exports.default;return r?[l,Number(i)]:l}for(let l in s.exports)if(l.length<=3){let c=s.exports[l];if(c&&t(c))return r?[c,Number(i)]:c}}}}return n||Xs("find",t),r?[null,null]:null});rc=Pn("findBulk",function(...t){if(!Array.isArray(t))throw new Error("Invalid filters. Expected function[] got "+typeof t);let{length:n}=t;if(n===0)throw new Error("Expected at least two filters.");if(n===1)return st(t[0]);let r=t,i=0,s=Array(n);e:for(let l in In){let c=In[l];if(!!c?.exports)for(let u=0;u{"use strict";a();j();Js=Lt(e=>e.image&&e.modal&&!e.applicationIcon),vt=A("buttonWrapper","buttonContent")});function Qs(e,t){let n=function(){throw new Error(`Vencord could not find the ${e} Component`)},r=me(()=>n);return ut(t,i=>{n=i,Object.assign(r,i)}),r}function At(e,t){ut(ce.byStoreName(e),t)}var ac=g(()=>{"use strict";a();Oe();j()});var S,xt,E,pt,V,et,Vs,oe,An,ea,ir,Xt,Ai,qg,Nn,Kg,Dr,Or,_r,Ni,Br,Hn,Ww,Yg=g(()=>{"use strict";a();j();ac();S={},Br=Qs("MaskedLink",e=>e?.type?.toString().includes("MASKED_LINK)")),Hn=Qs("Timestamp",ce.byCode(".Messages.MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL.format")),Ww=Qs("Flex",["Justify","Align","Wrap"]);ut(["FormItem","Button"],e=>{({useToken:Ni,Card:xt,Button:E,FormSwitch:pt,Tooltip:V,TextInput:et,TextArea:Vs,Text:oe,Select:An,SearchableSelect:ea,Slider:ir,ButtonLooks:Xt,TabBar:Nn,Popout:Ai,Dialog:qg,Paginator:Kg,ScrollerThin:Dr,Clickable:Or,Avatar:_r}=e),S=e})});var U,gn,Zg=g(()=>{"use strict";a();j();U={};ut(["MenuItem","MenuSliderControl"],e=>U=e);gn=fn('type:"CONTEXT_MENU_OPEN"',{open:ce.byCode("stopPropagation"),openLazy:e=>e.toString().length<50,close:ce.byCode("CONTEXT_MENU_CLOSE")})});var O,J,_e,Nt,Jt,Fr,ta,sr,Xg=g(()=>{"use strict";a();j();sr=A("createPortal","render");ut("useState",e=>{O=e,{useEffect:_e,useState:J,useMemo:Nt,useRef:Jt,useReducer:Fr,useCallback:ta}=O})});var lc,Ur,Ci,Jg=g(()=>{"use strict";a();j();lc=A("MessageDisplayCompact"),Ur=A("ShowCurrentGame"),Ci=A("PreloadedUserSettingsActionCreators")});var cc,uc,Cn,pc,Re,$r,ar,zn,qw,we,W,rn,Ae,sn,Q,Le,nt,kn,ki,Ri,Kw,We,Qg=g(()=>{"use strict";a();Zt();j();ac();cc=A("connectStores"),uc=(i=>(i[i.ChannelMessage=0]="ChannelMessage",i[i.ThreadSettings=1]="ThreadSettings",i[i.FirstThreadMessage=2]="FirstThreadMessage",i[i.ApplicationLauncherCommand=3]="ApplicationLauncherCommand",i))(uc||{}),pc=A("openPrivateChannel"),Kw=fn('"MaskedLinkStore"',{openUntrustedLink:ce.byCode(".apply(this,arguments)")}),We=Qe(()=>yt("useStateFromStores").useStateFromStores);At("DraftStore",e=>Ri=e);At("UserStore",e=>W=e);At("UserProfileStore",e=>rn=e);At("ChannelStore",e=>Q=e);At("SelectedChannelStore",e=>Ae=e);At("SelectedGuildStore",e=>sn=e);At("GuildStore",e=>we=e);At("GuildMemberStore",e=>Le=e);At("RelationshipStore",e=>nt=e);At("PermissionStore",e=>Re=e);At("PresenceStore",e=>zn=e);At("ReadStateStore",e=>ar=e);At("GuildChannelStore",e=>$r=e);At("MessageStore",e=>Cn=e);At("WindowStore",e=>ki=e);At("EmojiStore",e=>kn=e)});var Vg={};var eh=g(()=>{"use strict";a()});var th={};var nh=g(()=>{"use strict";a()});var oh={};var rh=g(()=>{"use strict";a()});function yn(e,t=ih.MESSAGE){ee.show({id:ee.genId(),message:e,type:t})}var B,Gr,wt,hn,lr,cr,Ct,jn,$e,an,ih,Yw,ee,Et,Li,ur,Qt,pr,no,Te,sh=g(()=>{"use strict";a();Zt();j();ut(["ComponentDispatch","ComponentDispatcher"],e=>Gr=e.ComponentDispatch);wt=A("getAPIBaseURL","get"),hn=A("parseTwoDigitYear"),lr=A("highlight"),cr=A("debounce","cloneDeep"),Ct=Lt(e=>e.Messages?.["en-US"]);ut(["fromTimestamp","extractTimestamp"],e=>jn=e);ih={MESSAGE:0,SUCCESS:1,FAILURE:2,CUSTOM:3},Yw={TOP:0,BOTTOM:1},ee={Type:ih,Position:Yw,genId:()=>(Math.random()||Math.random()).toString(36).slice(2)};Et=A("getUser","fetchCurrentUser"),Li=A("showUploadFileSizeExceededError","promptToUpload"),ur=A("fetchAssetIds","getAssetImage"),Qt=fn('document.queryCommandEnabled("copy")||document.queryCommandSupported("copy")',{copy:ce.byCode(".copy("),SUPPORTS_COPY:e=>typeof e=="boolean"}),pr=fn("transitionToGuild - ",{transitionTo:ce.byCode("transitionTo -"),transitionToGuild:ce.byCode("transitionToGuild -"),goBack:ce.byCode("goBack()"),goForward:ce.byCode("goForward()")});ut(["dispatch","subscribe"],e=>{B=e;let t=()=>{e.unsubscribe("CONNECTION_OPEN",t),Ks()};e.subscribe("CONNECTION_OPEN",t)});ut("showToast",e=>{ee.show=e.showToast,ee.pop=e.popToast});ut(["show","close"],e=>an=e);ut("parseTopic",e=>$e=e);ut(["open","saveAccountChanges"],e=>no=e);Te=Qe(()=>st(e=>typeof e.Permissions?.ADMINISTRATOR=="bigint").Permissions)});var dc={};Ue(dc,{Alerts:()=>an,ApplicationAssetUtils:()=>ur,Avatar:()=>_r,Button:()=>E,ButtonLooks:()=>Xt,ButtonWrapperClasses:()=>vt,Card:()=>xt,ChannelStore:()=>Q,Clickable:()=>Or,Clipboard:()=>Qt,ComponentDispatch:()=>Gr,ComponentTypes:()=>Vg,ContextMenu:()=>gn,Dialog:()=>qg,DraftStore:()=>Ri,DraftType:()=>uc,EmojiStore:()=>kn,Flex:()=>Ww,Flux:()=>cc,FluxDispatcher:()=>B,Forms:()=>S,GuildChannelStore:()=>$r,GuildMemberStore:()=>Le,GuildStore:()=>we,MaskedLink:()=>Br,MaskedLinkStore:()=>Kw,Menu:()=>U,MenuTypes:()=>th,MessageStore:()=>Cn,ModalImageClasses:()=>Js,NavigationRouter:()=>pr,Paginator:()=>Kg,Parser:()=>$e,PermissionStore:()=>Re,PermissionsBits:()=>Te,PoggerModeSettingsStore:()=>qw,Popout:()=>Ai,PresenceStore:()=>zn,PrivateChannelsStore:()=>pc,React:()=>O,ReactDOM:()=>sr,ReadStateStore:()=>ar,RelationshipStore:()=>nt,RestAPI:()=>wt,ScrollerThin:()=>Dr,SearchableSelect:()=>ea,Select:()=>An,SelectedChannelStore:()=>Ae,SelectedGuildStore:()=>sn,SettingsRouter:()=>no,Slider:()=>ir,SnowflakeUtils:()=>jn,StatusSettingsStores:()=>Ur,Switch:()=>pt,TabBar:()=>Nn,Text:()=>oe,TextAndImagesSettingsStores:()=>lc,TextArea:()=>Vs,TextInput:()=>et,Timestamp:()=>Hn,Toasts:()=>ee,Tooltip:()=>V,UploadHandler:()=>Li,UserProfileStore:()=>rn,UserSettingsActionCreators:()=>Ci,UserStore:()=>W,UserUtils:()=>Et,UtilTypes:()=>oh,WindowStore:()=>ki,hljs:()=>lr,i18n:()=>Ct,lodash:()=>cr,moment:()=>hn,showToast:()=>yn,useCallback:()=>ta,useEffect:()=>_e,useMemo:()=>Nt,useReducer:()=>Fr,useRef:()=>Jt,useState:()=>J,useStateFromStores:()=>We,useToken:()=>Ni});var I=g(()=>{"use strict";a();Wg();Yg();Zg();Xg();Jg();Qg();eh();nh();rh();sh()});var ln,Hr=g(()=>{a();ln="96126fa"});var na,ah=g(()=>{a();na="Vendicated/Vencord"});var Wn,Zw,mc,oa,p,zr,P=g(()=>{"use strict";a();Hr();ah();Wn="webpackChunkdiscord_app",Zw="Vencord.Webpack.Common.React",mc=`Vencord/${ln}${na?` (https://github.com/${na})`:""}`,oa="1026515880080842772",p=Object.freeze({Ven:{name:"Vendicated",id:343383572805058560n},Arjix:{name:"ArjixWasTaken",id:674710789138939916n},Cyn:{name:"Cynosphere",id:150745989836308480n},Megu:{name:"Megumin",id:545581357812678656n},botato:{name:"botato",id:440990343899643943n},obscurity:{name:"obscurity",id:336678828233588736n},rushii:{name:"rushii",id:295190422244950017n},Glitch:{name:"Glitchy",id:269567451199569920n},Samu:{name:"Samu",id:702973430449832038n},Animal:{name:"Animal",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:299693897859465228n},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:"ActuallyTheSun",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},AutumnVN:{name:"AutumnVN",id:393694671383166998n},pylix:{name:"pylix",id:492949202121261067n},Tyler:{name:"\\\\GGTyler\\\\",id:143117463788191746n},RyanCaoDev:{name:"RyanCaoDev",id:952235800110694471n},Strencher:{name:"Strencher",id:415849376598982656n},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:"Luna <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},Lumap:{name:"lumap",id:635383782576357407n},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},ant0n:{name:"ant0n",id:145224646868860928n}}),zr=(()=>Object.freeze(Object.fromEntries(Object.entries(p).filter(e=>e[1].id!==0n).map(([e,t])=>[t.id,t]))))()});function dr(e,t){for(let n in t){let r=t[n];typeof r=="object"&&!Array.isArray(r)?(e[n]??={},dr(e[n],r)):e[n]??=r}return e}function re(...e){return e.filter(Boolean).join(" ")}function No(e){return new Promise(t=>setTimeout(t,e))}function vn(e,t="Copied to clipboard!"){Qt.SUPPORTS_COPY?Qt.copy(e):t="Your browser does not support copying to clipboard",ee.show({message:t,id:ee.genId(),type:ee.Type.SUCCESS})}function Xw(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Ei(e){for(let t in e)if(Object.hasOwn(e,t))return!1;return!0}function fc(e){try{return new URL(e)}catch{return null}}function ra(e){return e}var gc,Jw,Di,Be=g(()=>{"use strict";a();I();P();gc=e=>{let t=e.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(t.bottom<0||t.top-n>=0)};Jw=navigator.userAgent.includes("Mobi"),Di=e=>Object.hasOwn(zr,e)});function ot(e,t){let n=Object.assign({fallbackValue:null,deps:[],onError:null},t),[r,i]=J({value:n.fallbackValue,error:null,pending:!0});return _e(()=>{let s=!0;return r.pending||i({...r,pending:!0}),e().then(l=>{!s||(i({value:l,error:null,pending:!1}),n.onSuccess?.(l))}).catch(l=>{!s||(i({value:null,error:l,pending:!1}),n.onError?.(l))}),()=>void(s=!1)},n.deps),[r.value,r.error,r.pending]}function qn(e){let t=Fr(n=>n+1,0);return e?t:t[1]}function me(e,t=5){let n=Ao(e,t);return r=>{let i=n()??lh;return o(i,{...r})}}function Oi({interval:e=1e3,deps:t=[]}){let[n,r]=J(0),i=Nt(()=>Date.now(),t);return _e(()=>{let s=setInterval(()=>r(Date.now()-i),e);return()=>{r(0),clearInterval(s)}},t),n}var lh,hc,Oe=g(()=>{"use strict";a();I();Zt();Be();lh=()=>null,hc=(e=!1)=>{let t=O.useRef(null),[n,r]=J(!1);return[s=>{t.current?.disconnect(),t.current=null,s&&(gc(s)&&(r(!0),e)||(t.current=new IntersectionObserver(l=>{for(let c of l)c.target===s&&(c.isIntersecting&&e?(r(!0),t.current?.disconnect(),t.current=null):r(c.isIntersecting))}),t.current.observe(s)))},n]}});var ch=g(()=>{});function Sn(e){return o("div",{...e,className:re(e.className,"vc-error-card")},e.children)}var jr=g(()=>{"use strict";a();ch();Be()});var Qw,uh,ph,yc,_,le=g(()=>{"use strict";a();Je();ct();Oe();I();jr();Qw="#e78284",uh=new ie("React ErrorBoundary",Qw),ph={},yc=me(()=>class extends O.PureComponent{state={error:ph,stack:"",message:""};static getDerivedStateFromError(t){let n=t?.stack??"",r=t?.message||String(t);if(t instanceof Error&&n){let i=n.indexOf(` `);i!==-1&&(r=n.slice(0,i),n=n.slice(i+1).replace(/https:\/\/\S+\/assets\//g,""))}return{error:t,stack:n,message:r}}componentDidCatch(t,n){this.props.onError?.({error:t,errorInfo:n,props:this.props.wrappedProps}),uh.error(`A component threw an Error `,t),uh.error("Component Stack",n.componentStack)}render(){if(this.state.error===ph)return this.props.children;if(this.props.noop)return null;if(this.props.fallback)return o(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 o(Sn,{style:{overflow:"hidden"}},o("h1",null,"Oh no!"),o("p",null,t),o("code",null,this.state.message,!!this.state.stack&&o("pre",{className:Y.top8},this.state.stack)))}});yc.wrap=(e,t)=>n=>o(yc,{...t,wrappedProps:n},o(e,{...n}));_=yc});function ia(){return o("svg",{"aria-hidden":"true",height:"16",viewBox:"0 0 16 16",width:"16",style:{marginRight:"0.5em",transform:"translateY(2px)"}},o("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 vc=g(()=>{"use strict";a()});function _i(e){return o(E,{...e,look:E.Looks.LINK,color:E.Colors.TRANSPARENT,onClick:()=>VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")},o(ia,null),"Donate")}var Sc=g(()=>{"use strict";a();I();vc()});function ye(e){return e.style??={},e.style.display="flex",e.style.gap??="1em",e.style.flexDirection||=e.flexDirection,delete e.flexDirection,o("div",{...e},e.children)}var Dt=g(()=>{"use strict";a()});function Bi(e,t){return sa.openModalLazy(e,t)}function Ke(e,t,n){return sa.openModal(e,t,n)}function oo(e,t){return sa.closeModal(e,t)}function Tc(){return sa.closeAllModals()}var Co,Rn,bc,qe,at,tt,Ft,cn,sa,dt=g(()=>{"use strict";a();j();Oe();Co=(i=>(i.SMALL="small",i.MEDIUM="medium",i.LARGE="large",i.DYNAMIC="dynamic",i))(Co||{}),Rn=fn(".closeWithCircleBackground",{ModalRoot:ce.byCode(".root"),ModalHeader:ce.byCode(".header"),ModalContent:ce.byCode(".content"),ModalFooter:ce.byCode(".footerSeparator"),ModalCloseButton:ce.byCode(".closeWithCircleBackground")}),bc=me(()=>yt("ImageModal").ImageModal),qe=me(()=>Rn.ModalRoot),at=me(()=>Rn.ModalHeader),tt=me(()=>Rn.ModalContent),Ft=me(()=>Rn.ModalFooter),cn=me(()=>Rn.ModalCloseButton),sa=A("openModalLazy")});function y(e){return e}var M=g(()=>{"use strict";a()});async function dh(e=!1){xc={};let t={};e&&(t.cache="no-cache");let r=(await fetch("https://gist.githubusercontent.com/Vendicated/51a3dd775f6920429ec6e9b735ca7f01/raw/badges.csv",t).then(i=>i.text())).trim().split(` `);if(r.shift()!=="id,tooltip,image"){new ie("BadgeAPI").error("Invalid badges.csv file!");return}for(let i of r){let[s,l,c]=i.split(",");(xc[s]??=[]).push({image:c,description:l})}}var Vw,e2,xc,wc,mh=g(()=>{"use strict";a();la();Sc();le();Dt();vc();P();Je();ct();Be();dt();M();I();Vw="https://cdn.discordapp.com/attachments/1033680203433660458/1092089947126780035/favicon.png",e2={description:"Vencord Contributor",image:Vw,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},shouldShow:({user:e})=>Di(e.id),link:"https://github.com/Vendicated/Vencord"},xc={};wc=y({name:"BadgeAPI",description:"API to add badges to users.",authors:[p.Megu,p.Ven,p.TheSun],required:!0,patches:[{find:"Messages.PROFILE_USER_BADGES,role:",replacement:[{match:/&&(\i)\.push\(\{id:"premium".+?\}\);/,replace:"$&$1.unshift(...Vencord.Api.Badges._getBadges(arguments[0]));"},{match:/alt:" ","aria-hidden":!0,src:(?=(\i)\.src)/,replace:"...$1.props,$& $1.image??"},{match:/(?<=text:(\i)\.description,spacing:12,)children:/,replace:"children:$1.component ? () => $self.renderBadgeComponent($1) :"},{match:/href:(\i)\.link/,replace:"...($1.onClick && { onClick: $1.onClick }),$&"}]}],toolboxActions:{async"Refetch Badges"(){await dh(!0),ee.show({id:ee.genId(),message:"Successfully refetched badges!",type:ee.Type.SUCCESS})}},async start(){Vencord.Api.Badges.addBadge(e2),await dh()},renderBadgeComponent:_.wrap(e=>{let t=e.component;return o(t,{...e})},{noop:!0}),getDonorBadges(e){return xc[e]?.map(t=>({...t,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},onClick(){let n=Ke(r=>o(_,{noop:!0,onError:()=>{oo(n),VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")}},o(Rn.ModalRoot,{...r},o(Rn.ModalHeader,null,o(ye,{style:{width:"100%",justifyContent:"center"}},o(S.FormTitle,{tag:"h2",style:{width:"100%",textAlign:"center",margin:0}},o(ia,null),"Vencord Donor"))),o(Rn.ModalContent,null,o(ye,null,o("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533070955872337.png",alt:"",style:{margin:"auto"}}),o("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533090627174460.png",alt:"",style:{margin:"auto"}})),o("div",{style:{padding:"1em"}},o(S.FormText,null,"This Badge is a special perk for Vencord Donors"),o(S.FormText,{className:Y.top20},"Please consider supporting the development of Vencord by becoming a donor. It would mean a lot!!"))),o(Rn.ModalFooter,null,o(ye,{style:{width:"100%",justifyContent:"center"}},o(_i,null))))))}}))}})});var Mc,fh=g(()=>{"use strict";a();P();M();Mc=y({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,n,r)=>`,Vencord.Api.Commands._handleCommand(${t}, ${n}, ${r})`}},{find:".source,children",replacement:{match:/(?<=:(.{1,3})\.displayDescription\}.{0,200}\.source,children:)[^}]+/,replace:"$1.plugin||($&)"}}]})});var Pc,gh=g(()=>{"use strict";a();P();M();Pc=y({name:"ContextMenuAPI",description:"API for adding/removing items to/from context menus.",authors:[p.Nuckyz,p.Ven],required:!0,patches:[{find:"\u266B (\u3064\uFF61\u25D5\u203F\u203F\u25D5\uFF61)\u3064 \u266A",replacement:{match:/let{navId:/,replace:"Vencord.Api.ContextMenu._patchContextMenu(arguments[0]);$&"}},{find:".Menu,{",all:!0,replacement:{match:/Menu,{(?<=\.jsxs?\)\(\i\.Menu,{)/g,replace:"$&contextMenuApiArguments:typeof arguments!=='undefined'?arguments:[],"}}]})});var Ic,hh=g(()=>{"use strict";a();P();M();Ic=y({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:/decorators:.{0,100}?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 Ac,yh=g(()=>{"use strict";a();P();M();Ac=y({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 Nc,vh=g(()=>{"use strict";a();P();M();Nc=y({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 Cc,Sh=g(()=>{"use strict";a();P();M();Cc=y({name:"MessageEventsAPI",description:"Api required by anything using message events.",authors:[p.Arjix,p.hunt,p.Ven],patches:[{find:'"MessageActionCreators"',replacement:{match:/async editMessage\(.+?\)\{/,replace:"$&await Vencord.Api.MessageEvents._handlePreEdit(...arguments);"}},{find:".handleSendMessage=",replacement:{match:/(type:this\.props\.chatInputType.+?\.then\()(\i=>\{.+?let (\i)=\i\.\i\.parse\((\i),.+?let (\i)=\i\.\i\.getSendMessageOptionsForReply\(\i\);)(?<=\)\(({.+?})\)\.then.+?)/,replace:(e,t,n,r,i,s,l)=>`${t}async ${n}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,n,r)=>`const vcMsg=${t},vcChan=${n};${e}Vencord.Api.MessageEvents._handleClick(vcMsg, vcChan, ${r});`}}]})});var kc,bh=g(()=>{"use strict";a();P();M();kc=y({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 n=e.match(/message:(.{1,3}),/)?.[1];if(!n)throw new Error("Could not find message variable");return`...Vencord.Api.MessagePopover._buildPopoverElements(${n},${t}),${e}`}}}]})});var Rc,Th=g(()=>{"use strict";a();P();M();Rc=y({name:"NoticesAPI",description:"Fixes notices being automatically dismissed",authors:[p.Ven],required:!0,patches:[{find:'displayName="NoticeStore"',replacement:[{match:/\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 Lc,xh=g(()=>{"use strict";a();P();M();Lc=y({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 Ec,wh=g(()=>{"use strict";a();P();M();Ec=y({name:"NoTrack",description:"Disable Discord's tracking ('science'), metrics and Sentry crash reporting",authors:[p.Cyn,p.Ven,p.Nuckyz,p.Arrow],required:!0,patches:[{find:"AnalyticsActionHandlers.handle",replacement:{match:/^.+$/,replace:"()=>{}"}},{find:"window.DiscordSentry=",replacement:{match:/^.+$/,replace:"()=>{}"}},{find:".METRICS,",replacement:[{match:/this\._intervalId=/,replace:"this._intervalId=undefined&&"},{match:/(increment\(\i\){)/,replace:"$1return;"}]},{find:".installedLogHooks)",replacement:{match:"getDebugLogging(){",replace:"getDebugLogging(){return false;"}}]})});var Oc={};Ue(Oc,{_patchContextMenu:()=>o2,addContextMenuPatch:()=>ue,addGlobalContextMenuPatch:()=>t2,findGroupChildrenByChildId:()=>mt,globalPatches:()=>ca,navPatches:()=>Fi,removeContextMenuPatch:()=>fe,removeGlobalContextMenuPatch:()=>n2});function ue(e,t){Array.isArray(e)||(e=[e]);for(let n of e){let r=Fi.get(n);r||(r=new Set,Fi.set(n,r)),r.add(t)}}function t2(e){ca.add(e)}function fe(e,t){let r=(Array.isArray(e)?e:[e]).map(i=>Fi.get(i)?.delete(t)??!1);return Array.isArray(e)?r:r[0]}function n2(e){return ca.delete(e)}function mt(e,t,n){for(let r of t){if(r==null)continue;if(Array.isArray(e)&&e.some(s=>r.props?.id===s)||r.props?.id===e)return n??null;let i=r.props?.children;if(i){Array.isArray(i)||(i=[i],r.props.children=i);let s=mt(e,i,i);if(s!==null)return s}}return null}function o2(e){e.contextMenuApiArguments??=[];let t=Fi.get(e.navId);if(Array.isArray(e.children)||(e.children=[e.children]),t)for(let n of t)try{let r=n(e.children,...e.contextMenuApiArguments);Dc.has(e)||r?.()}catch(r){Mh.error(`Patch for ${e.navId} errored,`,r)}for(let n of ca)try{let r=n(e.navId,e.children,...e.contextMenuApiArguments);Dc.has(e)||r?.()}catch(r){Mh.error("Global patch errored,",r)}Dc.add(e)}var Mh,Fi,ca,Dc,Mt=g(()=>{"use strict";a();Je();Mh=new ie("ContextMenu"),Fi=new Map,ca=new Set;Dc=new WeakSet});function bn(e,t=300){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}var Wr=g(()=>{"use strict";a()});var mr,ua=g(()=>{"use strict";a();({localStorage:mr}=window)});var Ln,qr=g(()=>{"use strict";a();Ln=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 Ph=g(()=>{});var pa,_c=g(()=>{"use strict";a();Ph();$();le();Be();I();pa=_.wrap(function({title:t,body:n,richBody:r,color:i,icon:s,onClick:l,onClose:c,image:u,permanent:d,className:m,dismissOnClick:h}){let{timeout:v,position:T}=lt(["notifications.timeout","notifications.position"]).notifications,w=We([ki],()=>ki.isFocused()),[b,x]=J(!1),[N,k]=J(0),F=Nt(()=>Date.now(),[v,b,w]);_e(()=>{if(b||!w||v===0||d)return void k(0);let K=setInterval(()=>{let q=Date.now()-F;q>=v?c():k(q)},10);return()=>clearInterval(K)},[v,b,w]);let G=N/v;return o("button",{className:re("vc-notification-root",m),style:T==="bottom-right"?{bottom:"1rem"}:{top:"3rem"},onClick:()=>{l?.(),h!==!1&&c()},onContextMenu:K=>{K.preventDefault(),K.stopPropagation(),c()},onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1)},o("div",{className:"vc-notification"},s&&o("img",{className:"vc-notification-icon",src:s,alt:""}),o("div",{className:"vc-notification-content"},o("div",{className:"vc-notification-header"},o("h2",{className:"vc-notification-title"},t),o("button",{className:"vc-notification-close-btn",onClick:K=>{K.preventDefault(),K.stopPropagation(),c()}},o("svg",{width:"24",height:"24",viewBox:"0 0 24 24",role:"img","aria-labelledby":"vc-notification-dismiss-title"},o("title",{id:"vc-notification-dismiss-title"},"Dismiss Notification"),o("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"})))),o("div",null,r??o("p",{className:"vc-notification-p"},n)))),u&&o("img",{className:"vc-notification-img",src:u,alt:""}),v!==0&&!d&&o("div",{className:"vc-notification-progressbar",style:{width:`${(1-G)*100}%`,backgroundColor:i||"var(--brand-experiment)"}}))},{onError:({props:e})=>e.onClose()})});var ro={};Ue(ro,{clear:()=>a2,createStore:()=>Ih,del:()=>Fc,delMany:()=>s2,entries:()=>u2,get:()=>Pt,getMany:()=>i2,keys:()=>l2,promisifyRequest:()=>Ut,set:()=>Vt,setMany:()=>r2,update:()=>fr,values:()=>c2});function Ut(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Ih(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=Ut(n);return(i,s)=>r.then(l=>s(l.transaction(t,i).objectStore(t)))}function En(){return Bc||(Bc=Ih("VencordData","VencordStore")),Bc}function Pt(e,t=En()){return t("readonly",n=>Ut(n.get(e)))}function Vt(e,t,n=En()){return n("readwrite",r=>(r.put(t,e),Ut(r.transaction)))}function r2(e,t=En()){return t("readwrite",n=>(e.forEach(r=>n.put(r[1],r[0])),Ut(n.transaction)))}function i2(e,t=En()){return t("readonly",n=>Promise.all(e.map(r=>Ut(n.get(r)))))}function fr(e,t,n=En()){return n("readwrite",r=>new Promise((i,s)=>{r.get(e).onsuccess=function(){try{r.put(t(this.result),e),i(Ut(r.transaction))}catch(l){s(l)}}}))}function Fc(e,t=En()){return t("readwrite",n=>(n.delete(e),Ut(n.transaction)))}function s2(e,t=En()){return t("readwrite",n=>(e.forEach(r=>n.delete(r)),Ut(n.transaction)))}function a2(e=En()){return e("readwrite",t=>(t.clear(),Ut(t.transaction)))}function Uc(e,t){return e.openCursor().onsuccess=function(){!this.result||(t(this.result),this.result.continue())},Ut(e.transaction)}function l2(e=En()){return e("readonly",t=>{if(t.getAllKeys)return Ut(t.getAllKeys());let n=[];return Uc(t,r=>n.push(r.key)).then(()=>n)})}function c2(e=En()){return e("readonly",t=>{if(t.getAll)return Ut(t.getAll());let n=[];return Uc(t,r=>n.push(r.value)).then(()=>n)})}function u2(e=En()){return e("readonly",t=>{if(t.getAll&&t.getAllKeys)return Promise.all([Ut(t.getAllKeys()),Ut(t.getAll())]).then(([r,i])=>r.map((s,l)=>[s,i[l]]));let n=[];return e("readonly",r=>Uc(r,i=>n.push([i.key,i.value])).then(()=>n))})}var Bc,Kn=g(()=>{"use strict";a();});var Hc={};Ue(Hc,{classNameFactory:()=>Ge,classNameToSelector:()=>Nh,compileStyle:()=>Gc,disableStyle:()=>$t,enableStyle:()=>St,isStyleEnabled:()=>$c,requireStyle:()=>Ui,setStyleClassNames:()=>d2,styleMap:()=>Ah,toggleStyle:()=>p2});function Ui(e){let t=Ah.get(e);if(!t)throw new Error(`Style "${e}" does not exist`);return t}function St(e){let t=Ui(e);return t.dom?.isConnected?!1:(t.dom||(t.dom=document.createElement("style"),t.dom.dataset.vencordName=t.name),Gc(t),document.head.appendChild(t.dom),!0)}function $t(e){let t=Ui(e);return t.dom?.isConnected?(t.dom.remove(),t.dom=null,!0):!1}var Ah,p2,$c,d2,Gc,Nh,Ge,Ve=g(()=>{"use strict";a();Ah=window.VencordStyles??=new Map;p2=e=>$c(e)?$t(e):St(e),$c=e=>Ui(e).dom?.isConnected??!1,d2=(e,t,n=!0)=>{let r=Ui(e);r.classNames=t,n&&$c(r.name)&&Gc(r)},Gc=e=>{if(!e.dom)throw new Error("Style has no DOM element");e.dom.textContent=e.source.replace(/\[--(\w+)\]/g,(t,n)=>{let r=e.classNames[n];return r?Nh(r):t})},Nh=(e,t="")=>e.split(" ").map(n=>`.${t}${n}`).join(""),Ge=(e="")=>(...t)=>{let n=new Set;for(let r of t)r&&typeof r=="string"?n.add(r):Array.isArray(r)?r.forEach(i=>n.add(i)):r&&typeof r=="object"&&Object.entries(r).forEach(([i,s])=>s&&n.add(i));return Array.from(n,r=>e+r).join(" ")}});var Ch,kh=g(()=>{a();Ch=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"")});async function Lh(e){if(e.noPersist)return;let t=L.notifications.logLimit;t!==0&&(await fr(da,n=>{let r=n??[],{onClick:i,onClose:s,richBody:l,permanent:c,noPersist:u,dismissOnClick:d,...m}=e;return r.unshift({...m,timestamp:Date.now(),id:Ch()}),r.length>t&&t!==200&&(r.length=t),r}),$i.forEach(n=>n()))}async function m2(e){let t=await Rh(),n=t.findIndex(r=>r.timestamp===e);n!==-1&&(t.splice(n,1),await Vt(da,t),$i.forEach(r=>r()))}function f2(){let[e,t]=Fr(s=>s+1,0);_e(()=>($i.add(t),()=>void $i.delete(t)),[]);let[n,r,i]=ot(Rh,{fallbackValue:[],deps:[e]});return[n,i]}function g2({data:e}){let[t,n]=J(!1),r=O.useRef(null);return _e(()=>{let i=r.current,s=()=>{if(i.clientHeight===0)return requestAnimationFrame(s);i.style.height=`${i.clientHeight}px`};s()},[]),o("div",{className:Kr("wrapper",{removing:t}),ref:r},o(pa,{...e,permanent:!0,dismissOnClick:!1,onClose:()=>{t||(n(!0),setTimeout(()=>m2(e.timestamp),200))},richBody:o("div",{className:Kr("body")},e.body,o(Hn,{timestamp:hn(e.timestamp),className:Kr("timestamp")}))}))}function h2({log:e,pending:t}){return!e.length&&!t?o("div",{className:Kr("container")},o("div",{className:Kr("empty")}),o(S.FormText,{style:{textAlign:"center"}},"No notifications yet")):o("div",{className:Kr("container")},e.map(n=>o(g2,{data:n,key:n.id})))}function y2({modalProps:e,close:t}){let[n,r]=f2();return o(qe,{...e,size:"large"},o(at,null,o(oe,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Notification Log"),o(cn,{onClick:t})),o(tt,null,o(h2,{log:n,pending:r})),o(Ft,null,o(E,{disabled:n.length===0,onClick:()=>{an.show({title:"Are you sure?",body:`This will permanently remove ${n.length} notification${n.length===1?"":"s"}. This action cannot be undone.`,async onConfirm(){await Vt(da,[]),$i.forEach(i=>i())},confirmText:"Do it!",confirmColor:"vc-notification-log-danger-btn",cancelText:"Nevermind"})}},"Clear Notification Log")))}function ma(){let e=Ke(t=>o(y2,{modalProps:t,close:()=>oo(e)}))}var da,Rh,Kr,$i,fa=g(()=>{"use strict";a();Kn();$();Ve();dt();Oe();I();kh();_c();da="notification-log",Rh=async()=>await Pt(da)??[],Kr=Ge("vc-notification-log-"),$i=new Set});function b2(){if(!zc){let e=document.createElement("div");e.id="vc-notification-container",document.body.append(e),zc=sr.createRoot(e)}return zc}function T2(e,t){let n=b2();return new Promise(r=>{n.render(o(pa,{key:t,...e,onClose:()=>{e.onClose?.(),n.render(null),r()}}))})}function x2(){if(typeof Notification>"u")return!1;let{useNative:e}=L.notifications;return e==="always"?!0:e==="not-focused"?!document.hasFocus():!1}async function Eh(){return Notification.permission==="granted"||Notification.permission!=="denied"&&await Notification.requestPermission()==="granted"}async function Ne(e){if(Lh(e),x2()&&await Eh()){let{title:t,body:n,icon:r,image:i,onClick:s=null,onClose:l=null}=e,c=new Notification(t,{body:n,icon:r,image:i});c.onclick=s,c.onclose=l}else v2.push(()=>T2(e,S2++))}var v2,zc,S2,Dh=g(()=>{"use strict";a();$();qr();I();_c();fa();v2=new Ln,S2=42});var jc={};Ue(jc,{requestPermission:()=>Eh,showNotification:()=>Ne});var ko=g(()=>{"use strict";a();Dh()});function zh(e,t){return L2(e,t||{},0,0)}function jh(e,t){return C2(e,t)}var Gt,en,ga,ha,ya,Yc,Fh,Uh,$h,Zc,Gh,w2,Oh,Xc,io,Ee,Yn,Lo,Ee,Ee,Ee,Ee,zi,Ee,M2,P2,I2,A2,Wc,Dn,qc,Vc,Hh,N2,Ro,C2,so,Gi,Kc,Jc,_h,Hi,Qc,Bh,k2,eu,R2,L2,E2,D2,Wh=g(()=>{a();Gt=Uint8Array,en=Uint16Array,ga=Uint32Array,ha=new Gt([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]),ya=new Gt([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]),Yc=new Gt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Fh=function(e,t){for(var n=new en(31),r=0;r<31;++r)n[r]=t+=1<>>1|(Ee&21845)<<1,io=(io&52428)>>>2|(io&13107)<<2,io=(io&61680)>>>4|(io&3855)<<4,Xc[Ee]=((io&65280)>>>8|(io&255)<<8)>>>1;Yn=function(e,t,n){for(var r=e.length,i=0,s=new en(t);i>>u]=d}else for(c=new en(r),i=0;i>>15-e[i]);return c},Lo=new Gt(288);for(Ee=0;Ee<144;++Ee)Lo[Ee]=8;for(Ee=144;Ee<256;++Ee)Lo[Ee]=9;for(Ee=256;Ee<280;++Ee)Lo[Ee]=7;for(Ee=280;Ee<288;++Ee)Lo[Ee]=8;zi=new Gt(32);for(Ee=0;Ee<32;++Ee)zi[Ee]=5;M2=Yn(Lo,9,0),P2=Yn(Lo,9,1),I2=Yn(zi,5,0),A2=Yn(zi,5,1),Wc=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},Dn=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&n},qc=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},Vc=function(e){return(e+7)/8|0},Hh=function(e,t,n){(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length);var r=new(e.BYTES_PER_ELEMENT==2?en:e.BYTES_PER_ELEMENT==4?ga:Gt)(n-t);return r.set(e.subarray(t,n)),r},N2=["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"],Ro=function(e,t,n){var r=new Error(t||N2[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,Ro),!n)throw r;return r},C2=function(e,t,n){var r=e.length;if(!r||n&&n.f&&!n.l)return t||new Gt(0);var i=!t||n,s=!n||n.i;n||(n={}),t||(t=new Gt(r*3));var l=function(er){var Mo=t.length;if(er>Mo){var Po=new Gt(Math.max(Mo*2,er));Po.set(t),t=Po}},c=n.f||0,u=n.p||0,d=n.b||0,m=n.l,h=n.d,v=n.m,T=n.n,w=r*8;do{if(!m){c=Dn(e,u,1);var b=Dn(e,u+1,3);if(u+=3,b)if(b==1)m=P2,h=A2,v=9,T=5;else if(b==2){var F=Dn(e,u,31)+257,G=Dn(e,u+10,15)+4,K=F+Dn(e,u+5,31)+1;u+=14;for(var q=new Gt(K),z=new Gt(19),R=0;R>>4;if(x<16)q[R++]=x;else{var Ce=0,ge=0;for(x==16?(ge=3+Dn(e,u,3),u+=2,Ce=q[R-1]):x==17?(ge=3+Dn(e,u,7),u+=3):x==18&&(ge=11+Dn(e,u,127),u+=7);ge--;)q[R++]=Ce}}var Se=q.subarray(0,F),Me=q.subarray(F);v=Wc(Se),T=Wc(Me),m=Yn(Se,v,1),h=Yn(Me,T,1)}else Ro(1);else{var x=Vc(u)+4,N=e[x-4]|e[x-3]<<8,k=x+N;if(k>r){s&&Ro(0);break}i&&l(d+N),t.set(e.subarray(x,k),d),n.b=d+=N,n.p=u=k*8,n.f=c;continue}if(u>w){s&&Ro(0);break}}i&&l(d+131072);for(var Pe=(1<>>4;if(u+=Ce&15,u>w){s&&Ro(0);break}if(Ce||Ro(2),gt<256)t[d++]=gt;else if(gt==256){de=u,m=null;break}else{var Xe=gt-254;if(gt>264){var R=gt-257,ke=ha[R];Xe=Dn(e,u,(1<>>4;Yt||Ro(3),u+=Yt&15;var Me=w2[bt];if(bt>3){var ke=ya[bt];Me+=qc(e,u)&(1<w){s&&Ro(0);break}i&&l(d+131072);for(var ht=d+Xe;d>>8},Gi=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},Kc=function(e,t){for(var n=[],r=0;rv&&(v=s[r].s);var T=new en(v+1),w=Jc(n[m-1],T,0);if(w>t){var r=0,b=0,x=w-t,N=1<t)b+=N-(1<>>=x;b>0;){var F=s[r].s;T[F]=0&&b;--r){var G=s[r].s;T[G]==t&&(--T[G],++b)}w=t}return[new Gt(T),w]},Jc=function(e,t,n){return e.s==-1?Math.max(Jc(e.l,t,n+1),Jc(e.r,t,n+1)):t[e.s]=n},_h=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new en(++t),r=0,i=e[0],s=1,l=function(u){n[r++]=u},c=1;c<=t;++c)if(e[c]==i&&c!=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[c]}return[n.subarray(0,r),t]},Hi=function(e,t){for(var n=0,r=0;r>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var s=0;s4&&!ne[Yc[ae-1]];--ae);var Ce=d+5<<3,ge=Hi(i,Lo)+Hi(s,zi)+l,Se=Hi(i,v)+Hi(s,b)+l+14+3*ae+Hi(z,ne)+(2*z[16]+3*z[17]+7*z[18]);if(Ce<=ge&&Ce<=Se)return Qc(t,m,e.subarray(u,u+d));var Me,Pe,be,de;if(so(t,m,1+(Se15&&(so(t,m,Yt[R]>>>5&127),m+=Yt[R]>>>12)}}else Me=M2,Pe=Lo,be=I2,de=zi;for(var R=0;R255){var bt=r[R]>>>18&31;Gi(t,m,Me[bt+257]),m+=Pe[bt+257],bt>7&&(so(t,m,r[R]>>>23&31),m+=ha[bt]);var ht=r[R]&31;Gi(t,m,be[ht]),m+=de[ht],ht>3&&(Gi(t,m,r[R]>>>5&8191),m+=ya[ht])}else Gi(t,m,Me[r[R]]),m+=Pe[r[R]];return Gi(t,m,Me[256]),m+Pe[256]},k2=new ga([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),eu=new Gt(0),R2=function(e,t,n,r,i,s){var l=e.length,c=new Gt(r+l+5*(1+Math.ceil(l/7e3))+i),u=c.subarray(r,c.length-i),d=0;if(!t||l<8)for(var m=0;m<=l;m+=65535){var h=m+65535;h>=l&&(u[d>>3]=s),d=Qc(u,d+1,e.subarray(m,h))}else{for(var v=k2[t-1],T=v>>>13,w=v&8191,b=(1<7e3||ne>24576)&&Me>423){d=Bh(e,u,0,K,q,z,X,ne,ae,m-ae,d),ne=R=X=0,ae=m;for(var Pe=0;Pe<286;++Pe)q[Pe]=0;for(var Pe=0;Pe<30;++Pe)z[Pe]=0}var be=2,de=0,gt=w,Xe=ge-Se&32767;if(Me>2&&Ce==G(m-Xe))for(var ke=Math.min(T,Me)-1,Yt=Math.min(32767,m),bt=Math.min(258,Me);Xe<=Yt&&--gt&&ge!=Se;){if(e[m+be]==e[m+be-Xe]){for(var ht=0;htbe){if(be=ht,de=Xe,ht>ke)break;for(var er=Math.min(Xe,ht-2),Mo=0,Pe=0;PeMo&&(Mo=Rt,Se=Po)}}}ge=Se,Se=x[ge],Xe+=ge-Se+32768&32767}if(de){K[ne++]=268435456|Zc[be]<<18|Oh[de];var nr=Zc[be]&31,C=Oh[de]&31;X+=ha[nr]+ya[C],++q[257+nr],++z[C],xe=m+be,++R}else K[ne++]=e[m],++q[e[m]]}}d=Bh(e,u,s,K,q,z,X,ne,ae,m-ae,d),!s&&d&7&&(d=Qc(u,d+1,eu))}return Hh(c,0,r+Vc(d)+i)},L2=function(e,t,n,r,i){return R2(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,n,r,!i)};E2=typeof TextDecoder<"u"&&new TextDecoder,D2=0;try{E2.decode(eu,{stream:!0}),D2=1}catch{}});async function qh(){let e=await Pt("Vencord_cloudSecret")??{},t=tu();return e[t]?(await fr("Vencord_cloudSecret",n=>(n??={},n[`${t}:${ji()}`]=n[t],delete n[t],n)),e[t]):e[`${t}:${ji()}`]}async function O2(e){await fr("Vencord_cloudSecret",t=>(t??={},t[`${tu()}:${ji()}`]=e,t))}async function nu(){await fr("Vencord_cloudSecret",e=>(e??={},delete e[`${tu()}:${ji()}`],e))}async function Kh(){if(await qh()!==void 0){L.cloud.authenticated=!0;return}try{let r=await fetch(new URL("/v1/oauth/settings",Eo()));var{clientId:e,redirectUri:t}=await r.json()}catch{Ne({title:"Cloud Integration",body:"Setup failed (couldn't retrieve OAuth configuration)."}),L.cloud.authenticated=!1;return}let{OAuth2AuthorizeModal:n}=yt("OAuth2AuthorizeModal");Ke(r=>o(n,{...r,scopes:["identify"],responseType:"code",redirectUri:t,permissions:0n,clientId:e,cancelCompletesFlow:!1,callback:async({location:i})=>{if(!i){L.cloud.authenticated=!1;return}try{let s=await fetch(i,{headers:new Headers({Accept:"application/json"})}),{secret:l}=await s.json();l?(va.info("Authorized with secret"),await O2(l),Ne({title:"Cloud Integration",body:"Cloud integrations enabled!"}),L.cloud.authenticated=!0):(Ne({title:"Cloud Integration",body:"Setup failed (no secret returned?)."}),L.cloud.authenticated=!1)}catch(s){va.error("Failed to authorize",s),Ne({title:"Cloud Integration",body:`Setup failed (${s.toString()}).`}),L.cloud.authenticated=!1}}}))}async function Yr(){let e=await qh();return window.btoa(`${e}:${ji()}`)}var va,Eo,tu,ji,ou=g(()=>{"use strict";a();Kn();ko();$();j();I();Je();dt();va=new ie("Cloud","#39b7e0"),Eo=()=>new URL(L.cloud.url),tu=()=>Eo().origin,ji=()=>{let e=W.getCurrentUser()?.id;if(!e)throw new Error("User not yet logged in");return e}});function un(){window.VesktopNative.app.relaunch()}function Sa(e){window.VesktopNative.fileManager.showItemInFolder(e)}var Do=g(()=>{"use strict";a()});function ba(e){let t=document.createElement("a");t.href=URL.createObjectURL(e),t.download=e.name,document.body.appendChild(t),t.click(),setImmediate(()=>{URL.revokeObjectURL(t.href),document.body.removeChild(t)})}function Ta(e){return new Promise(t=>{let n=document.createElement("input");n.type="file",n.style.display="none",n.accept=e,n.onchange=async()=>{t(n.files?.[0]??null)},document.body.appendChild(n),n.click(),setImmediate(()=>document.body.removeChild(n))})}var xa=g(()=>{"use strict";a()});async function Yh(e){try{var t=JSON.parse(e)}catch(n){throw console.log(e),new Error("Failed to parse JSON: "+String(n))}if("settings"in t&&"quickCss"in t)Object.assign(Zn,t.settings),await VencordNative.settings.set(JSON.stringify(t.settings,null,4)),await VencordNative.quickCss.set(t.quickCss);else throw new Error("Invalid Settings. Is this even a Vencord Settings file?")}async function Zh({minify:e}={}){let t=JSON.parse(VencordNative.settings.get()),n=await VencordNative.quickCss.get();return JSON.stringify({settings:t,quickCss:n},null,e?void 0:4)}async function Xh(){let e="vencord-settings-backup.json",t=await Zh(),n=new TextEncoder().encode(t);ba(new File([n],e,{type:"application/json"}))}async function Qh(e=!0){if(!1){if(t)try{}catch(n){}}else{let t=await Ta("application/json");if(!t)return;let n=new FileReader;n.onload=async()=>{try{await Yh(n.result),e&&_2()}catch(r){new ie("SettingsSync").error(r),e&&B2(r)}},n.readAsText(t)}}async function Zr(e){let t=await Zh({minify:!0});try{let n=await fetch(new URL("/v1/settings",Eo()),{method:"PUT",headers:new Headers({Authorization:await Yr(),"Content-Type":"application/octet-stream"}),body:zh(new TextEncoder().encode(t))});if(!n.ok){On.error(`Failed to sync up, API returned ${n.status}`),Ne({title:"Cloud Settings",body:`Could not synchronize settings to cloud (API returned ${n.status}).`,color:"var(--red-360)"});return}let{written:r}=await n.json();Zn.cloud.settingsSyncVersion=r,VencordNative.settings.set(JSON.stringify(Zn,null,4)),On.info("Settings uploaded to cloud successfully"),e&&Ne({title:"Cloud Settings",body:"Synchronized settings to the cloud!",noPersist:!0})}catch(n){On.error("Failed to sync up",n),Ne({title:"Cloud Settings",body:`Could not synchronize settings to the cloud (${n.toString()}).`,color:"var(--red-360)"})}}async function wa(e=!0,t=!1){try{let n=await fetch(new URL("/v1/settings",Eo()),{method:"GET",headers:new Headers({Authorization:await Yr(),Accept:"application/octet-stream","If-None-Match":L.cloud.settingsSyncVersion.toString()})});if(n.status===404)return On.info("No settings on the cloud"),e&&Ne({title:"Cloud Settings",body:"There are no settings in the cloud.",noPersist:!0}),!1;if(n.status===304)return On.info("Settings up to date"),e&&Ne({title:"Cloud Settings",body:"Your settings are up to date.",noPersist:!0}),!1;if(!n.ok)return On.error(`Failed to sync down, API returned ${n.status}`),Ne({title:"Cloud Settings",body:`Could not synchronize settings from the cloud (API returned ${n.status}).`,color:"var(--red-360)"}),!1;let r=Number(n.headers.get("etag")),i=L.cloud.settingsSyncVersion;if(!t&&r{"use strict";a();ko();$();I();Wh();ou();Je();Do();xa();Jh=(e,t)=>ee.show({type:e,message:t,id:ee.genId()}),_2=()=>Jh(ee.Type.SUCCESS,"Settings successfully imported. Restart to apply changes!"),B2=e=>Jh(ee.Type.FAILURE,`Failed to import settings: ${String(e)}`);On=new ie("Cloud:Settings","#39b7e0")});var iu={};Ue(iu,{PlainSettings:()=>Zn,Settings:()=>L,addSettingsListener:()=>qi,definePluginSettings:()=>D,migratePluginSettings:()=>U2,useSettings:()=>lt});function ru(e,t=e,n=""){return ty[n]??=new Proxy(e,{get(r,i){let s=r[i];if(!(i in r)){if(n==="plugins"&&i in He)return r[i]=ru({enabled:He[i].required??He[i].enabledByDefault??!1},t,`plugins.${i}`);if(n.startsWith("plugins.")){let l=n.slice(8);if(l in He){let c=He[l].options?.[i];if(!c)return s;if("default"in c)return r[i]=c.default;if(c.type===4){let u=c.options.find(d=>d.default);return u&&(r[i]=u.value),u?.value}}}return s}return typeof s=="object"&&!Array.isArray(s)&&s!==null?ru(s,t,`${n}${n&&"."}${i}`):s},set(r,i,s){if(r[i]===s)return!0;r[i]=s;let l=`${n}${n&&"."}${i}`;delete ty[l];for(let c of Ma)(!c._paths||c._paths.includes(l))&&c(s,l);return Zn.cloud.settingsSyncVersion=Date.now(),mr.Vencord_settingsDirty=!0,F2(),VencordNative.settings.set(JSON.stringify(t,null,4)),!0}})}function lt(e){let[,t]=O.useReducer(()=>({}),{}),n=e?(r,i)=>e.includes(i)&&t():t;return O.useEffect(()=>(Ma.add(n),()=>void Ma.delete(n)),[]),L}function qi(e,t){e&&(t._paths??=[]).push(e),Ma.add(t)}function U2(e,...t){let{plugins:n}=Oo;if(!(e in n)){for(let r of t)if(r in n){ny.info(`Migrating settings from old name ${r} to ${e}`),n[e]=n[r],delete n[r],VencordNative.settings.set(JSON.stringify(Oo,null,4));break}}}function D(e,t){let n={get store(){if(!n.pluginName)throw new Error("Cannot access settings before plugin is initialized");return L.plugins[n.pluginName]},use:r=>lt(r?.map(i=>`plugins.${n.pluginName}.${i}`)).plugins[n.pluginName],def:e,checks:t??{},pluginName:"",withPrivateSettings(){return this}};return n}var ny,ey,Oo,F2,Ma,ty,Zn,L,$=g(()=>{"use strict";a();Wr();ua();Je();Be();Wi();M();I();gr();ny=new ie("Settings"),ey={notifyAboutUpdates:!0,autoUpdate:!1,autoUpdateNotification:!0,useQuickCss:!0,themeLinks:[],enabledThemes:[],enableReactDevtools:!1,frameless:!1,transparent:!1,winCtrlQ:!1,macosTranslucency:!1,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}};try{Oo=JSON.parse(VencordNative.settings.get()),dr(Oo,ey)}catch(e){Oo=dr({},ey),ny.error(`An error occurred while loading the settings. Corrupt settings file? `,e)}F2=bn(async()=>{L.cloud.settingsSync&&L.cloud.authenticated&&(await Zr(),delete mr.Vencord_settingsDirty)},6e4),Ma=new Set,ty={};Zn=Oo,L=ru(Oo)});var oy=g(()=>{});var ry=g(()=>{});var au={};Ue(au,{UpdateLogger:()=>hr,changes:()=>_o,checkForUpdates:()=>Jr,getRepo:()=>su,isNewer:()=>Ki,isOutdated:()=>Bo,maybePromptToUpdate:()=>Yi,update:()=>Qr,updateError:()=>Xr});async function Pa(e){let t=await e;if(t.ok)return t.value;throw Xr=t.error,t.error}async function Jr(){return _o=await Pa(VencordNative.updater.getUpdates()),_o.some(e=>e.hash===ln)?(Ki=!0,Bo=!1):Bo=_o.length>0}async function Qr(){if(!Bo)return!0;let e=await Pa(VencordNative.updater.update());if(e&&(Bo=!1,!await Pa(VencordNative.updater.rebuild())))throw new Error("The Build failed. Please try manually building the new update");return e}async function Yi(e,t=!1){try{if(await Jr()){let r=confirm(e);if(r&&Ki)return alert("Your local copy has more recent commits. Please stash or reset them.");r&&(await Qr(),un())}}catch(n){hr.error(n),alert("That also failed :( Try updating or re-installing with the installer!")}}var hr,Bo,Ki,Xr,_o,su,yr=g(()=>{"use strict";a();Hr();Je();Do();hr=new ie("Updater","white"),Bo=!1,Ki=!1;su=()=>Pa(VencordNative.updater.getRepo())});function iy(){Yi("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 sy=g(()=>{"use strict";a();yr()});function lu(e){let t=!1,n;return function(){return t?n:(t=!0,n=e.apply(this,arguments))}}var cu=g(()=>{"use strict";a()});function Tn({title:e,children:t}){return o(S.FormSection,null,o(oe,{variant:"heading-lg/semibold",tag:"h2",className:Y.bottom16},e),t)}function xn(e,t){return _.wrap(e,{message:`Failed to render the ${t} tab. If this issue persists, try using the installer to reinstall!`,onError:$2})}var $2,Fo=g(()=>{"use strict";a();oy();ry();le();sy();ct();cu();I();$2=lu(iy)});var uy={};Ue(uy,{default:()=>j2});function G2(){let[e,,t]=ot(VencordNative.settings.getSettingsDir,{fallbackValue:"Loading..."}),n=lt(),r=O.useMemo(()=>Math.random()>.5?ly:cy,[]),i=navigator.platform.toLowerCase().startsWith("win"),s=navigator.platform.toLowerCase().startsWith("mac"),l=[{key:"useQuickCss",title:"Enable Custom CSS",note:"Loads your Custom CSS"},{key:"enableReactDevtools",title:"Enable React Developer Tools",note:"Requires a full restart"},{key:"frameless",title:"Disable the window frame",note:"Requires a full restart"},!1,i&&{key:"winCtrlQ",title:"Register Ctrl+Q as shortcut to close Discord (Alternative to Alt+F4)",note:"Requires a full restart"},!1,!1];return o(Tn,{title:"Vencord Settings"},o(z2,{image:r}),o(S.FormSection,{title:"Quick Actions"},o(xt,{className:ay("quick-actions-card")},o(O.Fragment,null,o(E,{onClick:un,size:E.Sizes.SMALL},"Restart Client"),o(E,{onClick:()=>VencordNative.quickCss.openEditor(),size:E.Sizes.SMALL,disabled:e==="Loading..."},"Open QuickCSS File"),o(E,{onClick:()=>Sa(e),size:E.Sizes.SMALL,disabled:t},"Open Settings Folder"),o(E,{onClick:()=>VencordNative.native.openExternal("https://github.com/Vendicated/Vencord"),size:E.Sizes.SMALL,disabled:t},"Open in GitHub")))),o(S.FormDivider,null),o(S.FormSection,{className:Y.top16,title:"Settings",tag:"h5"},o(S.FormText,{className:Y.bottom20},'Hint: You can change the position of this settings section in the settings of the "Settings" plugin!'),l.map(c=>c&&o(pt,{key:c.key,value:n[c.key],onChange:u=>n[c.key]=u,note:c.note},c.title))),typeof Notification<"u"&&o(H2,{settings:n.notifications}))}function H2({settings:e}){return o(f,null,o(S.FormTitle,{tag:"h5"},"Notification Style"),e.useNative!=="never"&&Notification?.permission==="denied"&&o(Sn,{style:{padding:"1em"},className:Y.bottom8},o(S.FormTitle,{tag:"h5"},"Desktop Notification Permission denied"),o(S.FormText,null,"You have denied Notification Permissions. Thus, Desktop notifications will not work!")),o(S.FormText,{className:Y.bottom8},"Some plugins may show you notifications. These come in two styles:",o("ul",null,o("li",null,o("strong",null,"Vencord Notifications"),": These are in-app notifications"),o("li",null,o("strong",null,"Desktop Notifications"),": Native Desktop notifications (like when you get a ping)"))),o(An,{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:ra}),o(S.FormTitle,{tag:"h5",className:Y.top16+" "+Y.bottom8},"Notification Position"),o(An,{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:ra}),o(S.FormTitle,{tag:"h5",className:Y.top16+" "+Y.bottom8},"Notification Timeout"),o(S.FormText,{className:Y.bottom16},"Set to 0s to never automatically time out"),o(ir,{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}),o(S.FormTitle,{tag:"h5",className:Y.top16+" "+Y.bottom8},"Notification Log Limit"),o(S.FormText,{className:Y.bottom16},"The amount of notifications to save in the log until old ones are removed. Set to ",o("code",null,"0")," to disable Notification log and ",o("code",null,"\u221E")," to never automatically remove old Notifications"),o(ir,{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}),o(E,{onClick:ma,disabled:e.logLimit===0},"Open Notification Log"))}function z2({image:e}){return o(xt,{className:ay("card","donate")},o("div",null,o(S.FormTitle,{tag:"h5"},"Support the Project"),o(S.FormText,null,"Please consider supporting the development of Vencord by donating!"),o(_i,{style:{transform:"translateX(-1em)"}})),o("img",{role:"presentation",src:e,alt:"",height:128,style:{imageRendering:e===cy?"pixelated":void 0,marginLeft:"auto",transform:e===ly?"rotate(10deg)":void 0}}))}var ay,ly,cy,j2,py=g(()=>{"use strict";a();fa();$();Ve();Sc();jr();ct();Be();Do();Oe();I();Fo();ay=Ge("vc-settings-"),ly="https://cdn.discordapp.com/emojis/1026533090627174460.png",cy="https://media.discordapp.net/stickers/1039992459209490513.png";j2=xn(G2,"Vencord Settings")});var dy=g(()=>{});var mu={};Ue(mu,{currentNotice:()=>Zi,nextNotice:()=>my,noticesQueue:()=>pu,popNotice:()=>du,showNotice:()=>Xi});function du(){uu.dismiss()}function my(){Zi=pu.shift(),Zi&&uu.show(...Zi,"VencordNotice")}function Xi(e,t,n){pu.push(["GENERIC",e,t,n]),Zi||my()}var uu,pu,Zi,Ia=g(()=>{"use strict";a();j();ut(e=>e.show&&e.dismiss&&!e.suppressAll,e=>uu=e);pu=[],Zi=null});var fy=g(()=>{});function pn({height:e=24,width:t=24,className:n,children:r,viewBox:i,...s}){return o("svg",{className:re(n,"vc-icon"),role:"img",width:t,height:e,viewBox:i,...s},r)}function Vr({height:e=24,width:t=24,className:n}){return o(pn,{height:e,width:t,className:re(n,"vc-link-icon"),viewBox:"0 0 24 24"},o("g",{fill:"none","fill-rule":"evenodd"},o("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"}),o("rect",{width:t,height:e})))}function gy(e){return o(pn,{...e,className:re(e.className,"vc-copy-icon"),viewBox:"0 0 24 24"},o("g",{fill:"currentColor"},o("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1z"}),o("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 Ji(e){return o(pn,{...e,className:re(e.className,"vc-open-external-icon"),viewBox:"0 0 24 24"},o("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 vr(e){return o(pn,{...e,className:re(e.className,"vc-image-icon"),viewBox:"0 0 24 24"},o("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 Aa(e){return o(pn,{...e,className:re(e.className,"vc-info-icon"),viewBox:"0 0 24 24"},o("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 hy(e){return o(pn,{"aria-label":Ct.Messages.GUILD_OWNER,...e,className:re(e.className,"vc-owner-crown-icon"),role:"img",viewBox:"0 0 16 16"},o("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 yy(e){return o(pn,{...e,className:re(e.className,"vc-screenshare-icon"),viewBox:"0 0 24 24"},o("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 Na(e){return o(pn,{...e,className:re(e.className,"vc-image-visible"),viewBox:"0 0 24 24"},o("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 Ca(e){return o(pn,{...e,className:re(e.className,"vc-image-invisible"),viewBox:"0 0 24 24"},o("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 vy(e){return o(pn,{...e,className:re(e.className,"vc-microphone"),viewBox:"0 0 24 24"},o("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"}),o("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 Sy(e){return o(pn,{...e,className:re(e.className,"vc-cog-wheel"),viewBox:"0 0 24 24"},o("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 fu(e){return o(pn,{...e,className:re(e.className,"vc-reply-icon"),viewBox:"0 0 24 24"},o("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 by(e){return o(pn,{...e,className:re(e.className,"vc-delete-icon"),viewBox:"0 0 24 24"},o("path",{fill:"currentColor",d:"M15 3.999V2H9V3.999H3V5.999H21V3.999H15Z"}),o("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"}))}var Ht=g(()=>{"use strict";a();fy();Be();I()});function Ty(e,t,n){return n===!1?t?e.slice(0,-1):e:e[0]}function Qi(e,t,n=!1){let r=hn.duration(e,t),i=Q2.map(u=>({amount:r[u](),unit:u})),s=0;e:for(let u=0;uu==="days");if(l!==-1){let u=i[l],d=u.amount%7;d===0?i.splice(l,1):u.amount=d}let c="";for(;i.length;){let{amount:u,unit:d}=i.shift();c.length&&(c+=i.length?", ":" and "),(u>0||c.length)&&(c+=`${u} ${Ty(d,u===1,n)}`)}return c.length?c:`0 ${Ty(t,!1,n)}`}function V2(e,t=n=>n){let{length:n}=e;if(n===0)return"";if(n===1)return t(e[0]);let r="";for(let i=0;i2?r+=", ":n-i>1&&(r+=" and ");return r}function Vi(e,t){let n="```";return`${n}${t||""} ${e.replaceAll("```","\\`\\`\\`")} ${n}`}var gu,W2,q2,hu,K2,Y2,Z2,X2,J2,ao,Q2,lo=g(()=>{"use strict";a();I();gu=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),W2=e=>e.toLowerCase().split("_"),q2=e=>e.toLowerCase().split("-"),hu=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),K2=e=>e.toLowerCase().split(" "),Y2=e=>e.map((t,n)=>n?t[0].toUpperCase()+t.slice(1):t).join(""),Z2=e=>e.join("_").toUpperCase(),X2=e=>e.join("-").toLowerCase(),J2=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(""),ao=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(" "),Q2=["years","months","weeks","days","hours","minutes","seconds"]});function es(){return`-${jn.fromTimestamp(Date.now())}`}function pe(e,t){let n=eM.createBotMessage({channelId:e,content:"",embeds:[]});return tM.receiveMessage(e,dr(t,n)),t}function rt(e,t,n){return e.find(r=>r.name===t)?.value||n}var eM,tM,yu=g(()=>{"use strict";a();Be();j();I();eM=A("createBotMessage"),tM=A("receiveMessage")});var co,_n,vu,ka=g(()=>{"use strict";a();co=(h=>(h[h.SUB_COMMAND=1]="SUB_COMMAND",h[h.SUB_COMMAND_GROUP=2]="SUB_COMMAND_GROUP",h[h.STRING=3]="STRING",h[h.INTEGER=4]="INTEGER",h[h.BOOLEAN=5]="BOOLEAN",h[h.USER=6]="USER",h[h.CHANNEL=7]="CHANNEL",h[h.ROLE=8]="ROLE",h[h.MENTIONABLE=9]="MENTIONABLE",h[h.NUMBER=10]="NUMBER",h[h.ATTACHMENT=11]="ATTACHMENT",h))(co||{}),_n=(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))(_n||{}),vu=(r=>(r[r.CHAT_INPUT=1]="CHAT_INPUT",r[r.USER=2]="USER",r[r.MESSAGE=3]="MESSAGE",r))(vu||{})});var Tu={};Ue(Tu,{ApplicationCommandInputType:()=>_n,ApplicationCommandOptionType:()=>co,ApplicationCommandType:()=>vu,BUILT_IN:()=>Uo,OptionalMessageOption:()=>$o,RequiredMessageOption:()=>ts,_handleCommand:()=>oM,_init:()=>nM,commands:()=>Su,findOption:()=>rt,generateId:()=>es,prepareOption:()=>bu,registerCommand:()=>ei,sendBotMessage:()=>pe,unregisterCommand:()=>ns});function bu(e){return e.displayName||=e.name,e.displayDescription||=e.description,e.options?.forEach((t,n,r)=>{t===xy?r[n]=$o:t===wy&&(r[n]=ts),t.choices?.forEach(i=>i.displayName||=i.name),bu(r[n])}),e}function rM(e,t){e.options?.forEach(n=>{if(n.type!==1)throw new Error("When specifying sub-command options, all options must be sub-commands.");let r={...e,...n,type:1,name:`${e.name} ${n.name}`,id:`${n.name}-${e.id}`,displayName:`${e.name} ${n.name}`,subCommandPath:[{name:n.name,type:n.type,displayName:n.name}],rootCommand:e};ei(r,t)})}function ei(e,t){if(!Uo){console.warn("[CommandsAPI]",`Not registering ${e.name} as the CommandsAPI hasn't been initialised.`,"Please restart to use commands");return}if(Uo.some(n=>n.name===e.name))throw new Error(`Command '${e.name}' already exists.`);if(e.isVencordCommand=!0,e.id??=`-${Uo.length+1}`,e.applicationId??="-1",e.type??=1,e.inputType??=1,e.plugin||=t,bu(e),e.options?.[0]?.type===1){rM(e,t);return}Su[e.name]=e,Uo.push(e)}function ns(e){let t=Uo.findIndex(n=>n.name===e);return t===-1?!1:(Uo.splice(t,1),delete Su[e],!0)}var Uo,Su,xy,wy,$o,ts,nM,oM,tn=g(()=>{"use strict";a();lo();yu();ka();yu();ka();Su={},xy=Symbol("OptionalMessageOption"),wy=Symbol("RequiredMessageOption"),$o=xy,ts=wy,nM=function(e){try{Uo=e,$o=e.find(t=>t.name==="shrug").options[0],ts=e.find(t=>t.name==="me").options[0]}catch{console.error("Failed to load CommandsApi")}return e},oM=function(e,t,n){if(!e.isVencordCommand)return e.execute(t,n);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),pe(n.channel.id,{content:`${s}: ${Vi(l)}`,author:{username:"Vencord"}})};try{let i=e.execute(t,n);return i instanceof Promise?i.catch(r):i}catch(i){return r(i)}}});function My({text:e,color:t}){return o("div",{className:"vc-plugins-badge",style:{backgroundColor:t,justifySelf:"flex-end",marginLeft:"auto"}},e)}var xu=g(()=>{"use strict";a()});function Py({option:e,pluginSettings:t,definedSettings:n,id:r,onChange:i,onError:s}){let l=t[r]??e.default,[c,u]=O.useState(l??!1),[d,m]=O.useState(null);O.useEffect(()=>{s(d!==null)},[d]);function h(v){let T=e.isValid?.call(n,v)??!0;typeof T=="string"?m(T):T?(m(null),u(v),i(v)):m("Invalid input provided.")}return o(S.FormSection,null,o(pt,{value:c,onChange:h,note:e.description,disabled:e.disabled?.call(n)??!1,...e.componentProps,hideBorder:!0,style:{marginBottom:"0.5em"}},ao(gu(r))),d&&o(S.FormText,{style:{color:"var(--text-danger)"}},d))}var Iy=g(()=>{"use strict";a();lo();I()});function Ay({option:e,onChange:t,onError:n}){return e.component({setValue:t,setError:n,option:e})}var Ny=g(()=>{"use strict";a()});function wu({option:e,pluginSettings:t,definedSettings:n,id:r,onChange:i,onError:s}){function l(v){return e.type===2?BigInt(v):Number(v)}let[c,u]=O.useState(`${t[r]??e.default??0}`),[d,m]=O.useState(null);O.useEffect(()=>{s(d!==null)},[d]);function h(v){let T=e.isValid?.call(n,v)??!0;m(null),typeof T=="string"?m(T):T||m("Invalid input provided."),e.type===1&&BigInt(v)>=iM?(u(`${Number.MAX_SAFE_INTEGER}`),i(l(v))):(u(v),i(l(v)))}return o(S.FormSection,null,o(S.FormTitle,null,e.description),o(et,{type:"number",pattern:"-?[0-9]+",value:c,onChange:h,placeholder:e.placeholder??"Enter a number",disabled:e.disabled?.call(n)??!1,...e.componentProps}),d&&o(S.FormText,{style:{color:"var(--text-danger)"}},d))}var iM,Cy=g(()=>{"use strict";a();M();I();iM=BigInt(Number.MAX_SAFE_INTEGER)});function ky({option:e,pluginSettings:t,definedSettings:n,onChange:r,onError:i,id:s}){let l=t[s]??e.options?.find(v=>v.default)?.value,[c,u]=O.useState(l??null),[d,m]=O.useState(null);O.useEffect(()=>{i(d!==null)},[d]);function h(v){let T=e.isValid?.call(n,v)??!0;typeof T=="string"?m(T):T?(m(null),u(v),r(v)):m("Invalid input provided.")}return o(S.FormSection,null,o(S.FormTitle,null,e.description),o(An,{isDisabled:e.disabled?.call(n)??!1,options:e.options,placeholder:e.placeholder??"Select an option",maxVisibleItems:5,closeOnSelect:!0,select:h,isSelected:v=>v===c,serialize:v=>String(v),...e.componentProps}),d&&o(S.FormText,{style:{color:"var(--text-danger)"}},d))}var Ry=g(()=>{"use strict";a();I()});function Go(e,t,n=1){let r=[];for(let i=e;i<=t;i+=n)r.push(Math.round(i*100)/100);return r}function Ly({option:e,pluginSettings:t,definedSettings:n,id:r,onChange:i,onError:s}){let l=t[r]??e.default,[c,u]=O.useState(null);O.useEffect(()=>{s(c!==null)},[c]);function d(m){let h=e.isValid?.call(n,m)??!0;typeof h=="string"?u(h):h?(u(null),i(m)):u("Invalid input provided.")}return o(S.FormSection,null,o(S.FormTitle,null,e.description),o(ir,{disabled:e.disabled?.call(n)??!1,markers:e.markers,minValue:e.markers[0],maxValue:e.markers[e.markers.length-1],initialValue:l,onValueChange:d,onValueRender:m=>String(m.toFixed(2)),stickToMarkers:e.stickToMarkers??!0,...e.componentProps}))}var Mu=g(()=>{"use strict";a();I()});function Ey({option:e,pluginSettings:t,definedSettings:n,id:r,onChange:i,onError:s}){let[l,c]=O.useState(t[r]??e.default??null),[u,d]=O.useState(null);O.useEffect(()=>{s(u!==null)},[u]);function m(h){let v=e.isValid?.call(n,h)??!0;d(typeof v=="string"?v:v?null:"Invalid input provided."),c(h),i(h)}return o(S.FormSection,null,o(S.FormTitle,null,e.description),o(et,{type:"text",value:l,onChange:m,placeholder:e.placeholder??"Enter a value",disabled:e.disabled?.call(n)??!1,...e.componentProps}),u&&o(S.FormText,{style:{color:"var(--text-danger)"}},u))}var Dy=g(()=>{"use strict";a();I()});var Ra=g(()=>{"use strict";a();xu();Iy();Ny();Cy();Ry();Mu();Dy()});var Oy=g(()=>{});function ti(){return Q.getChannel(Ae.getChannelId())}function Pu(){return we.getGuild(ti()?.guild_id)}function lM(e){pc.openPrivateChannel(e)}function ni(){return Ci.PreloadedUserSettingsActionCreators.getCurrentValue()?.appearance?.theme}function uo(e){Gr.dispatchToLastSubscribed("INSERT_TEXT",{rawText:e,plainText:e})}function cM(e,t,n,r){let i={content:"",invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};return sM.sendMessage(e,i,n,r)}function Bn(e,t){return Ke(n=>o(qe,{...n,className:Js.modal,size:"dynamic"},o(bc,{className:Js.image,original:e,placeholder:e,src:e,renderLinkComponent:r=>o(Br,{...r}),shouldHideMediaOptions:!1,shouldAnimate:!0,...t})))}async function Fn(e){if(!await Et.getUser(e))throw new Error("No such user: "+e);let n=sn.getGuildId();aM.openUserProfileModal({userId:e,guildId:n,channelId:Ae.getChannelId(),analyticsLocation:{page:n?"Guild Channel":"DM Channel",section:"Profile Popout"}})}async function Iu(e,t){let n=rn.getUserProfile(e);if(n)return n;B.dispatch({type:"USER_PROFILE_FETCH_START",userId:e});let{body:r}=await wt.get({url:`/users/${e}/profile`,query:{with_mutual_guilds:!1,with_mutual_friends_count:!1,...t},oldFormErrors:!0});return B.dispatch({type:"USER_UPDATE",user:r.user}),await B.dispatch({type:"USER_PROFILE_FETCH_SUCCESS",...r}),t?.guild_id&&r.guild_member&&B.dispatch({type:"GUILD_MEMBER_PROFILE_UPDATE",guildId:t.guild_id,guildMember:r.guild_member}),rn.getUserProfile(e)}function po(e){return e.discriminator==="0"?e.username:e.tag}var sM,aM,La,It=g(()=>{"use strict";a();j();I();dt();sM=A("editMessage","sendMessage"),aM=A("openUserProfileModal","closeUserProfileModal");La=(n=>(n[n.Dark=1]="Dark",n[n.Light=2]="Light",n))(La||{})});function _y(e){Ke(t=>o(qe,{...t},o(_,null,o(tt,{className:oi("root")},o(hM,{user:e})))))}function fM(){let e=ni()===2?dM:mM;return o("img",{src:e,alt:"GitHub"})}function gM(){let e=ni()===2?pM:uM;return o("img",{src:e,alt:"Website"})}function hM({user:e}){lt();let t=We([rn],()=>rn.getUserProfile(e.id));_e(()=>{!t&&!e.bot&&e.id&&Iu(e.id)},[e.id]);let n=t?.connectedAccounts?.find(s=>s.type==="github")?.name,r=t?.connectedAccounts?.find(s=>s.type==="domain")?.name,i=Nt(()=>{let s=Object.values(He);return(zr[e.id]?s.filter(c=>c.authors.includes(zr[e.id])):s.filter(c=>c.authors.some(u=>u.name===e.username))).filter(c=>!c.name.endsWith("API")).sort((c,u)=>Number(c.required??!1)-Number(u.required??!1))},[e.id,e.username]);return o(f,null,o("div",{className:oi("header")},o("img",{className:oi("avatar"),src:e.getAvatarURL(void 0,512,!0),alt:""}),o(S.FormTitle,{tag:"h2",className:oi("name")},e.username),o("div",{className:oi("links")},r&&o(Br,{href:"https://"+r},o(gM,null)),n&&o(Br,{href:`https://github.com/${n}`},o(fM,null)))),o("div",{className:oi("plugins")},i.map(s=>o(Ea,{key:s.name,plugin:s,disabled:s.required??!1,onRestartNeeded:()=>yn("Restart to apply changes!")}))))}var uM,pM,dM,mM,oi,By=g(()=>{"use strict";a();Oy();$();Ve();le();P();It();dt();I();gr();Au();uM="/assets/e1e96d89e192de1997f73730db26e94f.svg",pM="/assets/730f58bcfd5a57a5e22460c445a0c6cf.svg",dM="/assets/3ff98ad75ac94fa883af5ed62d17c459.svg",mM="/assets/6a853b4c87fce386cbfef4a2efbacb09.svg",oi=Ge("vc-author-modal-")});function Fy(e){let t=new vM({username:e.username,id:e.id??es(),avatar:e.avatar,bot:!0});return B.dispatch({type:"USER_UPDATE",user:t}),t}function Cu({plugin:e,onRestartNeeded:t,onClose:n,transitionState:r}){let[i,s]=O.useState([]),l=lt().plugins[e.name],[c,u]=O.useState({}),[d,m]=O.useState({}),[h,v]=O.useState(null),T=()=>Object.values(d).every(k=>!k),w=Boolean(l&&e.options&&!Ei(e.options));O.useEffect(()=>{(async()=>{for(let k of e.authors.slice(0,6)){let F=k.id?await Et.getUser(`${k.id}`).catch(()=>Fy({username:k.name})):Fy({username:k.name});s(G=>[...G,F])}})()},[]);async function b(){if(!e.options){n();return}if(e.beforeSave){let F=await Promise.resolve(e.beforeSave(c));if(F!==!0){v(F);return}}let k=!1;for(let[F,G]of Object.entries(c)){let K=e.options[F];l[F]=G,K?.onChange?.(G),K?.restartNeeded&&(k=!0)}k&&t(),n()}function x(){if(!w||!e.options)return o(S.FormText,null,"There are no settings for this plugin.");{let k=Object.entries(e.options).map(([F,G])=>{if(G.hidden)return null;function K(R){u(X=>({...X,[F]:R}))}function q(R){m(X=>({...X,[F]:R}))}let z=SM[G.type];return o(z,{id:F,key:F,option:G,onChange:K,onError:q,pluginSettings:l,definedSettings:e.settings})});return o(ye,{flexDirection:"column",style:{gap:12,marginBottom:16}},k)}}function N(k,F){let G=e.authors.length-F,K=e.authors.length-G,q=K+e.authors.length-F;return o(V,{text:e.authors.slice(K,q).map(z=>z.name).join(", ")},({onMouseEnter:z,onMouseLeave:R})=>o("div",{className:Nu.moreUsers,onMouseEnter:z,onMouseLeave:R},"+",G))}return o(qe,{transitionState:r,size:"medium",className:"vc-text-selectable"},o(at,{separator:!1},o(oe,{variant:"heading-lg/semibold",style:{flexGrow:1}},e.name),o(cn,{onClick:n})),o(tt,null,o(S.FormSection,null,o(S.FormTitle,{tag:"h3"},"About ",e.name),o(S.FormText,null,e.description),o(S.FormTitle,{tag:"h3",style:{marginTop:8,marginBottom:0}},"Authors"),o("div",{style:{width:"fit-content",marginBottom:8}},o(yM,{users:i,count:e.authors.length,guildId:void 0,renderIcon:!1,max:6,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:N,renderUser:k=>o(Or,{className:Nu.clickableAvatar,onClick:()=>_y(k)},o("img",{className:Nu.avatar,src:k.getAvatarURL(void 0,80,!0),alt:k.username,title:k.username}))}))),!!e.settingsAboutComponent&&o("div",{className:re(Y.bottom8,"vc-text-selectable")},o(S.FormSection,null,o(_,{message:"An error occurred while rendering this plugin's custom InfoComponent"},o(e.settingsAboutComponent,{tempSettings:c})))),o(S.FormSection,{className:Y.bottom16},o(S.FormTitle,{tag:"h3"},"Settings"),x())),w&&o(Ft,null,o(ye,{flexDirection:"column",style:{width:"100%"}},o(ye,{style:{marginLeft:"auto"}},o(E,{onClick:n,size:E.Sizes.SMALL,color:E.Colors.PRIMARY,look:E.Looks.LINK},"Cancel"),o(V,{text:"You must fix all errors before saving",shouldShow:!T()},({onMouseEnter:k,onMouseLeave:F})=>o(E,{size:E.Sizes.SMALL,color:E.Colors.BRAND,onClick:b,onMouseEnter:k,onMouseLeave:F,disabled:!T()},"Save & Close"))),h&&o(oe,{variant:"text-md/semibold",style:{color:"var(--text-danger)"}},"Error while saving: ",h))))}var yM,Nu,vM,SM,Uy=g(()=>{"use strict";a();tn();$();le();Dt();Zt();ct();Be();dt();Oe();M();j();I();Ra();By();yM=me(()=>Bt("defaultRenderUser","showDefaultAvatarsForNullUsers")),Nu=A("moreUsers","emptyUser","avatarContainer","clickableAvatar"),vM=Qe(()=>W.getCurrentUser().constructor);SM={[0]:Ey,[1]:wu,[2]:wu,[3]:Py,[4]:ky,[5]:Ly,[6]:Ay}});var $y=g(()=>{});var Gy=g(()=>{});function Hy({checked:e,onChange:t,disabled:n}){return o("div",null,o("div",{className:re(Da.container,"default-colors",e?Da.checked:void 0),style:{backgroundColor:e?ku:Ru,opacity:n?.3:1}},o("svg",{className:Da.slider+" vc-switch-slider",viewBox:"0 0 28 20",preserveAspectRatio:"xMinYMid meet","aria-hidden":"true",style:{transform:e?"translateX(12px)":"translateX(-3px)"}},o("rect",{fill:"white",x:"4",y:"0",height:"20",width:"20",rx:"10"}),o("svg",{viewBox:"0 0 20 20",fill:"none"},e?o(f,null,o("path",{fill:ku,d:"M7.89561 14.8538L6.30462 13.2629L14.3099 5.25755L15.9009 6.84854L7.89561 14.8538Z"}),o("path",{fill:ku,d:"M4.08643 11.0903L5.67742 9.49929L9.4485 13.2704L7.85751 14.8614L4.08643 11.0903Z"})):o(f,null,o("path",{fill:Ru,d:"M5.13231 6.72963L6.7233 5.13864L14.855 13.2704L13.264 14.8614L5.13231 6.72963Z"}),o("path",{fill:Ru,d:"M13.2704 5.13864L14.8614 6.72963L6.72963 14.8614L5.13864 13.2704L13.2704 5.13864Z"})))),o("input",{disabled:n,type:"checkbox",className:Da.input,tabIndex:0,checked:e,onChange:r=>t(r.currentTarget.checked)})))}var ku,Ru,Da,zy=g(()=>{"use strict";a();Gy();Be();j();ku="var(--green-360)",Ru="var(--primary-400)",Da=A("slider","input","container")});function Oa({disabled:e,isNew:t,name:n,infoButton:r,footer:i,author:s,enabled:l,setEnabled:c,description:u,onMouseEnter:d,onMouseLeave:m}){return o("div",{className:ri("card",{"card-disabled":e}),onMouseEnter:d,onMouseLeave:m},o("div",{className:ri("header")},o("div",{className:ri("name-author")},o(oe,{variant:"text-md/bold",className:ri("name")},n,t&&o(My,{text:"NEW",color:"#ED4245"})),!!s&&o(oe,{variant:"text-md/normal",className:ri("author")},s)),r,o(Hy,{checked:l,onChange:c,disabled:e})),o(oe,{className:ri("note"),variant:"text-sm/normal"},u),i)}var ri,Lu=g(()=>{"use strict";a();$y();Ve();xu();zy();I();ri=Ge("vc-addon-")});var os,Eu=g(()=>{"use strict";a();os=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 Fu={};Ue(Fu,{PMLogger:()=>bM,isPluginEnabled:()=>Ou,patches:()=>jy,plugins:()=>TM,startAllPlugins:()=>_u,startDependenciesRecursive:()=>_a,startPlugin:()=>rs,stopPlugin:()=>Bu});function Ou(e){return(He[e]?.required||He[e]?.isDependency||Du[e]?.enabled)??!1}function _a(e){let t=!1,n=[];return e.dependencies?.forEach(r=>{if(!L.plugins[r].enabled){if(_a(He[r]),L.plugins[r].enabled=!0,He[r].patches){dn.warn(`Enabling dependency ${r} requires restart.`),t=!0;return}rs(He[r])||n.push(r)}}),{restartNeeded:t,failures:n}}var dn,bM,TM,jy,Du,Wy,_u,rs,Bu,Ba=g(()=>{"use strict";a();tn();$();Je();I();gr();qs();dn=new ie("PluginManager","#a6d189"),bM=dn,TM=He,jy=[],Du=L.plugins;Wy=Object.values(He);for(let e of Wy)Du[e.name]?.enabled&&e.dependencies?.forEach(t=>{let n=He[t];if(n)Du[t].enabled=!0,n.isDependency=!0;else{let r=new Error(`Plugin ${e.name} has unresolved dependency ${t}`);dn.warn(r)}});for(let e of Wy){if(e.settings){e.settings.pluginName=e.name,e.options??={};for(let[t,n]of Object.entries(e.settings.def)){let r=e.settings.checks?.[t];e.options[t]={...n,...r}}}if(e.patches&&Ou(e.name))for(let t of e.patches)t.plugin=e.name,Array.isArray(t.replacement)||(t.replacement=[t.replacement]),jy.push(t)}_u=Pn("startAllPlugins",function(){for(let t in He)Ou(t)&&rs(He[t])});rs=Pn("startPlugin",function(t){let{name:n,commands:r,flux:i}=t;if(t.start){if(dn.info("Starting plugin",n),t.started)return dn.warn(`${n} already started`),!1;try{t.start(),t.started=!0}catch(s){return dn.error(`Failed to start ${n} `,s),!1}}if(r?.length){dn.info("Registering commands of plugin",n);for(let s of r)try{ei(s,n)}catch(l){return dn.error(`Failed to register command ${s.name} `,l),!1}}if(i)for(let s in i)B.subscribe(s,i[s]);return!0},e=>`startPlugin ${e.name}`),Bu=Pn("stopPlugin",function(t){let{name:n,commands:r,flux:i}=t;if(t.stop){if(dn.info("Stopping plugin",n),!t.started)return dn.warn(`${n} already stopped`),!1;try{t.stop(),t.started=!1}catch(s){return dn.error(`Failed to stop ${n} `,s),!1}}if(r?.length){dn.info("Unregistering commands of plugin",n);for(let s of r)try{ns(s.name)}catch(l){return dn.error(`Failed to unregister command ${s.name} `,l),!1}}if(i)for(let s in i)B.unsubscribe(s,i[s]);return!0},e=>`stopPlugin ${e.name}`)});function wM(e){ee.show({message:e,type:ee.Type.FAILURE,id:ee.genId(),options:{position:ee.Position.BOTTOM}})}function MM({required:e}){return o(xt,{className:Sr("info-card",{"restart-card":e})},e?o(f,null,o(S.FormTitle,{tag:"h5"},"Restart required!"),o(S.FormText,{className:Sr("dep-text")},"Restart now to apply new plugins and their settings"),o(E,{color:E.Colors.YELLOW,onClick:()=>location.reload()},"Restart")):o(f,null,o(S.FormTitle,{tag:"h5"},"Plugin Management"),o(S.FormText,null,"Press the cog wheel or info icon to get more info on a plugin"),o(S.FormText,null,"Plugins with a cog wheel have settings you can modify!")))}function Ea({plugin:e,disabled:t,onRestartNeeded:n,onMouseEnter:r,onMouseLeave:i,isNew:s}){let l=L.plugins[e.name],c=()=>l.enabled??!1;function u(){Bi(async()=>m=>o(Cu,{...m,plugin:e,onRestartNeeded:()=>n(e.name)}))}function d(){let m=c();if(!m){let{restartNeeded:v,failures:T}=_a(e);if(T.length){qy.error(`Failed to start dependencies for ${e.name}: ${T.join(", ")}`),Xi("Failed to start dependencies: "+T.join(", "),"Close",()=>null);return}else if(v){l.enabled=!0,n(e.name);return}}if(e.patches?.length){l.enabled=!m,n(e.name);return}if(m&&!e.started){l.enabled=!m;return}if(!(m?Bu(e):rs(e))){l.enabled=!1;let v=`Error while ${m?"stopping":"starting"} plugin ${e.name}`;qy.error(v),wM(v);return}l.enabled=!m}return o(Oa,{name:e.name,description:e.description,isNew:s,enabled:c(),setEnabled:d,disabled:t,onMouseEnter:r,onMouseLeave:i,infoButton:o("button",{role:"switch",onClick:()=>u(),className:re(xM.button,Sr("info-button"))},e.options&&!Ei(e.options)?o(Sy,null):o(Aa,null))})}function Uu(){let e=lt(),t=O.useMemo(()=>new os,[]);O.useEffect(()=>()=>void(t.hasChanges&&an.show({title:"Restart required",body:o(f,null,o("p",null,"The following plugins require a restart:"),o("div",null,t.map((v,T)=>o(f,null,T>0&&", ",$e.parse("`"+v+"`"))))),confirmText:"Restart now",cancelText:"Later!",onConfirm:()=>location.reload()})),[]);let n=O.useMemo(()=>{let v={};for(let T in He){let w=He[T].dependencies;if(w)for(let b of w)v[b]??=[],v[b].push(T)}return v},[]),r=O.useMemo(()=>Object.values(He).sort((v,T)=>v.name.localeCompare(T.name)),[]),[i,s]=O.useState({value:"",status:0}),l=v=>s(T=>({...T,value:v})),c=v=>s(T=>({...T,status:v})),u=v=>{let T=e.plugins[v.name]?.enabled;if(T&&i.status===2||!T&&i.status===1||i.status===3&&!d?.includes(v.name))return!1;if(!i.value.length)return!0;let w=i.value.toLowerCase();return v.name.toLowerCase().includes(w)||v.description.toLowerCase().includes(w)||v.tags?.some(b=>b.toLowerCase().includes(w))},[d]=ot(()=>Pt("Vencord_existingPlugins").then(v=>{let T=Date.now()/1e3,w={},b=Object.values(r).map(N=>N.name),x=[];for(let{name:N}of r)(w[N]=v?.[N]??T)+60*60*24*2>T&&x.push(N);return Vt("Vencord_existingPlugins",w),cr.isEqual(x,b)?[]:x})),m,h;if(r?.length){m=[],h=[];for(let v of r){if(!v.options&&v.name.endsWith("API")&&i.value!=="API"||!u(v))continue;if(v.required||n[v.name]?.some(w=>e.plugins[w].enabled)){let w=v.required?"This plugin is required for Vencord to function.":PM(n[v.name]?.filter(b=>e.plugins[b].enabled));h.push(o(V,{text:w,key:v.name},({onMouseLeave:b,onMouseEnter:x})=>o(Ea,{onMouseLeave:b,onMouseEnter:x,onRestartNeeded:N=>t.handleChange(N),disabled:!0,plugin:v})))}else m.push(o(Ea,{onRestartNeeded:w=>t.handleChange(w),disabled:!1,plugin:v,isNew:d?.includes(v.name),key:v.name}))}}else m=h=o(oe,{variant:"text-md/normal"},"No plugins meet search criteria.");return o(Tn,{title:"Plugins"},o(MM,{required:t.hasChanges}),o(S.FormTitle,{tag:"h5",className:re(Y.top20,Y.bottom8)},"Filters"),o("div",{className:Sr("filter-controls")},o(et,{autoFocus:!0,value:i.value,placeholder:"Search for a plugin...",onChange:l,className:Y.bottom20}),o("div",{className:Ky.inputWrapper},o(An,{className:Ky.inputDefault,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:v=>v===i.status,closeOnSelect:!0}))),o(S.FormTitle,{className:Y.top20},"Plugins"),o("div",{className:Sr("grid")},m),o(S.FormDivider,{className:Y.top20}),o(S.FormTitle,{tag:"h5",className:re(Y.top20,Y.bottom8)},"Required Plugins"),o("div",{className:Sr("grid")},h))}function PM(e){return o(O.Fragment,null,o(S.FormText,null,"This plugin is required by:"),e.map(t=>o(S.FormText,{className:Sr("dep-text")},t)))}var Sr,qy,Ky,xM,Au=g(()=>{"use strict";a();dy();Kn();Ia();$();Ve();Ht();Uy();Lu();Fo();Eu();Je();ct();Be();dt();Oe();j();I();gr();Ba();Sr=Ge("vc-plugins-"),qy=new ie("PluginSettings","#a6d189"),Ky=A("inputDefault","inputWrapper"),xM=A("button","disabled","enabled")});var Yy={};Ue(Yy,{default:()=>IM});var IM,Zy=g(()=>{"use strict";a();Au();Fo();IM=xn(Uu,"Plugins")});function it(e){return e.disabled&&(e.style??={},e.style.pointerEvents="none",e["aria-disabled"]=!0),o("a",{role:"link",target:"_blank",...e},e.children)}var mo=g(()=>{"use strict";a()});var Xy={};Ue(Xy,{default:()=>DM});function kM({link:e}){let[t,n,r]=ot(()=>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...":n?`Error: ${n instanceof Error?n.message:String(n)}`:"Valid!";return o(S.FormText,{style:{color:r?"var(--text-muted)":n?"var(--text-danger)":"var(--text-positive)"}},i)}function RM({themeLinks:e}){return e.length?o(f,null,o(S.FormTitle,{className:Y.top20,tag:"h5"},"Validator"),o(S.FormText,null,"This section will tell you whether your themes can successfully be loaded"),o("div",null,e.map(t=>o(xt,{style:{padding:".5em",marginBottom:".5em",marginTop:".5em"},key:t},o(S.FormTitle,{tag:"h5",style:{overflowWrap:"break-word"}},t),o(kM,{link:t}))))):null}function LM({theme:e,enabled:t,onChange:n,onDelete:r}){return o(Oa,{name:e.name,description:e.description,author:e.author,enabled:t,setEnabled:n,infoButton:!1,footer:o(ye,{flexDirection:"row",style:{gap:"0.2em"}},!!e.website&&o(it,{href:e.website},"Website"),!!(e.website&&e.invite)&&" \u2022 ",!!e.invite&&o(it,{href:`https://discord.gg/${e.invite}`,onClick:async i=>{i.preventDefault();let{invite:s}=await AM.resolveInvite(e.invite,"Desktop Modal");if(!s)return yn("Invalid or expired invite");B.dispatch({type:"INVITE_MODAL_OPEN",invite:s,code:e.invite,context:"APP"})}},"Discord Server"))})}function EM(){let e=lt(["themeLinks","enabledThemes"]),t=Jt(null),[n,r]=J(0),[i,s]=J(e.themeLinks.join(` `)),[l,c]=J(null),[u,,d]=ot(VencordNative.themes.getThemesDir);_e(()=>{m()},[]);async function m(){let x=await VencordNative.themes.getThemesList();c(x)}function h(x,N){if(N){if(e.enabledThemes.includes(x))return;e.enabledThemes=[...e.enabledThemes,x]}else e.enabledThemes=e.enabledThemes.filter(k=>k!==x)}async function v(x){if(x.stopPropagation(),x.preventDefault(),!x.currentTarget?.files?.length)return;let{files:N}=x.currentTarget,k=Array.from(N,F=>{let{name:G}=F;if(!!G.endsWith(".css"))return new Promise((K,q)=>{let z=new FileReader;z.onload=()=>{VencordNative.themes.uploadTheme(G,z.result).then(K).catch(q)},z.readAsText(F)})});await Promise.all(k),m()}function T(){return o(f,null,o(xt,{className:"vc-settings-card"},o(S.FormTitle,{tag:"h5"},"Find Themes:"),o("div",{style:{marginBottom:".5em",display:"flex",flexDirection:"column"}},o(it,{style:{marginRight:".5em"},href:"https://betterdiscord.app/themes"},"BetterDiscord Themes"),o(it,{href:"https://github.com/search?q=discord+theme"},"GitHub")),o(S.FormText,null,'If using the BD site, click on "Download" and place the downloaded .theme.css file into your themes folder.')),o(S.FormSection,{title:"Local Themes"},o(xt,{className:"vc-settings-quick-actions-card"},o(f,null,o(E,{onClick:()=>Sa(u),size:E.Sizes.SMALL,disabled:d},"Open Themes Folder"),o(E,{onClick:m,size:E.Sizes.SMALL},"Load missing Themes"),o(E,{onClick:()=>VencordNative.quickCss.openEditor(),size:E.Sizes.SMALL},"Edit QuickCSS"))),o("div",{className:CM("grid")},l?.map(x=>o(LM,{key:x.fileName,enabled:e.enabledThemes.includes(x.fileName),onChange:N=>h(x.fileName,N),onDelete:async()=>{h(x.fileName,!1),await VencordNative.themes.deleteTheme(x.fileName),m()},theme:x})))))}function w(){e.themeLinks=[...new Set(i.trim().split(/\n+/).map(x=>x.trim()).filter(Boolean))]}function b(){return o(f,null,o(xt,{className:"vc-settings-card vc-text-selectable"},o(S.FormTitle,{tag:"h5"},"Paste links to css files here"),o(S.FormText,null,"One link per line"),o(S.FormText,null,"Make sure to use direct links to files (raw or github.io)!")),o(S.FormSection,{title:"Online Themes",tag:"h5"},o(Vs,{value:i,onChange:s,className:re(NM.textarea,"vc-settings-theme-links"),placeholder:"Theme Links",spellCheck:!1,onBlur:w,rows:10}),o(RM,{themeLinks:e.themeLinks})))}return o(Tn,{title:"Themes"},o(Nn,{type:"top",look:"brand",className:"vc-settings-tab-bar",selectedItem:n,onItemSelect:r},o(Nn.Item,{className:"vc-settings-tab-bar-item",id:0},"Local Themes"),o(Nn.Item,{className:"vc-settings-tab-bar-item",id:1},"Online Themes")),n===0&&T(),n===1&&b())}var AM,LO,NM,CM,DM,Jy=g(()=>{"use strict";a();$();Ve();Dt();Ht();mo();ct();Be();Do();Oe();j();I();Lu();Fo();AM=A("resolveInvite"),LO=Lt(e=>e.prototype?.activateUploadDialogue&&e.prototype.setRef),NM=Lt(e=>typeof e.textarea=="string"),CM=Ge("vc-settings-theme-");DM=xn(EM,"Themes")});var tv={};Ue(tv,{default:()=>FM});function Qy(e,t){return async()=>{e(!0);try{await t()}catch(r){if(hr.error("Failed to update",r),r)if(r.code&&r.cmd){let{code:i,path:s,cmd:l,stderr:c}=r;if(i==="ENOENT")var n=`Command \`${s}\` not found. Please install it and try again`;else{var n=`An error occurred while running \`${l}\`: `;n+=c||`Code \`${i}\`. See the console for more info`}}else var n="An unknown error occurred. See the console for more info.";else var n=`An unknown error occurred (error is undefined). Please try again.`;an.show({title:"Oops!",body:o(Sn,null,n.split(` `).map(i=>o("div",null,$e.parse(i))))})}finally{e(!1)}}}function Vy({repo:e,hash:t,disabled:n=!1}){return o(it,{href:`${e}/commit/${t}`,disabled:n},t)}function ev({updates:e,repo:t,repoPending:n}){return o(xt,{style:{padding:".5em"}},e.map(({hash:r,author:i,message:s})=>o("div",null,o("code",null,o(Vy,{repo:t,hash:r,disabled:n})),o("span",{style:{marginLeft:"0.5em",color:"var(--text-normal)"}},s," - ",i))))}function OM(e){let[t,n]=O.useState(_o),[r,i]=O.useState(!1),[s,l]=O.useState(!1),c=(t?.length??0)>0;return o(f,null,!t&&Xr?o(f,null,o(S.FormText,null,"Failed to check updates. Check the console for more info"),o(Sn,{style:{padding:"1em"}},o("p",null,Xr.stderr||Xr.stdout||"An unknown error occurred"))):o(S.FormText,{className:Y.bottom8},c?`There are ${t.length} Updates`:"Up to Date!"),c&&o(ev,{updates:t,...e}),o(ye,{className:re(Y.bottom8,Y.top8)},c&&o(E,{size:E.Sizes.SMALL,disabled:s||r,onClick:Qy(l,async()=>{await Qr()&&(n([]),await new Promise(u=>{an.show({title:"Update Success!",body:"Successfully updated. Restart now to apply the changes?",confirmText:"Restart",cancelText:"Not now!",onConfirm(){un(),u()},onCancel:u})}))})},"Update Now"),o(E,{size:E.Sizes.SMALL,disabled:s||r,onClick:Qy(i,async()=>{await Jr()?n(_o):(n([]),ee.show({message:"No updates found!",id:ee.genId(),type:ee.Type.MESSAGE,options:{position:ee.Position.BOTTOM}}))})},"Check for Updates")))}function _M(e){return o(f,null,o(S.FormText,{className:Y.bottom8},"Your local copy has more recent commits. Please stash or reset them."),o(ev,{...e,updates:_o}))}function BM(){let e=lt(["notifyAboutUpdates","autoUpdate","autoUpdateNotification"]),[t,n,r]=ot(su,{fallbackValue:"Loading..."});O.useEffect(()=>{n&&hr.error("Failed to retrieve repo",n)},[n]);let i={repo:t,repoPending:r};return o(Tn,{title:"Vencord Updater"},o(S.FormTitle,{tag:"h5"},"Updater Settings"),o(pt,{value:e.notifyAboutUpdates,onChange:s=>e.notifyAboutUpdates=s,note:"Shows a notification on startup",disabled:e.autoUpdate},"Get notified about new updates"),o(pt,{value:e.autoUpdate,onChange:s=>e.autoUpdate=s,note:"Automatically update Vencord without confirmation prompt"},"Automatically update"),o(pt,{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"),o(S.FormTitle,{tag:"h5"},"Repo"),o(S.FormText,{className:"vc-text-selectable"},r?t:n?"Failed to retrieve - check console":o(it,{href:t},t.split("/").slice(-2).join("/"))," ","(",o(Vy,{hash:ln,repo:t,disabled:r}),")"),o(S.FormDivider,{className:Y.top8+" "+Y.bottom8}),o(S.FormTitle,{tag:"h5"},"Updates"),Ki?o(_M,{...i}):o(OM,{...i}))}var FM,nv=g(()=>{"use strict";a();$();jr();Dt();mo();ct();Be();Do();Oe();yr();I();Hr();Fo();FM=xn(BM,"Updater")});function Fa({value:e,onChange:t,validate:n}){let[r,i]=O.useState(e),[s,l]=O.useState();function c(u){i(u);let d=n(u);d===!0?(l(void 0),t(u)):l(d)}return o(f,null,o(et,{type:"text",value:r,onChange:c,error:s}))}var $u=g(()=>{"use strict";a();I()});var ov={};Ue(ov,{default:()=>zM});function UM(e){try{return new URL(e),!0}catch{return"Invalid URL"}}async function $M(){let e=await fetch(new URL("/v1/",Eo()),{method:"DELETE",headers:new Headers({Authorization:await Yr()})});if(!e.ok){va.error(`Failed to erase data, API returned ${e.status}`),Ne({title:"Cloud Integrations",body:`Could not erase all data (API returned ${e.status}), please contact support.`,color:"var(--red-360)"});return}L.cloud.authenticated=!1,await nu(),Ne({title:"Cloud Integrations",body:"Successfully erased all data.",color:"var(--green-360)"})}function GM(){let{cloud:e}=lt(["cloud.authenticated","cloud.settingsSync"]),t=e.authenticated&&e.settingsSync;return o(S.FormSection,{title:"Settings Sync",className:Y.top16},o(S.FormText,{variant:"text-md/normal",className:Y.bottom20},"Synchronize your settings to the cloud. This allows easy synchronization across multiple devices with minimal effort."),o(pt,{key:"cloud-sync",disabled:!e.authenticated,value:e.settingsSync,onChange:n=>{e.settingsSync=n}},"Settings Sync"),o("div",{className:"vc-cloud-settings-sync-grid"},o(E,{size:E.Sizes.SMALL,disabled:!t,onClick:()=>Zr(!0)},"Sync to Cloud"),o(V,{text:"This will overwrite your local settings with the ones on the cloud. Use wisely!"},({onMouseLeave:n,onMouseEnter:r})=>o(E,{onMouseLeave:n,onMouseEnter:r,size:E.Sizes.SMALL,color:E.Colors.RED,disabled:!t,onClick:()=>wa(!0,!0)},"Sync from Cloud")),o(E,{size:E.Sizes.SMALL,color:E.Colors.RED,disabled:!t,onClick:()=>Vh()},"Delete Cloud Settings")))}function HM(){let e=lt(["cloud.authenticated","cloud.url"]);return o(Tn,{title:"Vencord Cloud"},o(S.FormSection,{title:"Cloud Settings",className:Y.top16},o(S.FormText,{variant:"text-md/normal",className:Y.bottom20},"Vencord comes with a cloud integration that adds goodies like settings sync across devices. It ",o(it,{href:"https://vencord.dev/cloud/privacy"},"respects your privacy"),", and the ",o(it,{href:"https://github.com/Vencord/Backend"},"source code")," is AGPL 3.0 licensed so you can host it yourself."),o(pt,{key:"backend",value:e.cloud.authenticated,onChange:t=>{t&&Kh(),t||(e.cloud.authenticated=t)},note:"This will request authorization if you have not yet set up cloud integrations."},"Enable Cloud Integrations"),o(S.FormTitle,{tag:"h5"},"Backend URL"),o(S.FormText,{className:Y.bottom8},"Which backend to use when using cloud integrations."),o(Fa,{key:"backendUrl",value:e.cloud.url,onChange:t=>{e.cloud.url=t,e.cloud.authenticated=!1,nu()},validate:UM}),o(E,{className:Y.top8,size:E.Sizes.MEDIUM,color:E.Colors.RED,disabled:!e.cloud.authenticated,onClick:()=>an.show({title:"Are you sure?",body:"Once your data is erased, we cannot recover it. There's no going back!",onConfirm:$M,confirmText:"Erase it!",confirmColor:"vc-cloud-erase-data-danger-btn",cancelText:"Nevermind"})},"Erase All Data"),o(S.FormDivider,{className:Y.top16})),o(GM,null))}var zM,rv=g(()=>{"use strict";a();ko();$();$u();mo();ou();ct();Wi();I();Fo();zM=xn(HM,"Cloud")});var iv={};Ue(iv,{default:()=>WM});function jM(){return o(Tn,{title:"Backup & Restore"},o(xt,{className:re("vc-settings-card","vc-backup-restore-card")},o(ye,{flexDirection:"column"},o("strong",null,"Warning"),o("span",null,"Importing a settings file will overwrite your current settings."))),o(oe,{variant:"text-md/normal",className:Y.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."),o(oe,{variant:"text-md/normal",className:Y.bottom8},"Settings Export contains:",o("ul",null,o("li",null,"\u2014 Custom QuickCSS"),o("li",null,"\u2014 Theme Links"),o("li",null,"\u2014 Plugin Settings"))),o(ye,null,o(E,{onClick:()=>Qh(),size:E.Sizes.SMALL},"Import Settings"),o(E,{onClick:Xh,size:E.Sizes.SMALL},"Export Settings")))}var WM,sv=g(()=>{"use strict";a();Dt();ct();Be();Wi();I();Fo();WM=xn(jM,"Backup & Restore")});var is,Gu=g(()=>{"use strict";a();Mt();$();P();M();I();Hr();is=y({name:"Settings",description:"Adds Settings UI and debug info",authors:[p.Ven,p.Megu],required:!0,start(){ue("user-settings-cog",e=>()=>{e.find(n=>Array.isArray(n)&&n.some(r=>r?.props?.id==="VencordSettings"))?.forEach(n=>{let r=n?.props?.id;(r?.startsWith("Vencord")||r?.startsWith("Vesktop"))&&(n.props.action=()=>no.open(r))})})},patches:[{find:".versionHash",replacement:[{match:/\[\(0,.{1,3}\.jsxs?\)\((.{1,10}),(\{[^{}}]+\{.{0,20}.versionHash,.+?\})\)," "/,replace:(e,t,n)=>(n=n.replace(/children:\[.+\]/,""),`${e},Vencord.Plugins.plugins.Settings.makeInfoElements(${t}, ${n})`)}]},{find:"Messages.ACTIVITY_SETTINGS",replacement:{get match(){switch(L.plugins.Settings.settingsLocation){case"top":return/\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.USER_SETTINGS\}/;case"aboveNitro":return/\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.BILLING_SETTINGS\}/;case"belowNitro":return/\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.APP_SETTINGS\}/;case"belowActivity":return/(?<=\{section:(\i\.\i)\.DIVIDER},)\{section:"changelog"/;case"bottom":return/\{section:(\i\.\i)\.CUSTOM,\s*element:.+?}/;case"aboveActivity":default:return/\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.ACTIVITY_SETTINGS\}/}},replace:"...$self.makeSettingsCategories($1),$&"}}],customSections:[],makeSettingsCategories(e){return[{section:e.HEADER,label:"Vencord",className:"vc-settings-header"},{section:"VencordSettings",label:"Vencord",element:(py(),Io(uy)).default,className:"vc-settings"},{section:"VencordPlugins",label:"Plugins",element:(Zy(),Io(Yy)).default,className:"vc-plugins"},{section:"VencordThemes",label:"Themes",element:(Jy(),Io(Xy)).default,className:"vc-themes"},{section:"VencordUpdater",label:"Updater",element:(nv(),Io(tv)).default,className:"vc-updater"},{section:"VencordCloud",label:"Cloud",element:(rv(),Io(ov)).default,className:"vc-cloud"},{section:"VencordSettingsSync",label:"Backup & Restore",element:(sv(),Io(iv)).default,className:"vc-backup-restore"},!1,...this.customSections.map(t=>t(e)),{section:e.DIVIDER}].filter(Boolean)},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"},{label:"Below the Nitro section",value:"belowNitro"},{label:"Above Activity Settings",value:"aboveActivity",default:!0},{label:"Below Activity Settings",value:"belowActivity"},{label:"At the very bottom",value:"bottom"}],restartNeeded:!0}},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` (Vesktop v${VesktopNative.app.getVersion()})`},makeInfoElements(e,t){let{electronVersion:n,chromiumVersion:r,additionalInfo:i}=this;return o(f,null,o(e,{...t},"Vencord ",ln,i),n&&o(e,{...t},"Electron ",n),r&&o(e,{...t},"Chromium ",r))}})});var av,qM,Hu,lv=g(()=>{"use strict";a();ss();P();Be();lo();M();yr();I();Hr();gr();Gu();av="Vencord-SupportHelper-Dismiss",qM=[oa,"1024286218801926184","1033680203433660458"],Hu=y({name:"SupportHelper",required:!0,description:"Helps us provide support to you",authors:[p.Ven],dependencies:["CommandsAPI"],commands:[{name:"vencord-debug",description:"Send Vencord Debug info",predicate:e=>qM.includes(e.channel.id),async execute(){let{RELEASE_CHANNEL:e}=window.GLOBAL_ENV,t=(()=>`Vesktop v${VesktopNative.app.getVersion()}`)(),n=c=>c.endsWith("API")||He[c].required,r=Object.keys(He).filter(c=>Vencord.Plugins.isPluginEnabled(c)&&!n(c)),i=Object.keys(He).filter(c=>Vencord.Plugins.isPluginEnabled(c)&&n(c)),s={Vencord:`v1.6.3 \u2022 ${ln}${is.additionalInfo} - ${Intl.DateTimeFormat("en-GB",{dateStyle:"medium"}).format(1699510576725)}`,"Discord Branch":e,Client:t,Platform:window.navigator.platform,Outdated:Bo,OpenAsar:"openasar"in window};return{content:` **Vencord Debug Info** >>> ${Object.entries(s).map(([c,u])=>`${c}: ${u}`).join(` `)} Enabled Plugins (${r.length+i.length}): ${Vi(r.join(", ")+` `+i.join(", "))} `.trim().replaceAll("```\n","```")}}}],flux:{async CHANNEL_SELECT({channelId:e}){if(e===oa&&!Di(W.getCurrentUser().id)&&Bo&&ln!==await zt.get(av)){let t=()=>zt.set(av,ln);an.show({title:"Hold on!",body:o("div",null,o(S.FormText,null,"You are using an outdated version of Vencord! Chances are, your issue is already fixed."),o(S.FormText,null,"Please first update using the Updater Page in Settings, or use the VencordInstaller (Update Vencord Button) to do so, in case you can't access the Updater page.")),onCancel:t,onConfirm:t})}}}})});var zu,cv=g(()=>{"use strict";a();P();M();zu=y({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":e}},{find:".Messages.GUILD_OWNER,",replacement:{match:/(?<=\.activityEmoji,.+?animate:)\i/,replace:"!0"}}]})});var ju,uv=g(()=>{"use strict";a();P();M();ju=y({name:"AlwaysTrust",description:"Removes the annoying untrusted domain and suspicious file popup",authors:[p.zt],patches:[{find:'.displayName="MaskedLinkStore"',replacement:{match:/(?<=isTrustedDomain\(\i\){)return \i\(\i\)/,replace:"return true"}},{find:"isSuspiciousDownload:",replacement:{match:/function \i\(\i\){(?=.{0,60}\.parse\(\i\))/,replace:"$&return null;"}}]})});var KM,Wu,pv=g(()=>{"use strict";a();$();P();M();KM=/\.tar\.\w+$/,Wu=y({name:"AnonymiseFileNames",authors:[p.obscurity],description:"Anonymise uploaded file names",patches:[{find:"instantBatchUpload:function",replacement:{match:/uploadFiles:(.{1,2}),/,replace:"uploadFiles:(...args)=>(args[0].uploads.forEach(f=>f.filename=$self.anonymise(f.filename)),$1(...args)),"}}],options:{method:{description:"Anonymising method",type:4,options:[{label:"Random Characters",value:0,default:!0},{label:"Consistent",value:1},{label:"Timestamp (4chan-like)",value:2}]},randomisedLength:{description:"Random characters length",type:1,default:7,disabled:()=>L.plugins.AnonymiseFileNames.method!==0},consistent:{description:"Consistent filename",type:0,default:"image",disabled:()=>L.plugins.AnonymiseFileNames.method!==1}},anonymise(e){let t="image",r=KM.exec(e)?.index??e.lastIndexOf("."),i=r!==-1?e.slice(r):"";switch(L.plugins.AnonymiseFileNames.method){case 0:let s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";t=Array.from({length:L.plugins.AnonymiseFileNames.randomisedLength},()=>s[Math.floor(Math.random()*s.length)]).join("");break;case 1:t=L.plugins.AnonymiseFileNames.consistent;break;case 2:t=`${Math.floor(Date.now()/1e3)}${Math.floor(window.performance.now())}`;break}return t+i}})});async function dv(e,t){return(await ur.fetchAssetIds(e,[t]))[0]}async function ZM(e){let t={};return await YM.fetchApplicationsRPC(t,e),t.application}var YM,mv,ii,qu,fv=g(()=>{"use strict";a();Ia();mo();P();M();j();I();YM=A("fetchApplicationsRPC","getRemoteIconURL");mv={};qu=y({name:"WebRichPresence (arRPC)",description:"Client plugin for arRPC to enable RPC on Discord Web (experimental)",authors:[p.Ducko],settingsAboutComponent:()=>o(f,null,o(S.FormTitle,{tag:"h3"},"How to use arRPC"),o(S.FormText,null,o(it,{href:"https://github.com/OpenAsar/arrpc/tree/main#server"},"Follow the instructions in the GitHub repo")," to get the server running, and then enable the plugin.")),async handleEvent(e){let t=JSON.parse(e.data),{activity:n}=t,r=n?.assets;if(r?.large_image&&(r.large_image=await dv(n.application_id,r.large_image)),r?.small_image&&(r.small_image=await dv(n.application_id,r.small_image)),n){let i=n.application_id;mv[i]||=await ZM(i);let s=mv[i];n.name||=s.name}B.dispatch({type:"LOCAL_ACTIVITY_UPDATE",...t})},async start(){if("armcord"in window)return;if(ii&&ii.close(),ii=new WebSocket("ws://127.0.0.1:1337"),ii.onmessage=this.handleEvent,!await new Promise(t=>setTimeout(()=>t(ii.readyState===WebSocket.OPEN),1e3))){Xi("Failed to connect to arRPC, is it running?","Retry",()=>{du(),this.start()});return}ee.show({message:"Connected to arRPC",type:ee.Type.SUCCESS,id:ee.genId(),options:{duration:1e3,position:ee.Position.BOTTOM}})},stop(){B.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:null}),ii?.close()}})});var Ku,gv=g(()=>{"use strict";a();P();M();Ku=y({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 hv,yv,XM,vv,Sv=g(()=>{"use strict";a();le();Oe();j();I();Yu();hv=Ie("ChannelRTCStore"),yv=A("a","animated","useTransition"),XM=me(()=>st(e=>e.type?.toString().includes('("guildsnav")'))),vv=_.wrap(e=>{let t=We([si],()=>si.getExpandedFolders()),n=We([hv],()=>hv.isFullscreenInContext()),r=o(XM,{...e,isBetterFolders:!0,betterFoldersExpandedIds:t}),i=!!t.size,s=document.querySelector(e.className.split(" ").map(c=>`.${c}`).join("")),l={display:n?"none":"flex"};return!s||!ft.store.sidebarAnim?i?o("div",{style:l},r):null:o(yv.Transition,{items:i,from:{width:0},enter:{width:s.getBoundingClientRect().width},leave:{width:0},config:{duration:200}},(c,u)=>u&&o(yv.animated.div,{style:{...c,...l}},r))},{noop:!0})});function VM(e){return QM.getGuildFolders().find(t=>t.guildIds.includes(e))}function Tv(){for(let e of si.getExpandedFolders())Xu.toggleGuildFolderExpand(e)}var JM,QM,si,Xu,bv,Zu,ft,Ju,Yu=g(()=>{"use strict";a();$();P();Zt();M();j();I();Sv();JM=Qe(()=>yt("GuildsTree").GuildsTree),QM=Ie("SortedGuildStore"),si=Ie("ExpandedGuildFolderStore"),Xu=A("move","toggleGuildFolderExpand"),bv=null,Zu=!1;ft=D({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}}),Ju=y({name:"BetterFolders",description:"Shows server folders on dedicated sidebar and adds folder related improvements",authors:[p.juby,p.AutumnVN,p.Nuckyz],settings:ft,patches:[{find:'("guildsnav")',predicate:()=>ft.store.sidebar,replacement:[{match:/(?<=let{disableAppDownload:\i=\i\.isPlatformEmbedded,isOverlay:.+?)(?=}=\i,)/,replace:",isBetterFolders"},{match:/(useStateFromStoresArray\).{0,25}let \i)=(\i\.\i.getGuildsTree\(\))/,replace:(e,t,n)=>`${t}=$self.getGuildTree(!!arguments[0].isBetterFolders,${n},arguments[0].betterFoldersExpandedIds)`},{match:/lastTargetNode:\i\[\i\.length-1\].+?Fragment.+?\]}\)\]/,replace:"$&.filter($self.makeGuildsBarGuildListFilter(!!arguments[0].isBetterFolders))"},{match:/unreadMentionsIndicatorBottom,barClassName.+?}\)\]/,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:".MAX_GUILD_FOLDER_NAME_LENGTH,",predicate:()=>ft.store.sidebar&&ft.store.showFolderIcon!==1,replacement:[{match:/(useStateFromStores\).{0,20}=>)(\i\.\i)\.isFolderExpanded\(\i\)/,replace:(e,t,n)=>`${t}${n}.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:()=>ft.store.sidebar,replacement:[{predicate:()=>ft.store.keepIcons,match:/(?<=let{folderNode:\i,setNodeRef:\i,.+?expanded:(\i),.+?;)(?=let)/,replace:(e,t)=>`${t}=!!arguments[0].isBetterFolders&&${t};`},{predicate:()=>!ft.store.keepIcons,match:/(?<=\.Messages\.SERVER_FOLDER_PLACEHOLDER.+?useTransition\)\()/,replace:"!!arguments[0].isBetterFolders&&"},{predicate:()=>!ft.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:()=>ft.store.showFolderIcon!==1,match:/(?<=\.wrapper,children:\[)/,replace:"$self.shouldShowFolderIconAndBackground(!!arguments[0].isBetterFolders,arguments[0].betterFoldersExpandedIds)&&"},{predicate:()=>ft.store.showFolderIcon!==1,match:/(?<=\.expandedFolderBackground.+?}\),)(?=\i,)/,replace:"!$self.shouldShowFolderIconAndBackground(!!arguments[0].isBetterFolders,arguments[0].betterFoldersExpandedIds)?null:"}]},{find:"APPLICATION_LIBRARY,render",predicate:()=>ft.store.sidebar,replacement:{match:/(?<=({className:\i\.guilds,themeOverride:\i})\))/,replace:",$self.FolderSideBar($1)"}},{find:".Messages.DISCODO_DISABLED",predicate:()=>ft.store.closeAllHomeButton,replacement:{match:/(?<=onClick:\(\)=>{)(?=.{0,200}"discodo")/,replace:"$self.closeFolders();"}}],flux:{CHANNEL_SELECT(e){if(!(!ft.store.closeAllFolders&&!ft.store.forceOpen)&&bv!==e.guildId){bv=e.guildId;let t=VM(e.guildId);t?.folderId?ft.store.forceOpen&&!si.isFolderExpanded(t.folderId)&&Xu.toggleGuildFolderExpand(t.folderId):ft.store.closeAllFolders&&Tv()}},TOGGLE_GUILD_FOLDER_EXPAND(e){ft.store.closeOthers&&!Zu&&(Zu=!0,B.wait(()=>{let t=si.getExpandedFolders();if(t.size>1)for(let n of t)n!==e.folderId&&Xu.toggleGuildFolderExpand(n);Zu=!1}))}},getGuildTree(e,t,n){if(!e||n==null)return t;let r=new JM;return r.root.children=t.root.children.filter(i=>n.has(i.id)),r.nodes=Object.fromEntries(Object.entries(t.nodes).filter(([i,s])=>n.has(s.id)||n.has(s.parentId))),r},makeGuildsBarGuildListFilter(e){return t=>e?t?.props?.["aria-label"]===Ct.Messages.SERVERS:!0},makeGuildsBarTreeFilter(e){return t=>e?"onScroll"in t.props:!0},shouldShowFolderIconAndBackground(e,t){if(!e)return!0;switch(ft.store.showFolderIcon){case 0:return!1;case 1:return!0;case 2:return(t?.size??0)>1;default:return!0}},FolderSideBar:e=>o(vv,{...e}),closeFolders:Tv})});var Qu,xv=g(()=>{"use strict";a();P();M();Qu=y({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\.default\.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 n=t.slice(t.lastIndexOf("/")+1).replace(/\d/g,"").replace(/.gif$/,"").split(/[,\-_ ]+/g).slice(0,20).join(" ");return n.length>300&&(n=n.slice(0,300)+"..."),n&&(e.alt+=` - ${n}`),e.alt}})});var eP,Vu,wv=g(()=>{"use strict";a();$();P();M();j();eP=A("section","lastSection"),Vu=y({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)=>t.match(/}=.+/)==null?"hideNote:!0":e}},{find:"Messages.NOTE_PLACEHOLDER",replacement:{match:/\.NOTE_PLACEHOLDER,/,replace:"$&spellCheck:!Vencord.Settings.plugins.BetterNotesBox.noSpellCheck,"}},{find:".Messages.NOTE}",replacement:{match:/(?<=return \i\?)null(?=:\(0,\i\.jsxs)/,replace:"$self.patchPadding(arguments[0])"}}],options:{hide:{type:3,description:"Hide notes",default:!1,restartNeeded:!0},noSpellCheck:{type:3,description:"Disable spellcheck in notes",disabled:()=>L.plugins.BetterNotesBox.hide,default:!1}},patchPadding(e){if(!!e.lastSection)return o("div",{className:eP.lastSection})}})});var ep,Mv=g(()=>{"use strict";a();$();P();M();I();ep=y({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:()=>L.plugins.BetterRoleDot.bothStyles,replacement:{match:/"(?:username|dot)"===\i(?!\.\i)/g,replace:"true"}},{find:".ADD_ROLE_A11Y_LABEL",predicate:()=>L.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!L.plugins.BetterRoleDot.bothStyles,noWarn:!0,replacement:{match:/"dot"===\i/,replace:"true"}},{find:".roleVerifiedIcon",predicate:()=>L.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!L.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){Qt.copy(e),ee.show({message:"Copied to Clipboard!",type:ee.Type.SUCCESS,id:ee.genId(),options:{duration:1e3,position:ee.Position.BOTTOM}})}})});var tp,Pv=g(()=>{"use strict";a();P();M();tp=y({name:"BetterUploadButton",authors:[p.obscurity,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 Iv,Av,Nv=g(()=>{"use strict";a();j();Iv=Ie("ApplicationStreamPreviewStore"),Av=Ie("ApplicationStreamingStore")});var tP,Rv,Cv,kv,np,Lv=g(()=>{"use strict";a();Mt();Ht();P();It();M();I();Nv();tP=async({guildId:e,channelId:t,ownerId:n})=>{let r=await Iv.getPreviewURL(e,t,n);!r||Bn(r)},Rv=(e,{userId:t})=>()=>{let n=Av.getAnyStreamForUser(t);if(!n)return;let r=o(U.MenuItem,{label:"View Stream Preview",id:"view-stream-preview",icon:yy,action:()=>n&&tP(n),disabled:!n});e.push(o(U.MenuSeparator,null),r)},Cv=(e,{stream:t})=>Rv(e,{userId:t.ownerId}),kv=(e,{user:t})=>Rv(e,{userId:t.id}),np=y({name:"BiggerStreamPreview",description:"This plugin allows you to enlarge stream previews",authors:[p.phil],start:()=>{ue("user-context",kv),ue("stream-context",Cv)},stop:()=>{fe("user-context",kv),fe("stream-context",Cv)}})});function Ev(){as.textContent=` .vc-nsfw-img [class^=imageWrapper] img, .vc-nsfw-img [class^=wrapperPaused] video { filter: blur(${L.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 as,op,Dv=g(()=>{"use strict";a();$();P();M();op=y({name:"BlurNSFW",description:"Blur attachments in NSFW channels until hovered",authors:[p.Ven],patches:[{find:".embedWrapper,embed",replacement:[{match:/\.embedWrapper/g,replace:"$&+(this.props.channel.nsfw?' vc-nsfw-img':'')"}]}],options:{blurAmount:{type:1,description:"Blur Amount",default:10,onChange:Ev}},start(){as=document.createElement("style"),as.id="VcBlurNsfw",document.head.appendChild(as),Ev()},stop(){as?.remove()}})});function nP(e){let t=L.plugins.CallTimer.format==="human",n=m=>t?m:m.toString().padStart(2,"0"),r=m=>t?m:"",i=t?" ":":",s=Math.floor(e/864e5),l=Math.floor(e%864e5/36e5),c=Math.floor(e%864e5%36e5/6e4),u=Math.floor(e%864e5%36e5%6e4/1e3),d="";return s&&(d+=`${s}d `),(l||d)&&(d+=`${n(l)}${r("h")}${i}`),(c||d||!t)&&(d+=`${n(c)}${r("m")}${i}`),d+=`${n(u)}${r("s")}`,d}var rp,Ov=g(()=>{"use strict";a();$();le();P();Oe();M();rp=y({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 o(_,{noop:!0},o(this.Timer,{channelId:e}))},Timer({channelId:e}){let t=Oi({deps:[e]});return o("p",{style:{margin:0}},"Connected for ",o("span",{style:{fontFamily:"var(--font-code)"}},nP(t)))}})});var pp={};Ue(pp,{_handleClick:()=>iP,_handlePreEdit:()=>rP,_handlePreSend:()=>oP,addClickListener:()=>cp,addPreEditListener:()=>br,addPreSendListener:()=>jt,removeClickListener:()=>up,removePreEditListener:()=>Tr,removePreSendListener:()=>Wt});async function oP(e,t,n,r){n.replyOptions=r;for(let i of sp)try{let s=await i(e,t,n);if(s&&s.cancel===!0)return!0}catch(s){ip.error(`MessageSendHandler: Listener encountered an unknown error `,s)}return!1}async function rP(e,t,n){for(let r of ap)try{await r(e,t,n)}catch(i){ip.error(`MessageEditHandler: Listener encountered an unknown error `,i)}}function jt(e){return sp.add(e),e}function br(e){return ap.add(e),e}function Wt(e){return sp.delete(e)}function Tr(e){return ap.delete(e)}function iP(e,t,n){e=Cn.getMessage(t.id,e.id)??e;for(let r of lp)try{r(e,t,n)}catch(i){ip.error(`MessageClickHandler: Listener encountered an unknown error `,i)}}function cp(e){return lp.add(e),e}function up(e){return lp.delete(e)}var ip,sp,ap,lp,Xn=g(()=>{"use strict";a();Je();I();ip=new ie("MessageEvents","#e5c890"),sp=new Set,ap=new Set;lp=new Set});var _v,Bv=g(()=>{"use strict";a();_v=["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","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","share_id@reddit.com"]});var Fv,sP,dp,Uv=g(()=>{"use strict";a();Xn();P();M();Bv();Fv=/[\\^$.*+?()[\]{}|]/g,sP=RegExp(Fv.source),dp=y({name:"ClearURLs",description:"Removes tracking garbage from URLs",authors:[p.adryd],dependencies:["MessageEventsAPI"],escapeRegExp(e){return e&&sP.test(e)?e.replace(Fv,"\\$&"):e||""},createRules(){let e=_v;this.universalRules=new Set,this.rulesByHost=new Map,this.hostRules=new Map;for(let t of e){let n=t.split("@"),r=new RegExp("^"+this.escapeRegExp(n[0]).replace(/\\\*/,".+?")+"$");if(!n[1]){this.universalRules.add(r);continue}let i=new RegExp("^(www\\.)?"+this.escapeRegExp(n[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,n){(t===e||e instanceof RegExp&&e.test(t))&&n.delete(t)},replacer(e){try{var t=new URL(e)}catch{return e}return t.searchParams.entries().next().done?e:(this.universalRules.forEach(n=>{t.searchParams.forEach((r,i,s)=>{this.removeParam(n,i,s)})}),this.hostRules.forEach((n,r)=>{!n.test(t.hostname)||this.rulesByHost.get(r).forEach(i=>{t.searchParams.forEach((s,l,c)=>{this.removeParam(i,l,c)})})}),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=jt((e,t)=>this.onSend(t)),this.preEdit=br((e,t,n)=>this.onSend(n))},stop(){Wt(this.preSend),Tr(this.preEdit)}})});var mp,$v=g(()=>{"use strict";a();P();M();mp=y({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:'status_$:$1="online"'}}]})});function xr(e){if(typeof e=="string")return e;let t=e.source.replaceAll("\\i","[A-Za-z_$][\\w$]*");return new RegExp(t,e.flags)}function Ua(e,t){let n=`Vencord.Plugins.plugins[${JSON.stringify(t)}]`;return typeof e!="function"?e.replaceAll("$self",n):(...r)=>e(...r).replaceAll("$self",n)}function fp(e,t){if(e.get){let n=e.get;e.get=function(){return t(n.call(this))}}else e.value&&(e.value=t(e.value));return e}function ls(e,t){let n=Object.getOwnPropertyDescriptors(e);n.match=fp(n.match,xr),n.replace=fp(n.replace,r=>Ua(r,t)),Object.defineProperties(e,n)}var cs=g(()=>{"use strict";a()});var gp,Gv=g(()=>{"use strict";a();P();Do();cs();M();j();j();I();gp=y({name:"ConsoleShortcuts",description:"Adds shorter Aliases for many things on the window. Run `shortcutList` for a list.",authors:[p.Ven],getShortcuts(){function e(n){let r=new Map;return function(...i){let s=String(i);if(r.has(s))return r.get(s);let l=Er(n(...i)),c=(()=>{switch(l.length){case 0:return null;case 1:return l[0];default:let u=[...new Set(l)];return u.length>1&&console.warn(`Warning: This filter matches ${l.length} modules. Make it more specific! `,u),l[0]}})();return c&&s&&r.set(s,c),c}}let t;return{wp:Vencord.Webpack,wpc:mn.c,wreq:mn,wpsearch:ic,wpex:sc,wpexs:n=>Vencord.Webpack.extract(Vencord.Webpack.findModuleId(n)),find:e(n=>n),findAll:Er,findByProps:e(ce.byProps),findAllByProps:(...n)=>Er(ce.byProps(...n)),findByCode:e(ce.byCode),findAllByCode:n=>Er(ce.byCode(n)),findStore:e(ce.byStoreName),PluginsApi:Vencord.Plugins,plugins:Vencord.Plugins.plugins,React:O,Settings:Vencord.Settings,Api:Vencord.Api,reload:()=>location.reload(),restart:un,canonicalizeMatch:xr,canonicalizeReplace:Ua,canonicalizeReplacement:ls,fakeRender:(n,r)=>{let i=t?.deref(),s=i?.closed===!1?i:window.open("about:blank","Fake Render","popup,width=500,height=500");t=new WeakRef(s),s.focus(),sr.render(O.createElement(n,r),s.document.body)}}},start(){let e=this.getShortcuts();window.shortcutList=e;for(let[t,n]of Object.entries(e))window[t]=n},stop(){delete window.shortcutList;for(let e in this.getShortcuts())delete window[e]}})});var Hv,hp,zv=g(()=>{"use strict";a();Mt();Ht();P();M();I();Hv=(e,{user:t})=>()=>{e.push(o(U.MenuItem,{id:"vc-copy-user-url",label:"Copy User URL",action:()=>Qt.copy(``),icon:Vr}))},hp=y({name:"CopyUserURLs",authors:[p.castdrian],description:"Adds a 'Copy User URL' option to the user context menu.",start(){ue("user-context",Hv)},stop(){fe("user-context",Hv)}})});var Ho,aP,yp,vp,$a,Sp,bp,jv=g(()=>{"use strict";a();ko();$();P();Je();dt();M();yr();j();I();Ho=new ie("CrashHandler"),aP=A("pushLazy","popAll"),yp=D({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}}),vp=0,$a=0,Sp=!1,bp=y({name:"CrashHandler",description:"Utility plugin for handling and possibly recovering from Crashes without a restart",authors:[p.Nuckyz],enabledByDefault:!0,settings:yp,patches:[{find:".Messages.ERRORS_UNEXPECTED_CRASH",replacement:{match:/(?=this\.setState\()/,replace:"$self.handleCrash(this)||"}}],handleCrash(e){if(Date.now()-$a<=1e3&&!Sp)return!0;if(Sp=!1,++vp>5){try{Ne({color:"#eed202",title:"Discord has crashed!",body:"Awn :( Discord has crashed more than five times, not attempting to recover.",noPersist:!0})}catch{}return $a=Date.now(),!1}setTimeout(()=>vp--,6e4);try{return vp===1&&Yi("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),yp.store.attemptToPreventCrashes?(this.handlePreventCrash(e),!0):!1}catch(t){return Ho.error("Failed to handle crash",t),!1}finally{$a=Date.now()}},handlePreventCrash(e){if(Date.now()-$a>=1e3)try{Ne({color:"#eed202",title:"Discord has crashed!",body:"Attempting to recover...",noPersist:!0})}catch{}try{B.dispatch({type:"CONTEXT_MENU_CLOSE"})}catch(t){Ho.debug("Failed to close open context menu.",t)}try{aP?.popAll()}catch(t){Ho.debug("Failed to close old modals.",t)}try{Tc()}catch(t){Ho.debug("Failed to close all open modals.",t)}try{B.dispatch({type:"USER_PROFILE_MODAL_CLOSE"})}catch(t){Ho.debug("Failed to close user popout.",t)}try{B.dispatch({type:"LAYER_POP_ALL"})}catch(t){Ho.debug("Failed to pop all layers.",t)}if(yp.store.attemptToNavigateToHome)try{pr.transitionTo("/channels/@me")}catch(t){Ho.debug("Failed to navigate to home",t)}try{Sp=!0,e.forceUpdate()}catch(t){Ho.debug("Failed to update crash handler component.",t)}}})});function Ga(e){return Boolean(e)}function Tp(e){return e!=null}var Ha=g(()=>{"use strict";a()});async function Wv(e){return/https?:\/\/(cdn|media)\.discordapp\.(com|net)\/attachments\//.test(e)?"mp:"+e.replace(/https?:\/\/(cdn|media)\.discordapp\.(com|net)\//,""):(await ur.fetchAssetIds(wr.store.appID,[e]))[0]}function kt(){za(!0),L.plugins.CustomRPC.enabled&&za()}function Yv(){return wr.store.type!==1}function pP(e){return!Yv()&&!/https?:\/\/(www\.)?(twitch\.tv|youtube\.com)\/\w+/.test(e)?"Streaming link must be a valid URL.":!0}function qv(){return wr.store.timestampMode!==3}function Kv(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 Zv(){let{appID:e,appName:t,details:n,state:r,type:i,streamLink:s,startTime:l,endTime:c,imageBig:u,imageBigTooltip:d,imageSmall:m,imageSmallTooltip:h,buttonOneText:v,buttonOneURL:T,buttonTwoText:w,buttonTwoURL:b}=wr.store;if(!t)return;let x={application_id:e||"0",name:t,state:r,details:n,type:i,flags:1<<0};switch(i===1&&(x.url=s),wr.store.timestampMode){case 1:x.timestamps={start:Math.floor(Date.now()/1e3)};break;case 2:x.timestamps={start:Math.floor(Date.now()/1e3)-new Date().getHours()*3600-new Date().getMinutes()*60-new Date().getSeconds()};break;case 3:(l||c)&&(x.timestamps={},l&&(x.timestamps.start=l),c&&(x.timestamps.end=c));break;case 0:default:break}v&&(x.buttons=[v,w].filter(Ga),x.metadata={button_urls:[T,b].filter(Ga)}),u&&(x.assets={large_image:await Wv(u),large_text:d||void 0}),m&&(x.assets={...x.assets,small_image:await Wv(m),small_text:h||void 0});for(let N in x){if(N==="type")continue;let k=x[N];(!k||k.length===0)&&delete x[N]}return x}async function za(e){let t=await Zv();B.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e?null:t,socketId:"CustomRPC"})}var lP,cP,uP,wr,xp,Xv=g(()=>{"use strict";a();$();mo();P();Ha();Oe();M();j();I();lP=to("onOpenGameProfile"),cP=A("activity","buttonColor"),uP=A("profileColors");wr=D({appID:{type:0,description:"Application ID (required)",onChange:kt,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:kt,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:kt,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:kt,isValid:e=>e&&e.length>128?"State (line 2) must be not longer than 128 characters.":!0},type:{type:4,description:"Activity type",onChange:kt,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:kt,disabled:Yv,isValid:pP},timestampMode:{type:4,description:"Timestamp mode",onChange:kt,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 (only for custom timestamp mode)",onChange:kt,disabled:qv,isValid:e=>e&&e<0?"Start timestamp must be greater than 0.":!0},endTime:{type:1,description:"End timestamp (only for custom timestamp mode)",onChange:kt,disabled:qv,isValid:e=>e&&e<0?"End timestamp must be greater than 0.":!0},imageBig:{type:0,description:"Big image key/link",onChange:kt,isValid:Kv},imageBigTooltip:{type:0,description:"Big image tooltip",onChange:kt,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:kt,isValid:Kv},imageSmallTooltip:{type:0,description:"Small image tooltip",onChange:kt,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:kt,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:kt},buttonTwoText:{type:0,description:"Button 2 text",onChange:kt,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:kt}});xp=y({name:"CustomRPC",description:"Allows you to set a custom rich presence.",authors:[p.captain,p.AutumnVN],start:za,stop:()=>za(!0),settings:wr,settingsAboutComponent:()=>{let e=ot(Zv);return o(f,null,o(S.FormText,null,"Go to ",o(it,{href:"https://discord.com/developers/applications"},"Discord Developer Portal")," to create an application and get the application ID."),o(S.FormText,null,"Upload images in the Rich Presence tab to get the image keys."),o(S.FormText,null,"If you want to use image link, download your image and reupload the image to ",o(it,{href:"https://imgur.com"},"Imgur"),' and get the image link by right-clicking the image and select "Copy image address".'),o(S.FormDivider,null),o("div",{style:{width:"284px"},className:uP.profileColors},e[0]&&o(lP,{activity:e[0],className:cP.activity,channelId:Ae.getChannelId(),guild:we.getGuild(sn.getLastSelectedGuildId()),application:{id:wr.store.appID},user:W.getCurrentUser()})))}})});var Jv=g(()=>{});async function mP(){try{let{embed:e}=this.props;if(!e||e.dearrow||e.provider?.name!=="YouTube"||!e.video?.url)return;let t=dP.exec(e.video.url)?.[1];if(!t)return;let n=await fetch(`https://sponsor.ajay.app/api/branding?videoID=${t}`);if(!n.ok)return;let{titles:r,thumbnails:i}=await n.json(),s=r[0]?.votes>=0,l=i[0]?.votes>=0;if(!s&&!l)return;e.dearrow={enabled:!0},r[0]?.votes>=0&&(e.dearrow.oldTitle=e.rawTitle,e.rawTitle=r[0].title),i[0]?.votes>=0&&i[0].timestamp&&(e.dearrow.oldThumb=e.thumbnail.proxyURL,e.thumbnail.proxyURL=`https://dearrow-thumb.ajay.app/api/v1/getThumbnail?videoID=${t}&time=${i[0].timestamp}`),this.forceUpdate()}catch(e){new ie("Dearrow").error("Failed to dearrow embed",e)}}function fP({component:e}){let{embed:t}=e.props;return t?.dearrow?o(V,{text:t.dearrow.enabled?"This embed has been dearrowed, click to restore":"Click to dearrow"},({onMouseEnter:n,onMouseLeave:r})=>o("button",{onMouseEnter:n,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()}},o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24px",height:"24px",viewBox:"0 0 36 36","aria-label":"Toggle Dearrow"},o("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"}),o("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"}),o("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 dP,wp,Qv=g(()=>{"use strict";a();Jv();le();P();Je();M();I();dP=/https:\/\/www\.youtube\.com\/embed\/([a-zA-Z0-9_-]{11})/;wp=y({name:"Dearrow",description:"Makes YouTube embed titles and thumbnails less sensationalist, powered by Dearrow",authors:[p.Ven],embedDidMount:mP,renderButton(e){return o(_,{noop:!0},o(fP,{component:e}))},patches:[{find:"this.renderInlineMediaEmbed",replacement:[{match:/render\(\)\{let\{embed:/,replace:"componentDidMount=$self.embedDidMount;$&"},{match:/children:\[(?=null!=\i\?\i\.renderSuppressButton)/,replace:"children:[$self.renderButton(this),"}]}]})});var Mp,Vv=g(()=>{"use strict";a();P();M();Mp=y({name:"DisableDMCallIdle",description:"Disables automatically getting kicked from a DM voice call after 3 minutes.",authors:[p.Nuckyz],patches:[{find:".Messages.BOT_CALL_IDLE_DISCONNECT",replacement:{match:/(?<=function \i\(\){)(?=.{1,120}\.Messages\.BOT_CALL_IDLE_DISCONNECT)/,replace:"return;"}}]})});function Pp(e){return e.t==="Emoji"?`${location.protocol}//${window.GLOBAL_ENV.CDN_HOST}/emojis/${e.id}.${e.isAnimated?"gif":"png"}`:`${location.origin}/stickers/${e.id}.${yP[e.format_type]}`}async function n1(e){let t=gP.getStickerById(e);if(t)return t;let{body:n}=await wt.get({url:`/stickers/${e}`});return B.dispatch({type:"STICKER_FETCH_SUCCESS",sticker:n}),n}async function vP(e,t){let n=new FormData;n.append("name",t.name),n.append("tags",t.tags),n.append("description",t.description),n.append("file",await o1(Pp(t)));let{body:r}=await wt.post({url:`/guilds/${e}/stickers`,body:n});B.dispatch({type:"GUILD_STICKERS_CREATE_SUCCESS",guildId:e,sticker:{...r,user:W.getCurrentUser()}})}async function SP(e,t){let n=await o1(Pp(t)),r=await new Promise(i=>{let s=new FileReader;s.onload=()=>i(s.result),s.readAsDataURL(n)});return hP.uploadEmoji({guildId:e,name:t.name.split("~")[0],image:r})}function bP(e){let t=W.getCurrentUser().id;return Object.values(we.getGuilds()).filter(n=>{if(!(n.ownerId===t||(Re.getGuildPermissions({id:n.id})&Te.CREATE_GUILD_EXPRESSIONS)===Te.CREATE_GUILD_EXPRESSIONS))return!1;if(e.t==="Sticker")return!0;let{isAnimated:i}=e,s=n.getMaxEmojiSlots(),{emojis:l}=kn.getGuilds()[n.id],c=0;for(let u of l)u.animated===i&&c++;return cn.name.localeCompare(r.name))}async function o1(e){let t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch ${e} - ${t.status}`);return t.blob()}async function TP(e,t){try{t.t==="Sticker"?await vP(e,t):await SP(e,t),ee.show({message:`Successfully cloned ${t.name} to ${we.getGuild(e)?.name??"your server"}!`,type:ee.Type.SUCCESS,id:ee.genId()})}catch(n){let r="Something went wrong (check console!)";try{r=JSON.parse(n.text).message}catch{}new ie("EmoteCloner").error("Failed to clone",t.name,"to",e,n),ee.show({message:"Failed to clone: "+r,type:ee.Type.FAILURE,id:ee.genId()})}}function MP({data:e}){let[t,n]=O.useState(!1),[r,i]=O.useState(e.name),[s,l]=O.useReducer(u=>u+1,0),c=O.useMemo(()=>bP(e),[e.id,s]);return o(f,null,o(S.FormTitle,{className:Y.top20},"Custom Name"),o(Fa,{value:r,onChange:u=>{e.name=u,i(u)},validate:u=>e.t==="Emoji"&&u.length>2&&u.length<32&&wP.test(u)||e.t==="Sticker"&&u.length>2&&u.length<30||"Name must be between 2 and 32 characters and only contain alphanumeric characters"}),o("div",{style:{display:"flex",flexWrap:"wrap",gap:"1em",padding:"1em 0.5em",justifyContent:"center",alignItems:"center"}},c.map(u=>o(V,{text:u.name},({onMouseLeave:d,onMouseEnter:m})=>o("div",{onMouseLeave:d,onMouseEnter:m,role:"button","aria-label":"Clone to "+u.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()=>{n(!0),TP(u.id,e).finally(()=>{l(),n(!1)})}},u.icon?o("img",{"aria-hidden":!0,style:{borderRadius:"50%",width:"100%",height:"100%"},src:u.getIconURL(512,!0),alt:u.name}):o(S.FormText,{style:{fontSize:xP(u.acronym),width:"100%",overflow:"hidden",whiteSpace:"nowrap",textAlign:"center",cursor:t?"not-allowed":"pointer"}},u.acronym))))))}function ja(e,t){return o(U.MenuItem,{id:"emote-cloner",key:"emote-cloner",label:`Clone ${e}`,action:()=>Bi(async()=>{let n=await t(),r={t:e,...n},i=Pp(r);return s=>o(qe,{...s},o(at,null,o("img",{role:"presentation","aria-hidden":!0,src:i,alt:"",height:24,width:24,style:{marginRight:"0.5em"}}),o(S.FormText,null,"Clone ",r.name)),o(tt,null,o(MP,{data:r})))})})}function r1(e){return new URL(e).pathname.endsWith(".gif")}var gP,hP,yP,xP,wP,e1,t1,Ip,i1=g(()=>{"use strict";a();Mt();$u();P();Je();ct();dt();M();j();I();gP=Ie("StickersStore"),hP=A("fetchEmoji","uploadEmoji","deleteEmoji"),yP=[,"png","png","json","gif"];xP=e=>[20,20,18,18,16,14,12][e.length]??4,wP=/^\w+$/i;e1=(e,t)=>()=>{let{favoriteableId:n,itemHref:r,itemSrc:i,favoriteableType:s}=t??{};if(!n)return;let l=(()=>{switch(s){case"emoji":let c=t.message.content.match(RegExp(`|https://cdn\\.discordapp\\.com/emojis/${n}\\.`));if(!c)return;let u=c[1]??"FakeNitroEmoji";return ja("Emoji",()=>({id:n,name:u,isAnimated:r1(r??i)}));case"sticker":return t.message.stickerItems.find(m=>m.id===n)?.format_type===3?void 0:ja("Sticker",()=>n1(n))}})();l&&mt("copy-link",e)?.push(l)},t1=(e,t)=>()=>{let{id:n,name:r,type:i}=t?.target?.dataset??{};if(!!n)if(i==="emoji"&&r){let s=t.target.firstChild;e.push(ja("Emoji",()=>({id:n,name:r,isAnimated:s&&r1(s.src)})))}else i==="sticker"&&!t.target.className?.includes("lottieCanvas")&&e.push(ja("Sticker",()=>n1(n)))},Ip=y({name:"EmoteCloner",description:"Allows you to clone Emotes & Stickers to your own server (right click them)",tags:["StickerCloner"],authors:[p.Ven,p.Nuckyz],start(){ue("message",e1),ue("expression-picker",t1)},stop(){fe("message",e1),fe("expression-picker",t1)}})});var Ap,Np,Cp,s1=g(()=>{"use strict";a();$();le();jr();P();ct();M();j();I();Ap=A("key","removeBuildOverride"),Np=D({enableIsStaff:{description:"Enable isStaff",type:3,default:!1,restartNeeded:!0}}),Cp=y({name:"Experiments",description:"Enable Access to Experiments in Discord!",authors:[p.Megu,p.Ven,p.Nickyux,p.BanTheNons,p.Nuckyz],settings:Np,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:".isStaff=()",predicate:()=>Np.store.enableIsStaff,replacement:[{match:/=>*?(\i)\.hasFlag\((\i\.\i)\.STAFF\)}/,replace:(e,t,n)=>`=>Vencord.Webpack.Common.UserStore.getCurrentUser()?.id===${t}.id||${t}.hasFlag(${n}.STAFF)}`},{match:/hasFreePremium\(\){return this.isStaff\(\)\s*?\|\|/,replace:"hasFreePremium(){return "}]},{find:'("showNewSearch")',predicate:()=>Np.store.enableIsStaff,replacement:{match:/(?<=showNewSearch"\);return)\s?/,replace:"!1&&"}},{find:'H1,title:"Experiments"',replacement:{match:'title:"Experiments",children:[',replace:"$&$self.WarningCard(),"}}],settingsAboutComponent:()=>{let e=navigator.platform.includes("Mac"),t=e?"cmd":"ctrl",n=e?"opt":"alt";return o(O.Fragment,null,o(S.FormTitle,{tag:"h3"},"More Information"),o(S.FormText,{variant:"text-md/normal"},"You can enable client DevTools"," ",o("kbd",{className:Ap.key},t)," +"," ",o("kbd",{className:Ap.key},n)," +"," ",o("kbd",{className:Ap.key},"O")," ","after enabling ",o("code",null,"isStaff")," below"),o(S.FormText,null,"and then toggling ",o("code",null,"Enable DevTools")," in the ",o("code",null,"Developer Options")," tab in settings."))},WarningCard:_.wrap(()=>o(Sn,{id:"vc-experiments-warning-card",className:Y.bottom16},o(S.FormTitle,{tag:"h2"},"Hold on!!"),o(S.FormText,null,"Experiments are unreleased Discord features. They might not work, or even break your client or get your account disabled."),o(S.FormText,{className:Y.top8},"Only use experiments if you know what you're doing. Vencord is not responsible for any damage caused by enabling experiments.")),{noop:!0})})});var kp,a1=g(()=>{"use strict";a();P();M();kp=y({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 l1=g(()=>{"use strict";a()});var u1=rr((r8,c1)=>{"use strict";a();var fo=c1.exports;(function e(t,n,r){function i(c,u){if(!n[c]){if(!t[c]){var d=typeof Rr=="function"&&Rr;if(!u&&d)return d(c,!0);if(s)return s(c,!0);throw new Error("Cannot find module '"+c+"'")}var m=n[c]={exports:{}};t[c][0].call(m.exports,function(h){var v=t[c][1][h];return i(v||h)},m,m.exports,e,t,n,r)}return n[c].exports}for(var s=typeof Rr=="function"&&Rr,l=0;l"u"&&r!==void 0&&{}.toString.call(r)==="[object process]",N=typeof Uint8ClampedArray<"u"&&typeof importScripts<"u"&&typeof MessageChannel<"u";function k(){var C=setTimeout;return function(){return C(G,1)}}var F=new Array(1e3);function G(){for(var C=0;Ci+r.playTime;)i+=r.playTime;i+=w.delay}else u=!(c=!1)}}},{}],4:[function(e,t,n){"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(c,u,d){for(var m=-1,h=u=u||0,v=u+(d=d||c.length-u);h>>8^r[255&(m^c[h])];return-1^m}},{}],5:[function(e,t,n){(function(r){"use strict";var i=e("./support-test"),s=e("./parser"),l=e("./loader"),c=r.APNG={};c.checkNativeFeatures=i.checkNativeFeatures,c.ifNeeded=i.ifNeeded,c.parseBuffer=function(d){return s(d)};var u={};c.parseURL=function(d){return d in u||(u[d]=l(d).then(s)),u[d]},c.animateContext=function(d,m){return c.parseURL(d).then(function(h){return h.addContext(m),h.play(),h})},c.animateImage=function(d){return d.setAttribute("data-is-apng","progress"),c.parseURL(d.src).then(function(m){d.setAttribute("data-is-apng","yes");var h=document.createElement("canvas");h.width=m.width,h.height=m.height,Array.prototype.slice.call(d.attributes).forEach(function(N){["alt","src","usemap","ismap","data-is-apng","width","height"].indexOf(N.nodeName)==-1&&h.setAttributeNode(N.cloneNode(!1))}),h.setAttribute("data-apng-src",d.src),d.alt!=""&&h.appendChild(document.createTextNode(d.alt));var v="",T="",w=0,b="";d.style.width!=""&&d.style.width!="auto"?v=d.style.width:d.hasAttribute("width")&&(v=d.getAttribute("width")+"px"),d.style.height!=""&&d.style.height!="auto"?T=d.style.height:d.hasAttribute("height")&&(T=d.getAttribute("height")+"px"),v!=""&&T==""&&(w=parseFloat(v),b=v.match(/\D+$/)[0],T=Math.round(h.height*w/h.width)+b),T!=""&&v==""&&(w=parseFloat(T),b=T.match(/\D+$/)[0],v=Math.round(h.width*w/h.height)+b),h.style.width=v,h.style.height=T;var x=d.parentNode;x.insertBefore(h,d),x.removeChild(d),m.addContext(h.getContext("2d")),m.play()},function(){d.setAttribute("data-is-apng","no")})},c.releaseCanvas=function(d){var m=d.getContext("2d");"_apng_animation"in m&&m._apng_animation.removeContext(m)}}).call(this,typeof fo<"u"?fo:typeof window<"u"?window:{})},{"./loader":6,"./parser":7,"./support-test":8}],6:[function(e,t,n){"use strict";var r=r||e("es6-promise").Promise;t.exports=function(i){return new r(function(s,l){var c=new XMLHttpRequest;c.open("GET",i),c.responseType="arraybuffer",c.onload=function(){this.status==200?s(this.response):l(this)},c.send()})}},{"es6-promise":1}],7:[function(e,t,n){"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(b){var x=new Uint8Array(b);return new r(function(N,k){for(var F=0;F>>0;for(var k=1;k<4;k++)N+=b[k+x]<<8*(3-k);return N},d=function(b,x){for(var N=0,k=0;k<2;k++)N+=b[k+x]<<8*(1-k);return N},m=function(b,x){return b[x]},h=function(b,x,N){var k=new Uint8Array(N);return k.set(b.subarray(x,x+N)),k},v=function(b,x,N){var k=Array.prototype.slice.call(b.subarray(x,x+N));return String.fromCharCode.apply(String,k)},T=function(b){return[b>>>24&255,b>>>16&255,b>>>8&255,255&b]},w=function(b,x){var N=b.length+x.length,k=new Uint8Array(new ArrayBuffer(N+8));k.set(T(x.length),0),k.set(function(G){for(var K=[],q=0;q{"use strict";a();Zt();l1();p1=Ao(()=>u1().APNG),PP="https://unpkg.com/@sapphi-red/web-noise-suppressor@0.3.3/dist",u8=`${PP}/rnnoise/workletProcessor.js`,d1="https://unpkg.com/@vap/shiki-worker@0.0.8/dist/index.min.js",m1="https://unpkg.com/@vap/shiki@0.10.3/dist/onig.wasm",f1=Ao(()=>import("https://unpkg.com/stegcloak-dist@1.0.0/index.js"))});var Op=rr(Dp=>{a();var v1=Object.defineProperty,IP=e=>v1(e,"__esModule",{value:!0}),AP=(e,t)=>{for(var n in t)v1(e,n,{get:t[n],enumerable:!0})};IP(Dp);AP(Dp,{GIFEncoder:()=>P1,applyPalette:()=>_P,default:()=>qP,nearestColor:()=>$P,nearestColorIndex:()=>w1,nearestColorIndexWithDistance:()=>M1,prequantize:()=>OP,quantize:()=>EP,snapColorsToPalette:()=>UP});var NP={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 S1(e=256){let t=0,n=new Uint8Array(e);return{get buffer(){return n.buffer},reset(){t=0},bytesView(){return n.subarray(0,t)},bytes(){return n.slice(0,t)},writeByte(i){r(t+1),n[t]=i,t++},writeBytes(i,s=0,l=i.length){r(t+l);for(let c=0;c=i)return;var l=1024*1024;i=Math.max(i,s*(s>>0),s!=0&&(i=Math.max(i,256));let c=n;n=new Uint8Array(i),t>0&&n.set(c.subarray(0,t),0)}}var Rp=12,g1=5003,CP=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function kP(e,t,n,r,i=S1(512),s=new Uint8Array(256),l=new Int32Array(g1),c=new Int32Array(g1)){let u=l.length,d=Math.max(2,r);s.fill(0),c.fill(0),l.fill(-1);let m=0,h=0,v=d+1,T=v,w=!1,b=T,x=(1<=0;)if(ae-=Ce,ae<0&&(ae+=u),l[ae]===xe){K=c[ae];break e}R(K),K=ne,F<1<0?m|=X<=8;)s[G++]=m&255,G>=254&&(i.writeByte(G),i.writeBytesView(s,0,G),G=0),m>>=8,h-=8;if((F>x||w)&&(w?(b=T,x=(1<0;)s[G++]=m&255,G>=254&&(i.writeByte(G),i.writeBytesView(s,0,G),G=0),m>>=8,h-=8;G>0&&(i.writeByte(G),i.writeBytesView(s,0,G),G=0)}}}var RP=kP;function b1(e,t,n){return e<<8&63488|t<<2&992|n>>3}function T1(e,t,n,r){return e>>4|t&240|(n&240)<<4|(r&240)<<8}function x1(e,t,n){return e>>4<<8|t&240|n>>4}function qa(e,t,n){return en?n:e}function us(e){return e*e}function h1(e,t,n){var r=0,i=1e100;let s=e[t],l=s.cnt,c=s.ac,u=s.rc,d=s.gc,m=s.bc;for(var h=s.fw;h!=0;h=e[h].fw){let T=e[h],w=T.cnt,b=l*w/(l+w);if(!(b>=i)){var v=0;n&&(v+=b*us(T.ac-c),v>=i)||(v+=b*us(T.rc-u),!(v>=i)&&(v+=b*us(T.gc-d),!(v>=i)&&(v+=b*us(T.bc-m),!(v>=i)&&(i=v,r=h))))}}s.err=i,s.nn=r}function Lp(){return{ac:0,rc:0,gc:0,bc:0,cnt:0,nn:0,fw:0,bk:0,tm:0,mtm:0,err:0}}function LP(e,t){let n=t==="rgb444"?4096:65536,r=new Array(n),i=e.length;if(t==="rgba4444")for(let s=0;s>24&255,u=l>>16&255,d=l>>8&255,m=l&255,h=T1(m,d,u,c),v=h in r?r[h]:r[h]=Lp();v.rc+=m,v.gc+=d,v.bc+=u,v.ac+=c,v.cnt++}else if(t==="rgb444")for(let s=0;s>16&255,u=l>>8&255,d=l&255,m=x1(d,u,c),h=m in r?r[m]:r[m]=Lp();h.rc+=d,h.gc+=u,h.bc+=c,h.cnt++}else for(let s=0;s>16&255,u=l>>8&255,d=l&255,m=b1(d,u,c),h=m in r?r[m]:r[m]=Lp();h.rc+=d,h.gc+=u,h.bc+=c,h.cnt++}return r}function EP(e,t,n={}){let{format:r="rgb565",clearAlpha:i=!0,clearAlphaColor:s=0,clearAlphaThreshold:l=0,oneBitAlpha:c=!1}=n;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 u=new Uint32Array(e.buffer),d=n.useSqrt!==!1,m=r==="rgba4444",h=LP(u,r),v=h.length,T=v-1,w=new Uint32Array(v+1);for(var b=0,N=0;N1&&(G=F>>1,!(h[k=w[G]].err<=K));F=G)w[F]=k;w[F]=N}var q=b-t;for(N=0;N=z.mtm&&h[z.nn].mtm<=z.tm)break;z.mtm==T?R=w[1]=w[w[0]--]:(h1(h,R,!1),z.tm=N);var K=h[R].err;for(F=1;(G=F+F)<=w[0]&&(Gh[w[G+1]].err&&G++,!(K<=h[k=w[G]].err));F=G)w[F]=k;w[F]=R}var X=h[z.nn],ne=z.cnt,xe=X.cnt,x=1/(ne+xe);m&&(z.ac=x*(ne*z.ac+xe*X.ac)),z.rc=x*(ne*z.rc+xe*X.rc),z.gc=x*(ne*z.gc+xe*X.gc),z.bc=x*(ne*z.bc+xe*X.bc),z.cnt+=X.cnt,z.mtm=++N,h[X.bk].fw=X.fw,h[X.fw].bk=X.bk,X.mtm=T}let ae=[];var Ce=0;for(N=0;;++Ce){let ge=qa(Math.round(h[N].rc),0,255),Se=qa(Math.round(h[N].gc),0,255),Me=qa(Math.round(h[N].bc),0,255),Pe=255;m&&(Pe=qa(Math.round(h[N].ac),0,255),c&&(Pe=Pe<=(typeof c=="number"?c:127)?0:255),i&&Pe<=l&&(ge=Se=Me=s,Pe=0));let be=m?[ge,Se,Me,Pe]:[ge,Se,Me];if(DP(ae,be)||ae.push(be),(N=h[N].fw)==0)break}return ae}function DP(e,t){for(let n=0;n=4&&t.length>=4?r[3]===t[3]:!0;if(i&&s)return!0}return!1}function Ya(e,t){var n=0,r;for(r=0;r1?Math.round(e/t)*t:e}function OP(e,{roundRGB:t=5,roundAlpha:n=10,oneBitAlpha:r=null}={}){let i=new Uint32Array(e.buffer);for(let s=0;s>24&255,u=l>>16&255,d=l>>8&255,m=l&255;c=Ka(c,n),r&&(c=c<=(typeof r=="number"?r:127)?0:255),m=Ka(m,t),d=Ka(d,t),u=Ka(u,t),i[s]=c<<24|u<<16|d<<8|m<<0}}function _P(e,t,n="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=n==="rgb444"?4096:65536,l=new Uint8Array(i),c=new Array(s),u=n==="rgba4444";if(n==="rgba4444")for(let d=0;d>24&255,v=m>>16&255,T=m>>8&255,w=m&255,b=T1(w,T,v,h),x=b in c?c[b]:c[b]=BP(w,T,v,h,t);l[d]=x}else{let d=n==="rgb444"?x1:b1;for(let m=0;m>16&255,T=h>>8&255,w=h&255,b=d(w,T,v),x=b in c?c[b]:c[b]=FP(w,T,v,t);l[m]=x}}return l}function BP(e,t,n,r,i){let s=0,l=1e100;for(let c=0;cl)continue;let h=u[0];if(m+=Mr(h-e),m>l)continue;let v=u[1];if(m+=Mr(v-t),m>l)continue;let T=u[2];m+=Mr(T-n),!(m>l)&&(l=m,s=c)}return s}function FP(e,t,n,r){let i=0,s=1e100;for(let l=0;ls)continue;let m=c[1];if(d+=Mr(m-t),d>s)continue;let h=c[2];d+=Mr(h-n),!(d>s)&&(s=d,i=l)}return i}function UP(e,t,n=5){if(!e.length||!t.length)return;let r=e.map(l=>l.slice(0,3)),i=n*n,s=e[0].length;for(let l=0;ls?c=c.slice(0,3):c=c.slice();let u=M1(r,c.slice(0,3),Ya),d=u[0],m=u[1];m>0&&m<=i&&(e[d]=c)}}function Mr(e){return e*e}function w1(e,t,n=Ya){let r=1/0,i=-1;for(let s=0;s=0&&zP(r,k)}let q=Math.round(x/10);GP(r,G,q,w,b);let z=Boolean(N)&&!K;jP(r,h,v,z?N:null),z&&y1(r,N),WP(r,m,h,v,F,s,l,c)}};function d(){I1(r,"GIF89a")}}function GP(e,t,n,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 c=0;e.writeByte(0|l|c|s),zo(e,n),e.writeByte(i||0),e.writeByte(0)}function HP(e,t,n,r,i=8){let c=Ep(r.length)-1,u=1<<7|i-1<<4|0<<3|c,d=0,m=0;zo(e,t),zo(e,n),e.writeBytes([u,d,m])}function zP(e,t){e.writeByte(33),e.writeByte(255),e.writeByte(11),I1(e,"NETSCAPE2.0"),e.writeByte(3),e.writeByte(1),zo(e,t),e.writeByte(0)}function y1(e,t){let n=1<>8&255)}function I1(e,t){for(var n=0;ni.localName===e);return n?Object.values(n).find(i=>typeof i=="function")?.():void 0}var ai,KP,Pr,ps,A1,ds,jo,Za,YP,ZP,_p,Bp,Xa,Ye,Fp,C1=g(()=>{"use strict";a();Xn();$();P();Wa();It();Zt();Je();M();j();I();ai=zs(Op()),KP=0,Pr=Ie("StickersStore"),ps=Ie("UserSettingsProtoStore"),A1=A("BINARY_READ_OPTIONS");ds=Qe(()=>Ci.PreloadedUserSettingsActionCreators),jo=Qe(()=>N1("appearance",ds.ProtoClass)),Za=Qe(()=>N1("clientThemeSettings",jo)),YP=1n<<18n,ZP=1n<<37n,_p=/\/emojis\/(\d+?)\.(png|webp|gif)/,Bp=/\/stickers\/(\d+?)\./,Xa=/\/attachments\/\d+?\/\d+?\/(\d+?)\.gif/,Ye=D({enableEmojiBypass:{description:"Allow sending fake 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:"Allow sending fake 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}}),Fp=y({name:"FakeNitro",authors:[p.Arjix,p.D3SOX,p.Ven,p.obscurity,p.captain,p.Nuckyz,p.AutumnVN],description:"Allows you to stream in nitro quality, send fake emojis/stickers and use client themes.",dependencies:["MessageEventsAPI"],settings:Ye,patches:[{find:".PREMIUM_LOCKED;",predicate:()=>Ye.store.enableEmojiBypass,replacement:[{match:/(?<=,intention:(\i).+?;)/,replace:(e,t)=>`let fakeNitroIntention=${t};`},{match:/\.(?:canUseEmojisEverywhere|canUseAnimatedEmojis)\(\i(?=\))/g,replace:'$&,typeof fakeNitroIntention!=="undefined"?fakeNitroIntention:void 0'},{match:/(&&!\i&&)!(\i)(?=\)return \i\.\i\.DISALLOW_EXTERNAL;)/,replace:(e,t,n)=>`${t}(!${n}&&(typeof fakeNitroIntention==="undefined"||![${3},${4}].includes(fakeNitroIntention)))`},{match:/if\(!\i\.available/,replace:e=>`${e}&&(typeof fakeNitroIntention==="undefined"||![${3},${4}].includes(fakeNitroIntention))`}]},{find:"canUseAnimatedEmojis:function",predicate:()=>Ye.store.enableEmojiBypass,replacement:{match:/((?:canUseEmojisEverywhere|canUseAnimatedEmojis):function\(\i)\){(.+?\))(?=})/g,replace:(e,t,n)=>`${t},fakeNitroIntention){${n}||fakeNitroIntention==null||[${3},${4}].includes(fakeNitroIntention)`}},{find:"canUseCustomStickersEverywhere:function",predicate:()=>Ye.store.enableStickerBypass,replacement:{match:/canUseCustomStickersEverywhere:function\(\i\){/,replace:"$&return true;"}},{find:'"SENDABLE"',predicate:()=>Ye.store.enableStickerBypass,replacement:{match:/(\w+)\.available\?/,replace:"true?"}},{find:"canUseHighVideoUploadQuality:function",predicate:()=>Ye.store.enableStreamQualityBypass,replacement:["canUseHighVideoUploadQuality","canStreamQuality"].map(e=>({match:new RegExp(`${e}:function\\(\\i(?:,\\i)?\\){`,"g"),replace:"$&return true;"}))},{find:"STREAM_FPS_OPTION.format",predicate:()=>Ye.store.enableStreamQualityBypass,replacement:{match:/guildPremiumTier:\i\.\i\.TIER_\d,?/g,replace:""}},{find:"canUseClientThemes:function",replacement:{match:/canUseClientThemes:function\(\i\){/,replace:"$&return true;"}},{find:'.displayName="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,n,r,i)=>`${t}$self.handleGradientThemeSelect(${n},${i},()=>${r});`}},{find:'["strong","em","u","text","inlineCode","s","spoiler"]',replacement:[{predicate:()=>Ye.store.transformEmojis,match:/1!==(\i)\.length\|\|1!==\i\.length/,replace:(e,t)=>`${e}||$self.shouldKeepEmojiLink(${t}[0])`},{predicate:()=>Ye.store.transformEmojis||Ye.store.transformStickers,match:/(?=return{hasSpoilerEmbeds:\i,content:(\i)})/,replace:(e,t)=>`${t}=$self.patchFakeNitroEmojisOrRemoveStickersLinks(${t},arguments[2]?.formatInline);`}]},{find:"renderEmbeds(",replacement:[{predicate:()=>Ye.store.transformEmojis||Ye.store.transformStickers,match:/(renderEmbeds\((\i)\){)(.+?embeds\.map\((\i)=>{)/,replace:(e,t,n,r,i)=>`${t}const fakeNitroMessage=${n};${r}if($self.shouldIgnoreEmbed(${i},fakeNitroMessage))return null;`},{predicate:()=>Ye.store.transformStickers,match:/(?<=renderStickersAccessories\((\i)\){let (\i)=\(0,\i\.\i\)\(\i\).+?;)/,replace:(e,t,n)=>`${n}=$self.patchFakeNitroStickers(${n},${t});`},{predicate:()=>Ye.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:()=>Ye.store.transformStickers,replacement:[{match:/let{renderableSticker:(\i).{0,250}isGuildSticker.+?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,n,r,i)=>`${t}let{fakeNitroRenderableSticker}=${n};${r}$self.addFakeNotice(${0},${i},!!fakeNitroRenderableSticker?.fake)`}]},{find:".EMOJI_UPSELL_POPOUT_MORE_EMOJIS_OPENED,",predicate:()=>Ye.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:()=>Ye.store.transformEmojis,replacement:{match:/(?<=isDiscoverable:\i,emojiComesFromCurrentGuild:\i,.+?}=(\i).+?;)(.+?return )(.{0,1000}\.Messages\.EMOJI_POPOUT_UNJOINED_DISCOVERABLE_GUILD_DESCRIPTION.+?)(?=},)/,replace:(e,t,n,r)=>`let{fakeNitroNode}=${t};${n}$self.addFakeNotice(${1},${r},!!fakeNitroNode?.fake)`}},{find:"canUsePremiumAppIcons:function",replacement:{match:/canUsePremiumAppIcons:function\(\i\){/,replace:"$&return true;"}},{find:'location:"AppIconHome"',replacement:{match:/\i\.\i\.isPremium\(\i\.\i\.getCurrentUser\(\)\)/,replace:"true"}}],get guildId(){return Pu()?.id},get canUseEmotes(){return(W.getCurrentUser().premiumType??0)>0},get canUseStickers(){return(W.getCurrentUser().premiumType??0)>1},handleProtoChange(e,t){if(e==null||typeof e=="string"||!ps||!ds||!jo||!Za)return;if((t?.premium_type??W?.getCurrentUser()?.premiumType??0)!==2){if(e.appearance??=jo.create(),ps.settings.appearance?.theme!=null){let r=jo.create({theme:ps.settings.appearance.theme});e.appearance.theme=r.theme}if(ps.settings.appearance?.clientThemeSettings?.backgroundGradientPresetId?.value!=null){let r=Za.create({backgroundGradientPresetId:{value:ps.settings.appearance.clientThemeSettings.backgroundGradientPresetId.value}});e.appearance.clientThemeSettings??=r,e.appearance.clientThemeSettings.backgroundGradientPresetId=r.backgroundGradientPresetId}}},handleGradientThemeSelect(e,t,n){if((W?.getCurrentUser()?.premiumType??0)===2||e==null)return n();if(!ds||!jo||!Za||!A1)return;let i=ds.getCurrentValue().appearance,s=i!=null?jo.fromBinary(jo.toBinary(i),A1.BINARY_READ_OPTIONS):jo.create();s.theme=t;let l=Za.create({backgroundGradientPresetId:{value:e}});s.clientThemeSettings??=l,s.clientThemeSettings.backgroundGradientPresetId=l.backgroundGradientPresetId;let c=ds.ProtoClass.create();c.appearance=s,B.dispatch({type:"USER_SETTINGS_PROTO_UPDATE",local:!0,partial:!0,settings:{type:1,proto:c}})},trimContent(e){let t=e[0];typeof t=="string"&&(e[0]=t.trimStart()),e[0]===""&&e.shift();let n=e.length-1,r=e[n];typeof r=="string"&&(e[n]=r.trimEnd()),e[n]===""&&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")&&!Ye.store.transformCompoundSentence)return e;let n=e.length,r=c=>{if(Ye.store.transformEmojis){let u=c.props.href.match(_p);if(u){let d=null;try{d=new URL(c.props.href)}catch{}let m=kn.getCustomEmojiById(u[1])?.name??d?.searchParams.get("name")??"FakeNitroEmoji";return $e.defaultRules.customEmoji.react({jumboable:!t&&e.length===1&&typeof e[0].type!="string",animated:u[2]==="gif",emojiId:u[1],name:m,fake:!0},void 0,{key:String(n++)})}}if(Ye.store.transformStickers){if(Bp.test(c.props.href))return null;let u=c.props.href.match(Xa);if(u&&Pr.getStickerById(u[1]))return null}return c},i=c=>c?.props?.trusted!=null?r(c):c?.props?.children!=null?Array.isArray(c.props.children)?(c.props.children=l(c.props.children),c.props.children.length===0?null:c):(c.props.children=s(c.props.children),c):c,s=c=>{let u=i(c);if(u?.type==="ul"||u?.type==="ol"){if(this.ensureChildrenIsArray(u),u.props.children.length===0)return null;let d=!1;for(let[m,h]of u.props.children.entries()){if(h==null){delete u.props.children[m];continue}this.ensureChildrenIsArray(h),h.props.children.length>0?d=!0:delete u.props.children[m]}if(!d)return null;u.props.children=this.clearEmptyArrayItems(u.props.children)}return u},l=c=>{for(let[u,d]of c.entries())c[u]=s(d);return c=this.clearEmptyArrayItems(c),this.trimContent(c),c};try{return l(cr.cloneDeep(e))}catch(c){return new ie("FakeNitro").error(c),e}},patchFakeNitroStickers(e,t){let n=[],r=t.content.split(/\s/);Ye.store.transformCompoundSentence?n.push(...r):r.length===1&&n.push(r[0]),n.push(...t.attachments.filter(i=>i.content_type==="image/gif").map(i=>i.url));for(let i of n){if(!Ye.store.transformCompoundSentence&&!i.startsWith("http"))continue;let s=i.match(Bp);if(s){let c=null;try{c=new URL(i)}catch{}let u=Pr.getStickerById(s[1])?.name??c?.searchParams.get("name")??"FakeNitroSticker";e.push({format_type:1,id:s[1],name:u,fake:!0});continue}let l=i.match(Xa);if(l){if(!Pr.getStickerById(l[1]))continue;let c=Pr.getStickerById(l[1])?.name??"FakeNitroSticker";e.push({format_type:2,id:l[1],name:c,fake:!0})}}return e},shouldIgnoreEmbed(e,t){let n=t.content.split(/\s/);if(n.length>1&&!Ye.store.transformCompoundSentence)return!1;switch(e.type){case"image":{if(!Ye.store.transformCompoundSentence&&!n.includes(e.url)&&!n.includes(e.image?.proxyURL))return!1;if(Ye.store.transformEmojis&&_p.test(e.url))return!0;if(Ye.store.transformStickers){if(Bp.test(e.url))return!0;let r=e.url.match(Xa);if(r&&Pr.getStickerById(r[1]))return!0}break}}return!1},filterAttachments(e){return e.filter(t=>{if(t.content_type!=="image/gif")return!0;let n=t.url.match(Xa);return!(n&&Pr.getStickerById(n[1]))})},shouldKeepEmojiLink(e){return e.target&&_p.test(e.target)},addFakeNotice(e,t,n){if(!n)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}},hasPermissionToUseExternalEmojis(e){let t=Q.getChannel(e);return!t||t.isDM()||t.isGroupDM()||t.isMultiUserDM()?!0:Re.can(YP,t)},hasPermissionToUseExternalStickers(e){let t=Q.getChannel(e);return!t||t.isDM()||t.isGroupDM()||t.isMultiUserDM()?!0:Re.can(ZP,t)},getStickerLink(e){return`https://media.discordapp.net/stickers/${e}.png?size=${L.plugins.FakeNitro.stickerSize}`},async sendAnimatedSticker(e,t,n){let{parseURL:r}=p1(),{frames:i,width:s,height:l}=await r(e),c=(0,ai.GIFEncoder)(),u=L.plugins.FakeNitro.stickerSize,d=document.createElement("canvas");d.width=u,d.height=u;let m=d.getContext("2d",{willReadFrequently:!0}),h=u/Math.max(s,l);m.scale(h,h);let v;for(let w of i){let{left:b,top:x,width:N,height:k,img:F,delay:G,blendOp:K,disposeOp:q}=w;v=m.getImageData(b,x,N,k),K===0&&m.clearRect(b,x,N,k),m.drawImage(F,b,x,N,k);let{data:z}=m.getImageData(0,0,u,u),R=(0,ai.quantize)(z,256),X=(0,ai.applyPalette)(z,R);c.writeFrame(X,u,u,{transparent:!0,palette:R,delay:G}),q===1?m.clearRect(b,x,N,k):q===2&&m.putImageData(v,b,x)}c.finish();let T=new File([c.bytesView()],`${t}.gif`,{type:"image/gif"});Li.promptToUpload([T],Q.getChannel(n),KP)},start(){let e=Ye.store;if(!e.enableEmojiBypass&&!e.enableStickerBypass)return;function t(n,r){return!n[r]||/\s/.test(n[r])?"":" "}this.preSend=jt((n,r,i)=>{let{guildId:s}=this;e:{if(!e.enableStickerBypass)break e;let l=Pr.getStickerById(i.stickers?.[0]);if(!l||"pack_id"in l)break e;let c=this.canUseStickers&&this.hasPermissionToUseExternalStickers(n);if(l.available!==!1&&(c||l.guild_id===s))break e;let u=this.getStickerLink(l.id);if(l.format_type===2)return this.sendAnimatedSticker(u,l.id,n),{cancel:!0};i.stickers.length=0,r.content+=` ${u}&name=${encodeURIComponent(l.name)}`}if(e.enableEmojiBypass){let l=this.canUseEmotes&&this.hasPermissionToUseExternalEmojis(n);for(let c of r.validNonShortcutEmojis){if(!c.require_colons||c.available!==!1&&l||c.guildId===s&&!c.animated)continue;let u=`<${c.animated?"a":""}:${c.originalName||c.name}:${c.id}>`,d=c.url.replace(/\?size=\d+/,"?"+new URLSearchParams({size:L.plugins.FakeNitro.emojiSize,name:encodeURIComponent(c.name)}));r.content=r.content.replace(u,(m,h,v)=>`${t(v,h-1)}${d}${t(v,h+m.length)}`)}}return{cancel:!1}}),this.preEdit=br((n,r,i)=>{if(!e.enableEmojiBypass)return;let s=this.canUseEmotes&&this.hasPermissionToUseExternalEmojis(n),{guildId:l}=this;i.content=i.content.replace(/(?/ig,(c,u,d,m)=>{let h=kn.getCustomEmojiById(u);if(h==null||!h.require_colons||h.available!==!1&&s||h.guildId===l&&!h.animated)return c;let v=h.url.replace(/\?size=\d+/,"?"+new URLSearchParams({size:L.plugins.FakeNitro.emojiSize,name:encodeURIComponent(h.name)}));return`${t(m,d-1)}${v}${t(m,d+c.length)}`})})},stop(){Wt(this.preSend),Tr(this.preEdit)}})});function k1(...e){let t={};function n(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](n(l[0]),...l)};return new Proxy(t,r)}var R1,L1=g(()=>{"use strict";a();R1=k1;typeof module<"u"&&(module.exports=k1)});function XP(e,t){let n=`[#${e.toString(16).padStart(6,"0")},#${t.toString(16).padStart(6,"0")}]`,r="",i=Array.from(n).map(s=>s.codePointAt(0)).filter(s=>s>=32&&s<=127).map(s=>String.fromCodePoint(s+917504)).join("");return(r||"")+" "+i}function JP(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 n=[...t[0]].map(i=>String.fromCodePoint(i.codePointAt(0)-917504)).join("");return n.substring(1,n.length-1).split(",").map(i=>parseInt(i.replace("#","0x"),16))}else return null}var E1,Up,D1=g(()=>{"use strict";a();$();le();P();ct();Be();M();I();L1();E1=D({nitroFirst:{description:"Default color source if both are present",type:4,options:[{label:"Nitro colors",value:!0,default:!0},{label:"Fake colors",value:!1}]}}),Up=y({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_PROFILE_THEME_ACCENT",replacement:{match:/RESET_PROFILE_THEME}\)(?<=color:(\i),.{0,500}?color:(\i),.{0,500}?)/,replace:"$&,$self.addCopy3y3Button({primary:$1,accent:$2})"}}],settingsAboutComponent:()=>o(S.FormSection,null,o(S.FormTitle,{tag:"h3"},"Usage"),o(S.FormText,null,"After enabling this plugin, you will see custom colors in the profiles of other people using compatible plugins. ",o("br",null),"To set your own colors:",o("ul",null,o("li",null,"\u2022 go to your profile settings"),o("li",null,"\u2022 choose your own colors in the Nitro preview"),o("li",null,'\u2022 click the "Copy 3y3" button'),o("li",null,"\u2022 paste the invisible text anywhere in your bio")),o("br",null),o("b",null,"Please note:")," if you are using a theme which hides nitro ads, you should disable it temporarily to set colors.")),settings:E1,colorDecodeHook(e){if(e){if(E1.store.nitroFirst&&e.themeColors)return e;let t=JP(e.bio);if(t)return R1(e,{premiumType:2,themeColors:t})}return e},addCopy3y3Button:_.wrap(function({primary:e,accent:t}){return o(E,{onClick:()=>{let n=XP(e,t);vn(n)},color:E.Colors.PRIMARY,size:E.Sizes.XLARGE,className:Y.left16},"Copy 3y3")},{noop:!0})})});var $p,O1=g(()=>{"use strict";a();P();M();I();$p=y({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:"MAX_AUTOCOMPLETE_RESULTS+",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=kn.getDisambiguatedEmojiContext();e.results.emojis=e.results.emojis.sort((n,r)=>{let i=t.isFavoriteEmojiWithoutFetchingLatest(n),s=t.isFavoriteEmojiWithoutFetchingLatest(r);return i&&!s?-1:!i&&s?1:0}).slice(0,e.results.emojis.sliceTo??10)}})});function VP({instance:e,SearchBarComponent:t}){let[n,r]=J(""),i=Jt(null),s=ta(l=>{r(l);let{props:c}=e;if(l===""){c.favorites=c.favCopy,e.forceUpdate();return}i.current?.containerRef?.current.closest("#gif-picker-tab-panel")?.querySelector('[class|="content"]')?.firstElementChild?.scrollTo(0,0);let u=c.favCopy.map(d=>({score:eI(l.toLowerCase(),B1(d.url??d.src).replace(/(%20|[_-])/g," ").toLowerCase()),gif:d})).filter(d=>d.score!=null);u.sort((d,m)=>m.score-d.score),c.favorites=u.map(d=>d.gif),e.forceUpdate()},[e.state]);return _e(()=>()=>{e.dead=!0},[]),o(t,{ref:i,autoFocus:!0,className:QP.searchBar,size:t.Sizes.MEDIUM,onChange:s,onClear:()=>{r(""),e.props.favCopy!=null&&(e.props.favorites=e.props.favCopy,e.forceUpdate())},query:n,placeholder:"Search Favorite Gifs"})}function B1(e){let t=new URL(e);switch(_1.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 eI(e,t){let n=0,r=0;for(let i=0;i{"use strict";a();$();le();P();M();j();I();QP=A("searchBar","searchBarFullRow"),_1=D({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}]}}),Gp=y({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\)\((?\i\..{1,10}),)/,replace:"$1 this.state.resultType === 'Favorites' ? $self.renderSearchBar(this, $) : $2;$3"},{match:/(,suggestions:\i,favorites:)(\i),/,replace:"$1$self.getFav($2),favCopy:$2,"}]}],settings:_1,getTargetString:B1,instance:null,renderSearchBar(e,t){return this.instance=e,o(_,{noop:!0},o(VP,{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 Hp,U1=g(()=>{"use strict";a();$();Ra();P();M();Hp=y({name:"FixSpotifyEmbeds",description:"Fixes spotify embeds being incredibly loud by letting you customise the volume",authors:[p.Ven],settings:D({volume:{type:5,description:"The volume % to set for spotify embeds. Anything above 10% is veeeery loud",markers:Go(0,100,10),stickToMarkers:!1,default:10}})})});var zp,$1=g(()=>{"use strict";a();P();M();I();zp=y({name:"ForceOwnerCrown",description:"Force the owner crown next to usernames even if the server is large.",authors:[p.D3SOX,p.Nickyux],patches:[{find:"AVATAR_DECORATION_PADDING:",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,n=e.user.id;return we.getGuild(t)?.ownerId===n}})});var Ja,tI,jp,G1=g(()=>{"use strict";a();tn();P();M();j();I();Ja=A("createFriendInvite"),tI=A("v4","v1"),jp=y({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,options:[{name:"Uses",description:"How many uses?",choices:[{label:"1",name:"1",value:"1"},{label:"5",name:"5",value:"5"}],required:!1,type:4}],execute:async(e,t)=>{let n=rt(e,"Uses",5);if(n===1&&!W.getCurrentUser().phone)return pe(t.channel.id,{content:"You need to have a phone number connected to your account to create a friend invite with 1 use!"});let r;if(n===1){let i=tI.v4(),{body:{invite_suggestions:s}}=await wt.post({url:"/friend-finder/find-friends",body:{modified_contacts:{[i]:[1,"",""]},phone_contact_methods_count:1}});r=await Ja.createFriendInvite({code:s[0][3],recipient_phone_number_or_email:i,contact_visibility:1,filter_visibilities:[],filtered_invite_suggestions_index:1})}else r=await Ja.createFriendInvite();pe(t.channel.id,{content:` discord.gg/${r.code} \xB7 Expires: \xB7 Max uses: \`${r.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 Ja.getAllFriendInvites()).map(i=>` _discord.gg/${i.code}_ \xB7 Expires: \xB7 Times used: \`${i.uses}/${i.max_uses}\` `.trim().replace(/\s+/g," "));pe(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 Ja.revokeFriendInvites(),pe(t.channel.id,{content:"All friend invites have been revoked."})}}]})});var Wp,H1=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/gameActivityToggle/style.css",{name:"src/plugins/gameActivityToggle/style.css",source:`[class*="withTagAsButton"] { min-width: 88px !important; } `,classNames:{},dom:null});Wp="src/plugins/gameActivityToggle/style.css"});function oI(e){return function(){return o("svg",{width:"20",height:"20",viewBox:"0 0 24 24"},o("path",{fill:"currentColor",mask:"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&&o(f,null,o("mask",{id:"gameActivityMask"},o("rect",{fill:"white",x:"0",y:"0",width:"24",height:"24"}),o("path",{fill:"black",d:"M23.27 4.54 19.46.73 .73 19.46 4.54 23.27 23.27 4.54Z"})),o("path",{fill:"var(--status-danger)",d:"M23 2.27 21.73 1 1 21.73 2.27 23 23 2.27Z"})))}}function rI(){let e=Ur.ShowCurrentGame.useSetting();return o(nI,{tooltipText:e?"Disable Game Activity":"Enable Game Activity",icon:oI(e),role:"switch","aria-checked":!e,onClick:()=>Ur.ShowCurrentGame.updateSetting(t=>!t)})}var nI,qp,z1=g(()=>{"use strict";a();Ve();le();P();M();j();I();H1();nI=to("Button.Sizes.NONE,disabled:");qp=y({name:"GameActivityToggle",description:"Adds a button next to the mic and deafen button to toggle game activity.",authors:[p.Nuckyz,p.RuukuLada],patches:[{find:".Messages.ACCOUNT_SPEAKING_WHILE_MUTED",replacement:{match:/this\.renderNameZone\(\).+?children:\[/,replace:"$&$self.GameActivityToggleButton(),"}}],GameActivityToggleButton:_.wrap(rI,{noop:!0}),start(){St(Wp)},stop(){$t(Wp)}})});var iI,Kp,j1=g(()=>{"use strict";a();P();It();M();j();iI=fn('name:"expression-picker-last-active-view"',{close:ce.byCode("activeView:null","setState")}),Kp=y({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&&(uo(e.url+" "),iI.close())}})});function q1(e,t,n){let r=Yp.getSendMessageOptionsForReply({channel:e,message:t,shouldMention:!0,showMentionToggle:!0});if(Qa.store.greetMode==="Message"||n.length>1){r.stickerIds=n;let i={content:"",tts:!1,invalidEmojis:[],validNonShortcutEmojis:[]};Yp._sendMessage(e.id,i,r)}else Yp.sendGreetMessage(e.id,n[0],r)}function sI({channel:e,message:t}){let n=Qa.use(["greetMode","multiGreetChoices"]),{greetMode:r,multiGreetChoices:i=[]}=n;return o(U.Menu,{navId:"greet-sticker-picker",onClose:()=>B.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Greet Sticker Picker"},o(U.MenuGroup,{label:"Greet Mode"},Object.values(K1).map(s=>o(U.MenuRadioItem,{key:s,group:"greet-mode",id:"greet-mode-"+s,label:s,checked:s===r,action:()=>n.greetMode=s}))),o(U.MenuSeparator,null),o(U.MenuGroup,{label:"Greet Stickers"},W1.map(s=>o(U.MenuItem,{key:s.id,id:"greet-"+s.id,label:s.description.split(" ")[0],action:()=>q1(e,t,[s.id])}))),Qa.store.unholyMultiGreetEnabled?o(f,null,o(U.MenuSeparator,null),o(U.MenuItem,{label:"Unholy Multi-Greet",id:"unholy-multi-greet"},W1.map(s=>{let l=i.some(c=>c===s.id);return o(U.MenuCheckboxItem,{key:s.id,id:"multi-greet-"+s.id,label:s.description.split(" ")[0],checked:l,disabled:!l&&i.length>=3,action:()=>{n.multiGreetChoices=l?i.filter(c=>c!==s.id):[...i,s.id]}})}),o(U.MenuSeparator,null),o(U.MenuItem,{id:"multi-greet-submit",label:"Send Greets",action:()=>q1(e,t,i),disabled:i.length===0}))):null)}var K1,Qa,Yp,W1,Zp,Y1=g(()=>{"use strict";a();$();P();Zt();M();j();I();K1=(n=>(n.Greet="Greet",n.NormalMessage="Message",n))(K1||{}),Qa=D({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(),Yp=A("sendGreetMessage"),W1=Qe(()=>yt("WELCOME_STICKERS")?.WELCOME_STICKERS);Zp=y({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:Qa,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||gn.open(e,()=>o(sI,{...t}))}})});var Xp={};Ue(Xp,{_buildPopoverElements:()=>lI,addButton:()=>Un,buttons:()=>Va,removeButton:()=>$n});function Un(e,t){Va.set(e,t)}function $n(e){Va.delete(e)}function lI(e,t){let n=[];for(let[r,i]of Va.entries())try{let s=i(e);s&&(s.key??=r,n.push(t(s)))}catch(s){aI.error(`[${r}]`,s)}return n}var aI,Va,Ir=g(()=>{"use strict";a();Je();aI=new ie("MessagePopover"),Va=new Map});var ms,X1,fs,Z1,cI,Jp,J1=g(()=>{"use strict";a();Kn();Ir();Ht();P();M();I();X1="HideAttachments_HiddenIds",fs=new Set,Z1=()=>Pt(X1).then(e=>(fs=e??new Set,fs)),cI=e=>Vt(X1,e),Jp=y({name:"HideAttachments",description:"Hide attachments and Embeds for individual messages via hover button",authors:[p.Ven],dependencies:["MessagePopoverAPI"],async start(){ms=document.createElement("style"),ms.id="VencordHideAttachments",document.head.appendChild(ms),await Z1(),await this.buildCss(),Un("HideAttachments",e=>{if(!e.attachments.length&&!e.embeds.length&&!e.stickerItems.length)return null;let t=fs.has(e.id);return{label:t?"Show Attachments":"Hide Attachments",icon:t?Na:Ca,message:e,channel:Q.getChannel(e.channel_id),onClick:()=>this.toggleHide(e.id)}})},stop(){ms.remove(),fs.clear(),$n("HideAttachments")},async buildCss(){let e=[...fs].map(t=>`#message-accessories-${t}`).join(",");ms.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 Z1();t.delete(e)||t.add(e),await cI(t),await this.buildCss()}})});var Qp,Q1=g(()=>{"use strict";a();P();M();Qp=y({name:"iLoveSpam",description:"Do not hide messages from 'likely spammers'",authors:[p.botato,p.Animal],patches:[{find:"hasFlag:{writable",replacement:{match:/if\((\i)<=(?:1<<30|1073741824)\)return/,replace:"if($1===(1<<20))return false;$&"}}]})});function tS(e,t,n,r){let i=qn();return o(V,{text:t},s=>o("button",{...s,onClick:l=>dI(l,e,i),style:{all:"unset",cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"center"}},o("svg",{width:"24",height:"24",viewBox:"0 -960 960 960"},o("path",{fill:r,d:n}))))}function eS(e,t=!1){return go().some(n=>n.id===e.id)?pI(e,"var(--status-danger)"):uI(e,t?"var(--green-300)":"var(--primary-400)")}function dI(e,t,n){e.stopPropagation();let r=go().findIndex(i=>i.id===t.id);r===-1?gs.store.ignoredActivities=go().concat(t):gs.store.ignoredActivities=go().filter((i,s)=>s!==r),Ur.ShowCurrentGame.updateSetting(i=>i),n()}function go(){return gs.store.ignoredActivities??=[]}var V1,uI,pI,gs,Vp,nS=g(()=>{"use strict";a();Kn();$();le();P();Oe();M();j();I();V1=Ie("RunningGameStore");uI=(e,t)=>tS(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),pI=(e,t)=>tS(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);gs=D({}).withPrivateSettings();Vp=y({name:"IgnoreActivities",authors:[p.Nuckyz],description:"Ignore activities from showing up on your status ONLY. You can configure which ones are ignored from the Registered Games and Activities tabs.",settings:gs,patches:[{find:'.displayName="LocalActivityStore"',replacement:[{match:/LISTENING.+?}\),(?<=(\i)\.push.+?)/,replace:(e,t)=>`${e}${t}=${t}.filter($self.isActivityNotIgnored),`}]},{find:".Messages.SETTINGS_GAMES_TOGGLE_OVERLAY",replacement:{match:/\.Messages\.SETTINGS_GAMES_TOGGLE_OVERLAY.+?}\(\),(?<={overlay:\i,.+?=(\i),.+?)(?=!(\i))/,replace:(e,t,n)=>`${e}$self.renderToggleGameActivityButton(${t},${n}),`}},{find:".activityTitleText,variant",replacement:{match:/(?<=\i\.activityTitleText.+?children:(\i)\.name.*?}\),)/,replace:(e,t)=>`$self.renderToggleActivityButton(${t}),`}},{find:".activityCardDetails,children",replacement:{match:/(?<=\i\.activityCardDetails.+?children:(\i\.application)\.name.*?}\),)/,replace:(e,t)=>`$self.renderToggleActivityButton(${t}),`}}],async start(){let e=await Pt("IgnoreActivities_ignoredActivities");if(e!=null&&(gs.store.ignoredActivities=Array.from(e.values()).map(t=>({...t,name:"Unknown Name"})),Fc("IgnoreActivities_ignoredActivities")),go().length!==0){let t=V1.getGamesSeen();for(let[n,r]of go().entries())r.type===0&&(t.some(i=>i.id===r.id||i.exePath===r.id)||go().splice(n,1))}},isActivityNotIgnored(e){if(e.type===0||e.type===3){if(e.application_id!=null)return!go().some(t=>t.id===e.application_id);{let t=V1.getRunningGames().find(n=>n.name===e.name)?.exePath;if(t)return!go().some(n=>n.id===t)}}return!0},renderToggleGameActivityButton(e,t){return o(_,{noop:!0},o("div",{style:{marginLeft:12,zIndex:0}},eS({id:e.id??e.exePath,name:e.name,type:0},t)))},renderToggleActivityButton(e){return o(_,{noop:!0},eS({id:e.id,name:e.name,type:1}))}})});var hs,ed=g(()=>{"use strict";a();hs="vc-imgzoom-magnify-modal"});function td(e,t){e()?t():requestAnimationFrame(()=>td(e,t))}var oS=g(()=>{"use strict";a()});var mI,nd,rS=g(()=>{"use strict";a();Ve();I();ed();od();oS();mI=Ge("vc-imgzoom-"),nd=({instance:e,size:t,zoom:n})=>{let[r,i]=J(!1),[s,l]=J({x:0,y:0}),[c,u]=J({x:0,y:0}),[d,m]=J(0),h=Jt(!1),v=Jt(n),T=Jt(t),w=Jt(null),b=Jt(null),x=Jt(null),N=Jt(null);if(O.useLayoutEffect(()=>{let F=ne=>{ne.key==="Shift"&&(h.current=!0)},G=ne=>{ne.key==="Shift"&&(h.current=!1)},K=()=>{b.current.currentTime=x.current.currentTime},q=ne=>{if(e.state.mouseOver&&e.state.mouseDown){let xe=T.current/2,ae={x:ne.pageX,y:ne.pageY},Ce=-((ae.x-w.current.getBoundingClientRect().left)*v.current-xe),ge=-((ae.y-w.current.getBoundingClientRect().top)*v.current-xe);l({x:ne.x-xe,y:ne.y-xe}),u({x:Ce,y:ge}),m(1)}else m(0)},z=ne=>{e.state.mouseOver&&ne.button===0&&(v.current=Fe.store.zoom,T.current=Fe.store.size,document.getElementById("image-context")&&B.dispatch({type:"CONTEXT_MENU_CLOSE"}),q(ne),m(1))},R=()=>{m(0),Fe.store.saveZoomValues&&(Fe.store.zoom=v.current,Fe.store.size=T.current)},X=async ne=>{if(e.state.mouseOver&&e.state.mouseDown&&!h.current){let xe=v.current+ne.deltaY/100*(Fe.store.invertScroll?-1:1)*Fe.store.zoomSpeed;v.current=xe<=1?1:xe,q(ne)}if(e.state.mouseOver&&e.state.mouseDown&&h.current){let xe=T.current+ne.deltaY*(Fe.store.invertScroll?-1:1)*Fe.store.zoomSpeed;T.current=xe<=50?50:xe,q(ne)}};return td(()=>e.state.readyState==="READY",()=>{let ne=document.getElementById(hs);w.current=ne,ne.firstElementChild.setAttribute("draggable","false"),e.props.animated&&(x.current=ne.querySelector("video"),x.current.addEventListener("timeupdate",K)),i(!0)}),document.addEventListener("keydown",F),document.addEventListener("keyup",G),document.addEventListener("mousemove",q),document.addEventListener("mousedown",z),document.addEventListener("mouseup",R),document.addEventListener("wheel",X),()=>{document.removeEventListener("keydown",F),document.removeEventListener("keyup",G),document.removeEventListener("mousemove",q),document.removeEventListener("mousedown",z),document.removeEventListener("mouseup",R),document.removeEventListener("wheel",X),Fe.store.saveZoomValues&&(Fe.store.zoom=v.current,Fe.store.size=T.current)}},[]),!r)return null;let k=w.current.getBoundingClientRect();return o("div",{className:mI("lens",{"nearest-neighbor":Fe.store.nearestNeighbour,square:Fe.store.square}),style:{opacity:d,width:T.current+"px",height:T.current+"px",transform:`translate(${s.x}px, ${s.y}px)`}},e.props.animated?o("video",{ref:b,style:{position:"absolute",left:`${c.x}px`,top:`${c.y}px`},width:`${k.width*v.current}px`,height:`${k.height*v.current}px`,poster:e.props.src,src:x.current?.src??e.props.src,autoPlay:!0,loop:!0}):o("img",{ref:N,style:{position:"absolute",transform:`translate(${c.x}px, ${c.y}px)`},width:`${k.width*v.current}px`,height:`${k.height*v.current}px`,src:e.props.src,alt:""}))}});var rd,iS=g(()=>{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; } .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});rd="src/plugins/imageZoom/styles.css"});var Fe,sS,id,od=g(()=>{"use strict";a();Mt();$();Ve();Ra();P();Wr();M();I();rS();ed();iS();Fe=D({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:Go(1,50,4),default:2,stickToMarkers:!1},size:{description:"Radius / Size of the lens",type:5,markers:Go(50,1e3,50),default:100,stickToMarkers:!1},zoomSpeed:{description:"How fast the zoom / lens size changes",type:5,markers:Go(.1,5,.2),default:.5,stickToMarkers:!1}}),sS=e=>()=>{e.push(o(U.MenuGroup,{id:"image-zoom"},o(U.MenuCheckboxItem,{id:"vc-square",label:"Square Lens",checked:Fe.store.square,action:()=>{Fe.store.square=!Fe.store.square,gn.close()}}),o(U.MenuCheckboxItem,{id:"vc-nearest-neighbour",label:"Nearest Neighbour",checked:Fe.store.nearestNeighbour,action:()=>{Fe.store.nearestNeighbour=!Fe.store.nearestNeighbour,gn.close()}}),o(U.MenuControlItem,{id:"vc-zoom",label:"Zoom",control:(t,n)=>o(U.MenuSliderControl,{ref:n,...t,minValue:1,maxValue:50,value:Fe.store.zoom,onChange:bn(r=>Fe.store.zoom=r,100)})}),o(U.MenuControlItem,{id:"vc-size",label:"Lens Size",control:(t,n)=>o(U.MenuSliderControl,{ref:n,...t,minValue:50,maxValue:1e3,value:Fe.store.size,onChange:bn(r=>Fe.store.size=r,100)})}),o(U.MenuControlItem,{id:"vc-zoom-speed",label:"Zoom Speed",control:(t,n)=>o(U.MenuSliderControl,{ref:n,...t,minValue:.1,maxValue:5,value:Fe.store.zoomSpeed,onChange:bn(r=>Fe.store.zoomSpeed=r,100),renderValue:r=>`${r.toFixed(3)}x`})})))},id=y({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: '${hs}',`}},{find:"handleImageLoad=",replacement:[{match:/showThumbhashPlaceholder:\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:Fe,currentMagnifierElement:null,element:null,Magnifier:nd,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===hs&&(this.currentMagnifierElement||(this.currentMagnifierElement=o(nd,{size:Fe.store.size,zoom:Fe.store.zoom,instance:e}),this.root=sr.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(n=>({...n,mouseDown:!0}))},onMouseUp(e){e.setState(t=>({...t,mouseDown:!1}))},start(){St(rd),ue("image-context",sS),this.element=document.createElement("div"),this.element.classList.add("MagnifierContainer"),document.body.appendChild(this.element)},stop(){$t(rd),this.root&&this.root.unmount(),this.element?.remove(),fe("image-context",sS)}})});function fI(e){let t=e?.message?.content,[n,r]=O.useState("password");return o(qe,{...e},o(at,null,o(S.FormTitle,{tag:"h4"},"Decrypt Message")),o(tt,null,o(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Message with Encryption"),o(et,{defaultValue:t,disabled:!0}),o(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Password"),o(et,{style:{marginBottom:"20px"},onChange:r})),o(Ft,null,o(E,{color:E.Colors.GREEN,onClick:()=>{let i=sd(t,n,!0);!i||!e?.message||(Vencord.Plugins.plugins.InvisibleChat.buildEmbed(e?.message,i),e.onClose())}},"Decrypt"),o(E,{color:E.Colors.TRANSPARENT,look:E.Looks.LINK,style:{left:15,position:"absolute"},onClick:e.onClose},"Cancel")))}function aS(e){Ke(t=>o(fI,{...t,...e}))}var lS=g(()=>{"use strict";a();dt();I();el()});function gI(e){let[t,n]=O.useState(""),[r,i]=O.useState(""),[s,l]=O.useState("password"),[c,u]=O.useState(!1),d=t&&(c||r&&r.trim().split(" ").length>1);return o(qe,{...e},o(at,null,o(S.FormTitle,{tag:"h4"},"Encrypt Message")),o(tt,null,o(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Secret"),o(et,{onChange:m=>{n(m)}}),o(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Cover (2 or more Words!!)"),o(et,{disabled:c,onChange:m=>{i(m)}}),o(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Password"),o(et,{style:{marginBottom:"20px"},defaultValue:"password",onChange:m=>{l(m)}}),o(pt,{value:c,onChange:m=>{u(m)}},"Don't use a Cover")),o(Ft,null,o(E,{color:E.Colors.GREEN,disabled:!d,onClick:()=>{if(!d)return;let m=pS(t,s,c?"d d":r),h=c?m.replaceAll("d",""):m;!h||(uo(h),e.onClose())}},"Send"),o(E,{color:E.Colors.TRANSPARENT,look:E.Looks.LINK,style:{left:15,position:"absolute"},onClick:()=>{e.onClose()}},"Cancel")))}function cS(){Ke(e=>o(gI,{...e}))}var uS=g(()=>{"use strict";a();It();dt();I();el()});function hI(){return o("svg",{fill:"var(--header-secondary)",width:24,height:24,viewBox:"0 0 64 64"},o("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 yI(){return o(V,{text:"This message has a hidden message! (InvisibleChat)"},({onMouseEnter:e,onMouseLeave:t})=>o("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 vI(e){return e.type.analyticsName!=="normal"?null:o(V,{text:"Encrypt Message"},({onMouseEnter:t,onMouseLeave:n})=>o("div",{style:{display:"flex"}},o(E,{"aria-haspopup":"dialog","aria-label":"Encrypt Message",size:"",look:Xt.BLANK,onMouseEnter:t,onMouseLeave:n,innerClassName:vt.button,onClick:()=>cS(),style:{padding:"0 2px",scale:"0.9"}},o("div",{className:vt.buttonWrapper},o("svg",{"aria-hidden":!0,role:"img",width:"32",height:"32",viewBox:"0 0 64 64",style:{scale:"1.1"}},o("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"}))))))}function pS(e,t,n){return ad.hide(e+"\u200B",t,n)}function sd(e,t,n){let r=ad.reveal(e,t);return n?r.replace("\u200B",""):r}function SI(e){return e.endsWith("\u200B")}async function bI(e){let t=dS.store.savedPasswords.split(",").map(r=>r.trim());if(!e?.content||!t?.length)return!1;let{content:n}=e;/^\W/.test(e.content)&&(n=`d ${e.content}d`);for(let r=0;r{"use strict";a();Ir();$();le();P();Wa();M();I();lS();uS();dS=D({savedPasswords:{type:0,default:"password, Password",description:"Saved Passwords (Seperated with a , )"}}),ld=y({name:"InvisibleChat",description:"Encrypt your Messages in a non-suspicious way!",authors:[p.SammCheese],dependencies:["MessagePopoverAPI"],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 {};$&"}},{find:"ChannelTextAreaButtons",replacement:{match:/(\i)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&,(()=>{try{$2||$1.push($self.chatBarIcon(arguments[0]))}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@:%_+.~#?&//=]*)/),settings:dS,async start(){let{default:e}=await f1();ad=new e(!0,!1),Un("invDecrypt",t=>this.INV_REGEX.test(t?.content)?{label:"Decrypt Message",icon:this.popOverIcon,message:t,channel:Q.getChannel(t.channel_id),onClick:async()=>{await bI(t).then(n=>n?void this.buildEmbed(t,n):void aS({message:t}))}}:null)},stop(){$n("invDecrypt")},async getEmbed(e){let{body:t}=await wt.post({url:"/unfurler/embed-urls",body:{urls:[e]}});return await t.embeds[0]},async buildEmbed(e,t){let n=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!"}}),n?.length){let r=await this.getEmbed(new URL(n[0]));r&&e.embeds.push(r)}this.updateMessage(e)},updateMessage:e=>{B.dispatch({type:"MESSAGE_UPDATE",message:e})},chatBarIcon:_.wrap(vI,{noop:!0}),popOverIcon:()=>o(hI,null),indicator:_.wrap(yI,{noop:!0})})});function mS(e,t){!Q.hasChannel(t)||pr.transitionTo(`/channels/${e??"@me"}/${t}`)}var tl,wn,cd,fS=g(()=>{"use strict";a();Kn();P();M();I();tl=!1;cd=y({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:tl}=e)},CONNECTION_OPEN(){!tl||(tl=!1,wn?.channelId&&mS(wn.guildId,wn.channelId))},async CHANNEL_SELECT({guildId:e,channelId:t}){tl||(wn={guildId:e,channelId:t},await Vt("KeepCurrentChannel_previousData",wn))}},async start(){wn=await Pt("KeepCurrentChannel_previousData"),wn?wn.channelId&&mS(wn.guildId,wn.channelId):(wn={guildId:sn.getGuildId(),channelId:Ae.getChannelId()??null},await Vt("KeepCurrentChannel_previousData",wn))}})});async function ud(e){return(await ur.fetchAssetIds(pd,[e]))[0]}function wI(e){B.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e,socketId:"LastFM"})}var pd,TI,gS,xI,Mn,dd,hS=g(()=>{"use strict";a();$();mo();P();Je();M();j();I();pd="1108588077900898414",TI="2a96cbd8b46e442fc41c2b86b821562f",gS=new ie("LastFMRichPresence"),xI=A("getLocalPresence");Mn=D({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},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"}]},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"}]}}),dd=y({name:"LastFMRichPresence",description:"Little plugin for Last.fm rich presence",authors:[p.dzshn,p.RuiNtD,p.blahajZip,p.archeruwu],settingsAboutComponent:()=>o(f,null,o(S.FormTitle,{tag:"h3"},"How to get an API key"),o(S.FormText,null,"An API key is required to fetch your current track. To get one, you can visit ",o(it,{href:"https://www.last.fm/api/account/create"},"this page")," and fill in the following information: ",o("br",null)," ",o("br",null),"Application name: Discord Rich Presence ",o("br",null),"Application description: (personal use) ",o("br",null)," ",o("br",null),"And copy the API key (not the shared secret!)")),settings:Mn,start(){this.updatePresence(),this.updateInterval=setInterval(()=>{this.updatePresence()},16e3)},stop(){clearInterval(this.updateInterval)},async fetchTrackData(){if(!Mn.store.username||!Mn.store.apiKey)return null;try{let e=new URLSearchParams({method:"user.getrecenttracks",api_key:Mn.store.apiKey,user:Mn.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 n=await t.json();if(n.error)return gS.error("Error from Last.fm API",`${n.error}: ${n.message}`),null;let r=n.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 gS.error("Failed to query Last.fm API",e),null}},async updatePresence(){wI(await this.getActivity())},getLargeImage(e){if(e.imageUrl&&!e.imageUrl.includes(TI))return e.imageUrl;if(Mn.store.missingArt==="placeholder")return"placeholder"},async getActivity(){if(Mn.store.hideWithSpotify){for(let s of xI.getActivities())if(s.type===2&&s.application_id!==pd)return null}let e=await this.fetchTrackData();if(!e)return null;let t=this.getLargeImage(e),n=t?{large_image:await ud(t),large_text:e.album||void 0,small_image:await ud("lastfm-small"),small_text:"Last.fm"}:{large_image:await ud("lastfm-large"),large_text:e.album||void 0},r=[{label:"View Song",url:e.url}];Mn.store.shareUsername&&r.push({label:"Last.fm Profile",url:`https://www.last.fm/user/${Mn.store.username}`});let i=(()=>{switch(Mn.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;default:return Mn.store.statusName}})();return{application_id:pd,name:i,details:e.name,state:e.artist,assets:n,buttons:r.map(s=>s.label),metadata:{button_urls:r.map(s=>s.url)},type:Mn.store.useListeningStatus?2:0,flags:1}}})});var yS,vS,md,SS=g(()=>{"use strict";a();$();P();M();yS=["Eyrokac","Rdcg$l`'k|~n",'H`tf$d&iajo+d`{"',"Sucqplh`(Eclhualva()&","Lncgmka'8KNMDC,shpanf'`x./,","Ioqweijnfn*IeuvfvAotkfxo./,","Hd{#cp\x7Ft$)nbd!{lq%mig~*\x7Fh`v#mk&sm{gx nd#idjb(a\x7Ffao\"bja&amdkge!Rlo\xECkhf)hyedfjjb*'^hzdrdmm$lu'|ao+mnqw$fijxh~bbmg#Tjm\xEEefd+fnp#lpkffz5","h",`sijklm&cam*rot"hjjq'|ak\x7F xmv#wc'ep*mawmvvlrb(|ynr>"Aqq&cgg-\x7F ugoh%rom)e\x7Fhdpp%$`,'Tnfb}"u\'~`nno!kp$vvhfzeyee"a}%Tfam*Xh`fls%Jboldos-"lj`&hn)~ce!`jcbct|)gdbhnf$wikm$zgaxkmc%afely+og"144?\'ign+iu%p$qisiefr gpfa$',"Ndtfv%ahfgk+ghtf$|ir(|z' Oguaw&`ggdj mgw$|ir(me|n","(!\u0363\xB3$\u0359\u0290'\u0369\xB9#","(\uFF88\u25D7\u30ED\u25D1,\uFF8F-2\uFF6C\uFF95\u272C","Ynw#hjil(ze+psgwp|&sgmkr!","Tikmolh`(fl+a!dvjk\x7F'y|e\x7Fe/,-","3/3750?5><9>885:7","mdmt","Wdn`khc+(oxbeof","Ig\"zkp*'g{*xolglj`&~g|*gowg/$mgt(Eclm`.#ticf{l*xed\"wl`&Kangj igbhqn'd`dn `v#lqrw{3%$bhv-h|)kangj_imwhlhb","Tscmw%Tnoa~x",'I\u2018f#npus(ec`e!vl$lhsm{`ncu"ekw&f(defeov-$Rnf|)sdu\u2018pf$wcam{ceg!vl$du\'D`d~x-"jw%oi(okht-"DJP)Kag\x7Fs,!mq$du\'A\u2010|n sg`akrkq)~jkdl#pj&diefbnf"jp)&@F\\*{ltq#Hlhrp\'',"Ynw$v`&cg`dl fml`%rhlhs*","Dnl$p%qhz{s' hv$w%hh|aceg!;#gpvt(fl+cndea`&dg|fon&v#wjjqm(","\uD83D)pft`gs(ec`e!13$qojmz#",`a!njcmr'ide~nu"lb%rheoedldpz$lu'gbkr`,'dn"zkp&kg\x7Fo4',"hnpqkw",'sn"fau\x7F','Sn"tmqnh}}*musvkaw&flf&+ldv$w%lr{}*aulr#vlao|)cetn"jp$',"Dxkmc%ot(hhxomwwai\x7F'{hln",`hd{#}js&(pe~'sg#gprb(3#"`,"hd{b${","<;vqkijbq33271:56<3799?24944:",`Thof$lu'ofdn,!qsefc'az*bnrcma+&Om{o+iu"\`khct$)bnrd"bcdoi&`,"snofplkb{)c\x7F'r\"lod\x7F'|f*aurv#cpno`abchijklmno","Wdn`khc'|f*eghl{%"],vS=D({replaceEvents:{description:"Replace Event Quotes too",type:3,default:!0}}),md=y({name:"LoadingQuotes",description:"Replace Discords loading quotes",authors:[p.Ven,p.KraXen72],settings:vS,patches:[{find:".LOADING_DID_YOU_KNOW}",replacement:[{match:/\._loadingText=function\(\)\{/,replace:"$&return $self.quote;"},{match:/\._eventLoadingText=function\(\)\{/,replace:"$&return $self.quote;",predicate:()=>vS.store.replaceEvents}]}],xor(e){let t="read if cute",n=Array.from(e,(r,i)=>r.charCodeAt(0)^i%t.length);return String.fromCharCode(...n)},get quote(){return this.xor(yS[Math.floor(Math.random()*yS.length)])}})});function PI(){let{id:e,guild_id:t}=We([Ae],()=>ti()),{groups:n}=We([TS],()=>TS.getProps(t,e)),r=We([bS],()=>bS.getMemberCount(t));if(r==null)return null;let i=n.length===1&&n[0].id==="unknown"?0:n.reduce((s,l)=>s+(l.id==="offline"?0:l.count),0);return o(ye,{id:"vc-membercount",style:{marginTop:"1em",paddingInline:"1em",justifyContent:"center",alignContent:"center",gap:0}},o(V,{text:`${nl(i)} online in this channel`,position:"bottom"},s=>o("div",{...s},o("span",{style:{backgroundColor:"var(--green-360)",width:"12px",height:"12px",borderRadius:"50%",display:"inline-block",marginRight:"0.5em"}}),o("span",{style:{color:"var(--green-360)"}},nl(i)))),o(V,{text:`${nl(r)} total server members`,position:"bottom"},s=>o("div",{...s},o("span",{style:{width:"6px",height:"6px",borderRadius:"50%",border:"3px solid var(--primary-400)",display:"inline-block",marginRight:"0.5em",marginLeft:"1em"}}),o("span",{style:{color:"var(--primary-400)"}},nl(r)))))}var bS,TS,MI,nl,fd,xS=g(()=>{"use strict";a();le();Dt();P();It();M();j();I();bS=Ie("GuildMemberCountStore"),TS=Ie("ChannelMemberStore"),MI=new Intl.NumberFormat,nl=e=>MI.format(e);fd=y({name:"MemberCount",description:"Shows the amount of online & total members in the server member list",authors:[p.Ven,p.Commandtechno],patches:[{find:"{isSidebarVisible:",replacement:{match:/(?<=let\{className:(\i),.+?children):\[(\i\.useMemo[^}]+"aria-multiselectable")/,replace:":[$1?.startsWith('members')?$self.render():null,$2"}}],render:_.wrap(PI,{noop:!0})})});var gd,wS,MS,ys,hd,PS=g(()=>{"use strict";a();Xn();$();P();M();j();I();gd=!1,wS=e=>e.key==="Backspace"&&(gd=!0),MS=e=>e.key==="Backspace"&&(gd=!1),ys=D({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}}),hd=y({name:"MessageClickActions",description:"Hold Backspace and click to delete, double click to edit/reply",authors:[p.Ven],dependencies:["MessageEventsAPI"],settings:ys,start(){let e=A("deleteMessage","startEditMessage"),t=A("isEditing","isEditingAny");document.addEventListener("keydown",wS),document.addEventListener("keyup",MS),this.onClick=cp((n,r,i)=>{let s=n.author.id===W.getCurrentUser().id;if(gd)ys.store.enableDeleteOnClick&&(s||Re.can(Te.MANAGE_MESSAGES,r))&&(n.deleted?B.dispatch({type:"MESSAGE_DELETE",channelId:r.id,id:n.id,mlDeleted:!0}):e.deleteMessage(r.id,n.id),i.preventDefault());else{if(i.detail<2||ys.store.requireModifier&&!i.ctrlKey&&!i.shiftKey||r.guild_id&&!Re.can(Te.SEND_MESSAGES,r))return;if(s){if(!ys.store.enableDoubleClickToEdit||t.isEditing(r.id,n.id))return;e.startEditMessage(r.id,n.id,n.content),i.preventDefault()}else{if(!ys.store.enableDoubleClickToReply)return;B.dispatch({type:"CREATE_PENDING_REPLY",channel:r,message:n,shouldMention:!L.plugins.NoReplyMention.enabled,showMentionToggle:r.guild_id!==null})}}})},stop(){up(this.onClick),document.removeEventListener("keydown",wS),document.removeEventListener("keyup",MS)}})});var vd={};Ue(vd,{_modifyAccessories:()=>II,accessories:()=>ol,addAccessory:()=>vs,removeAccessory:()=>yd});function vs(e,t,n){ol.set(e,{callback:t,position:n})}function yd(e){ol.delete(e)}function II(e,t){for(let n of ol.values()){let r=n.callback(t);if(r!=null){if(!Array.isArray(r))r=[r];else if(r.length===0)continue;e.splice(n.position!=null?n.position<0?e.length+n.position:n.position:e.length,0,...r.filter(i=>i!=null))}}return e}var ol,rl=g(()=>{"use strict";a();ol=new Map});async function RI(e,t){let n=li.get(t);if(n)return n.message;li.set(t,{fetched:!1});let i=(await wt.get({url:`/channels/${e}/messages`,query:{limit:1,around:t},retries:2}).catch(()=>null))?.body?.[0];if(!i)return;let s=Cn.getMessages(i.channel_id).receiveMessage(i).get(i.id);return li.set(s.id,{message:s,fetched:!0}),s}function LI(e){let t=[];for(let{content_type:n,height:r,width:i,url:s,proxy_url:l}of e.attachments??[])n?.startsWith("image/")&&t.push({height:r,width:i,url:s,proxyURL:l});for(let{type:n,image:r,thumbnail:i,url:s}of e.embeds??[])n==="image"?t.push({...r??i}):s&&n==="gifv"&&!AS.test(s)&&t.push({height:i.height,width:i.width,url:s});return t}function EI(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 DI(e){return!!(e.components.length||e.attachments.some(t=>!t.content_type?.startsWith("image/"))||e.embeds.some(t=>t.type!=="image"&&(t.type!=="gifv"||AS.test(t.url))))}function OI(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 _I(e,t){return new Proxy(e,{get(n,r){return r==="vencordEmbeddedBy"?t:Reflect.get(...arguments)}})}function BI({message:e}){let t=e.vencordEmbeddedBy??[],n=[],r=null;for(;(r=Sd.exec(e.content))!==null;){let[i,s,l,c]=r;if(t.includes(c))continue;let u=Q.getChannel(l);if(!u||s!=="@me"&&!Re.can(1024n,u))continue;let{listMode:d,idList:m}=il.store,h=[s,l,e.author.id].some(b=>b&&m.includes(b));if(d==="blacklist"&&h||d==="whitelist"&&!h)continue;let v=li.get(c)?.message;if(!v)if(v??=Cn.getMessage(l,c),v)li.set(c,{message:v,fetched:!0});else{let b={...e};delete b.embeds,delete b.interaction,kI.push(()=>RI(l,c).then(x=>x&&B.dispatch({type:"MESSAGE_UPDATE",message:b})));continue}let T={message:_I(v,[...t,e.id]),channel:u,guildID:s},w=il.store.automodEmbeds;n.push(w==="always"||w==="prefer"&&!DI(v)?o(UI,{...T}):o(FI,{...T}))}return n.length?o(f,null,n):null}function FI({message:e,channel:t,guildID:n}){let r=n==="@me",i=!r&&we.getGuild(t.guild_id),s=W.getUser(Q.getChannel(t.id).recipients?.[0]);return o(AI,{embed:{rawDescription:"",color:"var(--background-secondary)",author:{name:o(oe,{variant:"text-xs/medium",tag:"span"},o("span",null,r?"Direct Message - ":i.name+" - "),r?$e.parse(`<@${s.id}>`):$e.parse(`<#${t.id}>`)),iconProxyURL:i?`https://${window.GLOBAL_ENV.CDN_HOST}/icons/${i.id}/${i.icon}.png`:`https://${window.GLOBAL_ENV.CDN_HOST}/avatars/${s.id}/${s.avatar}`}},renderDescription:()=>o("div",{key:e.id,className:re(IS.message,il.store.messageBackgroundColor&&IS.searchResult)},o(CI,{id:`message-link-embeds-${e.id}`,message:e,channel:t,subscribeToComponentDispatch:!1}))})}function UI(e){let{message:t,channel:n,guildID:r}=e,i=lc.MessageDisplayCompact.useSetting(),s=r==="@me",l=LI(t),{parse:c}=$e;return o(NI,{channel:n,childrenAccessories:o(oe,{color:"text-muted",variant:"text-xs/medium",tag:"span"},c(s?`<@${Q.getChannel(n.id).recipients[0]}>`:`<#${n.id}>`),o("span",null,s?" - Direct Message":" - "+we.getGuild(n.guild_id)?.name)),compact:i,content:o(f,null,t.content||t.attachments.length<=l.length?c(t.content):[EI(t.attachments.length,t.embeds.length)],l.map(u=>{let{width:d,height:m}=OI(u.width,u.height);return o("div",null,o("img",{src:u.url,width:d,height:m}))})),hideTimestamp:!1,message:t,_messageEmbed:"automod"})}var li,AI,NI,CI,IS,Sd,AS,kI,il,bd,NS=g(()=>{"use strict";a();rl();$();le();P();Be();qr();Oe();M();j();I();li=new Map,AI=me(()=>Bt(".inlineMediaEmbed")),NI=me(()=>Bt(".withFooter]:","childrenMessageContent:")),CI=me(()=>st(e=>e.type?.toString()?.includes("renderSimpleAccessories)"))),IS=A("message","searchResult"),Sd=/(?o(E,{onClick:()=>li.clear()},"Clear the linked message cache")}});bd=y({name:"MessageLinkEmbeds",description:"Adds a preview to messages that link another message",authors:[p.TheSun,p.Ven,p.RyanCaoDev],dependencies:["MessageAccessoriesAPI"],settings:il,start(){vs("messageLinkEmbed",e=>Sd.test(e.message.content)?(Sd.lastIndex=0,o(_,null,o(BI,{message:e.message}))):null,4)}})});var CS=g(()=>{});var Td,kS=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/messageLogger/deleteStyleOverlay.css",{name:"src/plugins/messageLogger/deleteStyleOverlay.css",source:`.messagelogger-deleted { background-color: rgba(240 71 71 / 15%) !important; } `,classNames:{},dom:null});Td="src/plugins/messageLogger/deleteStyleOverlay.css"});var xd,RS=g(()=>{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: #f04747 !important; } /* Bot "thinking" text highlighting */ .messagelogger-deleted [class*="colorStandard"] { color: #f04747 !important; } /* Embed highlighting */ .messagelogger-deleted article :is(div, span, h1, h2, h3, p) { color: #f04747 !important; } .messagelogger-deleted a { color: #be3535 !important; text-decoration: underline; } `,classNames:{},dom:null});xd="src/plugins/messageLogger/deleteStyleText.css"});function LS(){L.plugins.MessageLogger.deleteStyle==="text"?(St(xd),$t(Td)):($t(xd),St(Td))}var $I,ES,DS,OS,wd,_S=g(()=>{"use strict";a();CS();Mt();$();Ve();le();P();Je();M();j();I();kS();RS();$I=A("edited","communicationDisabled","isSystemMessage");ES="ml-remove-history",DS="ml-toggle-style",OS=(e,t)=>()=>{let{message:n}=t,{deleted:r,editHistory:i,id:s,channel_id:l}=n;if(!r&&!i?.length)return;e:{if(!r)break e;let c=document.getElementById(`chat-messages-${l}-${s}`);if(!c)break e;e.push(o(U.MenuItem,{id:DS,key:DS,label:"Toggle Deleted Highlight",action:()=>c.classList.toggle("messagelogger-deleted")}))}e.push(o(U.MenuItem,{id:ES,key:ES,label:"Remove Message History",color:"danger",action:()=>{r?B.dispatch({type:"MESSAGE_DELETE",channelId:l,id:s,mlDeleted:!0}):n.editHistory=[]}}))},wd=y({name:"MessageLogger",description:"Temporarily logs deleted and edited messages.",authors:[p.rushii,p.Ven,p.AutumnVN],start(){LS(),ue("message",OS)},stop(){fe("message",OS)},renderEdit(e){return o(_,{noop:!0},o("div",{className:"messagelogger-edited"},$e.parse(e.content),o(Hn,{timestamp:e.timestamp,isEdited:!0,isInline:!1},o("span",{className:$I.edited}," ","(",Ct.Messages.MESSAGE_EDITED,")"))))},makeEdit(e,t){return{timestamp:hn?.call(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:()=>LS()},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,n){try{if(e==null||!n&&!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,u=>u.set("deleted",!0).set("attachments",u.attachments.map(d=>(d.deleted=!0,d))))};n?t.ids.forEach(r):r(t.id)}catch(r){new ie("MessageLogger").error("Error during handleDelete",r)}return e},shouldIgnore(e){let{ignoreBots:t,ignoreSelf:n,ignoreUsers:r,ignoreChannels:i,ignoreGuilds:s}=L.plugins.MessageLogger,l=W.getCurrentUser().id;return t&&e.author?.bot||n&&e.author?.id===l||r.includes(e.author?.id)||i.includes(e.channel_id)||i.includes(Q.getChannel(e.channel_id)?.parent_id)||s.includes(Q.getChannel(e.channel_id)?.guild_id)},patches:[{find:'displayName="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)) ? m : $2.message.content !== m.editHistory?.[0]?.content && $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:/interactionData:(\i)\.interactionData/,replace:"interactionData:$1.interactionData,deleted:$1.deleted,editHistory:$1.editHistory,attachments:$1.attachments"},{match:/attachments:(\i)\((\i)\)/,replace:"attachments: $1((() => { 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:".removeAttachmentHoverButton",replacement:[{match:/(className:\i,attachment:\i),/,replace:"$1,attachment: {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 > 0 ? arguments[0].message.editHistory.map(edit => $self.renderEdit(edit)) : null), "}]},{find:'displayName="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 BS(e){ei({name:e.name,description:e.name,inputType:1,execute:async(t,n)=>await sl(e.name)?(L.plugins.MessageTags.clyde&&pe(n.channel.id,{author:Jn,content:`${Wo} The tag **${e.name}** has been sent!`}),{content:e.message.replaceAll("\\n",` `)}):(pe(n.channel.id,{author:Jn,content:`${Wo} The tag **${e.name}** does not exist anymore! Please reload ur Discord to fix :)`}),{content:`/${e.name}`}),[GI]:!0},"CustomTags")}var Wo,ll,GI,Jn,al,sl,HI,zI,Md,FS=g(()=>{"use strict";a();tn();Kn();$();P();M();Wo="<:luna:1035316192220553236>",ll="MessageTags_TAGS",GI=Symbol("MessageTags"),Jn={id:"821472922140803112",bot:!1},al=()=>Pt(ll).then(e=>e??[]),sl=e=>Pt(ll).then(t=>(t??[]).find(n=>n.name===e)??null),HI=async e=>{let t=await al();return t.push(e),Vt(ll,t),t},zI=async e=>{let t=await al();return t=await t.filter(n=>n.name!==e),Vt(ll,t),t};Md=y({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 al())BS(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 n=rt(e[0].options,"tag-name",""),r=rt(e[0].options,"message","");if(await sl(n))return pe(t.channel.id,{author:Jn,content:`${Wo} A Tag with the name **${n}** already exists!`});let i={name:n,enabled:!0,message:r};BS(i),await HI(i),pe(t.channel.id,{author:Jn,content:`${Wo} Successfully created the tag **${n}**!`});break}case"delete":{let n=rt(e[0].options,"tag-name","");if(!await sl(n))return pe(t.channel.id,{author:Jn,content:`${Wo} A Tag with the name **${n}** does not exist!`});ns(n),await zI(n),pe(t.channel.id,{author:Jn,content:`${Wo} Successfully deleted the tag **${n}**!`});break}case"list":{pe(t.channel.id,{author:Jn,embeds:[{title:"All Tags:",description:(await al()).map(n=>`\`${n.name}\`: ${n.message.slice(0,72).replaceAll("\\n"," ")}${n.message.length>72?"...":""}`).join(` `)||`${Wo} Woops! There are no tags yet, use \`/tags create\` to create one!`,color:14122879,type:"rich"}]});break}case"preview":{let n=rt(e[0].options,"tag-name",""),r=await sl(n);if(!r)return pe(t.channel.id,{author:Jn,content:`${Wo} A Tag with the name **${n}** does not exist!`});pe(t.channel.id,{author:Jn,content:r.message.replaceAll("\\n",` `)});break}default:{pe(t.channel.id,{author:Jn,content:"Invalid sub-command"});break}}}}]})});function jI(e){let t="";for(let n=0;n{"use strict";a();tn();P();M();Pd=y({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:[$o],inputType:3,execute:(e,t)=>{let n=rt(e,"message","");pe(t.channel.id,{content:n})}},{name:"lenny",description:"Sends a lenny face",options:[$o],execute:e=>({content:rt(e,"message","")+" ( \u0361\xB0 \u035C\u0296 \u0361\xB0)"})},{name:"mock",description:"mOcK PeOpLe",options:[ts],execute:e=>({content:jI(rt(e,"message",""))})}]})});var Id,$S=g(()=>{"use strict";a();tn();P();M();Id=y({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:[$o],execute:t=>({content:rt(t,"message","")+e.description})}))})});function qI(e){qo.store.tagSettings??=Ad;let[t,n]=J(qo.store.tagSettings),r=i=>{n(i),e.setValue(i)};return o(ye,{flexDirection:"column"},ci.map(i=>o(xt,{style:{padding:"1em 1em 0"}},o(S.FormTitle,{style:{width:"fit-content"}},o(V,{text:i.description},({onMouseEnter:s,onMouseLeave:l})=>o("div",{onMouseEnter:s,onMouseLeave:l},i.displayName," Tag ",o(ho,{type:ho.Types[i.name]})))),o(et,{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:Y.bottom16}),o(pt,{value:t[i.name]?.showInChat??!0,onChange:s=>{t[i.name].showInChat=s,r(t)},hideBorder:!0},"Show in messages"),o(pt,{value:t[i.name]?.showInNotChat??!0,onChange:s=>{t[i.name].showInNotChat=s,r(t)},hideBorder:!0},"Show in member list and profiles"))))}var WI,ho,GS,ci,Ad,qo,Nd,HS=g(()=>{"use strict";a();$();Dt();P();ct();M();j();I();WI=A("computePermissions","canEveryoneRole"),ho=Lt(e=>e.Types?.[0]==="BOT"),GS=(e,t)=>!!e?.webhookId&&t.isNonUserBot(),ci=[{name:"WEBHOOK",displayName:"Webhook",description:"Messages sent by webhooks",condition:GS},{name:"OWNER",displayName:"Owner",description:"Owns the server",condition:(e,t,n)=>we.getGuild(n?.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"]}],Ad=Object.fromEntries(ci.map(({name:e,displayName:t})=>[e,{text:t,showInChat:!0,showInNotChat:!0}]));qo=D({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:qI,description:"fill me"}}),Nd=y({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:qo,patches:[{find:"BotTagTypes:",replacement:{match:/\((\i)=\{\}\)\)\[(\i)\.BOT/,replace:"($1=$self.getTagTypes()))[$2.BOT"}},{find:".DISCORD_SYSTEM_MESSAGE_BOT_TAG_TOOLTIP,",replacement:[{match:/(switch\((\i)\){.+?)case (\i(?:\.\i)?)\.BOT:default:(\i)=(\i\.\i\.Messages)\.BOT_TAG_BOT/,replace:(e,t,n,r,i,s)=>`${t}default:{${i} = $self.getTagText(${r}[${n}], ${s})}`},{match:/(\i)=(\i)===\i(?:\.\i)?\.ORIGINAL_POSTER/,replace:"$1=$self.isOPTag($2)"},{match:/.botText,children:(\i)}\)]/,replace:"$&,'data-tag':$1.toLowerCase()"}]},{find:"renderSystemTag:",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:/(?\i)=\(null==.{0,100}\.BOT;return null!=(?\i)&&\i\.bot/,replace:"$ = $self.getTag({user: $, channel: arguments[0].channel, origType: $.bot ? 0 : null, location: 'not-chat' }); return typeof $ === '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(){if(!qo.store.tagSettings)if(!qo.store.visibility_WEBHOOK)qo.store.tagSettings=Ad;else{let e={...Ad};Object.entries(Vencord.PlainSettings.plugins.MoreUserTags).forEach(([t,n])=>{let[r,i]=t.split("_");if(r==="visibility")switch(n){case"always":break;case"chat":e[i].showInNotChat=!1;break;case"not-chat":e[i].showInChat=!1;break;case"never":e[i].showInChat=!1,e[i].showInNotChat=!1;break}qo.store.tagSettings=e,delete Vencord.Settings.plugins.MoreUserTags[t]})}},getPermissions(e,t){let n=we.getGuild(t?.guild_id);if(!n)return[];let r=WI.computePermissions({user:e,context:n,overwrites:t.permissionOverwrites});return Object.entries(Te).map(([i,s])=>r&s?i:"").filter(Boolean)},getTagTypes(){let e={},t=100;return ci.forEach(({name:n})=>{e[n]=++t,e[t]=n,e[`${n}-BOT`]=++t,e[t]=`${n}-BOT`,e[`${n}-OP`]=++t,e[t]=`${n}-OP`}),e},isOPTag:e=>e===ho.Types.ORIGINAL_POSTER||ci.some(t=>e===ho.Types[`${t.name}-OP`]),getTagText(e,t){if(!e)return t.BOT_TAG_BOT;let[n,r]=e.split("-"),i=ci.find(({name:l})=>n===l);if(!i||r==="BOT"&&n!=="WEBHOOK"&&this.settings.store.dontShowForBots)return t.BOT_TAG_BOT;let s=qo.store.tagSettings?.[i.name]?.text||i.displayName;switch(r){case"OP":return`${t.BOT_TAG_FORUM_ORIGINAL_POSTER} \u2022 ${s}`;case"BOT":return`${t.BOT_TAG_BOT} \u2022 ${s}`;default:return s}},getTag({message:e,user:t,channelId:n,origType:r,location:i,channel:s}){if(!t)return null;if(i==="chat"&&t.id==="1")return ho.Types.OFFICIAL;if(t.isClyde())return ho.Types.AI;let l=typeof r=="number"?r:null;if(s??=Q.getChannel(n),!s)return l;let c=this.settings.store,u=this.getPermissions(t,s);for(let d of ci)if(!(i==="chat"&&!c.tagSettings[d.name].showInChat)&&!(i==="not-chat"&&!c.tagSettings[d.name].showInNotChat)&&(d.permissions?.some(m=>u.includes(m))||d.condition?.(e,t,s))){s.isForumPost()&&s.ownerId===t.id?l=ho.Types[`${d.name}-OP`]:t.bot&&!GS(e,t)&&!c.dontShowBotTag?l=ho.Types[`${d.name}-BOT`]:l=ho.Types[d.name];break}return l}})});function ZI(e,t){let n=0,r=0;for(;(r=e.indexOf(t,r)+1)!==0;)n++;return n}function XI(e,t){if(!t.global)throw new Error("pattern must be global");let n=0;for(;t.test(e);)n++;return n}function QI(e){let t=ZI(e,kd)+XI(e,JI);return Math.min(t,10)}function Cd(){if(!Ko.store.triggerWhenUnfocused&&!document.hasFocus())return;let e=document.createElement("audio");e.src=Ko.store.quality==="HD"?YI:KI,e.volume=Ko.store.volume,e.play()}var kd,KI,YI,Ko,Rd,JI,zS=g(()=>{"use strict";a();$();Mu();P();Be();M();I();kd="\u{1F5FF}",KI="https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai.mp3",YI="https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai_hd.wav",Ko=D({volume:{description:"Volume of the \u{1F5FF}\u{1F5FF}\u{1F5FF}",type:5,markers:Go(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}}),Rd=y({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:Ko,flux:{async MESSAGE_CREATE({optimistic:e,type:t,message:n,channelId:r}){if(e||t!=="MESSAGE_CREATE"||n.state==="SENDING"||Ko.store.ignoreBots&&n.author?.bot||Ko.store.ignoreBlocked&&nt.isBlocked(n.author?.id)||!n.content||r!==Ae.getChannelId())return;let i=QI(n.content);for(let s=0;s/gi});var cl,Ld,jS=g(()=>{"use strict";a();$();P();M();j();cl=D({guild:{description:"Mute Guild",type:3,default:!0},everyone:{description:"Suppress @everyone and @here",type:3,default:!0},role:{description:"Suppress All Role @mentions",type:3,default:!0}}),Ld=y({name:"MuteNewGuild",description:"Mutes newly joined guilds",authors:[p.Glitch,p.Nuckyz,p.carince],patches:[{find:",acceptInvite(",replacement:{match:/INVITE_ACCEPT_SUCCESS.+?,(\i)=null!==.+?;/,replace:(e,t)=>`${e}$self.handleMute(${t});`}},{find:"{joinGuild:",replacement:{match:/guildId:(\i),lurker:(\i).{0,20}}\)\);/,replace:(e,t,n)=>`${e}if(!${n})$self.handleMute(${t});`}}],settings:cl,handleMute(e){e==="@me"||e==="null"||e==null||yt("updateGuildNotificationSettings").updateGuildNotificationSettings(e,{muted:cl.store.guild,suppress_everyone:cl.store.everyone,suppress_roles:cl.store.role})}})});function oA(e){return e.name||e.recipients.map(W.getUser).filter(Tp).map(t=>nt.getNickname(t.id)||tA.getName(t)).join(", ")}var VI,eA,tA,Yo,nA,Ed,WS=g(()=>{"use strict";a();P();Ha();M();j();I();VI=A("selectPrivateChannel"),eA=A("getChannelIconURL"),tA=A("getGlobalName"),Yo=A("emptyIconFriends","emptyIconGuilds"),nA=A("guildNick","guildAvatarWithoutIcon");Ed=y({name:"MutualGroupDMs",description:"Shows mutual group dms in profiles",authors:[p.amia],patches:[{find:".Messages.USER_PROFILE_MODAL",replacement:{match:/(?<=\.MUTUAL_GUILDS\}\),)(?=(\i\.bot).{0,20}(\(0,\i\.jsx\)\(.{0,100}id:))/,replace:'($1||arguments[0].isCurrentUser)?null:$2"MUTUAL_GDMS",children:"Mutual Groups"}),'}},{find:".UserProfileSections.USER_INFO_CONNECTIONS:",replacement:{match:/(?<={user:(\i),onClose:(\i)}\);)(?=case \i\.\i\.MUTUAL_FRIENDS)/,replace:'case "MUTUAL_GDMS":return $self.renderMutualGDMs($1,$2);'}}],renderMutualGDMs(e,t){let n=Q.getSortedPrivateChannels().filter(r=>r.isGroupDM()&&r.recipients.includes(e.id)).map(r=>o(Or,{className:Yo.listRow,onClick:()=>{t(),VI.selectPrivateChannel(r.id)}},o(_r,{src:eA.getChannelIconURL({id:r.id,icon:r.icon,size:32}),size:"SIZE_40",className:Yo.listAvatar}),o("div",{className:Yo.listRowContent},o("div",{className:Yo.listName},oA(r)),o("div",{className:nA.guildNick},r.recipients.length+1," Members"))));return o(Dr,{className:Yo.listScroller,fade:!0,onClose:t},n.length>0?n:o("div",{className:Yo.empty},o("div",{className:Yo.emptyIconFriends}),o("div",{className:Yo.emptyText},"No group dms in common")))}})});var rA,Dd,qS=g(()=>{"use strict";a();$();P();M();j();rA=A("getRelationships","isBlocked"),Dd=y({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;$&"}]},...['displayName="MessageStore"','displayName="ReadStateStore"'].map(e=>({find:e,predicate:()=>L.plugins.NoBlockedMessages.ignoreBlockedMessages===!0,replacement:[{match:/(?<=MESSAGE_CREATE:function\((\i)\){)/,replace:(t,n)=>`if($self.isBlocked(${n}.message))return;`}]}))],options:{ignoreBlockedMessages:{description:"Completely ignores (recent) incoming messages from blocked users (locally).",type:3,default:!1,restartNeeded:!0}},isBlocked:e=>rA.isBlocked(e.author.id)})});var Od,KS=g(()=>{"use strict";a();P();M();Od=y({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 _d,YS=g(()=>{"use strict";a();P();M();_d=y({name:"NoF1",description:"Disables F1 help bind.",authors:[p.Cyn],patches:[{find:',"f1"],comboKeysBindGlobal:',replacement:{match:',"f1"],comboKeysBindGlobal:',replace:"],comboKeysBindGlobal:"}}]})});var Bd,ZS=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/noMosaic/styles.css",{name:"src/plugins/noMosaic/styles.css",source:`[class^="nonMediaAttachmentsContainer_"] [class*="messageAttachment_"] { position: relative; } `,classNames:{},dom:null});Bd="src/plugins/noMosaic/styles.css"});var Fd,Ud,XS=g(()=>{"use strict";a();$();Ve();P();M();ZS();Fd=D({inlineVideo:{description:"Play videos without carousel modal",type:3,default:!0,restartNeeded:!0},mediaLayoutType:{description:"Choose media layout type",type:4,restartNeeded:!0,options:[{label:"STATIC, render loading image but image isn't resposive, no problem unless discord window width is too small",value:"STATIC",default:!0},{label:"RESPONSIVE, image is responsive but not render loading image, cause messages shift when loaded",value:"RESPONSIVE"}]}}),Ud=y({name:"NoMosaic",authors:[p.AutumnVN],description:"Removes Discord new image mosaic",tags:["image","mosaic","media"],settings:Fd,patches:[{find:".oneByTwoLayoutThreeGrid",replacement:[{match:/mediaLayoutType:\i\.\i\.MOSAIC/,replace:"mediaLayoutType:$self.mediaLayoutType()"},{match:/null!==\(\i=\i\.get\(\i\)\)&&void 0!==\i\?\i:"INVALID"/,replace:'"INVALID"'}]},{find:"renderAttachments(",predicate:()=>Fd.store.inlineVideo,replacement:{match:/url:(\i)\.url\}\);return /,replace:"$&$1.content_type?.startsWith('image/')&&"}},{find:"Messages.REMOVE_ATTACHMENT_TOOLTIP_TEXT",replacement:{match:/\i===\i\.\i\.MOSAIC/,replace:"true"}}],mediaLayoutType(){return Fd.store.mediaLayoutType},start(){St(Bd)},stop(){$t(Bd)}})});var iA,Ss,$d,JS=g(()=>{"use strict";a();$();P();M();j();iA=A("getMessageRequestsCount"),Ss=D({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}}),$d=y({name:"NoPendingCount",description:"Removes the ping count of incoming friend requests, message requests, and nitro offers.",authors:[p.amia],settings:Ss,patches:[{find:"getPendingCount(){",predicate:()=>Ss.store.hideFriendRequestsCount,replacement:{match:/(?<=getPendingCount\(\)\{)/,replace:"return 0;"}},{find:"getMessageRequestsCount(){",predicate:()=>Ss.store.hideMessageRequestsCount,replacement:{match:/(?<=getMessageRequestsCount\(\)\{)/,replace:"return 0;"}},{find:".getSpamChannelsCount(),",predicate:()=>Ss.store.hideMessageRequestsCount,replacement:{match:/(?<=getSpamChannelsCount\(\),\i=)\i\.getMessageRequestsCount\(\)/,replace:"$self.getRealMessageRequestCount()"}},{find:"showProgressBadge:",predicate:()=>Ss.store.hidePremiumOffersCount,replacement:{match:/(?<=\{unviewedTrialCount:(\i),unviewedDiscountCount:(\i)\}.{0,200}\i=)\1\+\2/,replace:"0"}}],getRealMessageRequestCount(){return iA.getMessageRequestChannelIds().size}})});var Gd,QS=g(()=>{"use strict";a();P();M();Gd=y({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 ul,Hd,VS=g(()=>{"use strict";a();$();P();M();ul=D({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}}),Hd=y({name:"NoReplyMention",description:"Disables reply pings by default",authors:[p.DustyAngel47,p.axyie,p.pylix,p.outfoxxed],settings:ul,shouldMention(e,t){let n=ul.store.userList.includes(e.author.id),r=ul.store.shouldPingListed?n:!n;return ul.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 zd,e0=g(()=>{"use strict";a();P();M();zd=y({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 jd,t0=g(()=>{"use strict";a();P();M();jd=y({name:"NoTypingAnimation",authors:[p.AutumnVN],description:"Disables the CPU-intensive typing dots animation",patches:[{find:"dotCycle",replacement:{match:/document.hasFocus\(\)/,replace:"false"}}]})});var Wd,n0=g(()=>{"use strict";a();P();M();Wd=y({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 qd,o0=g(()=>{"use strict";a();P();M();qd=y({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 Kd,r0=g(()=>{"use strict";a();P();M();Kd=y({name:"NSFWGateBypass",description:"Allows you to access NSFW channels without setting/verifying your age",authors:[p.Commandtechno],patches:[{find:".nsfwAllowed=null",replacement:{match:/(\w+)\.nsfwAllowed=/,replace:"$1.nsfwAllowed=true;"}}]})});var bs,Yd,i0=g(()=>{"use strict";a();$();P();M();I();bs=D({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}}),Yd=y({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:bs,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,volume:\i,onClick)/,replace:"sound:!$self.isPrivateChannelRead(arguments[0]?.message)?undefined:$1"}]}],isPrivateChannelRead(e){let t=Q.getChannel(e.channel_id)?.type;return t!==1&&t!==3||t===1&&bs.store.channelToAffect==="group_dm"||t===3&&bs.store.channelToAffect==="user_dm"||bs.store.allowMentions&&e.mentions.some(n=>n.id===W.getCurrentUser().id)||bs.store.allowEveryone&&e.mention_everyone?!0:ar.getOldestUnreadMessageId(e.channel_id)===e.id}})});var Zd,s0=g(()=>{"use strict";a();P();M();Zd=y({name:"oneko",description:"cat follow mouse (real)",authors:[p.Ven,p.adryd],start(){fetch("https://raw.githubusercontent.com/adryd325/oneko.js/5977144dce83e4d71af1de005d16e38eebeb7b72/oneko.js").then(e=>e.text()).then(e=>e.replace("./oneko.gif","https://raw.githubusercontent.com/adryd325/oneko.js/14bab15a755d0e35cd4ae19c931d96d306f99f42/oneko.gif")).then(eval)},stop(){clearInterval(window.onekoInterval),delete window.onekoInterval,document.getElementById("oneko")?.remove()}})});var sA,aA,lA,cA,Ar,uA,Xd,a0=g(()=>{"use strict";a();$();P();M();I();sA=/^https:\/\/(spotify\.link|s\.team)\/.+$/,aA=/^https:\/\/open\.spotify\.com\/(track|album|artist|playlist|user|episode)\/(.+)(?:\?.+?)?$/,lA=/^https:\/\/(steamcommunity\.com|(?:help|store)\.steampowered\.com)\/.+$/,cA=/^https:\/\/store\.epicgames\.com\/(.+)$/,Ar=D({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}}),uA=VencordNative.pluginHelpers.OpenInApp,Xd=y({name:"OpenInApp",description:"Open Spotify, Steam and Epic Games URLs in their respective apps instead of your browser",authors:[p.Ven],settings:Ar,patches:[{find:"trackAnnouncementMessageLinkClicked({",replacement:{match:/(?<=handleClick:function\(\)\{return (\i)\}.+?)function \1\(.+?\)\{/,replace:"async $& if(await $self.handleLink(...arguments)) return;"}},{find:"WEB_OPEN(",predicate:()=>Ar.store.spotify,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 n=e.href;sA.test(n)&&(t?.preventDefault(),n=await uA.resolveRedirect(n));e:{if(!Ar.store.spotify)break e;let r=aA.exec(n);if(!r)break e;let[,i,s]=r;return VencordNative.native.openExternal(`spotify:${i}:${s}`),t?.preventDefault(),!0}e:{if(!Ar.store.steam||!lA.test(n))break e;return VencordNative.native.openExternal(`steam://openurl/${n}`),t?.preventDefault(),yn("Opened link in Steam",ee.Type.SUCCESS),!0}e:{if(!Ar.store.epic)break e;let r=cA.exec(n);if(!r)break e;return VencordNative.native.openExternal(`com.epicgames.launcher://store/${r[1]}`),t?.preventDefault(),!0}return t?.defaultPrevented?(window.open(n,"_blank"),!0):!1},handleAccountView(e,t,n){t==="spotify"&&Ar.store.spotify?(VencordNative.native.openExternal(`spotify:user:${n}`),e.preventDefault()):t==="steam"&&Ar.store.steam&&(VencordNative.native.openExternal(`steam://openurl/https://steamcommunity.com/profiles/${n}`),yn("Opened link in Steam",ee.Type.SUCCESS),e.preventDefault())}})});function c0(e){B.dispatch({type:"POGGERMODE_SETTINGS_UPDATE",settings:{enabled:e,settingsVisible:e}})}function u0(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}}B.dispatch({type:"POGGERMODE_SETTINGS_UPDATE",settings:t})}var l0,Jd,p0=g(()=>{"use strict";a();$();P();M();I();l0=D({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:u0}}),Jd=y({name:"Party mode \u{1F389}",description:"Allows you to use party mode cause the party never ends \u2728",authors:[p.UwUDev],settings:l0,start(){c0(!0),u0(l0.store.superIntensePartyMode)},stop(){c0(!1)}})});var Qd,Vd,d0=g(()=>{"use strict";a();$();P();M();Qd=D({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}}),Vd=y({name:"PermissionFreeWill",description:"Disables the client-side restrictions for channel permission management.",authors:[p.lewisakura],patches:[{find:".showPermissionLockoutModal(",replacement:[{match:/case"DENY":.{0,50}if\((?=\i\.\i\.can)/,replace:"$&true||"}],predicate:()=>Qd.store.lockout},{find:".ONBOARDING_CHANNEL_THRESHOLD_WARNING",replacement:[{match:/(?<=(?:isDefaultChannelThresholdMetAfterDelete|checkDefaultChannelThresholdMetAfterChannelPermissionDeny):function\(\)\{)return \i(?=\})/g,replace:"return () => true"}],predicate:()=>Qd.store.onboarding}],settings:Qd})});var m0=g(()=>{});function pA(e){return ao(e.toLowerCase().split("_"))}function pl(e){return e=f0[e]||e,Ct.Messages[e]||pA(e)}function g0(e){e==="USE_APPLICATION_COMMANDS"?e="USE_APPLICATION_COMMANDS_GUILD":e==="SEND_VOICE_MESSAGES"?e="SEND_VOICE_MESSAGE_GUILD":e!=="STREAM"&&(e=f0[e]||e);let t=Ct.Messages[`ROLE_PERMISSIONS_${e}_DESCRIPTION`];return t?.hasMarkdown?$e.parse(t.message):typeof t=="string"?t:""}function dl({roles:e,id:t},n){return[...n.roles,t].map(r=>e[r]).sort((r,i)=>i.position-r.position)}function h0(e){switch(Zo.store.permissionsSortOrder){case 0:return e.sort((t,n)=>n.position-t.position);case 1:return e.sort((t,n)=>t.position-n.position);default:return e}}function ml(e,t){let n=we.getGuild(t);return e.sort((r,i)=>{if(r.type!==0||i.type!==0)return 0;let s=n.roles[r.id];return n.roles[i.id].position-s.position})}var qt,f0,Ts=g(()=>{"use strict";a();Ve();lo();I();ws();xs();qt=Ge("vc-permviewer-");f0={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 em(){return o("svg",{height:"24",width:"24",viewBox:"0 0 24 24"},o("title",null,"Denied"),o("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 tm(){return o("svg",{height:"24",width:"24",viewBox:"0 0 24 24"},o("title",null,"Allowed"),o("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 v0(){return o("svg",{height:"24",width:"24",viewBox:"0 0 16 16"},o("g",null,o("title",null,"Not overwritten"),o("polygon",{fill:"var(--text-normal)",points:"12 2.32 10.513 2 4 13.68 5.487 14"})))}var S0=g(()=>{"use strict";a()});function mA(e,t,n){return Ke(r=>o(hA,{modalProps:r,permissions:e,guild:t,header:n}))}function fA({permissions:e,guild:t,modalProps:n,header:r}){e.sort((c,u)=>c.type-u.type),We([Le],()=>Le.getMemberIds(t.id),null,(c,u)=>c.length===u.length),_e(()=>{let c=e.filter(u=>u.type===1&&!Le.isMember(t.id,u.id)).map(({id:u})=>u);B.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[t.id],userIds:c})},[]);let[i,s]=J(0),l=e[i];return o(qe,{...n,size:"large"},o(at,null,o(oe,{className:qt("perms-title"),variant:"heading-lg/semibold"},r," permissions:"),o(cn,{onClick:n.onClose})),o(tt,null,!l&&o("div",{className:qt("perms-no-perms")},o(oe,{variant:"heading-lg/normal"},"No permissions to display!")),l&&o("div",{className:qt("perms-container")},o("div",{className:qt("perms-list")},e.map((c,u)=>{let d=W.getUser(c.id??""),m=t.roles[c.id??""];return o("button",{className:qt("perms-list-item-btn"),onClick:()=>s(u)},o("div",{className:qt("perms-list-item",{"perms-list-item-active":i===u}),onContextMenu:h=>{Zo.store.unsafeViewAsRole&&c.type===0&&gn.open(h,()=>o(gA,{guild:t,roleId:c.id,onClose:n.onClose}))}},(c.type===0||c.type===2)&&o("span",{className:qt("perms-role-circle"),style:{backgroundColor:m?.colorString??"var(--primary-300)"}}),c.type===1&&d!==void 0&&o("img",{className:qt("perms-user-img"),src:d.getAvatarURL(void 0,void 0,!1)}),o(oe,{variant:"text-md/normal"},c.type===0?m?.name??"Unknown Role":c.type===1?(d&&po(d))??"Unknown User":o(ye,{style:{gap:"0.2em",justifyItems:"center"}},"@owner",o(hy,{height:18,width:18,"aria-hidden":"true"})))))})),o("div",{className:qt("perms-perms")},Object.entries(Te).map(([c,u])=>o("div",{className:qt("perms-perms-item")},o("div",{className:qt("perms-perms-item-icon")},(()=>{let{permissions:d,overwriteAllow:m,overwriteDeny:h}=l;return d?(d&u)===u?tm():em():m&&(m&u)===u?tm():h&&(h&u)===u?em():v0()})()),o(oe,{variant:"text-md/normal"},pl(c)),o(V,{text:g0(c)||"No Description"},d=>o(Aa,{...d}))))))))}function gA({guild:e,roleId:t,onClose:n}){return o(U.Menu,{navId:qt("role-context-menu"),onClose:gn.close,"aria-label":"Role Options"},o(U.MenuItem,{id:"vc-pw-view-as-role",label:"View As Role",action:()=>{let r=e.roles[t];!r||(n(),B.dispatch({type:"IMPERSONATE_UPDATE",guildId:e.id,data:{type:"ROLES",roles:{[t]:r}}}))}}))}var hA,ui,xs=g(()=>{"use strict";a();le();Dt();Ht();It();dt();I();ws();Ts();S0();hA=_.wrap(fA),ui=mA});var b0=g(()=>{});function om({children:e,onMoreClick:t,buttons:n,moreTooltipText:r,defaultState:i=!1,onDropDownClick:s,headerText:l}){let[c,u]=J(i);return o(f,null,o("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"8px"}},o(oe,{tag:"h2",variant:"eyebrow",style:{color:"var(--header-primary)",display:"inline"}},l),o("div",{className:nm("center-flex")},n??null,t&&o(V,{text:r},d=>o("button",{...d,className:nm("btn"),onClick:t},o("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},o("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"})))),o(V,{text:c?"Hide "+l:"Show "+l},d=>o("button",{...d,className:nm("btn"),onClick:()=>{u(m=>!m),s?.(c)}},o("svg",{width:"24",height:"24",viewBox:"0 0 24 24",transform:c?"scale(1 -1)":"scale(1 1)"},o("path",{fill:"var(--text-normal)",d:"M16.59 8.59003L12 13.17L7.41 8.59003L6 10L12 16L18 10L16.59 8.59003Z"})))))),c&&e)}var nm,T0=g(()=>{"use strict";a();Ve();I();b0();nm=Ge("vc-expandableheader-")});function vA({guild:e,guildMember:t}){let n=Zo.use(["permissionsSortOrder"]),[r,i]=Nt(()=>{let w=[],b=dl(e,t),x=b.map(N=>({type:0,...N}));if(e.ownerId===t.userId){x.push({type:2,permissions:Object.values(Te).reduce((k,F)=>k|F,0n)});let N=Ct.Messages.GUILD_OWNER||"Server Owner";w.push({permission:N,roleColor:"var(--primary-300)",rolePosition:1/0})}h0(b);for(let[N,k]of Object.entries(Te))for(let{permissions:F,colorString:G,position:K,name:q}of b)if((F&k)===k){w.push({permission:pl(N),roleColor:G||"var(--primary-300)",rolePosition:K});break}return w.sort((N,k)=>k.rolePosition-N.rolePosition),[x,w]},[n.permissionsSortOrder]),{root:s,role:l,roleRemoveButton:c,roleNameOverflow:u,roles:d,rolePill:m,rolePillBorder:h,roleCircle:v,roleName:T}=yA;return o(om,{headerText:"Permissions",moreTooltipText:"Role Details",onMoreClick:()=>ui(r,e,t.nick||W.getUser(t.userId).username),defaultState:Zo.store.defaultPermissionsDropdownState,buttons:[o(V,{text:`Sorting by ${n.permissionsSortOrder===0?"Highest Role":"Lowest Role"}`},w=>o("button",{...w,className:qt("userperms-sortorder-btn"),onClick:()=>{n.permissionsSortOrder=n.permissionsSortOrder===0?1:0}},o("svg",{width:"20",height:"20",viewBox:"0 96 960 960",transform:n.permissionsSortOrder===0?"scale(1 1)":"scale(1 -1)"},o("path",{fill:"var(--text-normal)",d:"M440 896V409L216 633l-56-57 320-320 320 320-56 57-224-224v487h-80Z"}))))]},i.length>0&&o("div",{className:re(s,d)},i.map(({permission:w,roleColor:b})=>o("div",{className:re(l,m,h)},o("div",{className:c},o("span",{className:v,style:{backgroundColor:b}})),o("div",{className:T},o(oe,{className:u,variant:"text-xs/medium"},w))))))}var yA,x0,w0=g(()=>{"use strict";a();le();T0();Zt();Be();j();I();ws();Ts();xs();yA=Qe(()=>{let e=rc(ce.byProps("roles","rolePill","rolePillBorder"),ce.byProps("roleCircle","dotBorderBase","dotBorderColor"),ce.byProps("roleNameOverflow","root","roleName","roleRemoveButton"));return Object.assign({},...e)});x0=_.wrap(vA,{noop:!0})});function rm(e,t,n){return n===0&&!Le.isMember(e,t)?null:o(U.MenuItem,{id:"perm-viewer-permissions",label:"Permissions",action:()=>{let r=we.getGuild(e),i,s;switch(n){case 0:{let l=Le.getMember(e,t);i=dl(r,l).map(c=>({type:0,...c})),r.ownerId===t&&i.push({type:2,permissions:Object.values(Te).reduce((c,u)=>c|u,0n)}),s=l.nick??W.getUser(l.userId).username;break}case 1:{let l=Q.getChannel(t);i=ml(Object.values(l.permissionOverwrites).map(({id:c,allow:u,deny:d,type:m})=>({type:m,id:c,overwriteAllow:u,overwriteDeny:d})),e),s=l.name;break}default:{i=Object.values(r.roles).map(l=>({type:0,...l})),s=r.name;break}}ui(i,r,s)}})}function im(e,t){return(n,r)=>()=>{if(!r||t===0&&!r.user||t===2&&!r.guild)return n;let i=mt(e,n),s=(()=>{switch(t){case 0:return rm(r.guildId,r.user.id,t);case 1:return rm(r.guild.id,r.channel.id,t);case 2:return rm(r.guild.id);default:return null}})();s!=null&&(i?i.push(s):e==="roles"&&r.guildId&&n.splice(-1,0,o(U.MenuGroup,null,s)))}}var Zo,sm,ws=g(()=>{"use strict";a();m0();Mt();$();P();M();I();xs();w0();Ts();Zo=D({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}});sm=y({name:"PermissionsViewer",description:"View the permissions a user or channel has, and the roles of a server",authors:[p.Nuckyz,p.Ven],settings:Zo,patches:[{find:".popularApplicationCommandIds,",replacement:{match:/showBorder:.{0,60}}\),(?<=guild:(\i),guildMember:(\i),.+?)/,replace:(e,t,n)=>`${e}$self.UserPermissions(${t},${n}),`}}],UserPermissions:(e,t)=>!!t&&o(x0,{guild:e,guildMember:t}),userContextMenuPatch:im("roles",0),channelContextMenuPatch:im(["mute-channel","unmute-channel"],1),guildContextMenuPatch:im("privacy",2),start(){ue("user-context",this.userContextMenuPatch),ue("channel-context",this.channelContextMenuPatch),ue(["guild-context","guild-header-popout"],this.guildContextMenuPatch)},stop(){fe("user-context",this.userContextMenuPatch),fe("channel-context",this.channelContextMenuPatch),fe(["guild-context","guild-header-popout"],this.guildContextMenuPatch)}})});function P0(e){let t=e instanceof File,n=t?URL.createObjectURL(e):e;return new Promise((r,i)=>{let s=new Image;s.onload=()=>{t&&URL.revokeObjectURL(n),r(s)},s.onerror=(l,c,u,d,m)=>i(m||l),s.crossOrigin="Anonymous",s.src=n})}async function wA(e,t,n){for(let r of e)switch(r.name){case"image":let i=xA.getUploads(t.channel.id,M0)[0];if(i){if(!i.isImage)throw"Upload is not an image";return i.item.file}break;case"url":return r.value;case"user":try{return(await Et.getUser(r.value)).getAvatarURL(n?void 0:t.guild?.id,2048).replace(/\?size=\d+$/,"?size=2048")}catch(s){throw console.error(`[petpet] Failed to fetch user `,s),"Failed to fetch user. Check the console for more info."}}return null}var pi,M0,SA,bA,fl,TA,xA,am,I0=g(()=>{"use strict";a();tn();P();Zt();M();j();I();pi=zs(Op()),M0=0,SA=20,bA=128,fl=10,TA=Ao(()=>Promise.all(Array.from({length:fl},(e,t)=>P0(`https://raw.githubusercontent.com/VenPlugs/petpet/main/frames/pet${t}.gif`)))),xA=A("getUploads");am=y({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 n=await TA(),r=rt(e,"no-server-pfp",!1);try{var i=await wA(e,t,r);if(!i)throw"No Image specified!"}catch(v){pe(t.channel.id,{content:String(v)});return}let s=await P0(i),l=rt(e,"delay",SA),c=rt(e,"resolution",bA),u=(0,pi.GIFEncoder)(),d=document.createElement("canvas");d.width=d.height=c;let m=d.getContext("2d");for(let v=0;vLi.promptToUpload([h],t.channel,M0),10)}}]})});var A0=g(()=>{});var N0,lm,C0=g(()=>{"use strict";a();A0();$();le();P();M();I();N0=D({loop:{description:"Whether to make the PiP video loop or not",type:3,default:!0,restartNeeded:!1}}),lm=y({name:"PictureInPicture",description:"Adds picture in picture to videos (next to the Download button)",authors:[p.Lumap],settings:N0,patches:[{find:".nonMediaAttachment]",replacement:{match:/\.nonMediaAttachment\]:!(\i).{0,10}children:\[(\S)/,replace:"$&,$1&&$2&&$self.renderPiPButton(),"}}],renderPiPButton:_.wrap(()=>o(V,{text:"Toggle Picture in Picture"},e=>o("div",{...e,className:"vc-pip-button",role:"button",style:{cursor:"pointer",paddingTop:"4px",paddingLeft:"4px",paddingRight:"4px"},onClick:t=>{let n=t.currentTarget.parentNode.parentNode.querySelector("video"),r=document.body.appendChild(n.cloneNode(!0));r.loop=N0.store.loop,r.style.display="none",r.onleavepictureinpicture=()=>r.remove();function i(){r.currentTime=n.currentTime,r.requestPictureInPicture(),n.pause(),r.play()}r.readyState===4?i():r.onloadedmetadata=i}},o("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24"},o("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})})});function L0(){return lt(["plugins.PinDMs.pinnedDMs"]),gl()}function di(e){return gl().has(e)}function E0(e){let t=gl();t.delete(e)||t.add(e),R0([...t])}function um(){return gl(),Ms.store.pinOrder===0?MA.getPrivateChannelIds().filter(di):Qn}function D0(e){return um()[e]}function pm(e,t){let n=k0(),r=n.indexOf(e),i=r+t;[n[r],n[i]]=[n[i],n[r]],R0(n)}var Ms,MA,Qn,cm,k0,R0,PA,gl,dm=g(()=>{"use strict";a();$();M();j();Ms=D({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}]}}),MA=Ie("PrivateChannelSortStore"),k0=()=>(L.plugins.PinDMs.pinnedDMs||void 0)?.split(","),R0=e=>{cm=void 0,L.plugins.PinDMs.pinnedDMs=e.join(",")},PA=()=>(Qn=k0()??[],cm=new Set(Qn)),gl=()=>cm??PA()});function O0(e){let t=di(e),n=t&&Ms.store.pinOrder===1;return o(f,null,o(U.MenuItem,{id:"pin-dm",label:t?"Unpin DM":"Pin DM",action:()=>E0(e)}),n&&Qn[0]!==e&&o(U.MenuItem,{id:"move-pin-up",label:"Move Pin Up",action:()=>pm(e,-1)}),n&&Qn[Qn.length-1]!==e&&o(U.MenuItem,{id:"move-pin-down",label:"Move Pin Down",action:()=>pm(e,1)}))}function F0(){ue("gdm-context",_0),ue("user-context",B0)}function U0(){fe("gdm-context",_0),fe("user-context",B0)}var _0,B0,$0=g(()=>{"use strict";a();Mt();I();dm();_0=(e,t)=>()=>{let n=mt("leave-channel",e);n&&n.unshift(O0(t.channel.id))},B0=(e,t)=>()=>{let n=mt("close-dm",e);if(n){let r=n.findIndex(i=>i?.props?.id==="close-dm");n.splice(r,0,O0(t.channel.id))}}});var mm,G0=g(()=>{"use strict";a();P();M();$0();dm();mm=y({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.Strencher],settings:Ms,start:F0,stop:U0,usePinCount(e){let t=L0();return e.length?[t.size]:[]},getChannel(e,t){return e[D0(t)]},isPinned:di,getSnapshot:um,getScrollOffset(e,t,n,r,i){return di(e)?t*(Qn.indexOf(e)+r)+n:(t+n)*2+t*Qn.length+i},patches:[{find:".privateChannelsHeaderContainer,",replacement:[{match:/(?<=\i,{channels:\i,)privateChannelIds:(\i),/,replace:"privateChannelIds:$1.filter(c=>!$self.isPinned(c)),pinCount:$self.usePinCount($1),"},{match:/(?<=renderRow:this\.renderRow,)sections:\[\i,/,replace:"$&...this.props.pinCount??[],"},{match:/children:(\i\.\i\.Messages.DIRECT_MESSAGES)(?<=renderSection=(\i)=>{.+?)/,replace:"children:$2.section===1?'Pinned DMs':$1"},{match:/(?<=renderDM=\((\i),(\i)\)=>{.*?this.state,\i=\i\[\i\],\i=)((\i)\[\i\]);/,replace:"$1===1?$self.getChannel($4,$2):$3;"},{match:/===\i\.DMS&&0/,replace:"-1$&"},{match:/(?<=scrollTo\(\{to:\i\}\):\(\i\+=)(\d+)\*\(.+?(?=,)/,replace:"$self.getScrollOffset(arguments[0],$1,this.props.padding,this.state.preRenderedChildren,$&)"}]},{find:".Routes.APPLICATION_STORE&&",replacement:{match:/(?<=\i=__OVERLAY__\?\i:\[\.\.\.\i\(\),\.\.\.)\i/,replace:"$self.getSnapshot().concat($&.filter(c=>!$self.isPinned(c)))"}},{find:".getFlattenedGuildIds()],",replacement:{match:/(?<=\i===\i\.ME\?)\i\.\i\.getPrivateChannelIds\(\)/,replace:"$self.getSnapshot().concat($&.filter(c=>!$self.isPinned(c)))"}}]})});var fm,H0=g(()=>{"use strict";a();P();M();fm=y({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 ym={};Ue(ym,{__getDecorators:()=>IA,addDecorator:()=>gm,decorators:()=>hl,removeDecorator:()=>hm});function gm(e,t,n){hl.set(e,{decorator:t,onlyIn:n})}function hm(e){hl.delete(e)}function IA(e){let t=!!e.guildId;return Array.from(hl.values(),n=>{let{decorator:r,onlyIn:i}=n;return!i||i==="guilds"&&t||i==="dms"&&!t?r(e):null})}var hl,vm=g(()=>{"use strict";a();hl=new Map});var Tm={};Ue(Tm,{__addDecorationsToMessage:()=>AA,addDecoration:()=>Sm,decorations:()=>yl,removeDecoration:()=>bm});function Sm(e,t){yl.set(e,t)}function bm(e){yl.delete(e)}function AA(e){return[...yl.values()].map(t=>t(e))}var yl,xm=g(()=>{"use strict";a();yl=new Map});function vl(e,t){return({color:n,tooltip:r,small:i})=>o(V,{text:r},s=>o("svg",{...s,height:(t?.height??20)-(i?3:0),width:(t?.width??20)-(i?3:0),viewBox:t?.viewBox??"0 0 24 24",fill:n},o("path",{d:e})))}var NA,z0,CA,kA,RA,Mm,j0,wm,Pm,W0=g(()=>{"use strict";a();la();vm();xm();$();le();P();M();j();I();NA=Ie("SessionsStore");z0={desktop:vl("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:vl("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:vl("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}),console:vl("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"})},CA=A("getStatusColor","StatusTypes"),kA=({platform:e,status:t,small:n})=>{let r=e[0].toUpperCase()+e.slice(1),i=z0[e]??z0.desktop;return o(i,{color:`var(--${CA.getStatusColor(t)}`,tooltip:r,small:n})},RA=e=>zn.getState()?.clientStatuses?.[e],Mm=({user:e,wantMargin:t=!0,wantTopMargin:n=!1,small:r=!1})=>{if(!e||e.bot)return null;if(e.id===W.getCurrentUser().id){let l=NA.getSessions();if(typeof l!="object")return null;let c=Object.values(l).sort(({status:m},{status:h})=>m===h?0:m==="online"?1:h==="online"?-1:m==="idle"?1:h==="idle"?-1:0),u=Object.values(c).reduce((m,h)=>(h.clientInfo.client!=="unknown"&&(m[h.clientInfo.client]=h.status),m),{}),{clientStatuses:d}=zn.getState();d[W.getCurrentUser().id]=u}let i=zn.getState()?.clientStatuses?.[e.id];if(!i)return null;let s=Object.entries(i).map(([l,c])=>o(kA,{key:l,platform:l,status:c,small:r}));return s.length?o("span",{className:"vc-platform-indicator",style:{display:"inline-flex",justifyContent:"center",alignItems:"center",marginLeft:t?4:0,verticalAlign:"top",position:"relative",top:n?2:0,padding:t?0:1,gap:2}},s):null},j0={component:e=>o(Mm,{...e,wantMargin:!1}),position:0,shouldShow:e=>!!Object.keys(RA(e.user.id)??{}).length,key:"indicator"},wm={list:{description:"In the member list",onEnable:()=>gm("platform-indicator",e=>o(_,{noop:!0},o(Mm,{user:e.user,small:!0}))),onDisable:()=>hm("platform-indicator")},badges:{description:"In user profiles, as badges",onEnable:()=>Im(j0),onDisable:()=>Am(j0)},messages:{description:"Inside messages",onEnable:()=>Sm("platform-indicator",e=>o(_,{noop:!0},o(Mm,{user:e.message?.author,wantTopMargin:!0}))),onDisable:()=>bm("platform-indicator")}},Pm=y({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=L.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(wm).forEach(([n,r])=>{e[n]&&r.onEnable()})},stop(){Object.entries(wm).forEach(([e,t])=>{t.onDisable()})},patches:[{find:".Masks.STATUS_ONLINE_MOBILE",predicate:()=>L.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:()=>L.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,n)=>`${n}?"online":${t}`},{match:/(?<=\i&&!\i)&&\i===\i\.\i\.ONLINE/,replace:""}]},{find:"}isMobileOnline(",predicate:()=>L.plugins.PlatformIndicators.colorMobileIndicator,replacement:{match:/(?<=\i\[\i\.\i\.MOBILE\])===\i\.\i\.ONLINE/,replace:"!= null"}}],options:{...Object.fromEntries(Object.entries(wm).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}}})});function DA(e){let{isEmpty:t,attachments:n}=e.type,r=Ae.getChannelId(),i=We([Ri],()=>q0(r));if(e.type.analyticsName!=="normal")return null;let s=n&&K0.getUploads(r,0).length>0;return!(!t&&i?.length>0)&&!s?null:o(V,{text:"Preview Message"},c=>o(E,{...c,onClick:async()=>pe(r,{content:q0(r),author:W.getCurrentUser(),attachments:s?await EA(r):void 0}),size:"",look:Xt.BLANK,innerClassName:vt.button,style:{padding:"0 2px",height:"100%"}},o("div",{className:vt.buttonWrapper},o("img",{width:24,height:24,src:"https://discord.com/assets/4c5a77a89716352686f590a6f014770c.svg"}))))}var K0,q0,LA,EA,Nm,Y0=g(()=>{"use strict";a();tn();le();P();M();j();I();K0=A("getUploads"),q0=e=>Ri.getDraft(e,0),LA=e=>new Promise(t=>{let n=new Image;n.onload=()=>t({width:n.width,height:n.height}),n.onerror=()=>t(null),n.src=e}),EA=async e=>await Promise.all(K0.getUploads(e,0).map(async t=>{let{isImage:n,filename:r,spoiler:i,item:{file:s}}=t,l=URL.createObjectURL(s),c={id:es(),filename:i?"SPOILER_"+r:r,content_type:void 0,size:await t.getSize(),spoiler:i,url:l+"#",proxy_url:l+"#"};if(n){let u=await LA(l);if(!u)return c;c.width=u.width,c.height=u.height}return c}));Nm=y({name:"PreviewMessage",description:"Lets you preview your message before sending it.",authors:[p.Aria],patches:[{find:"ChannelTextAreaButtons",replacement:{match:/(\i)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&,(()=>{try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}})()"}}],chatBarIcon:_.wrap(DA,{noop:!0})})});var Z0=g(()=>{});function Cm(){return o(O.Fragment,null,o(S.FormTitle,{tag:"h3"},"More Information"),o(S.FormText,null,"To add your own pronouns, visit"," ",o(it,{href:"https://pronoundb.org"},"pronoundb.org")),o(S.FormDivider,null),o(S.FormText,null,"The two pronoun formats are lowercase and capitalized. Example:",o("ul",null,o("li",null,"Lowercase: they/them"),o("li",null,"Capitalized: They/Them")),'Text like "Ask me my pronouns" or "Any pronouns" will always be capitalized. ',o("br",null),o("br",null),"You can also configure whether or not to display pronouns for the current user (since you probably already know them)"))}var X0=g(()=>{"use strict";a();mo();I()});var yo,Sl=g(()=>{"use strict";a();$();M();bl();yo=D({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 Tl,J0=g(()=>{"use strict";a();Tl={hh:"He/Him",hi:"He/It",hs:"He/She",ht:"He/They",ih:"It/Him",ii:"It/Its",is:"It/She",it:"It/They",shh:"She/He",sh:"She/Her",si:"She/It",st:"She/They",th:"They/He",ti:"They/It",ts:"They/She",tt:"They/Them",any:"Any pronouns",other:"Other pronouns",ask:"Ask me my pronouns",avoid:"Avoid pronouns, use my name",unspecified:"Unspecified"}});function _A(e,t=!1){let n=rn.getUserProfile(e)?.pronouns;return t?n:rn.getGuildMemberProfile(e,ti()?.guild_id)?.pronouns||n}function xl(e,t=!1){let n=_A(e,t)?.trim().replace(BA," "),[r]=ot(()=>FA(e),{fallbackValue:eb(e),onError:i=>console.error("Fetching pronouns failed: ",i)});return yo.store.pronounSource===1&&n?[n,"Discord"]:r&&r!=="unspecified"?[$A(r),"PronounDB"]:[n,"Discord"]}function V0(e,t=!1){let n=xl(e,t);return!yo.store.showInProfile||!yo.store.showSelf&&e===W.getCurrentUser().id?Q0:n}function eb(e){let t=km[e];return t&&t!=="unspecified"?t:t||null}function FA(e){return new Promise(t=>{let n=eb(e);if(n)return t(n);if(e in mi)return mi[e].push(t);mi[e]=[t],OA()})}async function UA(e){let t=new URLSearchParams;t.append("platform","discord"),t.append("ids",e.join(","));try{return await(await fetch("https://pronoundb.org/api/v1/lookup-bulk?"+t.toString(),{method:"GET",headers:{Accept:"application/json","X-PronounDB-Source":mc}})).json().then(r=>(Object.assign(km,r),r))}catch(n){console.error("PronounDB fetching failed: ",n);let r=Object.fromEntries(e.map(i=>[i,"unspecified"]));return Object.assign(km,r),r}}function $A(e){let{pronounsFormat:t}=L.plugins.PronounDB;return t==="CAPITALIZED"?Tl[e]:t==="LOWERCASE"&&["any","ask","avoid","other"].includes(e)?Tl[e]:Tl[e].toLowerCase()}var Q0,km,mi,OA,BA,bl=g(()=>{"use strict";a();$();P();Wr();It();Oe();I();Sl();J0();Q0=[null,""],km={},mi={},OA=bn(async()=>{let e=Object.keys(mi),t=await UA(e);for(let n of e)mi[n]?.forEach(r=>r(t[n])),delete mi[n]});BA=/\n+/g});function tb(e){return!(!yo.store.showInMessages||e.author.bot||e.author.system||e.type===GA||!yo.store.showSelf&&e.author.id===W.getCurrentUser().id)}function HA({message:e}){let[t]=xl(e.author.id);return t?o("span",{className:re(wl.timestampInline,wl.timestamp)},"\u2022 ",t):null}var wl,GA,nb,ob,zA,rb=g(()=>{"use strict";a();le();Be();j();I();bl();Sl();wl=A("timestampInline"),GA=24;nb=_.wrap(({message:e})=>tb(e)?o(HA,{message:e}):null,{noop:!0}),ob=_.wrap(({message:e})=>tb(e)?o(zA,{message:e}):null,{noop:!0});zA=_.wrap(({message:e})=>{let[t]=xl(e.author.id);return t?o("span",{className:re(wl.timestampInline,wl.timestamp,"vc-pronoundb-compact")},"\u2022 ",t):null},{noop:!0})});var ib,Rm,sb=g(()=>{"use strict";a();Z0();P();M();X0();rb();bl();Sl();ib={match:/text:(.{0,10}.Messages\.USER_PROFILE_PRONOUNS)(?=,)/,replace:'$& + (typeof vcPronounSource !== "undefined" ? ` (${vcPronounSource})` : "")'},Rm=y({name:"PronounDB",authors:[p.Tyman,p.TheKodeToad,p.Ven],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])"}},{find:"showCommunicationDisabledStyles",replacement:{match:/(?<=return\s*\(0,\i\.jsxs?\)\(.+!\i&&)(\(0,\i.jsxs?\)\(.+?\{.+?\}\))/,replace:"[$1, $self.PronounsChatComponentWrapper(arguments[0])]"}},{find:".userTagNoNickname",replacement:[{match:/{user:(\i),[^}]*,pronouns:(\i),[^}]*}=\i;/,replace:"$&let vcPronounSource;[$2,vcPronounSource]=$self.useProfilePronouns($1.id);"},ib]},{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;"},ib]}],settings:yo,settingsAboutComponent:Cm,PronounsChatComponentWrapper:nb,CompactPronounsChatComponentWrapper:ob,useProfilePronouns:V0})});var Lm,ab=g(()=>{"use strict";a();Ir();P();It();M();I();Lm=y({name:"QuickMention",authors:[p.kemo],description:"Adds a quick mention button to the message actions bar",dependencies:["MessagePopoverAPI"],start(){Un("QuickMention",e=>{let t=Q.getChannel(e.channel_id);return Re.can(Te.SEND_MESSAGES,t)?{label:"Quick Mention",icon:this.Icon,message:e,channel:t,onClick:()=>uo(`<@${e.author.id}> `)}:null})},stop(){$n("QuickMention")},Icon:()=>o("svg",{className:"icon",height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor"},o("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 gb(e,t){let n=e.findIndex(r=>r.id===t);return n===-1?n:e.length-n-1}function ub({channelId:e,messageId:t,_isQuickEdit:n}){if(n)return;let r=W.getCurrentUser().id,i=Cn.getMessages(e)._array.filter(s=>s.author.id===r);Pl=gb(i,t)}function pb({message:e,_isQuickReply:t}){t||(Ml=gb(Cn.getMessages(e.channel_id)._array,e.id))}function db(e){let t=e.key==="ArrowUp";!t&&e.key!=="ArrowDown"||!WA(e)||qA(e)||(e.shiftKey?ZA(t):YA(t))}function hb(e,t){let n=document.getElementById("message-content-"+t);if(!n)return;let r=Math.max(document.documentElement.clientHeight,window.innerHeight),i=n.getBoundingClientRect();(i.bottom<200||i.top-r>=-200)&&jA.jumpToMessage({channelId:e,messageId:t,flash:!1,jumpType:"INSTANT"})}function yb(e,t){let n=Cn.getMessages(Ae.getChannelId())._array;if(!t){let l=W.getCurrentUser().id;n=n.filter(c=>c.author.id===l)}let r=l=>e?Math.min(n.length-1,l+1):Math.max(-1,l-1),i=l=>{do l=r(l);while(l!==-1&&n[n.length-l-1]?.deleted===!0);return l},s;return t?Ml=s=i(Ml):Pl=s=i(Pl),s===-1?void 0:n[n.length-s-1]}function KA(e){let{enabled:t,userList:n,shouldPingListed:r}=L.plugins.NoReplyMention,i=!t||r===n.includes(e.author.id);switch(fb.store.shouldMention){case 2:return i;case 0:return!1;default:return!0}}function YA(e){let t=Q.getChannel(Ae.getChannelId());if(t.guild_id&&!Re.can(Te.SEND_MESSAGES,t))return;let n=yb(e,!0);if(!n)return void B.dispatch({type:"DELETE_PENDING_REPLY",channelId:Ae.getChannelId()});let r=Q.getChannel(n.channel_id),i=W.getCurrentUser().id;B.dispatch({type:"CREATE_PENDING_REPLY",channel:r,message:n,shouldMention:KA(n),showMentionToggle:r.guild_id!==null&&n.author.id!==i,_isQuickReply:!0}),hb(r.id,n.id)}function ZA(e){let t=Q.getChannel(Ae.getChannelId());if(t.guild_id&&!Re.can(Te.SEND_MESSAGES,t))return;let n=yb(e,!1);if(!n)return B.dispatch({type:"MESSAGE_END_EDIT",channelId:Ae.getChannelId()});B.dispatch({type:"MESSAGE_START_EDIT",channelId:n.channel_id,messageId:n.id,content:n.content,_isQuickEdit:!0}),hb(n.channel_id,n.id)}var jA,mb,Ml,Pl,fb,Em,lb,cb,WA,qA,vb=g(()=>{"use strict";a();$();P();M();j();I();jA=A("jumpToMessage"),mb=navigator.platform.includes("Mac"),Ml=-1,Pl=-1,fb=D({shouldMention:{type:4,description:"Ping reply by default",options:[{label:"Follow NoReplyMention",value:2,default:!0},{label:"Enabled",value:1},{label:"Disabled",value:0}]}}),Em=y({name:"QuickReply",authors:[p.obscurity,p.Ven,p.pylix],description:"Reply to (ctrl + up/down) and edit (ctrl + shift + up/down) messages via keybinds",settings:fb,start(){B.subscribe("DELETE_PENDING_REPLY",lb),B.subscribe("MESSAGE_END_EDIT",cb),B.subscribe("MESSAGE_START_EDIT",ub),B.subscribe("CREATE_PENDING_REPLY",pb),document.addEventListener("keydown",db)},stop(){B.unsubscribe("DELETE_PENDING_REPLY",lb),B.unsubscribe("MESSAGE_END_EDIT",cb),B.unsubscribe("MESSAGE_START_EDIT",ub),B.unsubscribe("CREATE_PENDING_REPLY",pb),document.removeEventListener("keydown",db)}}),lb=()=>Ml=-1,cb=()=>Pl=-1;WA=e=>mb?e.metaKey:e.ctrlKey,qA=e=>e.altKey||!mb&&e.metaKey});var Dm,XA,Om,Sb=g(()=>{"use strict";a();P();M();XA="https://raw.githubusercontent.com/facebook/react/17.0.2/scripts/error-codes/codes.json",Om=y({name:"ReactErrorDecoder",description:'Replaces "Minifed React Error" with the actual error.',authors:[p.Cyn],patches:[{find:'"https://reactjs.org/docs/error-decoder.html?invariant="',replacement:{match:/(function .\(.\)){(for\(var .="https:\/\/reactjs\.org\/docs\/error-decoder\.html\?invariant="\+.,.=1;.`${t}{var decoded=Vencord.Plugins.plugins.ReactErrorDecoder.decodeError.apply(null, arguments);if(decoded)return decoded;${n}}`}}],async start(){Dm=await fetch(XA).then(e=>e.json()).catch(e=>console.error(`[ReactErrorDecoder] Failed to fetch React error codes `,e))},stop(){Dm=void 0},decodeError(e,...t){let n=0;return Dm?.[e]?.replace(/%s/g,()=>{let r=t[n];return n++,r})}})});var Bm={};Ue(Bm,{ServerListRenderPosition:()=>Il,addServerListElement:()=>Ps,removeServerListElement:()=>Is,renderAll:()=>eN});function _m(e){return e===0?QA:VA}function Ps(e,t){_m(e).add(t)}function Is(e,t){_m(e).delete(t)}var JA,Il,QA,VA,eN,Al=g(()=>{"use strict";a();Je();JA=new ie("ServerListAPI"),Il=(n=>(n[n.Above=0]="Above",n[n.In=1]="In",n))(Il||{}),QA=new Set,VA=new Set;eN=e=>{let t=[];for(let n of _m(e))try{t.unshift(n())}catch(r){JA.error("Failed to render server list element:",r)}return t}});function tN(){let e=[];Object.values(we.getGuilds()).forEach(t=>{$r.getChannels(t.id).SELECTABLE.forEach(n=>{!ar.hasUnread(n.channel.id)||e.push({channelId:n.channel.id,messageId:ar.lastMessageId(n.channel.id),readStateType:0})})}),B.dispatch({type:"BULK_ACK",context:"APP",channels:e})}var nN,Fm,bb=g(()=>{"use strict";a();Al();P();M();I();nN=()=>o(E,{onClick:tN,size:E.Sizes.MIN,color:E.Colors.BRAND,style:{marginTop:"2px",marginBottom:"8px",marginLeft:"9px"}},"Read all"),Fm=y({name:"ReadAllNotificationsButton",description:"Read all server notifications with a single button click!",authors:[p.kemo],dependencies:["ServerListAPI"],renderReadAllButton:()=>o(nN,null),start(){Ps(0,this.renderReadAllButton)},stop(){Is(0,this.renderReadAllButton)}})});var nn,Nl=g(()=>{"use strict";a();$();M();nn=D({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 Um=g(()=>{"use strict";a()});async function iN(){zt.delMany(["relationship-notifier-guilds","relationship-notifier-groups","relationship-notifier-friends"])}async function $m(){await iN();let[e,t,n]=await zt.getMany([Tb(),xb(),wb()]);if(await Promise.all([kl(),Rl(),As()]),nn.store.offlineRemovals){if(nn.store.groups&&t?.size)for(let[r,i]of t)gi.has(r)||vo(`You are no longer in the group ${i.name}.`,i.iconURL);if(nn.store.servers&&e?.size)for(let[r,i]of e)fi.has(r)||vo(`You are no longer in the server ${i.name}.`,i.iconURL);if(nn.store.friends&&n?.friends.length)for(let r of n.friends){if(Nr.friends.includes(r))continue;let i=await Et.getUser(r).catch(()=>{});i&&vo(`You are no longer friends with ${po(i)}.`,i.getAvatarURL(void 0,void 0,!1),()=>Fn(i.id))}if(nn.store.friendRequestCancels&&n?.requests?.length)for(let r of n.requests){if(Nr.requests.includes(r)||[1,2,4].includes(nt.getRelationshipType(r)))continue;let i=await Et.getUser(r).catch(()=>{});i&&vo(`Friend request from ${po(i)} has been revoked.`,i.getAvatarURL(void 0,void 0,!1),()=>Fn(i.id))}}}function vo(e,t,n){nn.store.notices&&Cl.showNotice(e,"OK",()=>Cl.popNotice()),Ne({title:"Relationship Notifier",body:e,icon:t,onClick:n})}function Mb(e){return fi.get(e)}function Gm(e){fi.delete(e),kl()}async function kl(){fi.clear();let e=W.getCurrentUser().id;for(let[t,{name:n,icon:r}]of Object.entries(we.getGuilds()))Le.isMember(t,e)&&fi.set(t,{id:t,name:n,iconURL:r&&`https://cdn.discordapp.com/icons/${t}/${r}.png`});await zt.set(Tb(),fi)}function Pb(e){return gi.get(e)}function Hm(e){gi.delete(e),Rl()}async function Rl(){gi.clear();for(let{type:e,id:t,name:n,rawRecipients:r,icon:i}of Q.getSortedPrivateChannels())e===3&&gi.set(t,{id:t,name:n||r.map(s=>s.username).join(", "),iconURL:i&&`https://cdn.discordapp.com/channel-icons/${t}/${i}.png`});await zt.set(xb(),gi)}async function As(){Nr.friends=[],Nr.requests=[];let e=nt.getRelationships();for(let t in e)switch(e[t]){case 1:Nr.friends.push(t);break;case 3:Nr.requests.push(t);break}await zt.set(wb(),Nr)}var fi,gi,Nr,Tb,xb,wb,zm=g(()=>{"use strict";a();ss();ko();It();I();Nl();Um();fi=new Map,gi=new Map,Nr={friends:[],requests:[]},Tb=()=>`relationship-notifier-guilds-${W.getCurrentUser().id}`,xb=()=>`relationship-notifier-groups-${W.getCurrentUser().id}`,wb=()=>`relationship-notifier-friends-${W.getCurrentUser().id}`});async function Cb({relationship:{type:e,id:t}}){if(jm===t){jm=void 0;return}let n=await Et.getUser(t).catch(()=>null);if(!!n)switch(e){case 1:nn.store.friends&&vo(`${po(n)} removed you as a friend.`,n.getAvatarURL(void 0,void 0,!1),()=>Fn(n.id));break;case 3:nn.store.friendRequestCancels&&vo(`A friend request from ${po(n)} has been removed.`,n.getAvatarURL(void 0,void 0,!1),()=>Fn(n.id));break}}function kb({guild:{id:e,unavailable:t}}){if(!nn.store.servers||t)return;if(Wm===e){Gm(e),Wm=void 0;return}let n=Mb(e);n&&(Gm(e),vo(`You were removed from the server ${n.name}.`,n.iconURL))}function Rb({channel:{id:e,type:t}}){if(!nn.store.groups||t!==3)return;if(qm===e){Hm(e),qm=void 0;return}let n=Pb(e);n&&(Hm(e),vo(`You were removed from the group ${n.name}.`,n.iconURL))}var jm,Wm,qm,Ib,Ab,Nb,Lb=g(()=>{"use strict";a();It();I();Nl();Um();zm();Ib=e=>jm=e,Ab=e=>Wm=e,Nb=e=>qm=e});var Km,Eb=g(()=>{"use strict";a();P();M();Lb();Nl();zm();Km=y({name:"RelationshipNotifier",description:"Notifies you when a friend, group chat, or server removes you.",authors:[p.nick],settings:nn,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:kl,GUILD_DELETE:kb,CHANNEL_CREATE:Rl,CHANNEL_DELETE:Rb,RELATIONSHIP_ADD:As,RELATIONSHIP_UPDATE:As,RELATIONSHIP_REMOVE(e){Cb(e),As()},CONNECTION_OPEN:$m},async start(){setTimeout(()=>{$m()},5e3)},removeFriend:Ib,removeGroup:Nb,removeGuild:Ab})});var sN,aN,Ym,Db=g(()=>{"use strict";a();P();M();j();sN=A("spoilerContent"),aN=A("messagesWrapper","messages"),Ym=y({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:n,target:r}=e;if(!t)return;let{spoilerContent:i,hidden:s}=sN,{messagesWrapper:l}=aN,c=n?document.querySelector(`div.${l}`):r.parentElement;for(let u of c.querySelectorAll(`span.${i}.${s}`))u.click()}})});function Ob(e,t){open(t+encodeURIComponent(e),"_blank")}var Ll,_b,Zm,Bb=g(()=>{"use strict";a();Mt();Dt();Ht();P();M();I();Ll={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="};_b=(e,t)=>()=>{if(!t)return;let{reverseImageSearchType:n,itemHref:r,itemSrc:i}=t;if(!n||n!=="img")return;let s=r??i,l=mt("copy-link",e);l&&l.push(o(U.MenuItem,{label:"Search Image",key:"search-image",id:"search-image"},Object.keys(Ll).map((c,u)=>{let d="search-image-"+c;return o(U.MenuItem,{key:d,id:d,label:o(ye,{style:{alignItems:"center",gap:"0.5em"}},o("img",{style:{borderRadius:u>=3?"50%":void 0},"aria-hidden":"true",height:16,width:16,src:new URL("/favicon.ico",Ll[c]).toString().replace("lens.","")}),c),action:()=>Ob(s,Ll[c])})}),o(U.MenuItem,{key:"search-image-all",id:"search-image-all",label:o(ye,{style:{alignItems:"center",gap:"0.5em"}},o(Ji,{height:16,width:16}),"All"),action:()=>Object.values(Ll).forEach(c=>Ob(s,c))})))},Zm=y({name:"ReverseImageSearch",description:"Adds ImageSearch to image context menus",authors:[p.Ven,p.Nuckyz],tags:["ImageUtilities"],patches:[{find:".Messages.MESSAGE_ACTIONS_MENU_LABEL",replacement:{match:/favoriteableType:\i,(?<=(\i)\.getAttribute\("data-type"\).+?)/,replace:(e,t)=>`${e}reverseImageSearchType:${t}.getAttribute("data-role"),`}}],start(){ue("message",_b)},stop(){fe("message",_b)}})});var Ns,Xm,Fb=g(()=>{"use strict";a();$();P();M();I();Ns=D({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}}),Xm=y({name:"RoleColorEverywhere",authors:[p.KingFish,p.lewisakura,p.AutumnVN],description:"Adds the top role color anywhere possible",patches:[{find:"CLYDE_AI_MENTION_COLOR:null,",replacement:[{match:/user:(\i),channel:(\i).{0,400}?"@"\.concat\(.+?\)/,replace:"$&,color:$self.getUserColor($1?.id,{channelId:$2?.id})"}],predicate:()=>Ns.store.chatMentions},{find:".userTooltip,children",replacement:[{match:/let\{id:(\i),guildId:(\i)[^}]*\}.*?\.default,{(?=children)/,replace:"$&color:$self.getUserColor($1,{guildId:$2}),"}],predicate:()=>Ns.store.chatMentions},{find:'tutorialId:"whos-online',replacement:[{match:/\i.roleIcon,\.\.\.\i/,replace:"$&,color:$self.roleGroupColor(arguments[0])"},{match:/null,\i," — ",\i\]/,replace:"null,$self.roleGroupColor(arguments[0])]"}],predicate:()=>Ns.store.memberList},{find:"renderPrioritySpeaker",replacement:[{match:/renderName\(\).{0,100}speaking:.{50,100}jsx.{5,10}{/,replace:"$&...$self.getVoiceProps(this.props),"}],predicate:()=>Ns.store.voiceUsers}],settings:Ns,getColor(e,{channelId:t,guildId:n}){return(n??=Q.getChannel(t)?.guild_id)?Le.getMember(n,e)?.colorString??null:null},getUserColor(e,t){let n=this.getColor(e,t);return n&&parseInt(n.slice(1),16)},roleGroupColor({id:e,count:t,title:n,guildId:r,label:i}){let l=we.getGuild(r)?.roles[e];return o("span",{style:{color:l?.colorString,fontWeight:"unset",letterSpacing:".05em"}},n??i," \u2014 ",t)},getVoiceProps({user:{id:e},guildId:t}){return{style:{color:this.getColor(e,{guildId:t})}}}})});var Ub,$b,Jm,Gb=g(()=>{"use strict";a();Mt();Ht();P();M();j();I();Ub=A("replyToMessage"),$b=(e,{message:t})=>()=>{if(Ae.getChannelId()!==t.channel_id)return;let n=Q.getChannel(t?.channel_id);if(!n||n.guild_id&&!Re.can(Te.SEND_MESSAGES,n))return;let r=mt("pin",e);if(r&&!r.some(s=>s?.props?.id==="reply")){let s=r.findIndex(l=>l?.props.id==="pin");return r.splice(s+1,0,o(U.MenuItem,{id:"reply",label:Ct.Messages.MESSAGE_ACTION_REPLY,icon:fu,action:l=>Ub.replyToMessage(n,t,l)}))}let i=mt("mark-unread",e);if(i&&!i.some(s=>s?.props?.id==="reply"))return i.unshift(o(U.MenuItem,{id:"reply",label:Ct.Messages.MESSAGE_ACTION_REPLY,icon:fu,action:s=>Ub.replyToMessage(n,t,s)}))},Jm=y({name:"SearchReply",description:"Adds a reply button to search results",authors:[p.Aria],start(){ue("message",$b)},stop(){fe("message",$b)}})});var Qm,Hb=g(()=>{"use strict";a();P();M();Qm=y({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:"true"}}]})});var zb=g(()=>{});function jb(e){let t=e.slice(1,-1).replace(/(\d)(AM|PM)$/i,"$1 $2"),n=new Date(`${new Date().toDateString()} ${t}`).getTime()/1e3;return isNaN(n)?e:(Date.now()/1e3>n&&(n+=86400),``)}function cN({rootProps:e,close:t}){let[n,r]=J(),[i,s]=J(""),l=Math.round((new Date(n).getTime()||Date.now())/1e3),c=(m,h)=>``,[u,d]=Nt(()=>{let m=c(l,i);return[m,$e.parse(m)]},[l,i]);return o(qe,{...e},o(at,{className:Cs("modal-header")},o(S.FormTitle,{tag:"h2"},"Timestamp Picker"),o(cn,{onClick:t})),o(tt,{className:Cs("modal-content")},o("input",{type:"datetime-local",value:n,onChange:m=>r(m.currentTarget.value),style:{colorScheme:ni()===2?"light":"dark"}}),o(S.FormTitle,null,"Timestamp Format"),o(An,{options:lN.map(m=>({label:m,value:m})),isSelected:m=>m===i,select:m=>s(m),serialize:m=>m,renderOptionLabel:m=>o("div",{className:Cs("format-label")},$e.parse(c(l,m.value))),renderOptionValue:()=>d}),o(S.FormTitle,{className:Y.bottom8},"Preview"),o(S.FormText,{className:Cs("preview-text")},d," (",u,")")),o(Ft,null,o(E,{onClick:()=>{uo(u+" "),t()}},"Insert")))}var lN,Cs,Vm,Wb=g(()=>{"use strict";a();zb();Xn();Ve();P();It();ct();dt();M();I();lN=["","t","T","d","D","f","F","R"],Cs=Ge("vc-st-");Vm=y({name:"SendTimestamps",description:"Send timestamps easily via chat box button & text shortcuts. Read the extended description!",authors:[p.Ven,p.Tyler],dependencies:["MessageEventsAPI"],patches:[{find:"ChannelTextAreaButtons",replacement:{match:/(\i)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&,(()=>{try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}})()"}}],start(){this.listener=jt((e,t)=>{t.content=t.content.replace(/`\d{1,2}:\d{2} ?(?:AM|PM)?`/gi,jb)})},stop(){Wt(this.listener)},chatBarIcon(e){return e.type.analyticsName!=="normal"?null:o(V,{text:"Insert Timestamp"},({onMouseEnter:t,onMouseLeave:n})=>o("div",{style:{display:"flex"}},o(E,{"aria-haspopup":"dialog","aria-label":"Insert Timestamp",size:"",look:Xt.BLANK,onMouseEnter:t,onMouseLeave:n,innerClassName:vt.button,onClick:()=>{let r=Ke(i=>o(cN,{rootProps:i,close:()=>oo(r)}))},className:Cs("button")},o("div",{className:vt.buttonWrapper},o("svg",{"aria-hidden":"true",role:"img",width:"24",height:"24",viewBox:"0 0 24 24"},o("g",{fill:"none","fill-rule":"evenodd"},o("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"}),o("rect",{width:"24",height:"24"})))))))},settingsAboutComponent(){let e=["12:00","3:51","17:59","24:00","12:00 AM","0:13PM"].map(t=>`\`${t}\``);return o(f,null,o(S.FormText,null,"To quickly send send time only timestamps, include timestamps formatted as `HH:MM` (including the backticks!) in your message"),o(S.FormText,null,"See below for examples. If you need anything more specific, use the Date button in the chat bar!"),o(S.FormText,null,"Examples:",o("ul",null,e.map(t=>o("li",{key:t},o("code",null,t)," ","->"," ",$e.parse(jb(t)))))))}})});function uN(){return Yb=qn(),o("span",{id:"vc-friendcount",style:{display:"inline-block",width:"100%",fontSize:"12px",fontWeight:"600",color:"var(--header-secondary)",textTransform:"uppercase",textAlign:"center"}},tf," online")}function pN(){return Zb=qn(),o("span",{id:"vc-guildcount",style:{display:"inline-block",width:"100%",fontSize:"12px",fontWeight:"600",color:"var(--header-secondary)",textTransform:"uppercase",textAlign:"center"}},Kb," servers")}function qb(){tf=0;let e=nt.getRelationships();for(let t of Object.keys(e))e[t]===1&&zn.getStatus(t)!=="offline"&&(tf+=1);Yb?.()}function ef(){Kb=we.getGuildCount(),Zb?.()}var tf,Kb,Yb,Zb,nf,Xb=g(()=>{"use strict";a();Al();$();le();P();Oe();M();I();tf=0,Kb=0;nf=y({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}=L.plugins.ServerListIndicators;return o(_,{noop:!0},o("div",{style:{marginBottom:"4px"}},!!(e&2)&&o(uN,null),!!(e&1)&&o(pN,null)))},flux:{PRESENCE_UPDATES:qb,GUILD_CREATE:ef,GUILD_DELETE:ef},start(){Ps(0,this.renderIndicator),qb(),ef()},stop(){Is(0,this.renderIndicator)}})});var Jb=g(()=>{});function eT(e){Ke(t=>o(qe,{...t,size:"medium"},o(mN,{guild:e})))}function Vb(e){return o(Hn,{timestamp:hn(e)})}function mN({guild:e}){let[t,n]=J(),[r,i]=J();_e(()=>{Dl.friends=!1,Dl.blocked=!1},[]);let[s,l]=J(0),c=e.banner&&El.getGuildBannerURL({id:e.id,banner:e.banner},!0).replace(/\?size=\d+$/,"?size=1024"),u=e.icon&&El.getGuildIconURL({id:e.id,icon:e.icon,canAnimate:!0,size:512});return o("div",{className:on("root")},c&&s===0&&o("img",{className:on("banner"),src:c,alt:"",onClick:()=>Bn(c)}),o("div",{className:on("header")},e.icon?o("img",{src:u,alt:"",onClick:()=>Bn(u)}):o("div",{"aria-hidden":!0,className:re(Qb.childWrapper,Qb.acronym)},e.acronym),o("div",{className:on("name-and-description")},o(S.FormTitle,{tag:"h5",className:on("name")},e.name),e.description&&o(S.FormText,null,e.description))),o(Nn,{type:"top",look:"brand",className:on("tab-bar"),selectedItem:s,onItemSelect:l},o(Nn.Item,{className:on("tab",{selected:s===0}),id:0},"Server Info"),o(Nn.Item,{className:on("tab",{selected:s===1}),id:1},"Friends",t!==void 0?` (${t})`:""),o(Nn.Item,{className:on("tab",{selected:s===2}),id:2},"Blocked Users",r!==void 0?` (${r})`:"")),o("div",{className:on("tab-content")},s===0&&o(gN,{guild:e}),s===1&&o(hN,{guild:e,setCount:n}),s===2&&o(yN,{guild:e,setCount:i})))}function fN(e,t){let n=Le.getMember(e,t.id)?.avatar,r=n?El.getGuildMemberAvatarURLSimple({userId:t.id,avatar:n,guildId:e,canAnimate:!0},!0):El.getUserAvatarURL(t,!0);return o("div",{className:on("owner")},o("img",{src:r,alt:"",onClick:()=>Bn(r)}),$e.parse(`<@${t.id}>`))}function gN({guild:e}){let[t]=ot(()=>Et.getUser(e.ownerId),{deps:[e.ownerId],fallbackValue:null}),n={"Server Owner":t?fN(e.id,t):"Loading...","Created At":Vb(jn.extractTimestamp(e.id)),"Joined At":e.joinedAt?Vb(e.joinedAt.getTime()):"-","Vanity Link":e.vanityURLCode?o("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:$r.getChannels(e.id)?.count-1||"?",Roles:Object.keys(e.roles).length-1};return o("div",{className:on("info")},Object.entries(n).map(([r,i])=>o("div",{className:on("server-info-pair"),key:r},o(S.FormTitle,{tag:"h5"},r),typeof i=="string"?o("span",null,i):i)))}function hN({guild:e,setCount:t}){return tT("friends",e,nt.getFriendIDs(),t)}function yN({guild:e,setCount:t}){let n=Object.keys(nt.getRelationships()).filter(r=>nt.isBlocked(r));return tT("blocked",e,n,t)}function tT(e,t,n,r){let i=[],s=[];for(let l of n)Le.isMember(t.id,l)?s.push(l):i.push(l);return We([Le],()=>Le.getMemberIds(t.id),null,(l,c)=>l.length===c.length),_e(()=>{!Dl[e]&&i.length&&(Dl[e]=!0,B.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[t.id],userIds:i}))},[]),_e(()=>r(s.length),[s.length]),o(Dr,{fade:!0,className:on("scroller")},s.map(l=>o(dN,{user:W.getUser(l),status:zn.getStatus(l)||"offline",onSelect:()=>Fn(l),onContextMenu:()=>{}})))}var El,Qb,dN,on,Dl,nT=g(()=>{"use strict";a();Jb();Ve();It();Be();dt();Oe();j();I();El=A("getGuildBannerURL"),Qb=A("icon","acronym","childWrapper"),dN=me(()=>yt("FriendRow").FriendRow),on=Ge("vc-gp-");Dl={friends:!1,blocked:!1}});var oT,of,rT=g(()=>{"use strict";a();Mt();P();M();I();nT();oT=(e,{guild:t})=>()=>{mt("privacy",e)?.push(o(U.MenuItem,{id:"vc-server-profile",label:"Server Info",action:()=>eT(t)}))},of=y({name:"ServerProfile",description:"Allows you to view info about a server by right clicking it in the server list",authors:[p.Ven,p.Nuckyz],tags:["guild","info"],start(){ue(["guild-context","guild-header-popout"],oT)},stop(){fe(["guild-context","guild-header-popout"],oT)}})});var iT=g(()=>{});var sT,aT=g(()=>{a();sT=`/* 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 }) => <>

{\`Shigg\${real ? \`ies\${shigged === 0x1B ? "t" : ""}\` : "y"}\`}

; `});var cT=rr((CY,rf)=>{"use strict";a();var vN=Object.prototype.hasOwnProperty,Kt="~";function ks(){}Object.create&&(ks.prototype=Object.create(null),new ks().__proto__||(Kt=!1));function SN(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function lT(e,t,n,r,i){if(typeof n!="function")throw new TypeError("The listener must be a function");var s=new SN(n,r||e,i),l=Kt?Kt+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 Ol(e,t){--e._eventsCount===0?e._events=new ks:delete e._events[t]}function Ot(){this._events=new ks,this._eventsCount=0}Ot.prototype.eventNames=function(){var t=[],n,r;if(this._eventsCount===0)return t;for(r in n=this._events)vN.call(n,r)&&t.push(Kt?r.slice(1):r);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(n)):t};Ot.prototype.listeners=function(t){var n=Kt?Kt+t:t,r=this._events[n];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,l=new Array(s);i{"use strict";a();Object.defineProperty(hi,"__esModule",{value:!0});hi.Channel=hi.ChannelPort=void 0;var bN=cT(),_l="vapIpc",sf=Symbol.for("vapIpc.edgeCreate"),af=class{_pipes=new Map;_listeners=new Map;_createListenerMap(){return new Map}_emit(t,n,...r){for(let[i,s]of this._listeners.entries()){if(i===t)continue;let l=s.get(n);l&&l(...r)}}createPipe(t){let n=this.getPipe(t);if(n)return n;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}};hi.ChannelPort=af;var lf=class{id;_edges=new Map;_callbacks=new Map;_callers=new Map;_edgePipes=new Map;_pipes=[];_emitter=new bN.EventEmitter;_logger;_destroyed=!1;constructor(t){this.id=t}addPipe(t){t.listen(`${_l}:handshake`,n=>{this._handleHandshake(t,n)}),t.listen(`${_l}:message`,n=>{this._handleMessage(t,n)}),this._pipes.push(t),this._logger?.log(`Adding pipe to channel "${this.id}"`)}setLogger(t){this._logger=t}_handleHandshake(t,n){if(this.id===n.id)return;this._logger?.log(`\u{1F91D} "${n.id}" -> "${this.id}" (edges: [${n.channelIds.join(", ")}])`);let r=this._edges.get(n.id);if(r){let i=n.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(n.id,{...n,channelIds:[...r.channelIds,...i]})}else{let i=[...n.channelIds].filter(s=>s!==this.id);this._edges.set(n.id,{...n,channelIds:i}),this._edgePipes.set(n.id,t)}this._emitter.emit(sf,n),this.handshakeAll()}_handleMessage(t,n){if(n.proxiedBy===this.id)return;if(n.destination!==this.id)return this._emitMessage({...n,proxiedBy:this.id});if(!n.nonce)return void this._emitter.emit(n.name,n.data);let r=this._callbacks.get(n.nonce);if(r)return void r(n.data);let i=this._callers.get(n.name);if(i){i(n.data).catch(s=>(console.error(s),new Error(s?.message??`${s}`))).then(s=>{this._emitMessage({name:n.name,source:this.id,destination:n.source,data:s,nonce:n.nonce})});return}}_emitHandshake(t){let n=this.getEdge();t.emit(`${_l}:handshake`,n)}_emitMessage(t){let n=this.findEdgeId(t.destination);if(!n)return;this._edgePipes.get(n)?.emit(`${_l}:message`,t)}getEdge(){let t=[...this._edges.keys(),...[...this._edges.values()].map(n=>n.channelIds).flat()].filter((n,r,i)=>i.indexOf(n)===r);return{id:this.id,channelIds:t}}findEdgeId(t){for(let n of this._edges.values())if(n.id===t||n.channelIds.includes(t))return n.id;return null}waitForEdge(t){let n=this.findEdgeId(t);return n?Promise.resolve(n):new Promise(r=>{let i=s=>{(s.id===t||s.channelIds.includes(t))&&(this._emitter.off(sf,i),r(s.id))};this._emitter.on(sf,i)})}createNonce(){return Math.random().toString(16).slice(2)}send(t){this._emitMessage({...t,source:this.id})}call(t,n={timeout:1e4}){let r=this.createNonce(),i=new Promise((s,l)=>{let c=setTimeout(()=>{this._callbacks.delete(r),l(new Error("Call timed out"))},n.timeout);this._callbacks.set(r,u=>{this._callbacks.delete(r),clearTimeout(c),n.signal?.aborted?n.signal.reason instanceof Error&&l(n.signal.reason):u instanceof Error?l(u):s(u)})});return this._emitMessage({...t,source:this.id,nonce:r}),i}on(t,n){return this._emitter.on(t,n),this}off(t,n){return this._emitter.off(t,n),this}once(t,n){this._emitter.once(t,n)}onCall(t,n){this._callers.set(t,async(...r)=>await n(...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}};hi.Channel=lf});var df=rr(yi=>{"use strict";a();Object.defineProperty(yi,"__esModule",{value:!0});yi.RemoteClient=yi.RemoteHost=void 0;var uf=class{channel;constructor(t,n){this.channel=t;for(let[r,i]of Object.entries(n))t.onCall(r,async s=>await i(...s));t.handshakeAll()}};yi.RemoteHost=uf;var pf=class{hostName;channel;constructor(t,n){this.hostName=t,this.channel=n}async connect(){await this.channel.waitForEdge(this.hostName)}run(t,...n){return this.channel.call({name:t,destination:this.hostName,data:n})}};yi.RemoteClient=pf});var dT=rr(vi=>{"use strict";a();Object.defineProperty(vi,"__esModule",{value:!0});vi.WorkerClient=vi.createWorkerHost=void 0;var uT=cf(),pT=df(),TN=(e,t)=>{let n=new uT.Channel(e);return n.addPipe({emit:(r,i)=>postMessage({event:r,data:i}),listen:(r,i)=>addEventListener("message",({data:s})=>{s.event===r&&i(s.data)})}),new pT.RemoteHost(n,t)};vi.createWorkerHost=TN;var mf=class extends pT.RemoteClient{workerOpts;worker;workerListeners=[];url;constructor(t,n,r,i={}){let s=new uT.Channel(t);if(super(n,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:(n,r)=>t.postMessage({event:n,data:r}),listen:(n,r)=>{let i=s=>{let{event:l,data:c}=s.data;l===n&&r(c)};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)}};vi.WorkerClient=mf});var mT=rr(So=>{"use strict";a();var xN=So&&So.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),ff=So&&So.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&xN(t,e,n)};Object.defineProperty(So,"__esModule",{value:!0});ff(cf(),So);ff(df(),So);ff(dT(),So)});function hf(e){Bl.id!==e.id&&(Object.assign(Bl,e),gf.forEach(t=>t(e)))}var Bl,gf,fT,yf=g(()=>{"use strict";a();I();Bl={id:null,theme:null},gf=new Set,fT=()=>{let[,e]=O.useState(Bl);return O.useEffect(()=>(gf.add(e),()=>void gf.delete(e)),[]),Bl}});function Cr(e){if(Object.prototype.hasOwnProperty.call(Si,e))return Si[e];let t=Object.values(Si).find(n=>n.aliases?.includes(e));return t?(AN.set(e,t),t):null}var wN,MN,gT,PN,IN,Si,hT,yT,AN,Fl=g(()=>{"use strict";a();wN="Vap0r1ze/vapcord",MN="88a7032a59cca40da170926651b08201ea3b965a",gT=`https://raw.githubusercontent.com/${wN}/${MN}/assets/shiki-codeblocks`,PN=e=>`${gT}/${e}`,IN=`${gT}/languages.json`,Si={},hT=async()=>{let e=await fetch(IN).then(n=>n.json()),t=Object.fromEntries(e.map(n=>[n.id,{...n,grammarUrl:PN(n.fileName)}]));Object.assign(Si,t)},yT=e=>e.grammar?Promise.resolve(e.grammar):fetch(e.grammarUrl).then(t=>t.json()),AN=new Map});var NN,CN,je,bo,vf=g(()=>{"use strict";a();NN="shikijs/shiki",CN="0b28ad8ccfbf2615f2d9d38ea8255416b8ac3043",je=e=>`https://raw.githubusercontent.com/${NN}/${CN}/packages/shiki/themes/${e}.json`,bo={DarkPlus:je("dark-plus"),MaterialCandy:"https://raw.githubusercontent.com/millsp/material-candy/master/material-candy.json",DraculaSoft:je("dracula-soft"),Dracula:je("dracula"),GithubDarkDimmed:je("github-dark-dimmed"),GithubDark:je("github-dark"),GithubLight:je("github-light"),LightPlus:je("light-plus"),MaterialDarker:je("material-darker"),MaterialDefault:je("material-default"),MaterialLighter:je("material-lighter"),MaterialOcean:je("material-ocean"),MaterialPalenight:je("material-palenight"),MinDark:je("min-dark"),MinLight:je("min-light"),Monokai:je("monokai"),Nord:je("nord"),OneDarkPro:je("one-dark-pro"),Poimandres:je("poimandres"),RosePineDawn:je("rose-pine-dawn"),RosePineMoon:je("rose-pine-moon"),RosePine:je("rose-pine"),SlackDark:je("slack-dark"),SlackOchin:je("slack-ochin"),SolarizedDark:je("solarized-dark"),SolarizedLight:je("solarized-light"),VitesseDark:je("vitesse-dark"),VitesseLight:je("vitesse-light"),CssVariables:je("css-variables")}});var ST,Sf,vT,ve,Rs=g(()=>{"use strict";a();Wa();ST=zs(mT());yf();Fl();vf();Sf=Object.values(bo),ve={client:null,currentTheme:null,currentThemeUrl:null,timeoutMs:1e4,languages:Si,themes:bo,loadedThemes:new Set,loadedLangs:new Set,clientPromise:new Promise(e=>vT=e),init:async e=>{let t=await fetch(d1).then(i=>i.blob()),n=ve.client=new ST.WorkerClient("shiki-client","shiki-host",t,{name:"ShikiWorker"});await n.init();let r=e||Sf[0];await hT(),await n.run("setOnigasm",{wasm:m1}),await n.run("setHighlighter",{theme:r,langs:[]}),ve.loadedThemes.add(r),await ve._setTheme(r),vT(n)},_setTheme:async e=>{ve.currentThemeUrl=e;let{themeData:t}=await ve.client.run("getTheme",{theme:e});ve.currentTheme=JSON.parse(t),hf({id:e,theme:ve.currentTheme})},loadTheme:async e=>{let t=await ve.clientPromise;ve.loadedThemes.has(e)||(await t.run("loadTheme",{theme:e}),ve.loadedThemes.add(e))},setTheme:async e=>{await ve.clientPromise,e||=Sf[0],ve.loadedThemes.has(e)||await ve.loadTheme(e),await ve._setTheme(e)},loadLang:async e=>{let t=await ve.clientPromise,n=Cr(e);!n||ve.loadedLangs.has(n.id)||(await t.run("loadLanguage",{lang:{...n,grammar:n.grammar??await yT(n)}}),ve.loadedLangs.add(n.id))},tokenizeCode:async(e,t)=>{let n=await ve.clientPromise,r=Cr(t);return r?(ve.loadedLangs.has(r.id)||await ve.loadLang(r.id),await n.run("codeToThemedTokens",{code:e,lang:t,theme:ve.currentThemeUrl??Sf[0]})):[]},destroy(){ve.currentTheme=null,ve.currentThemeUrl=null,hf({id:null,theme:null}),ve.client?.destroy()}}});var Ls,bf=g(()=>{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});Ls="src/plugins/shikiCodeblocks.desktop/devicon.css"});var Es=g(()=>{"use strict";a()});var RN,Xo,Tf=g(()=>{"use strict";a();$();Ve();Be();lo();M();Rs();vf();bf();Es();RN=Object.keys(bo),Xo=D({theme:{type:4,description:"Default themes",options:RN.map(e=>({label:ao(hu(e)),value:bo[e],default:bo[e]===bo.DarkPlus})),onChange:ve.setTheme},customTheme:{type:0,description:"A link to a custom vscode theme",placeholder:bo.MaterialCandy,onChange:e=>{ve.setTheme(e||Xo.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"?$t(Ls):St(Ls)}},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=fc(e);return t?t.pathname.endsWith(".json")?!0:"Must be a json file":"Must be a valid URL"}}})});function TT(e,t){let n=Xo.use(e),[r,i]=O.useState(!1),s={...n,...t},l=s.customTheme||s.theme;if(t){let c=ve.currentThemeUrl&&l&&l!==ve.currentThemeUrl,u=Object.keys(t).length===0;r&&(!c||u)&&i(!1),!r&&c&&(i(!0),ve.setTheme(l))}return{...s,isThemeLoading:l!==ve.currentThemeUrl}}var xT=g(()=>{"use strict";a();I();Rs();Tf()});function wT(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 MT=g(()=>{"use strict";a()});var Gn,PT,Ds=g(()=>{"use strict";a();Ve();I();Fl();Es();Gn=Ge("shiki-"),PT=({lang:e,tryHljs:t})=>{let n=e?lr?.getLanguage?.(e):null,i=(e?Cr(e):null)?.name;switch(t){case"ALWAYS":return!0;case"PRIMARY":return!!n||e==="";case"SECONDARY":return!i&&!!n;case"NEVER":return!1;default:return!1}}});function IT(e){let[t,n]=O.useState(!1);function r(i){Qt.copy(i),n(!0),setTimeout(()=>{n(!1)},e)}return[t,r]}var AT=g(()=>{"use strict";a();I()});function NT({content:e,...t}){let[n,r]=IT(1e3);return o("button",{...t,style:{...t.style,cursor:n?"default":void 0},onClick:()=>r(e)},n?"Copied!":"Copy")}var CT=g(()=>{"use strict";a();AT()});function kT({content:e,theme:t}){let n=[];return Qt.SUPPORTS_COPY&&n.push(o(NT,{content:e,className:Gn("btn"),style:{backgroundColor:t.accentBgColor,color:t.accentFgColor}})),o("div",{className:Gn("btns")},n)}var RT=g(()=>{"use strict";a();I();Ds();CT()});var LT,ET=g(()=>{"use strict";a();I();Ds();LT=({theme:e,useHljs:t,lang:n,content:r,tokens:i})=>{let s;if(t)try{let{value:c}=lr.highlight(n,r,!0);s=c.split(` `).map((u,d)=>o("span",{key:d,dangerouslySetInnerHTML:{__html:u}}))}catch{s=r.split(` `).map(c=>o("span",null,c))}else s=(i??r.split(` `).map(u=>[{color:e.plainColor,content:u}])).map(u=>u.length===0?o("span",null,` `):o(f,null,u.map(({content:d,color:m,fontStyle:h},v)=>o("span",{key:v,style:{color:m,fontStyle:(h??0)&1?"italic":void 0,fontWeight:(h??0)&2?"bold":void 0,textDecoration:(h??0)&4?"underline":void 0}},d))));let l=s.map((c,u)=>o("tr",{key:u},o("td",{style:{color:e.plainColor}},u+1),o("td",null,c)));return o("table",{className:Gn("table")},...l)}});function DT({langName:e,useDevIcon:t,shikiLang:n}){return e?o("div",{className:Gn("lang")},t!=="DISABLED"&&n?.devicon&&o("i",{className:`${Gn("devicon")} devicon-${n.devicon}${t==="COLOR"?" colored":""}`}),e):o(f,null)}var OT=g(()=>{"use strict";a();Es();Ds()});var Ul,LN,_T=g(()=>{"use strict";a();le();Oe();I();Fl();Rs();xT();yf();MT();Ds();RT();ET();OT();Ul=e=>o("pre",{className:Gn("container")},o(_,null,o(LN,{...e}))),LN=({lang:e,content:t,isPreview:n,tempSettings:r})=>{let{tryHljs:i,useDevIcon:s,bgOpacity:l}=TT(["tryHljs","useDevIcon","bgOpacity"],r),{id:c,theme:u}=fT(),d=e?Cr(e):null,m=PT({lang:e,tryHljs:i}),[h,v]=hc(!0),[T]=ot(async()=>!d||m||!v?null:await ve.tokenizeCode(t,e),{fallbackValue:null,deps:[e,t,c,v]}),w={plainColor:u?.fg||"var(--text-normal)",accentBgColor:u?.colors?.["statusBar.background"]||(m?"#7289da":"#007BC8"),accentFgColor:u?.colors?.["statusBar.foreground"]||"#FFF",backgroundColor:u?.colors?.["editor.background"]||"var(--background-secondary)"},b;return e&&(b=m?lr?.getLanguage?.(e)?.name:d?.name),o("div",{ref:h,className:Gn("root",{plain:!b,preview:n}),style:{backgroundColor:m?w.backgroundColor:`rgba(${wT(w.backgroundColor).concat(l/100).join(", ")})`,color:w.plainColor}},o("code",null,o(DT,{langName:b,useDevIcon:s,shikiLang:d}),o(LT,{theme:w,useHljs:m,lang:e,content:t,tokens:T}),!n&&o(kT,{content:t,theme:w})))}});var BT,FT,UT=g(()=>{"use strict";a();BT=new Map,FT=()=>{BT.forEach(e=>e.remove()),BT.clear()}});var xf,$T=g(()=>{"use strict";a();iT();Ve();P();M();aT();Rs();_T();bf();Tf();Es();UT();xf=y({name:"ShikiCodeblocks",description:"Brings vscode-style codeblocks into Discord, powered by Shiki",authors:[p.Vap],patches:[{find:"codeBlock:{react(",replacement:{match:/codeBlock:\{react\((\i),(\i),(\i)\)\{/,replace:"$&return $self.renderHighlighter($1,$2,$3);"}}],start:async()=>{Xo.store.useDevIcon!=="DISABLED"&&St(Ls),await ve.init(Xo.store.customTheme||Xo.store.theme)},stop:()=>{ve.destroy(),FT()},settingsAboutComponent:({tempSettings:e})=>Ul({lang:"tsx",content:sT,isPreview:!0,tempSettings:e}),settings:Xo,shiki:ve,createHighlighter:Ul,renderHighlighter:({lang:e,content:t})=>Ul({lang:e,content:t,isPreview:!1})})});var wf,GT=g(()=>{"use strict";a();P();M();wf=y({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 HT=g(()=>{});function jT(){let e=Ni(zT.colors.INTERACTIVE_MUTED).hex(),t=Ni(zT.colors.INTERACTIVE_ACTIVE).hex();return o(EN,{color:e,forcedIconColor:t,size:16,tooltipText:Ct.Messages.CONNECTION_VERIFIED})}var zT,EN,WT=g(()=>{"use strict";a();Oe();j();I();zT=Lt(e=>e.colors?.INTERACTIVE_MUTED?.css),EN=me(()=>Bt(".CONNECTIONS_ROLE_OFFICIAL_ICON_TOOLTIP"))});function qT({id:e,theme:t}){let n=rn.getUserProfile(e);if(!n)return null;let r=n.connectedAccounts;return r?.length?o(DN,null,o(oe,{tag:"h2",variant:"eyebrow",style:{color:"var(--header-primary)"}},"Connections"),o(ye,{style:{marginTop:"8px",gap:FN($l.store.iconSpacing),flexWrap:"wrap"}},r.map(i=>o(GN,{connection:i,theme:t})))):null}function GN({connection:e,theme:t}){let n=_N.get(e.type),r=n.getPlatformUserUrl?.(e),i=o("img",{"aria-label":e.name,src:t==="light"?n.icon.lightSVG:n.icon.darkSVG,style:{width:$l.store.iconSize,height:$l.store.iconSize}}),s=r?Vr:gy;return o(V,{text:o("span",{className:"vc-sc-tooltip"},e.name,e.verified&&o(jT,null),o(s,{height:16,width:16})),key:e.id},l=>r?o("a",{...l,className:"vc-user-connection",href:r,target:"_blank",onClick:c=>{Vencord.Plugins.isPluginEnabled("OpenInApp")&&Vencord.Plugins.plugins.OpenInApp.handleLink(c.currentTarget,c)}},i):o("button",{...l,className:"vc-user-connection",onClick:()=>vn(e.name)},i))}var DN,ON,_N,BN,FN,$l,UN,$N,Mf,KT=g(()=>{"use strict";a();HT();$();le();Dt();Ht();P();Be();Oe();M();j();I();WT();DN=me(()=>Bt(".lastSection]:")),ON=Ie("ThemeStore"),_N=A("isSupported","getByUrl"),BN=to(',"--profile-gradient-primary-color"'),FN=e=>(e??0)*2+4,$l=D({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}]}}),UN=_.wrap(({user:e,displayProfile:t})=>o(qT,{id:e.id,theme:BN(e,t).profileTheme})),$N=_.wrap(({id:e})=>o(qT,{id:e,theme:ON.theme}));Mf=y({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: user cannot be undefined"',replacement:{match:/\(0,\i\.jsx\)\(\i\.\i,\{\}\).{0,100}setNote:(?=.+?channelId:(\i).id)/,replace:"$self.profilePanelComponent({ id: $1.recipients[0] }),$&"}}],settings:$l,profilePopoutComponent:UN,profilePanelComponent:$N})});var YT=g(()=>{});function QN({channel:e}){let[t,n]=J(Jo.store.defaultAllowedUsersAndRolesDropdownState),[r,i]=J([]),{type:s,topic:l,lastMessageId:c,defaultForumLayout:u,lastPinTimestamp:d,defaultAutoArchiveDuration:m,availableTags:h,id:v,rateLimitPerUser:T,defaultThreadRateLimitPerUser:w,defaultSortOrder:b,defaultReactionEmoji:x,bitrate:N,rtcRegion:k,videoQualityMode:F,permissionOverwrites:G,guild_id:K}=e;return _e(()=>{let q=[],z=we.getGuild(K).ownerId;Le.getMember(K,z)||q.push(z),Object.values(G).forEach(({type:R,id:X})=>{R===1&&!Le.getMember(K,X)&&q.push(X)}),q.length>0&&B.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[K],userIds:q}),L.plugins.PermissionsViewer.enabled&&i(ml(Object.values(G).map(R=>({type:R.type,id:R.id,overwriteAllow:R.allow,overwriteDeny:R.deny})),K))},[v]),o("div",{className:ZT.auto+" "+ZT.customTheme+" "+HN.chatContent+" shc-lock-screen-outer-container"},o("div",{className:"shc-lock-screen-container"},o("img",{className:"shc-lock-screen-logo",src:JN}),o("div",{className:"shc-lock-screen-heading-container"},o(oe,{variant:"heading-xxl/bold"},"This is a ",Re.can(Te.VIEW_CHANNEL,e)?"locked":"hidden"," ",KN[s]," channel."),e.isNSFW()&&o(V,{text:"NSFW"},({onMouseLeave:q,onMouseEnter:z})=>o("svg",{onMouseLeave:q,onMouseEnter:z,className:"shc-lock-screen-heading-nsfw-icon",width:"32",height:"32",viewBox:"0 0 48 48","aria-hidden":!0,role:"img"},o("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()&&o(oe,{variant:"text-lg/normal"},"You can not see the ",e.isForumChannel()?"posts":"messages"," of this channel.",e.isForumChannel()&&l&&l.length>0&&" However you may see its guidelines:"),e.isForumChannel()&&l&&l.length>0&&o("div",{className:"shc-lock-screen-topic-container"},$e.parseTopic(l,!1,{channelId:v})),c&&o(oe,{variant:"text-md/normal"},"Last ",e.isForumChannel()?"post":"message"," created:",o(Hn,{timestamp:hn(jn.extractTimestamp(c))})),d&&o(oe,{variant:"text-md/normal"},"Last message pin: ",o(Hn,{timestamp:hn(d)})),(T??0)>0&&o(oe,{variant:"text-md/normal"},"Slowmode: ",Qi(T,"seconds")),(w??0)>0&&o(oe,{variant:"text-md/normal"},"Default thread slowmode: ",Qi(w,"seconds")),(e.isGuildVoice()||e.isGuildStageVoice())&&N!=null&&o(oe,{variant:"text-md/normal"},"Bitrate: ",N," bits"),k!==void 0&&o(oe,{variant:"text-md/normal"},"Region: ",k??"Automatic"),(e.isGuildVoice()||e.isGuildStageVoice())&&o(oe,{variant:"text-md/normal"},"Video quality mode: ",XN[F??1]),(m??0)>0&&o(oe,{variant:"text-md/normal"},"Default inactivity duration before archiving ",e.isForumChannel()?"posts":"threads",":"," "+Qi(m,"minutes")),u!=null&&o(oe,{variant:"text-md/normal"},"Default layout: ",ZN[u]),b!=null&&o(oe,{variant:"text-md/normal"},"Default sort order: ",YN[b]),x!=null&&o("div",{className:"shc-lock-screen-default-emoji-container"},o(oe,{variant:"text-md/normal"},"Default reaction emoji:"),$e.defaultRules[x.emojiName?"emoji":"customEmoji"].react({name:x.emojiName?WN.convertSurrogateToName(x.emojiName):kn.getCustomEmojiById(x.emojiId)?.name??"",emojiId:x.emojiId??void 0,surrogate:x.emojiName??void 0,src:x.emojiName?qN.getURL(x.emojiName):void 0},void 0,{key:"0"})),e.hasFlag(16)&&o(oe,{variant:"text-md/normal"},"Posts on this forum require a tag to be set."),h&&h.length>0&&o("div",{className:"shc-lock-screen-tags-container"},o(oe,{variant:"text-lg/bold"},"Available tags:"),o("div",{className:"shc-lock-screen-tags"},h.map(q=>o(jN,{tag:q})))),o("div",{className:"shc-lock-screen-allowed-users-and-roles-container"},o("div",{className:"shc-lock-screen-allowed-users-and-roles-container-title"},L.plugins.PermissionsViewer.enabled&&o(V,{text:"Permission Details"},({onMouseLeave:q,onMouseEnter:z})=>o("button",{onMouseLeave:q,onMouseEnter:z,className:"shc-lock-screen-allowed-users-and-roles-container-permdetails-btn",onClick:()=>ui(r,we.getGuild(e.guild_id),e.name)},o("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},o("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"})))),o(oe,{variant:"text-lg/bold"},"Allowed users and roles:"),o(V,{text:t?"Hide Allowed Users and Roles":"View Allowed Users and Roles"},({onMouseLeave:q,onMouseEnter:z})=>o("button",{onMouseLeave:q,onMouseEnter:z,className:"shc-lock-screen-allowed-users-and-roles-container-toggle-btn",onClick:()=>n(R=>!R)},o("svg",{width:"24",height:"24",viewBox:"0 0 24 24",transform:t?"scale(1 -1)":"scale(1 1)"},o("path",{fill:"currentColor",d:"M16.59 8.59003L12 13.17L7.41 8.59003L6 10L12 16L18 10L16.59 8.59003Z"}))))),t&&o(zN,{channel:e}))))}var ZT,HN,zN,jN,WN,qN,KN,YN,ZN,XN,JN,XT,JT=g(()=>{"use strict";a();$();le();Oe();lo();j();I();xs();Ts();Pf();ZT=A("auto","content","scrollerBase"),HN=A("chat","content","noChat","chatContent"),zN=me(()=>Bt(".Messages.ROLE_REQUIRED_SINGLE_USER_MESSAGE")),jN=me(()=>st(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")})),WN=A("convertSurrogateToName"),qN=A("getURL","buildEmojiReactionColorsPlatformed"),KN={[0]:"text",[5]:"announcement",[15]:"forum",[2]:"voice",[13]:"stage"},YN={[0]:"Latest activity",[1]:"Creation date"},ZN={[0]:"Not set",[1]:"List view",[2]:"Gallery view"},XN={[1]:"Automatic",[2]:"720p"},JN="/assets/433e3ec4319a9d11b0cbe39342614982.svg";XT=_.wrap(QN)});var QT,Jo,If,Pf=g(()=>{"use strict";a();YT();$();le();P();cs();M();j();I();JT();QT=A("channelEmoji","unread","icon"),Jo=D({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}}),If=y({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:Jo,patches:[{find:".CannotShow=",replacement:[{match:/if\(!\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL.+?{if\(this\.id===\i\).+?threadIds:\i}}/,replace:""},{match:/(?=!1===\i.\i\.hasRelevantUnread\(this\.record\))/,replace:"$self.isHiddenChannel(this.record)||"},{match:/(?<=renderLevel:(\i\(this,\i\)\?\i\.Show:\i\.WouldShowIfUncollapsed).+?renderLevel:).+?(?=,)/,replace:(e,t)=>t},{match:/(?<=activeJoinedRelevantThreads.+?renderLevel:.+?,threadIds:\i\(this.record.+?renderLevel:)(\i)\..+?(?=,)/,replace:(e,t)=>`${t}.Show`},{match:/(?<=getRenderLevel\(\i\){.+?return)!\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL,this\.record\)\|\|/,replace:" "}]},{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:".MAX_STAGE_VOICE_USER_LIMIT})",replacement:{match:/!(\i)\.isRoleSubscriptionTemplatePreviewChannel\(\)/,replace:(e,t)=>`${e}&&!$self.isHiddenChannel(${t})`}},{find:"ChannelItemEditButton:function(){",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:()=>Jo.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_HIGHLIGHT",predicate:()=>Jo.store.showMode===1,replacement:[{match:/(?<={channel:(\i),name:\i,muted:(\i).+?;)/,replace:(e,t,n)=>`${n}=$self.isHiddenChannel(${t})?true:${n};`},{match:/\i\.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,n,r)=>`${n}?${r}:"",${t}if(${n})return "";`}]},{find:".UNREAD_HIGHLIGHT",replacement:[{predicate:()=>Jo.store.hideUnreads===!1&&Jo.store.showMode===1,match:/\.LOCKED;if\((?<={channel:(\i).+?)/,replace:(e,t)=>`${e}!$self.isHiddenChannel(${t})&&`},{predicate:()=>Jo.store.hideUnreads===!0,match:/(?<={channel:(\i),name:\i,.+?unread:(\i).+?;)/,replace:(e,t,n)=>`${n}=$self.isHiddenChannel(${t})?false:${n};`}]},{find:'.displayName="ChannelListUnreadsStore"',replacement:{match:/(?<=if\(null==(\i))(?=.{0,160}?hasRelevantUnread\(\i\))/g,replace:(e,t)=>`||$self.isHiddenChannel(${t})`}},{find:"renderBottomUnread(){",replacement:{match:/(?=&&\i\.\i\.hasRelevantUnread\((\i\.record)\))/,replace:"&&!$self.isHiddenChannel($1)"}},{find:".useFlattenedChannelIdListWithThreads)",replacement:{match:/(?=&&\i\.\i\.hasRelevantUnread\((\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,n,r)=>`if(!${r}&&$self.isHiddenChannel(${n})){${t};break;}`},{match:/(?<=renderHeaderToolbar=\(\)=>{.+?case \i\.\i\.GUILD_MEDIA:)(?=.+?(\i\.push.{0,40}channel:(\i)},"notifications"\)\)))(?<=isLurking:(\i).+?)/,replace:(e,t,n,r)=>`if(!${r}&&$self.isHiddenChannel(${n})){${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}?hasRelevantUnread\(\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,n)=>`${e}!Vencord.Webpack.Common.PermissionStore.can(${Te.CONNECT}n,${t})?${n}CONNECT):`},{match:/permissionOverwrites\[.+?\i=(?<=context:(\i)}.+?)(?=(.+?)VIEW_CHANNEL)/,replace:(e,t,n)=>`${e}!Vencord.Webpack.Common.PermissionStore.can(${Te.CONNECT}n,${t})?${n}CONNECT):`},{match:/sortBy.{0,30}?\.filter\(\i=>(?<=channel:(\i).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?true:`},{match:/computePermissionsForRoles.+?.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,n)=>(t=t.replace(xr(/(?<=users:\i)/),`,shcChannel:${n}`),t=t.replace(xr(/1!==\i\.length/),"true"),`${e} $self.isHiddenChannel(${n},true)?${t}:`)}]},{find:".avatars),children",replacement:[{match:/maxUsers:\i,users:\i.+?=(\i).+?;/,replace:(e,t)=>`${e}let{shcChannel}=${t};`},{match:/\i>0(?=&&.{0,60}renderPopout)/,replace:e=>`($self.isHiddenChannel(shcChannel,true)?true:${e})`},{match:/(?<=\.value\(\),(\i)=.+?length-)1(?=\]=.{0,60}renderPopout)/,replace:(e,t)=>`($self.isHiddenChannel(shcChannel,true)&&${t}<=0?0:1)`},{match:/(?<="\+",)(\i)\+1/,replace:(e,t)=>`$self.isHiddenChannel(shcChannel,true)&&${t}<=0?"":${e}`}]},{find:".Messages.CHANNEL_CALL_CURRENT_SPEAKER.format",replacement:[{match:/"more-options-popout"\)\),(?<=let{channel:(\i).+?inCall:(\i).+?)/,replace:(e,t,n)=>`${e}${n}||!$self.isHiddenChannel(${t},true)&&`},{match:/"popup".{0,100}?if\((?<=let{channel:(\i).+?inCall:(\i).+?)/,replace:(e,t,n)=>`${e}(${n}||!$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\){.+?isGuildChannelType\)\((\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:".shouldCloseDefaultModals",replacement:{match:/(?<=getChannel\(\i\);if\(null!=(\i))(?=.{0,100}?selectVoiceChannel)/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`}},{find:'.displayName="GuildChannelStore"',replacement:[{match:/isChannelGated\(.+?\)(?=&&)/,replace:e=>`${e}&&false`},{match:/(?<=getChannels\(\i)(\){.+?)return (.+?)}/,replace:(e,t,n)=>`,shouldIncludeHidden${t}return $self.resolveGuildChannels(${n},shouldIncludeHidden??false);}`}]},{find:".Messages.FORM_LABEL_MUTED",replacement:{match:/(?<=getChannels\(\i)(?=\))/,replace:",true"}},{find:'.displayName="NowPlayingViewStore"',replacement:{match:/(getVoiceStateForUser.{0,150}?)&&\i\.\i\.canWithPartialContext.{0,20}VIEW_CHANNEL.+?}\)(?=\?)/,replace:"$1"}}],isHiddenChannel(e,t=!1){return!e||(e.channelId&&(e=Q.getChannel(e.channelId)),!e||e.isDM()||e.isGroupDM()||e.isMultiUserDM())?!1:!Re.can(Te.VIEW_CHANNEL,e)||t&&!Re.can(Te.CONNECT,e)},resolveGuildChannels(e,t){if(t)return e;let n={};for(let[r,i]of Object.entries(e)){if(!Array.isArray(i)){n[r]=i;continue}n[r]??=[];for(let s of i)(s.channel.id===null||!this.isHiddenChannel(s.channel))&&n[r].push(s)}return n},makeAllowedRolesReduce(e){return[(t,n,r,i)=>{if(r!==0)return t;let s=i.find(l=>l.id===e);return s?[s]:i},[]]},HiddenChannelLockScreen:e=>o(XT,{channel:e}),LockIcon:_.wrap(()=>o("svg",{className:QT.icon,height:"18",width:"20",viewBox:"0 0 24 24","aria-hidden":!0,role:"img"},o("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:_.wrap(()=>o(V,{text:"Hidden Channel"},({onMouseLeave:e,onMouseEnter:t})=>o("svg",{onMouseLeave:e,onMouseEnter:t,className:QT.icon+" shc-hidden-channel-icon",width:"24",height:"24",viewBox:"0 0 24 24","aria-hidden":!0,role:"img"},o("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 VT=g(()=>{});var Os,Af,ex=g(()=>{"use strict";a();VT();$();P();M();Os=D({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"}}),Af=y({name:"ShowMeYourName",description:"Display usernames next to nicks, or no nicks at all",authors:[p.Rini,p.TheKodeToad],patches:[{find:".useCanSeeRemixBadge)",replacement:{match:/(?<=onContextMenu:\i,children:).*?\}/,replace:"$self.renderUsername(arguments[0])}"}}],settings:Os,renderUsername:({author:e,message:t,isRepliedMessage:n,withMentionPrefix:r,userOverride:i})=>{try{let s=i??t.author,{username:l}=s;Os.store.displayNames&&(l=s.globalName||l);let{nick:c}=e,u=r?"@":"";return l===c||n&&!Os.store.inReplies?u+c:Os.store.mode==="user-nick"?o(f,null,u,l," ",o("span",{className:"vc-smyn-suffix"},c)):Os.store.mode==="nick-user"?o(f,null,u,c," ",o("span",{className:"vc-smyn-suffix"},l)):u+l}catch{return e?.nick}}})});var Nf,tx=g(()=>{"use strict";a();P();M();Nf=y({name:"ShowTimeouts",description:"Display member timeout icons in chat regardless of permissions.",authors:[p.Dolfies],patches:[{find:"showCommunicationDisabledStyles",replacement:{match:/&&\i\.\i\.canManageUser\(\i\.\i\.MODERATE_MEMBERS,\i\.author,\i\)/,replace:""}}]})});function VN(e){let[t,n]=O.useState(Cf);function r(i){kf.store.persistState&&(Cf=i),n(i)}return O.useEffect(()=>{let i=(s,l)=>{t&&(kf.store.autoDisable&&r(!1),l.content.startsWith("@silent ")||(l.content="@silent "+l.content))};return jt(i),()=>void Wt(i)},[t]),e.type.analyticsName!=="normal"?null:o(V,{text:t?"Disable Silent Message":"Enable Silent Message"},i=>o("div",{style:{display:"flex"}},o(E,{...i,onClick:()=>r(!t),size:"",look:Xt.BLANK,innerClassName:vt.button,style:{padding:"0 6px"}},o("div",{className:vt.buttonWrapper},o("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},o("g",{fill:"currentColor"},o("path",{d:"M18 10.7101C15.1085 9.84957 13 7.17102 13 4C13 3.69264 13.0198 3.3899 13.0582 3.093C12.7147 3.03189 12.3611 3 12 3C8.686 3 6 5.686 6 9V14C6 15.657 4.656 17 3 17V18H21V17C19.344 17 18 15.657 18 14V10.7101ZM8.55493 19C9.24793 20.19 10.5239 21 11.9999 21C13.4759 21 14.7519 20.19 15.4449 19H8.55493Z"}),o("path",{d:"M18.2624 5.50209L21 2.5V1H16.0349V2.49791H18.476L16 5.61088V7H21V5.50209H18.2624Z"}),!t&&o("line",{x1:"22",y1:"2",x2:"2",y2:"22",stroke:"var(--red-500)","stroke-width":"2.5"})))))))}var Cf,kf,Rf,nx=g(()=>{"use strict";a();Xn();$();le();P();M();I();Cf=!1,kf=D({persistState:{type:3,description:"Whether to persist the state of the silent message toggle when changing channels",default:!1,onChange(e){e===!1&&(Cf=!1)}},autoDisable:{type:3,description:"Automatically disable the silent message toggle again after sending one",default:!0}});Rf=y({name:"SilentMessageToggle",authors:[p.Nuckyz,p.CatNoir],description:"Adds a button to the chat bar to toggle sending a silent message.",dependencies:["MessageEventsAPI"],settings:kf,patches:[{find:"ChannelTextAreaButtons",replacement:{match:/(\i)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&,(()=>{try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}})()"}}],chatBarIcon:_.wrap(VN,{noop:!0})})});function eC(e){let{isEnabled:t}=To.use(["isEnabled"]),n=()=>To.store.isEnabled=!To.store.isEnabled;return e.type.analyticsName!=="normal"?null:o(V,{text:t?"Disable Silent Typing":"Enable Silent Typing"},r=>o("div",{style:{display:"flex"}},o(E,{...r,onClick:n,size:"",look:Xt.BLANK,innerClassName:vt.button,style:{padding:"0 6px"}},o("div",{className:vt.buttonWrapper},o("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},o("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&&o("path",{d:"M13 432L590 48",stroke:"var(--red-500)","stroke-width":"72","stroke-linecap":"round"}))))))}var To,Lf,ox=g(()=>{"use strict";a();tn();$();le();P();M();I();To=D({showIcon:{type:3,default:!1,description:"Show an icon for toggling the plugin",restartNeeded:!0},isEnabled:{type:3,description:"Toggle functionality",default:!0}});Lf=y({name:"SilentTyping",authors:[p.Ven,p.Rini],description:"Hide that you are typing",patches:[{find:'.dispatch({type:"TYPING_START_LOCAL"',replacement:{match:/startTyping\(\i\){.+?},stop/,replace:"startTyping:$self.startTyping,stop"}},{find:"ChannelTextAreaButtons",predicate:()=>To.store.showIcon,replacement:{match:/(\i)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&,(()=>{try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}})()"}}],dependencies:["CommandsAPI"],settings:To,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)=>{To.store.isEnabled=!!rt(e,"value",!To.store.isEnabled),pe(t.channel.id,{content:To.store.isEnabled?"Silent typing enabled!":"Silent typing disabled!"})}}],async startTyping(e){To.store.isEnabled||B.dispatch({type:"TYPING_START_LOCAL",channelId:e})},chatBarIcon:_.wrap(eC,{noop:!0})})});var Ef,rx=g(()=>{"use strict";a();Dt();P();M();I();ix();Ef=y({name:"SortFriendRequests",authors:[p.Megu],description:"Sorts friend requests by date of receipt",patches:[{find:"getRelationshipCounts(){",replacement:{match:/\.sortBy\(\i=>\i\.comparator\)/,replace:".sortBy((row) => $self.sortList(row))"}},{find:"RelationshipTypes.PENDING_INCOMING?",replacement:{predicate:()=>L.plugins.SortFriendRequests.showDates,match:/(user:(\i),.{10,50}),subText:(\i),(className:\i\.userInfo}\))/,replace:(e,t,n,r,i)=>`${t}, subText: $self.makeSubtext(${r}, ${n}), ${i}`}}],sortList(e){return e.type===3||e.type===4?-this.getSince(e.user):e.comparator},getSince(e){return new Date(nt.getSince(e.id))},makeSubtext(e,t){let n=this.getSince(t);return o(ye,{flexDirection:"row",style:{gap:0,flexWrap:"wrap",lineHeight:"0.9rem"}},o("span",null,e),!isNaN(n.getTime())&&o("span",null,"Received \u2014 ",n.toDateString()))},options:{showDates:{type:3,description:"Show dates on friend requests",default:!1,restartNeeded:!0}}})});var sx,ax=g(()=>{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});sx="src/plugins/spotifyControls/hoverOnly.css"});var lx=g(()=>{});var ze,cx=g(()=>{"use strict";a();$();Zt();j();I();ze=Qe(()=>{let{Store:e}=cc,t=A("getActiveSocketAndDevice"),n=A("SpotifyAPI"),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(c){let u=L.plugins.SpotifyControls.useSpotifyUris||Vencord.Plugins.isPluginEnabled("OpenInApp")?"spotify:"+c.replaceAll("/",(d,m)=>m===0?"":":"):"https://open.spotify.com"+c;VencordNative.native.openExternal(u)}get position(){let c=this.mPosition;return this.isPlaying&&(c+=Date.now()-this.start),c}set position(c){this.mPosition=c,this.start=Date.now()}prev(){this.req("post","/previous")}next(){this.req("post","/next")}setVolume(c){this.req("put","/volume",{query:{volume_percent:Math.round(c)}}).then(()=>{this.volume=c,this.emitChange()})}setPlaying(c){this.req("put",c?"/play":"/pause")}setRepeat(c){this.req("put","/repeat",{query:{state:c}})}setShuffle(c){this.req("put","/shuffle",{query:{state:c}}).then(()=>{this.shuffle=c,this.emitChange()})}seek(c){return this.isSettingPosition?Promise.resolve():(this.isSettingPosition=!0,this.req("put","/seek",{query:{position_ms:Math.round(c)}}).catch(u=>{console.error("[VencordSpotifyControls] Failed to seek",u),this.isSettingPosition=!1}))}req(c,u,d={}){this.device?.is_active&&((d.query??={}).device_id=this.device.id);let{socket:m}=t.getActiveSocketAndDevice();return n.SpotifyAPI[c](m.accountId,m.accessToken,{url:r+u,...d})}}let s=new i(B,{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(c=>c.is_active)??l[0]??null,s.emitChange()}});return s})});function Df(e){let t=e/1e3/60,n=Math.floor(t),r=Math.floor((t-n)*60);return`${n.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`}function bi(e,t){return()=>o("svg",{className:re(Ze("button-icon"),Ze(t)),height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":t,focusable:!1},o("path",{d:e}))}function _s(e){return o("button",{className:Ze("button"),...e},e.children)}function aC({name:e,path:t}){let n=`spotify-copy-${e}`,r=`spotify-open-${e}`;return o(U.Menu,{navId:`spotify-${e}-menu`,onClose:()=>B.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":`Spotify ${e} Menu`},o(U.MenuItem,{key:n,id:n,label:`Copy ${e} Link`,action:()=>vn("https://open.spotify.com"+t),icon:Vr}),o(U.MenuItem,{key:r,id:r,label:`Open ${e} in Spotify`,action:()=>ze.openExternal(t),icon:Ji}))}function lC(e,t){return n=>gn.open(n,()=>o(aC,{name:e,path:t}))}function cC(){let[e,t,n]=We([ze],()=>[ze.isPlaying,ze.shuffle,ze.repeat]),[r,i]=(()=>{switch(n){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 ${n}`)}})();return o(ye,{className:Ze("button-row"),style:{gap:0}},o(_s,{className:re(Ze("button"),Ze(t?"shuffle-on":"shuffle-off")),onClick:()=>ze.setShuffle(!t)},o(sC,null)),o(_s,{onClick:()=>ze.prev()},o(oC,null)),o(_s,{onClick:()=>ze.setPlaying(!e)},e?o(nC,null):o(tC,null)),o(_s,{onClick:()=>ze.next()},o(rC,null)),o(_s,{className:re(Ze("button"),Ze(i)),onClick:()=>ze.setRepeat(r),style:{position:"relative"}},n==="track"&&o("span",{className:Ze("repeat-1")},"1"),o(iC,null)))}function pC(){let{duration:e}=ze.track,[t,n,r]=We([ze],()=>[ze.mPosition,ze.isSettingPosition,ze.isPlaying]),[i,s]=J(t);return _e(()=>{if(r&&!n){s(ze.position);let l=setInterval(()=>{s(c=>c+1e3)},1e3);return()=>clearInterval(l)}},[t,n,r]),o("div",{id:Ze("progress-bar")},o(S.FormText,{variant:"text-xs/medium",className:Ze("progress-time")+" "+Ze("time-left"),"aria-label":"Progress"},Df(i)),o(U.MenuSliderControl,{minValue:0,maxValue:e,value:i,onChange:l=>{n||(s(l),uC(l))},renderValue:Df}),o(S.FormText,{variant:"text-xs/medium",className:Ze("progress-time")+" "+Ze("time-right"),"aria-label":"Total Duration"},Df(e)))}function dC({track:e}){let t=We([ze],()=>ze.volume);return o(U.Menu,{navId:"spotify-album-menu",onClose:()=>B.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Spotify Album Menu"},o(U.MenuItem,{key:"open-album",id:"open-album",label:"Open Album",action:()=>ze.openExternal(`/album/${e.album.id}`),icon:Ji}),o(U.MenuItem,{key:"view-cover",id:"view-cover",label:"View Album Cover",action:()=>Bn(e.album.image.url),icon:vr}),o(U.MenuControlItem,{id:"spotify-volume",key:"spotify-volume",label:"Volume",control:(n,r)=>o(U.MenuSliderControl,{...n,ref:r,value:t,minValue:0,maxValue:100,onChange:bn(i=>ze.setVolume(i))})}))}function Of(e,t,n){return t?{role:"link",onClick:()=>ze.openExternal(n),onContextMenu:lC(e,n)}:{}}function mC({track:e}){let t=e?.album?.image,[n,r]=J(!1),i=o(f,null,t&&o("img",{id:Ze("album-image"),src:t.url,alt:"Album Image",onClick:()=>r(!n),onContextMenu:s=>{gn.open(s,()=>o(dC,{track:e}))}}));return n&&t?o("div",{id:Ze("album-expanded-wrapper")},i):o("div",{id:Ze("info-wrapper")},i,o("div",{id:Ze("titles")},o(S.FormText,{variant:"text-sm/semibold",id:Ze("song-title"),className:Ze("ellipoverflow"),title:e.name,...Of("Song",e.id,`/track/${e.id}`)},e.name),e.artists.some(s=>s.name)&&o(S.FormText,{variant:"text-sm/normal",className:Ze("ellipoverflow")},"by\xA0",e.artists.map((s,l)=>o(O.Fragment,{key:s.name},o("span",{className:Ze("artist"),style:{fontSize:"inherit"},title:s.name,...Of("Artist",s.id,`/artist/${s.id}`)},s.name),l!==e.artists.length-1&&o("span",{className:Ze("comma")},", ")))),e.album.name&&o(S.FormText,{variant:"text-sm/normal",className:Ze("ellipoverflow")},"on\xA0",o("span",{id:Ze("album-title"),className:Ze("album"),style:{fontSize:"inherit"},title:e.album.name,...Of("Album",e.album.id,`/album/${e.album.id}`)},e.album.name))))}function ux(){let e=We([ze],()=>ze.track,null,(s,l)=>s?.id?s.id===l?.id:s?.name===l?.name),t=We([ze],()=>ze.device,null,(s,l)=>s?.id===l?.id),n=We([ze],()=>ze.isPlaying),[r,i]=J(!1);return O.useEffect(()=>{if(i(!1),!n){let s=setTimeout(()=>i(!0),3e5);return()=>clearTimeout(s)}},[n]),!e||!t?.is_active||r?null:o(_,{fallback:()=>o("div",{className:"vc-spotify-fallback"},o("p",null,"Failed to render Spotify Modal :("),o("p",null,"Check the console for errors"))},o("div",{id:Ze("player")},o(mC,{track:e}),o(pC,null),o(cC,null)))}var Ze,tC,nC,oC,rC,iC,sC,uC,px=g(()=>{"use strict";a();lx();le();Dt();Ht();Wr();It();Be();I();cx();Ze=e=>`vc-spotify-${e}`;tC=bi("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"),nC=bi("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"),oC=bi("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"),rC=bi("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"),iC=bi("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"),sC=bi("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");uC=bn(e=>{ze.seek(e)})});function dx(e){(e?St:$t)(sx)}var _f,mx=g(()=>{"use strict";a();$();Ve();P();M();ax();px();_f=y({name:"SpotifyControls",description:"Adds a Spotify player above the account panel",authors:[p.Ven,p.afn,p.KraXen72],options:{hoverControls:{description:"Show controls on hover",type:3,default:!1,onChange:e=>dx(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:"showTaglessAccountPanel:",replacement:{match:/return ?(.{0,30}\(.{1,3},\{[^}]+?,showTaglessAccountPanel:.+?\}\))/,replace:"return [$self.renderPlayer(),$1]"}},{find:".PLAYER_DEVICES",replacement:{match:/get:(\i)\.bind\(null,(\i\.\i)\.get\)/,replace:"post:$1.bind(null,$2.post),$&"}},{find:'repeat:"off"!==',replacement:{match:/repeat:"off"!==(.{1,3}),/,replace:"actual_repeat:$1,$&"}}],start:()=>dx(L.plugins.SpotifyControls.hoverControls),renderPlayer:()=>o(ux,null)})});var Bf,Ff,fx=g(()=>{"use strict";a();$();P();M();Bf=D({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=y({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:Bf,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:()=>Bf.store.noSpotifyAutoPause,match:/(?<=function \i\(\){)(?=.{0,200}SPOTIFY_AUTO_PAUSED\))/,replace:"return;"},{predicate:()=>Bf.store.keepSpotifyActivityOnIdle,match:/(?<=shouldShowActivity\(\){.{0,50})&&!\i\.\i\.isIdle\(\)/,replace:""}]}]})});function $f(e,t){t={invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};let n=fC.getPendingReply(e);gx.sendMessage(e,t,void 0,gx.getSendMessageOptionsForReply(n)).then(()=>{n&&B.dispatch({type:"DELETE_PENDING_REPLY",channelId:e})})}var Uf,gx,fC,Gf,hx=g(()=>{"use strict";a();tn();P();M();j();I();Uf=A("getPlayerState"),gx=A("getSendMessageOptionsForReply","sendMessage"),fC=A("getPendingReply");Gf=y({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 n=Uf.getTrack();if(n===null){pe(t.channel.id,{content:"You're not listening to any music."});return}$f(t.channel.id,{content:`https://open.spotify.com/track/${n.id}`})}},{name:"album",description:"Send your current Spotify album to chat",inputType:0,options:[],execute:(e,t)=>{let n=Uf.getTrack();if(n===null){pe(t.channel.id,{content:"You're not listening to any music."});return}$f(t.channel.id,{content:`https://open.spotify.com/album/${n.album.id}`})}},{name:"artist",description:"Send your current Spotify artist to chat",inputType:0,options:[],execute:(e,t)=>{let n=Uf.getTrack();if(n===null){pe(t.channel.id,{content:"You're not listening to any music."});return}$f(t.channel.id,{content:n.artists[0].external_urls.spotify})}}]})});var yx={};Ue(yx,{default:()=>SC});function gC({emoji:e,prefix:t,log:n,delta:r,instance:i}){return o(O.Fragment,null,o("span",null,i.sinceStart.toFixed(3),"s"),o("span",null,i.sinceLast.toFixed(3),"s"),o("span",null,r?.toFixed(0)??""),o("span",null,o("pre",null,e," ",t??" ",n)))}function hC({title:e,logs:t,traceEnd:n}){let r=t.find(l=>l.timestamp)?.timestamp??0,i=r,s=t.map(l=>{let c=l.timestamp??i,u=(c-r)/1e3,d=(c-i)/1e3;return i=c,{sinceStart:u,sinceLast:d}});return o(S.FormSection,{title:e,tag:"h1"},o("code",null,n&&o("div",{style:{color:"var(--header-primary)",marginBottom:5,userSelect:"text"}},"Trace ended at: ",new Date(n).toTimeString()),o("div",{style:{color:"var(--header-primary)",display:"grid",gridTemplateColumns:"repeat(3, auto) 1fr",gap:"2px 10px",userSelect:"text"}},o("span",null,"Start"),o("span",null,"Interval"),o("span",null,"Delta"),o("span",{style:{marginBottom:5}},"Event"),Bs.logs.map((l,c)=>o(gC,{key:c,...l,instance:s[c]})))))}function yC({trace:e}){let t=e.split(` `);return o(S.FormSection,{title:"Server Trace",tag:"h2"},o("code",null,o(ye,{flexDirection:"column",style:{color:"var(--header-primary)",gap:5,userSelect:"text"}},t.map(n=>o("span",null,n)))))}function vC(){if(!Bs?.logs)return o("div",null,"Loading...");let e=Bs.logGroups.find(t=>t.serverTrace)?.serverTrace;return o(O.Fragment,null,o(hC,{title:"Startup Timings",logs:Bs.logs,traceEnd:Bs.endTime_}),o("div",{style:{marginTop:5}},"\xA0"),e&&o(yC,{trace:e}))}var Bs,SC,vx=g(()=>{"use strict";a();le();Dt();j();I();Bs=A("markWithDelta","markAndLog","markAt");SC=_.wrap(vC)});var Hf,Sx=g(()=>{"use strict";a();P();Oe();M();Hf=y({name:"StartupTimings",description:"Adds Startup Timings to the Settings menu",authors:[p.Megu],patches:[{find:"UserSettingsSections.PAYMENT_FLOW_MODAL_TEST_PAGE,",replacement:{match:/{section:\i\.UserSettingsSections\.PAYMENT_FLOW_MODAL_TEST_PAGE/,replace:'{section:"StartupTimings",label:"Startup Timings",element:$self.StartupTimingPage},$&'}}],StartupTimingPage:me(()=>(vx(),Io(yx)).default)})});var zf,jf,bx=g(()=>{"use strict";a();$();P();M();zf=D({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}}}),jf=y({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:"!$self.shouldPlayBurstReaction($1)"}},{find:".hasAvailableBurstCurrency)",replacement:{match:/(?<=\.useBurstReactionsExperiment.{0,20})useState\(!1\)(?=.+?(\i===\i\.EmojiIntention.REACTION))/,replace:"useState($self.settings.store.superReactByDefault && $1)"}}],settings:zf,shouldPlayBurstReaction(e){return!!(zf.store.unlimitedSuperReactionPlaying||e<=zf.store.superReactionPlayingLimit)}})});function Px(e){let t=e.match(/^(\/)?(.+?)(?:\/([gimsuy]*))?$/);return t?new RegExp(t[2],t[3]?.split("").filter((n,r,i)=>i.indexOf(n)===r).join("")??"g"):new RegExp(e)}function TC(e){try{return Px(e),null}catch(t){return o("span",{style:{color:"var(--text-danger)"}},String(t))}}function Wf({initialValue:e,onChange:t,placeholder:n}){let[r,i]=J(e);return o(et,{placeholder:n,value:r,onChange:i,spellCheck:!1,onBlur:()=>r!==e&&t(r)})}function Tx({title:e,rulesArray:t,rulesKey:n,update:r}){let i=e==="Using Regex";async function s(c){c!==t.length-1&&(t.splice(c,1),await zt.set(n,t),r())}async function l(c,u,d){u===t.length-1&&t.push(Mx()),t[u][d]=c,t[u].find===""&&t[u].replace===""&&t[u].onlyIfIncludes===""&&u!==t.length-1&&t.splice(u,1),await zt.set(n,t),r()}return o(f,null,o(S.FormTitle,{tag:"h4"},e),o(ye,{flexDirection:"column",style:{gap:"0.5em"}},t.map((c,u)=>o(O.Fragment,{key:`${c.find}-${u}`},o(ye,{flexDirection:"row",style:{gap:0}},o(ye,{flexDirection:"row",style:{flexGrow:1,gap:"0.5em"}},o(Wf,{placeholder:"Find",initialValue:c.find,onChange:d=>l(d,u,"find")}),o(Wf,{placeholder:"Replace",initialValue:c.replace,onChange:d=>l(d,u,"replace")}),o(Wf,{placeholder:"Only if includes",initialValue:c.onlyIfIncludes,onChange:d=>l(d,u,"onlyIfIncludes")})),o(E,{size:E.Sizes.MIN,onClick:()=>s(u),style:{background:"none",color:"var(--status-danger)",...u===t.length-1?{visibility:"hidden",pointerEvents:"none"}:{}}},o(by,null))),i&&TC(c.find)))))}function xC(){let[e,t]=J("");return o(f,null,o(S.FormTitle,{tag:"h4"},"Test Rules"),o(et,{placeholder:"Type a message",onChange:t}),o(et,{placeholder:"Message with rules applied",editable:!1,value:Ix(e)}))}function Ix(e){if(e.length===0)return e;if(Hl)for(let t of Hl)!t.find||!t.replace||t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)||(e=` ${e} `.replaceAll(t.find,t.replace.replaceAll("\\n",` `)).replace(/^\s|\s$/g,""));if(zl){for(let t of zl)if(!(!t.find||!t.replace)&&!(t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)))try{let n=Px(t.find);e=e.replace(n,t.replace.replaceAll("\\n",` `))}catch{new ie("TextReplace").error(`Invalid regex: ${t.find}`)}}return e=e.trim(),e}var xx,wx,Mx,Gl,Hl,zl,bC,wC,qf,Ax=g(()=>{"use strict";a();ss();Xn();$();Dt();Ht();P();Je();Oe();M();I();xx="TextReplace_rulesString",wx="TextReplace_rulesRegex",Mx=()=>({find:"",replace:"",onlyIfIncludes:""}),Gl=()=>[Mx()],Hl=Gl(),zl=Gl(),bC=D({replace:{type:6,description:"",component:()=>{let e=qn();return o(f,null,o(Tx,{title:"Using String",rulesArray:Hl,rulesKey:xx,update:e}),o(Tx,{title:"Using Regex",rulesArray:zl,rulesKey:wx,update:e}),o(xC,null))}}});wC="1102784112584040479",qf=y({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:bC,async start(){Hl=await zt.get(xx)??Gl(),zl=await zt.get(wx)??Gl(),this.preSend=jt((e,t)=>{e!==wC&&(t.content=Ix(t.content))})},stop(){Wt(this.preSend)}})});var Kf,Nx=g(()=>{"use strict";a();P();M();I();Kf=y({name:"ThemeAttributes",description:"Adds data attributes to various elements for theming purposes",authors:[p.Ven],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])"}}],getMessageProps(e){let t=e.message?.author?.id;return{"data-author-id":t,"data-is-self":t&&t===W.getCurrentUser()?.id}}})});var Yf,Cx=g(()=>{"use strict";a();P();M();Yf=y({name:"TimeBarAllActivities",description:"Adds the Spotify time bar to all activities if they have start and end timestamps",authors:[p.obscurity],patches:[{find:"}renderTimeBar(",replacement:{match:/renderTimeBar\((.{1,3})\){.{0,50}?let/,replace:"renderTimeBar($1){let"}}]})});var kx=g(()=>{});var _t,Fs=g(()=>{"use strict";a();$();M();_t=D({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}})});var jl,Zf=g(()=>{"use strict";a();jl={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 Us(e,t){let n=_t.store[e+"Input"],r=_t.store[e+"Output"],i="https://translate.googleapis.com/translate_a/single?"+new URLSearchParams({client:"gtx",sl:n,tl:r,dt:"t",dj:"1",source:"input",q:t}),s=await fetch(i);if(!s.ok)throw new Error(`Failed to translate "${t}" (${n} -> ${r}) ${s.status} ${s.statusText}`);let{src:l,sentences:c}=await s.json();return{src:l,text:c.map(u=>u?.trans).filter(Boolean).join("")}}var xo,$s=g(()=>{"use strict";a();Ve();Fs();xo=Ge("vc-trans-")});function PC({settingsKey:e,includeAuto:t}){let n=_t.use([e])[e],r=Nt(()=>{let i=Object.entries(jl).map(([s,l])=>({value:s,label:l}));return t||i.shift(),i},[]);return o("section",{className:Y.bottom16},o(S.FormTitle,{tag:"h3"},_t.def[e].description),o(ea,{options:r,value:r.find(i=>i.value===n),placeholder:"Select a language",maxVisibleItems:5,closeOnSelect:!0,onChange:i=>_t.store[e]=i}))}function IC(){let e=_t.use(["autoTranslate"]).autoTranslate;return o(pt,{value:e,onChange:t=>_t.store.autoTranslate=t,note:_t.def.autoTranslate.description,hideBorder:!0},"Auto Translate")}function Rx({rootProps:e}){return o(qe,{...e},o(at,{className:xo("modal-header")},o(S.FormTitle,{tag:"h2"},"Translate"),o(cn,{onClick:e.onClose})),o(tt,{className:xo("modal-content")},MC.map(t=>o(PC,{key:t,settingsKey:t,includeAuto:t.endsWith("Input")})),o(S.FormDivider,{className:Y.bottom16}),o(IC,null)))}var MC,Lx=g(()=>{"use strict";a();ct();dt();I();Zf();Fs();$s();MC=["receivedInput","receivedOutput","sentInput","sentOutput"]});function Ti({height:e=24,width:t=24,className:n}){return o("svg",{viewBox:"0 96 960 960",height:e,width:t,className:re(xo("icon"),n)},o("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"}))}function Ex({slateProps:e}){let{autoTranslate:t}=_t.use(["autoTranslate"]);if(e.type.analyticsName!=="normal")return null;let n=()=>_t.store.autoTranslate=!t;return o(V,{text:"Open Translate Modal"},({onMouseEnter:r,onMouseLeave:i})=>o("div",{style:{display:"flex"}},o(E,{"aria-haspopup":"dialog","aria-label":"Open Translate Modal",size:"",look:Xt.BLANK,onMouseEnter:r,onMouseLeave:i,innerClassName:vt.button,onClick:s=>{if(s.shiftKey)return n();Ke(l=>o(Rx,{rootProps:l}))},onContextMenu:()=>n(),style:{padding:"0 4px"}},o("div",{className:vt.buttonWrapper},o(Ti,{className:xo({"auto-translate":t})})))))}var Xf=g(()=>{"use strict";a();Be();dt();I();Fs();Lx();$s()});function Qf(e,t){Jf.get(e)(t)}function AC({onDismiss:e}){return o("button",{onClick:e,className:xo("dismiss")},"Dismiss")}function Dx({message:e}){let[t,n]=J();return _e(()=>{if(!e.vencordEmbeddedBy)return Jf.set(e.id,n),()=>void Jf.delete(e.id)},[]),t?o("span",{className:xo("accessory")},o(Ti,{width:16,height:16}),$e.parse(t.text)," ","(translated from ",jl[t.src]??t.src," - ",o(AC,{onDismiss:()=>n(void 0)}),")"):null}var Jf,Ox=g(()=>{"use strict";a();I();Zf();Xf();$s();Jf=new Map});var _x,Vf,Bx=g(()=>{"use strict";a();kx();Mt();rl();Xn();Ir();le();P();M();I();Fs();Xf();Ox();$s();_x=(e,{message:t})=>()=>{if(!t.content)return;let n=mt("copy-text",e);!n||n.splice(n.findIndex(r=>r?.props?.id==="copy-text")+1,0,o(U.MenuItem,{id:"vc-trans",label:"Translate",icon:Ti,action:async()=>{let r=await Us("received",t.content);Qf(t.id,r)}}))},Vf=y({name:"Translate",description:"Translate messages with Google Translate",authors:[p.Ven],dependencies:["MessageAccessoriesAPI","MessagePopoverAPI","MessageEventsAPI"],settings:_t,translate:Us,patches:[{find:"ChannelTextAreaButtons",replacement:{match:/(\i)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&,(()=>{try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}})()"}}],start(){vs("vc-translation",e=>o(Dx,{message:e.message})),ue("message",_x),Un("vc-translate",e=>e.content?{label:"Translate",icon:Ti,message:e,channel:Q.getChannel(e.channel_id),onClick:async()=>{let t=await Us("received",e.content);Qf(e.id,t)}}:null),this.preSend=jt(async(e,t)=>{!_t.store.autoTranslate||!t.content||(t.content=(await Us("sent",t.content)).text)})},stop(){Wt(this.preSend),fe("message",_x),$n("vc-translate"),yd("vc-translation")},chatBarIcon:e=>o(_,{noop:!0},o(Ex,{slateProps:e}))})});function eg({a:e,b:t,count:n}){return[o("strong",{key:"0"},e),", ",o("strong",{key:"1"},t),`, and ${n} others are typing...`]}var Wl,NC,tg,ng=g(()=>{"use strict";a();$();le();P();It();M();I();Wl=D({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"}});NC=_.wrap(function({user:e,guildId:t}){return o("strong",{role:"button",onClick:()=>{Fn(e.id)},style:{display:"grid",gridAutoFlow:"column",gap:"4px",color:Wl.store.showRoleColors?Le.getMember(t,e.id)?.colorString:void 0,cursor:"pointer"}},Wl.store.showAvatars&&o("div",{style:{marginTop:"4px"}},o(_r,{size:"SIZE_16",src:e.getAvatarURL(t,128)})),Le.getNick(t,e.id)||!t&&nt.getNickname(e.id)||e.globalName||e.username)},{noop:!0}),tg=y({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,n,r)=>`$self.buildSeveralUsers({ a: ${n}, b: ${r}, count: ${t}.length - 2 })`},predicate:()=>Wl.store.alternativeFormatting}],settings:Wl,TYPING_TEXT_STYLE:{display:"grid",gridAutoFlow:"column",gridGap:"0.25em"},buildSeveralUsers:eg,mutateChildren(e,t,n){if(!Array.isArray(n))return n;let r=0;return n.map(i=>i.type==="strong"?o(NC,{...e,user:t[r++]}):i)}})});function Qo(e,t){return Le.getNick(e,t)??W.getUser(t).username}function RC({channelId:e}){let t=We([Fx],()=>({...Fx.getTypingUsers(e)}),null,(l,c)=>{let u=Object.keys(l),d=Object.keys(c);return u.length===d.length&&JSON.stringify(u)===JSON.stringify(d)}),n=Q.getChannel(e).guild_id;if(!og.store.includeMutedChannels&&kC.isChannelMuted(n,e))return null;let r=W.getCurrentUser()?.id,i=Object.keys(t).filter(l=>l!==r&&!(nt.isBlocked(l)&&!og.store.includeBlockedUsers)),s;switch(i.length){case 0:break;case 1:{s=ql.Messages.ONE_USER_TYPING.format({a:Qo(n,i[0])});break}case 2:{s=ql.Messages.TWO_USERS_TYPING.format({a:Qo(n,i[0]),b:Qo(n,i[1])});break}case 3:{s=ql.Messages.THREE_USERS_TYPING.format({a:Qo(n,i[0]),b:Qo(n,i[1]),c:Qo(n,i[2])});break}default:{s=L.plugins.TypingTweaks.enabled?eg({a:Qo(n,i[0]),b:Qo(n,i[1]),count:i.length-2}):ql.Messages.SEVERAL_USERS_TYPING;break}}return i.length>0?o(V,{text:s},({onMouseLeave:l,onMouseEnter:c})=>o("div",{style:{marginLeft:6,height:16,display:"flex",alignItems:"center",zIndex:0,cursor:"pointer"},onMouseLeave:l,onMouseEnter:c},o(CC,{dotRadius:3,themed:!0}))):null}var CC,Fx,kC,ql,og,rg,Ux=g(()=>{"use strict";a();$();le();P();Oe();M();j();I();ng();CC=me(()=>st(t=>t.Dots&&!t.Menu)?.Dots),Fx=Ie("TypingStore"),kC=Ie("UserGuildSettingsStore"),ql=Lt(e=>e.Messages?.SEVERAL_USERS_TYPING);og=D({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}}),rg=y({name:"TypingIndicator",description:"Adds an indicator if someone is typing on a channel.",authors:[p.Nuckyz,p.obscurity],settings:og,patches:[{find:".UNREAD_HIGHLIGHT",replacement:{match:/channel:(\i).{0,100}?channelEmoji,.{0,250}?\.children.{0,50}?:null/,replace:"$&,$self.TypingIndicator($1.id)"}}],TypingIndicator:e=>o(_,{noop:!0},o(RC,{channelId:e}))})});var ig,$x=g(()=>{"use strict";a();Xn();P();M();ig=y({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((n,r)=>Math.min(n,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 n=t.split(` `);if(n.length<2)return t;let r="";return n[n.length-1]==="```"&&(r=n.pop()),`${n[0]} ${this.unindent(n.slice(1).join(` `))} ${r}`})},start(){this.preSend=jt((e,t)=>this.unindentMsg(t)),this.preEdit=br((e,t,n)=>this.unindentMsg(n))},stop(){Wt(this.preSend),Tr(this.preEdit)}})});var sg,Gx,ag,Hx=g(()=>{"use strict";a();Mt();Ht();P();M();I();sg=1<<2,Gx=(e,{channel:t,message:{author:n,embeds:r,flags:i,id:s}})=>()=>{let l=(i&sg)!==0;if(!l&&!r.length)return;let c=t.isPrivate()||!!(Re.getChannelPermissions({id:t.id})&Te.EMBED_LINKS);if(n.id===W.getCurrentUser().id&&!c)return;let u=mt("delete",e),d=u?.findIndex(m=>m?.props?.id==="delete");!d||!u||u.splice(d-1,0,o(U.MenuItem,{id:"unsuppress-embeds",key:"unsuppress-embeds",label:l?"Unsuppress Embeds":"Suppress Embeds",color:l?void 0:"danger",icon:l?Na:Ca,action:()=>wt.patch({url:`/channels/${t.id}/messages/${s}`,body:{flags:l?i&~sg:i|sg}})}))},ag=y({name:"UnsuppressEmbeds",authors:[p.rad,p.HypedDomi],description:"Allows you to unsuppress embeds in messages",start(){ue("message",Gx)},stop(){fe("message",Gx)}})});var lg,zx=g(()=>{"use strict";a();tn();ka();P();M();lg=y({name:"UrbanDictionary",description:"Search for a word on Urban Dictionary via /urban slash command",authors:[p.jewdev],dependencies:["CommandsAPI"],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 n=encodeURIComponent(e[0].value),{list:[r]}=await(await fetch(`https://api.urbandictionary.com/v0/define?term=${n}`)).json();if(!r)return void pe(t.channel.id,{content:"No results found."});let i=s=>s.replaceAll(`\r `,` `).replace(/([*>_`~\\])/gsi,"\\$1").replace(/\[(.+?)\]/g,(l,c)=>`[${c}](https://www.urbandictionary.com/define.php?term=${encodeURIComponent(c)} "Define '${c}' on Urban Dictionary")`).trim();return void pe(t.channel.id,{embeds:[{type:"rich",author:{name:`Uploaded by "${r.author}"`,url:`https://www.urbandictionary.com/author.php?author=${encodeURIComponent(r.author)}`},title:r.word,url:`https://www.urbandictionary.com/define.php?term=${encodeURIComponent(r.word)}`,description:i(r.definition),fields:[{name:"Example",value:i(r.example)},{name:"Want more definitions?",value:`Check out [more definitions](https://www.urbandictionary.com/define.php?term=${n} "Define "${e[0].value}" on Urban Dictionary") on Urban Dictionary.`}],color:16750848,footer:{text:`\u{1F44D} ${r.thumbs_up.toString()} | \u{1F44E} ${r.thumbs_down.toString()}`,icon_url:"https://www.urbandictionary.com/favicon.ico"},timestamp:new Date(r.written_on).toISOString()}]})}catch(n){pe(t.channel.id,{content:`Something went wrong: \`${n}\``})}}}]})});var jx=g(()=>{});var LC,EC,DC,Wx,qx=g(()=>{"use strict";a();jx();j();I();LC=A("selectChannel","selectVoiceChannel"),EC=to(".lastSection","children:"),DC=1n<<20n,Wx=({channel:e,label:t,showHeader:n})=>o(EC,null,n&&o(S.FormTitle,{className:"vc-uvs-header"},"In a voice channel"),o(E,{className:"vc-uvs-button",color:E.Colors.TRANSPARENT,size:E.Sizes.SMALL,onClick:()=>{Re.can(DC,e)?LC.selectVoiceChannel(e.id):ee.show({message:"Insufficient permissions to enter the channel.",id:"user-voice-show-insufficient-permissions",type:ee.Type.FAILURE,options:{position:ee.Position.BOTTOM}})}},t))});var OC,cg,Kx,ug,Yx=g(()=>{"use strict";a();$();le();P();M();j();I();qx();OC=Ie("VoiceStateStore"),cg=D({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}}),Kx=_.wrap(({user:e})=>{let{channelId:t}=OC.getVoiceStateForUser(e.id)??{};if(!t)return null;let n=Q.getChannel(t);if(!n)return null;let r=we.getGuild(n.guild_id);if(!r)return null;let i=`${r.name} | ${n.name}`;return o(Wx,{channel:n,label:i,showHeader:cg.store.showVoiceChannelSectionHeader})}),ug=y({name:"UserVoiceShow",description:"Shows whether a User is currently in a voice channel somewhere in their profile",authors:[p.LordElias],settings:cg,patchModal({user:e}){return cg.store.showInUserProfileModal?o("div",{className:"vc-uvs-modal-margin"},o(Kx,{user:e})):null},patchPopout:({user:e})=>{let t=e.id===W.getCurrentUser().id;return o("div",{className:t?"vc-uvs-popout-margin-self":""},o(Kx,{user:e}))},patches:[{find:".lastEditedByContainer",replacement:{match:/\(0,\i\.jsx\)\(\i\.\i,{user:\i,setNote/,replace:"$self.patchPopout(arguments[0]),$&"}},{find:".USER_PROFILE_MODAL",replacement:{match:/\.body.+?displayProfile:\i}\),/,replace:"$&$self.patchModal(arguments[0]),"}}]})});var Zx,Xx=g(()=>{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});Zx="src/plugins/usrbg/index.css"});var _C,wo,Kl,pg,Jx=g(()=>{"use strict";a();$();Ve();mo();P();M();Xx();_C="https://raw.githubusercontent.com/AutumnVN/usrbg/main/usrbg.json",wo={},Kl=D({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}}),pg=y({name:"USRBG",description:"Displays user banners from USRBG, allowing anyone to get a banner without Nitro",authors:[p.AutumnVN,p.pylix,p.TheKodeToad],settings:Kl,patches:[{find:".NITRO_BANNER,",replacement:[{match:/(\i)\.premiumType/,replace:"$self.premiumHook($1)||$&"},{match:/(?<=function \i\((\i)\)\{)(?=var.{30,50},bannerSrc:)/,replace:"$1.bannerSrc=$self.useBannerHook($1);"},{match:/\?\(0,\i\.jsx\)\(\i,{type:\i,shown/,replace:"&&$self.shouldShowBadge(arguments[0])$&"}]},{find:'"data-selenium-video-tile":',predicate:()=>Kl.store.voiceBackground,replacement:[{match:/(?<=function\((\i),\i\)\{)(?=let.{20,40},style:)/,replace:"$1.style=$self.voiceBackgroundHook($1);"}]}],data:wo,settingsAboutComponent:()=>o(it,{href:"https://github.com/AutumnVN/usrbg#how-to-request-your-own-usrbg-banner"},"CLICK HERE TO GET YOUR OWN BANNER"),voiceBackgroundHook({className:e,participantUserId:t}){if(e.includes("tile_")&&wo[t])return{backgroundImage:`url(${wo[t]})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}},useBannerHook({displayProfile:e,user:t}){if(!(e?.banner&&Kl.store.nitroFirst)&&wo[t.id])return wo[t.id]},premiumHook({userId:e}){if(wo[e])return 2},shouldShowBadge({displayProfile:e,user:t}){return e?.banner&&(!wo[t.id]||Kl.store.nitroFirst)},async start(){St(Zx);let e=await fetch(_C);e.ok&&(wo=await e.json(),this.data=wo)}})});function BC({data:e,UserMention:t,RoleMention:n,parse:r,props:i}){let[s,l]=J(e.userId);if(s)return o(t,{className:"mention",userId:s,channelId:e.channelId,inlinePreview:i.noStyleAndInteraction,key:i.key});let c=r(e.content,i);return o(n,{...e,inlinePreview:i.formatInline},o("span",{onMouseEnter:()=>{let u=c?.[0]?.props?.children;if(typeof u!="string")return;let d=u.match(/<@!?(\d+)>/)?.[1];if(!d||Yl.has(d))return;if(W.getUser(d))return l(d);let m=()=>{Yl.add(d),Qx.unshift(()=>Et.getUser(d).then(()=>{l(d),Yl.delete(d)}).catch(h=>{h?.status===429&&(Qx.unshift(()=>No(1e3).then(m)),Yl.delete(d))}).finally(()=>No(300)))};m()}},c))}var Yl,Qx,dg,Vx=g(()=>{"use strict";a();le();P();Be();qr();M();I();Yl=new Set,Qx=new Ln(5);dg=y({name:"ValidUser",description:"Fix mentions for unknown users showing up as '<@343383572805058560>' (hover over a mention to fix it)",authors:[p.Ven],tags:["MentionCacheFix"],patches:[{find:'className:"mention"',replacement:{match:/react(?=\(\i,\i,\i\).{0,50}return null==\i\?\(0,\i\.jsx\)\((\i\.\i),.+?jsx\)\((\i\.\i),\{className:"mention")/,replace:"react:(...args)=>$self.renderMention($1,$2,...args),originalReact"}}],renderMention(e,t,n,r,i){return o(_,{noop:!0},o(BC,{RoleMention:e,UserMention:t,data:n,parse:r,props:i}))}})});var mg,fg,ew=g(()=>{"use strict";a();P();M();I();mg={},fg=y({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:".shouldCloseDefaultModals",replacement:{match:/onClick:(\i)(?=,.{0,30}className:"channelMention".+?(\i)\.inContent)/,replace:(e,t,n)=>`onClick:(vcDoubleClickEvt)=>$self.shouldRunOnClick(vcDoubleClickEvt,${n})&&${t}()`}}],shouldRunOnClick(e,{channelId:t}){let n=Q.getChannel(t);return!n||![2,13].includes(n.type)?!0:e.detail>=2},schedule(e,t){let n=t.props.channel.id;if(Ae.getVoiceChannelId()===n){e();return}let r=mg[n]??={timeout:void 0,i:0};clearTimeout(r.timeout),++r.i>=2?(e(),delete mg[n]):r.timeout=setTimeout(()=>{delete mg[n]},500)}})});function Xl(e,t=L.plugins.VcNarrator){if(!e)return;let n=new SpeechSynthesisUtterance(e),r=speechSynthesis.getVoices().find(i=>i.voiceURI===t.voice);!r&&(new ie("VcNarrator").error(`Voice "${t.voice}" not found. Resetting to default.`),r=speechSynthesis.getVoices().find(i=>i.default),t.voice=r?.voiceURI,!r)||(n.voice=r,n.volume=t.volume,n.rate=t.rate,speechSynthesis.speak(n))}function Zl(e){let t=L.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 Jl(e,t,n,r,i){return e.replaceAll("{{USER}}",Zl(t)||(t?"Someone":"")).replaceAll("{{CHANNEL}}",Zl(n)||"channel").replaceAll("{{DISPLAY_NAME}}",Zl(r)||(r?"Someone":"")).replaceAll("{{NICKNAME}}",Zl(i)||(i?"Someone":""))}function FC({channelId:e,oldChannelId:t},n){if(n&&e!==gg&&(t=gg,gg=e),e!==t){if(e)return[t?"move":"join",e];if(t)return["leave",t]}return["",""]}function UC(e,t){let n=Object.assign({},L.plugins.VcNarrator,e),r=W.getCurrentUser(),i=sn.getGuildId();Xl(Jl(n[t+"Message"],r.username,"general",r.globalName??r.username,Le.getNick(i,r.id)??r.username),n)}var tw,gg,hg,nw=g(()=>{"use strict";a();$();jr();P();Je();ct();lo();M();j();I();tw=A("getVoiceStatesForChannel","getCurrentClientVoiceChannelId");hg=y({name:"VcNarrator",description:"Announces when users join, leave, or move voice channels via narrator",authors:[p.Ven],flux:{VOICE_STATE_UPDATES({voiceStates:e}){let t=sn.getGuildId(),n=Ae.getVoiceChannelId(),r=W.getCurrentUser().id;if(Q.getChannel(n)?.type!==13)for(let i of e){let{userId:s,channelId:l,oldChannelId:c}=i,u=s===r;if(!u&&(!n||l!==n&&c!==n))continue;let[d,m]=FC(i,u);if(!d)continue;let h=L.plugins.VcNarrator[d+"Message"],v=u&&!L.plugins.VcNarrator.sayOwnName?"":W.getUser(s).username,T=v&&(W.getUser(s).globalName??v),w=v&&(Le.getNick(t,s)??v),b=Q.getChannel(m).name;Xl(Jl(h,v,b,T,w))}},AUDIO_TOGGLE_SELF_MUTE(){let e=Ae.getVoiceChannelId(),t=tw.getVoiceStateForChannel(e);if(!t)return;let n=t.mute||t.selfMute?"unmute":"mute";Xl(Jl(L.plugins.VcNarrator[n+"Message"],"",Q.getChannel(e).name,"",""))},AUDIO_TOGGLE_SELF_DEAF(){let e=Ae.getVoiceChannelId(),t=tw.getVoiceStateForChannel(e);if(!t)return;let n=t.deaf||t.selfDeaf?"undeafen":"deafen";Xl(Jl(L.plugins.VcNarrator[n+"Message"],"",Q.getChannel(e).name,"",""))}},start(){if(typeof speechSynthesis>"u"||speechSynthesis.getVoices().length===0){new ie("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,n]=Nt(()=>{let s=speechSynthesis.getVoices();return[s.length!==0,s.some(l=>l.lang.startsWith("en"))]},[]),r=Nt(()=>Object.keys(Vencord.Plugins.plugins.VcNarrator.options).filter(s=>s.endsWith("Message")).map(s=>s.slice(0,-7)),[]),i=null;if(t)n||(i=o(Sn,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=o(Sn,null,s)}return o(S.FormSection,null,o(S.FormText,null,"You can customise the spoken messages below. You can disable specific messages by setting them to nothing"),o(S.FormText,null,"The special placeholders ",o("code",null,"{{USER}}"),", ",o("code",null,"{{DISPLAY_NAME}}"),", ",o("code",null,"{{NICKNAME}}")," and ",o("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"),n&&o(f,null,o(S.FormTitle,{className:Y.top20,tag:"h3"},"Play Example Sounds"),o("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"1rem"},className:"vc-narrator-buttons"},r.map(s=>o(E,{key:s,onClick:()=>UC(e,s)},ao([s]))))),i)}})});var ow=g(()=>{});function GC(e){let t=[];for(let n of Object.values(Vencord.Plugins.plugins))n.toolboxActions&&t.push(o(U.MenuGroup,{label:n.name,key:`vc-toolbox-${n.name}`},Object.entries(n.toolboxActions).map(([r,i])=>{let s=`vc-toolbox-${n.name}-${r}`;return o(U.MenuItem,{id:s,key:s,label:r,action:i})})));return o(U.Menu,{navId:"vc-toolbox",onClose:e},o(U.MenuItem,{id:"vc-toolbox-notifications",label:"Open Notification Log",action:ma}),o(U.MenuCheckboxItem,{id:"vc-toolbox-quickcss-toggle",checked:L.useQuickCss,label:"Enable QuickCSS",action:()=>{L.useQuickCss=!L.useQuickCss,e()}}),o(U.MenuItem,{id:"vc-toolbox-quickcss",label:"Open QuickCSS",action:()=>VencordNative.quickCss.openEditor()}),...t)}function HC(e){return o("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 27 27",width:24,height:24},o("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 zC(){let[e,t]=J(!1);return o(Ai,{position:"bottom",align:"right",animation:Ai.Animation.NONE,shouldShow:e,onRequestClose:()=>t(!1),renderPopout:()=>GC(()=>t(!1))},(n,{isShown:r})=>o($C,{className:"vc-toolbox-btn",onClick:()=>t(i=>!i),tooltip:r?null:"Vencord Toolbox",icon:()=>HC(r),selected:r}))}function jC({children:e}){return e.splice(e.length-1,0,o(_,{noop:!0},o(zC,null))),o(f,null,e)}var $C,yg,rw=g(()=>{"use strict";a();ow();fa();$();le();P();Oe();M();j();I();$C=me(()=>{let e=ce.byCode(".HEADER_BAR_BADGE");return st(t=>t.Icon&&e(t.Icon)).Icon});yg=y({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:_.wrap(jC,{fallback:()=>o("p",{style:{color:"red"}},"Failed to render :(")})})});function Gs(e){let t=e.startsWith("/")?"png":vg.store.format,n=new URL(e,window.location.href);n.searchParams.set("size",vg.store.imgSize),n.pathname=n.pathname.replace(/\.(png|jpe?g|webp)$/,`.${t}`),e=n.toString(),n.searchParams.set("size","4096");let r=n.toString();Bn(e,{original:r,height:256})}var Ql,vg,iw,sw,Sg,aw=g(()=>{"use strict";a();Mt();$();Ht();P();It();M();j();I();Ql=A("getGuildBannerURL"),vg=D({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"}))}});iw=(e,{user:t,guildId:n})=>()=>{if(!t)return;let r=Le.getMember(n,t.id)?.avatar||null;e.splice(-1,0,o(U.MenuGroup,null,o(U.MenuItem,{id:"view-avatar",label:"View Avatar",action:()=>Gs(Ql.getUserAvatarURL(t,!0)),icon:vr}),r&&o(U.MenuItem,{id:"view-server-avatar",label:"View Server Avatar",action:()=>Gs(Ql.getGuildMemberAvatarURLSimple({userId:t.id,avatar:r,guildId:n,canAnimate:!0},!0)),icon:vr})))},sw=(e,{guild:t})=>()=>{if(!t)return;let{id:n,icon:r,banner:i}=t;!i&&!r||e.splice(-1,0,o(U.MenuGroup,null,r?o(U.MenuItem,{id:"view-icon",label:"View Icon",action:()=>Gs(Ql.getGuildIconURL({id:n,icon:r,canAnimate:!0})),icon:vr}):null,i?o(U.MenuItem,{id:"view-banner",label:"View Banner",action:()=>Gs(Ql.getGuildBannerURL({id:n,banner:i},!0)),icon:vr}):null))},Sg=y({name:"ViewIcons",authors:[p.Ven,p.TheKodeToad,p.Nuckyz],description:"Makes avatars and banners in user profiles clickable, and adds View Icon/Banner entries in the user and server context menu",tags:["ImageUtilities"],settings:vg,openImage:Gs,start(){ue("user-context",iw),ue("guild-context",sw)},stop(){fe("user-context",iw),fe("guild-context",sw)},patches:[{find:"User Profile Modal - Context Menu",replacement:{match:/\{src:(\i)(?=,avatarDecoration)/,replace:"{src:$1,onClick:()=>$self.openImage($1)"}},{find:".NITRO_BANNER,",replacement:{match:/style:\{(?=backgroundImage:(\i&&\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:'style:($1)?{cursor:"pointer"}:{},onClick:$1?()=>{$self.openImage($2)}'}}]})});function bg(e){return o("div",{className:WC.markup},$e.defaultRules.codeBlock.react(e,null,{}))}var WC,lw=g(()=>{"use strict";a();j();I();WC=A("markup","codeContainer")});function qC(e){return Object.fromEntries(Object.entries(e).sort(([t],[n])=>t.localeCompare(n)))}function KC(e){let t=qC(JSON.parse(JSON.stringify(e)));for(let r of["email","phone","mfaEnabled","personalConnectionId"])delete t.author[r];let n=t;return delete n.editHistory,delete n.deleted,n.attachments?.forEach(r=>delete r.deleted),t}function pw(e,t,n){let r=Ke(i=>o(_,null,o(qe,{...i,size:"large"},o(at,null,o(oe,{variant:"heading-lg/semibold",style:{flexGrow:1}},"View Raw"),o(cn,{onClick:()=>oo(r)})),o(tt,null,o("div",{style:{padding:"16px 0"}},!!n&&o(f,null,o(S.FormTitle,{tag:"h5"},"Content"),o(bg,{content:n,lang:""}),o(S.FormDivider,{className:Y.bottom20})),o(S.FormTitle,{tag:"h5"},t," Data"),o(bg,{content:e,lang:"json"}))),o(Ft,null,o(ye,{cellSpacing:10},o(E,{onClick:()=>vn(e,`${t} data copied to clipboard!`)},"Copy ",t," JSON"),!!n&&o(E,{onClick:()=>vn(n,"Content copied to clipboard!")},"Copy Raw Content"))))))}function cw(e){e=KC(e);let t=JSON.stringify(e,null,4);return pw(t,"Message",e.content)}function xi(e){return(n,r)=>()=>{if(e==="Guild"&&!r.guild||e==="User"&&!r.user)return;let i=n.at(-1);if(i?.key==="developer-actions"){let s=i.props;Array.isArray(s.children)||(s.children=[s.children]),{children:n}=s}n.splice(-1,0,o(U.MenuItem,{id:`vc-view-${e.toLowerCase()}-raw`,label:"View Raw",action:()=>pw(JSON.stringify(r[e.toLowerCase()],null,4),e),icon:uw}))}}var uw,Vl,Tg,dw=g(()=>{"use strict";a();Mt();Ir();$();lw();le();Dt();P();ct();Be();dt();M();I();uw=()=>o("svg",{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",width:"18",height:"18"},o("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"}),o("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"}));Vl=D({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"}]}});Tg=y({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:Vl,start(){Un("ViewRaw",e=>{let t=()=>{Vl.store.clickMethod==="Right"?vn(e.content):cw(e)},n=i=>{Vl.store.clickMethod==="Left"?(i.preventDefault(),i.stopPropagation(),vn(e.content)):(i.preventDefault(),i.stopPropagation(),cw(e))};return{label:Vl.store.clickMethod==="Right"?"Copy Raw (Left Click) / View Raw (Right Click)":"View Raw (Left Click) / Copy Raw (Right Click)",icon:uw,message:e,channel:Q.getChannel(e.channel_id),onClick:t,onContextMenu:n}}),ue("guild-context",xi("Guild")),ue("channel-context",xi("Channel")),ue("user-context",xi("User"))},stop(){$n("CopyRawMessage"),fe("guild-context",xi("Guild")),fe("channel-context",xi("Channel")),fe("user-context",xi("User"))}})});var mw=g(()=>{});var wi,ec=g(()=>{"use strict";a();$();M();wi=D({noiseSuppression:{type:3,description:"Noise Suppression",default:!0},echoCancellation:{type:3,description:"Echo Cancellation",default:!0}})});var ooe,fw=g(()=>{"use strict";a();I();ec();ooe=VencordNative.pluginHelpers.VoiceMessages});var Vo,xg=g(()=>{"use strict";a();Ve();Vo=Ge("vc-vmsg-")});var YC,gw,hw=g(()=>{"use strict";a();Oe();j();xg();YC=me(()=>st(e=>e.type?.toString().includes("waveform:"))),gw=({src:e,waveform:t,recording:n})=>{let r=Oi({deps:[n]}),i=n?Math.floor(r/1e3):0,s=Math.floor(i/60)+":"+(i%60).toString().padStart(2,"0");return e&&!n?o(YC,{key:e,src:e,waveform:t}):o("div",{className:Vo("preview",n?"preview-recording":[])},o("div",{className:Vo("preview-indicator")}),o("div",{className:Vo("preview-time")},s),o("div",{className:Vo("preview-label")},n?"RECORDING":"----"))}});var yw,vw=g(()=>{"use strict";a();I();ec();yw=({setAudioBlob:e,onRecordingChange:t})=>{let[n,r]=J(!1),[i,s]=J(!1),[l,c]=J(),[u,d]=J([]),m=v=>{r(v),t?.(v)};function h(){!n?navigator.mediaDevices.getUserMedia({audio:{echoCancellation:wi.store.echoCancellation,noiseSuppression:wi.store.noiseSuppression}}).then(T=>{let w=[];d(w);let b=new MediaRecorder(T);c(b),b.addEventListener("dataavailable",x=>{w.push(x.data)}),b.start(),m(!0)}):l&&(l.addEventListener("stop",()=>{e(new Blob(u,{type:"audio/ogg; codecs=opus"})),m(!1)}),l.stop())}return o(f,null,o(E,{onClick:h},n?"Stop":"Start"," recording"),o(E,{disabled:!n,onClick:()=>{s(!i),i?l?.resume():l?.pause()}},i?"Resume":"Pause"," recording"))}});function VC(e,t){let n=Ae.getChannelId(),r=JC.getPendingReply(n);r&&B.dispatch({type:"DELETE_PENDING_REPLY",channelId:n});let i=new ZC.CloudUpload({file:new File([e],"voice-message.ogg",{type:"audio/ogg; codecs=opus"}),isClip:!1,isThumbnail:!1,platform:1},n,!1,0);i.on("complete",()=>{wt.post({url:`/channels/${n}/messages`,body:{flags:1<<13,channel_id:n,content:"",nonce:jn.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?XC.getSendMessageOptionsForReply(r)?.messageReference:null}})}),i.on("error",()=>yn("Failed to upload voice message",ee.Type.FAILURE)),i.upload()}function ek(){let[e,t]=J();return[e,r=>{e&&URL.revokeObjectURL(e),t(URL.createObjectURL(r))}]}function tk({modalProps:e}){let[t,n]=J(!1),[r,i]=J(),[s,l]=ek();_e(()=>()=>{s&&URL.revokeObjectURL(s)},[s]);let[c]=ot(async()=>{if(!r)return Sw;let d=await new AudioContext().decodeAudioData(await r.arrayBuffer()),m=d.getChannelData(0),h=new Uint8Array(cr.clamp(Math.floor(d.duration*10),Math.min(32,m.length),256)),v=Math.floor(m.length/h.length);for(let b=0;b{i(u),l(u)},onRecordingChange:n}),o(E,{onClick:async()=>{let u=await Ta("audio/*");u&&(i(u),l(u))}},"Upload File")),o(S.FormTitle,null,"Preview"),o(gw,{src:s,waveform:c.waveform,recording:t})),o(Ft,null,o(E,{disabled:!r,onClick:()=>{VC(r,c),e.onClose(),yn("Now sending voice message... Please be patient",ee.Type.MESSAGE)}},"Send")))}var ZC,XC,JC,wg,QC,Mg,Sw,bw,Tw=g(()=>{"use strict";a();mw();Mt();Ht();P();dt();Oe();M();xa();j();I();fw();ec();xg();hw();vw();ZC=A("CloudUpload"),XC=A("getSendMessageOptionsForReply","sendMessage"),JC=Ie("PendingReplyStore"),wg=A("optionName","optionIcon","optionLabel"),QC=yw,Mg=y({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:wi,start(){ue("channel-attach",bw)},stop(){fe("channel-attach",bw)}}),Sw={waveform:"AAAAAAAAAAAA",duration:1};bw=(e,t)=>()=>{t.channel.guild_id&&!(Re.can(Te.SEND_VOICE_MESSAGES,t.channel)&&Re.can(Te.SEND_MESSAGES,t.channel))||e.push(o(U.MenuItem,{id:"vc-send-vmsg",label:o("div",{className:wg.optionLabel},o(vy,{className:wg.optionIcon,height:24,width:24}),o("div",{className:wg.optionName},"Send voice message")),action:()=>Ke(n=>o(tk,{modalProps:n}))}))}});async function nk(e){let t=await fetch(e);if(t.status===200)return await t.blob()}var ok,kr,Pg,xw=g(()=>{"use strict";a();$();P();M();xa();j();I();ok=Lt(e=>e.emitter?._events?.INSERT_TEXT),kr=D({addBack:{type:3,description:"Add back the Discord context menus for images, links and the chat input bar",default:!0,restartNeeded:!0}}),Pg=y({name:"WebContextMenus",description:"Re-adds context menus missing in the web version of Discord: Links & Images (Copy/Open Link/Image), Text Area (Copy, Cut, Paste, SpellCheck)",authors:[p.Ven],enabledByDefault:!0,required:!0,settings:kr,start(){if(kr.store.addBack){let e=yt("contextMenuCallbackNative");window.removeEventListener("contextmenu",e.contextMenuCallbackWeb),window.addEventListener("contextmenu",e.contextMenuCallbackNative),this.changedListeners=!0}},stop(){if(this.changedListeners){let e=yt("contextMenuCallbackNative");window.removeEventListener("contextmenu",e.contextMenuCallbackNative),window.addEventListener("contextmenu",e.contextMenuCallbackWeb)}},patches:[{find:"open-native-link",replacement:[{match:/if\(!\i\.\i\|\|null==/,replace:"if(null=="},{match:/\i\.\i\.copy/,replace:"Vencord.Webpack.Common.Clipboard.copy"}]},{find:'id:"copy-image"',replacement:[{match:/!\i\.isPlatformEmbedded/,replace:"false"},{match:/return\s*?\[\i\.\i\.canCopyImage\(\)/,replace:"return [true"},{match:/(?<=COPY_IMAGE_MENU_ITEM,)action:/,replace:"action:()=>$self.copyImage(arguments[0]),oldAction:"},{match:/(?<=SAVE_IMAGE_MENU_ITEM,)action:/,replace:"action:()=>$self.saveImage(arguments[0]),oldAction:"}]},{find:'navId:"image-context"',predicate:()=>kr.store.addBack,replacement:{match:/return \i\.\i\?/,replace:"return true?"}},{find:'"interactionUsernameProfile"',predicate:()=>kr.store.addBack,replacement:{match:/if\((?="A"===\i\.tagName&&""!==\i\.textContent)/,replace:"if(false&&"}},{find:'getElementById("slate-toolbar"',predicate:()=>kr.store.addBack,replacement:{match:/(?<=handleContextMenu\(\i\)\{.{0,200}isPlatformEmbedded)\?/,replace:"||true?"}},{find:".SLASH_COMMAND_SUGGESTIONS_TOGGLED,{",predicate:()=>kr.store.addBack,replacement:[{match:/if\(!\i\.\i\)return null;/,replace:""},{match:/\b\i\.\i\.(copy|cut|paste)/g,replace:"$self.$1"}]},{find:'"add-to-dictionary"',predicate:()=>kr.store.addBack,replacement:{match:/let\{text:\i=""/,replace:"return [null,null];$&"}}],async copyImage(e){let t=new Image;t.onload=()=>{let n=document.createElement("canvas");n.width=t.naturalWidth,n.height=t.naturalHeight,n.getContext("2d").drawImage(t,0,0),n.toBlob(r=>{navigator.clipboard.write([new ClipboardItem({"image/png":r})])},"image/png")},t.crossOrigin="anonymous",t.src=e},async saveImage(e){let t=await nk(e);if(!t)return;let n=new URL(e).pathname.split("/").pop(),r=new File([t],n,{type:t.type});ba(r)},copy(){let e=document.getSelection();!e||Qt.copy(e.toString())},cut(){this.copy(),ok.dispatch("INSERT_TEXT",{rawText:""})},async paste(){let e=(await navigator.clipboard.read())[0];if(!e)return;let t=new DataTransfer;for(let n of e.types)if(n==="image/png"){let r=new File([await e.getType(n)],"unknown.png",{type:n});t.items.add(r)}else if(n==="text/plain"){let r=await e.getType(n);t.setData(n,await r.text())}document.dispatchEvent(new ClipboardEvent("paste",{clipboardData:t}))}})});var Ig,Ag,ww=g(()=>{"use strict";a();P();M();j();I();Ig=A("JUMP_TO_GUILD","SERVER_NEXT"),Ag=y({name:"WebKeybinds",description:"Re-adds keybinds missing in the web version of Discord: ctrl+t, ctrl+shift+t, ctrl+tab, ctrl+shift+tab, ctrl+1-9, ctrl+,. Only works fully on Vesktop/ArmCord, not inside your browser",authors:[p.Ven],enabledByDefault:!0,onKey(e){if(e.ctrlKey||e.metaKey&&navigator.platform.includes("Mac"))switch(e.key){case"t":case"T":e.preventDefault(),e.shiftKey?(sn.getGuildId()&&pr.transitionToGuild("@me"),Gr.safeDispatch("TOGGLE_DM_CREATE")):B.dispatch({type:"QUICKSWITCHER_SHOW",query:"",queryMode:null});break;case",":e.preventDefault(),no.open("My Account");break;case"Tab":(e.shiftKey?Ig.SERVER_PREV:Ig.SERVER_NEXT).action(e);break;default:e.key>="1"&&e.key<="9"&&(e.preventDefault(),Ig.JUMP_TO_GUILD.action(e,`mod+${e.key}`));break}},start(){document.addEventListener("keydown",this.onKey)},stop(){document.removeEventListener("keydown",this.onKey)}})});function ak(e,t,n){let r=t.name+(t.id?`:${t.id}`:"");return wt.get({url:`/channels/${e.channel_id}/messages/${e.id}/reactions/${r}`,query:{limit:100,type:n},oldFormErrors:!0}).then(i=>B.dispatch({type:"MESSAGE_REACTION_ADD_USERS",channelId:e.channel_id,messageId:e.id,users:i.body,emoji:t,reactionType:n})).catch(console.error).finally(()=>No(250))}function lk(e,t,n){let r=`${e.id}:${t.name}:${t.id??""}:${n}`,i=Mw[r]??={fetched:!1,users:{}};return i.fetched||(sk.unshift(()=>ak(e,t,n)),i.fetched=!0),i.users}function ck(e){return function(n,r){return o(V,{text:e.slice(5).map(i=>i.username).join(", ")},({onMouseEnter:i,onMouseLeave:s})=>o("div",{className:ik.moreUsers,onMouseEnter:i,onMouseLeave:s},"+",e.length-5))}}function uk(e){e.stopPropagation()}var rk,ik,sk,Mw,Ng,Pw=g(()=>{"use strict";a();le();P();Be();qr();Oe();M();j();I();rk=me(()=>Bt("defaultRenderUser","showDefaultAvatarsForNullUsers")),ik=A("moreUsers","emptyUser","avatarContainer","clickableAvatar"),sk=new Ln;Ng=y({name:"WhoReacted",description:"Renders the avatars of users who reacted to a message",authors:[p.Ven,p.KannaDev],patches:[{find:",reactionRef:",replacement:{match:/(\i)\?null:\(0,\i\.jsx\)\(\i\.\i,{className:\i\.reactionCount,.*?}\),/,replace:"$&$1?null:$self.renderUsers(this.props),"}},{find:'.displayName="MessageReactionsStore";',replacement:{match:/(?<=CONNECTION_OPEN:function\(\){)(\i)={}/,replace:"$&;$self.reactions=$1"}}],renderUsers(e){return e.message.reactions.length>10?null:o(_,{noop:!0},o(this._renderUsers,{...e}))},_renderUsers({message:e,emoji:t,type:n}){let r=qn();O.useEffect(()=>{let l=c=>{c.messageId===e.id&&r()};return B.subscribe("MESSAGE_REACTION_ADD_USERS",l),()=>B.unsubscribe("MESSAGE_REACTION_ADD_USERS",l)},[e.id]);let i=lk(e,t,n),s=Object.values(i).filter(Boolean);for(let l of s)B.dispatch({type:"USER_UPDATE",user:l});return o("div",{style:{marginLeft:"0.5em",transform:"scale(0.9)"}},o("div",{onClick:uk},o(rk,{users:s,guildId:Q.getChannel(e.channel_id)?.guild_id,renderIcon:!1,max:5,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:ck(s)})))},set reactions(e){Mw=e}})});var Cg,Iw=g(()=>{"use strict";a();tn();P();M();Cg=y({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 n=rt(e,"search","");if(!n)return pe(t.channel.id,{content:"No word was defined!"});let r=new URLSearchParams({action:"query",format:"json",list:"search",formatversion:"2",origin:"*",srsearch:n}),i=await fetch("https://en.wikipedia.org/w/api.php?"+r).then(u=>u.json()).catch(u=>(console.log(u),pe(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),pe(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(u=>u.json()).then(u=>u.query.pages[0]).catch(u=>(console.log(u),pe(t.channel.id,{content:"There was an error. Check the console for more info"}),null));if(!s)return;let l=s.thumbnail,c=l&&{url:l.source.replace(/(50px-)/ig,"1000px-"),height:l.height*100,width:l.width*100};pe(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:c,footer:{text:"Powered by the Wikimedia API"}}]})}}]})});var He,gr=g(()=>{a();mh();fh();gh();hh();yh();vh();Sh();bh();Th();xh();wh();Gu();lv();cv();uv();pv();fv();gv();Yu();xv();wv();Mv();Pv();Lv();Dv();Ov();Uv();$v();Gv();zv();jv();Xv();Qv();Vv();i1();s1();a1();C1();D1();O1();F1();U1();$1();G1();z1();j1();Y1();J1();Q1();nS();od();el();fS();hS();SS();xS();PS();NS();_S();FS();US();$S();HS();zS();jS();WS();qS();KS();YS();XS();JS();QS();VS();e0();t0();n0();o0();r0();i0();s0();a0();p0();d0();ws();I0();C0();G0();H0();W0();Y0();sb();ab();vb();Sb();bb();Eb();Db();Bb();Fb();Gb();Hb();Wb();Xb();rT();$T();GT();KT();Pf();ex();tx();nx();ox();rx();mx();fx();hx();Sx();bx();Ax();Nx();Cx();Bx();Ux();ng();$x();Hx();zx();Yx();Jx();Vx();ew();nw();rw();aw();dw();Tw();xw();ww();Pw();Iw();He={[wc.name]:wc,[Mc.name]:Mc,[Pc.name]:Pc,[Ic.name]:Ic,[Ac.name]:Ac,[Nc.name]:Nc,[Cc.name]:Cc,[kc.name]:kc,[Rc.name]:Rc,[Lc.name]:Lc,[Ec.name]:Ec,[is.name]:is,[Hu.name]:Hu,[zu.name]:zu,[ju.name]:ju,[Wu.name]:Wu,[qu.name]:qu,[Ku.name]:Ku,[Ju.name]:Ju,[Qu.name]:Qu,[Vu.name]:Vu,[ep.name]:ep,[tp.name]:tp,[np.name]:np,[op.name]:op,[rp.name]:rp,[dp.name]:dp,[mp.name]:mp,[gp.name]:gp,[hp.name]:hp,[bp.name]:bp,[xp.name]:xp,[wp.name]:wp,[Mp.name]:Mp,[Ip.name]:Ip,[Cp.name]:Cp,[kp.name]:kp,[Fp.name]:Fp,[Up.name]:Up,[$p.name]:$p,[Gp.name]:Gp,[Hp.name]:Hp,[zp.name]:zp,[jp.name]:jp,[qp.name]:qp,[Kp.name]:Kp,[Zp.name]:Zp,[Jp.name]:Jp,[Qp.name]:Qp,[Vp.name]:Vp,[id.name]:id,[ld.name]:ld,[cd.name]:cd,[dd.name]:dd,[md.name]:md,[fd.name]:fd,[hd.name]:hd,[bd.name]:bd,[wd.name]:wd,[Md.name]:Md,[Pd.name]:Pd,[Id.name]:Id,[Nd.name]:Nd,[Rd.name]:Rd,[Ld.name]:Ld,[Ed.name]:Ed,[Dd.name]:Dd,[Od.name]:Od,[_d.name]:_d,[Ud.name]:Ud,[$d.name]:$d,[Gd.name]:Gd,[Hd.name]:Hd,[zd.name]:zd,[jd.name]:jd,[Wd.name]:Wd,[qd.name]:qd,[Kd.name]:Kd,[Yd.name]:Yd,[Zd.name]:Zd,[Xd.name]:Xd,[Jd.name]:Jd,[Vd.name]:Vd,[sm.name]:sm,[am.name]:am,[lm.name]:lm,[mm.name]:mm,[fm.name]:fm,[Pm.name]:Pm,[Nm.name]:Nm,[Rm.name]:Rm,[Lm.name]:Lm,[Em.name]:Em,[Om.name]:Om,[Fm.name]:Fm,[Km.name]:Km,[Ym.name]:Ym,[Zm.name]:Zm,[Xm.name]:Xm,[Jm.name]:Jm,[Qm.name]:Qm,[Vm.name]:Vm,[nf.name]:nf,[of.name]:of,[xf.name]:xf,[wf.name]:wf,[Mf.name]:Mf,[If.name]:If,[Af.name]:Af,[Nf.name]:Nf,[Rf.name]:Rf,[Lf.name]:Lf,[Ef.name]:Ef,[_f.name]:_f,[Ff.name]:Ff,[Gf.name]:Gf,[Hf.name]:Hf,[jf.name]:jf,[qf.name]:qf,[Kf.name]:Kf,[Yf.name]:Yf,[Vf.name]:Vf,[rg.name]:rg,[tg.name]:tg,[ig.name]:ig,[ag.name]:ag,[lg.name]:lg,[ug.name]:ug,[pg.name]:pg,[dg.name]:dg,[fg.name]:fg,[hg.name]:hg,[yg.name]:yg,[Sg.name]:Sg,[Tg.name]:Tg,[Mg.name]:Mg,[Pg.name]:Pg,[Ag.name]:Ag,[Ng.name]:Ng,[Cg.name]:Cg}});var Rg={};Ue(Rg,{BadgePosition:()=>aa,_getBadges:()=>pk,addBadge:()=>Im,removeBadge:()=>Am});function Im(e){e.component&&=_.wrap(e.component,{noop:!0}),kg.add(e)}function Am(e){return kg.delete(e)}function pk(e){let t=[];for(let r of kg)(!r.shouldShow||r.shouldShow(e))&&(r.position===0?t.unshift({...r,...e}):t.push({...r,...e}));let n=He.BadgeAPI.getDonorBadges(e.user.id);return n&&t.unshift(...n),t}var aa,kg,la=g(()=>{"use strict";a();le();gr();aa=(n=>(n[n.START=0]="START",n[n.END=1]="END",n))(aa||{}),kg=new Set});var Lg={};Ue(Lg,{Badges:()=>hk,Commands:()=>mk,ContextMenu:()=>wk,DataStore:()=>zt,MemberListDecorators:()=>Sk,MessageAccessories:()=>fk,MessageDecorations:()=>vk,MessageEvents:()=>dk,MessagePopover:()=>gk,Notices:()=>Cl,Notifications:()=>xk,ServerList:()=>yk,Settings:()=>bk,Styles:()=>Tk});var dk,Cl,mk,zt,fk,gk,hk,yk,vk,Sk,bk,Tk,xk,wk,ss=g(()=>{"use strict";a();la();tn();Mt();Kn();vm();rl();xm();Xn();Ir();Ia();ko();Al();$();Ve();dk=pp,Cl=mu,mk=Tu,zt=ro,fk=vd,gk=Xp,hk=Rg,yk=Bm,vk=Tm,Sk=ym,bk=iu,Tk=Hc,xk=jc,wk=Oc});function Mk(e,t,n){let r=t;if(t in e)return void n(e[r]);Object.defineProperty(e,t,{set(i){delete e[r],e[r]=i,n(i)},configurable:!0,enumerable:!1})}var Aw=g(()=>{"use strict";a()});var Eg={};Ue(Eg,{ChangeList:()=>os,Devs:()=>p,DevsById:()=>zr,ImageModal:()=>bc,LazyComponent:()=>me,Logger:()=>ie,Margins:()=>Y,ModalCloseButton:()=>cn,ModalContent:()=>tt,ModalFooter:()=>Ft,ModalHeader:()=>at,ModalRoot:()=>qe,ModalSize:()=>Co,Modals:()=>Rn,NoopComponent:()=>lh,Queue:()=>Ln,REACT_GLOBAL:()=>Zw,SUPPORT_CHANNEL_ID:()=>oa,Theme:()=>La,VENCORD_USER_AGENT:()=>mc,WEBPACK_CHUNK:()=>Wn,canonicalizeDescriptor:()=>fp,canonicalizeMatch:()=>xr,canonicalizeReplace:()=>Ua,canonicalizeReplacement:()=>ls,checkIntersecting:()=>gc,classes:()=>re,closeAllModals:()=>Tc,closeModal:()=>oo,copyWithToast:()=>vn,debounce:()=>bn,fetchUserProfile:()=>Iu,formatDuration:()=>Qi,getCurrentChannel:()=>ti,getCurrentGuild:()=>Pu,getTheme:()=>ni,getUniqueUsername:()=>po,gitHash:()=>ln,gitRemote:()=>na,humanFriendlyJoin:()=>V2,identity:()=>ra,insertTextIntoChatInputBox:()=>uo,isMobile:()=>Jw,isNonNullish:()=>Tp,isObject:()=>Xw,isObjectEmpty:()=>Ei,isPluginDev:()=>Di,isTruthy:()=>Ga,localStorage:()=>mr,makeCodeblock:()=>Vi,makeLazy:()=>Ao,mergeDefaults:()=>dr,onceDefined:()=>Mk,onlyOnce:()=>lu,openImageModal:()=>Bn,openModal:()=>Ke,openModalLazy:()=>Bi,openPrivateChannel:()=>lM,openUserProfile:()=>Fn,parseUrl:()=>fc,proxyLazy:()=>Qe,sendMessage:()=>cM,sleep:()=>No,useAwaiter:()=>ot,useForceUpdater:()=>qn,useIntersection:()=>hc,useTimer:()=>Oi,wordsFromCamel:()=>gu,wordsFromKebab:()=>q2,wordsFromPascal:()=>hu,wordsFromSnake:()=>W2,wordsFromTitle:()=>K2,wordsToCamel:()=>Y2,wordsToKebab:()=>X2,wordsToPascal:()=>J2,wordsToSnake:()=>Z2,wordsToTitle:()=>ao});var Nw=g(()=>{"use strict";a();Eu();P();Wr();It();Ha();Zt();ua();Je();ct();Be();dt();Aw();cu();cs();qr();Oe();lo();});var _g={};Ue(_g,{toggle:()=>Dg});function Og(e){let t=document.createElement("style");return t.id=e,document.documentElement.append(t),t}async function Pk(){let e=await VencordNative.themes.getSystemValues(),t=Object.entries(e).filter(([,n])=>n!=="#").map(([n,r])=>`--${n}: ${r};`).join("");Og("vencord-os-theme-values").textContent=`:root{${t}}`}async function Dg(e){Mi?Mi.disabled=!e:e&&(Mi=Og("vencord-custom-css"),VencordNative.quickCss.addChangeListener(t=>{Mi.textContent=t,Mi.disabled=!L.useQuickCss}),Mi.textContent=await VencordNative.quickCss.get())}async function tc(){Cw??=Og("vencord-themes");let{themeLinks:e,enabledThemes:t}=L,n=[...e];{let r=t.map(i=>`vencord:///themes/${i}?v=${Date.now()}`);n.push(...r)}Cw.textContent=n.map(r=>`@import url("${r.trim()}");`).join(` `)}var Mi,Cw,Bg=g(()=>{"use strict";a();$();document.addEventListener("DOMContentLoaded",()=>{Pk(),tc(),Dg(L.useQuickCss),qi("useQuickCss",Dg),qi("themeLinks",tc),qi("enabledThemes",tc),VencordNative.quickCss.addThemeChangeListener(tc)})});var Fg={};Ue(Fg,{Common:()=>dc,_initWebpack:()=>Zs,_resolveReady:()=>Ks,addListener:()=>Hw,cache:()=>In,extract:()=>sc,filters:()=>ce,find:()=>st,findAll:()=>Er,findBulk:()=>rc,findByCode:()=>Bt,findByCodeLazy:()=>to,findByProps:()=>yt,findByPropsLazy:()=>A,findLazy:()=>Lt,findModuleId:()=>Hg,findStore:()=>jg,findStoreLazy:()=>Ie,listeners:()=>Ys,mapMangledModule:()=>zg,mapMangledModuleLazy:()=>fn,onceReady:()=>oc,removeListener:()=>zw,search:()=>ic,subscriptions:()=>Lr,waitFor:()=>ut,wreq:()=>mn});var nc=g(()=>{"use strict";a();I();j()});function Rw(e){function t(n){try{Lw(n[1])}catch(r){Vn.error("Error in handlePush",r)}return t.$$vencordOriginal.call(e,n)}t.$$vencordOriginal=e.push,t.bind=(...n)=>t.$$vencordOriginal.bind(...n),Object.defineProperty(e,"push",{get:()=>t,set(n){t.$$vencordOriginal=n},configurable:!0})}function Lw(e){let{subscriptions:t,listeners:n}=Vencord.Webpack,{patches:r}=Vencord.Plugins;for(let i in e){let s=e[i],l=s.toString().replaceAll(` `,"");l.startsWith("function(")&&(l="0,"+l);let c=s,u=new Set,d=e[i]=function(m,h,v){try{s(m,h,v)}catch(w){if(s===c)throw w;return Vn.error("Error in patched chunk",w),void c(m,h,v)}if(h=m.exports,!h)return;if(h===window){Object.defineProperty(v.c,i,{value:v.c[i],enumerable:!1,configurable:!0,writable:!0});return}let T=Number(i);for(let w of n)try{w(h,T)}catch(b){Vn.error("Error in webpack listener",b)}for(let[w,b]of t)try{if(w(h))t.delete(w),b(h,T);else if(typeof h=="object"){h.default&&w(h.default)&&(t.delete(w),b(h.default,T));for(let x in h)x.length<=3&&h[x]&&w(h[x])&&(t.delete(w),b(h[x],T))}}catch(x){Vn.error("Error while firing callback for webpack chunk",x)}};try{d.toString=()=>s.toString(),d.original=c}catch{}for(let m=0;ml.replace(T,w));if(!(h.predicate&&!h.predicate())&&l.includes(h.find)){u.add(h.plugin);for(let T of h.replacement){if(T.predicate&&!T.predicate())continue;let w=s,b=l;ls(T,h.plugin);try{let x=v(T.match,T.replace);x===l&&!h.noWarn?((window.explosivePlugins??=new Set).add(h.plugin),Vn.warn(`Patch by ${h.plugin} had no effect (Module id is ${i}): ${T.match}`)):(l=x,s=(0,eval)(`// Webpack Module ${i} - Patched by ${[...u].join(", ")} ${x} //# sourceURL=WebpackModule${i}`))}catch(x){Vn.error(`Patch by ${h.plugin} errored (Module id is ${i}): ${T.match} `,x),l=b,s=w,u.delete(h.plugin)}}h.all||r.splice(m--,1)}}}}var kw,Vn,Ew=g(()=>{"use strict";a();P();Je();cs();qs();nc();Vn=new ie("WebpackInterceptor","#8caaee");window[Wn]?(Vn.info(`Patching ${Wn}.push (was already existent, likely from cache!)`),Zs(window[Wn]),Rw(window[Wn])):(Object.defineProperty(window,Wn,{get:()=>kw,set:e=>{e?.push&&(e.push.$$vencordOriginal||(Vn.info(`Patching ${Wn}.push`),Rw(e)),Zs(e)&&(Vn.info("Successfully initialised Vencord webpack"),delete window[Wn],window[Wn]=e)),kw=e},configurable:!0}),Object.defineProperty(Function.prototype,"m",{set(e){new Error().stack?.includes("discord.com")&&(Vn.info("Found webpack module factory"),Lw(e),delete Function.prototype.m),Object.defineProperty(this,"m",{value:e,configurable:!0})},configurable:!0}))});var Nk={};Ue(Nk,{Api:()=>Lg,PlainSettings:()=>Zn,Plugins:()=>Fu,QuickCss:()=>_g,Settings:()=>L,Updater:()=>au,Util:()=>Eg,Webpack:()=>Fg});async function Ik(){if(L.cloud.authenticated&&await Pt("Vencord_cloudSecret")===null){Ne({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:()=>no.open("VencordCloud")});return}L.cloud.settingsSync&&L.cloud.authenticated&&(mr.Vencord_settingsDirty?(await Zr(),delete mr.Vencord_settingsDirty):await wa(!1)&&Ne({title:"Cloud Settings",body:"Your settings have been updated! Click here to restart to fully apply changes!",color:"var(--green-360)",onClick:un}))}async function Ak(){await oc,_u(),Ik();try{if(!await Jr())return;if(L.autoUpdate){await Qr(),L.autoUpdateNotification&&setTimeout(()=>Ne({title:"Vencord has been updated!",body:"Click here to restart",permanent:!0,noPersist:!0,onClick:un}),1e4);return}L.notifyAboutUpdates&&setTimeout(()=>Ne({title:"A Vencord update is available!",body:"Click here to view the update",permanent:!0,noPersist:!0,onClick(){no.open("VencordUpdater")}}),1e4)}catch(e){hr.error("Failed to check for updates",e)}}var ix=g(()=>{a();ss();Ba();Nw();Bg();yr();nc();Bg();Ew();Kn();ko();$();Ba();ua();Do();Wi();yr();nc();I();Ak()});ix();return Io(Nk);})(); //# sourceURL=VencordDesktopRenderer //# sourceMappingURL=vencord://vencordDesktopRenderer.js.map /*! For license information please see vencordDesktopRenderer.js.LEGAL.txt */