From f87096f6272719bfb355b75dee6df5ddca7a1580 Mon Sep 17 00:00:00 2001 From: Wizzard <25581244+Wizzard@users.noreply.toomuchslop.com> Date: Tue, 11 Jul 2023 23:21:30 -0400 Subject: [PATCH] vencord half working --- assets/vencord/vencord.js | 578 ++++++++++++++------------------------ submodules/Vencord | 1 + 2 files changed, 219 insertions(+), 360 deletions(-) create mode 160000 submodules/Vencord diff --git a/assets/vencord/vencord.js b/assets/vencord/vencord.js index b364160..f226a90 100644 --- a/assets/vencord/vencord.js +++ b/assets/vencord/vencord.js @@ -1,45 +1,56 @@ -// Vencord 62b2ace +// Vencord bea7a17 // Standalone: false // Platform: linux -"use strict";var Vencord=(()=>{var ym=Object.create;var Fn=Object.defineProperty;var vm=Object.getOwnPropertyDescriptor;var bm=Object.getOwnPropertyNames;var Sm=Object.getPrototypeOf,xm=Object.prototype.hasOwnProperty;var Tm=(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 m=(e,t)=>()=>(e&&(t=e(e=0)),t);var Qt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ee=(e,t)=>{for(var n in t)Fn(e,n,{get:t[n],enumerable:!0})},Ma=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of bm(t))!xm.call(e,s)&&s!==n&&Fn(e,s,{get:()=>t[s],enumerable:!(r=vm(t,s))||r.enumerable});return e};var Ra=(e,t,n)=>(n=e!=null?ym(Sm(e)):{},Ma(t||!e||!e.__esModule?Fn(n,"default",{value:e,enumerable:!0}):n,e)),Ao=e=>Ma(Fn({},"__esModule",{value:!0}),e);var l,o,i=m(()=>{"use strict";l=Symbol.for("react.fragment"),o=(...e)=>(o=Vencord.Webpack.Common.React.createElement)(...e)});function Pm(e){let t={};for(let n in e)t[n]=e[n],t[e[n]]=n;return Object.freeze(t)}var j,ze=m(()=>{"use strict";i();j=Pm({QUICK_CSS_UPDATE:"VencordQuickCssUpdate",GET_QUICK_CSS:"VencordGetQuickCss",SET_QUICK_CSS:"VencordSetQuickCss",GET_SETTINGS_DIR:"VencordGetSettingsDir",GET_SETTINGS:"VencordGetSettings",SET_SETTINGS:"VencordSetSettings",OPEN_EXTERNAL:"VencordOpenExternal",OPEN_QUICKCSS:"VencordOpenQuickCss",GET_UPDATES:"VencordGetUpdates",GET_REPO:"VencordGetRepo",GET_HASHES:"VencordGetHashes",UPDATE:"VencordUpdate",BUILD:"VencordBuild",GET_DESKTOP_CAPTURE_SOURCES:"VencordGetDesktopCaptureSources",OPEN_MONACO_EDITOR:"VencordOpenMonacoEditor"})});var N,le=m(()=>{"use strict";i();N=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,s=""){console[t](`%c Vencord %c %c ${this.name} ${s}`,`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)}}});function We(e){let t=function(){};return t.cachedValue=void 0,t.get=()=>t.cachedValue??=e(),new Proxy(t,Nn)}var Aa,Nn,Et=m(()=>{"use strict";i();Aa=["arguments","caller","prototype"],Nn={};for(let e of["apply","construct","defineProperty","deleteProperty","get","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf"])Nn[e]=(t,...n)=>Reflect[e](t.get(),...n);Nn.ownKeys=e=>{let t=e.get(),n=Reflect.ownKeys(t);for(let r of Aa)n.includes(r)||n.push(r);return n};Nn.getOwnPropertyDescriptor=(e,t)=>typeof t=="string"&&Aa.includes(t)?Reflect.getOwnPropertyDescriptor(e,t):Reflect.getOwnPropertyDescriptor(e.get(),t)});var km,Ve,_o=m(()=>{"use strict";i();le();km=(e,t,n)=>t,Ve=km});function Do(e){if(et!==void 0)throw"no.";st=e.push([[Symbol("Vencord")],{},t=>t]),et=st.c,e.pop()}function Ae(e,t=!0){return We(()=>Ce(e,t))}function La(e,t=!0){if(typeof e!="function")throw new Error("Invalid filter. Expected a function got "+typeof e);let n=[];for(let r in et){let s=et[r];if(!!s?.exports){if(e(s.exports))n.push(s.exports);else if(typeof s.exports!="object")continue;if(s.exports.default&&e(s.exports.default))n.push(t?s.exports.default:s.exports);else for(let a in s.exports)if(a.length<=3){let c=s.exports[a];c&&e(c)&&n.push(c)}}}return n}function Me(e,t){return We(()=>Bn(e,t))}function _e(...e){return Ce(E.byProps(...e))}function M(...e){return Ae(E.byProps(...e))}function Im(...e){return La(E.byProps(...e))}function xe(...e){return Ce(E.byCode(...e))}function re(...e){return Ae(E.byCode(...e))}function $(e,t){if(typeof e=="string")e=E.byProps(e);else if(Array.isArray(e))e=E.byProps(...e);else if(typeof e!="function")throw new Error("filter must be a string, string[] or function, got "+typeof e);let n=Ce(e,!0,!0);if(n)return void t(n);_a.set(e,t)}function Mm(e){Fo.add(e)}function Rm(e){Fo.delete(e)}function Oo(...e){let t={},n=st.m;e:for(let r in n){let s=n[r].original??n[r],a=s.toString();for(let c of e)if(typeof c=="string"&&!a.includes(c)||c instanceof RegExp&&!c.test(a))continue e;t[r]=s}return t}function Cm(e){let t=st.m[e];if(!t)return null;let n=` +"use strict";var Vencord=(()=>{var zT=Object.create;var Yi=Object.defineProperty;var jT=Object.getOwnPropertyDescriptor;var WT=Object.getOwnPropertyNames;var qT=Object.getPrototypeOf,KT=Object.prototype.hasOwnProperty;var Of=(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 m=(e,t)=>()=>(e&&(t=e(e=0)),t);var Lr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ge=(e,t)=>{for(var n in t)Yi(e,n,{get:t[n],enumerable:!0})},_f=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of WT(t))!KT.call(e,i)&&i!==n&&Yi(e,i,{get:()=>t[i],enumerable:!(r=jT(t,i))||r.enumerable});return e};var al=(e,t,n)=>(n=e!=null?zT(qT(e)):{},_f(t||!e||!e.__esModule?Yi(n,"default",{value:e,enumerable:!0}):n,e)),Lo=e=>_f(Yi({},"__esModule",{value:!0}),e);var d,o,a=m(()=>{"use strict";d=Symbol.for("react.fragment"),o=(...e)=>(o=Vencord.Webpack.Common.React.createElement)(...e)});var In={};ge(In,{clear:()=>QT,createStore:()=>Ff,del:()=>XT,delMany:()=>JT,entries:()=>tx,get:()=>Qe,getMany:()=>ZT,keys:()=>VT,promisifyRequest:()=>vt,set:()=>Ve,setMany:()=>YT,update:()=>Eo,values:()=>ex});function vt(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Ff(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=vt(n);return(i,s)=>r.then(l=>s(l.transaction(t,i).objectStore(t)))}function on(){return ll||(ll=Ff("VencordData","VencordStore")),ll}function Qe(e,t=on()){return t("readonly",n=>vt(n.get(e)))}function Ve(e,t,n=on()){return n("readwrite",r=>(r.put(t,e),vt(r.transaction)))}function YT(e,t=on()){return t("readwrite",n=>(e.forEach(r=>n.put(r[1],r[0])),vt(n.transaction)))}function ZT(e,t=on()){return t("readonly",n=>Promise.all(e.map(r=>vt(n.get(r)))))}function Eo(e,t,n=on()){return n("readwrite",r=>new Promise((i,s)=>{r.get(e).onsuccess=function(){try{r.put(t(this.result),e),i(vt(r.transaction))}catch(l){s(l)}}}))}function XT(e,t=on()){return t("readwrite",n=>(n.delete(e),vt(n.transaction)))}function JT(e,t=on()){return t("readwrite",n=>(e.forEach(r=>n.delete(r)),vt(n.transaction)))}function QT(e=on()){return e("readwrite",t=>(t.clear(),vt(t.transaction)))}function cl(e,t){return e.openCursor().onsuccess=function(){!this.result||(t(this.result),this.result.continue())},vt(e.transaction)}function VT(e=on()){return e("readonly",t=>{if(t.getAllKeys)return vt(t.getAllKeys());let n=[];return cl(t,r=>n.push(r.key)).then(()=>n)})}function ex(e=on()){return e("readonly",t=>{if(t.getAll)return vt(t.getAll());let n=[];return cl(t,r=>n.push(r.value)).then(()=>n)})}function tx(e=on()){return e("readonly",t=>{if(t.getAll&&t.getAllKeys)return Promise.all([vt(t.getAllKeys()),vt(t.getAll())]).then(([r,i])=>r.map((s,l)=>[s,i[l]]));let n=[];return e("readonly",r=>cl(r,i=>n.push([i.key,i.value])).then(()=>n))})}var ll,Cn=m(()=>{"use strict";a();});var Er,ul=m(()=>{"use strict";a();Er=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 rn,Dr=m(()=>{a();rn="bea7a17"});var Zi,$f=m(()=>{a();Zi="Vendicated/Vencord"});var qt,nx,pl,Xi,p,dl,w=m(()=>{"use strict";a();Dr();$f();qt="webpackChunkdiscord_app",nx="Vencord.Webpack.Common.React",pl=`Vencord/${rn}${Zi?` (https://github.com/${Zi})`:""}`,Xi="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:787017887877169173n},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:174200708818665472n},rad:{name:"rad",id:113027285765885952n},HypedDomi:{name:"HypedDomi",id:354191516979429376n}}),dl=(()=>Object.freeze(Object.fromEntries(Object.entries(p).filter(e=>e[1].id!==0n).map(([e,t])=>[t.id,t]))))()});function At(e,t=300){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}var nr=m(()=>{"use strict";a()});function $n(e){let t;return()=>t??(t=e())}function dt(e,t=5){let n=0,r=Object.assign(function(){},{[Ji]:void 0,[Vi](){return!r[Ji]&&t>n++&&(r[Ji]=e()),r[Ji]}});return new Proxy(r,Qi)}var Uf,Qi,Vi,Ji,sn=m(()=>{"use strict";a();Uf=["arguments","caller","prototype"],Qi={},Vi=Symbol.for("vencord.lazy.get"),Ji=Symbol.for("vencord.lazy.cached");for(let e of["apply","construct","defineProperty","deleteProperty","get","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf"])Qi[e]=(t,...n)=>Reflect[e](t[Vi](),...n);Qi.ownKeys=e=>{let t=e[Vi](),n=Reflect.ownKeys(t);for(let r of Uf)n.includes(r)||n.push(r);return n};Qi.getOwnPropertyDescriptor=(e,t)=>{if(typeof t=="string"&&Uf.includes(t))return Reflect.getOwnPropertyDescriptor(e,t);let n=Reflect.getOwnPropertyDescriptor(e[Vi](),t);return n&&Object.defineProperty(e,t,n),n}});var Y,be=m(()=>{"use strict";a();Y=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 ox,an,es=m(()=>{"use strict";a();be();ox=(e,t,n)=>t,an=ox});function ns(e){if(Un!==void 0)throw"no.";Gt=e.push([[Symbol("Vencord")],{},t=>t]),Un=Gt.c,e.pop()}function ke(e,t=!0){return dt(()=>Ht(e,t))}function or(e,t=!0){if(typeof e!="function")throw new Error("Invalid filter. Expected a function got "+typeof e);let n=[];for(let r in Un){let i=Un[r];if(!!i?.exports){if(e(i.exports))n.push(i.exports);else if(typeof i.exports!="object")continue;if(i.exports.default&&e(i.exports.default))n.push(t?i.exports.default:i.exports);else for(let s in i.exports)if(s.length<=3){let l=i.exports[s];l&&e(l)&&n.push(l)}}}return n}function Ke(e,t){return dt(()=>Hf(e,t))}function Nn(...e){return Ht(K.byProps(...e))}function P(...e){return ke(K.byProps(...e))}function ze(...e){return Ht(K.byCode(...e))}function ce(...e){return ke(K.byCode(...e))}function rx(e){return Ht(K.byStoreName(e))}function ae(e){return ke(K.byStoreName(e))}function Ye(e,t){if(typeof e=="string")e=K.byProps(e);else if(Array.isArray(e))e=K.byProps(...e);else if(typeof e!="function")throw new Error("filter must be a string, string[] or function, got "+typeof e);let[n,r]=Ht(e,!0,!0);if(n)return void t(n,r);Gf.set(e,t)}function ix(e){gl.add(e)}function sx(e){gl.delete(e)}function hl(...e){let t={},n=Gt.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 yl(e){let t=Gt.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!! ${t.toString()} //# sourceURL=ExtractedWebpackModule${e} -`;return(0,eval)(n)}var Lo,On,Eo,st,et,E,_a,Fo,Ce,No,Ea,Bn,Fa=m(()=>{"use strict";i();le();Et();_o();Lo=new N("Webpack"),Eo=new Promise(e=>On=e),E={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}},_a=new Map,Fo=new Set;Ce=Ve("find",function(t,n=!0,r=!1){if(typeof t!="function")throw new Error("Invalid filter. Expected a function got "+typeof t);for(let s in et){let a=et[s];if(!!a?.exports){if(t(a.exports))return a.exports;if(typeof a.exports=="object"){if(a.exports.default&&t(a.exports.default))return n?a.exports.default:a.exports;for(let c in a.exports)if(c.length<=3){let f=a.exports[c];if(f&&t(f))return f}}}}if(!r){let s=new Error("Didn't find module matching this filter");Lo.warn(s)}return null});No=Ve("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 Ce(t[0]);let r=t,s=0,a=Array(n);e:for(let c in et){let f=et[c];if(!!f?.exports)for(let d=0;d$o,_initWebpack:()=>Do,_resolveReady:()=>On,addListener:()=>Mm,cache:()=>et,extract:()=>Cm,filters:()=>E,find:()=>Ce,findAll:()=>La,findAllByProps:()=>Im,findBulk:()=>No,findByCode:()=>xe,findByCodeLazy:()=>re,findByProps:()=>_e,findByPropsLazy:()=>M,findLazy:()=>Ae,findModuleId:()=>Ea,listeners:()=>Fo,mapMangledModule:()=>Bn,mapMangledModuleLazy:()=>Me,onceReady:()=>Eo,removeListener:()=>Rm,search:()=>Oo,subscriptions:()=>_a,waitFor:()=>$,wreq:()=>st});var L=m(()=>{"use strict";i();k();Fa()});var $o={};ee($o,{Alerts:()=>at,Button:()=>F,Card:()=>Te,ChannelStore:()=>ae,Clipboard:()=>Ee,ContextMenu:()=>Yo,Flux:()=>Uo,FluxDispatcher:()=>I,Forms:()=>y,GuildChannelStore:()=>zo,GuildStore:()=>qe,Margins:()=>V,Menu:()=>ue,MessageStore:()=>vt,NavigationRouter:()=>Ko,Parser:()=>Ke,PermissionStore:()=>jo,PresenceStore:()=>Xt,PrivateChannelsStore:()=>Go,React:()=>b,ReactDOM:()=>Am,ReadStateStore:()=>$n,RelationshipStore:()=>Hn,RestAPI:()=>Ho,Router:()=>jn,Select:()=>St,SelectedChannelStore:()=>pe,SelectedGuildStore:()=>Un,Slider:()=>qo,Switch:()=>bt,Text:()=>Y,TextArea:()=>Wo,TextInput:()=>Le,Toasts:()=>A,Tooltip:()=>me,UserStore:()=>G,UserUtils:()=>Zt,hljs:()=>Jt,moment:()=>_m});var V,I,Uo,b,Am,Ho,_m,Jt,vt,jo,Go,zo,$n,Xt,qe,G,pe,Un,ae,Hn,y,Te,F,bt,me,jn,Le,Y,Wo,St,qo,Ke,at,Lm,Em,A,Zt,Ee,Ko,ue,Yo,k=m(()=>{"use strict";i();O();Et();L();V=M("marginTop20"),Uo=M("connectStores"),Am=M("createPortal","render"),Ho=M("getAPIBaseURL","get"),_m=M("parseTwoDigitYear"),Jt=M("highlight"),vt=M("getRawMessages"),jo=M("can","getGuildPermissions"),Go=M("openPrivateChannel"),zo=M("getChannels"),$n=M("lastMessageId"),Xt=M("setCurrentUserOnConnectionOpen"),y={},Wo=re("handleSetRef","textArea"),St=Q(()=>xe("optionClassName","popoutPosition","autoFocus","maxVisibleItems")),qo=Q(()=>xe("closestMarkerIndex","stickToMarkers")),Lm={MESSAGE:0,SUCCESS:1,FAILURE:2,CUSTOM:3},Em={TOP:0,BOTTOM:1},A={Type:Lm,Position:Em,genId:()=>(Math.random()||Math.random()).toString(36).slice(2)},Zt={fetchUser:re(".USER(","getUser")},Ee=Me('document.queryCommandEnabled("copy")||document.queryCommandSupported("copy")',{copy:E.byCode(".default.copy("),SUPPORTS_COPY:e=>typeof e=="boolean"}),Ko=Me("Transitioning to external path",{transitionTo:E.byCode("Transitioning to external path"),transitionToGuild:E.byCode("transitionToGuild"),goBack:E.byCode("goBack()"),goForward:E.byCode("goForward()")});$("useState",e=>b=e);$(["dispatch","subscribe"],e=>{I=e;let t=()=>{e.unsubscribe("CONNECTION_OPEN",t),On()};e.subscribe("CONNECTION_OPEN",t)});$(["getCurrentUser","initialize"],e=>G=e);$("getSortedPrivateChannels",e=>ae=e);$("getCurrentlySelectedChannelId",e=>pe=e);$("getLastSelectedGuildId",e=>Un=e);$("getGuildCount",e=>qe=e);$("getRelationshipType",e=>Hn=e);$(["Hovers","Looks","Sizes"],e=>F=e);$(E.byCode("helpdeskArticleId"),e=>bt=e);$(["Positions","Colors"],e=>me=e);$(e=>e.Types?.PRIMARY==="cardPrimary",e=>Te=e);$(E.byCode("errorSeparator"),e=>y.FormTitle=e);$(E.byCode("titleClassName","sectionTitle"),e=>y.FormSection=e);$(e=>e.Types?.INPUT_PLACEHOLDER,e=>y.FormText=e);$(e=>{if(typeof e!="function")return!1;let t=e.toString();return t.length<200&&t.includes("().divider")},e=>y.FormDivider=e);$(E.byCode("currentToast?"),e=>A.show=e);$(E.byCode("currentToast:null"),e=>A.pop=e);$(["show","close"],e=>at=e);$("parseTopic",e=>Ke=e);$(["open","saveAccountChanges"],e=>jn=e);$(["defaultProps","Sizes","contextType"],e=>Le=e);$(e=>{if(typeof e!="function")return!1;let t=e.toString();return t.length<1500&&t.includes("data-text-variant")&&t.includes("always-white")},e=>Y=e);ue=We(()=>{let e=Vencord.Settings.plugins.MenuItemDeobfuscatorAPI.enabled,t=["MenuSeparator","MenuGroup","MenuItem","MenuCheckboxItem","MenuRadioItem","MenuControlItem"],n=Bn("\u266B \u2282(\uFF61\u25D5\u203F\u203F\u25D5\uFF61\u2282) \u266A",{ContextMenu:E.byCode("getContainerProps"),...Object.fromEntries((e?t:[]).map(r=>[r,s=>s.name===r]))});if(!e)for(let r of t)Object.defineProperty(n,r,{get(){throw new Error("MenuItemDeobfuscator must be enabled to use this.")}});return n}),Yo=Me('type:"CONTEXT_MENU_OPEN"',{open:E.byCode("stopPropagation"),openLazy:e=>e.toString().length<50,close:E.byCode("CONTEXT_MENU_CLOSE")})});function Fe(e){let t;return()=>t??(t=e())}function ve(e,t){let n=Object.assign({fallbackValue:null,deps:[],onError:null},t),[r,s]=b.useState({value:n.fallbackValue,error:null,pending:!0});return b.useEffect(()=>{let a=!0;return r.pending||s({...r,pending:!0}),e().then(c=>a&&s({value:c,error:null,pending:!1})).catch(c=>a&&(s({value:null,error:c,pending:!1}),n.onError?.(c))),()=>void(a=!1)},n.deps),[r.value,r.error,r.pending]}function ct(){let[,e]=b.useState(0);return()=>e(t=>t+1)}function Q(e){let t=Fe(e);return n=>{let r=t();return o(r,{...n})}}function xt(e,t){for(let n in t){let r=t[n];typeof r=="object"&&!Array.isArray(r)?(e[n]??={},xt(e[n],r)):e[n]??=r}return e}function Fm(e,t=n=>n){let{length:n}=e;if(n===0)return"";if(n===1)return t(e[0]);let r="";for(let s=0;s2?r+=", ":n-s>1&&(r+=" and ");return r}function ie(...e){return e.join(" ")}function Vt(e){return new Promise(t=>setTimeout(t,e))}function Dm(e,t,n){return t.constructor.name==="AsyncFunction"?async function(){try{await t.apply(n??this,arguments)}catch(r){console.error(`Caught an Error in ${e||"anonymous"} -`,r)}}:function(){try{t.apply(n??this,arguments)}catch(r){console.error(`Caught an Error in ${e||"anonymous"} -`,r)}}}function Gn(e,t){let n="```";return`${n}${t||""} +`;return(0,eval)(n)}var ml,ts,fl,Gt,Un,K,Gf,gl,Ht,Or,os,Hf,O=m(()=>{"use strict";a();sn();be();es();ml=new Y("Webpack"),fl=new Promise(e=>ts=e),K={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},Gf=new Map,gl=new Set;Ht=an("find",function(t,n=!0,r=!1){if(typeof t!="function")throw new Error("Invalid filter. Expected a function got "+typeof t);for(let i in Un){let s=Un[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=n?s.exports.default:s.exports;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}}}}if(!r){let i=new Error("Didn't find module matching this filter");ml.warn(i)}return r?[null,null]:null});Or=an("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 Ht(t[0]);let r=t,i=0,s=Array(n);e:for(let l in Un){let c=Un[l];if(!!c?.exports)for(let u=0;u{"use strict";a();O();rs=P("image","modal"),mt=P("buttonWrapper","buttonContent")});function Do(e,t){for(let n in t){let r=t[n];typeof r=="object"&&!Array.isArray(r)?(e[n]??={},Do(e[n],r)):e[n]??=r}return e}function J(...e){return e.filter(Boolean).join(" ")}function so(e){return new Promise(t=>setTimeout(t,e))}function Yt(e,t="Copied to clipboard!"){Kt.SUPPORTS_COPY?Kt.copy(e):t="Your browser does not support copying to clipboard",X.show({message:t,id:X.genId(),type:X.Type.SUCCESS})}function lx(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function vl(e){try{return new URL(e)}catch{return null}}function is(e){return e}var Sl,cx,_r,fe=m(()=>{"use strict";a();T();w();Sl=e=>{let t=e.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(t.bottom<0||t.top-n>=0)};cx=navigator.userAgent.includes("Mobi"),_r=e=>Object.hasOwn(dl,e)});function ot(e,t){let n=Object.assign({fallbackValue:null,deps:[],onError:null},t),[r,i]=V({value:n.fallbackValue,error:null,pending:!0});return rt(()=>{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 Lt(e){let t=rr(n=>n+1,0);return e?t:t[1]}function re(e){let t=$n(e);return n=>{let r=t();return o(r,{...n})}}var bl,ve=m(()=>{"use strict";a();T();sn();fe();bl=(e=!1)=>{let t=I.useRef(null),[n,r]=V(!1);return[s=>{t.current?.disconnect(),t.current=null,s&&(Sl(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]}});function ss(e,t){let n=function(){throw new Error(`Vencord could not find the ${e} Component`)},r=re(()=>n);return Ye(t,i=>{n=i,Object.assign(r,i)}),r}function St(e,t){Ye(K.byStoreName(e),t)}var Tl=m(()=>{"use strict";a();ve();O()});var v,Et,N,ft,W,Re,as,Q,ln,ls,Oo,Zt,Br,jf,Wf,cs,us,ps,ds,Fr,xl,kn,ux,qf=m(()=>{"use strict";a();O();Tl();v={},xl=ss("MaskedLink",e=>e?.type?.toString().includes("MASKED_LINK)")),kn=ss("Timestamp",K.byCode(".Messages.MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL.format")),ux=ss("Flex",["Justify","Align","Wrap"]);Ye("FormItem",e=>{({useToken:Fr,Card:Et,Button:N,FormSwitch:ft,Tooltip:W,TextInput:Re,TextArea:as,Text:Q,Select:ln,SearchableSelect:ls,Slider:Oo,ButtonLooks:Zt,TabBar:Wf,Popout:Br,Dialog:jf,Paginator:cs,ScrollerThin:us,Clickable:ps,Avatar:ds}=e),v=e})});var L,cn,Kf=m(()=>{"use strict";a();O();L={};Ye("MenuItem",e=>L=e);cn=Ke('type:"CONTEXT_MENU_OPEN"',{open:K.byCode("stopPropagation"),openLazy:e=>e.toString().length<50,close:K.byCode("CONTEXT_MENU_CLOSE")})});var I,V,rt,zt,Xt,rr,Yf,_o,Zf=m(()=>{"use strict";a();O();_o=P("createPortal","render");Ye("useState",e=>{I=e,{useEffect:rt,useState:V,useMemo:zt,useRef:Xt,useReducer:rr,useCallback:Yf}=I})});var wl,un,Pl,je,ms,$r,ao,px,ue,F,Pe,lo,Z,Ae,et,pn,Ur,Ml,Fe,Xf=m(()=>{"use strict";a();O();Tl();wl=P("connectStores"),Pl=P("openPrivateChannel"),Ml=Ke('"MaskedLinkStore"',{openUntrustedLink:K.byCode(".apply(this,arguments)")}),Fe=ce("useStateFromStores");St("UserStore",e=>F=e);St("ChannelStore",e=>Z=e);St("SelectedChannelStore",e=>Pe=e);St("SelectedGuildStore",e=>lo=e);St("GuildStore",e=>ue=e);St("GuildMemberStore",e=>Ae=e);St("RelationshipStore",e=>et=e);St("PermissionStore",e=>je=e);St("PresenceStore",e=>ao=e);St("ReadStateStore",e=>$r=e);St("GuildChannelStore",e=>ms=e);St("MessageStore",e=>un=e);St("WindowStore",e=>Ur=e);St("EmojiStore",e=>pn=e)});var Jf={};var Qf=m(()=>{"use strict";a()});var Vf={};var eg=m(()=>{"use strict";a()});var tg={};var ng=m(()=>{"use strict";a()});function fs(e,t=og.MESSAGE){X.show({id:X.genId(),message:e,type:t})}var E,Il,Dt,Jt,Bo,it,ir,Ie,bt,og,dx,X,Rn,Kt,Gr,gs,An,rg=m(()=>{"use strict";a();O();Il=ke(e=>e.emitter?._events?.INSERT_TEXT),Dt=P("getAPIBaseURL","get"),Jt=P("parseTwoDigitYear"),Bo=P("highlight"),it=ke(e=>e.Messages?.["en-US"]);Ye(["fromTimestamp","extractTimestamp"],e=>ir=e);og={MESSAGE:0,SUCCESS:1,FAILURE:2,CUSTOM:3},dx={TOP:0,BOTTOM:1},X={Type:og,Position:dx,genId:()=>(Math.random()||Math.random()).toString(36).slice(2)};Rn={fetchUser:ce(".USER(","getUser")},Kt=Ke('document.queryCommandEnabled("copy")||document.queryCommandSupported("copy")',{copy:K.byCode(".default.copy("),SUPPORTS_COPY:e=>typeof e=="boolean"}),Gr=Ke("transitionToGuild - ",{transitionTo:K.byCode("transitionTo -"),transitionToGuild:K.byCode("transitionToGuild -"),goBack:K.byCode("goBack()"),goForward:K.byCode("goForward()")});Ye(["dispatch","subscribe"],e=>{E=e;let t=()=>{e.unsubscribe("CONNECTION_OPEN",t),ts()};e.subscribe("CONNECTION_OPEN",t)});Ye("showToast",e=>{X.show=e.showToast,X.pop=e.popToast});Ye(["show","close"],e=>bt=e);Ye("parseTopic",e=>Ie=e);Ye(["open","saveAccountChanges"],e=>gs=e);An=ke(e=>typeof e.ADMINISTRATOR=="bigint")});var Cl={};ge(Cl,{Alerts:()=>bt,Avatar:()=>ds,Button:()=>N,ButtonLooks:()=>Zt,ButtonWrapperClasses:()=>mt,Card:()=>Et,ChannelStore:()=>Z,Clickable:()=>ps,Clipboard:()=>Kt,ComponentDispatch:()=>Il,ComponentTypes:()=>Jf,ContextMenu:()=>cn,Dialog:()=>jf,EmojiStore:()=>pn,Flex:()=>ux,Flux:()=>wl,FluxDispatcher:()=>E,Forms:()=>v,GuildChannelStore:()=>ms,GuildMemberStore:()=>Ae,GuildStore:()=>ue,MaskedLink:()=>xl,MaskedLinkStore:()=>Ml,Menu:()=>L,MenuTypes:()=>Vf,MessageStore:()=>un,ModalImageClasses:()=>rs,NavigationRouter:()=>Gr,Paginator:()=>cs,Parser:()=>Ie,PermissionStore:()=>je,PermissionsBits:()=>An,PoggerModeSettingsStore:()=>px,Popout:()=>Br,PresenceStore:()=>ao,PrivateChannelsStore:()=>Pl,React:()=>I,ReactDOM:()=>_o,ReadStateStore:()=>$r,RelationshipStore:()=>et,RestAPI:()=>Dt,ScrollerThin:()=>us,SearchableSelect:()=>ls,Select:()=>ln,SelectedChannelStore:()=>Pe,SelectedGuildStore:()=>lo,SettingsRouter:()=>gs,Slider:()=>Oo,SnowflakeUtils:()=>ir,Switch:()=>ft,TabBar:()=>Wf,Text:()=>Q,TextArea:()=>as,TextInput:()=>Re,Timestamp:()=>kn,Toasts:()=>X,Tooltip:()=>W,UserStore:()=>F,UserUtils:()=>Rn,UtilTypes:()=>tg,WindowStore:()=>Ur,hljs:()=>Bo,i18n:()=>it,moment:()=>Jt,showToast:()=>fs,useCallback:()=>Yf,useEffect:()=>rt,useMemo:()=>zt,useReducer:()=>rr,useRef:()=>Xt,useState:()=>V,useStateFromStores:()=>Fe,useToken:()=>Fr});var T=m(()=>{"use strict";a();zf();qf();Kf();Zf();Xf();Qf();eg();ng();rg()});function Hr(e,t){return hs.openModalLazy(e,t)}function Ce(e,t,n){return hs.openModal(e,t,n)}function Gn(e,t){return hs.closeModal(e,t)}function kl(){return hs.closeAllModals()}var co,dn,Nl,Le,$e,Ue,Tt,xt,hs,Ze=m(()=>{"use strict";a();O();ve();co=(i=>(i.SMALL="small",i.MEDIUM="medium",i.LARGE="large",i.DYNAMIC="dynamic",i))(co||{}),dn=Ke(".closeWithCircleBackground",{ModalRoot:K.byCode(".root"),ModalHeader:K.byCode(".header"),ModalContent:K.byCode(".content"),ModalFooter:K.byCode(".footerSeparator"),ModalCloseButton:K.byCode(".closeWithCircleBackground")}),Nl=re(()=>ze(".renderLinkComponent",".responsive")),Le=re(()=>dn.ModalRoot),$e=re(()=>dn.ModalHeader),Ue=re(()=>dn.ModalContent),Tt=re(()=>dn.ModalFooter),xt=re(()=>dn.ModalCloseButton),hs=Ke("onCloseRequest:null!=",{openModal:K.byCode("onCloseRequest:null!="),closeModal:K.byCode("onCloseCallback&&"),openModalLazy:e=>e?.length===1&&K.byCode(".apply(this,arguments)")(e),closeAllModals:K.byCode(".value.key,")})});function sr(){return Z.getChannel(Pe.getChannelId())}function Rl(){return ue.getGuild(sr()?.guild_id)}function gx(e){Pl.openPrivateChannel(e)}function zr(){return mx.getCurrentValue()?.appearance?.theme}function Hn(e){Il.dispatchToLastSubscribed("INSERT_TEXT",{rawText:e,plainText:e})}function hx(e,t,n,r){let i={content:"",invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};return fx.sendMessage(e,i,n,r)}function Fo(e,t){return Ce(n=>o(Le,{...n,className:rs.modal,size:"dynamic"},o(Nl,{className:rs.image,original:e,placeholder:e,src:e,renderLinkComponent:r=>o(xl,{...r}),shouldHideMediaOptions:!1,shouldAnimate:!0,...t})))}async function mn(e){if(!await Rn.fetchUser(e))throw new Error("No such user: "+e);let n=lo.getGuildId();yx({userId:e,guildId:n,channelId:Pe.getChannelId(),analyticsLocation:{page:n?"Guild Channel":"DM Channel",section:"Profile Popout"}})}function zn(e){return e.discriminator==="0"?e.username:e.tag}var mx,fx,ys,yx,tt=m(()=>{"use strict";a();O();T();Ze();mx=ke(e=>e.ProtoClass?.typeName.endsWith("PreloadedUserSettings")),fx=P("editMessage","sendMessage");ys=(n=>(n[n.Dark=1]="Dark",n[n.Light=2]="Light",n))(ys||{});yx=ce("friendToken","USER_PROFILE_MODAL_OPEN")});function vs(e){return Boolean(e)}function Al(e){return e!=null}var Ss=m(()=>{"use strict";a()});var $o,bs=m(()=>{"use strict";a();({localStorage:$o}=window)});var ig,G,Xe=m(()=>{"use strict";a();ig="",G={};for(let e of["top","bottom","left","right"])for(let t of[8,16,20]){let n=`vc-m-${e}-${t}`;G[`${e}${t}`]=n,ig+=`.${n}{margin-${e}:${t}px;}`}document.addEventListener("DOMContentLoaded",()=>document.head.append(Object.assign(document.createElement("style"),{textContent:ig,id:"vencord-margins"})),{once:!0})});function vx(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 sg=m(()=>{"use strict";a()});function Ll(e){let t=!1,n;return function(){return t?n:(t=!0,n=e.apply(this,arguments))}}var El=m(()=>{"use strict";a()});function Uo(e){if(typeof e=="string")return e;let t=e.source.replaceAll("\\i","[A-Za-z_$][\\w$]*");return new RegExp(t,e.flags)}function Ts(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 Dl(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 jr(e,t){let n=Object.getOwnPropertyDescriptors(e);n.match=Dl(n.match,Uo),n.replace=Dl(n.replace,r=>Ts(r,t)),Object.defineProperties(e,n)}var Wr=m(()=>{"use strict";a()});var fn,ar=m(()=>{"use strict";a();fn=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}}});function ag(e,t,n){return n===!1?t?e.slice(0,-1):e:e[0]}function qr(e,t,n=!1){let r=Jt.duration(e,t),i=Ix.map(u=>({amount:r[u](),unit:u})),s=0;e:for(let u=0;uu==="days");if(l!==-1){let u=i[l],h=u.amount%7;h===0?i.splice(l,1):u.amount=h}let c="";for(;i.length;){let{amount:u,unit:h}=i.shift();c.length&&(c+=i.length?", ":" and "),(u>0||c.length)&&(c+=`${u} ${ag(h,u===1,n)}`)}return c.length?c:`0 ${ag(t,!1,n)}`}function Cx(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 Kr(e,t){let n="```";return`${n}${t||""} ${e.replaceAll("```","\\`\\`\\`")} -${n}`}function en(e,t="Copied to clipboard!"){Ee.SUPPORTS_COPY?Ee.copy(e):t="Your browser does not support copying to clipboard",A.show({message:t,id:A.genId(),type:A.Type.SUCCESS})}function Nm(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Qo(e){try{return new URL(e)}catch{return null}}var Jo,O=m(()=>{"use strict";i();k();Jo=e=>{let t=e.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(t.bottom<0||t.top-n>=0)}});function u(e){return e}var T=m(()=>{"use strict";i()});function Xo(e,t=e,n=""){return Om[n]??=new Proxy(e,{get(r,s){let a=r[s];if(!(s in r)){if(n==="plugins"&&s in te)return r[s]=Xo({enabled:te[s].required??!1},t,`plugins.${s}`);if(n.startsWith("plugins.")){let c=n.slice(8);if(c in te){let f=te[c].options?.[s];if(!f)return a;if("default"in f)return r[s]=f.default;if(f.type===4){let d=f.options.find(v=>v.default);return d&&(r[s]=d.value),d?.value}}}return a}return typeof a=="object"&&!Array.isArray(a)&&a!==null?Xo(a,t,`${n}${n&&"."}${s}`):a},set(r,s,a){if(r[s]===a)return!0;r[s]=a;let c=`${n}${n&&"."}${s}`;for(let f of zn)(!f._path||f._path===c)&&f(a,c);return VencordNative.ipc.invoke(j.SET_SETTINGS,JSON.stringify(t,null,4)),!0}})}function De(e){let[,t]=b.useReducer(()=>({}),{}),n=e?(r,s)=>e.includes(s)&&t():t;return b.useEffect(()=>(zn.add(n),()=>void zn.delete(n)),[]),S}function Zo(e,t){t._path=e,zn.add(t)}function X(e,...t){let{plugins:n}=lt;if(!(e in n)){for(let r of t)if(r in n){Na.info(`Migrating settings from old name ${r} to ${e}`),n[e]=n[r],delete n[r],VencordNative.ipc.invoke(j.SET_SETTINGS,JSON.stringify(lt,null,4));break}}}var Na,Da,lt,zn,Om,Oa,S,R=m(()=>{"use strict";i();ze();le();O();T();k();tn();Na=new N("Settings"),Da={notifyAboutUpdates:!0,useQuickCss:!0,themeLinks:[],enableReactDevtools:!1,plugins:{}};try{lt=JSON.parse(VencordNative.ipc.sendSync(j.GET_SETTINGS)),xt(lt,Da)}catch(e){lt=xt({},Da),Na.error(`An error occurred while loading the settings. Corrupt settings file? -`,e)}zn=new Set,Om={};Oa=lt,S=Xo(lt)});var Tt,nn=m(()=>{i();Tt="62b2ace"});var Vo,Ba=m(()=>{i();Vo="Vendicated/Vencord"});var tr={};ee(tr,{Devs:()=>p,REACT_GLOBAL:()=>Bm,VENCORD_USER_AGENT:()=>er,WEBPACK_CHUNK:()=>tt});var tt,Bm,er,p,x=m(()=>{"use strict";i();nn();Ba();tt="webpackChunkdiscord_app",Bm="Vencord.Webpack.Common.React",er=`Vencord/${Tt}${Vo?` (https://github.com/${Vo})`:""}`,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}})});var nr,$a=m(()=>{"use strict";i();R();x();O();T();nr=u({name:"BetterNotesBox",description:"Hide notes or disable spellcheck (Configure in settings!!)",authors:[p.Ven],patches:[{find:"hideNote:",all:!0,predicate:Fe(()=>Vencord.Settings.plugins.BetterNotesBox.hide),replacement:{match:/hideNote:.+?(?=[,}])/g,replace:"hideNote:true"}},{find:"Messages.NOTE_PLACEHOLDER",replacement:{match:/\.NOTE_PLACEHOLDER,/,replace:"$&spellCheck:!Vencord.Settings.plugins.BetterNotesBox.noSpellCheck,"}}],options:{hide:{type:3,description:"Hide notes",default:!1,restartNeeded:!0},noSpellCheck:{type:3,description:"Disable spellcheck in notes",disabled:()=>S.plugins.BetterNotesBox.hide,default:!1}}})});var or,Ua=m(()=>{"use strict";i();x();T();or=u({name:"TimeBarAllActivities",description:"Adds the Spotify time bar to all activities if they have start and end timestamps",authors:[p.obscurity],patches:[{find:"renderTimeBar=function",replacement:{match:/renderTimeBar=function\((.{1,3})\){.{0,50}?var/,replace:"renderTimeBar=function($1){var"}}]})});var rr,Ha=m(()=>{"use strict";i();R();x();T();rr=u({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=Vencord.Plugins.plugins.AnonymiseFileNames.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:()=>S.plugins.AnonymiseFileNames.method!==0},consistent:{description:"Consistent filename",type:0,default:"image",disabled:()=>S.plugins.AnonymiseFileNames.method!==1}},anonymise(e){let t="image",n=e.lastIndexOf("."),r=n!==-1?e.slice(n):"";switch(S.plugins.AnonymiseFileNames.method){case 0:let s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";t=Array.from({length:S.plugins.AnonymiseFileNames.randomisedLength},()=>s[Math.floor(Math.random()*s.length)]).join("");break;case 1:t=S.plugins.AnonymiseFileNames.consistent;break;case 2:t=`${Math.floor(Date.now()/1e3)}${Math.floor(window.performance.now())}`;break}return t+r}})});function Wn(){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 ir=m(()=>{"use strict";i()});function on(e){return o(F,{...e,look:F.Looks.LINK,color:F.Colors.TRANSPARENT,onClick:()=>VencordNative.ipc.invoke(j.OPEN_EXTERNAL,"https://github.com/sponsors/Vendicated")},o(Wn,null),"Donate")}var sr=m(()=>{"use strict";i();ze();k();ir()});function rn(e){return o(Te,{className:e.className,style:{padding:"2em",backgroundColor:"#e7828430",borderColor:"#e78284",color:"var(--text-normal)",...e.style}},e.children)}var qn=m(()=>{"use strict";i();k()});var $m,ja,Ga,ar,D,ne=m(()=>{"use strict";i();le();O();k();qn();$m="#e78284",ja=new N("React ErrorBoundary",$m),Ga={},ar=Q(()=>class extends b.PureComponent{state={error:Ga,stack:"",message:""};static getDerivedStateFromError(t){let n=t?.stack??"",r=t?.message||String(t);if(t instanceof Error&&n){let s=n.indexOf(` -`);s!==-1&&(r=n.slice(0,s),n=n.slice(s+1).replace(/https:\/\/\S+\/assets\//g,""))}return{error:t,stack:n,message:r}}componentDidCatch(t,n){this.props.onError?.(t,n),ja.error(`A component threw an Error -`,t),ja.error("Component Stack",n.componentStack)}render(){if(this.state.error===Ga)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(rn,{style:{overflow:"hidden"}},o("h1",null,"Oh no!"),o("p",null,t),o("code",null,this.state.message,!!this.state.stack&&o("pre",{className:V.marginTop8},this.state.stack)))}});ar.wrap=(e,t)=>n=>o(ar,{...t},o(e,{...n}));D=ar});function Z(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 Ne=m(()=>{"use strict";i()});var dr={};ee(dr,{ModalCloseButton:()=>cr,ModalContent:()=>ot,ModalFooter:()=>sn,ModalHeader:()=>nt,ModalRoot:()=>Be,ModalSize:()=>Ft,Modals:()=>Oe,closeModal:()=>an,openModal:()=>we,openModalLazy:()=>pr});function pr(e,t){return lr.openModalLazy(e,t)}function we(e,t,n){return lr.openModal(e,t,n)}function an(e,t){return lr.closeModal(e,t)}var Ft,Oe,Be,nt,ot,sn,cr,lr,Ye=m(()=>{"use strict";i();L();Ft=(s=>(s.SMALL="small",s.MEDIUM="medium",s.LARGE="large",s.DYNAMIC="dynamic",s))(Ft||{}),Oe=Me("().closeWithCircleBackground",{ModalRoot:E.byCode("().root"),ModalHeader:E.byCode("().header"),ModalContent:E.byCode("().content"),ModalFooter:E.byCode("().footerSeparator"),ModalCloseButton:E.byCode("().closeWithCircleBackground")}),Be=e=>o(Oe.ModalRoot,{...e}),nt=e=>o(Oe.ModalHeader,{...e}),ot=e=>o(Oe.ModalContent,{...e}),sn=e=>o(Oe.ModalFooter,{...e}),cr=e=>o(Oe.ModalCloseButton,{...e}),lr=Me("onCloseRequest:null!=",{openModal:E.byCode("onCloseRequest:null!="),closeModal:E.byCode("onCloseCallback&&"),openModalLazy:e=>e?.length===1&&E.byCode(".apply(this,arguments)")(e)})});var Um,Hm,jm,za,mr,Wa=m(()=>{"use strict";i();fr();sr();ne();Ne();ir();x();ze();le();Ye();T();k();Um="https://media.discordapp.net/stickers/1026517526106087454.webp",Hm=Object.values(p).map(e=>e.id.toString()),jm={tooltip:"Vencord Contributor",image:Um,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},shouldShow:({user:e})=>Hm.includes(e.id),onClick:()=>VencordNative.ipc.invoke(j.OPEN_EXTERNAL,"https://github.com/Vendicated/Vencord")},za={},mr=u({name:"BadgeAPI",description:"API to add badges to users.",authors:[p.Megu],required:!0,patches:[{find:"PREMIUM_GUILD_SUBSCRIPTION_TOOLTIP.format({date:",replacement:{match:/&&((\w{1,3})\.push\({tooltip:\w{1,3}\.\w{1,3}\.Messages\.PREMIUM_GUILD_SUBSCRIPTION_TOOLTIP\.format.+?;)(?:return\s\w{1,3};?})/,replace:(e,t,n)=>`&&${t} return Vencord.Api.Badges.inject(${n}, arguments[0]);}`}},{find:"Messages.PROFILE_USER_BADGES,role:",replacement:{match:/src:(\w{1,3})\[(\w{1,3})\.key\],/,replace:(e,t,n)=>`src: ${n}.image ?? ${t}[${n}.key], ...${n}.props,`}}],async start(){Vencord.Api.Badges.addBadge(jm);let t=(await fetch("https://gist.githubusercontent.com/Vendicated/51a3dd775f6920429ec6e9b735ca7f01/raw/badges.csv").then(n=>n.text())).trim().split(` -`);if(t.shift()!=="id,tooltip,image"){new N("BadgeAPI").error("Invalid badges.csv file!");return}for(let n of t){let[r,s,a]=n.split(",");za[r]={image:a,tooltip:s}}},addDonorBadge(e,t){let n=za[t];n&&e.unshift({...n,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},onClick(){let r=we(s=>o(D,{noop:!0,onError:()=>{an(r),VencordNative.ipc.invoke(j.OPEN_EXTERNAL,"https://github.com/sponsors/Vendicated")}},o(Oe.ModalRoot,{...s},o(Oe.ModalHeader,null,o(Z,{style:{width:"100%",justifyContent:"center"}},o(y.FormTitle,{tag:"h2",style:{width:"100%",textAlign:"center",margin:0}},o(Wn,null),"Vencord Donor"))),o(Oe.ModalContent,null,o(Z,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(y.FormText,null,"This Badge is a special perk for Vencord Donors"),o(y.FormText,{className:V.marginTop20},"Please consider supporting the development of Vencord by becoming a donor. It would mean a lot!!"))),o(Oe.ModalFooter,null,o(Z,{style:{width:"100%",justifyContent:"center"}},o(on,null))))))}})}})});var gr,qa=m(()=>{"use strict";i();x();T();gr=u({name:"CommandsAPI",authors:[p.Arjix],description:"Api required by anything that uses commands",patches:[{find:'"giphy","tenor"',replacement:[{match:/(?<=\w=)(\w)(\.filter\(.{0,30}giphy)/,replace:"Vencord.Api.Commands._init($1)$2"}]},{find:"Unexpected value for option",replacement:{match:/,(.{1,2})\.execute\((.{1,2}),(.{1,2})\)]/,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 Ka,hr,Ya=m(()=>{"use strict";i();R();x();T();Ka={radio:"MenuRadioItem",separator:"MenuSeparator",checkbox:"MenuCheckboxItem",groupstart:"MenuGroup",control:"MenuControlItem",compositecontrol:"MenuControlItem",item:"MenuItem",customitem:"MenuItem"};X("MenuItemDeobfuscatorAPI","MenuItemDeobfuscatorApi");hr=u({name:"MenuItemDeobfuscatorAPI",description:"Deobfuscates Discord's Menu Item module",authors:[p.Ven],patches:[{find:'"Menu API',replacement:{match:/function.{0,80}type===(.{1,3})\..{1,3}\).{0,50}navigable:.+?Menu API/s,replace:(e,t)=>{let n="",r=[],s=/\(.{1,3}\.type===(.{1,5})\)/g,a=/type:"(\w+)"/g,c;for(;(c=s.exec(e))!==null;){let f=c[1];a.lastIndex=s.lastIndex;let d=a.exec(e)?.[1];if(d&&d in Ka){let v=Ka[d];n+=`Object.defineProperty(${f},"name",{value:"${v}"});`,r.push(`${v}:${f}`)}}return r.length<6&&console.warn("[ApiMenuItemDeobfuscator] Expected to at least remap 6 items, only remapped",r.length),`${n}Object.assign(${t},{${r.join(",")}});${e}`}}}]})});var yr,Qa=m(()=>{"use strict";i();x();T();yr=u({name:"MessageAccessoriesAPI",description:"API to add message accessories.",authors:[p.Cyn],patches:[{find:"_messageAttachmentToEmbedMedia",replacement:{match:/(\(\)\.container\)?,children:)(\[[^\]]+\])(}\)\};return)/,replace:(e,t,n,r)=>`${t}Vencord.Api.MessageAccessories._modifyAccessories(${n},this.props)${r}`}}]})});var vr,Ja=m(()=>{"use strict";i();x();T();vr=u({name:"MessageEventsAPI",description:"Api required by anything using message events.",authors:[p.Arjix],patches:[{find:"sendMessage:function",replacement:[{match:/(?<=_sendMessage:function\([^)]+\)){/,replace:"{if(Vencord.Api.MessageEvents._handlePreSend(...arguments)){return;};"},{match:/(?<=\beditMessage:function\([^)]+\)){/,replace:"{Vencord.Api.MessageEvents._handlePreEdit(...arguments);"}]},{find:'("interactionUsernameProfile',replacement:{match:/var \w=(\w)\.id,\w=(\w)\.id;return .{1,2}\.useCallback\(\(?function\((.{1,2})\){/,replace:(e,t,n,r)=>`var _msg=${t},_chan=${n};${e}Vencord.Api.MessageEvents._handleClick(_msg, _chan, ${r});`}}]})});var br,Xa=m(()=>{"use strict";i();x();T();br=u({name:"MessagePopoverAPI",description:"API to add buttons to message popovers.",authors:[p.KingFish],patches:[{find:"Messages.MESSAGE_UTILITIES_A11Y_LABEL",replacement:{match:/(message:(.).{0,100}Fragment,\{children:\[)(.{0,90}renderPopout:.{0,200}message_reaction_emoji_picker.+?return (.{1,3})\(.{0,30}"add-reaction")/,replace:"$1...Vencord.Api.MessagePopover._buildPopoverElements($2,$4),$3"}}]})});var Sr,Za=m(()=>{"use strict";i();R();x();T();X("NoticesAPI","NoticesApi");Sr=u({name:"NoticesAPI",description:"Fixes notices being automatically dismissed",authors:[p.Ven],required:!0,patches:[{find:"updateNotice:",replacement:[{match:/;(.{1,2}=null;)(?=.{0,50}updateNotice)/g,replace:";if(Vencord.Api.Notices.currentNotice)return !1;$1"},{match:/(?<=NOTICE_DISMISS:function.+?){(?=if\(null==(.+?)\))/,replace:'{if($1?.id=="VencordNotice")return ($1=null,Vencord.Api.Notices.nextNotice(),true);'}]}]})});var xr,Va=m(()=>{"use strict";i();x();T();xr=u({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)(.*?homeIcon.*?)(\}function)/,replace:"$1[$2].concat(Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.Above))$3"}},{find:"Messages.SERVERS",replacement:{match:/(Messages\.SERVERS,children:)(.+?default:return null\}\}\)\))/,replace:"$1Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.In).concat($2)"}}]})});var kr={};ee(kr,{currentNotice:()=>cn,nextNotice:()=>ec,noticesQueue:()=>wr,popNotice:()=>Pr,showNotice:()=>ln});function Pr(){Tr.dismiss()}function ec(){cn=wr.shift(),cn&&Tr.show(...cn,"VencordNotice")}function ln(e,t,n){wr.push(["GENERIC",e,t,n]),cn||ec()}var Tr,wr,cn,pn=m(()=>{"use strict";i();L();$(e=>e.show&&e.dismiss&&!e.suppressAll,e=>Tr=e);wr=[],cn=null});function Pe(e){return e.disabled&&(e.style??={},e.style.pointerEvents="none",e["aria-disabled"]=!0),o("a",{role:"link",target:"_blank",...e},e.children)}var wt=m(()=>{"use strict";i()});async function tc(e,t){return(await Gm.getAsset(e,[t,void 0]))[0]}async function Wm(e){let t={};return await zm.lookupApp(t,e),t.application}var Gm,zm,nc,Dt,Ir,oc=m(()=>{"use strict";i();pn();wt();x();T();L();k();Gm=Me("getAssetImage: size must === [number, number] for Twitch",{getAsset:E.byCode("apply(")}),zm=re(".APPLICATION_RPC(");nc={};Ir=u({name:"WebRichPresence (arRPC)",description:"Client plugin for arRPC to enable RPC on Discord Web (experimental)",authors:[p.Ducko],target:"WEB",settingsAboutComponent:()=>o(l,null,o(y.FormTitle,{tag:"h3"},"How to use arRPC"),o(y.FormText,null,o(Pe,{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 start(){if(Dt&&Dt.close(),Dt=new WebSocket("ws://127.0.0.1:1337"),Dt.onmessage=async t=>{let n=JSON.parse(t.data);if(n.activity?.assets?.large_image&&(n.activity.assets.large_image=await tc(n.activity.application_id,n.activity.assets.large_image)),n.activity?.assets?.small_image&&(n.activity.assets.small_image=await tc(n.activity.application_id,n.activity.assets.small_image)),n.activity){let r=n.activity.application_id;nc[r]||=await Wm(r);let s=nc[r];n.activity.name||=s.name}I.dispatch({type:"LOCAL_ACTIVITY_UPDATE",...n})},!await new Promise(t=>setTimeout(()=>t(Dt.readyState===WebSocket.OPEN),1e3))){ln("Failed to connect to arRPC, is it running?","Retry",()=>{Pr(),this.start()});return}A.show({message:"Connected to arRPC",type:A.Type.SUCCESS,id:A.genId(),options:{duration:1e3,position:A.Position.BOTTOM}})},stop(){I.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:null}),Dt.close()}})});var Mr,rc=m(()=>{"use strict";i();x();T();Mr=u({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:\w\(\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 Rr,ic=m(()=>{"use strict";i();x();T();Rr=u({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:"Vencord.Plugins.plugins.BetterGifAltText.altify(e);$1"}},{find:'preload:"none","aria',replacement:{match:/(?<==(.{1,3})\.alt.{0,20})\?.{0,5}\.Messages\.GIF/,replace:"?($1.alt='GIF',Vencord.Plugins.plugins.BetterGifAltText.altify($1))"}}],altify(e){if(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 Cr,sc=m(()=>{"use strict";i();R();x();T();k();X("BetterRoleDot","ClickableRoleDot");Cr=u({name:"BetterRoleDot",authors:[p.Ven],description:"Copy role colour on RoleDot (accessibility setting) click. Also allows using both RoleDot and coloured names simultaneously",patches:[{find:"M0 4C0 1.79086 1.79086 0 4 0H16C18.2091 0 20 1.79086 20 4V16C20 18.2091 18.2091 20 16 20H4C1.79086 20 0 18.2091 0 16V4Z",replacement:{match:/viewBox:"0 0 20 20"/,replace:"$&,onClick:()=>Vencord.Plugins.plugins.BetterRoleDot.copyToClipBoard(e.color),style:{cursor:'pointer'}"}},{find:'"username"===',all:!0,predicate:()=>S.plugins.BetterRoleDot.bothStyles,replacement:{match:/"(?:username|dot)"===\w\b/g,replace:"true"}}],options:{bothStyles:{type:3,description:"Show both role dot and coloured names",default:!1}},copyToClipBoard(e){Ee.copy(e),A.show({message:"Copied to Clipboard!",type:A.Type.SUCCESS,id:A.genId(),options:{duration:1e3,position:A.Position.BOTTOM}})}})});var Ar,ac=m(()=>{"use strict";i();x();T();Ar=u({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)\},(.{1,3})\)/,replace:(e,t,n)=>`${e.slice(0,-1)},{onClick:${t},onContextMenu:${n}.onClick})`}}]})});function cc(){dn.textContent=` +${n}`}var Ol,Sx,bx,_l,Tx,xx,wx,Px,Mx,jn,Ix,Wn=m(()=>{"use strict";a();T();Ol=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),Sx=e=>e.toLowerCase().split("_"),bx=e=>e.toLowerCase().split("-"),_l=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),Tx=e=>e.toLowerCase().split(" "),xx=e=>e.map((t,n)=>n?t[0].toUpperCase()+t.slice(1):t).join(""),wx=e=>e.join("_").toUpperCase(),Px=e=>e.join("-").toLowerCase(),Mx=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(""),jn=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(" "),Ix=["years","months","weeks","days","hours","minutes","seconds"]});var Bl={};ge(Bl,{ChangeList:()=>Er,Devs:()=>p,DevsById:()=>dl,ImageModal:()=>Nl,LazyComponent:()=>re,Logger:()=>Y,Margins:()=>G,ModalCloseButton:()=>xt,ModalContent:()=>Ue,ModalFooter:()=>Tt,ModalHeader:()=>$e,ModalRoot:()=>Le,ModalSize:()=>co,Modals:()=>dn,Queue:()=>fn,REACT_GLOBAL:()=>nx,SUPPORT_CHANNEL_ID:()=>Xi,Theme:()=>ys,VENCORD_USER_AGENT:()=>pl,WEBPACK_CHUNK:()=>qt,canonicalizeDescriptor:()=>Dl,canonicalizeMatch:()=>Uo,canonicalizeReplace:()=>Ts,canonicalizeReplacement:()=>jr,checkIntersecting:()=>Sl,classes:()=>J,closeAllModals:()=>kl,closeModal:()=>Gn,copyWithToast:()=>Yt,debounce:()=>At,formatDuration:()=>qr,getCurrentChannel:()=>sr,getCurrentGuild:()=>Rl,getTheme:()=>zr,getUniqueUsername:()=>zn,gitHash:()=>rn,gitRemote:()=>Zi,humanFriendlyJoin:()=>Cx,identity:()=>is,insertTextIntoChatInputBox:()=>Hn,isMobile:()=>cx,isNonNullish:()=>Al,isObject:()=>lx,isPluginDev:()=>_r,isTruthy:()=>vs,localStorage:()=>$o,makeCodeblock:()=>Kr,makeLazy:()=>$n,mergeDefaults:()=>Do,onceDefined:()=>vx,onlyOnce:()=>Ll,openImageModal:()=>Fo,openModal:()=>Ce,openModalLazy:()=>Hr,openPrivateChannel:()=>gx,openUserProfile:()=>mn,parseUrl:()=>vl,proxyLazy:()=>dt,sendMessage:()=>hx,sleep:()=>so,useAwaiter:()=>ot,useForceUpdater:()=>Lt,useIntersection:()=>bl,wordsFromCamel:()=>Ol,wordsFromKebab:()=>bx,wordsFromPascal:()=>_l,wordsFromSnake:()=>Sx,wordsFromTitle:()=>Tx,wordsToCamel:()=>xx,wordsToKebab:()=>Px,wordsToPascal:()=>Mx,wordsToSnake:()=>wx,wordsToTitle:()=>jn});var Fl=m(()=>{"use strict";a();ul();w();nr();tt();Ss();sn();bs();be();Xe();fe();Ze();sg();El();Wr();ar();ve();Wn();});var ug=m(()=>{});function qn(e){return o("div",{...e,className:J(e.className,"vc-error-card")},e.children)}var Yr=m(()=>{"use strict";a();ug();fe()});var Rx,pg,dg,$l,A,ie=m(()=>{"use strict";a();be();Xe();ve();T();Yr();Rx="#e78284",pg=new Y("React ErrorBoundary",Rx),dg={},$l=re(()=>class extends I.PureComponent{state={error:dg,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}),pg.error(`A component threw an Error +`,t),pg.error("Component Stack",n.componentStack)}render(){if(this.state.error===dg)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(qn,{style:{overflow:"hidden"}},o("h1",null,"Oh no!"),o("p",null,t),o("code",null,this.state.message,!!this.state.stack&&o("pre",{className:G.top8},this.state.stack)))}});$l.wrap=(e,t)=>n=>o($l,{...t,wrappedProps:n},o(e,{...n}));A=$l});function xs(){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 Ul=m(()=>{"use strict";a()});function Zr(e){return o(N,{...e,look:N.Looks.LINK,color:N.Colors.TRANSPARENT,onClick:()=>VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")},o(xs,null),"Donate")}var Gl=m(()=>{"use strict";a();T();Ul()});function le(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 wt=m(()=>{"use strict";a()});function g(e){return e}var b=m(()=>{"use strict";a()});async function mg(e=!1){Hl={};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 Y("BadgeAPI").error("Invalid badges.csv file!");return}for(let i of r){let[s,l,c]=i.split(",");(Hl[s]??=[]).push({image:c,description:l})}}var Ax,Lx,Hl,zl,fg=m(()=>{"use strict";a();Ps();Gl();ie();wt();Ul();w();be();Xe();fe();Ze();b();T();Ax="https://cdn.discordapp.com/attachments/1033680203433660458/1092089947126780035/favicon.png",Lx={description:"Vencord Contributor",image:Ax,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},shouldShow:({user:e})=>_r(e.id),link:"https://github.com/Vendicated/Vencord"},Hl={};zl=g({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)/g,replace:"...$1.props,$& $1.image??"},{match:/children:function(?<=(\i)\.(?:tooltip|description),spacing:\d.+?)/g,replace:"children:$1.component ? () => $self.renderBadgeComponent($1) : function"},{match:/onClick:function(?=.{0,200}href:(\i)\.link)/,replace:"onClick:$1.onClick??function"}]}],toolboxActions:{async"Refetch Badges"(){await mg(!0),X.show({id:X.genId(),message:"Successfully refetched badges!",type:X.Type.SUCCESS})}},async start(){Vencord.Api.Badges.addBadge(Lx),await mg()},renderBadgeComponent:A.wrap(e=>{let t=e.component;return o(t,{...e})},{noop:!0}),getDonorBadges(e){return Hl[e]?.map(t=>({...t,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},onClick(){let n=Ce(r=>o(A,{noop:!0,onError:()=>{Gn(n),VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")}},o(dn.ModalRoot,{...r},o(dn.ModalHeader,null,o(le,{style:{width:"100%",justifyContent:"center"}},o(v.FormTitle,{tag:"h2",style:{width:"100%",textAlign:"center",margin:0}},o(xs,null),"Vencord Donor"))),o(dn.ModalContent,null,o(le,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(v.FormText,null,"This Badge is a special perk for Vencord Donors"),o(v.FormText,{className:G.top20},"Please consider supporting the development of Vencord by becoming a donor. It would mean a lot!!"))),o(dn.ModalFooter,null,o(le,{style:{width:"100%",justifyContent:"center"}},o(Zr,null))))))}}))}})});var jl,gg=m(()=>{"use strict";a();w();b();jl=g({name:"CommandsAPI",authors:[p.Arjix],description:"Api required by anything that uses commands",patches:[{find:'"giphy","tenor"',replacement:[{match:/(?<=\w=)(\w)(\.filter\(.{0,30}giphy)/,replace:"Vencord.Api.Commands._init($1)$2"}]},{find:"Unexpected value for option",replacement:{match:/,(.{1,2})\.execute\((.{1,2}),(.{1,2})\)]/,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 Wl,hg=m(()=>{"use strict";a();w();b();Wl=g({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:/(?<=function \i\((\i)\){)(?=var \i,\i=\i\.navId)/,replace:(e,t)=>`Vencord.Api.ContextMenu._patchContextMenu(${t});`}},{find:".Menu,{",all:!0,replacement:{match:/Menu,{(?<=\.jsxs?\)\(\i\.Menu,{)/g,replace:"$&contextMenuApiArguments:typeof arguments!=='undefined'?arguments:[],"}}]})});var ql,yg=m(()=>{"use strict";a();w();b();ql=g({name:"MemberListDecoratorsAPI",description:"API to add decorators to member list (both in servers and DMs)",authors:[p.TheSun],patches:[{find:"lostPermissionTooltipText,",replacement:{match:/Fragment,{children:\[(.{30,80})\]/,replace:"Fragment,{children:Vencord.Api.MemberListDecorators.__addDecoratorsToList(this.props).concat($1)"}},{find:"PrivateChannel.renderAvatar",replacement:{match:/(subText:(.{1,2})\.renderSubtitle\(\).{1,50}decorators):(.{30,100}:null)/,replace:"$1:Vencord.Api.MemberListDecorators.__addDecoratorsToList($2.props).concat($3)"}}]})});var Kl,vg=m(()=>{"use strict";a();w();b();Kl=g({name:"MessageAccessoriesAPI",description:"API to add message accessories.",authors:[p.Cyn],patches:[{find:".Messages.REMOVE_ATTACHMENT_BODY",replacement:{match:/(.container\)?,children:)(\[[^\]]+\])(}\)\};return)/,replace:(e,t,n,r)=>`${t}Vencord.Api.MessageAccessories._modifyAccessories(${n},this.props)${r}`}}]})});var Yl,Sg=m(()=>{"use strict";a();w();b();Yl=g({name:"MessageDecorationsAPI",description:"API to add decorations to messages",authors:[p.TheSun],patches:[{find:".withMentionPrefix",replacement:{match:/(.roleDot.{10,50}{children:.{1,2})}\)/,replace:"$1.concat(Vencord.Api.MessageDecorations.__addDecorationsToMessage(arguments[0]))})"}}]})});var Zl,bg=m(()=>{"use strict";a();w();b();Zl=g({name:"MessageEventsAPI",description:"Api required by anything using message events.",authors:[p.Arjix,p.hunt,p.Ven],patches:[{find:'"MessageActionCreators"',replacement:{match:/\beditMessage:(function\(.+?\))\{/,replace:"editMessage:async $1{await Vencord.Api.MessageEvents._handlePreEdit(...arguments);"}},{find:".handleSendMessage=",replacement:{match:/(props\.chatInputType.+?\.then\(\()(function.+?var (\i)=\i\.\i\.parse\((\i),.+?var (\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:/var \i=(\i)\.id,\i=(\i)\.id;return \i\.useCallback\(\(?function\((\i)\){/,replace:(e,t,n,r)=>`var _msg=${t},_chan=${n};${e}Vencord.Api.MessageEvents._handleClick(_msg, _chan, ${r});`}}]})});var Xl,Tg=m(()=>{"use strict";a();w();b();Xl=g({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 Jl,xg=m(()=>{"use strict";a();w();b();Jl=g({name:"NoticesAPI",description:"Fixes notices being automatically dismissed",authors:[p.Ven],required:!0,patches:[{find:'displayName="NoticeStore"',replacement:[{match:/(?=;\i=null;.{0,70}getPremiumSubscription)/g,replace:";if(Vencord.Api.Notices.currentNotice)return false"},{match:/(?<=,NOTICE_DISMISS:function\(\i\){)(?=if\(null==(\i)\))/,replace:(e,t)=>`if(${t}.id=="VencordNotice")return(${t}=null,Vencord.Api.Notices.nextNotice(),true);`}]}]})});var Ql,wg=m(()=>{"use strict";a();w();b();Ql=g({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)(.*?homeIcon.*?)(\}function)/,replace:"$1[$2].concat(Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.Above))$3"}},{find:"Messages.SERVERS,children",replacement:{match:/(Messages\.SERVERS,children:)(.+?default:return null\}\}\)\))/,replace:"$1Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.In).concat($2)"}}]})});var Vl,Pg=m(()=>{"use strict";a();w();b();Vl=g({name:"SettingsStoreAPI",description:"Patches Discord's SettingsStores to expose their group and name",authors:[p.Nuckyz],patches:[{find:'"textAndImages","renderSpoilers"',replacement:[{match:/(?<=INFREQUENT_USER_ACTION.{0,20}),useSetting:function/,replace:",settingsStoreApiGroup:arguments[0],settingsStoreApiName:arguments[1]$&"}]}]})});var ec,Mg=m(()=>{"use strict";a();w();b();ec=g({name:"NoTrack",description:"Disable Discord's tracking ('science'), metrics and Sentry crash reporting",authors:[p.Cyn,p.Ven,p.Nuckyz],required:!0,patches:[{find:"TRACKING_URL:",replacement:{match:/^.+$/,replace:"()=>{}"}},{find:"window.DiscordSentry=",replacement:{match:/^.+$/,replace:"()=>{}"}},{find:".METRICS,",replacement:[{match:/this\._intervalId.+?12e4\)/,replace:""},{match:/(?<=increment=function\(\i\){)/,replace:"return;"}]}]})});var nc={};ge(nc,{_patchContextMenu:()=>Ox,addContextMenuPatch:()=>pe,addGlobalContextMenuPatch:()=>Ex,findGroupChildrenByChildId:()=>nt,globalPatches:()=>Ms,navPatches:()=>Xr,removeContextMenuPatch:()=>de,removeGlobalContextMenuPatch:()=>Dx});function pe(e,t){Array.isArray(e)||(e=[e]);for(let n of e){let r=Xr.get(n);r||(r=new Set,Xr.set(n,r)),r.add(t)}}function Ex(e){Ms.add(e)}function de(e,t){let r=(Array.isArray(e)?e:[e]).map(i=>Xr.get(i)?.delete(t)??!1);return Array.isArray(e)?r:r[0]}function Dx(e){return Ms.delete(e)}function nt(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=nt(e,i,i);if(s!==null)return s}}return null}function Ox(e){e.contextMenuApiArguments??=[];let t=Xr.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);tc.has(e)||r?.()}catch(r){Ig.error(`Patch for ${e.navId} errored,`,r)}for(let n of Ms)try{let r=n(e.navId,e.children,...e.contextMenuApiArguments);tc.has(e)||r?.()}catch(r){Ig.error("Global patch errored,",r)}tc.add(e)}var Ig,Xr,Ms,tc,Pt=m(()=>{"use strict";a();be();Ig=new Y("ContextMenu"),Xr=new Map,Ms=new Set;tc=new WeakSet});var Cg=m(()=>{});var Is,oc=m(()=>{"use strict";a();Cg();D();ie();fe();T();Is=A.wrap(function({title:t,body:n,richBody:r,color:i,icon:s,onClick:l,onClose:c,image:u,permanent:h,className:f,dismissOnClick:y}){let{timeout:S,position:x}=st(["notifications.timeout","notifications.position"]).notifications,R=Fe([Ur],()=>Ur.isFocused()),[C,_]=V(!1),[$,B]=V(0),q=zt(()=>Date.now(),[S,C,R]);rt(()=>{if(C||!R||S===0||h)return void B(0);let j=setInterval(()=>{let z=Date.now()-q;z>=S?c():B(z)},10);return()=>clearInterval(j)},[S,C,R]);let ee=$/S;return o("button",{className:J("vc-notification-root",f),style:x==="bottom-right"?{bottom:"1rem"}:{top:"3rem"},onClick:()=>{l?.(),y!==!1&&c()},onContextMenu:j=>{j.preventDefault(),j.stopPropagation(),c()},onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!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:j=>{j.preventDefault(),j.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:""}),S!==0&&!h&&o("div",{className:"vc-notification-progressbar",style:{width:`${(1-ee)*100}%`,backgroundColor:i||"var(--brand-experiment)"}}))},{onError:({props:e})=>e.onClose()})});var sc={};ge(sc,{classNameFactory:()=>Ee,classNameToSelector:()=>kg,compileStyle:()=>ic,disableStyle:()=>Mt,enableStyle:()=>Je,isStyleEnabled:()=>rc,requireStyle:()=>Jr,setStyleClassNames:()=>Bx,styleMap:()=>Ng,toggleStyle:()=>_x});function Jr(e){let t=Ng.get(e);if(!t)throw new Error(`Style "${e}" does not exist`);return t}function Je(e){let t=Jr(e);return t.dom?.isConnected?!1:(t.dom||(t.dom=document.createElement("style"),t.dom.dataset.vencordName=t.name),ic(t),document.head.appendChild(t.dom),!0)}function Mt(e){let t=Jr(e);return t.dom?.isConnected?(t.dom.remove(),t.dom=null,!0):!1}var Ng,_x,rc,Bx,ic,kg,Ee,Ge=m(()=>{"use strict";a();Ng=window.VencordStyles??=new Map;_x=e=>rc(e)?Mt(e):Je(e),rc=e=>Jr(e).dom?.isConnected??!1,Bx=(e,t,n=!0)=>{let r=Jr(e);r.classNames=t,n&&rc(r.name)&&ic(r)},ic=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?kg(r):t})},kg=(e,t="")=>e.split(" ").map(n=>`.${t}${n}`).join(""),Ee=(e="")=>(...t)=>{let n=new Set;for(let r of t)typeof r=="string"?n.add(r):Array.isArray(r)?r.forEach(i=>n.add(i)):typeof r=="object"&&Object.entries(r).forEach(([i,s])=>s&&n.add(i));return Array.from(n,r=>e+r).join(" ")}});var Rg,Ag=m(()=>{a();Rg=(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 Eg(e){if(e.noPersist)return;let t=M.notifications.logLimit;t!==0&&(await Eo(Cs,n=>{let r=n??[],{onClick:i,onClose:s,richBody:l,permanent:c,noPersist:u,dismissOnClick:h,...f}=e;return r.unshift({...f,timestamp:Date.now(),id:Rg()}),r.length>t&&t!==200&&(r.length=t),r}),Qr.forEach(n=>n()))}async function Fx(e){let t=await Lg(),n=t.findIndex(r=>r.timestamp===e);n!==-1&&(t.splice(n,1),await Ve(Cs,t),Qr.forEach(r=>r()))}function $x(){let[e,t]=rr(s=>s+1,0);rt(()=>(Qr.add(t),()=>void Qr.delete(t)),[]);let[n,r,i]=ot(Lg,{fallbackValue:[],deps:[e]});return[n,i]}function Ux({data:e}){let[t,n]=V(!1),r=I.useRef(null);return rt(()=>{let i=r.current,s=()=>{if(i.clientHeight===0)return requestAnimationFrame(s);i.style.height=`${i.clientHeight}px`};s()},[]),o("div",{className:lr("wrapper",{removing:t}),ref:r},o(Is,{...e,permanent:!0,dismissOnClick:!1,onClose:()=>{t||(n(!0),setTimeout(()=>Fx(e.timestamp),200))},richBody:o("div",{className:lr("body")},e.body,o(kn,{timestamp:Jt(e.timestamp),className:lr("timestamp")}))}))}function Gx({log:e,pending:t}){return!e.length&&!t?o("div",{className:lr("container")},o("div",{className:lr("empty")}),o(v.FormText,{style:{textAlign:"center"}},"No notifications yet")):o("div",{className:lr("container")},e.map(n=>o(Ux,{data:n,key:n.id})))}function Hx({modalProps:e,close:t}){let[n,r]=$x();return o(Le,{...e,size:"large"},o($e,null,o(Q,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Notification Log"),o(xt,{onClick:t})),o(Ue,null,o(Gx,{log:n,pending:r})),o(Tt,null,o(N,{disabled:n.length===0,onClick:()=>{bt.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 Ve(Cs,[]),Qr.forEach(i=>i())},confirmText:"Do it!",confirmColor:"vc-notification-log-danger-btn",cancelText:"Nevermind"})}},"Clear Notification Log")))}function Ns(){let e=Ce(t=>o(Hx,{modalProps:t,close:()=>Gn(e)}))}var Cs,Lg,lr,Qr,ks=m(()=>{"use strict";a();Cn();D();Ge();Ze();ve();T();Ag();oc();Cs="notification-log",Lg=async()=>await Qe(Cs)??[],lr=Ee("vc-notification-log-"),Qr=new Set});function Wx(){if(!ac){let e=document.createElement("div");e.id="vc-notification-container",document.body.append(e),ac=_o.createRoot(e)}return ac}function qx(e,t){let n=Wx();return new Promise(r=>{n.render(o(Is,{key:t,...e,onClose:()=>{e.onClose?.(),n.render(null),r()}}))})}function Kx(){if(typeof Notification>"u")return!1;let{useNative:e}=M.notifications;return e==="always"?!0:e==="not-focused"?!document.hasFocus():!1}async function Dg(){return Notification.permission==="granted"||Notification.permission!=="denied"&&await Notification.requestPermission()==="granted"}async function he(e){if(Eg(e),Kx()&&await Dg()){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 zx.push(()=>qx(e,jx++))}var zx,ac,jx,Og=m(()=>{"use strict";a();D();ar();T();oc();ks();zx=new fn,jx=42});var lc={};ge(lc,{requestPermission:()=>Dg,showNotification:()=>he});var uo=m(()=>{"use strict";a();Og()});function jg(e,t){return ow(e,t||{},0,0)}function Wg(e,t){return ew(e,t)}var It,Ot,Rs,As,Ls,dc,$g,Ug,Gg,mc,Hg,Yx,_g,fc,Kn,me,Ln,mo,me,me,me,me,ti,me,Zx,Xx,Jx,Qx,cc,gn,uc,yc,zg,Vx,po,ew,Yn,Vr,pc,gc,Bg,ei,hc,Fg,tw,vc,nw,ow,rw,iw,qg=m(()=>{a();It=Uint8Array,Ot=Uint16Array,Rs=Uint32Array,As=new It([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]),Ls=new It([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]),dc=new It([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),$g=function(e,t){for(var n=new Ot(31),r=0;r<31;++r)n[r]=t+=1<>>1|(me&21845)<<1,Kn=(Kn&52428)>>>2|(Kn&13107)<<2,Kn=(Kn&61680)>>>4|(Kn&3855)<<4,fc[me]=((Kn&65280)>>>8|(Kn&255)<<8)>>>1;Ln=function(e,t,n){for(var r=e.length,i=0,s=new Ot(t);i>>u]=h}else for(c=new Ot(r),i=0;i>>15-e[i]);return c},mo=new It(288);for(me=0;me<144;++me)mo[me]=8;for(me=144;me<256;++me)mo[me]=9;for(me=256;me<280;++me)mo[me]=7;for(me=280;me<288;++me)mo[me]=8;ti=new It(32);for(me=0;me<32;++me)ti[me]=5;Zx=Ln(mo,9,0),Xx=Ln(mo,9,1),Jx=Ln(ti,5,0),Qx=Ln(ti,5,1),cc=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},gn=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&n},uc=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},yc=function(e){return(e+7)/8|0},zg=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?Ot:e.BYTES_PER_ELEMENT==4?Rs:It)(n-t);return r.set(e.subarray(t,n)),r},Vx=["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"],po=function(e,t,n){var r=new Error(t||Vx[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,po),!n)throw r;return r},ew=function(e,t,n){var r=e.length;if(!r||n&&n.f&&!n.l)return t||new It(0);var i=!t||n,s=!n||n.i;n||(n={}),t||(t=new It(r*3));var l=function(Ki){var Ar=t.length;if(Ki>Ar){var tr=new It(Math.max(Ar*2,Ki));tr.set(t),t=tr}},c=n.f||0,u=n.p||0,h=n.b||0,f=n.l,y=n.d,S=n.m,x=n.n,R=r*8;do{if(!f){c=gn(e,u,1);var C=gn(e,u+1,3);if(u+=3,C)if(C==1)f=Xx,y=Qx,S=9,x=5;else if(C==2){var q=gn(e,u,31)+257,ee=gn(e,u+10,15)+4,j=q+gn(e,u+5,31)+1;u+=14;for(var z=new It(j),te=new It(19),U=0;U>>4;if(_<16)z[U++]=_;else{var ut=0,We=0;for(_==16?(We=3+gn(e,u,3),u+=2,ut=z[U-1]):_==17?(We=3+gn(e,u,7),u+=3):_==18&&(We=11+gn(e,u,127),u+=7);We--;)z[U++]=ut}}var yt=z.subarray(0,q),He=z.subarray(q);S=cc(yt),x=cc(He),f=Ln(yt,S,1),y=Ln(He,x,1)}else po(1);else{var _=yc(u)+4,$=e[_-4]|e[_-3]<<8,B=_+$;if(B>r){s&&po(0);break}i&&l(h+$),t.set(e.subarray(_,B),h),n.b=h+=$,n.p=u=B*8,n.f=c;continue}if(u>R){s&&po(0);break}}i&&l(h+131072);for(var qe=(1<>>4;if(u+=ut&15,u>R){s&&po(0);break}if(ut||po(2),Pn<256)t[h++]=Pn;else if(Pn==256){Wt=u,f=null;break}else{var Ut=Pn-254;if(Pn>264){var U=Pn-257,nn=As[U];Ut=gn(e,u,(1<>>4;Mn||po(3),u+=Mn&15;var He=Yx[Rt];if(Rt>3){var nn=Ls[Rt];He+=uc(e,u)&(1<R){s&&po(0);break}i&&l(h+131072);for(var pt=h+Ut;h>>8},Vr=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},pc=function(e,t){for(var n=[],r=0;rS&&(S=s[r].s);var x=new Ot(S+1),R=gc(n[f-1],x,0);if(R>t){var r=0,C=0,_=R-t,$=1<<_;for(s.sort(function(z,te){return x[te.s]-x[z.s]||z.f-te.f});rt)C+=$-(1<>>=_;C>0;){var q=s[r].s;x[q]=0&&C;--r){var ee=s[r].s;x[ee]==t&&(--x[ee],++C)}R=t}return[new It(x),R]},gc=function(e,t,n){return e.s==-1?Math.max(gc(e.l,t,n+1),gc(e.r,t,n+1)):t[e.s]=n},Bg=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Ot(++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]},ei=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[dc[De-1]];--De);var ut=h+5<<3,We=ei(i,mo)+ei(s,ti)+l,yt=ei(i,S)+ei(s,C)+l+14+3*De+ei(te,ne)+(2*te[16]+3*te[17]+7*te[18]);if(ut<=We&&ut<=yt)return hc(t,f,e.subarray(u,u+h));var He,qe,$t,Wt;if(Yn(t,f,1+(yt15&&(Yn(t,f,Mn[U]>>>5&127),f+=Mn[U]>>>12)}}else He=Zx,qe=mo,$t=Jx,Wt=ti;for(var U=0;U255){var Rt=r[U]>>>18&31;Vr(t,f,He[Rt+257]),f+=qe[Rt+257],Rt>7&&(Yn(t,f,r[U]>>>23&31),f+=As[Rt]);var pt=r[U]&31;Vr(t,f,$t[pt]),f+=Wt[pt],pt>3&&(Vr(t,f,r[U]>>>5&8191),f+=Ls[pt])}else Vr(t,f,He[r[U]]),f+=qe[r[U]];return Vr(t,f,He[256]),f+qe[256]},tw=new Rs([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),vc=new It(0),nw=function(e,t,n,r,i,s){var l=e.length,c=new It(r+l+5*(1+Math.ceil(l/7e3))+i),u=c.subarray(r,c.length-i),h=0;if(!t||l<8)for(var f=0;f<=l;f+=65535){var y=f+65535;y>=l&&(u[h>>3]=s),h=hc(u,h+1,e.subarray(f,y))}else{for(var S=tw[t-1],x=S>>>13,R=S&8191,C=(1<7e3||ne>24576)&&He>423){h=Fg(e,u,0,j,z,te,Ne,ne,De,f-De,h),ne=U=Ne=0,De=f;for(var qe=0;qe<286;++qe)z[qe]=0;for(var qe=0;qe<30;++qe)te[qe]=0}var $t=2,Wt=0,Pn=R,Ut=We-yt&32767;if(He>2&&ut==ee(f-Ut))for(var nn=Math.min(x,He)-1,Mn=Math.min(32767,f),Rt=Math.min(258,He);Ut<=Mn&&--Pn&&We!=yt;){if(e[f+$t]==e[f+$t-Ut]){for(var pt=0;pt$t){if($t=pt,Wt=Ut,pt>nn)break;for(var Ki=Math.min(Ut,pt-2),Ar=0,qe=0;qeAr&&(Ar=Lf,yt=tr)}}}We=yt,yt=_[We],Ut+=We-yt+32768&32767}if(Wt){j[ne++]=268435456|mc[$t]<<18|_g[Wt];var Ef=mc[$t]&31,Df=_g[Wt]&31;Ne+=As[Ef]+Ls[Df],++z[257+Ef],++te[Df],Be=f+$t,++U}else j[ne++]=e[f],++z[e[f]]}}h=Fg(e,u,s,j,z,te,Ne,ne,De,f-De,h),!s&&h&7&&(h=hc(u,h+1,vc))}return zg(c,0,r+yc(h)+i)},ow=function(e,t,n,r,i){return nw(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)};rw=typeof TextDecoder<"u"&&new TextDecoder,iw=0;try{rw.decode(vc,{stream:!0}),iw=1}catch{}});async function Kg(){let e=await Qe("Vencord_cloudSecret")??{},t=Sc();return e[t]?(await Eo("Vencord_cloudSecret",n=>(n??={},n[`${t}:${ni()}`]=n[t],delete n[t],n)),e[t]):e[`${t}:${ni()}`]}async function sw(e){await Eo("Vencord_cloudSecret",t=>(t??={},t[`${Sc()}:${ni()}`]=e,t))}async function bc(){await Eo("Vencord_cloudSecret",e=>(e??={},delete e[`${Sc()}:${ni()}`],e))}async function Yg(){if(await Kg()!==void 0){M.cloud.authenticated=!0;return}try{let r=await fetch(new URL("/v1/oauth/settings",fo()));var{clientId:e,redirectUri:t}=await r.json()}catch{he({title:"Cloud Integration",body:"Setup failed (couldn't retrieve OAuth configuration)."}),M.cloud.authenticated=!1;return}let{OAuth2AuthorizeModal:n}=Nn("OAuth2AuthorizeModal");Ce(r=>o(n,{...r,scopes:["identify"],responseType:"code",redirectUri:t,permissions:0n,clientId:e,cancelCompletesFlow:!1,callback:async({location:i})=>{if(!i){M.cloud.authenticated=!1;return}try{let s=await fetch(i,{headers:new Headers({Accept:"application/json"})}),{secret:l}=await s.json();l?(Es.info("Authorized with secret"),await sw(l),he({title:"Cloud Integration",body:"Cloud integrations enabled!"}),M.cloud.authenticated=!0):(he({title:"Cloud Integration",body:"Setup failed (no secret returned?)."}),M.cloud.authenticated=!1)}catch(s){Es.error("Failed to authorize",s),he({title:"Cloud Integration",body:`Setup failed (${s.toString()}).`}),M.cloud.authenticated=!1}}}))}async function cr(){let e=await Kg();return window.btoa(`${e}:${ni()}`)}var Es,fo,Sc,ni,Tc=m(()=>{"use strict";a();Cn();uo();D();O();T();be();Ze();Es=new Y("Cloud","#39b7e0"),fo=()=>new URL(M.cloud.url),Sc=()=>fo().origin,ni=()=>{let e=F.getCurrentUser()?.id;if(!e)throw new Error("User not yet logged in");return e}});function Ds(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)})}var xc=m(()=>{"use strict";a()});async function Zg(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(En,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 Xg({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 Jg(){let e="vencord-settings-backup.json",t=await Xg(),n=new TextEncoder().encode(t);Ds(new File([n],e,{type:"application/json"}))}async function Vg(e=!0){if(!1){if(t)try{}catch(n){}}else{let t=document.createElement("input");t.type="file",t.style.display="none",t.accept="application/json",t.onchange=async()=>{let n=t.files?.[0];if(!n)return;let r=new FileReader;r.onload=async()=>{try{await Zg(r.result),e&&aw()}catch(i){new Y("SettingsSync").error(i),e&&lw(i)}},r.readAsText(n)},document.body.appendChild(t),t.click(),setImmediate(()=>document.body.removeChild(t))}}async function ur(e){let t=await Xg({minify:!0});try{let n=await fetch(new URL("/v1/settings",fo()),{method:"PUT",headers:new Headers({Authorization:await cr(),"Content-Type":"application/octet-stream"}),body:jg(new TextEncoder().encode(t))});if(!n.ok){hn.error(`Failed to sync up, API returned ${n.status}`),he({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();En.cloud.settingsSyncVersion=r,VencordNative.settings.set(JSON.stringify(En,null,4)),hn.info("Settings uploaded to cloud successfully"),e&&he({title:"Cloud Settings",body:"Synchronized settings to the cloud!",noPersist:!0})}catch(n){hn.error("Failed to sync up",n),he({title:"Cloud Settings",body:`Could not synchronize settings to the cloud (${n.toString()}).`,color:"var(--red-360)"})}}async function Os(e=!0,t=!1){try{let n=await fetch(new URL("/v1/settings",fo()),{method:"GET",headers:new Headers({Authorization:await cr(),Accept:"application/octet-stream","If-None-Match":M.cloud.settingsSyncVersion.toString()})});if(n.status===404)return hn.info("No settings on the cloud"),e&&he({title:"Cloud Settings",body:"There are no settings in the cloud.",noPersist:!0}),!1;if(n.status===304)return hn.info("Settings up to date"),e&&he({title:"Cloud Settings",body:"Your settings are up to date.",noPersist:!0}),!1;if(!n.ok)return hn.error(`Failed to sync down, API returned ${n.status}`),he({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=M.cloud.settingsSyncVersion;if(!t&&rwindow.DiscordNative.app.relaunch(),noPersist:!0}),!0}catch(n){return hn.error("Failed to sync down",n),he({title:"Cloud Settings",body:`Could not synchronize settings from the cloud (${n.toString()}).`,color:"var(--red-360)"}),!1}}async function eh(){try{let e=await fetch(new URL("/v1/settings",fo()),{method:"DELETE",headers:new Headers({Authorization:await cr()})});if(!e.ok){hn.error(`Failed to delete, API returned ${e.status}`),he({title:"Cloud Settings",body:`Could not delete settings (API returned ${e.status}).`,color:"var(--red-360)"});return}hn.info("Settings deleted from cloud successfully"),he({title:"Cloud Settings",body:"Settings deleted from cloud!",color:"var(--green-360)"})}catch(e){hn.error("Failed to delete",e),he({title:"Cloud Settings",body:`Could not delete settings (${e.toString()}).`,color:"var(--red-360)"})}}var Qg,aw,lw,hn,oi=m(()=>{"use strict";a();uo();D();T();qg();Tc();be();xc();Qg=(e,t)=>X.show({type:e,message:t,id:X.genId()}),aw=()=>Qg(X.Type.SUCCESS,"Settings successfully imported. Restart to apply changes!"),lw=e=>Qg(X.Type.FAILURE,`Failed to import settings: ${String(e)}`);hn=new Y("Cloud:Settings","#39b7e0")});var Pc={};ge(Pc,{PlainSettings:()=>En,Settings:()=>M,addSettingsListener:()=>Bs,definePluginSettings:()=>k,migratePluginSettings:()=>uw,useSettings:()=>st});function wc(e,t=e,n=""){return nh[n]??=new Proxy(e,{get(r,i){let s=r[i];if(!(i in r)){if(n==="plugins"&&i in Te)return r[i]=wc({enabled:Te[i].required??Te[i].enabledByDefault??!1},t,`plugins.${i}`);if(n.startsWith("plugins.")){let l=n.slice(8);if(l in Te){let c=Te[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(h=>h.default);return u&&(r[i]=u.value),u?.value}}}return s}return typeof s=="object"&&!Array.isArray(s)&&s!==null?wc(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 nh[l];for(let c of _s)(!c._path||c._path===l)&&c(s,l);return En.cloud.settingsSyncVersion=Date.now(),$o.Vencord_settingsDirty=!0,cw(),VencordNative.settings.set(JSON.stringify(t,null,4)),!0}})}function st(e){let[,t]=I.useReducer(()=>({}),{}),n=e?(r,i)=>e.includes(i)&&t():t;return I.useEffect(()=>(_s.add(n),()=>void _s.delete(n)),[]),M}function Bs(e,t){t._path=e,_s.add(t)}function uw(e,...t){let{plugins:n}=go;if(!(e in n)){for(let r of t)if(r in n){oh.info(`Migrating settings from old name ${r} to ${e}`),n[e]=n[r],delete n[r],VencordNative.settings.set(JSON.stringify(go,null,4));break}}}function k(e,t){let n={get store(){if(!n.pluginName)throw new Error("Cannot access settings before plugin is initialized");return M.plugins[n.pluginName]},use:r=>st(r?.map(i=>`plugins.${n.pluginName}.${i}`)).plugins[n.pluginName],def:e,checks:t??{},pluginName:"",withPrivateSettings(){return this}};return n}var oh,th,go,cw,_s,nh,En,M,D=m(()=>{"use strict";a();nr();bs();be();fe();oi();b();T();pr();oh=new Y("Settings"),th={notifyAboutUpdates:!0,autoUpdate:!1,autoUpdateNotification:!0,useQuickCss:!0,themeLinks:[],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{go=JSON.parse(VencordNative.settings.get()),Do(go,th)}catch(e){go=Do({},th),oh.error(`An error occurred while loading the settings. Corrupt settings file? +`,e)}cw=At(async()=>{M.cloud.settingsSync&&M.cloud.authenticated&&(await ur(),delete $o.Vencord_settingsDirty)},6e4),_s=new Set,nh={};En=go,M=wc(go)});function Fs(){window.VencordDesktopNative.app.relaunch()}var ri=m(()=>{"use strict";a()});var rh=m(()=>{});var Ic={};ge(Ic,{UpdateLogger:()=>ih,changes:()=>$s,checkForUpdates:()=>ah,getRepo:()=>pw,isNewer:()=>Mc,isOutdated:()=>ho,maybePromptToUpdate:()=>ii,update:()=>lh,updateError:()=>sh});async function Us(e){let t=await e;if(t.ok)return t.value;throw sh=t.error,t.error}async function ah(){return $s=await Us(VencordNative.updater.getUpdates()),$s.some(e=>e.hash===rn)?(Mc=!0,ho=!1):ho=$s.length>0}async function lh(){if(!ho)return!0;let e=await Us(VencordNative.updater.update());if(e&&(ho=!1,!await Us(VencordNative.updater.rebuild())))throw new Error("The Build failed. Please try manually building the new update");return e}async function ii(e,t=!1){return;try{if(await ah()){let r=confirm(e);if(r&&Mc)return alert("Your local copy has more recent commits. Please stash or reset them.");r&&(await lh(),Fs())}}catch(n){ih.error(n),alert("That also failed :( Try updating or re-installing with the installer!")}}var ih,ho,Mc,sh,$s,pw,dr=m(()=>{"use strict";a();Dr();be();ri();ih=new Y("Updater","white"),ho=!1,Mc=!1;pw=()=>Us(VencordNative.updater.getRepo())});function ch(){ii("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 uh=m(()=>{"use strict";a();dr()});function Dn({title:e,children:t}){return o(v.FormSection,null,o(Q,{variant:"heading-lg/semibold",tag:"h2",className:G.bottom16},e),t)}function On(e,t){return A.wrap(e,{message:`Failed to render the ${t} tab. If this issue persists, try using the installer to reinstall!`,onError:dw})}var dw,Go=m(()=>{"use strict";a();rh();ie();uh();Xe();El();T();dw=Ll(ch)});var mh={};ge(mh,{default:()=>yw});function fw(){let[e,,t]=ot(VencordNative.settings.getSettingsDir,{fallbackValue:"Loading..."}),n=st(),r=I.useMemo(()=>Math.random()>.5?dh:mw,[]),i=navigator.platform.toLowerCase().startsWith("win"),s=navigator.platform.toLowerCase().startsWith("mac"),l=[{key:"useQuickCss",title:"Enable Custom CSS",note:"Loads your Custom CSS"},!1,!1,!1,!1,!1,!1];return o(Dn,{title:"Vencord Settings"},o(hw,{image:r}),o(v.FormSection,{title:"Quick Actions"},o(Et,{className:ph("quick-actions-card")},o(I.Fragment,null,!1,o(N,{onClick:()=>VencordNative.quickCss.openEditor(),size:N.Sizes.SMALL,disabled:e==="Loading..."},"Open QuickCSS File"),!1,o(N,{onClick:()=>VencordNative.native.openExternal("https://github.com/Vendicated/Vencord"),size:N.Sizes.SMALL,disabled:t},"Open in GitHub")))),o(v.FormDivider,null),o(v.FormSection,{className:G.top16,title:"Settings",tag:"h5"},o(v.FormText,{className:G.bottom20},'Hint: You can change the position of this settings section in the settings of the "Settings" plugin!'),l.map(c=>c&&o(ft,{key:c.key,value:n[c.key],onChange:u=>n[c.key]=u,note:c.note},c.title))),typeof Notification<"u"&&o(gw,{settings:n.notifications}))}function gw({settings:e}){return o(d,null,o(v.FormTitle,{tag:"h5"},"Notification Style"),e.useNative!=="never"&&Notification?.permission==="denied"&&o(qn,{style:{padding:"1em"},className:G.bottom8},o(v.FormTitle,{tag:"h5"},"Desktop Notification Permission denied"),o(v.FormText,null,"You have denied Notification Permissions. Thus, Desktop notifications will not work!")),o(v.FormText,{className:G.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(ln,{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:is}),o(v.FormTitle,{tag:"h5",className:G.top16+" "+G.bottom8},"Notification Position"),o(ln,{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:is}),o(v.FormTitle,{tag:"h5",className:G.top16+" "+G.bottom8},"Notification Timeout"),o(v.FormText,{className:G.bottom16},"Set to 0s to never automatically time out"),o(Oo,{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(v.FormTitle,{tag:"h5",className:G.top16+" "+G.bottom8},"Notification Log Limit"),o(v.FormText,{className:G.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(Oo,{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(N,{onClick:Ns,disabled:e.logLimit===0},"Open Notification Log"))}function hw({image:e}){return o(Et,{className:ph("card","donate")},o("div",null,o(v.FormTitle,{tag:"h5"},"Support the Project"),o(v.FormText,null,"Please consider supporting the development of Vencord by donating!"),o(Zr,{style:{transform:"translateX(-1em)"}})),o("img",{role:"presentation",src:e,alt:"",height:128,style:{marginLeft:"auto",transform:e===dh?"rotate(10deg)":""}}))}var ph,dh,mw,yw,fh=m(()=>{"use strict";a();ks();D();Ge();Gl();Yr();Xe();fe();ri();ve();T();Go();ph=Ee("vc-settings-"),dh="https://cdn.discordapp.com/emojis/1026533090627174460.png",mw="https://media.discordapp.net/stickers/1039992459209490513.png";yw=On(fw,"Vencord Settings")});var gh=m(()=>{});var Rc={};ge(Rc,{currentNotice:()=>si,nextNotice:()=>hh,noticesQueue:()=>Nc,popNotice:()=>kc,showNotice:()=>ai});function kc(){Cc.dismiss()}function hh(){si=Nc.shift(),si&&Cc.show(...si,"VencordNotice")}function ai(e,t,n){Nc.push(["GENERIC",e,t,n]),si||hh()}var Cc,Nc,si,Gs=m(()=>{"use strict";a();O();Ye(e=>e.show&&e.dismiss&&!e.suppressAll,e=>Cc=e);Nc=[],si=null});function yh({text:e,color:t}){return o("div",{className:"vc-plugins-badge",style:{backgroundColor:t,justifySelf:"flex-end",marginLeft:"auto"}},e)}var vh=m(()=>{"use strict";a()});function Sh({option:e,pluginSettings:t,definedSettings:n,id:r,onChange:i,onError:s}){let l=t[r]??e.default,[c,u]=I.useState(l??!1),[h,f]=I.useState(null);I.useEffect(()=>{s(h!==null)},[h]);function y(S){let x=e.isValid?.call(n,S)??!0;typeof x=="string"?f(x):x?(f(null),u(S),i(S)):f("Invalid input provided.")}return o(v.FormSection,null,o(ft,{value:c,onChange:y,note:e.description,disabled:e.disabled?.call(n)??!1,...e.componentProps,hideBorder:!0,style:{marginBottom:"0.5em"}},jn(Ol(r))),h&&o(v.FormText,{style:{color:"var(--text-danger)"}},h))}var bh=m(()=>{"use strict";a();Wn();T()});function Th({option:e,onChange:t,onError:n}){return e.component({setValue:t,setError:n,option:e})}var xh=m(()=>{"use strict";a()});function Ac({option:e,pluginSettings:t,definedSettings:n,id:r,onChange:i,onError:s}){function l(S){return e.type===2?BigInt(S):Number(S)}let[c,u]=I.useState(`${t[r]??e.default??0}`),[h,f]=I.useState(null);I.useEffect(()=>{s(h!==null)},[h]);function y(S){let x=e.isValid?.call(n,S)??!0;f(null),typeof x=="string"?f(x):x||f("Invalid input provided."),e.type===1&&BigInt(S)>=vw?(u(`${Number.MAX_SAFE_INTEGER}`),i(l(S))):(u(S),i(l(S)))}return o(v.FormSection,null,o(v.FormTitle,null,e.description),o(Re,{type:"number",pattern:"-?[0-9]+",value:c,onChange:y,placeholder:e.placeholder??"Enter a number",disabled:e.disabled?.call(n)??!1,...e.componentProps}),h&&o(v.FormText,{style:{color:"var(--text-danger)"}},h))}var vw,wh=m(()=>{"use strict";a();b();T();vw=BigInt(Number.MAX_SAFE_INTEGER)});function Ph({option:e,pluginSettings:t,definedSettings:n,onChange:r,onError:i,id:s}){let l=t[s]??e.options?.find(S=>S.default)?.value,[c,u]=I.useState(l??null),[h,f]=I.useState(null);I.useEffect(()=>{i(h!==null)},[h]);function y(S){let x=e.isValid?.call(n,S)??!0;typeof x=="string"?f(x):x?(f(null),u(S),r(S)):f("Invalid input provided.")}return o(v.FormSection,null,o(v.FormTitle,null,e.description),o(ln,{isDisabled:e.disabled?.call(n)??!1,options:e.options,placeholder:e.placeholder??"Select an option",maxVisibleItems:5,closeOnSelect:!0,select:y,isSelected:S=>S===c,serialize:S=>String(S),...e.componentProps}),h&&o(v.FormText,{style:{color:"var(--text-danger)"}},h))}var Mh=m(()=>{"use strict";a();T()});function mr(e,t,n=1){let r=[];for(let i=e;i<=t;i+=n)r.push(Math.round(i*100)/100);return r}function Ih({option:e,pluginSettings:t,definedSettings:n,id:r,onChange:i,onError:s}){let l=t[r]??e.default,[c,u]=I.useState(null);I.useEffect(()=>{s(c!==null)},[c]);function h(f){let y=e.isValid?.call(n,f)??!0;typeof y=="string"?u(y):y?(u(null),i(f)):u("Invalid input provided.")}return o(v.FormSection,null,o(v.FormTitle,null,e.description),o(Oo,{disabled:e.disabled?.call(n)??!1,markers:e.markers,minValue:e.markers[0],maxValue:e.markers[e.markers.length-1],initialValue:l,onValueChange:h,onValueRender:f=>String(f.toFixed(2)),stickToMarkers:e.stickToMarkers??!0,...e.componentProps}))}var Lc=m(()=>{"use strict";a();T()});function Ch({option:e,pluginSettings:t,definedSettings:n,id:r,onChange:i,onError:s}){let[l,c]=I.useState(t[r]??e.default??null),[u,h]=I.useState(null);I.useEffect(()=>{s(u!==null)},[u]);function f(y){let S=e.isValid?.call(n,y)??!0;typeof S=="string"?h(S):S?(h(null),c(y),i(y)):h("Invalid input provided.")}return o(v.FormSection,null,o(v.FormTitle,null,e.description),o(Re,{type:"text",value:l,onChange:f,placeholder:e.placeholder??"Enter a value",disabled:e.disabled?.call(n)??!1,...e.componentProps}),u&&o(v.FormText,{style:{color:"var(--text-danger)"}},u))}var Nh=m(()=>{"use strict";a();T()});var Hs=m(()=>{"use strict";a();vh();bh();xh();wh();Mh();Lc();Nh()});function Ec(){return`-${ir.fromTimestamp(Date.now())}`}function oe(e,t){let n=Sw({channelId:e,content:"",embeds:[]});return bw.receiveMessage(e,Do(t,n)),t}function Oe(e,t,n){return e.find(r=>r.name===t)?.value||n}var Sw,bw,Dc=m(()=>{"use strict";a();fe();O();T();Sw=ce('username:"Clyde"'),bw=P("receiveMessage")});var yo,yn,Oc,zs=m(()=>{"use strict";a();yo=(y=>(y[y.SUB_COMMAND=1]="SUB_COMMAND",y[y.SUB_COMMAND_GROUP=2]="SUB_COMMAND_GROUP",y[y.STRING=3]="STRING",y[y.INTEGER=4]="INTEGER",y[y.BOOLEAN=5]="BOOLEAN",y[y.USER=6]="USER",y[y.CHANNEL=7]="CHANNEL",y[y.ROLE=8]="ROLE",y[y.MENTIONABLE=9]="MENTIONABLE",y[y.NUMBER=10]="NUMBER",y[y.ATTACHMENT=11]="ATTACHMENT",y))(yo||{}),yn=(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))(yn||{}),Oc=(r=>(r[r.CHAT_INPUT=1]="CHAT_INPUT",r[r.USER=2]="USER",r[r.MESSAGE=3]="MESSAGE",r))(Oc||{})});var Fc={};ge(Fc,{ApplicationCommandInputType:()=>yn,ApplicationCommandOptionType:()=>yo,ApplicationCommandType:()=>Oc,BUILT_IN:()=>vo,OptionalMessageOption:()=>So,RequiredMessageOption:()=>Ho,_handleCommand:()=>xw,_init:()=>Tw,commands:()=>_c,findOption:()=>Oe,generateId:()=>Ec,prepareOption:()=>Bc,registerCommand:()=>fr,sendBotMessage:()=>oe,unregisterCommand:()=>li});function Bc(e){return e.displayName||=e.name,e.displayDescription||=e.description,e.options?.forEach((t,n,r)=>{t===kh?r[n]=So:t===Rh&&(r[n]=Ho),t.choices?.forEach(i=>i.displayName||=i.name),Bc(r[n])}),e}function ww(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};fr(r,t)})}function fr(e,t){if(!vo){console.warn("[CommandsAPI]",`Not registering ${e.name} as the CommandsAPI hasn't been initialised.`,"Please restart to use commands");return}if(vo.some(n=>n.name===e.name))throw new Error(`Command '${e.name}' already exists.`);if(e.isVencordCommand=!0,e.id??=`-${vo.length+1}`,e.applicationId??="-1",e.type??=1,e.inputType??=1,e.plugin||=t,Bc(e),e.options?.[0]?.type===1){ww(e,t);return}_c[e.name]=e,vo.push(e)}function li(e){let t=vo.findIndex(n=>n.name===e);return t===-1?!1:(vo.splice(t,1),delete _c[e],!0)}var vo,_c,kh,Rh,So,Ho,Tw,xw,_t=m(()=>{"use strict";a();Wn();Dc();zs();Dc();zs();_c={},kh=Symbol("OptionalMessageOption"),Rh=Symbol("RequiredMessageOption"),So=kh,Ho=Rh,Tw=function(e){try{vo=e,So=e.find(t=>t.name==="shrug").options[0],Ho=e.find(t=>t.name==="me").options[0]}catch{console.error("Failed to load CommandsApi")}return e},xw=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),oe(n.channel.id,{content:`${s}: +${Kr(l)}`,author:{username:"Vencord"}})};try{let i=e.execute(t,n);return i instanceof Promise?i.catch(r):i}catch(i){return r(i)}}});var $c,Ah=m(()=>{a();(window.VencordStyles??=new Map).set("src/components/PluginSettings/userPopoutHideBotTag.css",{name:"src/components/PluginSettings/userPopoutHideBotTag.css",source:`[class|="userPopoutOuter"] [class*="botTag"] { + display: none; +} +`,classNames:{},dom:null});$c="src/components/PluginSettings/userPopoutHideBotTag.css"});function Uc(e){let t=new Iw({username:e.username,id:e.id??Ec(),avatar:e.avatar,bot:!0});return E.dispatch({type:"USER_UPDATE",user:t}),t}function Gc({plugin:e,onRestartNeeded:t,onClose:n,transitionState:r}){let[i,s]=I.useState([]),l=st().plugins[e.name],[c,u]=I.useState({}),[h,f]=I.useState({}),[y,S]=I.useState(null),x=()=>Object.values(h).every(B=>!B),R=Boolean(l&&e.options);I.useEffect(()=>{Je($c);let B;return(async()=>{for(let q of e.authors.slice(0,6)){let ee=q.id?await Rn.fetchUser(`${q.id}`).then(j=>(B=j,Uc(j))).catch(()=>Uc({username:q.name})):Uc({username:q.name});s(j=>[...j,ee])}})(),()=>{Mt($c),B&&E.dispatch({type:"USER_UPDATE",user:B})}},[]);async function C(){if(!e.options){n();return}if(e.beforeSave){let q=await Promise.resolve(e.beforeSave(c));if(q!==!0){S(q);return}}let B=!1;for(let[q,ee]of Object.entries(c)){let j=e.options[q];l[q]=ee,j?.onChange?.(ee),j?.restartNeeded&&(B=!0)}B&&t(),n()}function _(){if(!R||!e.options)return o(v.FormText,null,"There are no settings for this plugin.");{let B=Object.entries(e.options).map(([q,ee])=>{if(ee.hidden)return null;function j(U){u(Ne=>({...Ne,[q]:U}))}function z(U){f(Ne=>({...Ne,[q]:U}))}let te=Cw[ee.type];return o(te,{id:q,key:q,option:ee,onChange:j,onError:z,pluginSettings:l,definedSettings:e.settings})});return o(le,{flexDirection:"column",style:{gap:12,marginBottom:16}},B)}}function $(B,q){let ee=e.authors.length-q,j=e.authors.length-ee,z=j+e.authors.length-q;return o(W,{text:e.authors.slice(j,z).map(te=>te.name).join(", ")},({onMouseEnter:te,onMouseLeave:U})=>o("div",{className:Mw.moreUsers,onMouseEnter:te,onMouseLeave:U},"+",ee))}return o(Le,{transitionState:r,size:"medium",className:"vc-text-selectable"},o($e,{separator:!1},o(Q,{variant:"heading-lg/semibold",style:{flexGrow:1}},e.name),o(xt,{onClick:n})),o(Ue,null,o(v.FormSection,null,o(v.FormTitle,{tag:"h3"},"About ",e.name),o(v.FormText,null,e.description),o(v.FormTitle,{tag:"h3",style:{marginTop:8,marginBottom:0}},"Authors"),o("div",{style:{width:"fit-content",marginBottom:8}},o(Pw,{users:i,count:e.authors.length,guildId:void 0,renderIcon:!1,max:6,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:$}))),!!e.settingsAboutComponent&&o("div",{className:J(G.bottom8,"vc-text-selectable")},o(v.FormSection,null,o(A,{message:"An error occurred while rendering this plugin's custom InfoComponent"},o(e.settingsAboutComponent,{tempSettings:c})))),o(v.FormSection,null,o(v.FormTitle,{tag:"h3"},"Settings"),_())),R&&o(Tt,null,o(le,{flexDirection:"column",style:{width:"100%"}},o(le,{style:{marginLeft:"auto"}},o(N,{onClick:n,size:N.Sizes.SMALL,color:N.Colors.WHITE,look:N.Looks.LINK},"Cancel"),o(W,{text:"You must fix all errors before saving",shouldShow:!x()},({onMouseEnter:B,onMouseLeave:q})=>o(N,{size:N.Sizes.SMALL,color:N.Colors.BRAND,onClick:C,onMouseEnter:B,onMouseLeave:q,disabled:!x()},"Save & Close"))),y&&o(Q,{variant:"text-md/semibold",style:{color:"var(--text-danger)"}},"Error while saving: ",y))))}var Pw,Mw,Iw,Cw,Lh=m(()=>{"use strict";a();_t();D();Ge();ie();wt();sn();Xe();fe();Ze();ve();b();O();T();Hs();Ah();Pw=re(()=>ze("defaultRenderUser","showDefaultAvatarsForNullUsers")),Mw=P("moreUsers","emptyUser","avatarContainer","clickableAvatar"),Iw=dt(()=>F.getCurrentUser().constructor);Cw={[0]:Ch,[1]:Ac,[2]:Ac,[3]:Sh,[4]:Ph,[5]:Ih,[6]:Th}});var Eh=m(()=>{});function Dh({checked:e,onChange:t,disabled:n}){return o("div",null,o("div",{className:J(js.container,"default-colors",e?js.checked:void 0),style:{backgroundColor:e?Hc:zc,opacity:n?.3:1}},o("svg",{className:js.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(d,null,o("path",{fill:Hc,d:"M7.89561 14.8538L6.30462 13.2629L14.3099 5.25755L15.9009 6.84854L7.89561 14.8538Z"}),o("path",{fill:Hc,d:"M4.08643 11.0903L5.67742 9.49929L9.4485 13.2704L7.85751 14.8614L4.08643 11.0903Z"})):o(d,null,o("path",{fill:zc,d:"M5.13231 6.72963L6.7233 5.13864L14.855 13.2704L13.264 14.8614L5.13231 6.72963Z"}),o("path",{fill:zc,d:"M13.2704 5.13864L14.8614 6.72963L6.72963 14.8614L5.13864 13.2704L13.2704 5.13864Z"})))),o("input",{disabled:n,type:"checkbox",className:js.input,tabIndex:0,checked:e,onChange:r=>t(r.currentTarget.checked)})))}var Hc,zc,js,Oh=m(()=>{"use strict";a();Eh();fe();O();Hc="var(--green-360)",zc="var(--primary-400)",js=P("slider","input","container")});var Yc={};ge(Yc,{PMLogger:()=>Nw,isPluginEnabled:()=>Wc,patches:()=>_h,plugins:()=>kw,startAllPlugins:()=>qc,startDependenciesRecursive:()=>Ws,startPlugin:()=>ci,stopPlugin:()=>Kc});function Wc(e){return(Te[e]?.required||Te[e]?.isDependency||jc[e]?.enabled)??!1}function Ws(e){let t=!1,n=[];return e.dependencies?.forEach(r=>{if(!M.plugins[r].enabled){if(Ws(Te[r]),M.plugins[r].enabled=!0,Te[r].patches){jt.warn(`Enabling dependency ${r} requires restart.`),t=!0;return}ci(Te[r])||n.push(r)}}),{restartNeeded:t,failures:n}}var jt,Nw,kw,_h,jc,Bh,qc,ci,Kc,qs=m(()=>{"use strict";a();_t();D();be();T();pr();es();jt=new Y("PluginManager","#a6d189"),Nw=jt,kw=Te,_h=[],jc=M.plugins;Bh=Object.values(Te);for(let e of Bh)jc[e.name]?.enabled&&e.dependencies?.forEach(t=>{let n=Te[t];if(n)jc[t].enabled=!0,n.isDependency=!0;else{let r=new Error(`Plugin ${e.name} has unresolved dependency ${t}`);jt.warn(r)}});for(let e of Bh){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&&Wc(e.name))for(let t of e.patches)t.plugin=e.name,Array.isArray(t.replacement)||(t.replacement=[t.replacement]),_h.push(t)}qc=an("startAllPlugins",function(){for(let t in Te)Wc(t)&&ci(Te[t])});ci=an("startPlugin",function(t){let{name:n,commands:r,flux:i}=t;if(t.start){if(jt.info("Starting plugin",n),t.started)return jt.warn(`${n} already started`),!1;try{t.start(),t.started=!0}catch(s){return jt.error(`Failed to start ${n} +`,s),!1}}if(r?.length){jt.info("Registering commands of plugin",n);for(let s of r)try{fr(s,n)}catch(l){return jt.error(`Failed to register command ${s.name} +`,l),!1}}if(i)for(let s in i)E.subscribe(s,i[s]);return!0},e=>`startPlugin ${e.name}`),Kc=an("stopPlugin",function(t){let{name:n,commands:r,flux:i}=t;if(t.stop){if(jt.info("Stopping plugin",n),!t.started)return jt.warn(`${n} already stopped`),!1;try{t.stop(),t.started=!1}catch(s){return jt.error(`Failed to stop ${n} +`,s),!1}}if(r?.length){jt.info("Unregistering commands of plugin",n);for(let s of r)try{li(s.name)}catch(l){return jt.error(`Failed to unregister command ${s.name} +`,l),!1}}if(i)for(let s in i)E.unsubscribe(s,i[s]);return!0},e=>`stopPlugin ${e.name}`)});function Ew(e){X.show({message:e,type:X.Type.FAILURE,id:X.genId(),options:{position:X.Position.BOTTOM}})}function Dw({required:e}){return o(Et,{className:vn("info-card",{"restart-card":e})},e?o(d,null,o(v.FormTitle,{tag:"h5"},"Restart required!"),o(v.FormText,{className:vn("dep-text")},"Restart now to apply new plugins and their settings"),o(N,{color:N.Colors.YELLOW,onClick:()=>location.reload()},"Restart")):o(d,null,o(v.FormTitle,{tag:"h5"},"Plugin Management"),o(v.FormText,null,"Press the cog wheel or info icon to get more info on a plugin"),o(v.FormText,null,"Plugins with a cog wheel have settings you can modify!")))}function Uh({plugin:e,disabled:t,onRestartNeeded:n,onMouseEnter:r,onMouseLeave:i,isNew:s}){let l=M.plugins[e.name],c=()=>l.enabled??!1;function u(){Hr(async()=>f=>o(Gc,{...f,plugin:e,onRestartNeeded:()=>n(e.name)}))}function h(){let f=c();if(!f){let{restartNeeded:S,failures:x}=Ws(e);if(x.length){Fh.error(`Failed to start dependencies for ${e.name}: ${x.join(", ")}`),ai("Failed to start dependencies: "+x.join(", "),"Close",()=>null);return}else if(S){l.enabled=!0,n(e.name);return}}if(e.patches?.length){l.enabled=!f,n(e.name);return}if(f&&!e.started){l.enabled=!f;return}if(!(f?Kc(e):ci(e))){l.enabled=!1;let S=`Error while ${f?"stopping":"starting"} plugin ${e.name}`;Fh.error(S),Ew(S);return}l.enabled=!f}return o(le,{className:vn("card",{"card-disabled":t}),flexDirection:"column",onMouseEnter:r,onMouseLeave:i},o("div",{className:vn("card-header")},o(Q,{variant:"text-md/bold",className:vn("name")},e.name,s&&o(yh,{text:"NEW",color:"#ED4245"})),o("button",{role:"switch",onClick:()=>u(),className:J(Rw.button,vn("info-button"))},e.options?o(Aw,null):o(Lw,{width:"24",height:"24"})),o(Dh,{checked:c(),onChange:h,disabled:t})),o(Q,{className:vn("note"),variant:"text-sm/normal"},e.description))}function Zc(){let e=st(),t=I.useMemo(()=>new Er,[]);I.useEffect(()=>()=>void(t.hasChanges&&bt.show({title:"Restart required",body:o(d,null,o("p",null,"The following plugins require a restart:"),o("div",null,t.map((S,x)=>o(d,null,x>0&&", ",Ie.parse("`"+S+"`"))))),confirmText:"Restart now",cancelText:"Later!",onConfirm:()=>location.reload()})),[]);let n=I.useMemo(()=>{let S={};for(let x in Te){let R=Te[x].dependencies;if(R)for(let C of R)S[C]??=[],S[C].push(x)}return S},[]),r=I.useMemo(()=>Object.values(Te).sort((S,x)=>S.name.localeCompare(x.name)),[]),[i,s]=I.useState({value:"",status:0}),l=S=>s(x=>({...x,value:S})),c=S=>s(x=>({...x,status:S})),u=S=>{let x=e.plugins[S.name]?.enabled;if(x&&i.status===2||!x&&i.status===1)return!1;if(!i.value.length)return!0;let R=i.value.toLowerCase();return S.name.toLowerCase().includes(R)||S.description.toLowerCase().includes(R)||S.tags?.some(C=>C.toLowerCase().includes(R))},[h]=ot(()=>Qe("Vencord_existingPlugins").then(S=>{let x=Date.now()/1e3,R={},C=Object.values(r).map($=>$.name),_=[];for(let{name:$}of r)(R[$]=S?.[$]??x)+60*60*24*2>x&&_.push($);return Ve("Vencord_existingPlugins",R),window._.isEqual(_,C)?[]:_})),f,y;if(r?.length){f=[],y=[];for(let S of r){if(!S.options&&S.name.endsWith("API")&&i.value!=="API"||!u(S))continue;if(S.required||n[S.name]?.some(R=>e.plugins[R].enabled)){let R=S.required?"This plugin is required for Vencord to function.":Ow(n[S.name]?.filter(C=>e.plugins[C].enabled));y.push(o(W,{text:R,key:S.name},({onMouseLeave:C,onMouseEnter:_})=>o(Uh,{onMouseLeave:C,onMouseEnter:_,onRestartNeeded:$=>t.handleChange($),disabled:!0,plugin:S})))}else f.push(o(Uh,{onRestartNeeded:R=>t.handleChange(R),disabled:!1,plugin:S,isNew:h?.includes(S.name),key:S.name}))}}else f=y=o(Q,{variant:"text-md/normal"},"No plugins meet search criteria.");return o(Dn,{title:"Plugins"},o(Dw,{required:t.hasChanges}),o(v.FormTitle,{tag:"h5",className:J(G.top20,G.bottom8)},"Filters"),o("div",{className:vn("filter-controls")},o(Re,{autoFocus:!0,value:i.value,placeholder:"Search for a plugin...",onChange:l,className:G.bottom20}),o("div",{className:$h.inputWrapper},o(ln,{className:$h.inputDefault,options:[{label:"Show All",value:0,default:!0},{label:"Show Enabled",value:1},{label:"Show Disabled",value:2}],serialize:String,select:c,isSelected:S=>S===i.status,closeOnSelect:!0}))),o(v.FormTitle,{className:G.top20},"Plugins"),o("div",{className:vn("grid")},f),o(v.FormDivider,{className:G.top20}),o(v.FormTitle,{tag:"h5",className:J(G.top20,G.bottom8)},"Required Plugins"),o("div",{className:vn("grid")},y))}function Ow(e){return o(I.Fragment,null,o(v.FormText,null,"This plugin is required by:"),e.map(t=>o(v.FormText,{className:vn("dep-text")},t)))}var vn,Fh,$h,Rw,Aw,Lw,Gh=m(()=>{"use strict";a();gh();Cn();Gs();D();Ge();wt();Hs();Lh();Oh();Go();ul();be();Xe();fe();Ze();ve();O();T();pr();qs();vn=Ee("vc-plugins-"),Fh=new Y("PluginSettings","#a6d189"),$h=P("inputDefault","inputWrapper"),Rw=P("button","disabled","enabled"),Aw=re(()=>ze("18.564C15.797 19.099 14.932 19.498 14 19.738V22H10V19.738C9.069")),Lw=re(()=>ze("4.4408921e-16 C4.4771525,-1.77635684e-15 4.4408921e-16"))});var Hh={};ge(Hh,{default:()=>_w});var _w,zh=m(()=>{"use strict";a();Gh();Go();_w=On(Zc,"Plugins")});function at(e){return e.disabled&&(e.style??={},e.style.pointerEvents="none",e["aria-disabled"]=!0),o("a",{role:"link",target:"_blank",...e},e.children)}var bo=m(()=>{"use strict";a()});var jh={};ge(jh,{default:()=>Gw});function Fw({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(v.FormText,{style:{color:r?"var(--text-muted)":n?"var(--text-danger)":"var(--text-positive)"}},i)}function $w({themeLinks:e}){return e.length?o(d,null,o(v.FormTitle,{className:G.top20,tag:"h5"},"Validator"),o(v.FormText,null,"This section will tell you whether your themes can successfully be loaded"),o("div",null,e.map(t=>o(Et,{style:{padding:".5em",marginBottom:".5em",marginTop:".5em"},key:t},o(v.FormTitle,{tag:"h5",style:{overflowWrap:"break-word"}},t),o(Fw,{link:t}))))):null}function Uw(){let e=st(["themeLinks"]),[t,n]=I.useState(e.themeLinks.join(` +`));function r(){e.themeLinks=[...new Set(t.trim().split(/\n+/).map(i=>i.trim()).filter(Boolean))]}return o(Dn,{title:"Themes"},o(Et,{className:"vc-settings-card vc-text-selectable"},o(v.FormTitle,{tag:"h5"},"Paste links to .theme.css files here"),o(v.FormText,null,"One link per line"),o(v.FormText,null,o("strong",null,"Make sure to use the raw links or github.io links!")),o(v.FormDivider,{className:G.top8+" "+G.bottom8}),o(v.FormTitle,{tag:"h5"},"Find Themes:"),o("div",{style:{marginBottom:".5em"}},o(at,{style:{marginRight:".5em"},href:"https://betterdiscord.app/themes"},"BetterDiscord Themes"),o(at,{href:"https://github.com/search?q=discord+theme"},"GitHub")),o(v.FormText,null,'If using the BD site, click on "Source" somewhere below the Download button'),o(v.FormText,null,'In the GitHub repository of your theme, find X.theme.css, click on it, then click the "Raw" button'),o(v.FormText,null,"If the theme has configuration that requires you to edit the file:",o("ul",null,o("li",null,"\u2022 Make a ",o(at,{href:"https://github.com/signup"},"GitHub")," account"),o("li",null,"\u2022 Click the fork button on the top right"),o("li",null,"\u2022 Edit the file"),o("li",null,"\u2022 Use the link to your own repository instead")))),o(v.FormTitle,{tag:"h5"},"Themes"),o(as,{value:t,onChange:n,className:`${Bw.textarea} vc-settings-theme-links`,placeholder:"Theme Links",spellCheck:!1,onBlur:r}),o($w,{themeLinks:e.themeLinks}))}var Bw,Gw,Wh=m(()=>{"use strict";a();D();bo();Xe();ve();O();T();Go();Bw=ke(e=>typeof e.textarea=="string");Gw=On(Uw,"Themes")});function Ks({value:e,onChange:t,validate:n}){let[r,i]=I.useState(e),[s,l]=I.useState();function c(u){i(u);let h=n(u);h===!0?(l(void 0),t(u)):l(h)}return o(d,null,o(Re,{type:"text",value:r,onChange:c,error:s}))}var Xc=m(()=>{"use strict";a();T()});var qh={};ge(qh,{default:()=>qw});function Hw(e){try{return new URL(e),!0}catch{return"Invalid URL"}}async function zw(){let e=await fetch(new URL("/v1/",fo()),{method:"DELETE",headers:new Headers({Authorization:await cr()})});if(!e.ok){Es.error(`Failed to erase data, API returned ${e.status}`),he({title:"Cloud Integrations",body:`Could not erase all data (API returned ${e.status}), please contact support.`,color:"var(--red-360)"});return}M.cloud.authenticated=!1,await bc(),he({title:"Cloud Integrations",body:"Successfully erased all data.",color:"var(--green-360)"})}function jw(){let{cloud:e}=st(["cloud.authenticated","cloud.settingsSync"]),t=e.authenticated&&e.settingsSync;return o(v.FormSection,{title:"Settings Sync",className:G.top16},o(v.FormText,{variant:"text-md/normal",className:G.bottom20},"Synchronize your settings to the cloud. This allows easy synchronization across multiple devices with minimal effort."),o(ft,{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(N,{size:N.Sizes.SMALL,disabled:!t,onClick:()=>ur(!0)},"Sync to Cloud"),o(W,{text:"This will overwrite your local settings with the ones on the cloud. Use wisely!"},({onMouseLeave:n,onMouseEnter:r})=>o(N,{onMouseLeave:n,onMouseEnter:r,size:N.Sizes.SMALL,color:N.Colors.RED,disabled:!t,onClick:()=>Os(!0,!0)},"Sync from Cloud")),o(N,{size:N.Sizes.SMALL,color:N.Colors.RED,disabled:!t,onClick:()=>eh()},"Delete Cloud Settings")))}function Ww(){let e=st(["cloud.authenticated","cloud.url"]);return o(Dn,{title:"Vencord Cloud"},o(v.FormSection,{title:"Cloud Settings",className:G.top16},o(v.FormText,{variant:"text-md/normal",className:G.bottom20},"Vencord comes with a cloud integration that adds goodies like settings sync across devices. It ",o(at,{href:"https://vencord.dev/cloud/privacy"},"respects your privacy"),", and the ",o(at,{href:"https://github.com/Vencord/Backend"},"source code")," is AGPL 3.0 licensed so you can host it yourself."),o(ft,{key:"backend",value:e.cloud.authenticated,onChange:t=>{t&&Yg(),t||(e.cloud.authenticated=t)},note:"This will request authorization if you have not yet set up cloud integrations."},"Enable Cloud Integrations"),o(v.FormTitle,{tag:"h5"},"Backend URL"),o(v.FormText,{className:G.bottom8},"Which backend to use when using cloud integrations."),o(Ks,{key:"backendUrl",value:e.cloud.url,onChange:t=>{e.cloud.url=t,e.cloud.authenticated=!1,bc()},validate:Hw}),o(N,{className:G.top8,size:N.Sizes.MEDIUM,color:N.Colors.RED,disabled:!e.cloud.authenticated,onClick:()=>bt.show({title:"Are you sure?",body:"Once your data is erased, we cannot recover it. There's no going back!",onConfirm:zw,confirmText:"Erase it!",confirmColor:"vc-cloud-erase-data-danger-btn",cancelText:"Nevermind"})},"Erase All Data"),o(v.FormDivider,{className:G.top16})),o(jw,null))}var qw,Kh=m(()=>{"use strict";a();uo();D();Xc();bo();Tc();Xe();oi();T();Go();qw=On(Ww,"Cloud")});var Yh={};ge(Yh,{default:()=>Yw});function Kw(){return o(Dn,{title:"Backup & Restore"},o(Et,{className:J("vc-settings-card","vc-backup-restore-card")},o(le,{flexDirection:"column"},o("strong",null,"Warning"),o("span",null,"Importing a settings file will overwrite your current settings."))),o(Q,{variant:"text-md/normal",className:G.bottom8},"You can import and export your Vencord settings as a JSON file. This allows you to easily transfer your settings to another device, or recover your settings after reinstalling Vencord or Discord."),o(Q,{variant:"text-md/normal",className:G.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(le,null,o(N,{onClick:()=>Vg(),size:N.Sizes.SMALL},"Import Settings"),o(N,{onClick:Jg,size:N.Sizes.SMALL},"Export Settings")))}var Yw,Zh=m(()=>{"use strict";a();wt();Xe();fe();oi();T();Go();Yw=On(Kw,"Backup & Restore")});var ui,Jc=m(()=>{"use strict";a();Pt();D();w();be();b();T();Dr();ui=g({name:"Settings",description:"Adds Settings UI and debug info",authors:[p.Ven,p.Megu],required:!0,start(){pe("user-settings-cog",e=>()=>{e.find(n=>Array.isArray(n)&&n.some(r=>r?.props?.id==="VencordSettings"))?.forEach(n=>{n?.props?.id?.startsWith("Vencord")&&(n.props.action=()=>gs.open(n.props.id))})})},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(M.plugins.Settings.settingsLocation){case"top":return/\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.USER_SETTINGS\}/;case"aboveNitro":return/\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.BILLING_SETTINGS\}/;case"belowNitro":return/\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.APP_SETTINGS\}/;case"aboveActivity":return/\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.ACTIVITY_SETTINGS\}/;case"belowActivity":return/(?<=\{section:(.{1,2})\.ID\.DIVIDER},)\{section:"changelog"/;case"bottom":return/\{section:(.{1,2})\.ID\.CUSTOM,\s*element:.+?}/;default:return new Y("Settings").error(new Error("No switch case matched????? Don't mess with the settings, silly")),/(?!a)a/}},replace:"...$self.makeSettingsCategories($1),$&"}}],customSections:[],makeSettingsCategories({ID:e}){return[{section:e.HEADER,label:"Vencord"},{section:"VencordSettings",label:"Vencord",element:(fh(),Lo(mh)).default},{section:"VencordPlugins",label:"Plugins",element:(zh(),Lo(Hh)).default},{section:"VencordThemes",label:"Themes",element:(Wh(),Lo(jh)).default},!1,{section:"VencordCloud",label:"Cloud",element:(Kh(),Lo(qh)).default},{section:"VencordSettingsSync",label:"Backup & Restore",element:(Zh(),Lo(Yh)).default},!1,!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" (Web)"},makeInfoElements(e,t){let{electronVersion:n,chromiumVersion:r,additionalInfo:i}=this;return o(d,null,o(e,{...t},"Vencord ",rn,i),n&&o(e,{...t},"Electron ",n),r&&o(e,{...t},"Chromium ",r))}})});var Qc,Xh=m(()=>{"use strict";a();w();b();Qc=g({name:"AlwaysAnimate",description:"Animates anything that can be animated, besides status emojis.",authors:[p.FieryFlames],patches:[{find:".canAnimate",all:!0,replacement:{match:/\.canAnimate\b/g,replace:".canAnimate || true"}}]})});var Vc,Jh=m(()=>{"use strict";a();w();b();Vc=g({name:"AlwaysTrust",description:"Removes the annoying untrusted domain and suspicious file popup",authors:[p.zt],patches:[{find:'.displayName="MaskedLinkStore"',replacement:{match:/\.isTrustedDomain=function\(.\){return.+?};/,replace:".isTrustedDomain=function(){return true};"}},{find:'"7z","ade","adp"',replacement:{match:/JSON\.parse\('\[.+?'\)/,replace:"[]"}}]})});var eu,Qh=m(()=>{"use strict";a();D();w();b();eu=g({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:()=>M.plugins.AnonymiseFileNames.method!==0},consistent:{description:"Consistent filename",type:0,default:"image",disabled:()=>M.plugins.AnonymiseFileNames.method!==1}},anonymise(e){let t="image",n=e.lastIndexOf("."),r=n!==-1?e.slice(n):"";switch(M.plugins.AnonymiseFileNames.method){case 0:let i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";t=Array.from({length:M.plugins.AnonymiseFileNames.randomisedLength},()=>i[Math.floor(Math.random()*i.length)]).join("");break;case 1:t=M.plugins.AnonymiseFileNames.consistent;break;case 2:t=`${Math.floor(Date.now()/1e3)}${Math.floor(window.performance.now())}`;break}return t+r}})});async function Vh(e,t){return(await Zw.getAsset(e,[t,void 0]))[0]}async function Jw(e){let t={};return await Xw(t,e),t.application}var Zw,Xw,ey,gr,tu,ty=m(()=>{"use strict";a();Gs();bo();w();b();O();T();Zw=Ke("getAssetImage: size must === [number, number] for Twitch",{getAsset:K.byCode("apply(")}),Xw=ce(".APPLICATION_RPC(");ey={};tu=g({name:"WebRichPresence (arRPC)",description:"Client plugin for arRPC to enable RPC on Discord Web (experimental)",authors:[p.Ducko],settingsAboutComponent:()=>o(d,null,o(v.FormTitle,{tag:"h3"},"How to use arRPC"),o(v.FormText,null,o(at,{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 start(){if("armcord"in window)return;if(gr&&gr.close(),gr=new WebSocket("ws://127.0.0.1:1337"),gr.onmessage=async t=>{let n=JSON.parse(t.data);if(n.activity?.assets?.large_image&&(n.activity.assets.large_image=await Vh(n.activity.application_id,n.activity.assets.large_image)),n.activity?.assets?.small_image&&(n.activity.assets.small_image=await Vh(n.activity.application_id,n.activity.assets.small_image)),n.activity){let r=n.activity.application_id;ey[r]||=await Jw(r);let i=ey[r];n.activity.name||=i.name}E.dispatch({type:"LOCAL_ACTIVITY_UPDATE",...n})},!await new Promise(t=>setTimeout(()=>t(gr.readyState===WebSocket.OPEN),1e3))){ai("Failed to connect to arRPC, is it running?","Retry",()=>{kc(),this.start()});return}X.show({message:"Connected to arRPC",type:X.Type.SUCCESS,id:X.genId(),options:{duration:1e3,position:X.Position.BOTTOM}})},stop(){E.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:null}),gr?.close()}})});var nu,ny=m(()=>{"use strict";a();w();b();nu=g({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:\w\(\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 oy=m(()=>{});function Vw(e){let t=Vencord.Plugins.plugins.BetterFolders.Guilds(e),n=t.props.children?.props?.children?.props?.children?.[1]?.props;if(n?.children){let r=n.children.find(i=>i?.props?.["aria-label"]===it.Messages.SERVERS);r&&(n.children=r)}return t}var Qw,ry,iy,sy,ay,ly,cy=m(()=>{"use strict";a();D();Ge();ie();O();T();Qw=Ee("vc-bf-"),ry=P("sidebar","guilds"),iy=P("a","animated","useTransition"),sy=ae("ChannelRTCStore"),ay=ae("ExpandedGuildFolderStore");ly=A.wrap(()=>{let e=Fe([ay],()=>ay.getExpandedFolders()),t=Fe([sy],()=>sy.isFullscreenInContext()),n=document.querySelector(`.${ry.guilds}`),r=!!e.size,i=Qw("folder-sidebar",{fullscreen:t}),s=o(Vw,{className:ry.guilds,bfGuildFolders:Array.from(e)});return!n||!M.plugins.BetterFolders.sidebarAnim?r?o("div",{className:i},s):null:o(iy.Transition,{items:r,from:{width:0},enter:{width:n.getBoundingClientRect().width},leave:{width:0},config:{duration:200}},(l,c)=>c&&o(iy.animated.div,{style:l,className:i},s))},{noop:!0})});var e2,t2,ou,ru,Zn,iu,uy=m(()=>{"use strict";a();oy();D();w();b();O();T();cy();e2=ke(e=>e.prototype?.convertToFolder),t2=ae("SortedGuildStore"),ou=ae("ExpandedGuildFolderStore"),ru=P("move","toggleGuildFolderExpand"),Zn=k({sidebar:{type:3,description:"Display servers from folder on dedicated sidebar",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",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}}),iu=g({name:"BetterFolders",description:"Shows server folders on dedicated sidebar and adds folder related improvements",authors:[p.juby,p.AutumnVN],patches:[{find:'("guildsnav")',predicate:()=>Zn.store.sidebar,replacement:[{match:/(\i)\(\){return \i\(\(0,\i\.jsx\)\("div",{className:\i\(\)\.guildSeparator}\)\)}/,replace:"$&$self.Separator=$1;"},{match:/\i\(\(function\(\i,\i,\i\){var \i=\i\.key;return.+\(\i\)},\i\)}\)\)/,replace:"arguments[0].bfHideServers?null:$&"},{match:/(\i)\.themeOverride,(.{15,25}\(function\(\){var \i=)(\i\.\i\.getGuildsTree\(\))/,replace:"$1.themeOverride,bfPatch=$1.bfGuildFolders,$2bfPatch?$self.getGuildsTree(bfPatch,$3):$3"},{match:/return(\(0,\i\.jsx\))(\(\i,{)(folderNode:\i,setNodeRef:\i\.setNodeRef,draggable:!0,.+},\i\.id\));case/,replace:"var bfHideServers=typeof bfPatch==='undefined',folder=$1$2bfHideServers,$3;return !bfHideServers&&arguments[1]?[$1($self.Separator,{}),folder]:folder;case"},{match:/\("guildsnav"\);return\(0,\i\.jsx\)\(.{1,6},{navigator:\i,children:\(0,\i\.jsx\)\(/,replace:"$&$self.Guilds="}]},{find:"APPLICATION_LIBRARY,render",predicate:()=>Zn.store.sidebar,replacement:{match:/(\(0,\i\.jsx\))\(\i\..,{className:\i\(\)\.guilds,themeOverride:\i}\)/,replace:"$&,$1($self.FolderSideBar,{})"}},{find:'("guildsnav")',predicate:()=>Zn.store.closeAllHomeButton,replacement:{match:",onClick:function(){if(!__OVERLAY__){",replace:"$&$self.closeFolders();"}}],settings:Zn,start(){let e=t=>t2.getGuildFolders().find(n=>n.guildIds.includes(t));E.subscribe("CHANNEL_SELECT",this.onSwitch=t=>{if(!(!Zn.store.closeAllFolders&&!Zn.store.forceOpen)&&this.lastGuildId!==t.guildId){this.lastGuildId=t.guildId;let n=e(t.guildId);n?.folderId?Zn.store.forceOpen&&!ou.isFolderExpanded(n.folderId)&&ru.toggleGuildFolderExpand(n.folderId):Zn.store.closeAllFolders&&this.closeFolders()}}),E.subscribe("TOGGLE_GUILD_FOLDER_EXPAND",this.onToggleFolder=t=>{Zn.store.closeOthers&&!this.dispatching&&E.wait(()=>{let n=ou.getExpandedFolders();if(n.size>1){this.dispatching=!0;for(let r of n)r!==t.folderId&&ru.toggleGuildFolderExpand(r);this.dispatching=!1}})})},stop(){E.unsubscribe("CHANNEL_SELECT",this.onSwitch),E.unsubscribe("TOGGLE_GUILD_FOLDER_EXPAND",this.onToggleFolder)},FolderSideBar:ly,getGuildsTree(e,t){let n=new e2;return n.root.children=t.root.children.filter(r=>e.includes(r.id)),n.nodes=e.map(r=>t.nodes[r]),n},closeFolders(){for(let e of ou.getExpandedFolders())ru.toggleGuildFolderExpand(e)}})});var su,py=m(()=>{"use strict";a();w();b();su=g({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:'preload:"none","aria',replacement:{match:/(?<==(.{1,3})\.alt.{0,20})\?.{0,5}\.Messages\.GIF/,replace:"?($1.alt='GIF',$self.altify($1))"}}],altify(e){if(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 au,dy=m(()=>{"use strict";a();D();w();b();au=g({name:"BetterNotesBox",description:"Hide notes or disable spellcheck (Configure in settings!!)",authors:[p.Ven],patches:[{find:"hideNote:",all:!0,predicate:()=>Vencord.Settings.plugins.BetterNotesBox.hide,replacement:{match:/hideNote:.+?(?=[,}])/g,replace:"hideNote:true"}},{find:"Messages.NOTE_PLACEHOLDER",replacement:{match:/\.NOTE_PLACEHOLDER,/,replace:"$&spellCheck:!Vencord.Settings.plugins.BetterNotesBox.noSpellCheck,"}}],options:{hide:{type:3,description:"Hide notes",default:!1,restartNeeded:!0},noSpellCheck:{type:3,description:"Disable spellcheck in notes",disabled:()=>M.plugins.BetterNotesBox.hide,default:!1}}})});var lu,my=m(()=>{"use strict";a();D();w();b();T();lu=g({name:"BetterRoleDot",authors:[p.Ven],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,predicate:()=>M.plugins.BetterRoleDot.bothStyles,replacement:{match:/"(?:username|dot)"===\i(?!\.\i)/g,replace:"true"}}],options:{bothStyles:{type:3,description:"Show both role dot and coloured names",default:!1}},copyToClipBoard(e){Kt.copy(e),X.show({message:"Copied to Clipboard!",type:X.Type.SUCCESS,id:X.genId(),options:{duration:1e3,position:X.Position.BOTTOM}})}})});var cu,fy=m(()=>{"use strict";a();w();b();cu=g({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)\},(.{1,3})\)/,replace:(e,t,n)=>`${e.slice(0,-1)},{onClick:${t},onContextMenu:${n}.onClick})`}}]})});var gy=m(()=>{});function Xn({height:e=24,width:t=24,className:n,children:r,viewBox:i,...s}){return o("svg",{className:J(n,"vc-icon"),role:"img",width:t,height:e,viewBox:i,...s},r)}function Ys({height:e=24,width:t=24,className:n}){return o(Xn,{height:e,width:t,className:J(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 hy(e){return o(Xn,{...e,className:J(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 zo(e){return o(Xn,{...e,className:J(e.className,"vc-open-external-icon"),viewBox:"0 0 24 24"},o("polygon",{fill:"currentColor","fill-rule":"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 jo(e){return o(Xn,{...e,className:J(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 yy(e){return o(Xn,{...e,className:J(e.className,"vc-info-icon"),viewBox:"0 0 12 12"},o("path",{fill:"currentColor",d:"M6 1C3.243 1 1 3.244 1 6c0 2.758 2.243 5 5 5s5-2.242 5-5c0-2.756-2.243-5-5-5zm0 2.376a.625.625 0 110 1.25.625.625 0 010-1.25zM7.5 8.5h-3v-1h1V6H5V5h1a.5.5 0 01.5.5v2h1v1z"}))}function vy(e){return o(Xn,{"aria-label":it.Messages.GUILD_OWNER,...e,className:J(e.className,"vc-owner-crown-icon"),role:"img",viewBox:"0 0 16 16"},o("path",{fill:"currentColor","fill-rule":"evenodd","clip-rule":"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 Sy(e){return o(Xn,{...e,className:J(e.className,"vc-screenshare-icon"),viewBox:"0 0 24 24"},o("path",{fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd",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 Zs(e){return o(Xn,{...e,className:J(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 Xs(e){return o(Xn,{...e,className:J(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"}))}var _n=m(()=>{"use strict";a();gy();fe();T()});var by,Ty,xy=m(()=>{"use strict";a();O();by=ae("ApplicationStreamPreviewStore"),Ty=ae("ApplicationStreamingStore")});var n2,My,wy,Py,uu,Iy=m(()=>{"use strict";a();Pt();_n();w();tt();b();T();xy();n2=async({guildId:e,channelId:t,ownerId:n})=>{let r=await by.getPreviewURL(e,t,n);!r||Fo(r)},My=(e,{userId:t})=>()=>{let n=Ty.getAnyStreamForUser(t);if(!n)return;let r=o(L.MenuItem,{label:"View Stream Preview",id:"view-stream-preview",icon:Sy,action:()=>n&&n2(n),disabled:!n});e.push(o(L.MenuSeparator,null),r)},wy=(e,{stream:t})=>My(e,{userId:t.ownerId}),Py=(e,{user:t})=>My(e,{userId:t.id}),uu=g({name:"BiggerStreamPreview",description:"This plugin allows you to enlarge stream previews",authors:[p.phil],start:()=>{pe("user-context",Py),pe("stream-context",wy)},stop:()=>{de("user-context",Py),de("stream-context",wy)}})});function Cy(){pi.textContent=` .vc-nsfw-img [class^=imageWrapper] img, .vc-nsfw-img [class^=wrapperPaused] video { - filter: blur(${S.plugins.BlurNSFW.blurAmount}px); + filter: blur(${M.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 dn,_r,lc=m(()=>{"use strict";i();R();x();T();_r=u({name:"BlurNSFW",description:"Blur attachments in NSFW channels until hovered",authors:[p.Ven],patches:[{find:"().embedWrapper,embed",replacement:[{match:/(\.renderEmbed=.+?(.)=.\.props)(.+?\(\)\.embedWrapper)/g,replace:"$1,vcProps=$2$3+(vcProps.channel.nsfw?' vc-nsfw-img':'')"},{match:/(\.renderAttachments=.+?(.)=this\.props)(.+?\(\)\.embedWrapper)/g,replace:"$1,vcProps=$2$3+(vcProps.channel.nsfw?' vc-nsfw-img':'')"}]}],options:{blurAmount:{type:1,description:"Blur Amount",default:10,onChange:cc}},start(){dn=document.createElement("style"),dn.id="VcBlurNsfw",document.head.appendChild(dn),cc()},stop(){dn?.remove()}})});function qm(e){let t=S.plugins.CallTimer.format==="human",n=h=>t?h:h.toString().padStart(2,"0"),r=h=>t?h:"",s=t?" ":":",a=Math.floor(e/864e5),c=Math.floor(e%864e5/36e5),f=Math.floor(e%864e5%36e5/6e4),d=Math.floor(e%864e5%36e5%6e4/1e3),v="";return a&&(v+=`${a}d `),(c||v)&&(v+=`${n(c)}${r("h")}${s}`),(f||v||!t)&&(v+=`${n(f)}${r("m")}${s}`),v+=`${n(d)}${r("s")}`,v}var Lr,pc=m(()=>{"use strict";i();R();ne();x();T();k();Lr=u({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:)\w/,replace:"[$&, Vencord.Plugins.plugins.CallTimer.renderTimer(this.props.channel.id)]"}}],renderTimer(e){return o(D,{noop:!0},o(this.Timer,{channelId:e}))},Timer({channelId:e}){let[t,n]=b.useState(0),r=b.useMemo(()=>Date.now(),[e]);return b.useEffect(()=>{let s=setInterval(()=>n(Date.now()-r),1e3);return()=>{clearInterval(s),n(0)}},[e]),o("p",{style:{margin:0}},"Connected for ",qm(t))}})});var $r={};ee($r,{_handleClick:()=>Qm,_handlePreEdit:()=>Ym,_handlePreSend:()=>Km,addClickListener:()=>Or,addPreEditListener:()=>Pt,addPreSendListener:()=>$e,removeClickListener:()=>Br,removePreEditListener:()=>kt,removePreSendListener:()=>Ue});function Km(e,t,n){for(let r of Fr)try{let s=r(e,t,n);if(s&&s.cancel===!0)return!0}catch(s){Er.error(`MessageSendHandler: Listener encountered an unknown error -`,s)}return!1}function Ym(e,t,n){for(let r of Dr)try{r(e,t,n)}catch(s){Er.error(`MessageEditHandler: Listener encountered an unknown error -`,s)}}function $e(e){return Fr.add(e),e}function Pt(e){return Dr.add(e),e}function Ue(e){return Fr.delete(e)}function kt(e){return Dr.delete(e)}function Qm(e,t,n){e=vt.getMessage(t.id,e.id)??e;for(let r of Nr)try{r(e,t,n)}catch(s){Er.error(`MessageClickHandler: Listener encountered an unknown error -`,s)}}function Or(e){return Nr.add(e),e}function Br(e){return Nr.delete(e)}var Er,Fr,Dr,Nr,pt=m(()=>{"use strict";i();le();k();Er=new N("MessageEvents","#e5c890"),Fr=new Set,Dr=new Set;Nr=new Set});var dc,mc=m(()=>{"use strict";i();dc=["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","wt_zmc","utm_source","utm_content","utm_medium","utm_campaign","utm_term","si@open.spotify.com"]});var uc,Jm,Ur,fc=m(()=>{"use strict";i();pt();R();x();T();mc();uc=/[\\^$.*+?()[\]{}|]/g,Jm=RegExp(uc.source);X("ClearURLs","clearURLs");Ur=u({name:"ClearURLs",description:"Removes tracking garbage from URLs",authors:[p.adryd],dependencies:["MessageEventsAPI"],escapeRegExp(e){return e&&Jm.test(e)?e.replace(uc,"\\$&"):e||""},createRules(){let e=dc;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 s=new RegExp("^(www\\.)?"+this.escapeRegExp(n[1]).replace(/\\\./,"\\.").replace(/^\\\*\\\./,"(.+?\\.)?").replace(/\\\*/,".+?")+"$"),a=s.toString();this.hostRules.set(a,s),this.rulesByHost.get(a)==null&&this.rulesByHost.set(a,new Set),this.rulesByHost.get(a).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,s,a)=>{this.removeParam(n,s,a)})}),this.hostRules.forEach((n,r)=>{!n.test(t.hostname)||this.rulesByHost.get(r).forEach(s=>{t.searchParams.forEach((a,c,f)=>{this.removeParam(s,c,f)})})}),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=$e((e,t)=>this.onSend(t)),this.preEdit=Pt((e,t,n)=>this.onSend(n))},stop(){Ue(this.preSend),kt(this.preEdit)}})});var Hr,jr,gc=m(()=>{"use strict";i();x();T();Hr=e=>()=>{throw new Error(`'${e}' is Discord Desktop only.`)},jr=u({name:"ConsoleShortcuts",description:"Adds shorter Aliases for many things on the window. Run `shortcutList` for a list.",authors:[p.Ven],getShortcuts(){return{toClip:Hr("toClip"),fromClip:Hr("fromClip"),wp:Vencord.Webpack,wpc:Vencord.Webpack.wreq.c,wreq:Vencord.Webpack.wreq,wpsearch:Vencord.Webpack.search,wpex:Vencord.Webpack.extract,wpexs:e=>Vencord.Webpack.extract(Vencord.Webpack.findModuleId(e)),findByProps:Vencord.Webpack.findByProps,find:Vencord.Webpack.find,Plugins:Vencord.Plugins,React:Vencord.Webpack.Common.React,Settings:Vencord.Settings,Api:Vencord.Api,reload:()=>location.reload(),restart:Hr("restart")}},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]}})});function Gr(){return`-${hc.fromTimestamp(Date.now())}`}function U(e,t){let n=Xm({channelId:e,content:"",embeds:[]});return Zm.receiveMessage(e,xt(t,n)),t}function ce(e,t,n){return e.find(r=>r.name===t)?.value||n}var Xm,Zm,hc,Kn=m(()=>{"use strict";i();O();L();Xm=re('username:"Clyde"'),Zm=M("receiveMessage");$("fromTimestamp",e=>hc=e)});var dt,Qe,zr,mn=m(()=>{"use strict";i();dt=(g=>(g[g.SUB_COMMAND=1]="SUB_COMMAND",g[g.SUB_COMMAND_GROUP=2]="SUB_COMMAND_GROUP",g[g.STRING=3]="STRING",g[g.INTEGER=4]="INTEGER",g[g.BOOLEAN=5]="BOOLEAN",g[g.USER=6]="USER",g[g.CHANNEL=7]="CHANNEL",g[g.ROLE=8]="ROLE",g[g.MENTIONABLE=9]="MENTIONABLE",g[g.NUMBER=10]="NUMBER",g[g.ATTACHMENT=11]="ATTACHMENT",g))(dt||{}),Qe=(a=>(a[a.BUILT_IN=0]="BUILT_IN",a[a.BUILT_IN_TEXT=1]="BUILT_IN_TEXT",a[a.BUILT_IN_INTEGRATION=2]="BUILT_IN_INTEGRATION",a[a.BOT=3]="BOT",a[a.PLACEHOLDER=4]="PLACEHOLDER",a))(Qe||{}),zr=(r=>(r[r.CHAT_INPUT=1]="CHAT_INPUT",r[r.USER=2]="USER",r[r.MESSAGE=3]="MESSAGE",r))(zr||{})});var Kr={};ee(Kr,{ApplicationCommandInputType:()=>Qe,ApplicationCommandOptionType:()=>dt,ApplicationCommandType:()=>zr,BUILT_IN:()=>mt,OptionalMessageOption:()=>ut,RequiredMessageOption:()=>It,_handleCommand:()=>eu,_init:()=>Vm,commands:()=>Wr,findOption:()=>ce,generateId:()=>Gr,prepareOption:()=>qr,registerCommand:()=>Nt,sendBotMessage:()=>U,unregisterCommand:()=>un});function qr(e){return e.displayName||=e.name,e.displayDescription||=e.description,e.options?.forEach((t,n,r)=>{t===yc?r[n]=ut:t===vc&&(r[n]=It),t.choices?.forEach(s=>s.displayName||=s.name),qr(r[n])}),e}function tu(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}`,displayName:`${e.name} ${n.name}`,subCommandPath:[{name:n.name,type:n.type,displayName:n.name}],rootCommand:e};Nt(r,t)})}function Nt(e,t){if(!mt){console.warn("[CommandsAPI]",`Not registering ${e.name} as the CommandsAPI hasn't been initialised.`,"Please restart to use commands");return}if(mt.some(n=>n.name===e.name))throw new Error(`Command '${e.name}' already exists.`);if(e.isVencordCommand=!0,e.id??=`-${mt.length+1}`,e.applicationId??="-1",e.type??=1,e.inputType??=1,e.plugin||=t,qr(e),e.options?.[0]?.type===1){tu(e,t);return}Wr[e.name]=e,mt.push(e)}function un(e){let t=mt.findIndex(n=>n.name===e);return t===-1?!1:(mt.splice(t,1),delete Wr[e],!0)}var mt,Wr,yc,vc,ut,It,Vm,eu,be=m(()=>{"use strict";i();O();Kn();mn();Kn();mn();Wr={},yc=Symbol("OptionalMessageOption"),vc=Symbol("RequiredMessageOption"),ut=yc,It=vc,Vm=function(e){try{mt=e,ut=e.find(t=>t.name==="shrug").options[0],It=e.find(t=>t.name==="me").options[0]}catch{console.error("Failed to load CommandsApi")}return e},eu=function(e,t,n){if(!e.isVencordCommand)return e.execute(t,n);let r=s=>{let a=`An Error occurred while executing command "${e.name}"`,c=s instanceof Error?s.stack||s.message:String(s);console.error(a,s),U(n.channel.id,{content:`${a}: -${Gn(c)}`,author:{username:"Vencord"}})};try{let s=e.execute(t,n);return s instanceof Promise?s.catch(r):s}catch(s){return r(s)}}});var bc,Yr,Sc=m(()=>{"use strict";i();be();Kn();mn();x();T();L();bc=0,Yr=u({name:"CorruptMp4s",description:"Create corrupt mp4s with extremely high or negative duration",authors:[p.Ven],dependencies:["CommandsAPI"],commands:[{name:"corrupt",description:"Create a corrupt mp4 with extremely high or negative duration",inputType:0,options:[{name:"mp4",description:"the video to corrupt",type:11,required:!0},{name:"kind",description:"the kind of corruption",type:3,choices:[{name:"infinite",value:"infinite",label:"Very high duration"},{name:"negative",value:"negative",label:"Negative duration"}]}],execute:async(e,t)=>{let s=_e("getUploads").getUploads(t.channel.id,bc)[0]?.item?.file;if(s?.type!=="video/mp4")return void U(t.channel.id,{content:"Please upload a mp4 file"});let a=ce(e,"kind","infinite"),c=new Uint8Array(await s.arrayBuffer()),f=!1;for(let g=0;gv([h],t.channel,bc))}}]})});var Qr,xc=m(()=>{"use strict";i();be();mn();x();T();Qr=u({name:"UrbanDictionary",description:"Searches for a word on Urban Dictionary",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{list:[n]}=await(await fetch(`https://api.urbandictionary.com/v0/define?term=${e[0].value}`)).json();if(!n)return void U(t.channel.id,{content:"No results found."});let r=s=>s.replace(/\[(.+?)\]/g,(a,c)=>`[${c}](https://www.urbandictionary.com/define.php?term=${encodeURIComponent(c)})`);return void U(t.channel.id,{embeds:[{type:"rich",author:{name:`Definition of ${n.word}`,url:n.permalink},description:r(n.definition),fields:[{name:"Example",value:r(n.example)}],color:16750848,footer:{text:`\u{1F44D} ${n.thumbs_up.toString()} | \u{1F44E} ${n.thumbs_down.toString()} | Uploaded by ${n.author}`,icon_url:"https://www.urbandictionary.com/favicon.ico"},timestamp:new Date(n.written_on).toISOString()}]})}catch(n){return void U(t.channel.id,{content:`Something went wrong: \`${n}\``})}}}]})});var Jr,Tc=m(()=>{"use strict";i();T();Jr=u({name:"discord-screenaudio",authors:[{name:"maltejur",id:205966226709676032n}],required:!0,description:"UI patches for discord-screenaudio.",patches:[]})});function Xr({value:e,onChange:t,validate:n}){let[r,s]=b.useState(e),[a,c]=b.useState();function f(d){s(d);let v=n(d);v===!0?(c(void 0),t(d)):c(v)}return o(l,null,o(Le,{type:"text",value:r,onChange:f,error:a}))}var Zr=m(()=>{"use strict";i();k()});function ru(e){let t=G.getCurrentUser().id;return Object.values(qe.getGuilds()).filter(n=>{if(!(n.ownerId===t||BigInt(jo.getGuildPermissions({id:n.id})&wc)===wc))return!1;let s=n.getMaxEmojiSlots(),{emojis:a}=nu.getGuilds()[n.id],c=0;for(let f of a)f.animated===e&&c++;return cn.name.localeCompare(r.name))}async function iu(e,t,n,r){let s=await fetch(`https://cdn.discordapp.com/emojis/${t}.${r?"gif":"png"}`).then(c=>c.blob()),a=new FileReader;a.onload=()=>{ou({guildId:e,name:n,image:a.result}).then(()=>{A.show({message:`Successfully cloned ${n}!`,type:A.Type.SUCCESS,id:A.genId()})}).catch(c=>{new N("EmoteCloner").error("Failed to upload emoji",c),A.show({message:"Oopsie something went wrong :( Check console!!!",type:A.Type.FAILURE,id:A.genId()})})},a.readAsDataURL(s)}function cu({id:e,name:t,isAnimated:n}){let[r,s]=b.useState(!1),[a,c]=b.useState(t),[f,d]=b.useReducer(h=>h+1,0),v=b.useMemo(()=>ru(n),[n,f]);return o(l,null,o(y.FormTitle,{className:V.marginTop20},"Custom Name"),o(Xr,{value:a,onChange:c,validate:h=>h.length>1&&h.length<32&&au.test(h)||"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"}},v.map(h=>o(me,{text:h.name},({onMouseLeave:g,onMouseEnter:w})=>o("div",{onMouseLeave:g,onMouseEnter:w,role:"button","aria-label":"Clone to "+h.name,"aria-disabled":r,style:{borderRadius:"50%",backgroundColor:"var(--background-secondary)",display:"inline-flex",justifyContent:"center",alignItems:"center",width:"4em",height:"4em",cursor:r?"not-allowed":"pointer",filter:r?"brightness(50%)":"none"},onClick:r?void 0:async()=>{s(!0),iu(h.id,e,a,n).finally(()=>{d(),s(!1)})}},h.icon?o("img",{"aria-hidden":!0,style:{borderRadius:"50%",width:"100%",height:"100%"},src:h.getIconURL(512,!0),alt:h.name}):o(y.FormText,{style:{fontSize:su(h.acronym),width:"100%",overflow:"hidden",whiteSpace:"nowrap",textAlign:"center",cursor:r?"not-allowed":"pointer"}},h.acronym))))))}var wc,nu,ou,su,au,Vr,Pc=m(()=>{"use strict";i();R();Zr();x();le();O();Ye();T();L();k();wc=1n<<30n,nu=M("getGuilds","getGuildEmoji"),ou=re('"EMOJI_UPLOAD_START"',"GUILD_EMOJIS(");su=e=>[20,20,18,18,16,14,12][e.length]??4,au=/^\w+$/i;X("EmoteCloner","EmoteYoink");Vr=u({name:"EmoteCloner",description:"Adds a Clone context menu item to emotes to clone them your own server",authors:[p.Ven],dependencies:["MenuItemDeobfuscatorAPI"],patches:[{find:"open-native-link",replacement:{match:/id:"open-native-link".{0,200}\(\{href:(.{0,3}),.{0,200}\},"open-native-link"\)/,replace:"$&,Vencord.Plugins.plugins.EmoteCloner.makeMenu(arguments[2])"}},{find:"REMOVE_ALL_REACTIONS_CONFIRM_BODY,",predicate:Fe(()=>!S.plugins.ReverseImageSearch.enabled),noWarn:!0,replacement:{match:/(?.).onHeightUpdate.{0,200}(.)=(.)=.\.url;.+?\(null!=\3\?\3:\2[^)]+/,replace:"$&,$.target"}}],makeMenu(e){if(e?.dataset.type!=="emoji")return null;let{id:t}=e.dataset,n=e.alt.match(/:(.*)(?:~\d+)?:/)?.[1];if(!n||!t)return null;let r=new URL(e.src).pathname.endsWith(".gif");return o(ue.MenuItem,{id:"emote-cloner",key:"emote-cloner",label:"Clone",action:()=>we(s=>o(Be,{...s},o(nt,null,o("img",{role:"presentation","aria-hidden":!0,src:`https://cdn.discordapp.com/emojis/${t}.${r?"gif":"png"}`,alt:"",height:24,width:24,style:{marginRight:"0.5em"}}),o(y.FormText,null,"Clone ",n)),o(ot,null,o(cu,{id:t,name:n,isAnimated:r}))))})}})});var ei,ti,kc=m(()=>{"use strict";i();R();x();T();L();k();ei=M("key","removeBuildOverride"),ti=u({name:"Experiments",authors:[p.Megu,p.Ven,p.Nickyux,p.BanTheNons],description:"Enable Access to Experiments in Discord!",patches:[{find:"Object.defineProperties(this,{isDeveloper",replacement:{match:/(?<={isDeveloper:\{[^}]+,get:function\(\)\{return )\w/,replace:"true"}},{find:'type:"user",revision',replacement:{match:/(\w)\|\|"CONNECTION_OPEN".+?;/g,replace:"$1=!0;"}},{find:".isStaff=function(){",predicate:()=>S.plugins.Experiments.enableIsStaff===!0,replacement:[{match:/return\s*(\w+)\.hasFlag\((.+?)\.STAFF\)}/,replace:"return Vencord.Webpack.Common.UserStore.getCurrentUser().id===$1.id||$1.hasFlag($2.STAFF)}"},{match:/hasFreePremium=function\(\){return this.isStaff\(\)\s*\|\|/,replace:"hasFreePremium=function(){return "}]}],options:{enableIsStaff:{description:"Enable isStaff (requires restart)",type:3,default:!1,restartNeeded:!0}},settingsAboutComponent:()=>{let e=navigator.platform.includes("Mac"),t=e?"cmd":"ctrl",n=e?"opt":"alt";return o(b.Fragment,null,o(y.FormTitle,{tag:"h3"},"More Information"),o(y.FormText,{variant:"text-md/normal"},"You can enable client DevTools"," ",o("kbd",{className:ei.key},t)," +"," ",o("kbd",{className:ei.key},n)," +"," ",o("kbd",{className:ei.key},"O")," ","after enabling ",o("code",null,"isStaff")," below"),o(y.FormText,null,"and then toggling ",o("code",null,"Enable DevTools")," in the ",o("code",null,"Developer Options")," tab in settings."))}})});var Yn,Ic,lu,Mc,Rc,Qn=m(()=>{"use strict";i();O();Yn=Fe(()=>import("https://unpkg.com/gifenc@1.0.3/dist/gifenc.esm.js")),Ic=Fe(async()=>{let e={},t=new Proxy(window,{set:(n,r,s)=>e[r]=s});return Function("self",await fetch("https://cdnjs.cloudflare.com/ajax/libs/apng-canvas/2.1.1/apng-canvas.min.js").then(n=>n.text()))(t),e.APNG}),lu="https://unpkg.com/@vap/shiki-worker@0.0.8/dist",Mc=`${lu}/index.min.js`,Rc="https://unpkg.com/@vap/shiki@0.10.3/dist/onig.wasm"});var pu,du,ni,Cc=m(()=>{"use strict";i();pt();R();x();Qn();T();L();k();pu=0,du=re("UPLOAD_FILE_LIMIT_ERROR");X("FakeNitro","NitroBypass");ni=u({name:"FakeNitro",authors:[p.Arjix,p.D3SOX,p.Ven,p.obscurity],description:"Allows you to stream in nitro quality and send fake emojis/stickers.",dependencies:["MessageEventsAPI"],patches:[{find:"canUseAnimatedEmojis:function",predicate:()=>S.plugins.FakeNitro.enableEmojiBypass===!0,replacement:["canUseAnimatedEmojis","canUseEmojisEverywhere"].map(e=>({match:new RegExp(`${e}:function\\(.+?}`),replace:`${e}:function(e){return true;}`}))},{find:"canUseAnimatedEmojis:function",predicate:()=>S.plugins.FakeNitro.enableStickerBypass===!0,replacement:{match:/canUseStickersEverywhere:function\(.+?}/,replace:"canUseStickersEverywhere:function(e){return true;}"}},{find:'"SENDABLE"',predicate:()=>S.plugins.FakeNitro.enableStickerBypass===!0,replacement:{match:/(\w+)\.available\?/,replace:"true?"}},{find:"canUseAnimatedEmojis:function",predicate:()=>S.plugins.FakeNitro.enableStreamQualityBypass===!0,replacement:["canUseHighVideoUploadQuality","canStreamHighQuality","canStreamMidQuality"].map(e=>({match:new RegExp(`${e}:function\\(.+?}`),replace:`${e}:function(e){return true;}`}))},{find:"STREAM_FPS_OPTION.format",predicate:()=>S.plugins.FakeNitro.enableStreamQualityBypass===!0,replacement:{match:/(userPremiumType|guildPremiumTier):.{0,10}TIER_\d,?/g,replace:""}}],options:{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]},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]},enableStreamQualityBypass:{description:"Allow streaming in nitro quality",type:3,default:!0,restartNeeded:!0}},get guildId(){return window.location.href.split("channels/")[1].split("/")[0]},get canUseEmotes(){return(G.getCurrentUser().premiumType??0)>0},get canUseStickers(){return(G.getCurrentUser().premiumType??0)>1},getStickerLink(e){return`https://media.discordapp.net/stickers/${e}.png?size=${S.plugins.FakeNitro.stickerSize}`},async sendAnimatedSticker(e,t,n){let[{parseURL:r},{GIFEncoder:s,quantize:a,applyPalette:c}]=await Promise.all([Ic(),Yn()]),{frames:f,width:d,height:v}=await r(e),h=new s,g=S.plugins.FakeNitro.stickerSize,w=document.createElement("canvas");w.width=g,w.height=g;let P=w.getContext("2d",{willReadFrequently:!0}),B=g/Math.max(d,v);P.scale(B,B);let _=null;for(let{left:C,top:q,width:se,height:de,disposeOp:Ie,img:ge,delay:Ge}of f){P.drawImage(ge,C,q,se,de);let{data:yt}=P.getImageData(0,0,g,g),Co=a(yt,256),Ia=c(yt,Co);h.writeFrame(Ia,g,g,{transparent:!0,palette:Co,delay:Ge}),Ie===1?P.clearRect(C,q,se,de):Ie===2&&_&&P.drawImage(_,C,q,se,de),_=ge}h.finish();let oe=new File([h.bytesView()],`${t}.gif`,{type:"image/gif"});du([oe],ae.getChannel(n),pu)},start(){let e=S.plugins.FakeNitro;if(!e.enableEmojiBypass&&!e.enableStickerBypass)return;let t=M("getCustomEmojiById"),n=M("getAllGuildStickers");function r(s,a){return!s[a]||/\s/.test(s[a])?"":" "}this.preSend=$e((s,a,c)=>{let{guildId:f}=this;e:{if(!e.enableStickerBypass)break e;let d=n.getStickerById(c?.stickerIds?.[0]);if(!d||d.available!==!1&&(this.canUseStickers||d?.guild_id===f))break e;let v=this.getStickerLink(d.id);if(d.format_type===2)return this.sendAnimatedSticker(this.getStickerLink(d.id),d.id,s),{cancel:!0};"pack_id"in d&&(v=`https://distok.top/stickers/${d.pack_id==="847199849233514549"?"749043879713701898":d.pack_id}/${d.id}.gif`),delete c.stickerIds,a.content+=" "+v}if(!this.canUseEmotes&&e.enableEmojiBypass)for(let d of a.validNonShortcutEmojis){if(!d.require_colons||d.guildId===f&&!d.animated)continue;let v=`<${d.animated?"a":""}:${d.originalName||d.name}:${d.id}>`,h=d.url.replace(/\?size=\d+/,`?size=${S.plugins.FakeNitro.emojiSize}`);a.content=a.content.replace(v,(g,w,P)=>`${r(P,w-1)}${h}${r(P,w+g.length)}`)}return{cancel:!1}}),!this.canUseEmotes&&e.enableEmojiBypass&&(this.preEdit=Pt((s,a,c)=>{let{guildId:f}=this;for(let[d,v,h]of c.content.matchAll(/(?/ig)){let g=t.getCustomEmojiById(h);if(g==null||g.guildId===f&&!g.animated||!g.require_colons)continue;let w=g.url.replace(/\?size=\d+/,`?size=${S.plugins.FakeNitro.emojiSize}`);c.content=c.content.replace(d,(P,B,_)=>`${r(_,B-1)}${w}${r(_,B+P.length)}`)}}))},stop(){Ue(this.preSend),kt(this.preEdit)}})});function Ac({option:e,pluginSettings:t,id:n,onChange:r,onError:s}){let a=t[n]??e.default,[c,f]=b.useState(a??!1),[d,v]=b.useState(null);b.useEffect(()=>{s(d!==null)},[d]);let h=[{label:"Enabled",value:!0,default:a===!0},{label:"Disabled",value:!1,default:typeof a>"u"||a===!1}];function g(w){let P=(e.isValid&&e.isValid(w))??!0;typeof P=="string"?v(P):P?(v(null),f(w),r(w)):v("Invalid input provided.")}return o(y.FormSection,null,o(y.FormTitle,null,e.description),o(St,{isDisabled:e.disabled?.()??!1,options:h,placeholder:e.placeholder??"Select an option",maxVisibleItems:5,closeOnSelect:!0,select:g,isSelected:w=>w===c,serialize:w=>String(w),...e.componentProps}),d&&o(y.FormText,{style:{color:"var(--text-danger)"}},d))}var _c=m(()=>{"use strict";i();k()});function Lc({option:e,onChange:t,onError:n}){return e.component({setValue:t,setError:n,option:e})}var Ec=m(()=>{"use strict";i()});function oi({option:e,pluginSettings:t,id:n,onChange:r,onError:s}){function a(g){return e.type===2?BigInt(g):Number(g)}let[c,f]=b.useState(`${t[n]??e.default??0}`),[d,v]=b.useState(null);b.useEffect(()=>{s(d!==null)},[d]);function h(g){let w=(e.isValid&&e.isValid(g))??!0;typeof w=="string"?v(w):w?e.type===1&&BigInt(g)>=mu?(f(`${Number.MAX_SAFE_INTEGER}`),r(a(g))):(f(g),r(a(g))):v("Invalid input provided.")}return o(y.FormSection,null,o(y.FormTitle,null,e.description),o(Le,{type:"number",pattern:"-?[0-9]+",value:c,onChange:h,placeholder:e.placeholder??"Enter a number",disabled:e.disabled?.()??!1,...e.componentProps}),d&&o(y.FormText,{style:{color:"var(--text-danger)"}},d))}var mu,Fc=m(()=>{"use strict";i();T();k();mu=BigInt(Number.MAX_SAFE_INTEGER)});function Dc({option:e,pluginSettings:t,onChange:n,onError:r,id:s}){let a=t[s]??e.options?.find(g=>g.default)?.value,[c,f]=b.useState(a??null),[d,v]=b.useState(null);b.useEffect(()=>{r(d!==null)},[d]);function h(g){let w=(e.isValid&&e.isValid(g))??!0;typeof w=="string"?v(w):w?(f(g),n(g)):v("Invalid input provided.")}return o(y.FormSection,null,o(y.FormTitle,null,e.description),o(St,{isDisabled:e.disabled?.()??!1,options:e.options,placeholder:e.placeholder??"Select an option",maxVisibleItems:5,closeOnSelect:!0,select:h,isSelected:g=>g===c,serialize:g=>String(g),...e.componentProps}),d&&o(y.FormText,{style:{color:"var(--text-danger)"}},d))}var Nc=m(()=>{"use strict";i();k()});function Ot(e,t,n=1){let r=[];for(let s=e;s<=t;s+=n)r.push(Math.round(s*100)/100);return r}function Oc({option:e,pluginSettings:t,id:n,onChange:r,onError:s}){let a=t[n]??e.default,[c,f]=b.useState(null);b.useEffect(()=>{s(c!==null)},[c]);function d(v){let h=(e.isValid&&e.isValid(v))??!0;typeof h=="string"?f(h):h?(f(null),r(v)):f("Invalid input provided.")}return o(y.FormSection,null,o(y.FormTitle,null,e.description),o(qo,{disabled:e.disabled?.()??!1,markers:e.markers,minValue:e.markers[0],maxValue:e.markers[e.markers.length-1],initialValue:a,onValueChange:d,onValueRender:v=>String(v.toFixed(2)),stickToMarkers:e.stickToMarkers??!0,...e.componentProps}))}var Jn=m(()=>{"use strict";i();k()});function Bc({option:e,pluginSettings:t,id:n,onChange:r,onError:s}){let[a,c]=b.useState(t[n]??e.default??null),[f,d]=b.useState(null);b.useEffect(()=>{s(f!==null)},[f]);function v(h){let g=(e.isValid&&e.isValid(h))??!0;typeof g=="string"?d(g):g?(c(h),r(h)):d("Invalid input provided.")}return o(y.FormSection,null,o(y.FormTitle,null,e.description),o(Le,{type:"text",value:a,onChange:v,placeholder:e.placeholder??"Enter a value",disabled:e.disabled?.()??!1,...e.componentProps}),f&&o(y.FormText,{style:{color:"var(--text-danger)"}},f))}var $c=m(()=>{"use strict";i();k()});var ri=m(()=>{"use strict";i();_c();Ec();Fc();Nc();Jn();$c()});var ii,Uc=m(()=>{"use strict";i();be();R();ri();x();T();ii=u({name:"Fart2",authors:[p.Animal],description:"Enable farting v2, a slash command that allows you to perform or request that someone perform a little toot.",dependencies:["CommandsAPI"],commands:[{name:"fart",description:"A simple command in which you may either request that a user do a little toot for you, or conduct one yourself.",options:[{type:6,name:"user",description:"A Discord\u2122 user of which you would humbly request a toot from.",required:!1}],execute(e){let t=new Audio("https://raw.githubusercontent.com/ItzOnlyAnimal/AliuPlugins/main/fart.mp3");return t.volume=S.plugins.Fart2.volume,t.play(),{content:e[0]?`<@${e[0].value}> fart`:"fart"}}}],options:{volume:{description:"how loud you wanna fart (aka volume)",type:5,markers:Ot(0,1,.1),default:.5,stickToMarkers:!1}}})});var Hc,si,jc=m(()=>{"use strict";i();x();T();L();$(["getGuild"],e=>Hc=e);si=u({name:"ForceOwnerCrown",description:"Force the owner crown next to usernames even if the server is large.",authors:[p.D3SOX,p.Nickyux],patches:[{find:".renderOwner=",replacement:{match:/isOwner;return null!=(\w+)?&&/g,replace:"isOwner;if(Vencord.Plugins.plugins.ForceOwnerCrown.isGuildOwner(this.props)){$1=true;}return null!=$1&&"}}],isGuildOwner(e){if(e?.channel?.type===3)return!1;let t=e?.guildId??e?.channel?.guild_id,n=e?.user?.id;if(t&&n){let r=Hc.getGuild(t);if(r)return r.ownerId===n;console.error("[ForceOwnerCrown] failed to get guild",{guildId:t,guild:r,props:e})}else console.error("[ForceOwnerCrown] no guildId or userId",{guildId:t,userId:n,props:e});return!1}})});var ai,Gc=m(()=>{"use strict";i();be();x();T();L();ai=u({name:"FriendInvites",description:"Generate and manage friend invite links.",authors:[p.afn],dependencies:["CommandsAPI"],commands:[{name:"create friend invite",description:"Generates a friend invite link.",inputType:3,execute:async(e,t)=>{let r=await _e("createFriendInvite").createFriendInvite();return void U(t.channel.id,{content:` - discord.gg/${r.code} - Expires: + `}var pi,pu,Ny=m(()=>{"use strict";a();D();w();b();pu=g({name:"BlurNSFW",description:"Blur attachments in NSFW channels until hovered",authors:[p.Ven],patches:[{find:".embedWrapper,embed",replacement:[{match:/(\.renderEmbed=.+?(.)=.\.props)(.+?\.embedWrapper)/g,replace:"$1,vcProps=$2$3+(vcProps.channel.nsfw?' vc-nsfw-img':'')"},{match:/(\.renderAttachments=.+?(.)=this\.props)(.+?\.embedWrapper)/g,replace:"$1,vcProps=$2$3+(vcProps.channel.nsfw?' vc-nsfw-img':'')"}]}],options:{blurAmount:{type:1,description:"Blur Amount",default:10,onChange:Cy}},start(){pi=document.createElement("style"),pi.id="VcBlurNsfw",document.head.appendChild(pi),Cy()},stop(){pi?.remove()}})});function o2(e){let t=M.plugins.CallTimer.format==="human",n=f=>t?f:f.toString().padStart(2,"0"),r=f=>t?f:"",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),h="";return s&&(h+=`${s}d `),(l||h)&&(h+=`${n(l)}${r("h")}${i}`),(c||h||!t)&&(h+=`${n(c)}${r("m")}${i}`),h+=`${n(u)}${r("s")}`,h}var du,ky=m(()=>{"use strict";a();D();ie();w();b();T();du=g({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:)\w/,replace:"[$&, $self.renderTimer(this.props.channel.id)]"}}],renderTimer(e){return o(A,{noop:!0},o(this.Timer,{channelId:e}))},Timer({channelId:e}){let[t,n]=I.useState(0),r=I.useMemo(()=>Date.now(),[e]);return I.useEffect(()=>{let i=setInterval(()=>n(Date.now()-r),1e3);return()=>{clearInterval(i),n(0)}},[e]),o("p",{style:{margin:0}},"Connected for ",o2(t))}})});var Su={};ge(Su,{_handleClick:()=>s2,_handlePreEdit:()=>i2,_handlePreSend:()=>r2,addClickListener:()=>yu,addPreEditListener:()=>Jn,addPreSendListener:()=>lt,removeClickListener:()=>vu,removePreEditListener:()=>Qn,removePreSendListener:()=>ct});async function r2(e,t,n,r){n.replyOptions=r;for(let i of fu)try{let s=await i(e,t,n);if(s&&s.cancel===!0)return!0}catch(s){mu.error(`MessageSendHandler: Listener encountered an unknown error +`,s)}return!1}async function i2(e,t,n){for(let r of gu)try{await r(e,t,n)}catch(i){mu.error(`MessageEditHandler: Listener encountered an unknown error +`,i)}}function lt(e){return fu.add(e),e}function Jn(e){return gu.add(e),e}function ct(e){return fu.delete(e)}function Qn(e){return gu.delete(e)}function s2(e,t,n){e=un.getMessage(t.id,e.id)??e;for(let r of hu)try{r(e,t,n)}catch(i){mu.error(`MessageClickHandler: Listener encountered an unknown error +`,i)}}function yu(e){return hu.add(e),e}function vu(e){return hu.delete(e)}var mu,fu,gu,hu,Sn=m(()=>{"use strict";a();be();T();mu=new Y("MessageEvents","#e5c890"),fu=new Set,gu=new Set;hu=new Set});var Ry,Ay=m(()=>{"use strict";a();Ry=["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","wt_zmc","utm_source","utm_content","utm_medium","utm_campaign","utm_term","si@open.spotify.com","igshid"]});var Ly,a2,bu,Ey=m(()=>{"use strict";a();Sn();w();b();Ay();Ly=/[\\^$.*+?()[\]{}|]/g,a2=RegExp(Ly.source),bu=g({name:"ClearURLs",description:"Removes tracking garbage from URLs",authors:[p.adryd],dependencies:["MessageEventsAPI"],escapeRegExp(e){return e&&a2.test(e)?e.replace(Ly,"\\$&"):e||""},createRules(){let e=Ry;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=lt((e,t)=>this.onSend(t)),this.preEdit=Jn((e,t,n)=>this.onSend(n))},stop(){ct(this.preSend),Qn(this.preEdit)}})});var Tu,Dy=m(()=>{"use strict";a();w();b();Tu=g({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.status/,replace:(e,t)=>`${t}"online"`}}]})});var l2,xu,Oy=m(()=>{"use strict";a();w();ri();Wr();b();O();O();T();l2=e=>()=>{throw new Error(`'${e}' is Discord Desktop only.`)},xu=g({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=or(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:Gt.c,wreq:Gt,wpsearch:hl,wpex:yl,wpexs:n=>Vencord.Webpack.extract(Vencord.Webpack.findModuleId(n)),find:e(n=>n),findAll:or,findByProps:e(K.byProps),findAllByProps:(...n)=>or(K.byProps(...n)),findByCode:e(K.byCode),findAllByCode:n=>or(K.byCode(n)),findStore:e(K.byStoreName),PluginsApi:Vencord.Plugins,plugins:Vencord.Plugins.plugins,React:I,Settings:Vencord.Settings,Api:Vencord.Api,reload:()=>location.reload(),restart:l2("restart"),canonicalizeMatch:Uo,canonicalizeReplace:Ts,canonicalizeReplacement:jr,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(),_o.render(I.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 To,wu,Pu,Js,Mu,Iu,_y=m(()=>{"use strict";a();uo();D();w();be();Ze();b();dr();T();To=new Y("CrashHandler"),wu=k({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}}),Pu=0,Js=0,Mu=!1,Iu=g({name:"CrashHandler",description:"Utility plugin for handling and possibly recovering from Crashes without a restart",authors:[p.Nuckyz],enabledByDefault:!0,popAllModals:void 0,settings:wu,patches:[{find:".Messages.ERRORS_UNEXPECTED_CRASH",replacement:{match:/(?=this\.setState\()/,replace:"$self.handleCrash(this)||"}},{find:'dispatch({type:"MODAL_POP_ALL"})',replacement:{match:/"MODAL_POP_ALL".+?};(?<=(\i)=function.+?)/,replace:(e,t)=>`${e}$self.popAllModals=${t};`}}],handleCrash(e){if(Date.now()-Js<=1e3&&!Mu)return!0;if(Mu=!1,++Pu>5){try{he({color:"#eed202",title:"Discord has crashed!",body:"Awn :( Discord has crashed more than five times, not attempting to recover.",noPersist:!0})}catch{}return Js=Date.now(),!1}setTimeout(()=>Pu--,6e4);try{return Pu===1&&ii("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),wu.store.attemptToPreventCrashes?(this.handlePreventCrash(e),!0):!1}catch(t){return To.error("Failed to handle crash",t),!1}finally{Js=Date.now()}},handlePreventCrash(e){if(Date.now()-Js>=1e3)try{he({color:"#eed202",title:"Discord has crashed!",body:"Attempting to recover...",noPersist:!0})}catch{}try{E.dispatch({type:"CONTEXT_MENU_CLOSE"})}catch(t){To.debug("Failed to close open context menu.",t)}try{this.popAllModals?.()}catch(t){To.debug("Failed to close old modals.",t)}try{kl()}catch(t){To.debug("Failed to close all open modals.",t)}try{E.dispatch({type:"USER_PROFILE_MODAL_CLOSE"})}catch(t){To.debug("Failed to close user popout.",t)}try{E.dispatch({type:"LAYER_POP_ALL"})}catch(t){To.debug("Failed to pop all layers.",t)}if(wu.store.attemptToNavigateToHome)try{Gr.transitionTo("/channels/@me")}catch(t){To.debug("Failed to navigate to home",t)}try{Mu=!0,e.forceUpdate()}catch(t){To.debug("Failed to update crash handler component.",t)}}})});async function By(e){return(await d2.getAsset(Vs.store.appID,[e,void 0]))[0]}async function $y(){let{appID:e,appName:t,details:n,state:r,type:i,startTime:s,endTime:l,imageBig:c,imageBigTooltip:u,imageSmall:h,imageSmallTooltip:f,buttonOneText:y,buttonOneURL:S,buttonTwoText:x,buttonTwoURL:R}=Vs.store;if(!t)return;let C={application_id:e||"0",name:t,state:r,details:n,type:i,flags:1<<0};s&&(C.timestamps={start:s},l&&(C.timestamps.end=l)),y&&(C.buttons=[y,x].filter(vs),C.metadata={button_urls:[S,R].filter(vs)}),c&&(C.assets={large_image:await By(c),large_text:u}),h&&(C.assets={...C.assets,small_image:await By(h),small_text:f});for(let _ in C){if(_==="type")continue;let $=C[_];(!$||$.length===0)&&delete C[_]}return C}async function di(e){let t=await $y();E.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e?null:t,socketId:"CustomRPC"})}var c2,u2,p2,d2,Qt,Fy,Qs,m2,Vs,Cu,Uy=m(()=>{"use strict";a();D();bo();w();Ss();ve();b();O();T();c2=ce("onOpenGameProfile"),u2=P("activity","buttonColor"),p2=P("profileColors"),d2=Ke("getAssetImage: size must === [number, number] for Twitch",{getAsset:K.byCode("apply(")});Qt=e=>({type:0,description:e,onChange:di}),Fy=e=>({type:1,description:e,onChange:di}),Qs=(e,t,n)=>({label:e,value:t,default:n}),m2=(e,t)=>({type:4,description:e,onChange:di,options:t}),Vs=k({appID:Qt("The ID of the application for the rich presence."),appName:Qt("The name of the presence."),details:Qt("Line 1 of rich presence."),state:Qt("Line 2 of rich presence."),type:m2("Type of presence",[Qs("Playing",0,!0),Qs("Listening",2),Qs("Watching",3),Qs("Competing",5)]),startTime:Fy("Unix Timestamp for beginning of activity."),endTime:Fy("Unix Timestamp for end of activity."),imageBig:Qt("Sets the big image to the specified image."),imageBigTooltip:Qt("Sets the tooltip text for the big image."),imageSmall:Qt("Sets the small image to the specified image."),imageSmallTooltip:Qt("Sets the tooltip text for the small image."),buttonOneText:Qt("The text for the first button"),buttonOneURL:Qt("The URL for the first button"),buttonTwoText:Qt("The text for the second button"),buttonTwoURL:Qt("The URL for the second button")});Cu=g({name:"CustomRPC",description:"Allows you to set a custom rich presence.",authors:[p.captain],start:di,stop:()=>di(!0),settings:Vs,settingsAboutComponent:()=>{let e=ot($y);return o(d,null,o(v.FormTitle,{tag:"h2"},"NOTE:"),o(v.FormText,null,"You will need to ",o(at,{href:"https://discord.com/developers/applications"},"create an application")," and get its ID to use this plugin."),o(v.FormDivider,null),o("div",{style:{width:"284px"},className:p2.profileColors},e[0]&&o(c2,{activity:e[0],className:u2.activity,channelId:Pe.getChannelId(),guild:ue.getGuild(lo.getLastSelectedGuildId()),application:{id:Vs.store.appID},user:F.getCurrentUser()})))}})});var Nu,Gy=m(()=>{"use strict";a();w();b();Nu=g({name:"DisableDMCallIdle",description:"Disables automatically getting kicked from a DM voice call after 5 minutes.",authors:[p.Nuckyz],patches:[{find:".Messages.BOT_CALL_IDLE_DISCONNECT",replacement:{match:/(?<=function \i\(\){)(?=.{1,100}\.Messages\.BOT_CALL_IDLE_DISCONNECT)/,replace:"return;"}}]})});function ku(e){return e.t==="Emoji"?`${location.protocol}//${window.GLOBAL_ENV.CDN_HOST}/emojis/${e.id}.${e.isAnimated?"gif":"png"}`:`${location.origin}/stickers/${e.id}.${h2[e.format_type]}`}async function Wy(e){let t=f2.getStickerById(e);if(t)return t;let{body:n}=await Dt.get({url:`/stickers/${e}`});return E.dispatch({type:"STICKER_FETCH_SUCCESS",sticker:n}),n}async function y2(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 qy(ku(t)));let{body:r}=await Dt.post({url:`/guilds/${e}/stickers`,body:n});E.dispatch({type:"GUILD_STICKERS_CREATE_SUCCESS",guildId:e,sticker:{...r,user:F.getCurrentUser()}})}async function v2(e,t){let n=await qy(ku(t)),r=await new Promise(i=>{let s=new FileReader;s.onload=()=>i(s.result),s.readAsDataURL(n)});return g2({guildId:e,name:t.name.split("~")[0],image:r})}function S2(e){let t=F.getCurrentUser().id;return Object.values(ue.getGuilds()).filter(n=>{if(!(n.ownerId===t||BigInt(je.getGuildPermissions({id:n.id})&Hy)===Hy))return!1;if(e.t==="Sticker")return!0;let{isAnimated:i}=e,s=n.getMaxEmojiSlots(),{emojis:l}=pn.getGuilds()[n.id],c=0;for(let u of l)u.animated===i&&c++;return cn.name.localeCompare(r.name))}async function qy(e){let t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch ${e} - ${t.status}`);return t.blob()}async function b2(e,t){try{t.t==="Sticker"?await y2(e,t):await v2(e,t),X.show({message:`Successfully cloned ${t.name} to ${ue.getGuild(e)?.name??"your server"}!`,type:X.Type.SUCCESS,id:X.genId()})}catch(n){new Y("EmoteCloner").error("Failed to clone",t.name,"to",e,n),X.show({message:"Oopsie something went wrong :( Check console!!!",type:X.Type.FAILURE,id:X.genId()})}}function w2({data:e}){let[t,n]=I.useState(!1),[r,i]=I.useState(e.name),[s,l]=I.useReducer(u=>u+1,0),c=I.useMemo(()=>S2(e),[e.id,s]);return o(d,null,o(v.FormTitle,{className:G.top20},"Custom Name"),o(Ks,{value:r,onChange:u=>{e.name=u,i(u)},validate:u=>e.t==="Emoji"&&u.length>2&&u.length<32&&x2.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(W,{text:u.name},({onMouseLeave:h,onMouseEnter:f})=>o("div",{onMouseLeave:h,onMouseEnter:f,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),b2(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(v.FormText,{style:{fontSize:T2(u.acronym),width:"100%",overflow:"hidden",whiteSpace:"nowrap",textAlign:"center",cursor:t?"not-allowed":"pointer"}},u.acronym))))))}function ea(e,t){return o(L.MenuItem,{id:"emote-cloner",key:"emote-cloner",label:`Clone ${e}`,action:()=>Hr(async()=>{let n=await t(),r={t:e,...n},i=ku(r);return s=>o(Le,{...s},o($e,null,o("img",{role:"presentation","aria-hidden":!0,src:i,alt:"",height:24,width:24,style:{marginRight:"0.5em"}}),o(v.FormText,null,"Clone ",r.name)),o(Ue,null,o(w2,{data:r})))})})}function Ky(e){return new URL(e).pathname.endsWith(".gif")}var Hy,f2,g2,h2,T2,x2,zy,jy,Ru,Yy=m(()=>{"use strict";a();Pt();Xc();w();be();Xe();Ze();b();O();T();Hy=1n<<30n,f2=ae("StickersStore"),g2=ce('"EMOJI_UPLOAD_START"',"GUILD_EMOJIS("),h2=[,"png","png","json","gif"];T2=e=>[20,20,18,18,16,14,12][e.length]??4,x2=/^\w+$/i;zy=(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 ea("Emoji",()=>({id:n,name:u,isAnimated:Ky(r??i)}));case"sticker":return t.message.stickerItems.find(f=>f.id===n)?.format_type===3?void 0:ea("Sticker",()=>Wy(n))}})();l&&nt("copy-link",e)?.push(l)},jy=(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(ea("Emoji",()=>({id:n,name:r,isAnimated:s&&Ky(s.src)})))}else i==="sticker"&&!t.target.className?.includes("lottieCanvas")&&e.push(ea("Sticker",()=>Wy(n)))},Ru=g({name:"EmoteCloner",description:"Allows you to clone Emotes & Stickers to your own server (right click them)",tags:["StickerCloner"],authors:[p.Ven,p.Nuckyz],start(){pe("message",zy),pe("expression-picker",jy)},stop(){de("message",zy),de("expression-picker",jy)}})});var Au,Lu,Eu,Zy=m(()=>{"use strict";a();D();ie();Yr();w();Xe();b();O();T();Au=P("key","removeBuildOverride"),Lu=k({enableIsStaff:{description:"Enable isStaff",type:3,default:!1,restartNeeded:!0},forceStagingBanner:{description:"Whether to force Staging banner under user area.",type:3,default:!1,restartNeeded:!0}}),Eu=g({name:"Experiments",description:"Enable Access to Experiments in Discord!",authors:[p.Megu,p.Ven,p.Nickyux,p.BanTheNons,p.Nuckyz],settings:Lu,patches:[{find:"Object.defineProperties(this,{isDeveloper",replacement:{match:/(?<={isDeveloper:\{[^}]+?,get:function\(\)\{return )\w/,replace:"true"}},{find:'type:"user",revision',replacement:{match:/!(\i)&&"CONNECTION_OPEN".+?;/g,replace:"$1=!0;"}},{find:".isStaff=function(){",predicate:()=>Lu.store.enableIsStaff,replacement:[{match:/return\s*?(\i)\.hasFlag\((\i\.\i)\.STAFF\)}/,replace:(e,t,n)=>`return Vencord.Webpack.Common.UserStore.getCurrentUser().id===${t}.id||${t}.hasFlag(${n}.STAFF)}`},{match:/hasFreePremium=function\(\){return this.isStaff\(\)\s*?\|\|/,replace:"hasFreePremium=function(){return "}]},{find:".Messages.DEV_NOTICE_STAGING",predicate:()=>Lu.store.forceStagingBanner,replacement:{match:/"staging"===window\.GLOBAL_ENV\.RELEASE_CHANNEL/,replace:"true"}},{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(I.Fragment,null,o(v.FormTitle,{tag:"h3"},"More Information"),o(v.FormText,{variant:"text-md/normal"},"You can enable client DevTools"," ",o("kbd",{className:Au.key},t)," +"," ",o("kbd",{className:Au.key},n)," +"," ",o("kbd",{className:Au.key},"O")," ","after enabling ",o("code",null,"isStaff")," below"),o(v.FormText,null,"and then toggling ",o("code",null,"Enable DevTools")," in the ",o("code",null,"Developer Options")," tab in settings."))},WarningCard:A.wrap(()=>o(qn,{id:"vc-experiments-warning-card",className:G.bottom16},o(v.FormTitle,{tag:"h2"},"Hold on!!"),o(v.FormText,null,"Experiments are unreleased Discord features. They might not work, or even break your client or get your account disabled."),o(v.FormText,{className:G.top8},"Only use experiments if you know what you're doing. Vencord is not responsible for any damage caused by enabling experiments.")),{noop:!0})})});var Du,Xy=m(()=>{"use strict";a();w();b();Du=g({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 ta,Jy,P2,Qy,Vy,ev,mi=m(()=>{"use strict";a();sn();ta=$n(()=>import("https://unpkg.com/gifenc@1.0.3/dist/gifenc.esm.js")),Jy=$n(async()=>{let e={},t=new Proxy(window,{set:(n,r,i)=>e[r]=i});return Function("self",await fetch("https://cdnjs.cloudflare.com/ajax/libs/apng-canvas/2.1.1/apng-canvas.min.js").then(n=>n.text()))(t),e.APNG}),P2="https://unpkg.com/@vap/shiki-worker@0.0.8/dist",Qy=`${P2}/index.min.js`,Vy="https://unpkg.com/@vap/shiki@0.10.3/dist/onig.wasm",ev=$n(()=>import("https://unpkg.com/stegcloak-dist@1.0.0/index.js"))});function nv(e,t){if(!t)return;let n=t.fields.find(i=>i.localName===e);return n?Object.values(n).find(i=>typeof i=="function")?.():void 0}var M2,I2,fi,Bu,tv,Wo,qo,na,C2,N2,Ou,_u,oa,Me,Fu,ov=m(()=>{"use strict";a();Sn();D();w();mi();tt();sn();be();b();O();T();M2=0,I2=ce("UPLOAD_FILE_LIMIT_ERROR"),fi=ae("UserSettingsProtoStore"),Bu=ke(e=>e.ProtoClass?.typeName==="discord_protos.discord_users.v1.PreloadedUserSettings"),tv=P("readerFactory"),Wo=ae("StickersStore");qo=dt(()=>nv("appearance",Bu.ProtoClass)),na=dt(()=>nv("clientThemeSettings",qo)),C2=1n<<18n,N2=1n<<37n,Ou=/\/emojis\/(\d+?)\.(png|webp|gif)/,_u=/\/stickers\/(\d+?)\./,oa=/\/attachments\/\d+?\/\d+?\/(\d+?)\.gif/,Me=k({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}}),Fu=g({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:Me,patches:[{find:".PREMIUM_LOCKED;",predicate:()=>Me.store.enableEmojiBypass,replacement:[{match:/(?<=(\i)=\i\.intention)/,replace:(e,t)=>`,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:()=>Me.store.enableEmojiBypass,replacement:{match:/((?:canUseEmojisEverywhere|canUseAnimatedEmojis):function\(\i)\){(.+?\))/g,replace:(e,t,n)=>`${t},fakeNitroIntention){${n}||fakeNitroIntention==null||[${3},${4}].includes(fakeNitroIntention)`}},{find:"canUseStickersEverywhere:function",predicate:()=>Me.store.enableStickerBypass,replacement:{match:/canUseStickersEverywhere:function\(\i\){/,replace:"$&return true;"}},{find:'"SENDABLE"',predicate:()=>Me.store.enableStickerBypass,replacement:{match:/(\w+)\.available\?/,replace:"true?"}},{find:"canStreamHighQuality:function",predicate:()=>Me.store.enableStreamQualityBypass,replacement:["canUseHighVideoUploadQuality","canStreamHighQuality","canStreamMidQuality"].map(e=>({match:new RegExp(`${e}:function\\(\\i\\){`),replace:"$&return true;"}))},{find:"STREAM_FPS_OPTION.format",predicate:()=>Me.store.enableStreamQualityBypass,replacement:{match:/(userPremiumType|guildPremiumTier):.{0,10}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:/=(\i)\.local;/,replace:(e,t)=>`${e}${t}.local||$self.handleProtoChange(${t}.settings.proto);`}]},{find:"updateTheme:function",replacement:{match:/(function \i\(\i\){var (\i)=\i\.backgroundGradientPresetId.+?)(\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:()=>Me.store.transformEmojis,match:/1!==(\i)\.length\|\|1!==\i\.length/,replace:(e,t)=>`${e}||$self.shouldKeepEmojiLink(${t}[0])`},{predicate:()=>Me.store.transformEmojis||Me.store.transformStickers,match:/(?=return{hasSpoilerEmbeds:\i,content:(\i)})/,replace:(e,t)=>`${t}=$self.patchFakeNitroEmojisOrRemoveStickersLinks(${t},arguments[2]?.formatInline);`}]},{find:"renderEmbeds=function",replacement:[{predicate:()=>Me.store.transformEmojis||Me.store.transformStickers,match:/(renderEmbeds=function\((\i)\){)(.+?embeds\.map\(\(function\((\i)\){)/,replace:(e,t,n,r,i)=>`${t}const fakeNitroMessage=${n};${r}if($self.shouldIgnoreEmbed(${i},fakeNitroMessage))return null;`},{predicate:()=>Me.store.transformStickers,match:/renderStickersAccessories=function\((\i)\){var (\i)=\(0,\i\.\i\)\(\i\),/,replace:(e,t,n)=>`${e}${n}=$self.patchFakeNitroStickers(${n},${t}),`},{predicate:()=>Me.store.transformStickers,match:/renderAttachments=function\(\i\){var (\i)=\i.attachments.+?;/,replace:(e,t)=>`${e}${t}=$self.filterAttachments(${t});`}]},{find:".STICKER_IN_MESSAGE_HOVER,",predicate:()=>Me.store.transformStickers,replacement:[{match:/var (\i)=\i\.renderableSticker,.{0,50}closePopout.+?channel:\i,closePopout:\i,/,replace:(e,t)=>`${e}renderableSticker:${t},`},{match:/(emojiSection.{0,50}description:)(\i)(?<=(\i)\.sticker,.+?)(?=,)/,replace:(e,t,n,r)=>`${t}$self.addFakeNotice("STICKER",${n},!!${r}.renderableSticker?.fake)`}]},{find:".Messages.EMOJI_POPOUT_PREMIUM_JOINED_GUILD_DESCRIPTION",predicate:()=>Me.store.transformEmojis,replacement:{match:/((\i)=\i\.node,\i=\i\.emojiSourceDiscoverableGuild)(.+?return )(.{0,450}Messages\.EMOJI_POPOUT_PREMIUM_JOINED_GUILD_DESCRIPTION.+?}\))/,replace:(e,t,n,r,i)=>`${t},fakeNitroNode=${n}${r}$self.addFakeNotice("EMOJI",${i},fakeNitroNode.fake)`}}],get guildId(){return Rl()?.id},get canUseEmotes(){return(F.getCurrentUser().premiumType??0)>0},get canUseStickers(){return(F.getCurrentUser().premiumType??0)>1},handleProtoChange(e,t){if(e==null||typeof e=="string"||!fi||!e.appearance&&!qo)return;if((t?.premium_type??F?.getCurrentUser()?.premiumType??0)!==2&&(e.appearance??=qo.create(),fi.settings.appearance?.theme!=null&&(e.appearance.theme=fi.settings.appearance.theme),fi.settings.appearance?.clientThemeSettings?.backgroundGradientPresetId?.value!=null&&na)){let r=na.create({backgroundGradientPresetId:{value:fi.settings.appearance.clientThemeSettings.backgroundGradientPresetId.value}});e.appearance.clientThemeSettings??=r,e.appearance.clientThemeSettings.backgroundGradientPresetId=r.backgroundGradientPresetId}},handleGradientThemeSelect(e,t,n){if((F?.getCurrentUser()?.premiumType??0)===2||e==null)return n();if(!qo||!na||!tv)return;let i=Bu.getCurrentValue().appearance,s=i!=null?qo.fromBinary(qo.toBinary(i),tv):qo.create();s.theme=t;let l=na.create({backgroundGradientPresetId:{value:e}});s.clientThemeSettings??=l,s.clientThemeSettings.backgroundGradientPresetId=l.backgroundGradientPresetId;let c=Bu.ProtoClass.create();c.appearance=s,E.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")&&!Me.store.transformCompoundSentence)return e;let n=e.length,r=c=>{if(Me.store.transformEmojis){let u=c.props.href.match(Ou);if(u){let h=null;try{h=new URL(c.props.href)}catch{}let f=pn.getCustomEmojiById(u[1])?.name??h?.searchParams.get("name")??"FakeNitroEmoji";return Ie.defaultRules.customEmoji.react({jumboable:!t&&e.length===1&&typeof e[0].type!="string",animated:u[2]==="gif",emojiId:u[1],name:f,fake:!0},void 0,{key:String(n++)})}}if(Me.store.transformStickers){if(_u.test(c.props.href))return null;let u=c.props.href.match(oa);if(u&&Wo.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 h=!1;for(let[f,y]of u.props.children.entries()){if(y==null){delete u.props.children[f];continue}this.ensureChildrenIsArray(y),y.props.children.length>0?h=!0:delete u.props.children[f]}if(!h)return null;u.props.children=this.clearEmptyArrayItems(u.props.children)}return u},l=c=>{for(let[u,h]of c.entries())c[u]=s(h);return c=this.clearEmptyArrayItems(c),this.trimContent(c),c};try{return l(window._.cloneDeep(e))}catch(c){return new Y("FakeNitro").error(c),e}},patchFakeNitroStickers(e,t){let n=[],r=t.content.split(/\s/);Me.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(!Me.store.transformCompoundSentence&&!i.startsWith("http"))continue;let s=i.match(_u);if(s){let c=null;try{c=new URL(i)}catch{}let u=Wo.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(oa);if(l){if(!Wo.getStickerById(l[1]))continue;let c=Wo.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&&!Me.store.transformCompoundSentence)return!1;switch(e.type){case"image":{if(!Me.store.transformCompoundSentence&&!n.includes(e.url)&&!n.includes(e.image.proxyURL))return!1;if(Me.store.transformEmojis&&Ou.test(e.url))return!0;if(Me.store.transformStickers){if(_u.test(e.url))return!0;let r=e.url.match(oa);if(r&&Wo.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(oa);return!(n&&Wo.getStickerById(n[1]))})},shouldKeepEmojiLink(e){return e.target&&Ou.test(e.target)},addFakeNotice(e,t,n){if(!n)return t;switch(t=Array.isArray(t)?t:[t],e){case"STICKER":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"EMOJI":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=Z.getChannel(e);return!t||t.isDM()||t.isGroupDM()||t.isMultiUserDM()?!0:je.can(C2,t)},hasPermissionToUseExternalStickers(e){let t=Z.getChannel(e);return!t||t.isDM()||t.isGroupDM()||t.isMultiUserDM()?!0:je.can(N2,t)},getStickerLink(e){return`https://media.discordapp.net/stickers/${e}.png?size=${M.plugins.FakeNitro.stickerSize}`},async sendAnimatedSticker(e,t,n){let[{parseURL:r},{GIFEncoder:i,quantize:s,applyPalette:l}]=await Promise.all([Jy(),ta()]),{frames:c,width:u,height:h}=await r(e),f=new i,y=M.plugins.FakeNitro.stickerSize,S=document.createElement("canvas");S.width=y,S.height=y;let x=S.getContext("2d",{willReadFrequently:!0}),R=y/Math.max(u,h);x.scale(R,R);let C;for(let $ of c){let{left:B,top:q,width:ee,height:j,img:z,delay:te,blendOp:U,disposeOp:Ne}=$;C=x.getImageData(B,q,ee,j),U===0&&x.clearRect(B,q,ee,j),x.drawImage(z,B,q,ee,j);let{data:ne}=x.getImageData(0,0,y,y),Be=s(ne,256),De=l(ne,Be);f.writeFrame(De,y,y,{transparent:!0,palette:Be,delay:te}),Ne===1?x.clearRect(B,q,ee,j):Ne===2&&x.putImageData(C,B,q)}f.finish();let _=new File([f.bytesView()],`${t}.gif`,{type:"image/gif"});I2([_],Z.getChannel(n),M2)},start(){let e=Me.store;if(!e.enableEmojiBypass&&!e.enableStickerBypass)return;function t(n,r){return!n[r]||/\s/.test(n[r])?"":" "}this.preSend=lt((n,r,i)=>{let{guildId:s}=this;e:{if(!e.enableStickerBypass)break e;let l=Wo.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}>`,h=c.url.replace(/\?size=\d+/,"?"+new URLSearchParams({size:M.plugins.FakeNitro.emojiSize,name:encodeURIComponent(c.name)}));r.content=r.content.replace(u,(f,y,S)=>`${t(S,y-1)}${h}${t(S,y+f.length)}`)}}return{cancel:!1}}),this.preEdit=Jn((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,h,f)=>{let y=pn.getCustomEmojiById(u);if(y==null||!y.require_colons||y.available!==!1&&s||y.guildId===l&&!y.animated)return c;let S=y.url.replace(/\?size=\d+/,"?"+new URLSearchParams({size:M.plugins.FakeNitro.emojiSize,name:encodeURIComponent(y.name)}));return`${t(f,h-1)}${S}${t(f,h+c.length)}`})})},stop(){ct(this.preSend),Qn(this.preEdit)}})});function rv(...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 iv,sv=m(()=>{"use strict";a();iv=rv;typeof module<"u"&&(module.exports=rv)});function k2(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 R2(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 av,$u,lv=m(()=>{"use strict";a();D();ie();w();Xe();fe();b();T();sv();av=k({nitroFirst:{description:"Default color source if both are present",type:4,options:[{label:"Nitro colors",value:!0,default:!0},{label:"Fake colors",value:!1}]}}),$u=g({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:"getUserProfile=",replacement:{match:/(?<=getUserProfile=function\(\i\){return )(\i\[\i\])/,replace:"$self.colorDecodeHook($1)"}},{find:".USER_SETTINGS_PROFILE_THEME_ACCENT",replacement:{match:/RESET_PROFILE_THEME}\)(?<=},color:(\i).+?},color:(\i).+?)/,replace:"$&,$self.addCopy3y3Button({primary:$1,accent:$2})"}}],settingsAboutComponent:()=>o(v.FormSection,null,o(v.FormTitle,{tag:"h3"},"Usage"),o(v.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:av,colorDecodeHook(e){if(e){if(av.store.nitroFirst&&e.themeColors)return e;let t=R2(e.bio);if(t)return iv(e,{premiumType:2,themeColors:t})}return e},addCopy3y3Button:A.wrap(function({primary:e,accent:t}){return o(N,{onClick:()=>{let n=k2(e,t);Yt(n)},color:N.Colors.PRIMARY,size:N.Sizes.XLARGE,className:G.left16},"Copy 3y3")},{noop:!0})})});var Uu,cv=m(()=>{"use strict";a();w();b();T();Uu=g({name:"FavoriteEmojiFirst",authors:[p.Aria,p.Ven],description:"Puts your favorite emoji first in the emoji autocomplete.",patches:[{find:".activeCommandOption",replacement:[{match:/=\i\(\i\.selectedIndex\);(?=.+?state:(\i),isInPopoutExperiment:\i)/,replace:"$&$self.sortEmojis($1);"},{match:/,maxCount:(\i)(.+?)=(\i)\.slice\(0,(\1-\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=pn.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)}})});var Gu,uv=m(()=>{"use strict";a();w();b();T();Gu=g({name:"FixInbox",description:"Fixes the Unreads Inbox from crashing Discord when you're in lots of guilds.",authors:[p.Megu],patches:[{find:"INBOX_OPEN:function",replacement:{match:/INBOX_OPEN:function.+?\{/,replace:"$&return true;"}}],settingsAboutComponent(){return o(v.FormSection,null,o(v.FormTitle,{tag:"h3"},"What's the problem?"),o(v.FormText,{style:{marginBottom:8}},"By default, Discord emits a GUILD_SUBSCRIPTIONS event for every guild you're in. When you're in a lot of guilds, this can cause the gateway to ratelimit you. This causes the client to crash and get stuck in an infinite ratelimit loop as it tries to reconnect."),o(v.FormTitle,{tag:"h3"},"How does it work?"),o(v.FormText,null,"This plugin works by stopping the client from sending GUILD_SUBSCRIPTIONS events to the gateway when you open the unreads inbox. This means that not all unreads will be shown, instead only already-subscribed guilds' unreads will be shown, but your client won't crash anymore."))}})});var Hu,pv=m(()=>{"use strict";a();w();b();T();Hu=g({name:"ForceOwnerCrown",description:"Force the owner crown next to usernames even if the server is large.",authors:[p.D3SOX,p.Nickyux],patches:[{find:".renderOwner=",replacement:{match:/isOwner;return null!=(\w+)?&&/g,replace:"isOwner;if($self.isGuildOwner(this.props)){$1=true;}return null!=$1&&"}}],isGuildOwner(e){if(e?.channel?.type===3)return!1;let t=e?.guildId??e?.channel?.guild_id,n=e?.user?.id;if(t&&n){let r=ue.getGuild(t);if(r)return r.ownerId===n;console.error("[ForceOwnerCrown] failed to get guild",{guildId:t,guild:r,props:e})}else console.error("[ForceOwnerCrown] no guildId or userId",{guildId:t,userId:n,props:e});return!1}})});var zu,A2,ju,dv=m(()=>{"use strict";a();_t();w();b();O();T();zu=P("createFriendInvite"),A2=P("v4","v1"),ju=g({name:"FriendInvites",description:"Create and manage friend invite links via slash commands (/create friend invite, /view friend invites, /revoke friend invites).",authors:[p.afn,p.Dziurwa],dependencies:["CommandsAPI"],commands:[{name:"create friend invite",description:"Generates a friend invite link.",inputType:3,execute:async(e,t)=>{if(!F.getCurrentUser().phone)return oe(t.channel.id,{content:"You need to have a phone number connected to your account to create a friend invite!"});let n=A2.v4(),r=await Dt.post({url:"/friend-finder/find-friends",body:{modified_contacts:{[n]:[1,"",""]},phone_contact_methods_count:1}}).then(i=>zu.createFriendInvite({code:i.body.invite_suggestions[0][3],recipient_phone_number_or_email:n,contact_visibility:1,filter_visibilities:[],filtered_invite_suggestions_index:1}));oe(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 s=(await _e("createFriendInvite").getAllFriendInvites()).map(a=>`_discord.gg/${a.code}_ - Expires: - Times used: \`${a.uses}/${a.max_uses}\``.trim().replace(/\s+/g," "));return void U(t.channel.id,{content:s.join(` - -`)||"You have no active friend invites!"})}},{name:"revoke friend invites",description:"Revokes ALL generated friend invite links.",inputType:3,execute:async(e,t)=>(await _e("createFriendInvite").revokeFriendInvites(),void U(t.channel.id,{content:"All friend links have been revoked."}))}]})});var uu,ci,zc=m(()=>{"use strict";i();pt();x();T();uu=/https?:\/\/twitter\.com(?=\/\w+?\/status\/)/g,ci=u({name:"FxTwitter",description:"Uses FxTwitter to improve embeds from twitter on send",authors:[p.Samu],dependencies:["MessageEventsAPI"],addPrefix(e){e.content=e.content.replace(uu,"https://fxtwitter.com")},start(){this.preSend=$e((e,t)=>this.addPrefix(t))},stop(){Ue(this.preSend)}})});var Bt={};ee(Bt,{clear:()=>bu,createStore:()=>Wc,del:()=>yu,delMany:()=>vu,entries:()=>Tu,get:()=>Je,getMany:()=>gu,keys:()=>Su,promisifyRequest:()=>he,set:()=>Re,setMany:()=>fu,update:()=>hu,values:()=>xu});function he(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Wc(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=he(n);return(s,a)=>r.then(c=>a(c.transaction(t,s).objectStore(t)))}function He(){return li||(li=Wc("VencordData","VencordStore")),li}function Je(e,t=He()){return t("readonly",n=>he(n.get(e)))}function Re(e,t,n=He()){return n("readwrite",r=>(r.put(t,e),he(r.transaction)))}function fu(e,t=He()){return t("readwrite",n=>(e.forEach(r=>n.put(r[1],r[0])),he(n.transaction)))}function gu(e,t=He()){return t("readonly",n=>Promise.all(e.map(r=>he(n.get(r)))))}function hu(e,t,n=He()){return n("readwrite",r=>new Promise((s,a)=>{r.get(e).onsuccess=function(){try{r.put(t(this.result),e),s(he(r.transaction))}catch(c){a(c)}}}))}function yu(e,t=He()){return t("readwrite",n=>(n.delete(e),he(n.transaction)))}function vu(e,t=He()){return t("readwrite",n=>(e.forEach(r=>n.delete(r)),he(n.transaction)))}function bu(e=He()){return e("readwrite",t=>(t.clear(),he(t.transaction)))}function pi(e,t){return e.openCursor().onsuccess=function(){!this.result||(t(this.result),this.result.continue())},he(e.transaction)}function Su(e=He()){return e("readonly",t=>{if(t.getAllKeys)return he(t.getAllKeys());let n=[];return pi(t,r=>n.push(r.key)).then(()=>n)})}function xu(e=He()){return e("readonly",t=>{if(t.getAll)return he(t.getAll());let n=[];return pi(t,r=>n.push(r.value)).then(()=>n)})}function Tu(e=He()){return e("readonly",t=>{if(t.getAll&&t.getAllKeys)return Promise.all([he(t.getAllKeys()),he(t.getAll())]).then(([r,s])=>r.map((a,c)=>[a,s[c]]));let n=[];return e("readonly",r=>pi(r,s=>n.push([s.key,s.value])).then(()=>n))})}var li,$t=m(()=>{"use strict";i();});var di={};ee(di,{_buildPopoverElements:()=>Pu,addButton:()=>Mt,buttons:()=>Xn,removeButton:()=>Rt});function Mt(e,t){Xn.set(e,t)}function Rt(e){Xn.delete(e)}function Pu(e,t){let n=[];for(let[r,s]of Xn.entries())try{let a=s(e);a&&(a.key??=r,n.push(t(a)))}catch(a){wu.error(`[${r}]`,a)}return n}var wu,Xn,fn=m(()=>{"use strict";i();le();wu=new N("MessagePopover"),Xn=new Map});var gn,Kc,ku,Iu,hn,qc,Mu,mi,Yc=m(()=>{"use strict";i();$t();fn();x();T();k();Kc="HideAttachments_HiddenIds",ku=()=>o("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},o("path",{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"})),Iu=()=>o("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},o("path",{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"})),hn=new Set,qc=()=>Je(Kc).then(e=>(hn=e??new Set,hn)),Mu=e=>Re(Kc,e),mi=u({name:"HideAttachments",description:"Hide attachments and Embeds for individual messages via hover button",authors:[p.Ven],dependencies:["MessagePopoverAPI"],async start(){gn=document.createElement("style"),gn.id="VencordHideAttachments",document.head.appendChild(gn),await qc(),await this.buildCss(),Mt("HideAttachments",e=>{if(!e.attachments.length&&!e.embeds.length)return null;let t=hn.has(e.id);return{label:t?"Show Attachments":"Hide Attachments",icon:t?ku:Iu,message:e,channel:ae.getChannel(e.channel_id),onClick:()=>this.toggleHide(e.id)}})},stop(){gn.remove(),hn.clear(),Rt("HideAttachments")},async buildCss(){let e=[...hn].map(t=>`#message-accessories-${t}`).join(",");gn.textContent=` + `.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 zu.getAllFriendInvites()).map(i=>` + _discord.gg/${i.code}_ \xB7 + Expires: \xB7 + Times used: \`${i.uses}/${i.max_uses}\` + `.trim().replace(/\s+/g," "));oe(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 zu.revokeFriendInvites(),void oe(t.channel.id,{content:"All friend invites have been revoked."}))}]})});var qu={};ge(qu,{getSettingStore:()=>mv,getSettingStoreLazy:()=>Wu});function mv(e,t){if(!M.plugins.SettingsStoreAPI.enabled)throw new Error("Cannot use SettingsStoreAPI without setting as dependency.");return L2?.find(n=>n?.settingsStoreApiGroup===e&&n?.settingsStoreApiName===t)}function Wu(e,t){return dt(()=>mv(e,t))}var L2,Ku=m(()=>{"use strict";a();sn();be();O();D();L2=dt(()=>{let e=os('"textAndImages","renderSpoilers"');if(e==null)return new Y("SettingsStoreAPI").error("Didn't find stores module.");let t=Gt(e);if(t!=null)return Object.values(t).filter(n=>n?.settingsStoreApiGroup)})});var Yu,fv=m(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/gameActivityToggle/style.css",{name:"src/plugins/gameActivityToggle/style.css",source:`[class*="withTagAsButton"] { + min-width: 88px; +} +`,classNames:{},dom:null});Yu="src/plugins/gameActivityToggle/style.css"});function D2(e){return function(){return o("svg",{width:"24",height:"24",viewBox:"0 96 960 960"},o("path",{fill:"currentColor",d:"M182 856q-51 0-79-35.5T82 734l42-300q9-60 53.5-99T282 296h396q60 0 104.5 39t53.5 99l42 300q7 51-21 86.5T778 856q-21 0-39-7.5T706 826l-90-90H344l-90 90q-15 15-33 22.5t-39 7.5Zm498-240q17 0 28.5-11.5T720 576q0-17-11.5-28.5T680 536q-17 0-28.5 11.5T640 576q0 17 11.5 28.5T680 616Zm-80-120q17 0 28.5-11.5T640 456q0-17-11.5-28.5T600 416q-17 0-28.5 11.5T560 456q0 17 11.5 28.5T600 496ZM310 616h60v-70h70v-60h-70v-70h-60v70h-70v60h70v70Z"}),!e&&o("line",{x1:"920",y1:"280",x2:"40",y2:"880",stroke:"var(--status-danger)","stroke-width":"80"}))}}function O2(){let e=gv?.useSetting();return o(E2,{tooltipText:e?"Disable Game Activity":"Enable Game Activity",icon:D2(e),role:"switch","aria-checked":!e,onClick:()=>gv?.updateSetting(t=>!t)})}var gv,E2,Zu,hv=m(()=>{"use strict";a();Ku();Ge();ie();w();b();O();fv();gv=Wu("status","showCurrentGame"),E2=ce("Button.Sizes.NONE,disabled:");Zu=g({name:"GameActivityToggle",description:"Adds a button next to the mic and deafen button to toggle game activity.",authors:[p.Nuckyz],dependencies:["SettingsStoreAPI"],patches:[{find:".Messages.ACCOUNT_SPEAKING_WHILE_MUTED",replacement:{match:/this\.renderNameZone\(\).+?children:\[/,replace:"$&$self.GameActivityToggleButton(),"}}],GameActivityToggleButton:A.wrap(O2,{noop:!0}),start(){Je(Yu)},stop(){Mt(Yu)}})});var _2,Xu,yv=m(()=>{"use strict";a();w();tt();b();O();_2=Ke('name:"expression-picker-last-active-view"',{close:K.byCode("activeView:null","setState")}),Xu=g({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=function.+?\{/,replace:".handleSelectGIF=function(gif){return $self.handleSelect(gif);"}}],handleSelect(e){e&&(Hn(e.url+" "),_2.close())}})});var Ju={};ge(Ju,{_buildPopoverElements:()=>F2,addButton:()=>bn,buttons:()=>ra,removeButton:()=>Tn});function bn(e,t){ra.set(e,t)}function Tn(e){ra.delete(e)}function F2(e,t){let n=[];for(let[r,i]of ra.entries())try{let s=i(e);s&&(s.key??=r,n.push(t(s)))}catch(s){B2.error(`[${r}]`,s)}return n}var B2,ra,Ko=m(()=>{"use strict";a();be();B2=new Y("MessagePopover"),ra=new Map});var gi,Sv,hi,vv,$2,Qu,bv=m(()=>{"use strict";a();Cn();Ko();_n();w();b();T();Sv="HideAttachments_HiddenIds",hi=new Set,vv=()=>Qe(Sv).then(e=>(hi=e??new Set,hi)),$2=e=>Ve(Sv,e),Qu=g({name:"HideAttachments",description:"Hide attachments and Embeds for individual messages via hover button",authors:[p.Ven],dependencies:["MessagePopoverAPI"],async start(){gi=document.createElement("style"),gi.id="VencordHideAttachments",document.head.appendChild(gi),await vv(),await this.buildCss(),bn("HideAttachments",e=>{if(!e.attachments.length&&!e.embeds.length)return null;let t=hi.has(e.id);return{label:t?"Show Attachments":"Hide Attachments",icon:t?Zs:Xs,message:e,channel:Z.getChannel(e.channel_id),onClick:()=>this.toggleHide(e.id)}})},stop(){gi.remove(),hi.clear(),Tn("HideAttachments")},async buildCss(){let e=[...hi].map(t=>`#message-accessories-${t}`).join(",");gi.textContent=` :is(${e}) [class*="embedWrapper"] { /* important is not necessary, but add it to make sure bad themes won't break it */ display: none !important; @@ -49,362 +60,209 @@ ${Gn(c)}`,author:{username:"Vencord"}})};try{let s=e.execute(t,n);return s insta color: var(--text-muted); font-size: 80%; } - `},async toggleHide(e){let t=await qc();t.delete(e)||t.add(e),await Mu(t),await this.buildCss(),I.dispatch({type:"MESSAGE_UPDATE",message:{id:e}})}})});var ui,Qc=m(()=>{"use strict";i();x();T();ui=u({name:"iLoveSpam",description:"Do not hide messages from 'likely spammers'",authors:[p.botato,p.Animal],patches:[{find:"),{hasFlag:",replacement:{match:/(if\((.{1,2})<=1<<30\)return)/,replace:"if($2===(1<<20)){return false};$1"}}]})});var fi,Se,gi,Jc=m(()=>{"use strict";i();$t();x();T();L();fi=M("IgnoreActivities_reRenderGames"),Se=[],gi=u({name:"IgnoreActivities",authors:[p.Nuckyz],description:"Ignore certain activities (like games) from showing up on your status. You can configure which ones are ignored from the Registered Games tab.",patches:[{find:".Messages.SETTINGS_GAMES_OVERLAY_ON",replacement:[{match:/;(.\.renderOverlayToggle=function\(\).+?\)};)/,replace:(e,t)=>{let n=[{match:/,.{1,2}=.{1,2}\.overlayWarn/,replace:""},{match:/,.{1,2}=.{1,2}\?\(0,.{1,2}\.jsx\)\(.{1,20}Messages\.SETTINGS_GAMES_OVERLAY_WARNING.{1,100}null/,replace:""},{match:/,.{1,2}=.{1,2}\?.{1,50}Messages\.SETTINGS_GAMES_OVERLAY_OFF/,replace:""},{match:/[^[]{1,2},\(0,.{1,2}\.jsx\)\("div".{1,20}\(\)\.overlayStatusText.+}\),/,replace:""},{match:/renderOverlayToggle/,replace:"renderIgnoreActivitiesToggle"},{match:/((.)=this\.props\.game)(.{1,70})=.{1,2}overlay/,replace:"$1,IgnoreActivities_gameProps=$2$3=Vencord.Plugins.plugins.IgnoreActivities.isActivityEnabled(IgnoreActivities_gameProps)"},{match:/.\.handleOverlayToggle/,replace:"() => Vencord.Plugins.plugins.IgnoreActivities.handleActivityToggle(IgnoreActivities_gameProps)"},{match:/(\(0,.{1,2}\.jsx\)\()(.{2})\..(.{1,50}\.overlayToggleIconOn)/,replace:"$1$2.IgnoreActivities_toggleOn$3"},{match:/(\(0,.{1,2}\.jsx\)\()(.{2})\..{1}(.{1,50}\.overlayToggleIconOff)/,replace:"$1$2.IgnoreActivities_toggleOff$3"},{match:/text:.{2}\..\.Messages\.SETTINGS_GAMES_TOGGLE_OVERLAY/,replace:'text:"Toggle activity"'},{match:/"aria-label":.{2}\..\.Messages\.SETTINGS_GAMES_TOGGLE_OVERLAY/,replace:'"aria-label":"Toggle activity"'}].reduce((r,{match:s,replace:a})=>r.replace(s,a),t);return`;${t}${n}`}},{match:/(this.renderLastPlayed\(\)]}\),this.renderOverlayToggle\(\))/,replace:"$1,this.renderIgnoreActivitiesToggle()"}]},{find:'.displayName="RunningGameStore"',replacement:{match:/(.:\(\)=>.{2})(.+function (.{2})\(\){.+\.dispatch\({type:"RUNNING_GAMES_CHANGE")/,replace:"$1,IgnoreActivities_reRenderGames:()=>$3$2"}},{find:"M8.67872 19H11V21H7V23H17V21H13V19H20C21.103 19 22 18.104 22 17V6C22 5.89841 21.9924 5.79857 21.9777 5.70101L20 7.67872V15H12.6787L8.67872 19ZM13.1496 6H4V15H4.14961L2.00515 17.1445C2.00174 17.0967 2 17.0486 2 17V6C2 4.897 2.897 4 4 4H15.1496L13.1496 6Z",replacement:{match:/(.:\(\)=>.)(.+)(function (.)\(.{1,10}\.width.+\)\)})/s,replace:(e,t,n,r)=>{let s=[{match:/function ./,replace:"function IgnoreActivities_toggleOffToExport"},{match:/M8.67872 19H11V21H7V23H17V21H13V19H20C21.103 19 22 18.104 22 17V6C22 5.89841 21.9924 5.79857 21.9777 5.70101L20 7.67872V15H12.6787L8.67872 19ZM13.1496 6H4V15H4.14961L2.00515 17.1445C2.00174 17.0967 2 17.0486 2 17V6C2 4.897 2.897 4 4 4H15.1496L13.1496 6Z/,replace:"M 16 8 C 7.664063 8 1.25 15.34375 1.25 15.34375 L 0.65625 16 L 1.25 16.65625 C 1.25 16.65625 7.097656 23.324219 14.875 23.9375 C 15.246094 23.984375 15.617188 24 16 24 C 16.382813 24 16.753906 23.984375 17.125 23.9375 C 24.902344 23.324219 30.75 16.65625 30.75 16.65625 L 31.34375 16 L 30.75 15.34375 C 30.75 15.34375 24.335938 8 16 8 Z M 16 10 C 18.203125 10 20.234375 10.601563 22 11.40625 C 22.636719 12.460938 23 13.675781 23 15 C 23 18.613281 20.289063 21.582031 16.78125 21.96875 C 16.761719 21.972656 16.738281 21.964844 16.71875 21.96875 C 16.480469 21.980469 16.242188 22 16 22 C 15.734375 22 15.476563 21.984375 15.21875 21.96875 C 11.710938 21.582031 9 18.613281 9 15 C 9 13.695313 9.351563 12.480469 9.96875 11.4375 L 9.9375 11.4375 C 11.71875 10.617188 13.773438 10 16 10 Z M 16 12 C 14.34375 12 13 13.34375 13 15 C 13 16.65625 14.34375 18 16 18 C 17.65625 18 19 16.65625 19 15 C 19 13.34375 17.65625 12 16 12 Z M 7.25 12.9375 C 7.09375 13.609375 7 14.285156 7 15 C 7 16.753906 7.5 18.394531 8.375 19.78125 C 5.855469 18.324219 4.105469 16.585938 3.53125 16 C 4.011719 15.507813 5.351563 14.203125 7.25 12.9375 Z M 24.75 12.9375 C 26.648438 14.203125 27.988281 15.507813 28.46875 16 C 27.894531 16.585938 26.144531 18.324219 23.625 19.78125 C 24.5 18.394531 25 16.753906 25 15 C 25 14.285156 24.90625 13.601563 24.75 12.9375 Z"},{match:/viewBox:"0 0 24 24"/,replace:'viewBox:"0 0 32 26"'},{match:/x:"2"/,replace:'x:"3"'},{match:/y:"20"/,replace:'y:"26"'}].reduce((a,{match:c,replace:f})=>a.replace(c,f),r);return`${t},IgnoreActivities_toggleOff:()=>IgnoreActivities_toggleOffToExport${n}${r}${s}`}}},{find:"M4 2.5C2.897 2.5 2 3.397 2 4.5V15.5C2 16.604 2.897 17.5 4 17.5H11V19.5H7V21.5H17V19.5H13V17.5H20C21.103 17.5 22 16.604 22 15.5V4.5C22 3.397 21.103 2.5 20 2.5H4ZM20 4.5V13.5H4V4.5H20Z",replacement:{match:/(.:\(\)=>.)(.+)(function (.)\(.{1,10}\.width.+\)\)})/,replace:(e,t,n,r)=>{let s=[{match:/function ./,replace:"function IgnoreActivities_toggleOnToExport"},{match:/M4 2.5C2.897 2.5 2 3.397 2 4.5V15.5C2 16.604 2.897 17.5 4 17.5H11V19.5H7V21.5H17V19.5H13V17.5H20C21.103 17.5 22 16.604 22 15.5V4.5C22 3.397 21.103 2.5 20 2.5H4ZM20 4.5V13.5H4V4.5H20Z/,replace:"M 16 8 C 7.664063 8 1.25 15.34375 1.25 15.34375 L 0.65625 16 L 1.25 16.65625 C 1.25 16.65625 7.097656 23.324219 14.875 23.9375 C 15.246094 23.984375 15.617188 24 16 24 C 16.382813 24 16.753906 23.984375 17.125 23.9375 C 24.902344 23.324219 30.75 16.65625 30.75 16.65625 L 31.34375 16 L 30.75 15.34375 C 30.75 15.34375 24.335938 8 16 8 Z M 16 10 C 18.203125 10 20.234375 10.601563 22 11.40625 C 22.636719 12.460938 23 13.675781 23 15 C 23 18.613281 20.289063 21.582031 16.78125 21.96875 C 16.761719 21.972656 16.738281 21.964844 16.71875 21.96875 C 16.480469 21.980469 16.242188 22 16 22 C 15.734375 22 15.476563 21.984375 15.21875 21.96875 C 11.710938 21.582031 9 18.613281 9 15 C 9 13.695313 9.351563 12.480469 9.96875 11.4375 L 9.9375 11.4375 C 11.71875 10.617188 13.773438 10 16 10 Z M 16 12 C 14.34375 12 13 13.34375 13 15 C 13 16.65625 14.34375 18 16 18 C 17.65625 18 19 16.65625 19 15 C 19 13.34375 17.65625 12 16 12 Z M 7.25 12.9375 C 7.09375 13.609375 7 14.285156 7 15 C 7 16.753906 7.5 18.394531 8.375 19.78125 C 5.855469 18.324219 4.105469 16.585938 3.53125 16 C 4.011719 15.507813 5.351563 14.203125 7.25 12.9375 Z M 24.75 12.9375 C 26.648438 14.203125 27.988281 15.507813 28.46875 16 C 27.894531 16.585938 26.144531 18.324219 23.625 19.78125 C 24.5 18.394531 25 16.753906 25 15 C 25 14.285156 24.90625 13.601563 24.75 12.9375 Z"},{match:/viewBox:"0 0 24 24"/,replace:'viewBox:"0 0 32 26"'}].reduce((a,{match:c,replace:f})=>a.replace(c,f),r);return`${t},IgnoreActivities_toggleOn:()=>IgnoreActivities_toggleOnToExport${n}${r}${s}`}}},{find:'.displayName="LocalActivityStore"',replacement:{match:/((.)\.push\(.\({type:.\..{1,3}\.LISTENING.+?;)/,replace:"$1$2=$2.filter(Vencord.Plugins.plugins.IgnoreActivities.isActivityEnabled);"}}],async start(){if(Se=await Je("IgnoreActivities_ignoredActivities")??[],Se.length!==0){let e=fi.Z.getGamesSeen();for(let[t,n]of Se.entries())e.some(r=>r.id!==void 0&&r.id===n||r.exePath===n)||Se.splice(t,1);await Re("IgnoreActivities_ignoredActivities",Se)}},isActivityEnabled(e){if("type"in e){if(e.application_id!==void 0)return!Se.includes(e.application_id);{let t=fi.Z.getRunningGames().find(n=>n.name===e.name)?.exePath;if(t)return!Se.includes(t)}}else if("exePath"in e)return e.id!==void 0?!Se.includes(e.id):!Se.includes(e.exePath);return!0},async handleActivityToggle(e){let t=e.id??e.exePath;t!==void 0&&(Se.includes(t)?Se.splice(Se.indexOf(t,1)):Se.push(t),fi.IgnoreActivities_reRenderGames(),await Re("IgnoreActivities_ignoredActivities",Se))}})});var hi,Xc=m(()=>{"use strict";i();$t();x();T();k();hi=u({name:"KeepCurrentChannel",description:"Attempt to navigate the channel you were in before switching accounts or loading Discord.",authors:[p.Nuckyz],isSwitchingAccount:!1,previousCache:{},attemptToNavigateToChannel(e,t){!ae.hasChannel(t)||Ko.transitionTo(`/channels/${e??"@me"}/${t}`)},onLogout(e){this.isSwitchingAccount=e.isSwitchingAccount},onConnectionOpen(){!this.isSwitchingAccount||(this.isSwitchingAccount=!1,this.previousCache.channelId&&this.attemptToNavigateToChannel(this.previousCache.guildId,this.previousCache.channelId))},async onChannelSelect({guildId:e,channelId:t}){this.isSwitchingAccount||(this.previousCache={guildId:e,channelId:t},await Re("KeepCurrentChannel_previousData",this.previousCache))},async start(){let e=await Je("KeepCurrentChannel_previousData");e?(this.previousCache=e,this.previousCache.channelId&&this.attemptToNavigateToChannel(this.previousCache.guildId,this.previousCache.channelId)):(this.previousCache={guildId:Un.getGuildId(),channelId:pe.getChannelId()??null},await Re("KeepCurrentChannel_previousData",this.previousCache)),I.subscribe("LOGOUT",this.onLogout.bind(this)),I.subscribe("CONNECTION_OPEN",this.onConnectionOpen.bind(this)),I.subscribe("CHANNEL_SELECT",this.onChannelSelect.bind(this))},stop(){I.unsubscribe("LOGOUT",this.onLogout),I.unsubscribe("CONNECTION_OPEN",this.onConnectionOpen),I.unsubscribe("CHANNEL_SELECT",this.onChannelSelect)}})});async function yi(e){return(await Cu.getAsset(bi,[e,void 0]))[0]}function vi(e){I.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e})}var bi,Ru,Cu,Si,Zc=m(()=>{"use strict";i();R();wt();x();T();L();k();bi="1043533871037284423",Ru=M("getLocalPresence"),Cu=Me("getAssetImage: size must === [number, number] for Twitch",{getAsset:E.byCode("apply(")});Si=u({name:"LastFMRichPresence",description:"Little plugin for Last.fm rich presence",authors:[p.dzshn],settingsAboutComponent:()=>o(l,null,o(y.FormTitle,{tag:"h3"},"How to get an API key"),o(y.FormText,null,"An API key is required to fetch your current track. To get one, you can visit ",o(Pe,{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!)")),options:{username:{description:"last.fm username",type:0},apiKey:{description:"last.fm api key",type:0},hideWithSpotify:{description:"hide last.fm presence if spotify is running",type:3,default:!0},useListeningStatus:{description:'show "Listening to" status instead of "Playing"',type:3,default:!1}},start(){this.settings=S.plugins.LastFMRichPresence,this.updateInterval=setInterval(()=>{this.updatePresence()},16e3)},stop(){clearInterval(this.updateInterval)},async fetchTrackData(){if(!this.settings.username||!this.settings.apiKey)return null;let t=(await(await fetch(`https://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&api_key=${this.settings.apiKey}&user=${this.settings.username}&limit=1&format=json`)).json()).recenttracks.track[0];return t["@attr"]?.nowplaying?{name:t.name||"Unknown",album:t.album["#text"],artist:t.artist["#text"]||"Unknown",url:t.url,imageUrl:(t.image||[]).filter(n=>n.size==="large")[0]?.["#text"]}:null},async updatePresence(){if(this.settings.hideWithSpotify){for(let r of Ru.getActivities())if(r.type===2&&r.application_id!==bi){vi();return}}let e=await this.fetchTrackData();if(!e){vi();return}let t=!e.album||e.album===e.name,n;e.imageUrl?n={large_image:await yi(e.imageUrl),large_text:e.name,small_image:await yi("lastfm-small"),small_text:"Last.fm"}:n={large_image:await yi("lastfm-large"),large_text:"Last.fm"},vi({application_id:bi,name:"some music",details:e.name,state:t?e.artist:`${e.artist} - ${e.album}`,assets:n,buttons:["Open in Last.fm"],metadata:{button_urls:[e.url]},type:this.settings.useListeningStatus?2:0,flags:1})}})});var Vc,xi,el=m(()=>{"use strict";i();x();T();Vc=["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"],xi=u({name:"LoadingQuotes",description:"Replace Discords loading quotes",authors:[p.Ven,p.KraXen72],patches:[{find:".LOADING_DID_YOU_KNOW",replacement:{match:/\._loadingText=.+?random\(.+?;/s,replace:"._loadingText=Vencord.Plugins.plugins.LoadingQuotes.quote;"}}],xor(e){let t="read if cute",n=Array.from(e,(r,s)=>r.charCodeAt(0)^s%t.length);return String.fromCharCode(...n)},get quote(){return this.xor(Vc[Math.floor(Math.random()*Vc.length)])}})});var Ti={};ee(Ti,{getCurrentChannel:()=>Zn,getCurrentGuild:()=>Au,openPrivateChannel:()=>_u});function Zn(){return ae.getChannel(pe.getChannelId())}function Au(){return qe.getGuild(Zn()?.guild_id)}function _u(e){Go.openPrivateChannel(e)}var wi=m(()=>{"use strict";i();k()});function Lu(){let e=Zn().guild_id,t=Pi[e];if(tl=ct(),!t)return null;let n=String(t[0]);return n==="0"&&t[1]>0&&(n="Loading..."),o(Z,{id:"vc-membercount",style:{marginTop:"1em",marginBottom:"-.5em",paddingInline:"1em",justifyContent:"center",alignContent:"center",gap:0}},o(me,{text:`${t[1]} Online`,position:"bottom"},r=>o("div",{...r},o("span",{style:{backgroundColor:"var(--status-green-600)",width:"12px",height:"12px",borderRadius:"50%",display:"inline-block",marginRight:"0.5em"}}),o("span",{style:{color:"var(--status-green-600)"}},t[1]))),o(me,{text:`${t[0]||"?"} Total Members`,position:"bottom"},r=>o("div",{...r},o("span",{style:{width:"6px",height:"6px",borderRadius:"50%",border:"3px solid var(--status-grey-500)",display:"inline-block",marginRight:"0.5em",marginLeft:"1em"}}),o("span",{style:{color:"var(--status-grey-500)"}},n))))}var Pi,tl,ki,nl=m(()=>{"use strict";i();ne();Ne();x();wi();O();T();k();Pi={};ki=u({name:"MemberCount",description:"Shows the amount of online & total members in the server member list",authors:[p.Ven],patches:[{find:".isSidebarVisible,",replacement:{match:/(var (.)=.\.className.+?children):\[(.\.useMemo[^}]+"aria-multiselectable")/,replace:"$1:[$2.startsWith('members')?Vencord.Plugins.plugins.MemberCount.render():null,$3"}}],onGuildMemberListUpdate({guildId:e,groups:t,memberCount:n,id:r}){if(r!=="everyone"&&Pi[e])return;let s=0;for(let a of t)a.id!=="offline"&&(s+=a.count);Pi[e]=[n,s],tl?.()},start(){I.subscribe("GUILD_MEMBER_LIST_UPDATE",this.onGuildMemberListUpdate)},stop(){I.unsubscribe("GUILD_MEMBER_LIST_UPDATE",this.onGuildMemberListUpdate)},render:()=>o(D,{noop:!0},o(Lu,null))})});var Ii,ol,rl,Mi,il=m(()=>{"use strict";i();pt();R();x();T();L();k();Ii=!1,ol=e=>e.key==="Backspace"&&(Ii=!0),rl=e=>e.key==="Backspace"&&(Ii=!1);X("MessageClickActions","MessageQuickActions");Mi=u({name:"MessageClickActions",description:"Hold Delete and click to delete, double click to edit",authors:[p.Ven],dependencies:["MessageEventsAPI"],start(){let e=M("deleteMessage","startEditMessage"),t=M("can","initialize"),n=Ae(s=>typeof s.MANAGE_MESSAGES=="bigint"),r=M("isEditing","isEditingAny");document.addEventListener("keydown",ol),document.addEventListener("keyup",rl),this.onClick=Or((s,a,c)=>{let f=s.author.id===G.getCurrentUser().id;Ii?(f||t.can(n.MANAGE_MESSAGES,a))&&(e.deleteMessage(a.id,s.id),c.preventDefault()):f&&c.detail>=2&&!r.isEditing(a.id,s.id)&&(e.startEditMessage(a.id,s.id,s.content),c.preventDefault())})},stop(){Br(this.onClick),document.removeEventListener("keydown",ol),document.removeEventListener("keyup",rl)}})});function sl(){S.plugins.MessageLogger.deleteStyle==="text"?(document.body.classList.remove("messagelogger-red-overlay"),document.body.classList.add("messagelogger-red-text")):(document.body.classList.remove("messagelogger-red-text"),document.body.classList.add("messagelogger-red-overlay"))}var Ri,al=m(()=>{"use strict";i();R();ne();x();le();T();L();k();Ri=u({name:"MessageLogger",description:"Temporarily logs deleted and edited messages.",authors:[p.rushii,p.Ven],timestampModule:null,moment:null,css:` - .messagelogger-red-overlay .messageLogger-deleted { - background-color: rgba(240, 71, 71, 0.15); - } - .messagelogger-red-text .messageLogger-deleted div { - color: #f04747; - } - - .messageLogger-deleted [class^="buttons"] { - display: none; - } - - .messageLogger-deleted-attachment { - filter: grayscale(1); - } - - .messageLogger-deleted-attachment:hover { - filter: grayscale(0); - transition: 250ms filter linear; - } - - .theme-dark .messageLogger-edited { - filter: brightness(80%); - } - - .theme-light .messageLogger-edited { - opacity: 0.5; - } - `,start(){this.moment=M("relativeTimeRounding","relativeTimeThreshold"),this.timestampModule=M("messageLogger_TimestampComponent");let e=this.style=document.createElement("style");e.textContent=this.css,e.id="MessageLogger-css",document.head.appendChild(e),sl()},stop(){this.style?.remove(),document.querySelectorAll(".messageLogger-deleted").forEach(e=>e.remove()),document.querySelectorAll(".messageLogger-edited").forEach(e=>e.remove()),document.body.classList.remove("messagelogger-red-overlay"),document.body.classList.remove("messagelogger-red-text")},renderEdit(e){let t=this.timestampModule.messageLogger_TimestampComponent;return o(D,{noop:!0},o("div",{className:"messageLogger-edited"},Ke.parse(e.content),o(t,{timestamp:e.timestamp,isEdited:!0,isInline:!1},o("span",null," ","(edited)"))))},makeEdit(e,t){return{timestamp:this.moment?.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:()=>sl()},ignoreBots:{type:3,description:"Whether to ignore messages by bots",default:!1},ignoreSelf:{type:3,description:"Whether to ignore messages by yourself",default:!1}},handleDelete(e,t,n){try{let f=function(d){let v=e.get(d);if(!v)return;let h=64;(v.flags&h)===h||s&&v.author?.bot||a&&v.author?.id===c?e=e.remove(d):e=e.update(d,w=>w.set("deleted",!0).set("attachments",w.attachments.map(P=>(P.deleted=!0,P))))};var r=f;if(e==null||!n&&!e.has(t.id))return e;let{ignoreBots:s,ignoreSelf:a}=S.plugins.MessageLogger,c=G.getCurrentUser().id;n?t.ids.forEach(f):f(t.id)}catch(s){new N("MessageLogger").error("Error during handleDelete",s)}return e},patches:[{find:'displayName="MessageStore"',replacement:[{match:/MESSAGE_DELETE:function\((\w)\){var .+?((?:\w{1,2}\.){2})getOrCreate.+?},/,replace:"MESSAGE_DELETE:function($1){ var cache = $2getOrCreate($1.channelId); cache = Vencord.Plugins.plugins.MessageLogger.handleDelete(cache, $1, false); $2commit(cache);},"},{match:/MESSAGE_DELETE_BULK:function\((\w)\){var .+?((?:\w{1,2}\.){2})getOrCreate.+?},/,replace:"MESSAGE_DELETE_BULK:function($1){ var cache = $2getOrCreate($1.channelId); cache = Vencord.Plugins.plugins.MessageLogger.handleDelete(cache, $1, true); $2commit(cache);},"},{match:/(MESSAGE_UPDATE:function\((\w)\).+?)\.update\((\w)/,replace:"$1.update($3,m => $2.message.content !== m.editHistory?.[0]?.content && $2.message.content !== m.content ? m.set('editHistory',[...(m.editHistory || []), Vencord.Plugins.plugins.MessageLogger.makeEdit($2.message, m)]) : m).update($3"}]},{find:"isFirstMessageInForumPost=function",replacement:[{match:/(\w)\.customRenderedContent=(\w)\.customRenderedContent;/,replace:"$1.customRenderedContent = $2.customRenderedContent;$1.deleted = $2.deleted || false;$1.editHistory = $2.editHistory || [];"}]},{find:"THREAD_STARTER_MESSAGE?null===",replacement:[{match:/interactionData:(\w)\.interactionData/,replace:"interactionData:$1.interactionData,deleted:$1.deleted,editHistory:$1.editHistory,attachments:$1.attachments"},{match:/attachments:(\w{1,2})\((\w)\)/,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:/(\((\w)\){return null==\2\.attachments.+?)spoiler:/,replace:"$1deleted: arguments[0]?.deleted,spoiler:"}]},{find:'["className","attachment","inlineMedia"]',replacement:[{match:/((\w)\.className,\w=\2\.attachment),/,replace:"$1,deleted=$2.attachment?.deleted,"},{match:/(hiddenSpoilers:\w,className:)/,replace:"$1 (deleted ? 'messageLogger-deleted-attachment ' : '') +"}]},{find:"Message must not be a thread starter message",replacement:[{match:/var (\w)=(\w).id,(?=\w=\w.message)/,replace:"var $1=$2.id,deleted=$2.message.deleted,"},{match:/\)\("li",\{(.+?),className:/,replace:')("li",{$1,className:(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 => Vencord.Plugins.plugins.MessageLogger.renderEdit(edit)) : null), "}]},{find:'displayName="ReferencedMessageStore"',replacement:[{match:/MESSAGE_DELETE:function\((\w)\).+?},/,replace:"MESSAGE_DELETE:function($1){},"},{match:/MESSAGE_DELETE_BULK:function\((\w)\).+?},/,replace:"MESSAGE_DELETE_BULK:function($1){},"}]},{find:"Messages.MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL.format",replacement:{match:/{(\w{1,2}:\(\)=>(\w{1,2}))}/,replace:"{$1,messageLogger_TimestampComponent:()=>$2}"}},{find:'id:"remove-reactions"',replacement:[{match:/children:(\[""===.+?\])/,replace:"children:arguments[0].message.deleted?[]:$1"}]}]})});function cl(e){Nt({name:e.name,description:e.name,inputType:1,execute:async(t,n)=>await Vn(e.name)?(S.plugins.MessageTags.clyde&&U(n.channel.id,{author:Xe,content:`${ft} The tag **${e.name}** has been sent!`}),{content:e.message.replaceAll("\\n",` -`)}):(U(n.channel.id,{author:Xe,content:`${ft} The tag **${e.name}** does not exist anymore! Please reload ur Discord to fix :)`}),{content:`/${e.name}`}),[Eu]:!0},"CustomTags")}var ft,to,Eu,Xe,eo,Vn,Fu,Du,Ci,ll=m(()=>{"use strict";i();be();$t();R();x();T();ft="<:luna:1035316192220553236>",to="MessageTags_TAGS",Eu=Symbol("MessageTags"),Xe={id:"821472922140803112",bot:!1},eo=()=>Je(to).then(e=>e??[]),Vn=e=>Je(to).then(t=>(t??[]).find(n=>n.name===e)??null),Fu=async e=>{let t=await eo();return t.push(e),Re(to,t),t},Du=async e=>{let t=await eo();return t=await t.filter(n=>n.name!==e),Re(to,t),t};Ci=u({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 eo())cl(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=ce(e[0].options,"tag-name",""),r=ce(e[0].options,"message","");if(await Vn(n))return U(t.channel.id,{author:Xe,content:`${ft} A Tag with the name **${n}** already exists!`});let s={name:n,enabled:!0,message:r};cl(s),await Fu(s),U(t.channel.id,{author:Xe,content:`${ft} Successfully created the tag **${n}**!`});break}case"delete":{let n=ce(e[0].options,"tag-name","");if(!await Vn(n))return U(t.channel.id,{author:Xe,content:`${ft} A Tag with the name **${n}** does not exist!`});un(n),await Du(n),U(t.channel.id,{author:Xe,content:`${ft} Successfully deleted the tag **${n}**!`});break}case"list":{U(t.channel.id,{author:Xe,embeds:[{title:"All Tags:",description:(await eo()).map(n=>`\`${n.name}\`: ${n.message.slice(0,72).replaceAll("\\n"," ")}${n.message.length>72?"...":""}`).join(` -`)||`${ft} Woops! There are no tags yet, use \`/tags create\` to create one!`,color:14122879,type:"rich"}]});break}case"preview":{let n=ce(e[0].options,"tag-name",""),r=await Vn(n);if(!r)return U(t.channel.id,{author:Xe,content:`${ft} A Tag with the name **${n}** does not exist!`});U(t.channel.id,{author:Xe,content:r.message.replaceAll("\\n",` -`)});break}}return U(t.channel.id,{author:Xe,content:"Invalid sub-command"})}}]})});function Nu(e){let t="";for(let n=0;n{"use strict";i();be();x();T();Ai=u({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:[ut],inputType:3,execute:(e,t)=>{let n=ce(e,"message","");U(t.channel.id,{content:n})}},{name:"lenny",description:"Sends a lenny face",options:[ut],execute:e=>({content:ce(e,"message","")+" ( \u0361\xB0 \u035C\u0296 \u0361\xB0)"})},{name:"mock",description:"mOcK PeOpLe",options:[It],execute:e=>({content:Nu(ce(e,"message",""))})}]})});var _i,dl=m(()=>{"use strict";i();be();R();x();T();X("MoreKaomoji","moarKaomojis");_i=u({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)>"}].map(e=>({...e,options:[ut],execute:t=>({content:ce(t,"message","")+e.description})}))})});function Bu(e,t){let n=0,r=0;for(;(r=e.indexOf(t,r)+1)!==0;)n++;return n}function $u(e,t){if(!t.global)throw new Error("pattern must be global");let n=0;for(;t.test(e);)n++;return n}function Hu(e){let t=Bu(e,Ei)+$u(e,Uu);return Math.min(t,10)}function Li(){if(!S.plugins.Moyai.triggerWhenUnfocused&&!document.hasFocus())return;let e=document.createElement("audio");e.src=Ou,e.volume=S.plugins.Moyai.volume,e.play()}var Ei,Ou,Fi,Uu,ml=m(()=>{"use strict";i();R();Jn();x();O();T();k();Ei="\u{1F5FF}",Ou="https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai.mp3",Fi=u({name:"Moyai",authors:[p.Megu,p.Nuckyz],description:"\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}",async onMessage(e){if(e.optimistic||e.type!=="MESSAGE_CREATE"||e.message.state==="SENDING"||S.plugins.Moyai.ignoreBots&&e.message.author?.bot||!e.message.content||e.channelId!==pe.getChannelId())return;let t=Hu(e.message.content);for(let n=0;n/gi});var Di,ul=m(()=>{"use strict";i();x();T();Di=u({name:"MuteNewGuild",description:"Mutes newly joined guilds",authors:[p.Glitch],patches:[{find:",acceptInvite:function",replacement:{match:/(\w=null!==[^;]+)/,replace:"$1;Vencord.Webpack.findByProps('updateGuildNotificationSettings').updateGuildNotificationSettings($1,{'muted':true,'suppress_everyone':true,'suppress_roles':true})"}}]})});var ju,Ni,fl=m(()=>{"use strict";i();R();x();T();L();ju=M("getRelationships","isBlocked"),Ni=u({name:"NoBlockedMessages",description:"Hides all blocked messages from chat completely.",authors:[p.rushii,p.Samu],patches:[{find:'safety_prompt:"DMSpamExperiment",response:"show_redacted_messages"',replacement:[{match:/\.collapsedReason;return/,replace:".collapsedReason;return null;return;"}]},{find:'displayName="MessageStore"',predicate:()=>S.plugins.NoBlockedMessages.ignoreBlockedMessages===!0,replacement:[{match:/(?<=MESSAGE_CREATE:function\((\w)\){var \w=\w\.channelId,\w=\w\.message,\w=\w\.isPushNotification,\w=\w\.\w\.getOrCreate\(\w\));/,replace:";if(Vencord.Plugins.plugins.NoBlockedMessages.isBlocked(n))return;"}]}],options:{ignoreBlockedMessages:{description:"Completely ignores (recent) incoming messages from blocked users (locally).",type:3,default:!1,restartNeeded:!0}},isBlocked:e=>ju.isBlocked(e.author.id)})});var Oi,gl=m(()=>{"use strict";i();pt();R();x();T();Oi=u({name:"NoCanaryMessageLinks",description:"Allows you to change/remove the subdomain of discord message and channel links",authors:[p.Samu,p.nea],options:{linkPrefix:{description:"The subdomain for your discord message links",type:0,default:"",restartNeeded:!1},alwaysUseDiscordHost:{description:"Always use discord.com host (replace discordapp.com)",type:3,default:!1,restartNeeded:!1}},dependencies:["MessageEventsAPI"],removeBetas(e){let t=S.plugins.NoCanaryMessageLinks;e.content=e.content.replace(/https:\/\/(?:canary\.|ptb\.)?(discord(?:app)?\.com)(\/channels\/(?:\d{17,20}|@me)\/\d{17,20}(?:\/\d{17,20})?)/g,(n,r,s)=>"https://"+(t.linkPrefix?t.linkPrefix+".":"")+(t.alwaysUseDiscordHost?"discord.com":r)+s)},start(){this.preSend=$e((e,t)=>this.removeBetas(t))},stop(){Ue(this.preSend)}})});var Bi,hl=m(()=>{"use strict";i();R();x();T();X("NoDevtoolsWarning","STFU");Bi=u({name:"NoDevtoolsWarning",description:"Disables the 'HOLD UP' banner in the console",authors:[p.Ven],patches:[{find:"setDevtoolsCallbacks",replacement:{match:/if\(.{0,10}\|\|"0.0.0"!==.{0,2}\.remoteApp\.getVersion\(\)\)/,replace:"if(false)"}}]})});var $i,yl=m(()=>{"use strict";i();x();T();$i=u({name:"No F1",description:"Disables F1 help bind.",authors:[p.Cyn],patches:[{find:',"f1"],comboKeysBindGlobal:',replacement:{match:',"f1"],comboKeysBindGlobal:',replace:"],comboKeysBindGlobal:"}}]})});var Ui,vl=m(()=>{"use strict";i();x();T();Ui=u({name:"No RPC",description:"Disables Discord's RPC server.",authors:[p.Cyn],target:"DESKTOP",patches:[{find:'.ensureModule("discord_rpc")',replacement:{match:/\.ensureModule\("discord_rpc"\)\.then\(\(.+?\)\)}/,replace:'.ensureModule("discord_rpc")}'}}]})});var Hi,bl=m(()=>{"use strict";i();x();T();Hi=u({name:"NoReplyMention",description:"Disables reply pings by default",authors:[p.DustyAngel47],patches:[{find:"CREATE_PENDING_REPLY:function",replacement:{match:/CREATE_PENDING_REPLY:function\((.{1,2})\){/,replace:"CREATE_PENDING_REPLY:function($1){$1.shouldMention=false;"}}]})});var ji,Sl=m(()=>{"use strict";i();x();T();ji=u({name:"NoSystemBadge",description:"Disables the taskbar and system tray unread count badge.",authors:[p.rushii],target:"DESKTOP",patches:[{find:"setSystemTrayApplications:function",replacement:[{match:/setBadge:function.+?},/,replace:"setBadge:function(){},"},{match:/setSystemTrayIcon:function.+?},/,replace:"setSystemTrayIcon:function(){},"}]}]})});var Gi,xl=m(()=>{"use strict";i();x();T();Gi=u({name:"NoTrack",description:"Disable Discord's tracking and crash reporting",authors:[p.Cyn],required:!0,patches:[{find:"TRACKING_URL:",replacement:{match:/^.+$/,replace:"()=>{}"}},{find:"window.DiscordSentry=",replacement:{match:/window\.DiscordSentry=function.+\}\(\)/,replace:""}}]})});var zi,Tl=m(()=>{"use strict";i();x();T();zi=u({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=function()",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 Wi,wl=m(()=>{"use strict";i();x();T();Wi=u({name:"oneko",description:"cat follow mouse (real)",authors:[p.Ven,p.adryd],start(){fetch("https://raw.githubusercontent.com/adryd325/oneko.js/14bab15a755d0e35cd4ae19c931d96d306f99f42/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()}})});function kl(e){let t=e instanceof File,n=t?URL.createObjectURL(e):e;return new Promise((r,s)=>{let a=new Image;a.onload=()=>{t&&URL.revokeObjectURL(n),r(a)},a.onerror=(c,f,d,v,h)=>s(h||c),a.crossOrigin="Anonymous",a.src=n})}async function Qu(e,t,n){for(let r of e)switch(r.name){case"image":let s=Yu.getUploads(t.channel.id,Pl)[0];if(s){if(!s.isImage)throw"Upload is not an image";return s.item.file}break;case"url":return r.value;case"user":try{return(await qu(r.value)).getAvatarURL(n?void 0:t.guild?.id,2048).replace(/\?size=\d+$/,"?size=2048")}catch(a){throw console.error(`[petpet] Failed to fetch user -`,a),"Failed to fetch user. Check the console for more info."}}return null}var Pl,Gu,zu,no,Wu,qu,Ku,Yu,qi,Il=m(()=>{"use strict";i();be();x();Qn();O();T();L();Pl=0,Gu=20,zu=128,no=10,Wu=Fe(()=>Promise.all(Array.from({length:no},(e,t)=>kl(`https://raw.githubusercontent.com/VenPlugs/petpet/main/frames/pet${t}.gif`)))),qu=re(".USER("),Ku=re("UPLOAD_FILE_LIMIT_ERROR"),Yu=M("getUploads");qi=u({name:"petpet",description:"headpet a cutie",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{GIFEncoder:n,quantize:r,applyPalette:s}=await Yn(),a=await Wu(),c=ce(e,"no-server-pfp",!1);try{var f=await Qu(e,t,c);if(!f)throw"No Image specified!"}catch(_){U(t.channel.id,{content:String(_)});return}let d=await kl(f),v=ce(e,"delay",Gu),h=ce(e,"resolution",zu),g=new n,w=document.createElement("canvas");w.width=w.height=h;let P=w.getContext("2d");for(let _=0;_Ku([B],t.channel,Pl))}}]})});var Ki,Ml=m(()=>{"use strict";i();x();T();Ki=u({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"}]}]})});function oo(e,t="0 0 24 24"){return({color:n,tooltip:r})=>o(me,{text:r},s=>o("svg",{...s,height:"18",width:"18",viewBox:t,fill:n},o("path",{d:e})))}var Rl,Ju,Xu,Zu,Yi,Cl=m(()=>{"use strict";i();R();ne();x();T();L();k();Rl={desktop:oo("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:oo("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:oo("M15.5 1h-8A2.5 2.5 0 0 0 5 3.5v17A2.5 2.5 0 0 0 7.5 23h8a2.5 2.5 0 0 0 2.5-2.5v-17A2.5 2.5 0 0 0 15.5 1zm-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm4.5-4H7V4h9v14z"),console:oo("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","0 0 50 50")},Ju=re("STATUS_YELLOW","TWITCH","STATUS_GREY"),Xu=({platform:e,status:t})=>{let n=e[0].toUpperCase()+e.slice(1),r=Rl[e]??Rl.desktop;return o(r,{color:`var(--${Ju(t)}`,tooltip:n})},Zu=({user:e})=>{if(!e||e.bot)return null;let t=Xt.getState()?.clientStatuses?.[e.id];if(!t)return null;let n=Object.entries(t).map(([r,s])=>o(Xu,{key:r,platform:r,status:s}));return n.length?o("div",{className:"vc-platform-indicator",style:{display:"flex",alignItems:"center",marginLeft:"4px",gap:"4px"}},n):null},Yi=u({name:"PlatformIndicators",description:"Adds platform indicators (Desktop, Mobile, Web...) to users",authors:[p.kemo],patches:[{find:"this.renderPremium()",predicate:()=>["both","list"].includes(S.plugins.PlatformIndicators.displayMode),replacement:{match:/this.renderPremium\(\)[^\]]*?\]/,replace:"$&.concat(Vencord.Plugins.plugins.PlatformIndicators.renderPlatformIndicators(this.props))"}},{find:"PrivateChannel.renderAvatar",predicate:()=>["both","list"].includes(S.plugins.PlatformIndicators.displayMode),replacement:{match:/(subText:(.{1,3})\..+?decorators:)(.+?:null)/,replace:"$1[$3].concat(Vencord.Plugins.plugins.PlatformIndicators.renderPlatformIndicators($2.props))"}},{find:"Messages.PROFILE_USER_BADGES",predicate:()=>["both","badges"].includes(S.plugins.PlatformIndicators.displayMode),replacement:{match:/(Messages\.PROFILE_USER_BADGES,role:"group",children:)(.+?\.key\)\}\)\))/,replace:"$1[Vencord.Plugins.plugins.PlatformIndicators.renderPlatformIndicators(e)].concat($2)"}}],renderPlatformIndicators:({user:e})=>o(D,{noop:!0},o(Zu,{user:e})),options:{displayMode:{type:4,description:"Where to display the platform indicators",restartNeeded:!0,options:[{label:"Member List & Badges",value:"both",default:!0},{label:"Member List Only",value:"list"},{label:"Badges Only",value:"badges"}]}}})});function Qi(){return o(b.Fragment,null,o(y.FormTitle,{tag:"h3"},"More Information"),o(y.FormText,null,"To add your own pronouns, visit"," ",o(Pe,{href:"https://pronoundb.org"},"pronoundb.org")),o(y.FormDivider,null),o(y.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 Al=m(()=>{"use strict";i();wt();k()});function gt(e,t=300){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}var yn=m(()=>{"use strict";i()});var ht,ro=m(()=>{"use strict";i();ht={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 so(e){return new Promise(t=>{e in io?t(io[e]):e in Ut?Ut[e].push(t):(Ut[e]=[t],Vu())})}async function ef(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":er}})).json().then(r=>(Object.assign(io,r),r))}catch(n){console.error("PronounDB fetching failed: ",n);let r=Object.fromEntries(e.map(s=>[s,"unspecified"]));return Object.assign(io,r),r}}function ao(e){let{pronounsFormat:t}=S.plugins.PronounDB;return t==="CAPITALIZED"?ht[e]:t==="LOWERCASE"&&["any","ask","avoid","other"].includes(e)?ht[e]:ht[e].toLowerCase()}var io,Ut,Vu,Ji=m(()=>{"use strict";i();R();x();yn();Xi();ro();io={},Ut={},Vu=gt(async()=>{let e=Object.keys(Ut),t=await ef(e);for(let n of e)Ut[n].forEach(r=>r(t[n])),delete Ut[n]})});function Zi({message:e}){return e.author.bot||e.author.system||!S.plugins.PronounDB.showSelf&&e.author.id===G.getCurrentUser().id?null:o(tf,{message:e})}function tf({message:e}){let[t,,n]=ve(()=>so(e.author.id),{fallbackValue:null,onError:r=>console.error("Fetching pronouns failed: ",r)});return!n&&t&&t!=="unspecified"&&ht[t]?o("span",{className:ie(_l.timestampInline,_l.timestamp)},"\u2022 ",ao(t)):null}var _l,Ll=m(()=>{"use strict";i();R();O();L();k();Ji();ro();_l=M("timestampInline")});function Vi(e,t,n){let r=G.getUser(n.userId)??{};return r.bot||r.system||!S.plugins.PronounDB.showSelf&&r.id===G.getCurrentUser().id?null:o(nf,{userId:n.userId,Component:e,leProps:t})}function nf({userId:e,Component:t,leProps:n}){let[r,,s]=ve(()=>so(e),{fallbackValue:null,onError:a=>console.error("Fetching pronouns failed: ",a)});return!s&&r&&r!=="unspecified"&&ht[r]?(n.currentPronouns||=ao(r),o(t,{...n})):null}var El=m(()=>{"use strict";i();R();O();k();Ji();ro()});var es,Xi=m(()=>{"use strict";i();x();T();Al();Ll();El();es=u({name:"PronounDB",authors:[p.Tyman],description:"Adds pronouns to user messages using pronoundb",patches:[{find:"showCommunicationDisabledStyles",replacement:{match:/(?<=return\s*\(0,\w{1,3}\.jsxs?\)\(.+!\w{1,3}&&)(\(0,\w{1,3}.jsxs?\)\(.+?\{.+?\}\))/,replace:"[$1, Vencord.Plugins.plugins.PronounDB.PronounsChatComponent(e)]"}},{find:"currentPronouns:",all:!0,noWarn:!0,replacement:{match:/\(0,.{1,3}\.jsxs?\)\((.{1,10}),(\{[^[}]*currentPronouns:[^}]*(\w)\.pronouns[^}]*\})\)/,replace:(e,t,n,r)=>n.includes("onPronounsChange")?e:`${r}&&Vencord.Plugins.plugins.PronounDB.PronounsProfileWrapper(${t}, ${n}, ${r})`}},{find:"2022-01_pronouns",replacement:{match:"!1",replace:"!0"}}],options:{pronounsFormat:{type:4,description:"The format for pronouns to appear in chat",options:[{label:"Lowercase",value:"LOWERCASE",default:!0},{label:"Capitalized",value:"CAPITALIZED"}]},showSelf:{type:3,description:"Enable or disable showing pronouns for the current user",default:!0}},settingsAboutComponent:Qi,PronounsChatComponent:Zi,PronounsProfileWrapper:Vi})});var of,ts,Fl=m(()=>{"use strict";i();fn();x();T();L();k();of=Ae(e=>e.emitter?._events?.INSERT_TEXT),ts=u({name:"QuickMention",authors:[p.kemo],description:"Adds a quick mention button to the message actions bar",dependencies:["MessagePopoverAPI"],start(){Mt("QuickMention",e=>({label:"Quick Mention",icon:this.Icon,message:e,channel:ae.getChannel(e.channel_id),onClick:()=>of.dispatchToLastSubscribed("INSERT_TEXT",{rawText:`<@${e.author.id}> `})}))},stop(){Rt("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 Hl(e,t){let n=e.findIndex(r=>r.id===t);return n===-1?n:e.length-n-1}function Ol({channelId:e,messageId:t,_isQuickEdit:n}){if(n)return;let r=G.getCurrentUser().id,s=vt.getMessages(e)._array.filter(a=>a.author.id===r);lo=Hl(s,t)}function Bl({message:e,_isQuickReply:t}){t||(co=Hl(vt.getMessages(e.channel_id)._array,e.id))}function $l(e){let t=e.key==="ArrowUp";!t&&e.key!=="ArrowDown"||!sf(e)||af(e)||(e.shiftKey?lf(t):cf(t))}function jl(e,t){let n=document.getElementById("message-content-"+t);if(!n)return;let r=Math.max(document.documentElement.clientHeight,window.innerHeight),s=n.getBoundingClientRect();(s.bottom<200||s.top-r>=-200)&&rf.jumpToMessage({channelId:e,messageId:t,flash:!1,jumpType:"INSTANT"})}function Gl(e,t){let n=vt.getMessages(pe.getChannelId())._array;if(!t){let a=G.getCurrentUser().id;n=n.filter(c=>c.author.id===a)}let r=a=>e?Math.min(n.length-1,a+1):Math.max(-1,a-1),s;return t?co=s=r(co):lo=s=r(lo),s===-1?void 0:n[n.length-s-1]}function cf(e){let t=Gl(e,!0);if(!t)return void I.dispatch({type:"DELETE_PENDING_REPLY",channelId:pe.getChannelId()});let n=ae.getChannel(t.channel_id),r=G.getCurrentUser().id;I.dispatch({type:"CREATE_PENDING_REPLY",channel:n,message:t,shouldMention:!0,showMentionToggle:n.guild_id!==null&&t.author.id!==r,_isQuickReply:!0}),jl(n.id,t.id)}function lf(e){let t=Gl(e,!1);t?(I.dispatch({type:"MESSAGE_START_EDIT",channelId:t.channel_id,messageId:t.id,content:t.content,_isQuickEdit:!0}),jl(t.channel_id,t.id)):I.dispatch({type:"MESSAGE_END_EDIT",channelId:pe.getChannelId()})}var rf,Ul,co,lo,ns,Dl,Nl,sf,af,zl=m(()=>{"use strict";i();R();x();T();L();k();rf=M("jumpToMessage"),Ul=navigator.platform.includes("Mac"),co=-1,lo=-1;X("QuickReply","InteractionKeybinds");ns=u({name:"QuickReply",authors:[p.obscurity,p.Ven],description:"Reply to (ctrl + up/down) and edit (ctrl + shift + up/down) messages via keybinds",start(){I.subscribe("DELETE_PENDING_REPLY",Dl),I.subscribe("MESSAGE_END_EDIT",Nl),I.subscribe("MESSAGE_START_EDIT",Ol),I.subscribe("CREATE_PENDING_REPLY",Bl),document.addEventListener("keydown",$l)},stop(){I.unsubscribe("DELETE_PENDING_REPLY",Dl),I.unsubscribe("MESSAGE_END_EDIT",Nl),I.unsubscribe("MESSAGE_START_EDIT",Ol),I.unsubscribe("CREATE_PENDING_REPLY",Bl),document.removeEventListener("keydown",$l)}}),Dl=()=>co=-1,Nl=()=>lo=-1;sf=e=>Ul?e.metaKey:e.ctrlKey,af=e=>e.altKey||!Ul&&e.metaKey});var rs={};ee(rs,{ServerListRenderPosition:()=>po,addServerListElement:()=>vn,removeServerListElement:()=>bn,renderAll:()=>uf});function os(e){return e===0?df:mf}function vn(e,t){os(e).add(t)}function bn(e,t){os(e).delete(t)}var pf,po,df,mf,uf,mo=m(()=>{"use strict";i();le();pf=new N("ServerListAPI"),po=(n=>(n[n.Above=0]="Above",n[n.In=1]="In",n))(po||{}),df=new Set,mf=new Set;uf=e=>{let t=[];for(let n of os(e))try{t.unshift(n())}catch(r){pf.error("Failed to render server list element:",r)}return t}});function ff(){let e=[];Object.values(qe.getGuilds()).forEach(t=>{zo.getChannels(t.id).SELECTABLE.forEach(n=>{!$n.hasUnread(n.channel.id)||e.push({channelId:n.channel.id,messageId:$n.lastMessageId(n.channel.id),readStateType:0})})}),I.dispatch({type:"BULK_ACK",context:"APP",channels:e})}var gf,is,Wl=m(()=>{"use strict";i();mo();x();T();k();gf=()=>o(F,{onClick:ff,size:F.Sizes.MIN,color:F.Colors.BRAND,style:{marginTop:"2px",marginBottom:"8px",marginLeft:"9px"}},"Read all"),is=u({name:"ReadAllNotificationsButton",description:"Read all server notifications with a single button click!",authors:[p.kemo],dependencies:["ServerListAPI"],renderReadAllButton:()=>o(gf,null),start(){vn(1,this.renderReadAllButton)},stop(){bn(1,this.renderReadAllButton)}})});var ss,as,ql=m(()=>{"use strict";i();x();T();k();ss={Google:"https://www.google.com/searchbyimage?image_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="},as=u({name:"ReverseImageSearch",description:"Adds ImageSearch to image context menus",authors:[p.Ven],dependencies:["MenuItemDeobfuscatorAPI"],patches:[{find:"open-native-link",replacement:{match:/id:"open-native-link".{0,200}\(\{href:(.{0,3}),.{0,200}\},"open-native-link"\)/,replace:(e,t)=>`${e},Vencord.Plugins.plugins.ReverseImageSearch.makeMenu(${t}, arguments[2])`}},{find:"REMOVE_ALL_REACTIONS_CONFIRM_BODY,",replacement:{match:/(?.).onHeightUpdate.{0,200}(.)=(.)=.\.url;.+?\(null!=\3\?\3:\2[^)]+/,replace:"$&,$.target"}}],makeMenu(e,t){return t&&!(t instanceof HTMLImageElement)&&t.attributes["data-role"]?.value!=="img"?null:o(ue.MenuItem,{label:"Search Image",key:"search-image",id:"search-image"},Object.keys(ss).map(n=>{let r="search-image-"+n;return o(ue.MenuItem,{key:r,id:r,label:n,action:()=>this.search(e,ss[n])})}),o(ue.MenuItem,{key:"search-image-all",id:"search-image-all",label:"All",action:()=>Object.values(ss).forEach(n=>this.search(e,n))}))},search(e,t){open(t+encodeURIComponent(e),"_blank")}})});async function Kl(e){await Zt.fetchUser(e),await I.dispatch({type:"USER_PROFILE_MODAL_OPEN",userId:e,channelId:pe.getChannelId(),analyticsLocation:"Explosive Hotel"})}function uo(e){let{OAuth2AuthorizeModal:t}=_e("OAuth2AuthorizeModal");we(n=>o(t,{...n,scopes:["identify"],responseType:"code",redirectUri:"https://manti.vendicated.dev/URauth",permissions:0n,clientId:"915703782174752809",cancelCompletesFlow:!1,callback:async r=>{try{let s=new URL(r);s.searchParams.append("returnType","json"),s.searchParams.append("clientMod","vencord");let a=await fetch(s,{headers:new Headers({Accept:"application/json"})}),{token:c,status:f}=await a.json();f===0?(S.plugins.ReviewDB.token=c,Ze("Successfully logged in!"),e?.()):a.status===1&&Ze("An Error occurred while logging in.")}catch(s){new N("ReviewDB").error("Failed to authorise",s)}}}))}function Ze(e){A.show({type:A.Type.MESSAGE,message:e,id:A.genId(),options:{position:A.Position.BOTTOM}})}function Yl(e,t){if(e.senderdiscordid===t)return!0;let n=BigInt(t);return n===p.mantikafasi.id||n===p.Ven.id||n===p.rushii.id}var fo=m(()=>{"use strict";i();R();x();le();Ye();L();k()});async function Jl(e){return await(await fetch(Sn+"/getUserReviews?snowflakeFormat=string&discordid="+e)).json()}async function Xl(e){return e.token=cs(),e.token?fetch(Sn+"/addUserReview",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}).then(t=>t.text()).then(t=>(Ze(t),Ql[t]??2)):(Ze("Please authorize to add a review."),uo(),2)}function Zl(e){return fetch(Sn+"/deleteReview",{method:"POST",headers:new Headers({"Content-Type":"application/json",Accept:"application/json"}),body:JSON.stringify({token:cs(),reviewid:e})}).then(t=>t.json())}async function Vl(e){let t=await fetch(Sn+"/reportReview",{method:"POST",headers:new Headers({"Content-Type":"application/json",Accept:"application/json"}),body:JSON.stringify({reviewid:e,token:cs()})});Ze(await t.text())}function ep(e){return fetch(Sn+"/getLastReviewID?discordid="+e).then(t=>t.text()).then(Number)}var Sn,cs,Ql,go=m(()=>{"use strict";i();R();fo();Sn="https://manti.vendicated.dev",cs=()=>S.plugins.ReviewDB.token,Ql=(t=>(t[t["Added your review"]=0]="Added your review",t[t["Updated your review"]=1]="Updated your review",t[t.Error=2]="Error",t))(Ql||{})});var ls,tp=m(()=>{"use strict";i();O();L();ls=Q(()=>{let{button:e,dangerous:t}=_e("button","wrapper","disabled");return function(r){return r.type==="delete"?o("div",{className:ie(e,t),"aria-label":"Delete Review",onClick:r.callback},o("svg",{"aria-hidden":"false",width:"16",height:"16",viewBox:"0 0 20 20"},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"}))):o("div",{className:e,"aria-label":"Report Review",onClick:()=>r.callback()},o("svg",{"aria-hidden":"false",width:"16",height:"16",viewBox:"0 0 20 20"},o("path",{fill:"currentColor",d:"M20,6.002H14V3.002C14,2.45 13.553,2.002 13,2.002H4C3.447,2.002 3,2.45 3,3.002V22.002H5V14.002H10.586L8.293,16.295C8.007,16.581 7.922,17.011 8.076,17.385C8.23,17.759 8.596,18.002 9,18.002H20C20.553,18.002 21,17.554 21,17.002V7.002C21,6.45 20.553,6.002 20,6.002Z"})))}})});var np,op=m(()=>{"use strict";i();O();L();k();go();fo();tp();np=Q(()=>{let e=E.byProps,[{cozyMessage:t,buttons:n,message:r,groupStart:s},{container:a,isHeader:c},{avatar:f,clickable:d,username:v,messageContent:h,wrapper:g,cozy:w},{contents:P},B,{defaultColor:_}]=No(e("cozyMessage"),e("container","isHeader"),e("avatar","zalgo"),e("contents"),e("button","wrapper","disabled"),e("defaultColor"));return function({review:C,refetch:q}){function se(){Kl(C.senderdiscordid)}function de(){at.show({title:"Are you sure?",body:"Do you really want to delete this review?",confirmText:"Delete",cancelText:"Nevermind",onConfirm:()=>{Zl(C.id).then(ge=>{ge.successful&&q(),Ze(ge.message)})}})}function Ie(){at.show({title:"Are you sure?",body:"Do you really you want to report this review?",confirmText:"Report",cancelText:"Nevermind",onConfirm:()=>Vl(C.id)})}return o("div",{className:ie(t,r,s,g,w,"user-review")},o("div",{className:P},o("img",{className:ie(f,d),style:{left:"8px"},onClick:se,src:C.profile_photo||"/assets/1f0bfc0865d324c2587920a7d80c609b.png?size=128"}),o("span",{className:ie(v,d),style:{color:"var(--text-normal)",right:"8px"},onClick:()=>se()},C.username),o("p",{className:ie(h,_),style:{fontSize:15,marginTop:4,right:"8px"}},C.comment),o("div",{className:ie(a,c,n),style:{padding:"0px"}},o("div",{className:B.wrapper},o(ls,{type:"report",callback:Ie}),Yl(C,G.getCurrentUser().id)&&o(ls,{type:"delete",callback:de})))))}})});function ps({userId:e}){let[t,n]=b.useState(0),[r,s,a]=ve(()=>Jl(e),{fallbackValue:[],deps:[t]}),c=()=>n(t+1);if(a)return null;function f({key:d,target:v}){d==="Enter"&&Xl({userid:e,comment:v.value,star:-1}).then(h=>{(h===0||h===1)&&(v.value="",c())})}return o("div",{className:"ReviewDB"},o(l,null,o(Y,{tag:"h2",variant:"eyebrow",style:{paddingLeft:"0px",marginBottom:"12px",color:"var(--header-primary)"}},"User Reviews"),r?.map(d=>o(np,{key:d.id,review:d,refetch:c})),r?.length===0&&o(y.FormText,{style:{paddingLeft:"0px",paddingRight:"12px",marginBottom:"12px"}},"Looks like nobody reviewed this user yet. You could be the first!"),o("textarea",{className:ie(hf.textarea,"enter-comment"),placeholder:"Review @"+G.getUser(e)?.username,onKeyDown:f,style:{padding:"12px",marginBottom:"12px",color:"var(--text-normal)",border:"1px solid var(--profile-message-input-border-color)",fontSize:"14px",borderRadius:"3px"}})))}var hf,rp=m(()=>{"use strict";i();O();L();k();go();op();hf=Ae(e=>typeof e.textarea=="string")});var ds,ip=m(()=>{"use strict";i();R();ne();x();T();k();rp();go();fo();ds=u({name:"ReviewDB",description:"Review other users (Adds a new settings to profiles)",authors:[p.mantikafasi,p.Ven],patches:[{find:"disableBorderColor:!0",replacement:{match:/\(.{0,10}\{user:(.),setNote:.,canDM:.,.+?\}\)/,replace:"$&,Vencord.Plugins.plugins.ReviewDB.getReviewsComponent($1)"}}],options:{authorize:{type:6,description:"Authorise with ReviewDB",component:()=>o(F,{onClick:uo},"Authorise with ReviewDB")},notifyReviews:{type:3,description:"Notify about new reviews on startup",default:!0}},async start(){let e=S.plugins.ReviewDB;!e.lastReviewId||!e.notifyReviews||setTimeout(async()=>{let t=await ep(G.getCurrentUser().id);e.lastReviewIdo(D,{message:"Failed to render Reviews"},o(ps,{userId:e.id}))})});function yf(){return ap=ct(),o("span",{id:"vc-friendcount",style:{display:"inline-block",width:"100%",fontSize:"12px",fontWeight:"600",color:"var(--header-secondary)",textTransform:"uppercase",textAlign:"center"}},ms," online")}function vf(){return cp=ct(),o("span",{id:"vc-guildcount",style:{display:"inline-block",width:"100%",fontSize:"12px",fontWeight:"600",color:"var(--header-secondary)",textTransform:"uppercase",textAlign:"center"}},sp," servers")}var ms,sp,ap,cp,us,lp=m(()=>{"use strict";i();mo();R();ne();x();O();T();k();ms=0,sp=0;us=u({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}=S.plugins.ServerListIndicators;return o(D,{noop:!0},o("div",{style:{marginBottom:"4px"}},!!(e&2)&&o(yf,null),!!(e&1)&&o(vf,null)))},handlePresenceUpdate(){ms=0;let e=Hn.getRelationships();for(let t of Object.keys(e))e[t]===1&&Xt.getStatus(t)!=="offline"&&(ms+=1);ap?.()},handleGuildUpdate(){sp=qe.getGuildCount(),cp?.()},start(){this.handlePresenceUpdate(),this.handleGuildUpdate(),vn(0,this.renderIndicator),I.subscribe("PRESENCE_UPDATES",this.handlePresenceUpdate),I.subscribe("GUILD_CREATE",this.handleGuildUpdate),I.subscribe("GUILD_DELETE",this.handleGuildUpdate)},stop(){bn(0,this.renderIndicator),I.unsubscribe("PRESENCE_UPDATES",this.handlePresenceUpdate),I.unsubscribe("GUILD_CREATE",this.handleGuildUpdate),I.unsubscribe("GUILD_DELETE",this.handleGuildUpdate)}})});var pp,dp=m(()=>{i();pp=`.vcSettingsTabBar { - margin-top: 20px; - margin-bottom: -2px; - border-bottom: 2px solid var(--background-modifier-accent); -} - -.vcSettingsTabBarItem { - margin-right: 32px; - padding-bottom: 16px; - margin-bottom: -2px; -} - -.vcSettingsQuickActionCard { - padding: 1em; - display: flex; - gap: 1em; - align-items: center; - justify-content: space-between; - flex-wrap: wrap; - flex-grow: 1; - flex-direction: row; - margin-bottom: 1em; -} -`});async function bf(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)await VencordNative.ipc.invoke(j.SET_SETTINGS,JSON.stringify(t.settings,null,4)),await VencordNative.ipc.invoke(j.SET_QUICK_CSS,t.quickCss);else throw new Error("Invalid Settings. Is this even a Vencord Settings file?")}async function Sf(){let e=JSON.parse(VencordNative.ipc.sendSync(j.GET_SETTINGS)),t=await VencordNative.ipc.invoke(j.GET_QUICK_CSS);return JSON.stringify({settings:e,quickCss:t},null,4)}async function mp(){let e="vencord-settings-backup.json",t=await Sf(),n=new TextEncoder().encode(t);{let r=new File([n],e,{type:"application/json"}),s=document.createElement("a");s.href=URL.createObjectURL(r),s.download=e,document.body.appendChild(s),s.click(),setImmediate(()=>{URL.revokeObjectURL(s.href),document.body.removeChild(s)})}}async function up(e=!0){if(!0){let t=document.createElement("input");t.type="file",t.style.display="none",t.accept="application/json",t.onchange=async()=>{let n=t.files?.[0];if(!n)return;let r=new FileReader;r.onload=async()=>{try{await bf(r.result),e&&xf()}catch(s){new N("SettingsSync").error(s),e&&Tf(s)}},r.readAsText(n)},document.body.appendChild(t),t.click(),setImmediate(()=>document.body.removeChild(t))}else if(t)try{}catch(n){}}var xf,Tf,fp=m(()=>{"use strict";i();k();ze();le();xf=()=>A.show({type:A.Type.SUCCESS,message:"Settings successfully imported. Restart to apply changes!",id:A.genId()}),Tf=e=>A.show({type:A.Type.FAILURE,message:`Failed to import settings: ${String(e)}`,id:A.genId()})});function wf(){return o(y.FormSection,{title:"Settings Sync"},o(Te,{style:{backgroundColor:"var(--info-warning-background)",borderColor:"var(--info-warning-foreground)",color:"var(--info-warning-text)",padding:"1em",marginBottom:"0.5em"}},o(Z,{flexDirection:"column"},o("strong",null,"Warning"),o("span",null,"Importing a settings file will overwrite your current settings."))),o(Y,{variant:"text-md/normal",className:V.marginBottom8},"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(Y,{variant:"text-md/normal",className:V.marginBottom8},"Settings Export contains:",o("ul",null,o("li",null,"\u2014 Custom QuickCSS"),o("li",null,"\u2014 Plugin Settings"))),o(Z,null,o(F,{onClick:up,size:F.Sizes.SMALL},"Import Settings"),o(F,{onClick:mp,size:F.Sizes.SMALL},"Export Settings")))}var gp,hp=m(()=>{"use strict";i();ne();Ne();fp();k();gp=D.wrap(wf)});var hs={};ee(hs,{UpdateLogger:()=>yp,changes:()=>xn,checkForUpdates:()=>vp,getRepo:()=>bp,isNewer:()=>fs,isOutdated:()=>Ct,rebuild:()=>yo,update:()=>ho,updateError:()=>gs});async function Ht(e){let t=await e;if(t.ok)return t.value;throw gs=t.error,t.error}async function vp(){return xn=await Ht(VencordNative.ipc.invoke(j.GET_UPDATES)),xn.some(e=>e.hash===Tt)?(fs=!0,Ct=!1):Ct=xn.length>0}async function ho(){if(!Ct)return!0;let e=await Ht(VencordNative.ipc.invoke(j.UPDATE));return e&&(Ct=!1),e}function bp(){return Ht(VencordNative.ipc.invoke(j.GET_REPO))}async function yo(){let e=await Ht(VencordNative.ipc.invoke(j.GET_HASHES));if(!await Ht(VencordNative.ipc.invoke(j.BUILD)))throw new Error("The Build failed. Please try manually building the new update");let t=await Ht(VencordNative.ipc.invoke(j.GET_HASHES));return e["patcher.js"]!==t["patcher.js"]||e["preload.js"]!==t["preload.js"]}var yp,Ct,fs,gs,xn,Tn=m(()=>{"use strict";i();nn();ze();le();yp=new N("Updater","white"),Ct=!1,fs=!1});async function Sp(){Ct&&setImmediate(async()=>{if(confirm("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?"))try{await ho(),await yo(),location.reload()}catch(t){console.error(t),alert("That also failed :( Try updating or reinstalling with the installer!")}})}var ys=m(()=>{"use strict";i();Tn()});var wn,vs=m(()=>{"use strict";i();wn=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 Ts={};ee(Ts,{PMLogger:()=>Pf,isPluginEnabled:()=>bs,patches:()=>xp,plugins:()=>kf,startAllPlugins:()=>Ss,startDependenciesRecursive:()=>vo,startPlugin:()=>Pn,stopPlugin:()=>xs});function bs(e){return(te[e]?.required||te[e]?.isDependency||Tp[e]?.enabled)??!1}function vo(e){let t=!1,n=[];return e.dependencies?.forEach(r=>{if(!S.plugins[r].enabled){if(vo(te[r]),te[r].patches){ke.warn(`Enabling dependency ${r} requires restart.`),S.plugins[r].enabled=!0,t=!0;return}Pn(te[r])||n.push(r)}}),{restartNeeded:t,failures:n}}var ke,Pf,kf,xp,Tp,wp,Ss,Pn,xs,bo=m(()=>{"use strict";i();be();R();le();tn();_o();ke=new N("PluginManager","#a6d189"),Pf=ke,kf=te,xp=[],Tp=S.plugins;wp=Object.values(te);for(let e of wp)e.dependencies?.forEach(t=>{let n=te[t];if(n)Tp[t].enabled=!0,n.isDependency=!0;else{let r=new Error(`Plugin ${e.name} has unresolved dependency ${t}`);ke.warn(r)}});for(let e of wp)if(e.patches&&bs(e.name))for(let t of e.patches)t.plugin=e.name,Array.isArray(t.replacement)||(t.replacement=[t.replacement]),xp.push(t);Ss=Ve("startAllPlugins",function(){for(let t in te)bs(t)&&Pn(te[t])});Pn=Ve("startPlugin",function(t){if(t.start){if(ke.info("Starting plugin",t.name),t.started)return ke.warn(`${t.name} already started`),!1;try{t.start(),t.started=!0}catch(n){return ke.error(`Failed to start ${t.name} -`,n),!1}}if(t.commands?.length){ke.info("Registering commands of plugin",t.name);for(let n of t.commands)try{Nt(n,t.name)}catch(r){return ke.error(`Failed to register command ${n.name} -`,r),!1}}return!0},e=>`startPlugin ${e.name}`),xs=Ve("stopPlugin",function(t){if(t.stop){if(ke.info("Stopping plugin",t.name),!t.started)return ke.warn(`${t.name} already stopped`),!1;try{t.stop(),t.started=!1}catch(n){return ke.error(`Failed to stop ${t.name} -`,n),!1}}if(t.commands?.length){ke.info("Unregistering commands of plugin",t.name);for(let n of t.commands)try{un(n.name)}catch(r){return ke.error(`Failed to unregister command ${n.name} -`,r),!1}}return!0},e=>`stopPlugin ${e.name}`)});function Pp(e){let t=new Rf({username:e.name,id:Gr(),bot:!0});return I.dispatch({type:"USER_UPDATE",user:t}),t}function ws({plugin:e,onRestartNeeded:t,onClose:n,transitionState:r}){let[s,a]=b.useState([]),c=De().plugins[e.name],[f,d]=b.useState({}),[v,h]=b.useState({}),[g,w]=b.useState(null),P=()=>Object.values(v).every(C=>!C);b.useEffect(()=>{(async()=>{for(let C of e.authors.slice(0,6)){let q=C.id?await Zt.fetchUser(`${C.id}`).catch(()=>Pp(C)):Pp(C);a(se=>[...se,q])}})()},[]);async function B(){if(!e.options){n();return}if(e.beforeSave){let q=await Promise.resolve(e.beforeSave(f));if(q!==!0){w(q);return}}let C=!1;for(let[q,se]of Object.entries(f)){let de=e.options[q];c[q]=se,de?.onChange?.(se),de?.restartNeeded&&(C=!0)}C&&t(),n()}function _(){if(!c||!e.options)return o(y.FormText,null,"There are no settings for this plugin.");let C=Object.entries(e.options).map(([q,se])=>{function de(Ge){d(yt=>({...yt,[q]:Ge}))}function Ie(Ge){h(yt=>({...yt,[q]:Ge}))}let ge=Cf[se.type];return o(ge,{id:q,key:q,option:se,onChange:de,onError:Ie,pluginSettings:c})});return o(Z,{flexDirection:"column",style:{gap:12}},C)}function oe(C,q){let se=e.authors.length-q,de=e.authors.length-se,Ie=de+e.authors.length-q;return o(me,{text:e.authors.slice(de,Ie).map(ge=>ge.name).join(", ")},({onMouseEnter:ge,onMouseLeave:Ge})=>o("div",{className:Mf.moreUsers,onMouseEnter:ge,onMouseLeave:Ge},"+",se))}return o(Be,{transitionState:r,size:"medium"},o(nt,null,o(Y,{variant:"heading-md/bold"},e.name)),o(ot,{style:{marginBottom:8,marginTop:8}},o(y.FormSection,null,o(y.FormTitle,{tag:"h3"},"About ",e.name),o(y.FormText,null,e.description),o("div",{style:{marginTop:8,marginBottom:8,width:"fit-content"}},o(If,{users:s,count:e.authors.length,guildId:void 0,renderIcon:!1,max:6,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:oe}))),!!e.settingsAboutComponent&&o("div",{style:{marginBottom:8}},o(y.FormSection,null,o(D,{message:"An error occurred while rendering this plugin's custom InfoComponent"},o(e.settingsAboutComponent,null)))),o(y.FormSection,null,o(y.FormTitle,{tag:"h3"},"Settings"),_())),o(sn,null,o(Z,{flexDirection:"column",style:{width:"100%"}},o(Z,{style:{marginLeft:"auto"}},o(F,{onClick:n,size:F.Sizes.SMALL,color:F.Colors.RED},"Cancel"),o(me,{text:"You must fix all errors before saving",shouldShow:!P()},({onMouseEnter:C,onMouseLeave:q})=>o(F,{size:F.Sizes.SMALL,color:F.Colors.BRAND,onClick:B,onMouseEnter:C,onMouseLeave:q,disabled:!P()},"Save & Close"))),g&&o(Y,{variant:"text-md/semibold",style:{color:"var(--text-danger)"}},"Error while saving: ",g))))}var If,Mf,Rf,Cf,kp=m(()=>{"use strict";i();be();R();ne();Ne();O();Ye();Et();T();L();k();ri();If=Q(()=>xe("defaultRenderUser","showDefaultAvatarsForNullUsers")),Mf=M("moreUsers","emptyUser","avatarContainer","clickableAvatar"),Rf=We(()=>G.getCurrentUser().constructor);Cf={[0]:Bc,[1]:oi,[2]:oi,[3]:Ac,[4]:Dc,[5]:Oc,[6]:Lc}});var Ps,Ip,Mp,Rp,Cp=m(()=>{"use strict";i();Ps={marginTop:16,display:"grid",gridGap:16,gridTemplateColumns:"repeat(auto-fill, minmax(250px, 1fr))"},Ip={backgroundColor:"var(--background-modifier-selected)",color:"var(--interactive-active)",borderRadius:3,cursor:"pointer",display:"block",height:"min-content",padding:10,width:"100%"},Mp={gap:10,height:40,gridTemplateColumns:"1fr 150px",display:"grid"},Rp={height:"24px",width:"24px",padding:"0",background:"transparent",marginRight:8}});function Ef(e){A.show({message:e,type:A.Type.FAILURE,id:A.genId(),options:{position:A.Position.BOTTOM}})}function Ff({plugins:e,...t}){if(e.length===0)return null;let n=e.length===1?"The plugin":"The following plugins require a reload to apply changes:",r=e.length===1?" requires a reload to apply changes.":".";return o(rn,{...t,style:{padding:"1em",display:"grid",gridTemplateColumns:"1fr auto",gap:8,...t.style}},o("span",{style:{margin:"auto 0"}},n," ",o("code",null,e.join(", ")),r),o(F,{look:F.Looks.INVERTED,onClick:()=>location.reload()},"Reload"))}function Lp({plugin:e,disabled:t,onRestartNeeded:n,onMouseEnter:r,onMouseLeave:s}){let c=De().plugins[e.name],[f,d]=b.useState(!1);function v(){return c?.enabled||e.started}function h(){pr(async()=>w=>o(ws,{...w,plugin:e,onRestartNeeded:()=>n(e.name)}))}function g(){let w=v();if(!w){let{restartNeeded:_,failures:oe}=vo(e);if(oe.length){Ap.error(`Failed to start dependencies for ${e.name}: ${oe.join(", ")}`),ln("Failed to start dependencies: "+oe.join(", "),"Close",()=>null);return}else if(_){c.enabled=!0,n(e.name);return}}if(e.patches){c.enabled=!w,n(e.name);return}if(w&&!e.started){c.enabled=!w;return}let P=w?xs(e):Pn(e),B=w?"stop":"start";if(!P){Ap.error(`Failed to ${B} plugin ${e.name}`),Ef(`Failed to ${B} plugin: ${e.name}`);return}c.enabled=!w}return o(Z,{style:Ip,flexDirection:"column",onMouseEnter:r,onMouseLeave:s},o(bt,{onChange:g,disabled:t,value:v(),note:o(Y,{variant:"text-md/normal",style:{height:40,overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:2,lineClamp:2,WebkitBoxOrient:"vertical",boxOrient:"vertical"}},e.description),hideBorder:!0},o(Z,{style:{marginTop:"auto",width:"100%",height:"100%",alignItems:"center"}},o(Y,{variant:"text-md/bold",style:{flexGrow:"1"}},e.name),o("button",{role:"switch",onClick:()=>h(),style:Rp,className:"button-12Fmur"},e.options?o(_f,{style:{color:f?"":"var(--text-muted)"},onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1)}):o(Lf,{width:"24",height:"24",style:{color:f?"":"var(--text-muted)"},onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1)})))))}function Df(e){return o(b.Fragment,null,o(y.FormText,null,"This plugin is required by:"),e.map(t=>o(y.FormText,{style:{margin:"0 auto"}},t)))}function ks(e,t){return t[e]?.filter(n=>S.plugins[n].enabled)||[]}var Ap,_p,_f,Lf,So,Is=m(()=>{"use strict";i();pn();R();ne();qn();Ne();ys();vs();le();O();Ye();L();k();tn();bo();kp();Cp();Ap=new N("PluginSettings","#a6d189"),_p=M("inputDefault","inputWrapper"),_f=Q(()=>xe("18.564C15.797 19.099 14.932 19.498 14 19.738V22H10V19.738C9.069")),Lf=Q(()=>xe("4.4408921e-16 C4.4771525,-1.77635684e-15 4.4408921e-16"));So=D.wrap(function(){let t=De(),n=b.useMemo(()=>new wn,[]);b.useEffect(()=>()=>void(n.hasChanges&&at.show({title:"Restart required",body:o(l,null,o("p",null,"The following plugins require a restart:"),o("div",null,n.map((h,g)=>o(l,null,g>0&&", ",Ke.parse("`"+h+"`"))))),confirmText:"Restart now",cancelText:"Later!",onConfirm:()=>location.reload()})),[]);let r=b.useMemo(()=>{let h={};for(let g in te){let w=te[g].dependencies;if(w)for(let P of w)h[P]??=[],h[P].push(g)}return h},[]),s=b.useMemo(()=>Object.values(te).sort((h,g)=>h.name.localeCompare(g.name)),[]),[a,c]=b.useState({value:"",status:"all"}),f=h=>c(g=>({...g,value:h})),d=h=>c(g=>({...g,status:h})),v=h=>{let g=a.status==="enabled"||a.status==="all",w=a.status==="disabled"||a.status==="all",P=t.plugins[h.name]?.enabled||h.started;return(g&&P||w&&!P)&&(h.name.toLowerCase().includes(a.value.toLowerCase())||h.description.toLowerCase().includes(a.value.toLowerCase()))};return o(y.FormSection,null,o(y.FormTitle,{tag:"h5",className:ie(V.marginTop20,V.marginBottom8)},"Filters"),o(Ff,{plugins:[...n.getChanges()],style:{marginBottom:16}}),o("div",{style:Mp},o(Le,{value:a.value,placeholder:"Search for a plugin...",onChange:f,style:{marginBottom:24}}),o("div",{className:_p.inputWrapper},o(St,{className:_p.inputDefault,options:[{label:"Show All",value:"all",default:!0},{label:"Show Enabled",value:"enabled"},{label:"Show Disabled",value:"disabled"}],serialize:String,select:d,isSelected:h=>h===a.status,closeOnSelect:!0}))),o(y.FormTitle,{className:V.marginTop20},"Plugins"),o("div",{style:Ps},s?.length?s.filter(h=>!h.required&&!ks(h.name,r).length&&v(h)).map(h=>{let w=r[h.name]?.filter(P=>t.plugins[P].enabled)?.length;return o(Lp,{onRestartNeeded:P=>n.add(P),disabled:h.required||!!w,plugin:h,key:h.name})}):o(Y,{variant:"text-md/normal"},"No plugins meet search criteria.")),o(y.FormDivider,null),o(y.FormTitle,{tag:"h5",className:ie(V.marginTop20,V.marginBottom8)},"Required Plugins"),o("div",{style:Ps},s?.length?s.filter(h=>h.required||ks(h.name,r).length&&v(h)).map(h=>{let w=r[h.name]?.filter(B=>t.plugins[B].enabled)?.length,P=h.required?"This plugin is required for Vencord to function.":Df(ks(h.name,r));return o(me,{text:P,key:h.name},({onMouseLeave:B,onMouseEnter:_})=>o(Lp,{onMouseLeave:B,onMouseEnter:_,onRestartNeeded:oe=>n.handleChange(oe),disabled:h.required||!!w,plugin:h}))}):o(Y,{variant:"text-md/normal"},"No plugins meet search criteria.")))},{message:"Failed to render the Plugin Settings. If this persists, try using the installer to reinstall!",onError:Sp})});var Ep,Fp=m(()=>{"use strict";i();ne();Is();Ep=D.wrap(So)});function Of({link:e}){let[t,n,r]=ve(()=>fetch(e).then(a=>{if(a.status>300)throw`${a.status} ${a.statusText}`;let c=a.headers.get("Content-Type");if(!c?.startsWith("text/css")&&!c?.startsWith("text/plain"))throw"Not a CSS file. Remember to use the raw link!";return"Okay!"})),s=r?"Checking...":n?`Error: ${n instanceof Error?n.message:String(n)}`:"Valid!";return o(y.FormText,{style:{color:r?"var(--text-muted)":n?"var(--text-danger)":"var(--text-positive)"}},s)}function Bf({themeLinks:e}){return e.length?o(l,null,o(y.FormTitle,{className:V.marginTop20,tag:"h5"},"Validator"),o(y.FormText,null,"This section will tell you whether your themes can successfully be loaded"),o("div",null,e.map(t=>o(Te,{style:{padding:".5em",marginBottom:".5em"},key:t},o(y.FormTitle,{tag:"h5",style:{overflowWrap:"break-word"}},t),o(Of,{link:t}))))):null}var Nf,Dp,Np=m(()=>{"use strict";i();R();ne();wt();O();L();k();Nf=Ae(e=>typeof e.textarea=="string");Dp=D.wrap(function(){let e=De(),t=b.useRef();function n(){e.themeLinks=[...new Set(t.current.value.trim().split(/\n+/).map(r=>r.trim()).filter(Boolean))]}return o(l,null,o(Te,{style:{padding:"1em",marginBottom:"1em",marginTop:"1em"}},o(y.FormTitle,{tag:"h5"},"Paste links to .css / .theme.css files here"),o(y.FormText,null,"One link per line"),o(y.FormText,null,"Be careful to use the raw links or github.io links!"),o(y.FormDivider,null),o(y.FormTitle,{tag:"h5"},"Find Themes:"),o("div",null,o(Pe,{style:{marginRight:".5em"},href:"https://betterdiscord.app/themes"},"BetterDiscord Themes"),o(Pe,{href:"https://github.com/search?q=discord+theme"},"Github")),o(y.FormText,null,'If using the BD site, click on "Source" somewhere below the Download button'),o(y.FormText,null,'In the GitHub repository of your theme, find X.theme.css / X.css, click on it, then click the "Raw" button'),o(y.FormText,null,"If the theme has configuration that requires you to edit the file:",o("ul",null,o("li",null,"\u2022 Make a github account"),o("li",null,"\u2022 Click the fork button on the top right"),o("li",null,"\u2022 Edit the file"),o("li",null,"\u2022 Use the link to your own repository instead")))),o(y.FormTitle,{tag:"h5"},"Themes"),o(Wo,{style:{padding:".5em",border:"1px solid var(--background-modifier-accent)"},ref:t,defaultValue:e.themeLinks.join(` -`),className:Nf.textarea,placeholder:"Theme Links",spellCheck:!1,onBlur:n}),o(Bf,{themeLinks:e.themeLinks}))})});var Op=m(()=>{"use strict";i();ne();qn();Ne();ys();wt();O();Tn();k();nn()});function Uf(){let[e,,t]=ve(()=>VencordNative.ipc.invoke(j.GET_SETTINGS_DIR),{fallbackValue:"Loading..."}),n=De(),[r]=b.useState(Math.random()>.5?"https://cdn.discordapp.com/emojis/1026533090627174460.png":"https://media.discordapp.net/stickers/1039992459209490513.png");return o(b.Fragment,null,o(Hf,{image:r}),o(y.FormSection,{title:"Quick Actions"},o(Te,{className:$f("QuickActionCard")},o(F,{onClick:()=>VencordNative.ipc.send(j.OPEN_EXTERNAL,e),size:F.Sizes.SMALL,disabled:e==="Loading..."},"Launch Directory"))),o(y.FormDivider,null),o(y.FormSection,{title:"Settings"},o(y.FormText,{className:V.marginBottom20},'Hint: You can change the position of this settings section in the settings of the "Settings" plugin!'),o(bt,{value:n.useQuickCss,onChange:s=>n.useQuickCss=s,note:"Loads styles from your QuickCss file"},"Use QuickCss"),!1))}function Hf({image:e}){return o(Te,{style:{padding:"1em",display:"flex",flexDirection:"row",marginBottom:"1em",marginTop:"1em"}},o("div",null,o(y.FormTitle,{tag:"h5"},"Support the Project"),o(y.FormText,null,"Please consider supporting the Development of Vencord by donating!"),o(on,{style:{transform:"translateX(-1em)"}})),o("img",{role:"presentation",src:e,alt:"",height:128,style:{marginLeft:"auto",transform:"rotate(10deg)"}}))}var $f,Bp,$p=m(()=>{"use strict";i();R();sr();ne();ze();O();k();$f=e=>`vcSettings${e}`;Bp=D.wrap(Uf)});var Gp={};ee(Gp,{default:()=>Ms});function jf(e){let{tab:t="VencordSettings"}=e,n=Hp[t]?.component;return o(y.FormSection,null,o(Y,{variant:"heading-md/normal",tag:"h2"},"Vencord Settings"),o(xo,{type:xo.Types.TOP,look:xo.Looks.BRAND,className:Up("TabBar"),selectedItem:t,onItemSelect:jn.open},Object.entries(Hp).map(([r,{name:s,component:a}])=>a?o(xo.Item,{id:r,className:Up("TabBarItem"),key:r},s):null)),o(y.FormDivider,null),n&&o(n,null))}function Ms(e){return o(D,null,o(jf,{tab:e.tab}))}var jp,Up,xo,Hp,Rs=m(()=>{"use strict";i();ne();L();k();dp();hp();Fp();Np();Op();$p();jp=document.createElement("style");jp.textContent=pp;document.head.appendChild(jp);Up=e=>`vcSettings${e}`,xo=re('[role="tab"][aria-disabled="false"]'),Hp={VencordSettings:{name:"Vencord",component:()=>o(Bp,null)},VencordPlugins:{name:"Plugins",component:()=>o(Ep,null)},VencordThemes:{name:"Themes",component:()=>o(Dp,null)},VencordUpdater:{name:"Updater"},VencordSettingsSync:{name:"Backup & Restore",component:()=>o(gp,null)}}});var kn,Cs,zp=m(()=>{"use strict";i();R();x();le();O();T();nn();kn=Q(()=>(Rs(),Ao(Gp)).default),Cs=u({name:"Settings",description:"Adds Settings UI and debug info",authors:[p.Ven,p.Megu],required:!0,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(S.plugins.Settings.settingsLocation){case"top":return/\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.USER_SETTINGS\}/;case"aboveNitro":return/\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.BILLING_SETTINGS\}/;case"belowNitro":return/\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.APP_SETTINGS\}/;case"aboveActivity":return/\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.ACTIVITY_SETTINGS\}/;case"belowActivity":return/(?<=\{section:(.{1,2})\.ID\.DIVIDER},)\{section:"changelog"/;case"bottom":return/\{section:(.{1,2})\.ID\.CUSTOM,\s*element:.+?}/;default:return new N("Settings").error(new Error("No switch case matched????? Don't mess with the settings, silly")),/(?!a)a/}},replace:(e,t)=>{let n="",r="";return`{section:${t}.ID.HEADER,label:"Vencord"},{section:"VencordSettings",label:"Vencord",element:Vencord.Plugins.plugins.Settings.tabs.vencord},{section:"VencordPlugins",label:"Plugins",element:Vencord.Plugins.plugins.Settings.tabs.plugins},{section:"VencordThemes",label:"Themes",element:Vencord.Plugins.plugins.Settings.tabs.themes},`+n+'{section:"VencordSettingsSync",label:"Backup & Restore",element:Vencord.Plugins.plugins.Settings.tabs.sync},'+r+`{section:${t}.ID.DIVIDER},${e}`}}}],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}},tabs:{vencord:()=>o(kn,{tab:"VencordSettings"}),plugins:()=>o(kn,{tab:"VencordPlugins"}),themes:()=>o(kn,{tab:"VencordThemes"}),updater:()=>o(kn,{tab:"VencordUpdater"}),sync:()=>o(kn,{tab:"VencordSettingsSync"})},get electronVersion(){return VencordNative.getVersions().electron||window.armcord?.electron||null},get chromiumVersion(){try{return VencordNative.getVersions().chrome||navigator.userAgentData?.brands?.find(e=>e.brand==="Chromium"||e.brand==="Google Chrome")?.version||null}catch{return null}},get additionalInfo(){return" (Web)"},makeInfoElements(e,t){let{electronVersion:n,chromiumVersion:r,additionalInfo:s}=this;return o(l,null,o(e,{...t},"Vencord ",Tt,s),n&&o(e,{...t},"Electron ",n),r&&o(e,{...t},"Chromium ",r))}})});var Wp,qp,Kp=m(()=>{"use strict";i();Wp=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),qp=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(" ")});var Yp,Qp=m(()=>{i();Yp=`.shiki-root { - border-radius: 4px; -} - -.shiki-root code { - display: block; - overflow-x: auto; - padding: 0.5em; - position: relative; - - font-size: 0.875rem; - line-height: 1.125rem; - text-indent: 0; - white-space: pre-wrap; - background: transparent; - border: none; -} - -.shiki-root [class^='devicon-'], -.shiki-root [class*=' devicon-'] { - margin-right: 8px; - user-select: none; -} - -.shiki-plain code { - padding-top: 8px; -} - -.shiki-btns { - font-size: 1em; + `},async toggleHide(e){let t=await vv();t.delete(e)||t.add(e),await $2(t),await this.buildCss()}})});var Vu,Tv=m(()=>{"use strict";a();w();b();Vu=g({name:"iLoveSpam",description:"Do not hide messages from 'likely spammers'",authors:[p.botato,p.Animal],patches:[{find:"),{hasFlag:",replacement:{match:/(if\((.{1,2})<=1<<30\)return)/,replace:"if($2===(1<<20)){return false};$1"}}]})});function H2(){return o("svg",{className:hr.overlayToggleIconOff,height:"24",width:"24",viewBox:"0 2.2 32 26","aria-hidden":!0,role:"img"},o("g",{fill:"none",fillRule:"evenodd"},o("path",{className:hr.fill,fill:"currentColor",d:"M 16 8 C 7.664063 8 1.25 15.34375 1.25 15.34375 L 0.65625 16 L 1.25 16.65625 C 1.25 16.65625 7.097656 23.324219 14.875 23.9375 C 15.246094 23.984375 15.617188 24 16 24 C 16.382813 24 16.753906 23.984375 17.125 23.9375 C 24.902344 23.324219 30.75 16.65625 30.75 16.65625 L 31.34375 16 L 30.75 15.34375 C 30.75 15.34375 24.335938 8 16 8 Z M 16 10 C 18.203125 10 20.234375 10.601563 22 11.40625 C 22.636719 12.460938 23 13.675781 23 15 C 23 18.613281 20.289063 21.582031 16.78125 21.96875 C 16.761719 21.972656 16.738281 21.964844 16.71875 21.96875 C 16.480469 21.980469 16.242188 22 16 22 C 15.734375 22 15.476563 21.984375 15.21875 21.96875 C 11.710938 21.582031 9 18.613281 9 15 C 9 13.695313 9.351563 12.480469 9.96875 11.4375 L 9.9375 11.4375 C 11.71875 10.617188 13.773438 10 16 10 Z M 16 12 C 14.34375 12 13 13.34375 13 15 C 13 16.65625 14.34375 18 16 18 C 17.65625 18 19 16.65625 19 15 C 19 13.34375 17.65625 12 16 12 Z M 7.25 12.9375 C 7.09375 13.609375 7 14.285156 7 15 C 7 16.753906 7.5 18.394531 8.375 19.78125 C 5.855469 18.324219 4.105469 16.585938 3.53125 16 C 4.011719 15.507813 5.351563 14.203125 7.25 12.9375 Z M 24.75 12.9375 C 26.648438 14.203125 27.988281 15.507813 28.46875 16 C 27.894531 16.585938 26.144531 18.324219 23.625 19.78125 C 24.5 18.394531 25 16.753906 25 15 C 25 14.285156 24.90625 13.601563 24.75 12.9375 Z"}),o("rect",{className:hr.fill,x:"3",y:"26",width:"26",height:"2",transform:"rotate(-45 2 20)"})))}function z2({forceWhite:e}){return o("svg",{className:hr.overlayToggleIconOn,height:"24",width:"24",viewBox:"0 2.2 32 26"},o("path",{className:e?"":hr.fill,fill:e?"var(--white-500)":"",d:"M 16 8 C 7.664063 8 1.25 15.34375 1.25 15.34375 L 0.65625 16 L 1.25 16.65625 C 1.25 16.65625 7.097656 23.324219 14.875 23.9375 C 15.246094 23.984375 15.617188 24 16 24 C 16.382813 24 16.753906 23.984375 17.125 23.9375 C 24.902344 23.324219 30.75 16.65625 30.75 16.65625 L 31.34375 16 L 30.75 15.34375 C 30.75 15.34375 24.335938 8 16 8 Z M 16 10 C 18.203125 10 20.234375 10.601563 22 11.40625 C 22.636719 12.460938 23 13.675781 23 15 C 23 18.613281 20.289063 21.582031 16.78125 21.96875 C 16.761719 21.972656 16.738281 21.964844 16.71875 21.96875 C 16.480469 21.980469 16.242188 22 16 22 C 15.734375 22 15.476563 21.984375 15.21875 21.96875 C 11.710938 21.582031 9 18.613281 9 15 C 9 13.695313 9.351563 12.480469 9.96875 11.4375 L 9.9375 11.4375 C 11.71875 10.617188 13.773438 10 16 10 Z M 16 12 C 14.34375 12 13 13.34375 13 15 C 13 16.65625 14.34375 18 16 18 C 17.65625 18 19 16.65625 19 15 C 19 13.34375 17.65625 12 16 12 Z M 7.25 12.9375 C 7.09375 13.609375 7 14.285156 7 15 C 7 16.753906 7.5 18.394531 8.375 19.78125 C 5.855469 18.324219 4.105469 16.585938 3.53125 16 C 4.011719 15.507813 5.351563 14.203125 7.25 12.9375 Z M 24.75 12.9375 C 26.648438 14.203125 27.988281 15.507813 28.46875 16 C 27.894531 16.585938 26.144531 18.324219 23.625 19.78125 C 24.5 18.394531 25 16.753906 25 15 C 25 14.285156 24.90625 13.601563 24.75 12.9375 Z"}))}function wv({activity:e,forceWhite:t,forceLeftMargin:n}){let r=Lt();return o(W,{text:"Toggle activity"},({onMouseLeave:i,onMouseEnter:s})=>o("div",{onMouseLeave:i,onMouseEnter:s,className:hr.overlayToggleIcon,role:"button","aria-label":"Toggle activity",tabIndex:0,style:n?{marginLeft:"2px"}:void 0,onClick:l=>W2(l,e,r)},Vt.has(e.id)?o(H2,null):o(z2,{forceWhite:t})))}function j2({activity:e}){return o("div",{className:`${U2.tryItOutBadge} ${G2.baseShapeRound}`,style:{padding:"0px 2px",height:28}},o(wv,{activity:e,forceWhite:!0}))}function W2(e,t,n){e.stopPropagation(),Vt.has(t.id)?Vt.delete(t.id):Vt.set(t.id,t),n(),ep()}async function ep(){await Ve("IgnoreActivities_ignoredActivities",Vt)}var hr,U2,G2,xv,Vt,tp,Pv=m(()=>{"use strict";a();Cn();ie();w();ve();b();O();T();hr=P("overlayToggleIconOff","overlayToggleIconOn"),U2=P("tryItOutBadge","tryItOutBadgeIcon"),G2=P("baseShapeRound","baseShapeRoundLeft","baseShapeRoundRight"),xv=ae("RunningGameStore");Vt=new Map,tp=g({name:"IgnoreActivities",authors:[p.Nuckyz],description:"Ignore certain activities (like games and actual activities) from showing up on your status. You can configure which ones are ignored from the Registered Games and Activities tabs.",patches:[{find:".Messages.SETTINGS_GAMES_TOGGLE_OVERLAY",replacement:{match:/!(\i)(\)return null;var \i=(\i)\.overlay.+?children:)(\[.{0,70}overlayStatusText.+?\])(?=}\)}\(\))/,replace:(e,t,n,r,i)=>`false${n}(${t}?${i}:[]).concat(Vencord.Plugins.plugins.IgnoreActivities.renderToggleGameActivityButton(${r}))`}},{find:".overlayBadge",replacement:[{match:/(?<=\(\)\.badgeContainer,children:).{0,50}?name:(\i)\.name.+?null/,replace:(e,t)=>`[${e},$self.renderToggleActivityButton(${t})]`},{match:/(?<=\(\)\.badgeContainer,children:).{0,50}?name:(\i\.application)\.name.+?null/,replace:(e,t)=>`${e},$self.renderToggleActivityButton(${t})`}]},{find:'.displayName="LocalActivityStore"',replacement:{match:/LISTENING.+?\)\);(?<=(\i)\.push.+?)/,replace:(e,t)=>`${e}${t}=${t}.filter($self.isActivityNotIgnored);`}}],async start(){let e=await Qe("IgnoreActivities_ignoredActivities")??new Map;if(Array.isArray(e)){for(let t of e)Vt.set(t,{id:t,type:0});await ep()}else Vt=e;if(Vt.size!==0){let t=xv.getGamesSeen();for(let n of Vt.values())n.type===0&&(t.some(r=>r.id===n.id||r.exePath===n.id)||Vt.delete(n.id));await ep()}},renderToggleGameActivityButton(e){return o(A,{noop:!0},o(wv,{activity:{id:e.id??e.exePath,type:0},forceLeftMargin:!0}))},renderToggleActivityButton(e){return o(A,{noop:!0},o(j2,{activity:{id:e.id,type:1}}))},isActivityNotIgnored(e){if(e.type===0){if(e.application_id!==void 0)return!Vt.has(e.application_id);{let t=xv.getRunningGames().find(n=>n.name===e.name)?.exePath;if(t)return!Vt.has(t)}}return!0}})});var yi,np=m(()=>{"use strict";a();yi="vc-imgzoom-magnify-modal"});function op(e,t){e()?t():requestAnimationFrame(()=>op(e,t))}var Mv=m(()=>{"use strict";a()});var q2,rp,Iv=m(()=>{"use strict";a();Ge();T();np();ip();Mv();q2=Ee("vc-imgzoom-"),rp=({instance:e,size:t,zoom:n})=>{let[r,i]=V(!1),[s,l]=V({x:0,y:0}),[c,u]=V({x:0,y:0}),[h,f]=V(0),y=Xt(!1),S=Xt(n),x=Xt(t),R=Xt(null),C=Xt(null),_=Xt(null),$=Xt(null);if(I.useLayoutEffect(()=>{let q=ne=>{ne.key==="Shift"&&(y.current=!0)},ee=ne=>{ne.key==="Shift"&&(y.current=!1)},j=()=>{C.current.currentTime=_.current.currentTime},z=ne=>{if(e.state.mouseOver&&e.state.mouseDown){let Be=x.current/2,De={x:ne.pageX,y:ne.pageY},ut=-((De.x-R.current.getBoundingClientRect().left)*S.current-Be),We=-((De.y-R.current.getBoundingClientRect().top)*S.current-Be);l({x:ne.x-Be,y:ne.y-Be}),u({x:ut,y:We}),f(1)}else f(0)},te=ne=>{e.state.mouseOver&&ne.button===0&&(S.current=xe.store.zoom,x.current=xe.store.size,document.getElementById("image-context")&&E.dispatch({type:"CONTEXT_MENU_CLOSE"}),z(ne),f(1))},U=()=>{f(0),xe.store.saveZoomValues&&(xe.store.zoom=S.current,xe.store.size=x.current)},Ne=async ne=>{if(e.state.mouseOver&&e.state.mouseDown&&!y.current){let Be=S.current+ne.deltaY/100*(xe.store.invertScroll?-1:1)*xe.store.zoomSpeed;S.current=Be<=1?1:Be,z(ne)}if(e.state.mouseOver&&e.state.mouseDown&&y.current){let Be=x.current+ne.deltaY*(xe.store.invertScroll?-1:1)*xe.store.zoomSpeed;x.current=Be<=50?50:Be,z(ne)}};return op(()=>e.state.readyState==="READY",()=>{let ne=document.getElementById(yi);R.current=ne,ne.firstElementChild.setAttribute("draggable","false"),e.props.animated&&(_.current=ne.querySelector("video"),_.current.addEventListener("timeupdate",j)),i(!0)}),document.addEventListener("keydown",q),document.addEventListener("keyup",ee),document.addEventListener("mousemove",z),document.addEventListener("mousedown",te),document.addEventListener("mouseup",U),document.addEventListener("wheel",Ne),()=>{document.removeEventListener("keydown",q),document.removeEventListener("keyup",ee),document.removeEventListener("mousemove",z),document.removeEventListener("mousedown",te),document.removeEventListener("mouseup",U),document.removeEventListener("wheel",Ne),xe.store.saveZoomValues&&(xe.store.zoom=S.current,xe.store.size=x.current)}},[]),!r)return null;let B=R.current.getBoundingClientRect();return o("div",{className:q2("lens",{"nearest-neighbor":xe.store.nearestNeighbour,square:xe.store.square}),style:{opacity:h,width:x.current+"px",height:x.current+"px",transform:`translate(${s.x}px, ${s.y}px)`}},e.props.animated?o("video",{ref:C,style:{position:"absolute",left:`${c.x}px`,top:`${c.y}px`},width:`${B.width*S.current}px`,height:`${B.height*S.current}px`,poster:e.props.src,src:_.current?.src??e.props.src,autoPlay:!0,loop:!0}):o("img",{ref:$,style:{position:"absolute",transform:`translate(${c.x}px, ${c.y}px)`},width:`${B.width*S.current}px`,height:`${B.height*S.current}px`,src:e.props.src,alt:""}))}});var sp,Cv=m(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/imageZoom/styles.css",{name:"src/plugins/imageZoom/styles.css",source:`.vc-imgzoom-lens { position: absolute; - right: 0; - bottom: 0; - opacity: 0; -} - -.shiki-root:hover .shiki-btns { - opacity: 1; -} - -.shiki-btn { - border-radius: 4px 4px 0 0; - padding: 4px 8px; -} - -.shiki-btn~.shiki-btn { - margin-left: 4px; -} - -.shiki-btn:last-child { - border-radius: 4px 0; -} - -.shiki-spinner-container { - align-items: center; - background-color: rgba(0, 0, 0, 0.6); - display: flex; - position: absolute; - justify-content: center; - top: 0; - right: 0; - bottom: 0; - left: 0; -} - -.shiki-preview { - margin-bottom: 2em; -} - -.shiki-lang { - padding: 0 5px; - margin-bottom: 6px; - font-weight: bold; - text-transform: capitalize; - display: flex; - align-items: center; -} - -.shiki-table { - border-collapse: collapse; - width: 100%; -} - -.shiki-table tr { - height: 19px; - width: 100%; -} - -.shiki-root td:first-child { - border-right: 1px solid transparent; - padding-left: 5px; - padding-right: 8px; - user-select: none; -} - -.shiki-root td:last-child { - padding-left: 8px; - word-break: break-word; - width: 100%; -} -`});var Xp=Qt((lk,As)=>{"use strict";i();var Gf=Object.prototype.hasOwnProperty,ye="~";function In(){}Object.create&&(In.prototype=Object.create(null),new In().__proto__||(ye=!1));function zf(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function Jp(e,t,n,r,s){if(typeof n!="function")throw new TypeError("The listener must be a function");var a=new zf(n,r||e,s),c=ye?ye+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function To(e,t){--e._eventsCount===0?e._events=new In:delete e._events[t]}function fe(){this._events=new In,this._eventsCount=0}fe.prototype.eventNames=function(){var t=[],n,r;if(this._eventsCount===0)return t;for(r in n=this._events)Gf.call(n,r)&&t.push(ye?r.slice(1):r);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(n)):t};fe.prototype.listeners=function(t){var n=ye?ye+t:t,r=this._events[n];if(!r)return[];if(r.fn)return[r.fn];for(var s=0,a=r.length,c=new Array(a);s{"use strict";i();Object.defineProperty(jt,"__esModule",{value:!0});jt.Channel=jt.ChannelPort=void 0;var Wf=Xp(),wo="vapIpc",_s=Symbol.for("vapIpc.edgeCreate"),Ls=class{_pipes=new Map;_listeners=new Map;_createListenerMap(){return new Map}_emit(t,n,...r){for(let[s,a]of this._listeners.entries()){if(s===t)continue;let c=a.get(n);c&&c(...r)}}createPipe(t){let n=this.getPipe(t);if(n)return n;let r=this._createListenerMap();this._listeners.set(t,r);let s={emit:this._emit.bind(this,t),listen:(a,c)=>void r.set(a,c)};return this._pipes.set(t,s),s}getPipe(t){return this._pipes.get(t)??null}};jt.ChannelPort=Ls;var Es=class{id;_edges=new Map;_callbacks=new Map;_callers=new Map;_edgePipes=new Map;_pipes=[];_emitter=new Wf.EventEmitter;_logger;_destroyed=!1;constructor(t){this.id=t}addPipe(t){t.listen(`${wo}:handshake`,n=>{this._handleHandshake(t,n)}),t.listen(`${wo}: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 s=n.channelIds.filter(a=>!r?.channelIds.includes(a));if(s.includes(this.id)&&s.splice(s.indexOf(this.id),1),!s.length)return;this._edges.set(n.id,{...n,channelIds:[...r.channelIds,...s]})}else{let s=[...n.channelIds].filter(a=>a!==this.id);this._edges.set(n.id,{...n,channelIds:s}),this._edgePipes.set(n.id,t)}this._emitter.emit(_s,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 s=this._callers.get(n.name);if(s){s(n.data).catch(a=>(console.error(a),new Error(a?.message??`${a}`))).then(a=>{this._emitMessage({name:n.name,source:this.id,destination:n.source,data:a,nonce:n.nonce})});return}}_emitHandshake(t){let n=this.getEdge();t.emit(`${wo}:handshake`,n)}_emitMessage(t){let n=this.findEdgeId(t.destination);if(!n)return;this._edgePipes.get(n)?.emit(`${wo}:message`,t)}getEdge(){let t=[...this._edges.keys(),...[...this._edges.values()].map(n=>n.channelIds).flat()].filter((n,r,s)=>s.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 s=a=>{(a.id===t||a.channelIds.includes(t))&&(this._emitter.off(_s,s),r(a.id))};this._emitter.on(_s,s)})}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(),s=new Promise((a,c)=>{let f=setTimeout(()=>{this._callbacks.delete(r),c(new Error("Call timed out"))},n.timeout);this._callbacks.set(r,d=>{this._callbacks.delete(r),clearTimeout(f),n.signal?.aborted?n.signal.reason instanceof Error&&c(n.signal.reason):d instanceof Error?c(d):a(d)})});return this._emitMessage({...t,source:this.id,nonce:r}),s}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}};jt.Channel=Es});var Os=Qt(Gt=>{"use strict";i();Object.defineProperty(Gt,"__esModule",{value:!0});Gt.RemoteClient=Gt.RemoteHost=void 0;var Ds=class{channel;constructor(t,n){this.channel=t;for(let[r,s]of Object.entries(n))t.onCall(r,async a=>await s(...a));t.handshakeAll()}};Gt.RemoteHost=Ds;var Ns=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})}};Gt.RemoteClient=Ns});var ed=Qt(zt=>{"use strict";i();Object.defineProperty(zt,"__esModule",{value:!0});zt.WorkerClient=zt.createWorkerHost=void 0;var Zp=Fs(),Vp=Os(),qf=(e,t)=>{let n=new Zp.Channel(e);return n.addPipe({emit:(r,s)=>postMessage({event:r,data:s}),listen:(r,s)=>addEventListener("message",({data:a})=>{a.event===r&&s(a.data)})}),new Vp.RemoteHost(n,t)};zt.createWorkerHost=qf;var Bs=class extends Vp.RemoteClient{workerOpts;worker;workerListeners=[];url;constructor(t,n,r,s={}){let a=new Zp.Channel(t);if(super(n,a),this.workerOpts=s,r instanceof Blob){let c=new Blob([r],{type:"text/javascript"});this.url=URL.createObjectURL(c)}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 s=a=>{let{event:c,data:f}=a.data;c===n&&r(f)};this.workerListeners.push(s),t.addEventListener("message",s)}}),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)}};zt.WorkerClient=Bs});var td=Qt(rt=>{"use strict";i();var Kf=rt&&rt.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var s=Object.getOwnPropertyDescriptor(t,n);(!s||("get"in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,s)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),$s=rt&&rt.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Kf(t,e,n)};Object.defineProperty(rt,"__esModule",{value:!0});$s(Fs(),rt);$s(Os(),rt);$s(ed(),rt)});function Hs(e){Po.id!==e.id&&(Object.assign(Po,e),Us.forEach(t=>t(e)))}var Po,Us,nd,js=m(()=>{"use strict";i();k();Po={id:null,theme:null},Us=new Set,nd=()=>{let[,e]=b.useState(Po);return b.useEffect(()=>(Us.add(e),()=>void Us.delete(e)),[]),Po}});function At(e){if(Object.prototype.hasOwnProperty.call(Wt,e))return Wt[e];let t=Object.values(Wt).find(n=>n.aliases?.includes(e));return t?(Zf.set(e,t),t):null}var Yf,Qf,od,Jf,Xf,Wt,rd,id,Zf,ko=m(()=>{"use strict";i();Yf="Vap0r1ze/vapcord",Qf="88a7032a59cca40da170926651b08201ea3b965a",od=`https://raw.githubusercontent.com/${Yf}/${Qf}/assets/shiki-codeblocks`,Jf=e=>`${od}/${e}`,Xf=`${od}/languages.json`,Wt={},rd=async()=>{let e=await fetch(Xf).then(n=>n.json()),t=Object.fromEntries(e.map(n=>[n.id,{...n,grammarUrl:Jf(n.fileName)}]));Object.assign(Wt,t)},id=e=>e.grammar?Promise.resolve(e.grammar):fetch(e.grammarUrl).then(t=>t.json()),Zf=new Map});var Vf,eg,z,it,Gs=m(()=>{"use strict";i();Vf="shikijs/shiki",eg="0b28ad8ccfbf2615f2d9d38ea8255416b8ac3043",z=e=>`https://raw.githubusercontent.com/${Vf}/${eg}/packages/shiki/themes/${e}.json`,it={DarkPlus:z("dark-plus"),MaterialCandy:"https://raw.githubusercontent.com/millsp/material-candy/master/material-candy.json",DraculaSoft:z("dracula-soft"),Dracula:z("dracula"),GithubDarkDimmed:z("github-dark-dimmed"),GithubDark:z("github-dark"),GithubLight:z("github-light"),LightPlus:z("light-plus"),MaterialDarker:z("material-darker"),MaterialDefault:z("material-default"),MaterialLighter:z("material-lighter"),MaterialOcean:z("material-ocean"),MaterialPalenight:z("material-palenight"),MinDark:z("min-dark"),MinLight:z("min-light"),Monokai:z("monokai"),Nord:z("nord"),OneDarkPro:z("one-dark-pro"),Poimandres:z("poimandres"),RosePineDawn:z("rose-pine-dawn"),RosePineMoon:z("rose-pine-moon"),RosePine:z("rose-pine"),SlackDark:z("slack-dark"),SlackOchin:z("slack-ochin"),SolarizedDark:z("solarized-dark"),SolarizedLight:z("solarized-light"),VitesseDark:z("vitesse-dark"),VitesseLight:z("vitesse-light"),CssVariables:z("css-variables")}});var ad,zs,sd,H,Ws=m(()=>{"use strict";i();Qn();ad=Ra(td());js();ko();Gs();zs=Object.values(it),H={client:null,currentTheme:null,currentThemeUrl:null,timeoutMs:1e4,languages:Wt,themes:it,loadedThemes:new Set,loadedLangs:new Set,clientPromise:new Promise(e=>sd=e),init:async e=>{let t=await fetch(Mc).then(s=>s.blob()),n=H.client=new ad.WorkerClient("shiki-client","shiki-host",t,{name:"ShikiWorker"});await n.init();let r=e||zs[0];await rd(),await n.run("setOnigasm",{wasm:Rc}),await n.run("setHighlighter",{theme:r,langs:[]}),H.loadedThemes.add(r),await H._setTheme(r),sd(n)},_setTheme:async e=>{H.currentThemeUrl=e;let{themeData:t}=await H.client.run("getTheme",{theme:e});H.currentTheme=JSON.parse(t),Hs({id:e,theme:H.currentTheme})},loadTheme:async e=>{let t=await H.clientPromise;H.loadedThemes.has(e)||(await t.run("loadTheme",{theme:e}),H.loadedThemes.add(e))},setTheme:async e=>{await H.clientPromise,e||=zs[0],H.loadedThemes.has(e)||await H.loadTheme(e),await H._setTheme(e)},loadLang:async e=>{let t=await H.clientPromise,n=At(e);!n||H.loadedLangs.has(n.id)||(await t.run("loadLanguage",{lang:{...n,grammar:n.grammar??await id(n)}}),H.loadedLangs.add(n.id))},tokenizeCode:async(e,t)=>{let n=await H.clientPromise,r=At(t);return r?(H.loadedLangs.has(r.id)||await H.loadLang(r.id),await n.run("codeToThemedTokens",{code:e,lang:t,theme:H.currentThemeUrl??zs[0]})):[]},destroy(){H.currentTheme=null,H.currentThemeUrl=null,Hs({id:null,theme:null}),H.client?.destroy()}}});var cd,ld=m(()=>{"use strict";i();k();O();cd=(e=!1)=>{let t=b.useRef(null),[n,r]=b.useState(!1);return[a=>{t.current?.disconnect(),t.current=null,a&&(Jo(a)&&(r(!0),e)||(t.current=new IntersectionObserver(c=>{for(let f of c)f.target===a&&(f.isIntersecting&&e?(r(!0),t.current?.disconnect(),t.current=null):r(f.isIntersecting))}),t.current.observe(a)))},n]}});function pd(e){return De(e.map(t=>`plugins.ShikiCodeblocks.${t}`)).plugins.ShikiCodeblocks}var dd=m(()=>{"use strict";i();R()});function md(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 ud=m(()=>{"use strict";i()});var Io=m(()=>{"use strict";i()});var je,fd,Mn=m(()=>{"use strict";i();k();ko();Io();je=e=>`shiki-${e}`,fd=({lang:e,tryHljs:t})=>{let n=e?Jt?.getLanguage?.(e):null,s=(e?At(e):null)?.name;switch(t){case"ALWAYS":return!0;case"PRIMARY":return!!n||e==="";case"SECONDARY":return!s&&!!n;case"NEVER":return!1}return!1}});function gd(e){let[t,n]=b.useState(!1);function r(s){Ee.copy(s),n(!0),setTimeout(()=>{n(!1)},e)}return[t,r]}var hd=m(()=>{"use strict";i();k()});function yd({content:e,...t}){let[n,r]=gd(1e3);return o("button",{...t,style:{...t.style,cursor:n?"default":void 0},onClick:()=>r(e)},n?"Copied!":"Copy")}var vd=m(()=>{"use strict";i();hd()});function bd({content:e,theme:t}){let n=[];return Ee.SUPPORTS_COPY&&n.push(o(yd,{content:e,className:je("btn"),style:{backgroundColor:t.accentBgColor,color:t.accentFgColor}})),o("div",{className:je("btns")},n)}var Sd=m(()=>{"use strict";i();k();Mn();vd()});var xd,Td=m(()=>{"use strict";i();Mn();xd=({theme:e,useHljs:t,lang:n,content:r,tokens:s})=>{let a;if(t)try{let{value:f}=hljs.highlight(n,r,!0);a=f.split(` -`).map((d,v)=>o("span",{key:v,dangerouslySetInnerHTML:{__html:d}}))}catch{a=r.split(` -`).map(f=>o("span",null,f))}else a=(s??r.split(` -`).map(d=>[{color:e.plainColor,content:d}])).map(d=>d.length===0?o("span",null,` -`):o(l,null,d.map(({content:v,color:h,fontStyle:g},w)=>o("span",{key:w,style:{color:h,fontStyle:(g??0)&1?"italic":void 0,fontWeight:(g??0)&2?"bold":void 0,textDecoration:(g??0)&4?"underline":void 0}},v))));let c=a.map((f,d)=>o("tr",{key:d},o("td",{style:{color:e.plainColor}},d+1),o("td",null,f)));return o("table",{className:je("table")},...c)}});function wd({langName:e,useDevIcon:t,shikiLang:n}){return e?o("div",{className:je("lang")},t!=="DISABLED"&&n?.devicon&&o("i",{className:`devicon-${n.devicon}${t==="COLOR"?" colored":""}`}),e):o(l,null)}var Pd=m(()=>{"use strict";i();Io();Mn()});var qs,og,kd=m(()=>{"use strict";i();ne();O();ld();k();ko();Ws();dd();js();ud();Mn();Sd();Td();Pd();qs=e=>o(D,null,o(og,{...e})),og=({lang:e,content:t,isPreview:n})=>{let{tryHljs:r,useDevIcon:s,bgOpacity:a}=pd(["tryHljs","useDevIcon","bgOpacity"]),{id:c,theme:f}=nd(),d=e?At(e):null,v=fd({lang:e,tryHljs:r}),[h,g]=cd(!0),[w]=ve(async()=>!d||v||!g?null:await H.tokenizeCode(t,e),{fallbackValue:null,deps:[e,t,c,g]}),P={plainColor:f?.fg||"var(--text-normal)",accentBgColor:f?.colors?.["statusBar.background"]||(v?"#7289da":"#007BC8"),accentFgColor:f?.colors?.["statusBar.foreground"]||"#FFF",backgroundColor:f?.colors?.["editor.background"]||"var(--background-secondary)"},B;e&&(B=v?Jt?.getLanguage?.(e)?.name:d?.name);let _=[je("root")];return B||_.push(je("plain")),n&&_.push(je("preview")),o("pre",{ref:h,className:_.join(" "),style:{backgroundColor:v?P.backgroundColor:`rgba(${md(P.backgroundColor).concat(a/100).join(", ")})`,color:P.plainColor}},o("code",null,o(wd,{langName:B,useDevIcon:s,shikiLang:d}),o(xd,{theme:P,useHljs:v,lang:e,content:t,tokens:w}),!n&&o(bd,{content:t,theme:P})))}});function Mo(e,t){let n=document.createElement("style");n.innerText=e,document.head.appendChild(n),Rn.set(t,n)}function Id(e){return Rn.get(e)?.remove(),Rn.delete(e)}var Rn,Md,Rd=m(()=>{"use strict";i();Rn=new Map;Md=()=>{Rn.forEach(e=>e.remove()),Rn.clear()}});var rg,Cd,Cn,Ks,Ad=m(()=>{"use strict";i();x();O();Kp();T();Qp();Ys();Ws();Gs();kd();Io();Rd();rg=Object.keys(it),Cd="@import url('https://cdn.jsdelivr.net/gh/devicons/devicon@v2.10.1/devicon.min.css');",Cn=()=>S.plugins.ShikiCodeblocks,Ks=u({name:"ShikiCodeblocks",description:"Brings vscode-style codeblocks into Discord, powered by Shiki",authors:[p.Vap],patches:[{find:"codeBlock:{react:function",replacement:{match:/codeBlock:\{react:function\((.),(.),(.)\)\{/,replace:"$&return Vencord.Plugins.plugins.ShikiCodeblocks.renderHighlighter($1,$2,$3);"}}],start:async()=>{Mo(Yp,"MAIN"),Cn().useDevIcon!=="DISABLED"&&Mo(Cd,"DEVICONS"),await H.init(Cn().customTheme||Cn().theme)},stop:()=>{H.destroy(),Md()},options:{theme:{type:4,description:"Default themes",options:rg.map(e=>({label:qp(Wp(e)),value:it[e],default:it[e]===it.DarkPlus})),disabled:()=>!!Cn().customTheme,onChange:H.setTheme},customTheme:{type:0,description:"A link to a custom vscode theme",placeholder:it.MaterialCandy,isValid:e=>{if(!e)return!0;let t=Qo(e);return t?t.pathname.endsWith(".json")?!0:"Must be a json file":"Must be a valid URL"},onChange:e=>H.setTheme(e||Cn().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"?Id("DEVICONS"):Mo(Cd,"DEVICONS")}},bgOpacity:{type:5,description:"Background opacity",markers:[0,20,40,60,80,100],default:100,stickToMarkers:!1}},shiki:H,createHighlighter:qs,renderHighlighter:({lang:e,content:t})=>qs({lang:e,content:t,isPreview:!1})})});var ig,sg,Qs,Js,_d=m(()=>{"use strict";i();R();Ne();x();Ye();T();L();k();ig=1048576n,sg=1024n,Qs=(e,t)=>!0;$(e=>e.can&&e.initialize,e=>({can:Qs}=e));Js=u({name:"ShowHiddenChannels",description:"Show hidden channels",authors:[p.BigDuck,p.AverageReactEnjoyer,p.D3SOX],options:{hideUnreads:{description:"Hide unreads",type:3,default:!0,restartNeeded:!0}},patches:[{find:".CannotShow",replacement:{match:/renderLevel:(\w+)\.CannotShow/g,replace:"renderLevel:Vencord.Plugins.plugins.ShowHiddenChannels.shouldShow(this.record, this.category, this.isMuted)?$1.Show:$1.CannotShow"}},{find:".rulesChannelId))",replacement:{match:/(\w+)\.locked(.*?)switch\((\w+)\.type\)({case \w+\.\w+\.GUILD_ANNOUNCEMENT)/g,replace:"Vencord.Plugins.plugins.ShowHiddenChannels.isHiddenChannel($3)||$1.locked$2switch($3._isHiddenChannel?2:$3.type)$4"}},{find:".handleThreadsPopoutClose();",replacement:{match:/((\w)\.handleThreadsPopoutClose\(\);)/g,replace:"if(arguments[0].button===0&&Vencord.Plugins.plugins.ShowHiddenChannels.channelSelected($2?.props?.channel))return;$1"}},{find:".prototype.shouldShowEmptyCategory=function(){",replacement:{match:/(\.prototype\.shouldShowEmptyCategory=function\(\){)/g,replace:"$1return true;"}},{find:'?"button":"link"',predicate:()=>S.plugins.ShowHiddenChannels.hideUnreads===!0,replacement:{match:/(\w)\.connected,(\w)=(\w\.unread),(\w=\w\.canHaveDot)/g,replace:"$1.connected,$2=Vencord.Plugins.plugins.ShowHiddenChannels.isHiddenChannel($1.channel)?false:$3,$4"}},{find:'.displayName="ChannelListUnreadsStore"',replacement:{match:/((.)\.getGuildId\(\))(&&\(!\(.\.isThread.{1,100}\.hasRelevantUnread\()/,replace:"$1&&!$2._isHiddenChannel$3"}}],shouldShow(e,t,n){return!this.isHiddenChannel(e)||!t||e.type===0&&t.guild?.hideMutedChannels&&n?!1:!t.isCollapsed},isHiddenChannel(e){return!e||(e.channelId&&(e=ae.getChannel(e.channelId)),!e||e.isDM()||e.isGroupDM()||e.isMultiUserDM())?!1:(e._isHiddenChannel=!Qs(sg,e)||e.type===2&&!Qs(ig,e),e._isHiddenChannel)},channelSelected(e){if(!e)return!1;let t=this.isHiddenChannel(e);if(e.type===0&&t){let n=e.lastActiveTimestamp?new Date(e.lastActiveTimestamp).toLocaleString():null;we(r=>o(Be,{size:"small",...r},o(nt,null,o(Z,null,o(Y,{variant:"heading-md/bold"},e.name),e.isNSFW()&&o(Y,{style:{backgroundColor:"var(--status-danger)",borderRadius:"8px",paddingLeft:4,paddingRight:4},variant:"heading-md/normal"},"NSFW"))),o(ot,{style:{marginBottom:10,marginTop:10,marginRight:8,marginLeft:8}},o(Y,{variant:"text-md/normal"},"You don't have the permission to view the messages in this channel."),(e.topic||"").length>0&&o(l,null,o(Y,{variant:"text-md/bold",style:{marginTop:10}},"Topic:"),o(Y,{variant:"code"},e.topic)),n&&o(l,null,o(Y,{variant:"text-md/bold",style:{marginTop:10}},"Last message sent:"),o(Y,{variant:"code"},n))),o(sn,null,o(Z,null,o(F,{onClick:r.onClose,size:F.Sizes.SMALL,color:F.Colors.PRIMARY},"Close")))))}return t}})});var Xs,Ld=m(()=>{"use strict";i();x();T();Xs=u({name:"SilentTyping",authors:[p.Ven],description:"Hide that you are typing",patches:[{find:"startTyping:",replacement:{match:/startTyping:.+?,stop/,replace:"startTyping:()=>{},stop"}}]})});var Ed,Fd=m(()=>{i();Ed=`#vc-spotify-player { - padding: 0.375rem 0.5rem; - border-bottom: 1px solid var(--background-modifier-accent); - --vc-spotify-green: #1db954; /* so cusotm themes can easily change it */ -} -.vc-spotify-button { - background: none; - color: var(--interactive-normal); - padding: 0; - width: 32px; - height: 32px; - - border-radius: 100%; - display: flex; - justify-content: center; - align-items: center; -} -.vc-spotify-button:hover { - color: var(--interactive-hover); - background-color: var(--background-modifier-selected); -} - -.vc-spotify-button svg { - height: 24px; - width: 24px; -} -[class*="vc-spotify-shuffle"] > svg, -[class*="vc-spotify-repeat"] > svg { - width: 22px; - height: 22px; -} -.vc-spotify-button svg path { - width: 100%; - height: 100%; -} -/* .vc-spotify-button:hover { - filter: brightness(1.3); -} */ - -.vc-spotify-shuffle-on, -.vc-spotify-repeat-context, -.vc-spotify-repeat-track, -.vc-spotify-shuffle-on:hover, -.vc-spotify-repeat-context:hover, -.vc-spotify-repeat-track:hover { - color: var(--vc-spotify-green); -} - -.vc-spotify-tooltip-text { + inset: 0; + z-index: 9999; + border: 2px solid grey; + border-radius: 50%; overflow: hidden; - white-space: nowrap; - padding-right: 0.2em; - max-width: 100%; + cursor: none; + box-shadow: inset 0 0 10px 2px grey; + filter: drop-shadow(0 0 2px grey); + pointer-events: none; } -.vc-spotify-repeat-1 { - font-size: 70%; - position: absolute; + +.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|="carouselModal"] { + height: fit-content; + box-shadow: none; +} + +[class*="modalCarouselWrapper"] { + height: fit-content; top: 50%; + transform: translateY(-50%); +} + +[class|="wrapper"]:has(> #vc-imgzoom-magnify-modal) { + position: absolute; left: 50%; + top: 50%; transform: translate(-50%, -50%); } - -.vc-spotify-button-row { - justify-content: center; +`,classNames:{},dom:null});sp="src/plugins/imageZoom/styles.css"});var xe,Nv,ap,ip=m(()=>{"use strict";a();Pt();D();Ge();Hs();w();nr();b();T();Iv();np();Cv();xe=k({saveZoomValues:{type:3,description:"Whether to save zoom and lens size values",default:!0},preventCarouselFromClosingOnClick:{type:3,description:"Allow the image modal in the image slideshow thing / carousel to remain open when clicking on the image",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:mr(1,50,4),default:2,stickToMarkers:!1},size:{description:"Radius / Size of the lens",type:5,markers:mr(50,1e3,50),default:100,stickToMarkers:!1},zoomSpeed:{description:"How fast the zoom / lens size changes",type:5,markers:mr(.1,5,.2),default:.5,stickToMarkers:!1}}),Nv=e=>()=>{e.push(o(L.MenuGroup,{id:"image-zoom"},o(L.MenuCheckboxItem,{id:"vc-square",label:"Square Lens",checked:xe.store.square,action:()=>{xe.store.square=!xe.store.square,cn.close()}}),o(L.MenuControlItem,{id:"vc-zoom",label:"Zoom",control:(t,n)=>o(L.MenuSliderControl,{ref:n,...t,minValue:1,maxValue:50,value:xe.store.zoom,onChange:At(r=>xe.store.zoom=r,100)})}),o(L.MenuControlItem,{id:"vc-size",label:"Lens Size",control:(t,n)=>o(L.MenuSliderControl,{ref:n,...t,minValue:50,maxValue:1e3,value:xe.store.size,onChange:At(r=>xe.store.size=r,100)})}),o(L.MenuControlItem,{id:"vc-zoom-speed",label:"Zoom Speed",control:(t,n)=>o(L.MenuSliderControl,{ref:n,...t,minValue:.1,maxValue:5,value:xe.store.zoomSpeed,onChange:At(r=>xe.store.zoomSpeed=r,100),renderValue:r=>`${r.toFixed(3)}x`})})))},ap=g({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:'"renderLinkComponent","maxWidth"',replacement:{match:/(return\(.{1,100}\(\)\.wrapper.{1,100})(src)/,replace:`$1id: '${yi}',$2`}},{find:"handleImageLoad=",replacement:[{match:/(render=function\(\){.{1,500}limitResponsiveWidth.{1,600})onMouseEnter:/,replace:"$1...$self.makeProps(this),onMouseEnter:"},{match:/componentDidMount=function\(\){/,replace:"$&$self.renderMagnifier(this);"},{match:/componentWillUnmount=function\(\){/,replace:"$&$self.unMountMagnifier();"}]},{find:".carouselModal,",replacement:{match:/onClick:(\i),/,replace:"onClick:$self.settings.store.preventCarouselFromClosingOnClick ? () => {} : $1,"}}],settings:xe,currentMagnifierElement:null,element:null,Magnifier:rp,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===yi&&(this.currentMagnifierElement||(this.currentMagnifierElement=o(rp,{size:xe.store.size,zoom:xe.store.zoom,instance:e}),this.root=_o.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(){Je(sp),pe("image-context",Nv),this.element=document.createElement("div"),this.element.classList.add("MagnifierContainer"),document.body.appendChild(this.element)},stop(){Mt(sp),this.root&&this.root.unmount(),this.element?.remove(),de("image-context",Nv)}})});function K2(e){let t=e?.message?.content,[n,r]=I.useState("password");return o(Le,{...e},o($e,null,o(v.FormTitle,{tag:"h4"},"Decrypt Message")),o(Ue,null,o(v.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Secret"),o(Re,{defaultValue:t,disabled:!0}),o(v.FormTitle,{tag:"h5"},"Password"),o(Re,{style:{marginBottom:"20px"},onChange:r})),o(Tt,null,o(N,{color:N.Colors.GREEN,onClick:()=>{let i=lp(t,n,!0);!i||!e?.message||(Vencord.Plugins.plugins.InvisibleChat.buildEmbed(e?.message,i),e.onClose())}},"Decrypt"),o(N,{color:N.Colors.TRANSPARENT,look:N.Looks.LINK,style:{left:15,position:"absolute"},onClick:e.onClose},"Cancel")))}function kv(e){Ce(t=>o(K2,{...t,...e}))}var Rv=m(()=>{"use strict";a();Ze();T();ia()});function Y2(e){let[t,n]=I.useState(""),[r,i]=I.useState(""),[s,l]=I.useState("password"),[c,u]=I.useState(!1),h=t&&(c||r&&/\w \w/.test(r));return o(Le,{...e},o($e,null,o(v.FormTitle,{tag:"h4"},"Encrypt Message")),o(Ue,null,o(v.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Secret"),o(Re,{onChange:f=>{n(f)}}),o(v.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Cover (2 or more Words!!)"),o(Re,{disabled:c,onChange:f=>{i(f)}}),o(v.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Password"),o(Re,{style:{marginBottom:"20px"},defaultValue:"password",onChange:f=>{l(f)}}),o(ft,{value:c,onChange:f=>{u(f)}},"Don't use a Cover")),o(Tt,null,o(N,{color:N.Colors.GREEN,disabled:!h,onClick:()=>{if(!h)return;let f=Ev(t,s,c?"d d":r),y=c?f.replaceAll("d",""):f;!y||(Hn(y),e.onClose())}},"Send"),o(N,{color:N.Colors.TRANSPARENT,look:N.Looks.LINK,style:{left:15,position:"absolute"},onClick:()=>{e.onClose()}},"Cancel")))}function Av(){Ce(e=>o(Y2,{...e}))}var Lv=m(()=>{"use strict";a();tt();Ze();T();ia()});function Z2(){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 X2(){return o(W,{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 J2(e){return e.type.analyticsName!=="normal"?null:o(W,{text:"Encrypt Message"},({onMouseEnter:t,onMouseLeave:n})=>o("div",{style:{display:"flex"}},o(N,{"aria-haspopup":"dialog","aria-label":"Encrypt Message",size:"",look:Zt.BLANK,onMouseEnter:t,onMouseLeave:n,innerClassName:mt.button,onClick:()=>Av(),style:{padding:"0 2px",scale:"0.9"}},o("div",{className:mt.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 Ev(e,t,n){return cp.hide(e+"\u200B",t,n)}function lp(e,t,n){let r=cp.reveal(e,t);return n?r.replace("\u200B",""):r}function Q2(e){return e.endsWith("\u200B")}async function V2(e){let t=Dv.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();Ko();D();ie();w();mi();b();T();Rv();Lv();Dv=k({savedPasswords:{type:0,default:"password, Password",description:"Saved Passwords (Seperated with a , )"}}),up=g({name:"InvisibleChat",description:"Encrypt your Messages in a non-suspicious way!",authors:[p.SammCheese],dependencies:["MessagePopoverAPI"],patches:[{find:".Messages.MESSAGE_EDITED,",replacement:{match:/var .,.,.=(.)\.className,.=.\.message,.=.\.children,.=.\.content,.=.\.onUpdate/gm,replace:"try {$1 && $self.INV_REGEX.test($1.message.content) ? $1.content.push($self.indicator()) : null } catch {};$&"}},{find:".activeCommandOption",replacement:{match:/(.)\.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:Dv,async start(){let{default:e}=await ev();cp=new e(!0,!1),bn("invDecrypt",t=>this.INV_REGEX.test(t?.content)?{label:"Decrypt Message",icon:this.popOverIcon,message:t,channel:Z.getChannel(t.channel_id),onClick:async()=>{await V2(t).then(n=>n?void this.buildEmbed(t,n):void kv({message:t}))}}:null)},stop(){Tn("invDecrypt")},async getEmbed(e){let{body:t}=await Dt.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=>{E.dispatch({type:"MESSAGE_UPDATE",message:e})},chatBarIcon:A.wrap(J2,{noop:!0}),popOverIcon:()=>o(Z2,null),indicator:A.wrap(X2,{noop:!0})})});function Ov(e,t){!Z.hasChannel(t)||Gr.transitionTo(`/channels/${e??"@me"}/${t}`)}var sa,en,pp,_v=m(()=>{"use strict";a();Cn();w();b();T();sa=!1;pp=g({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:sa}=e)},CONNECTION_OPEN(){!sa||(sa=!1,en?.channelId&&Ov(en.guildId,en.channelId))},async CHANNEL_SELECT({guildId:e,channelId:t}){sa||(en={guildId:e,channelId:t},await Ve("KeepCurrentChannel_previousData",en))}},async start(){en=await Qe("KeepCurrentChannel_previousData"),en?en.channelId&&Ov(en.guildId,en.channelId):(en={guildId:lo.getGuildId(),channelId:Pe.getChannelId()??null},await Ve("KeepCurrentChannel_previousData",en))}})});async function dp(e){return(await nP.getAsset(mp,[e,void 0]))[0]}function oP(e){E.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e,socketId:"LastFM"})}var mp,eP,Bv,tP,nP,xn,fp,Fv=m(()=>{"use strict";a();D();bo();w();be();b();O();T();mp="1108588077900898414",eP="2a96cbd8b46e442fc41c2b86b821562f",Bv=new Y("LastFMRichPresence"),tP=P("getLocalPresence"),nP=Ke("getAssetImage: size must === [number, number] for Twitch",{getAsset:K.byCode("apply(")});xn=k({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:"text shown in status",type:0,default:"some music"},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"}]}}),fp=g({name:"LastFMRichPresence",description:"Little plugin for Last.fm rich presence",authors:[p.dzshn,p.RuiNtD],settingsAboutComponent:()=>o(d,null,o(v.FormTitle,{tag:"h3"},"How to get an API key"),o(v.FormText,null,"An API key is required to fetch your current track. To get one, you can visit ",o(at,{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:xn,start(){this.updatePresence(),this.updateInterval=setInterval(()=>{this.updatePresence()},16e3)},stop(){clearInterval(this.updateInterval)},async fetchTrackData(){if(!xn.store.username||!xn.store.apiKey)return null;try{let e=new URLSearchParams({method:"user.getrecenttracks",api_key:xn.store.apiKey,user:xn.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 Bv.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 Bv.error("Failed to query Last.fm API",e),null}},async updatePresence(){oP(await this.getActivity())},getLargeImage(e){if(e.imageUrl&&!e.imageUrl.includes(eP))return e.imageUrl;if(xn.store.missingArt==="placeholder")return"placeholder"},async getActivity(){if(xn.store.hideWithSpotify){for(let i of tP.getActivities())if(i.type===2&&i.application_id!==mp)return null}let e=await this.fetchTrackData();if(!e)return null;let t=this.getLargeImage(e),n=t?{large_image:await dp(t),large_text:e.album||void 0,small_image:await dp("lastfm-small"),small_text:"Last.fm"}:{large_image:await dp("lastfm-large"),large_text:e.album||void 0},r=[{label:"View Song",url:e.url}];return xn.store.shareUsername&&r.push({label:"Last.fm Profile",url:`https://www.last.fm/user/${xn.store.username}`}),{application_id:mp,name:xn.store.statusName,details:e.name,state:e.artist,assets:n,buttons:r.map(i=>i.label),metadata:{button_urls:r.map(i=>i.url)},type:xn.store.useListeningStatus?2:0,flags:1}}})});var $v,gp,Uv=m(()=>{"use strict";a();w();b();$v=["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"],gp=g({name:"LoadingQuotes",description:"Replace Discords loading quotes",authors:[p.Ven,p.KraXen72],patches:[{find:".LOADING_DID_YOU_KNOW",replacement:{match:/\._loadingText=.+?random\(.+?;/s,replace:"._loadingText=$self.quote;"}}],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($v[Math.floor(Math.random()*$v.length)])}})});function rP(){let{id:e,guild_id:t}=Fe([Pe],()=>sr()),{groups:n}=Fe([Hv],()=>Hv.getProps(t,e)),r=Fe([Gv],()=>Gv.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(le,{id:"vc-membercount",style:{marginTop:"1em",marginBottom:"-.5em",paddingInline:"1em",justifyContent:"center",alignContent:"center",gap:0}},o(W,{text:`${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)"}},i))),o(W,{text:`${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)"}},r))))}var Gv,Hv,hp,zv=m(()=>{"use strict";a();ie();wt();w();tt();b();O();T();Gv=ae("GuildMemberCountStore"),Hv=ae("ChannelMemberStore");hp=g({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:/(var (\i)=\i\.className.+?children):\[(\i\.useMemo[^}]+"aria-multiselectable")/,replace:"$1:[$2.startsWith('members')?$self.render():null,$3"}}],render:A.wrap(rP,{noop:!0})})});var yp,jv,Wv,iP,vi,vp,qv=m(()=>{"use strict";a();Sn();D();w();b();O();T();yp=!1,jv=e=>e.key==="Backspace"&&(yp=!0),Wv=e=>e.key==="Backspace"&&(yp=!1),iP=1n<<4n,vi=k({enableDeleteOnClick:{type:3,description:"Enable delete on click",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}}),vp=g({name:"MessageClickActions",description:"Hold Backspace and click to delete, double click to edit/reply",authors:[p.Ven],dependencies:["MessageEventsAPI"],settings:vi,start(){let e=P("deleteMessage","startEditMessage"),t=P("isEditing","isEditingAny");document.addEventListener("keydown",jv),document.addEventListener("keyup",Wv),this.onClick=yu((n,r,i)=>{let s=n.author.id===F.getCurrentUser().id;if(yp)vi.store.enableDeleteOnClick&&(s||je.can(iP,r))&&(n.deleted?E.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||vi.store.requireModifier&&!i.ctrlKey&&!i.shiftKey)return;if(s){if(!vi.store.enableDoubleClickToEdit||t.isEditing(r.id,n.id))return;e.startEditMessage(r.id,n.id,n.content),i.preventDefault()}else{if(!vi.store.enableDoubleClickToReply)return;E.dispatch({type:"CREATE_PENDING_REPLY",channel:r,message:n,shouldMention:!M.plugins.NoReplyMention.enabled,showMentionToggle:r.guild_id!==null})}}})},stop(){vu(this.onClick),document.removeEventListener("keydown",jv),document.removeEventListener("keyup",Wv)}})});var bp={};ge(bp,{_modifyAccessories:()=>sP,accessories:()=>aa,addAccessory:()=>Si,removeAccessory:()=>Sp});function Si(e,t,n){aa.set(e,{callback:t,position:n})}function Sp(e){aa.delete(e)}function sP(e,t){for(let n of aa.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 aa,la=m(()=>{"use strict";a();aa=new Map});async function uP(e,t){let n=yr.get(t);if(n)return n.message;yr.set(t,{fetched:!1});let i=(await Dt.get({url:`/channels/${e}/messages`,query:{limit:1,around:t},retries:2}).catch(()=>null))?.body?.[0];if(!i)return;let s=un.getMessages(i.channel_id).receiveMessage(i).get(i.id);return yr.set(s.id,{message:s,fetched:!0}),s}function pP(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"&&!Zv.test(s)&&t.push({height:i.height,width:i.width,url:s});return t}function dP(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 mP(e){return!!(e.components.length||e.attachments.some(t=>!t.content_type?.startsWith("image/"))||e.embeds.some(t=>t.type!=="image"&&(t.type!=="gifv"||Zv.test(t.url))))}function fP(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 gP(e,t){return new Proxy(e,{get(n,r){return r==="vencordEmbeddedBy"?t:Reflect.get(...arguments)}})}function hP({message:e}){let t=e.vencordEmbeddedBy??[],n=[],r=null;for(;(r=Tp.exec(e.content))!==null;){let[i,s,l,c]=r;if(t.includes(c))continue;let u=Z.getChannel(l);if(!u||s!=="@me"&&!je.can(1024n,u))continue;let h=yr.get(c)?.message;if(!h)if(h??=un.getMessage(l,c),h)yr.set(c,{message:h,fetched:!0});else{let S={...e};delete S.embeds,delete S.interaction,cP.push(()=>uP(l,c).then(x=>x&&E.dispatch({type:"MESSAGE_UPDATE",message:S})));continue}let f={message:gP(h,[...t,e.id]),channel:u,guildID:s},y=xp.store.automodEmbeds;n.push(y==="always"||y==="prefer"&&!mP(h)?o(vP,{...f}):o(yP,{...f}))}return n.length?o(d,null,n):null}function yP({message:e,channel:t,guildID:n}){let r=n==="@me",i=!r&&ue.getGuild(t.guild_id),s=F.getUser(Z.getChannel(t.id).recipients?.[0]);return o(aP,{embed:{rawDescription:"",color:"var(--background-secondary)",author:{name:o(Q,{variant:"text-xs/medium",tag:"span"},o("span",null,r?"Direct Message - ":i.name+" - "),r?Ie.parse(`<@${s.id}>`):Ie.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:J(Kv.message,xp.store.messageBackgroundColor&&Kv.searchResult)},o(lP,{id:`message-link-embeds-${e.id}`,message:e,channel:t,subscribeToComponentDispatch:!1}))})}function vP(e){let{message:t,channel:n,guildID:r}=e,i=r==="@me",s=pP(t),{parse:l}=Ie;return o(Yv,{channel:n,childrenAccessories:o(Q,{color:"text-muted",variant:"text-xs/medium",tag:"span"},l(i?`<@${Z.getChannel(n.id).recipients[0]}>`:`<#${n.id}>`),o("span",null,i?" - Direct Message":" - "+ue.getGuild(n.guild_id)?.name)),compact:!1,content:o(d,null,t.content||t.attachments.length<=s.length?l(t.content):[dP(t.attachments.length,t.embeds.length)],s.map(c=>{let{width:u,height:h}=fP(c.width,c.height);return o("div",null,o("img",{src:c.url,width:u,height:h}))})),hideTimestamp:!1,message:t,_messageEmbed:"automod"})}var yr,aP,lP,Kv,Yv,Tp,Zv,cP,xp,wp,Xv=m(()=>{"use strict";a();la();D();ie();w();fe();ar();ve();b();O();T();yr=new Map,aP=re(()=>ze(".inlineMediaEmbed")),lP=re(()=>Ht(e=>e.type?.toString()?.includes('["message","compact","className",'))),Kv=P("message","searchResult"),Yv=()=>null,Tp=/(?o(N,{onClick:()=>yr.clear()},"Clear the linked message cache")}});wp=g({name:"MessageLinkEmbeds",description:"Adds a preview to messages that link another message",authors:[p.TheSun,p.Ven],dependencies:["MessageAccessoriesAPI"],patches:[{find:".embedCard",replacement:[{match:/function (\i)\(\i\){var \i=\i\.message,\i=\i\.channel.{0,200}\.hideTimestamp/,replace:"$self.AutoModEmbed=$1;$&"}]}],set AutoModEmbed(e){Yv=e},settings:xp,start(){Si("messageLinkEmbed",e=>Tp.test(e.message.content)?(Tp.lastIndex=0,o(A,null,o(hP,{message:e.message}))):null,4)}})});var Jv=m(()=>{});var Pp,Qv=m(()=>{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});Pp="src/plugins/messageLogger/deleteStyleOverlay.css"});var Mp,Vv=m(()=>{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; } -#vc-spotify-info-wrapper { - display: flex; - flex-direction: row; - align-items: center; - height: 3em; - gap: 0.5em; +/* Embed highlighting */ +.messagelogger-deleted article :is(div, span, h1, h2, h3, p) { + color: #f04747 !important; } -#vc-spotify-info-wrapper img { - height: 90%; - object-fit: contain; -} - -#vc-spotify-album-expanded-wrapper img { - width: 100%; - object-fit: contain; -} - -#vc-spotify-titles { - display: flex; - flex-direction: column; - padding: 0.2rem; - justify-content: center; - align-items: flex-start; - align-content: flex-start; - overflow: hidden; -} - -.vc-spotify-tooltip-text { - margin: unset; -} - -#vc-spotify-song-title { - color: var(--header-primary); - font-size: 14px; - font-weight: 600; -} -.vc-spotify-ellipoverflow { - white-space: nowrap; - overflow: hidden; - width: 100%; - text-overflow: ellipsis; -} - -.vc-spotify-artist, -.vc-spotify-album { - font-size: 12px; - text-decoration: none; - color: var(--header-secondary); -} - -.vc-spotify-comma { - color: var(--header-secondary); -} - -.vc-spotify-artist:hover, -#vc-spotify-album-title:hover, -#vc-spotify-song-title[role="link"]:hover { +.messagelogger-deleted a { + color: #be3535 !important; text-decoration: underline; - cursor: pointer; +} +`,classNames:{},dom:null});Mp="src/plugins/messageLogger/deleteStyleText.css"});function e1(){M.plugins.MessageLogger.deleteStyle==="text"?(Je(Mp),Mt(Pp)):(Mt(Mp),Je(Pp))}var SP,t1,n1,o1,Ip,r1=m(()=>{"use strict";a();Jv();Pt();D();Ge();ie();w();be();b();O();T();Qv();Vv();SP=P("edited","communicationDisabled","isSystemMessage");t1="ml-remove-history",n1="ml-toggle-style",o1=(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(L.MenuItem,{id:n1,key:n1,label:"Toggle Deleted Highlight",action:()=>c.classList.toggle("messagelogger-deleted")}))}e.push(o(L.MenuItem,{id:t1,key:t1,label:"Remove Message History",color:"danger",action:()=>{r?E.dispatch({type:"MESSAGE_DELETE",channelId:l,id:s,mlDeleted:!0}):n.editHistory=[]}}))},Ip=g({name:"MessageLogger",description:"Temporarily logs deleted and edited messages.",authors:[p.rushii,p.Ven],start(){e1(),pe("message",o1)},stop(){de("message",o1)},renderEdit(e){return o(A,{noop:!0},o("div",{className:"messagelogger-edited"},Ie.parse(e.content),o(kn,{timestamp:e.timestamp,isEdited:!0,isInline:!1},o("span",{className:SP.edited}," ","(",it.Messages.MESSAGE_EDITED,")"))))},makeEdit(e,t){return{timestamp:Jt?.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:()=>e1()},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:""}},handleDelete(e,t,n){try{let u=function(h){let f=e.get(h);if(!f)return;let y=64;t.mlDeleted||(f.flags&y)===y||i&&f.author?.bot||s&&f.author?.id===c||l.includes(f.author?.id)?e=e.remove(h):e=e.update(h,x=>x.set("deleted",!0).set("attachments",x.attachments.map(R=>(R.deleted=!0,R))))};var r=u;if(e==null||!n&&!e.has(t.id))return e;let{ignoreBots:i,ignoreSelf:s,ignoreUsers:l}=M.plugins.MessageLogger,c=F.getCurrentUser().id;n?t.ids.forEach(u):u(t.id)}catch(i){new Y("MessageLogger").error("Error during handleDelete",i)}return e},patches:[{find:'displayName="MessageStore"',replacement:[{match:/MESSAGE_DELETE:function\((\w)\){var .+?((?:\w{1,2}\.){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\((\w)\){var .+?((?:\w{1,2}\.){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\((\w)\).+?)\.update\((\w)/,replace:"$1.update($3,m => (($2.message.flags & 64) === 64 || (Vencord.Settings.plugins.MessageLogger.ignoreBots && $2.message.author?.bot) || (Vencord.Settings.plugins.MessageLogger.ignoreSelf && $2.message.author?.id === Vencord.Webpack.Common.UserStore.getCurrentUser().id)) ? 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=.{0,200}\.find\(\(function\((\i)\)\{)return/,replace:"return !$1.deleted &&"}]},{find:"isFirstMessageInForumPost=function",replacement:[{match:/(\w)\.customRenderedContent=(\w)\.customRenderedContent;/,replace:"$1.customRenderedContent = $2.customRenderedContent;$1.deleted = $2.deleted || false;$1.editHistory = $2.editHistory || [];"}]},{find:"THREAD_STARTER_MESSAGE?null===",replacement:[{match:/interactionData:(\w)\.interactionData/,replace:"interactionData:$1.interactionData,deleted:$1.deleted,editHistory:$1.editHistory,attachments:$1.attachments"},{match:/attachments:(\w{1,2})\((\w)\)/,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:/(\((\w)\){return null==\2\.attachments.+?)spoiler:/,replace:"$1deleted: arguments[0]?.deleted,spoiler:"}]},{find:'["className","attachment","inlineMedia"',replacement:[{match:/((\w)\.className,\w=\2\.attachment),/,replace:"$1,deleted=$2.attachment?.deleted,"},{match:/\["className","attachment","inlineMedia".+?className:/,replace:"$& (deleted ? 'messagelogger-deleted-attachment ' : '') +"}]},{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\((\w)\).+?},/,replace:"MESSAGE_DELETE:function($1){},"},{match:/MESSAGE_DELETE_BULK:function\((\w)\).+?},/,replace:"MESSAGE_DELETE_BULK:function($1){},"}]},{find:'id:"remove-reactions"',replacement:[{match:/children:(\[""===.+?\])/,replace:"children:arguments[0].message.deleted?[]:$1"}]}]})});function i1(e){fr({name:e.name,description:e.name,inputType:1,execute:async(t,n)=>await ca(e.name)?(M.plugins.MessageTags.clyde&&oe(n.channel.id,{author:Bn,content:`${xo} The tag **${e.name}** has been sent!`}),{content:e.message.replaceAll("\\n",` +`)}):(oe(n.channel.id,{author:Bn,content:`${xo} The tag **${e.name}** does not exist anymore! Please reload ur Discord to fix :)`}),{content:`/${e.name}`}),[bP]:!0},"CustomTags")}var xo,pa,bP,Bn,ua,ca,TP,xP,Cp,s1=m(()=>{"use strict";a();_t();Cn();D();w();b();xo="<:luna:1035316192220553236>",pa="MessageTags_TAGS",bP=Symbol("MessageTags"),Bn={id:"821472922140803112",bot:!1},ua=()=>Qe(pa).then(e=>e??[]),ca=e=>Qe(pa).then(t=>(t??[]).find(n=>n.name===e)??null),TP=async e=>{let t=await ua();return t.push(e),Ve(pa,t),t},xP=async e=>{let t=await ua();return t=await t.filter(n=>n.name!==e),Ve(pa,t),t};Cp=g({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 ua())i1(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=Oe(e[0].options,"tag-name",""),r=Oe(e[0].options,"message","");if(await ca(n))return oe(t.channel.id,{author:Bn,content:`${xo} A Tag with the name **${n}** already exists!`});let i={name:n,enabled:!0,message:r};i1(i),await TP(i),oe(t.channel.id,{author:Bn,content:`${xo} Successfully created the tag **${n}**!`});break}case"delete":{let n=Oe(e[0].options,"tag-name","");if(!await ca(n))return oe(t.channel.id,{author:Bn,content:`${xo} A Tag with the name **${n}** does not exist!`});li(n),await xP(n),oe(t.channel.id,{author:Bn,content:`${xo} Successfully deleted the tag **${n}**!`});break}case"list":{oe(t.channel.id,{author:Bn,embeds:[{title:"All Tags:",description:(await ua()).map(n=>`\`${n.name}\`: ${n.message.slice(0,72).replaceAll("\\n"," ")}${n.message.length>72?"...":""}`).join(` +`)||`${xo} Woops! There are no tags yet, use \`/tags create\` to create one!`,color:14122879,type:"rich"}]});break}case"preview":{let n=Oe(e[0].options,"tag-name",""),r=await ca(n);if(!r)return oe(t.channel.id,{author:Bn,content:`${xo} A Tag with the name **${n}** does not exist!`});oe(t.channel.id,{author:Bn,content:r.message.replaceAll("\\n",` +`)});break}default:{oe(t.channel.id,{author:Bn,content:"Invalid sub-command"});break}}}}]})});function wP(e){let t="";for(let n=0;n{"use strict";a();_t();w();b();Np=g({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:[So],inputType:3,execute:(e,t)=>{let n=Oe(e,"message","");oe(t.channel.id,{content:n})}},{name:"lenny",description:"Sends a lenny face",options:[So],execute:e=>({content:Oe(e,"message","")+" ( \u0361\xB0 \u035C\u0296 \u0361\xB0)"})},{name:"mock",description:"mOcK PeOpLe",options:[Ho],execute:e=>({content:wP(Oe(e,"message",""))})}]})});var kp,l1=m(()=>{"use strict";a();_t();w();b();kp=g({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:[So],execute:t=>({content:Oe(t,"message","")+e.description})}))})});function CP(e){wo.store.tagSettings??=Rp;let[t,n]=V(wo.store.tagSettings),r=i=>{n(i),e.setValue(i)};return o(le,{flexDirection:"column"},vr.map(i=>o(Et,{style:{padding:"1em 1em 0"}},o(v.FormTitle,{style:{width:"fit-content"}},o(W,{text:i.description},({onMouseEnter:s,onMouseLeave:l})=>o("div",{onMouseEnter:s,onMouseLeave:l},i.displayName," Tag ",o(Vn,{type:Vn.Types[i.name]})))),o(Re,{type:"text",value:t[i.name]?.text??i.displayName,placeholder:`Text on tag (default: ${i.displayName})`,onChange:s=>{t[i.name].text=s,r(t)},className:G.bottom16}),o(ft,{value:t[i.name]?.showInChat??!0,onChange:s=>{t[i.name].showInChat=s,r(t)},hideBorder:!0},"Show in messages"),o(ft,{value:t[i.name]?.showInNotChat??!0,onChange:s=>{t[i.name].showInNotChat=s,r(t)},hideBorder:!0},"Show in member list and profiles"))))}var PP,MP,IP,Vn,c1,vr,Rp,wo,Ap,u1=m(()=>{"use strict";a();D();wt();w();Xe();b();O();T();PP="1081004946872352958",MP=P("computePermissions","canEveryoneRole"),IP=P("SEND_MESSAGES","VIEW_CREATOR_MONETIZATION_ANALYTICS"),Vn=ke(e=>e.Types?.[0]==="BOT"),c1=(e,t)=>!!e?.webhookId&&t.isNonUserBot(),vr=[{name:"WEBHOOK",displayName:"Webhook",description:"Messages sent by webhooks",condition:c1},{name:"OWNER",displayName:"Owner",description:"Owns the server",condition:(e,t,n)=>ue.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"]}],Rp=Object.fromEntries(vr.map(({name:e,displayName:t})=>[e,{text:t,showInChat:!0,showInNotChat:!0}]));wo=k({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:CP,description:"fill me"}}),Ap=g({name:"MoreUserTags",description:"Adds tags for webhooks and moderative roles (owner, admin, etc.)",authors:[p.Cyn,p.TheSun,p.RyanCaoDev,p.LordElias],settings:wo,patches:[{find:'.BOT=0]="BOT"',replacement:[{match:/(\i)\[.\.BOT=0\]="BOT";/,replace:"$&$1=$self.addTagVariants($1);"}]},{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:/children:\[(?=\i,\(0,\i\.jsx\)\("span",{className:\i\(\)\.botText,children:(\i)}\)\])/,replace:"'data-tag':$1.toLowerCase(),children:["}]},{find:".Types.ORIGINAL_POSTER",replacement:{match:/return null==(\i)\?null:\(0,/,replace:"$1=$self.getTag({...arguments[0],origType:$1,location:'chat'});$&"}},{find:".renderBot=function(){",replacement:{match:/this.props.user;return null!=(\i)&&.{0,10}\?(.{0,50})\.botTag/,replace:"this.props.user;var type=$self.getTag({...this.props,origType:$1.bot?0:null,location:'not-chat'});return type!==null?$2.botTag,type"}},{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:",botType:",replacement:{match:/,botType:(\i\((\i)\)),/g,replace:",botType:$self.getTag({user:$2,channelId:arguments[0].moreTags_channelId,origType:$1,location:'not-chat'}),"}}],start(){if(!wo.store.tagSettings)if(!wo.store.visibility_WEBHOOK)wo.store.tagSettings=Rp;else{let e={...Rp};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}wo.store.tagSettings=e,delete Vencord.Settings.plugins.MoreUserTags[t]})}},getPermissions(e,t){let n=ue.getGuild(t?.guild_id);if(!n)return[];let r=MP.computePermissions({user:e,context:n,overwrites:t.permissionOverwrites});return Object.entries(IP).map(([i,s])=>r&s?i:"").filter(Boolean)},addTagVariants(e){let t=100;return vr.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===Vn.Types.ORIGINAL_POSTER||vr.some(t=>e===Vn.Types[`${t.name}-OP`]),getTagText(e,t){if(!e)return t.BOT_TAG_BOT;let[n,r]=e.split("-"),i=vr.find(({name:l})=>n===l);if(!i||r==="BOT"&&n!=="WEBHOOK"&&this.settings.store.dontShowForBots)return t.BOT_TAG_BOT;let s=wo.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(i==="chat"&&t.id==="1")return Vn.Types.OFFICIAL;if(t.id===PP)return Vn.Types.AI;let l=typeof r=="number"?r:null;if(s??=Z.getChannel(n),!s)return l;let c=this.settings.store,u=this.getPermissions(t,s);for(let h of vr)if(!(i==="chat"&&!c.tagSettings[h.name].showInChat)&&!(i==="not-chat"&&!c.tagSettings[h.name].showInNotChat)&&(h.permissions?.some(f=>u.includes(f))||h.condition?.(e,t,s))){s.isForumPost()&&s.ownerId===t.id?l=Vn.Types[`${h.name}-OP`]:t.bot&&!c1(e,t)&&!c.dontShowBotTag?l=Vn.Types[`${h.name}-BOT`]:l=Vn.Types[h.name];break}return l}})});function kP(e,t){let n=0,r=0;for(;(r=e.indexOf(t,r)+1)!==0;)n++;return n}function RP(e,t){if(!t.global)throw new Error("pattern must be global");let n=0;for(;t.test(e);)n++;return n}function LP(e){let t=kP(e,Ep)+RP(e,AP);return Math.min(t,10)}function Lp(){if(!Yo.store.triggerWhenUnfocused&&!document.hasFocus())return;let e=document.createElement("audio");e.src=NP,e.volume=Yo.store.volume,e.play()}var Ep,NP,Yo,Dp,AP,p1=m(()=>{"use strict";a();D();Lc();w();fe();b();T();Ep="\u{1F5FF}",NP="https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai.mp3",Yo=k({volume:{description:"Volume of the \u{1F5FF}\u{1F5FF}\u{1F5FF}",type:5,markers:mr(0,1,.1),default:.5,stickToMarkers:!1},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}}),Dp=g({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:Yo,flux:{async MESSAGE_CREATE({optimistic:e,type:t,message:n,channelId:r}){if(e||t!=="MESSAGE_CREATE"||n.state==="SENDING"||Yo.store.ignoreBots&&n.author?.bot||Yo.store.ignoreBlocked&&et.isBlocked(n.author?.id)||!n.content||r!==Pe.getChannelId())return;let i=LP(n.content);for(let s=0;s/gi});var da,Op,d1=m(()=>{"use strict";a();D();w();b();O();da=k({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}}),Op=g({name:"MuteNewGuild",description:"Mutes newly joined guilds",authors:[p.Glitch,p.Nuckyz,p.carince],patches:[{find:",acceptInvite:function",replacement:{match:/INVITE_ACCEPT_SUCCESS.+?;(\i)=null.+?;/,replace:(e,t)=>`${e}$self.handleMute(${t});`}}],settings:da,handleMute(e){e==="@me"||e==="null"||e==null||Nn("updateGuildNotificationSettings").updateGuildNotificationSettings(e,{muted:da.store.guild,suppress_everyone:da.store.everyone,suppress_roles:da.store.role})}})});function BP(e){return e.name||e.recipients.map(F.getUser).filter(Al).map(t=>et.getNickname(t.id)||OP.getName(t)).join(", ")}var EP,DP,OP,Po,_P,_p,m1=m(()=>{"use strict";a();w();Ss();b();O();T();EP=P("selectPrivateChannel"),DP=P("getChannelIconURL"),OP=P("getGlobalName"),Po=P("emptyIconFriends","emptyIconGuilds"),_P=P("guildNick","guildAvatarWithoutIcon");_p=g({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?null:$2"MUTUAL_GDMS",children:"Mutual Groups"}),'},{match:/(?<={user:(\i),onClose:(\i)}\);)(?=case \i\.\i\.MUTUAL_FRIENDS)/,replace:'case "MUTUAL_GDMS":return $self.renderMutualGDMs($1,$2);'}]}],renderMutualGDMs(e,t){let n=Z.getSortedPrivateChannels().filter(r=>r.isGroupDM()&&r.recipients.includes(e.id)).map(r=>o(ps,{className:Po.listRow,onClick:()=>{t(),EP.selectPrivateChannel(r.id)}},o(ds,{src:DP.getChannelIconURL({id:r.id,icon:r.icon,size:32}),size:"SIZE_40",className:Po.listAvatar}),o("div",{className:Po.listRowContent},o("div",{className:Po.listName},BP(r)),o("div",{className:_P.guildNick},r.recipients.length+1," Members"))));return o(us,{className:Po.listScroller,fade:!0,onClose:t},n.length>0?n:o("div",{className:Po.empty},o("div",{className:Po.emptyIconFriends}),o("div",{className:Po.emptyText},"No group dms in common")))}})});var FP,Bp,f1=m(()=>{"use strict";a();D();w();b();O();FP=P("getRelationships","isBlocked"),Bp=g({name:"NoBlockedMessages",description:"Hides all blocked messages from chat completely.",authors:[p.rushii,p.Samu],patches:[{find:'safety_prompt:"DMSpamExperiment",response:"show_redacted_messages"',replacement:[{match:/\.collapsedReason;return/,replace:".collapsedReason;return null;return;"}]},...['displayName="MessageStore"','displayName="ReadStateStore"'].map(e=>({find:e,predicate:()=>M.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=>FP.isBlocked(e.author.id)})});var Fp,g1=m(()=>{"use strict";a();w();b();Fp=g({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\(.{0,10}\|\|"0.0.0"!==.{0,2}\.remoteApp\.getVersion\(\)\)/,replace:"if(false)"}}]})});var $p,h1=m(()=>{"use strict";a();w();b();$p=g({name:"NoF1",description:"Disables F1 help bind.",authors:[p.Cyn],patches:[{find:',"f1"],comboKeysBindGlobal:',replacement:{match:',"f1"],comboKeysBindGlobal:',replace:"],comboKeysBindGlobal:"}}]})});var $P,bi,Up,y1=m(()=>{"use strict";a();D();w();b();O();$P=P("getMessageRequestsCount"),bi=k({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}}),Up=g({name:"NoPendingCount",description:"Removes the ping count of incoming friend requests, message requests, and nitro offers.",authors:[p.amia],settings:bi,patches:[{find:".getPendingCount=",predicate:()=>bi.store.hideFriendRequestsCount,replacement:{match:/(?<=\.getPendingCount=function\(\)\{)/,replace:"return 0;"}},{find:".getMessageRequestsCount=",predicate:()=>bi.store.hideMessageRequestsCount,replacement:{match:/(?<=\.getMessageRequestsCount=function\(\)\{)/,replace:"return 0;"}},{find:".getSpamChannelsCount(),",predicate:()=>bi.store.hideMessageRequestsCount,replacement:{match:/(?<=getSpamChannelsCount\(\),\i=)\i\.getMessageRequestsCount\(\)/,replace:"$self.getRealMessageRequestCount()"}},{find:"showProgressBadge:",predicate:()=>bi.store.hidePremiumOffersCount,replacement:{match:/\(function\(\){return \i\.\i\.getUnacknowledgedOffers\(\i\)\.length}\)/,replace:"(function(){return 0})"}}],getRealMessageRequestCount(){return $P.getMessageRequestChannelIds().size}})});var Gp,v1=m(()=>{"use strict";a();w();b();Gp=g({name:"NoProfileThemes",description:"Completely removes Nitro profile themes",authors:[p.TheKodeToad],patches:[{find:".NITRO_BANNER,",replacement:{match:/=(?=\i\.\i\.isPremiumAtLeast\(null==(\i))/,replace:"=$1?.banner&&"}},{find:"().avatarPositionPremiumNoBanner,default:",replacement:{match:/\.avatarPositionPremiumNoBanner(?=,default:\i\(\)\.(\i))/,replace:".$1"}},{find:".hasThemeColors=function(){",replacement:{match:/(?<=key:"canUsePremiumProfileCustomization",get:function\(\){return)/,replace:" false;"}}]})});var ma,Hp,S1=m(()=>{"use strict";a();D();w();b();ma=k({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}}),Hp=g({name:"NoReplyMention",description:"Disables reply pings by default",authors:[p.DustyAngel47,p.axyie,p.pylix,p.outfoxxed],settings:ma,shouldMention(e,t){let n=ma.store.userList.includes(e.author.id),r=ma.store.shouldPingListed?n:!n;return ma.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 zp,b1=m(()=>{"use strict";a();w();b();zp=g({name:"NoScreensharePreview",description:"Disables screenshare previews from being sent.",authors:[p.Nuckyz],patches:[{find:'("ApplicationStreamPreviewUploadManager")',replacement:["\\i\\.default\\.makeChunkedRequest\\(","\\i\\.\\i\\.post\\({url:"].map(e=>({match:new RegExp(`(?=return\\[(\\d),${e}\\i\\.\\i\\.STREAM_PREVIEW.+?}\\)\\];)`),replace:(t,n)=>`return[${n},Promise.resolve({body:"",status:204})];`}))}]})});var jp,T1=m(()=>{"use strict";a();w();b();jp=g({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=function()",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 Wp,x1=m(()=>{"use strict";a();w();b();Wp=g({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 qp,w1=m(()=>{"use strict";a();w();b();qp=g({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 UP,GP,HP,Zo,Kp,P1=m(()=>{"use strict";a();D();w();b();T();UP=/^https:\/\/open\.spotify\.com\/(track|album|artist|playlist|user)\/(.+)(?:\?.+?)?$/,GP=/^https:\/\/(steamcommunity\.com|(?:help|store)\.steampowered\.com)\/.+$/,HP=/^https:\/\/store\.epicgames\.com\/(.+)$/,Zo=k({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}}),Kp=g({name:"OpenInApp",description:"Open Spotify, Steam and Epic Games URLs in their respective apps instead of your browser",authors:[p.Ven],settings:Zo,patches:[{find:'"MaskedLinkStore"',replacement:{match:/return ((\i)\.apply\(this,arguments\))(?=\}function \i.{0,200}\.trusted)/,replace:"return $self.handleLink(...arguments).then(handled => handled || $1)"}},{find:"WEB_OPEN(",predicate:()=>Zo.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:function\(\)\{)(?=return \i=(\i)\.type,.{0,50}CONNECTED_ACCOUNT_VIEWED)/,replace:"$self.handleAccountView(arguments[0],$1.type,$1.id);"}}],async handleLink(e,t){if(!e)return!1;let n=e.href;e:{if(!Zo.store.spotify)break e;let r=UP.exec(n);if(!r)break e;let[,i,s]=r;return VencordNative.native.openExternal(`spotify:${i}:${s}`),t?.preventDefault(),!0}e:{if(!Zo.store.steam||!GP.test(n))break e;return VencordNative.native.openExternal(`steam://openurl/${n}`),t?.preventDefault(),fs("Opened link in Steam",X.Type.SUCCESS),!0}e:{if(!Zo.store.epic)break e;let r=HP.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"&&Zo.store.spotify?(VencordNative.native.openExternal(`spotify:user:${n}`),e.preventDefault()):t==="steam"&&Zo.store.steam&&(VencordNative.native.openExternal(`steam://openurl/https://steamcommunity.com/profiles/${n}`),fs("Opened link in Steam",X.Type.SUCCESS),e.preventDefault())}})});function I1(e){Object.assign(C1.__getLocalVars().state,{enabled:e,settingsVisible:e})}function N1(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}}Object.assign(C1.__getLocalVars().state,t)}var C1,M1,Yp,k1=m(()=>{"use strict";a();D();w();b();O();C1=ae("PoggermodeSettingsStore"),M1=k({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:N1}}),Yp=g({name:"Party mode \u{1F389}",description:"Allows you to use party mode cause the party never ends \u2728",authors:[p.UwUDev],settings:M1,start(){I1(!0),N1(M1.store.superIntensePartyMode)},stop(){I1(!1)}})});var R1=m(()=>{});function zP(e){return jn(e.toLowerCase().split("_"))}function fa(e){return e=A1[e]||e,it.Messages[e]||zP(e)}function L1(e){e==="USE_APPLICATION_COMMANDS"?e="USE_APPLICATION_COMMANDS_GUILD":e==="SEND_VOICE_MESSAGES"?e="SEND_VOICE_MESSAGE_GUILD":e!=="STREAM"&&(e=A1[e]||e);let t=it.Messages[`ROLE_PERMISSIONS_${e}_DESCRIPTION`];return t?.hasMarkdown?Ie.parse(t.message):typeof t=="string"?t:""}function ga({roles:e,id:t},n){return[...n.roles,t].map(r=>e[r]).sort((r,i)=>i.position-r.position)}function E1(e){switch(Mo.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 ha(e,t){let n=ue.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 Ct,A1,Ti=m(()=>{"use strict";a();Ge();Wn();T();wi();xi();Ct=Ee("vc-permviewer-");A1={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 Zp(){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 Xp(){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 O1(){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 _1=m(()=>{"use strict";a()});function WP(e,t,n){return Ce(r=>o(YP,{modalProps:r,permissions:e,guild:t,header:n}))}function qP({permissions:e,guild:t,modalProps:n,header:r}){e.sort((c,u)=>c.type-u.type),Fe([Ae],()=>Ae.getMemberIds(t.id),null,(c,u)=>c.length===u.length),rt(()=>{let c=e.filter(u=>u.type===1&&!Ae.isMember(t.id,u.id)).map(({id:u})=>u);E.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[t.id],userIds:c})},[]);let[i,s]=V(0),l=e[i];return o(Le,{...n,size:"large"},o($e,null,o(Q,{className:Ct("perms-title"),variant:"heading-lg/semibold"},r," permissions:"),o(xt,{onClick:n.onClose})),o(Ue,null,!l&&o("div",{className:Ct("perms-no-perms")},o(Q,{variant:"heading-lg/normal"},"No permissions to display!")),l&&o("div",{className:Ct("perms-container")},o("div",{className:Ct("perms-list")},e.map((c,u)=>{let h=F.getUser(c.id??""),f=t.roles[c.id??""];return o("button",{className:Ct("perms-list-item-btn"),onClick:()=>s(u)},o("div",{className:Ct("perms-list-item",{"perms-list-item-active":i===u}),onContextMenu:y=>{Mo.store.unsafeViewAsRole&&c.type===0&&cn.open(y,()=>o(KP,{guild:t,roleId:c.id,onClose:n.onClose}))}},(c.type===0||c.type===2)&&o("span",{className:Ct("perms-role-circle"),style:{backgroundColor:f?.colorString??"var(--primary-300)"}}),c.type===1&&h!==void 0&&o("img",{className:Ct("perms-user-img"),src:h.getAvatarURL(void 0,void 0,!1)}),o(Q,{variant:"text-md/normal"},c.type===0?f?.name||"Unknown Role":c.type===1?h&&zn(h)||"Unknown User":o(le,{style:{gap:"0.2em",justifyItems:"center"}},"@owner",o(vy,{height:18,width:18,"aria-hidden":"true"})))))})),o("div",{className:Ct("perms-perms")},Object.entries(An).map(([c,u])=>o("div",{className:Ct("perms-perms-item")},o("div",{className:Ct("perms-perms-item-icon")},(()=>{let{permissions:h,overwriteAllow:f,overwriteDeny:y}=l;return h?(h&u)===u?Xp():Zp():f&&(f&u)===u?Xp():y&&(y&u)===u?Zp():O1()})()),o(Q,{variant:"text-md/normal"},fa(c)),o(W,{text:L1(c)||"No Description"},h=>o(yy,{...h}))))))))}function KP({guild:e,roleId:t,onClose:n}){return o(L.Menu,{navId:Ct("role-context-menu"),onClose:cn.close,"aria-label":"Role Options"},o(L.MenuItem,{id:"vc-pw-view-as-role",label:"View As Role",action:()=>{let r=e.roles[t];!r||(n(),E.dispatch({type:"IMPERSONATE_UPDATE",guildId:e.id,data:{type:"ROLES",roles:{[t]:r}}}))}}))}var YP,Sr,xi=m(()=>{"use strict";a();ie();wt();_n();tt();Ze();T();wi();Ti();_1();YP=A.wrap(qP),Sr=WP});var B1=m(()=>{});function Pi({children:e,onMoreClick:t,buttons:n,moreTooltipText:r,defaultState:i=!1,onDropDownClick:s,headerText:l}){let[c,u]=V(i);return o(d,null,o("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"8px"}},o(Q,{tag:"h2",variant:"eyebrow",style:{color:"var(--header-primary)",display:"inline"}},l),o("div",{className:Jp("center-flex")},n??null,t&&o(W,{text:r},h=>o("button",{...h,className:Jp("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(W,{text:c?"Hide "+l:"Show "+l},h=>o("button",{...h,className:Jp("btn"),onClick:()=>{u(f=>!f),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 Jp,Qp=m(()=>{"use strict";a();Ge();T();B1();Jp=Ee("vc-expandableheader-")});function XP({guild:e,guildMember:t}){let n=Mo.use(["permissionsSortOrder"]),[r,i]=zt(()=>{let R=[],C=ga(e,t),_=C.map($=>({type:0,...$}));if(e.ownerId===t.userId){_.push({type:2,permissions:Object.values(An).reduce((B,q)=>B|q,0n)});let $=it.Messages.GUILD_OWNER||"Server Owner";R.push({permission:$,roleColor:"var(--primary-300)",rolePosition:1/0})}E1(C);for(let[$,B]of Object.entries(An))for(let{permissions:q,colorString:ee,position:j,name:z}of C)if((q&B)===B){R.push({permission:fa($),roleColor:ee||"var(--primary-300)",rolePosition:j});break}return R.sort(($,B)=>B.rolePosition-$.rolePosition),[_,R]},[n.permissionsSortOrder]),{root:s,role:l,roleRemoveButton:c,roleNameOverflow:u,roles:h,rolePill:f,rolePillBorder:y,roleCircle:S,roleName:x}=ZP;return o(Pi,{headerText:"Permissions",moreTooltipText:"Role Details",onMoreClick:()=>Sr(r,e,t.nick||F.getUser(t.userId).username),defaultState:Mo.store.defaultPermissionsDropdownState,buttons:[o(W,{text:`Sorting by ${n.permissionsSortOrder===0?"Highest Role":"Lowest Role"}`},R=>o("button",{...R,className:Ct("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:J(s,h)},i.map(({permission:R,roleColor:C})=>o("div",{className:J(l,f,y)},o("div",{className:c},o("span",{className:S,style:{backgroundColor:C}})),o("div",{className:x},o(Q,{className:u,variant:"text-xs/medium"},R))))))}var ZP,F1,$1=m(()=>{"use strict";a();ie();Qp();sn();fe();O();T();wi();Ti();xi();ZP=dt(()=>{let e=Or(K.byProps("roles","rolePill","rolePillBorder"),K.byProps("roleCircle","dotBorderBase","dotBorderColor"),K.byProps("roleNameOverflow","root","roleName","roleRemoveButton"));return Object.assign({},...e)});F1=A.wrap(XP,{noop:!0})});function Vp(e,t,n){return n===0&&!Ae.isMember(e,t)?null:o(L.MenuItem,{id:"perm-viewer-permissions",label:"Permissions",action:()=>{let r=ue.getGuild(e),i,s;switch(n){case 0:{let l=Ae.getMember(e,t);i=ga(r,l).map(c=>({type:0,...c})),r.ownerId===t&&i.push({type:2,permissions:Object.values(An).reduce((c,u)=>c|u,0n)}),s=l.nick??F.getUser(l.userId).username;break}case 1:{let l=Z.getChannel(t);i=ha(Object.values(l.permissionOverwrites).map(({id:c,allow:u,deny:h,type:f})=>({type:f,id:c,overwriteAllow:u,overwriteDeny:h})),e),s=l.name;break}default:{i=Object.values(r.roles).map(l=>({type:0,...l})),s=r.name;break}}Sr(i,r,s)}})}function ed(e,t){return(n,r)=>()=>{if(!r)return n;let i=nt(e,n),s=(()=>{switch(t){case 0:return Vp(r.guildId,r.user.id,t);case 1:return Vp(r.guild.id,r.channel.id,t);case 2:return Vp(r.guild.id);default:return null}})();s!=null&&(i?i.push(s):e==="roles"&&r.guildId&&n.splice(-1,0,o(L.MenuGroup,null,s)))}}var Mo,td,wi=m(()=>{"use strict";a();R1();Pt();D();w();b();T();xi();$1();Ti();Mo=k({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}});td=g({name:"PermissionsViewer",description:"View the permissions a user or channel has, and the roles of a server",authors:[p.Nuckyz,p.Ven],settings:Mo,patches:[{find:".Messages.BOT_PROFILE_SLASH_COMMANDS",replacement:{match:/showBorder:.{0,60}}\),(?<=guild:(\i),guildMember:(\i),.+?)/,replace:(e,t,n)=>`${e}$self.UserPermissions(${t},${n}),`}}],UserPermissions:(e,t)=>!!t&&o(F1,{guild:e,guildMember:t}),userContextMenuPatch:ed("roles",0),channelContextMenuPatch:ed(["mute-channel","unmute-channel"],1),guildContextMenuPatch:ed("privacy",2),start(){pe("user-context",this.userContextMenuPatch),pe("channel-context",this.channelContextMenuPatch),pe("guild-context",this.guildContextMenuPatch)},stop(){de("user-context",this.userContextMenuPatch),de("channel-context",this.channelContextMenuPatch),de("guild-context",this.guildContextMenuPatch)}})});function G1(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,h,f)=>i(f||l),s.crossOrigin="Anonymous",s.src=n})}async function oM(e,t,n){for(let r of e)switch(r.name){case"image":let i=nM.getUploads(t.channel.id,U1)[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 eM(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 U1,JP,QP,ya,VP,eM,tM,nM,nd,H1=m(()=>{"use strict";a();_t();w();mi();sn();b();O();U1=0,JP=20,QP=128,ya=10,VP=$n(()=>Promise.all(Array.from({length:ya},(e,t)=>G1(`https://raw.githubusercontent.com/VenPlugs/petpet/main/frames/pet${t}.gif`)))),eM=ce(".USER("),tM=ce("UPLOAD_FILE_LIMIT_ERROR"),nM=P("getUploads");nd=g({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{GIFEncoder:n,quantize:r,applyPalette:i}=await ta(),s=await VP(),l=Oe(e,"no-server-pfp",!1);try{var c=await oM(e,t,l);if(!c)throw"No Image specified!"}catch(C){oe(t.channel.id,{content:String(C)});return}let u=await G1(c),h=Oe(e,"delay",JP),f=Oe(e,"resolution",QP),y=new n,S=document.createElement("canvas");S.width=S.height=f;let x=S.getContext("2d");for(let C=0;CtM([R],t.channel,U1),10)}}]})});function W1(){return st(["plugins.PinDMs.pinnedDMs"]),va()}function br(e){return va().has(e)}function q1(e){let t=va();t.delete(e)||t.add(e),j1([...t])}function rd(){return va(),Mi.store.pinOrder===0?rM.getPrivateChannelIds().filter(br):Fn}function K1(e){return rd()[e]}function id(e,t){let n=z1(),r=n.indexOf(e),i=r+t;[n[r],n[i]]=[n[i],n[r]],j1(n)}var Mi,rM,Fn,od,z1,j1,iM,va,sd=m(()=>{"use strict";a();D();b();O();Mi=k({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}]}}),rM=ae("PrivateChannelSortStore"),z1=()=>(M.plugins.PinDMs.pinnedDMs||void 0)?.split(","),j1=e=>{od=void 0,M.plugins.PinDMs.pinnedDMs=e.join(",")},iM=()=>(Fn=z1()??[],od=new Set(Fn)),va=()=>od??iM()});function Y1(e){let t=br(e),n=t&&Mi.store.pinOrder===1;return o(d,null,o(L.MenuItem,{id:"pin-dm",label:t?"Unpin DM":"Pin DM",action:()=>q1(e)}),n&&Fn[0]!==e&&o(L.MenuItem,{id:"move-pin-up",label:"Move Pin Up",action:()=>id(e,-1)}),n&&Fn[Fn.length-1]!==e&&o(L.MenuItem,{id:"move-pin-down",label:"Move Pin Down",action:()=>id(e,1)}))}function J1(){pe("gdm-context",Z1),pe("user-context",X1)}function Q1(){de("gdm-context",Z1),de("user-context",X1)}var Z1,X1,V1=m(()=>{"use strict";a();Pt();T();sd();Z1=(e,t)=>()=>{let n=nt("leave-channel",e);n&&n.unshift(Y1(t.channel.id))},X1=(e,t)=>()=>{let n=nt("close-dm",e);if(n){let r=n.findIndex(i=>i?.props?.id==="close-dm");n.splice(r,0,Y1(t.channel.id))}}});var ad,eS=m(()=>{"use strict";a();w();b();V1();sd();ad=g({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:Mi,start:J1,stop:Q1,usePinCount(e){let t=W1();return e.length?[t.size]:[]},getChannel(e,t){return e[K1(t)]},isPinned:br,getSnapshot:rd,getScrollOffset(e,t,n,r,i){return br(e)?t*(Fn.indexOf(e)+r)+n:(t+n)*2+t*Fn.length+i},patches:[{find:".privateChannelsHeaderContainer,",replacement:[{match:/privateChannelIds:(\i),/,replace:"privateChannelIds:$1.filter(c=>!$self.isPinned(c)),pinCount:$self.usePinCount($1),"},{match:/(?<=renderRow:(\i)\.renderRow,)sections:\[\i,/,replace:"$&...$1.props.pinCount,"},{match:/children:(\i\.\i\.Messages.DIRECT_MESSAGES)(?<=renderSection=function\((\i)\).+?)/,replace:"children:$2.section===1?'Pinned DMs':$1"},{match:/(?<=preRenderedChildren,(\i)=)((\i)\[\i\[\i\]\]);/,replace:"arguments[0]===1?$self.getChannel($3,arguments[1]):$2;"},{match:/===\i.DMS&&0/,replace:"-1$&"},{match:/(?<=else\{\i\+=)(\i)\*\(.+?(?=;)/,replace:"$self.getScrollOffset(arguments[0],$1,this.props.padding,this.state.preRenderedChildren,$&)"}]},{find:'"mod+alt+right"',replacement:{match:/(?<=(\i)=__OVERLAY__\?\i:.{0,10})\.concat\((.{0,10})\)/,replace:".concat($self.getSnapshot()).concat($2.filter(c=>!$self.isPinned(c)))"}}]})});var ld,tS=m(()=>{"use strict";a();w();b();ld=g({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 pd={};ge(pd,{__addDecoratorsToList:()=>sM,addDecorator:()=>cd,decorators:()=>Sa,removeDecorator:()=>ud});function cd(e,t,n){Sa.set(e,{decorator:t,onlyIn:n})}function ud(e){Sa.delete(e)}function sM(e){let t=!!e.guildId;return[...Sa.values()].map(n=>{let{decorator:r,onlyIn:i}=n;return!i||i==="guilds"&&t||i==="dms"&&!t?r(e):null})}var Sa,dd=m(()=>{"use strict";a();Sa=new Map});var gd={};ge(gd,{__addDecorationsToMessage:()=>aM,addDecoration:()=>md,decorations:()=>ba,removeDecoration:()=>fd});function md(e,t){ba.set(e,t)}function fd(e){ba.delete(e)}function aM(e){return[...ba.values()].map(t=>t(e))}var ba,hd=m(()=>{"use strict";a();ba=new Map});function Ta(e,t){return({color:n,tooltip:r})=>o(W,{text:r},i=>o("svg",{...i,height:t?.height??20,width:t?.width??20,viewBox:t?.viewBox??"0 0 24 24",fill:n},o("path",{d:e})))}var lM,nS,cM,uM,pM,vd,oS,yd,Sd,rS=m(()=>{"use strict";a();Ps();dd();hd();D();ie();w();b();O();T();lM=ae("SessionsStore");nS={desktop:Ta("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:Ta("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:Ta("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:Ta("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"})},cM=ce(".TWITCH",".STREAMING",".INVISIBLE"),uM=({platform:e,status:t})=>{let n=e[0].toUpperCase()+e.slice(1),r=nS[e]??nS.desktop;return o(r,{color:`var(--${cM(t)}`,tooltip:n})},pM=e=>ao.getState()?.clientStatuses?.[e],vd=({user:e,wantMargin:t=!0,wantTopMargin:n=!1})=>{if(!e||e.bot)return null;if(e.id===F.getCurrentUser().id){let s=lM.getSessions();if(typeof s!="object")return null;let l=Object.values(s).sort(({status:h},{status:f})=>h===f?0:h==="online"?1:f==="online"?-1:h==="idle"?1:f==="idle"?-1:0),c=Object.values(l).reduce((h,f)=>(f.clientInfo.client!=="unknown"&&(h[f.clientInfo.client]=f.status),h),{}),{clientStatuses:u}=ao.getState();u[F.getCurrentUser().id]=c}let r=ao.getState()?.clientStatuses?.[e.id];if(!r)return null;let i=Object.entries(r).map(([s,l])=>o(uM,{key:s,platform:s,status:l}));return i.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}},i):null},oS={component:e=>o(vd,{...e,wantMargin:!1}),position:0,shouldShow:e=>!!Object.keys(pM(e.user.id)??{}).length,key:"indicator"},yd={list:{description:"In the member list",onEnable:()=>cd("platform-indicator",e=>o(A,{noop:!0},o(vd,{user:e.user}))),onDisable:()=>ud("platform-indicator")},badges:{description:"In user profiles, as badges",onEnable:()=>bd(oS),onDisable:()=>Td(oS)},messages:{description:"Inside messages",onEnable:()=>md("platform-indicator",e=>o(A,{noop:!0},o(vd,{user:e.message?.author,wantTopMargin:!0}))),onDisable:()=>fd("platform-indicator")}},Sd=g({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=M.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(yd).forEach(([n,r])=>{e[n]&&r.onEnable()})},stop(){Object.entries(yd).forEach(([e,t])=>{t.onDisable()})},patches:[{find:".Masks.STATUS_ONLINE_MOBILE",predicate:()=>M.plugins.PlatformIndicators.colorMobileIndicator,replacement:[{match:/(?<=return \i\.\i\.Masks\.STATUS_TYPING;)(.+?)(\i)\?(\i\.\i\.Masks\.STATUS_ONLINE_MOBILE):/,replace:(e,t,n,r)=>`if(${n})return ${r};${t}`},{match:/(switch\(\i\){case \i\.\i\.ONLINE:return )(\i)\?({.+?}):/,replace:(e,t,n,r)=>`if(${n})return${r};${t}`}]},{find:".AVATAR_STATUS_MOBILE_16;",predicate:()=>M.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=function",predicate:()=>M.plugins.PlatformIndicators.colorMobileIndicator,replacement:{match:/(?<=\i\[\i\.\i\.MOBILE\])===\i\.\i\.ONLINE/,replace:"!= null"}}],options:{...Object.fromEntries(Object.entries(yd).map(([e,t])=>[e,{type:3,description:`Show indicators ${t.description.toLowerCase()}`,restartNeeded:!0,default:!0}])),colorMobileIndicator:{type:3,description:"Whether to make the mobile indicator match the color of the user status.",default:!0,restartNeeded:!0}}})});var iS=m(()=>{});function xd(){return o(I.Fragment,null,o(v.FormTitle,{tag:"h3"},"More Information"),o(v.FormText,null,"To add your own pronouns, visit"," ",o(at,{href:"https://pronoundb.org"},"pronoundb.org")),o(v.FormDivider,null),o(v.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 sS=m(()=>{"use strict";a();bo();T()});var eo,xa=m(()=>{"use strict";a();D();b();wa();eo=k({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 Pa,aS=m(()=>{"use strict";a();Pa={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 mM(e){return lS.getGuildMemberProfile(e,sr()?.guild_id)?.pronouns||lS.getUserProfile(e)?.pronouns}function Ma(e){let t=mM(e)?.trim().replace(fM," "),[n]=ot(()=>gM(e),{fallbackValue:pS(e),onError:r=>console.error("Fetching pronouns failed: ",r)});return eo.store.pronounSource===1&&t?[t,"Discord"]:n&&n!=="unspecified"?[yM(n),"PronounDB"]:[t,"Discord"]}function uS(e){let t=Ma(e);return!eo.store.showInProfile||!eo.store.showSelf&&e===F.getCurrentUser().id?cS:t}function pS(e){let t=wd[e];return t&&t!=="unspecified"?t:t||null}function gM(e){return new Promise(t=>{let n=pS(e);if(n)return t(n);if(e in Tr)return Tr[e].push(t);Tr[e]=[t],dM()})}async function hM(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":pl}})).json().then(r=>(Object.assign(wd,r),r))}catch(n){console.error("PronounDB fetching failed: ",n);let r=Object.fromEntries(e.map(i=>[i,"unspecified"]));return Object.assign(wd,r),r}}function yM(e){let{pronounsFormat:t}=M.plugins.PronounDB;return t==="CAPITALIZED"?Pa[e]:t==="LOWERCASE"&&["any","ask","avoid","other"].includes(e)?Pa[e]:Pa[e].toLowerCase()}var lS,cS,wd,Tr,dM,fM,wa=m(()=>{"use strict";a();D();w();nr();tt();ve();O();T();xa();aS();lS=ae("UserProfileStore"),cS=[null,""],wd={},Tr={},dM=At(async()=>{let e=Object.keys(Tr),t=await hM(e);for(let n of e)Tr[n]?.forEach(r=>r(t[n])),delete Tr[n]});fM=/\n+/g});function dS(e){return!(!eo.store.showInMessages||e.author.bot||e.author.system||e.type===vM||!eo.store.showSelf&&e.author.id===F.getCurrentUser().id)}function mS({message:e}){return dS(e)?o(SM,{message:e}):null}function fS({message:e}){return dS(e)?o(bM,{message:e}):null}function SM({message:e}){let[t]=Ma(e.author.id);return t?o("span",{className:J(Ia.timestampInline,Ia.timestamp)},"\u2022 ",t):null}function bM({message:e}){let[t]=Ma(e.author.id);return t?o("span",{className:J(Ia.timestampInline,Ia.timestamp,"vc-pronoundb-compact")},"\u2022 ",t):null}var Ia,vM,gS=m(()=>{"use strict";a();fe();O();T();wa();xa();Ia=P("timestampInline"),vM=24});var hS,Pd,yS=m(()=>{"use strict";a();iS();w();b();sS();gS();wa();xa();hS={match:/text:(.{0,10}.Messages\.USER_PROFILE_PRONOUNS)(?=,)/,replace:'$& + (typeof vcPronounSource !== "undefined" ? ` (${vcPronounSource})` : "")'},Pd=g({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(e)"}},{find:"showCommunicationDisabledStyles",replacement:{match:/(?<=return\s*\(0,\i\.jsxs?\)\(.+!\i&&)(\(0,\i.jsxs?\)\(.+?\{.+?\}\))/,replace:"[$1, $self.PronounsChatComponentWrapper(e)]"}},{find:".userTagNoNickname",replacement:[{match:/,(\i)=(\i)\.pronouns/,replace:",[$1,vcPronounSource]=$self.useProfilePronouns($2.user.id)"},hS]},{find:".USER_PROFILE_ACTIVITY",replacement:[{match:/getGlobalName\(\i\);(?<=displayProfile.{0,200})/,replace:"$&const [vcPronounce,vcPronounSource]=$self.useProfilePronouns(arguments[0].user.id);if(arguments[0].displayProfile&&vcPronounce)arguments[0].displayProfile.pronouns=vcPronounce;"},hS]}],settings:eo,settingsAboutComponent:xd,PronounsChatComponentWrapper:mS,CompactPronounsChatComponentWrapper:fS,useProfilePronouns:uS})});var Md,vS=m(()=>{"use strict";a();Ko();w();tt();b();T();Md=g({name:"QuickMention",authors:[p.kemo],description:"Adds a quick mention button to the message actions bar",dependencies:["MessagePopoverAPI"],start(){bn("QuickMention",e=>({label:"Quick Mention",icon:this.Icon,message:e,channel:Z.getChannel(e.channel_id),onClick:()=>Hn(`<@${e.author.id}> `)}))},stop(){Tn("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 IS(e,t){let n=e.findIndex(r=>r.id===t);return n===-1?n:e.length-n-1}function TS({channelId:e,messageId:t,_isQuickEdit:n}){if(n)return;let r=F.getCurrentUser().id,i=un.getMessages(e)._array.filter(s=>s.author.id===r);Na=IS(i,t)}function xS({message:e,_isQuickReply:t}){t||(Ca=IS(un.getMessages(e.channel_id)._array,e.id))}function wS(e){let t=e.key==="ArrowUp";!t&&e.key!=="ArrowDown"||!xM(e)||wM(e)||(e.shiftKey?IM(t):MM(t))}function CS(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)&&TM.jumpToMessage({channelId:e,messageId:t,flash:!1,jumpType:"INSTANT"})}function NS(e,t){let n=un.getMessages(Pe.getChannelId())._array;if(!t){let l=F.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?Ca=s=i(Ca):Na=s=i(Na),s===-1?void 0:n[n.length-s-1]}function PM(e){let{enabled:t,userList:n,shouldPingListed:r}=M.plugins.NoReplyMention,i=!t||r===n.includes(e.author.id);switch(MS.store.shouldMention){case 2:return i;case 0:return!1;default:return!0}}function MM(e){let t=NS(e,!0);if(!t)return void E.dispatch({type:"DELETE_PENDING_REPLY",channelId:Pe.getChannelId()});let n=Z.getChannel(t.channel_id),r=F.getCurrentUser().id;E.dispatch({type:"CREATE_PENDING_REPLY",channel:n,message:t,shouldMention:PM(t),showMentionToggle:n.guild_id!==null&&t.author.id!==r,_isQuickReply:!0}),CS(n.id,t.id)}function IM(e){let t=NS(e,!1);t?(E.dispatch({type:"MESSAGE_START_EDIT",channelId:t.channel_id,messageId:t.id,content:t.content,_isQuickEdit:!0}),CS(t.channel_id,t.id)):E.dispatch({type:"MESSAGE_END_EDIT",channelId:Pe.getChannelId()})}var TM,PS,Ca,Na,MS,Id,SS,bS,xM,wM,kS=m(()=>{"use strict";a();D();w();b();O();T();TM=P("jumpToMessage"),PS=navigator.platform.includes("Mac"),Ca=-1,Na=-1,MS=k({shouldMention:{type:4,description:"Ping reply by default",options:[{label:"Follow NoReplyMention",value:2,default:!0},{label:"Enabled",value:1},{label:"Disabled",value:0}]}}),Id=g({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:MS,start(){E.subscribe("DELETE_PENDING_REPLY",SS),E.subscribe("MESSAGE_END_EDIT",bS),E.subscribe("MESSAGE_START_EDIT",TS),E.subscribe("CREATE_PENDING_REPLY",xS),document.addEventListener("keydown",wS)},stop(){E.unsubscribe("DELETE_PENDING_REPLY",SS),E.unsubscribe("MESSAGE_END_EDIT",bS),E.unsubscribe("MESSAGE_START_EDIT",TS),E.unsubscribe("CREATE_PENDING_REPLY",xS),document.removeEventListener("keydown",wS)}}),SS=()=>Ca=-1,bS=()=>Na=-1;xM=e=>PS?e.metaKey:e.ctrlKey,wM=e=>e.altKey||!PS&&e.metaKey});var Cd,CM,Nd,RS=m(()=>{"use strict";a();w();b();CM="https://raw.githubusercontent.com/facebook/react/17.0.2/scripts/error-codes/codes.json",Nd=g({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(){Cd=await fetch(CM).then(e=>e.json()).catch(e=>console.error(`[ReactErrorDecoder] Failed to fetch React error codes +`,e))},stop(){Cd=void 0},decodeError(e,...t){let n=0;return Cd?.[e]?.replace(/%s/g,()=>{let r=t[n];return n++,r})}})});var Rd={};ge(Rd,{ServerListRenderPosition:()=>ka,addServerListElement:()=>Ii,removeServerListElement:()=>Ci,renderAll:()=>AM});function kd(e){return e===0?kM:RM}function Ii(e,t){kd(e).add(t)}function Ci(e,t){kd(e).delete(t)}var NM,ka,kM,RM,AM,Ra=m(()=>{"use strict";a();be();NM=new Y("ServerListAPI"),ka=(n=>(n[n.Above=0]="Above",n[n.In=1]="In",n))(ka||{}),kM=new Set,RM=new Set;AM=e=>{let t=[];for(let n of kd(e))try{t.unshift(n())}catch(r){NM.error("Failed to render server list element:",r)}return t}});function LM(){let e=[];Object.values(ue.getGuilds()).forEach(t=>{ms.getChannels(t.id).SELECTABLE.forEach(n=>{!$r.hasUnread(n.channel.id)||e.push({channelId:n.channel.id,messageId:$r.lastMessageId(n.channel.id),readStateType:0})})}),E.dispatch({type:"BULK_ACK",context:"APP",channels:e})}var EM,Ad,AS=m(()=>{"use strict";a();Ra();w();b();T();EM=()=>o(N,{onClick:LM,size:N.Sizes.MIN,color:N.Colors.BRAND,style:{marginTop:"2px",marginBottom:"8px",marginLeft:"9px"}},"Read all"),Ad=g({name:"ReadAllNotificationsButton",description:"Read all server notifications with a single button click!",authors:[p.kemo],dependencies:["ServerListAPI"],renderReadAllButton:()=>o(EM,null),start(){Ii(0,this.renderReadAllButton)},stop(){Ci(0,this.renderReadAllButton)}})});var Bt,Aa=m(()=>{"use strict";a();D();b();Bt=k({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 Ld=m(()=>{"use strict";a()});async function _M(){Nt.delMany(["relationship-notifier-guilds","relationship-notifier-groups","relationship-notifier-friends"])}async function Ed(){await _M();let[e,t,n]=await Nt.getMany([LS(),ES(),DS()]);if(await Promise.all([Ea(),Da(),Ni()]),Bt.store.offlineRemovals){if(Bt.store.groups&&t?.size)for(let[r,i]of t)wr.has(r)||to(`You are no longer in the group ${i.name}.`,i.iconURL);if(Bt.store.servers&&e?.size)for(let[r,i]of e)xr.has(r)||to(`You are no longer in the server ${i.name}.`,i.iconURL);if(Bt.store.friends&&n?.friends.length)for(let r of n.friends){if(Xo.friends.includes(r))continue;let i=await Rn.fetchUser(r).catch(()=>{});i&&to(`You are no longer friends with ${zn(i)}.`,i.getAvatarURL(void 0,void 0,!1),()=>mn(i.id))}if(Bt.store.friendRequestCancels&&n?.requests?.length)for(let r of n.requests){if(Xo.requests.includes(r)||[1,2,4].includes(et.getRelationshipType(r)))continue;let i=await Rn.fetchUser(r).catch(()=>{});i&&to(`Friend request from ${zn(i)} has been revoked.`,i.getAvatarURL(void 0,void 0,!1),()=>mn(i.id))}}}function to(e,t,n){Bt.store.notices&&La.showNotice(e,"OK",()=>La.popNotice()),he({title:"Relationship Notifier",body:e,icon:t,onClick:n})}function OS(e){return xr.get(e)}function Dd(e){xr.delete(e),Ea()}async function Ea(){xr.clear();let e=F.getCurrentUser().id;for(let[t,{name:n,icon:r}]of Object.entries(ue.getGuilds()))Ae.isMember(t,e)&&xr.set(t,{id:t,name:n,iconURL:r&&`https://cdn.discordapp.com/icons/${t}/${r}.png`});await Nt.set(LS(),xr)}function _S(e){return wr.get(e)}function Od(e){wr.delete(e),Da()}async function Da(){wr.clear();for(let{type:e,id:t,name:n,rawRecipients:r,icon:i}of Z.getSortedPrivateChannels())e===3&&wr.set(t,{id:t,name:n||r.map(s=>s.username).join(", "),iconURL:i&&`https://cdn.discordapp.com/channel-icons/${t}/${i}.png`});await Nt.set(ES(),wr)}async function Ni(){Xo.friends=[],Xo.requests=[];let e=et.getRelationships();for(let t in e)switch(e[t]){case 1:Xo.friends.push(t);break;case 3:Xo.requests.push(t);break}await Nt.set(DS(),Xo)}var xr,wr,Xo,LS,ES,DS,_d=m(()=>{"use strict";a();ki();uo();tt();T();Aa();Ld();xr=new Map,wr=new Map,Xo={friends:[],requests:[]},LS=()=>`relationship-notifier-guilds-${F.getCurrentUser().id}`,ES=()=>`relationship-notifier-groups-${F.getCurrentUser().id}`,DS=()=>`relationship-notifier-friends-${F.getCurrentUser().id}`});async function US({relationship:{type:e,id:t}}){if(Bd===t){Bd=void 0;return}let n=await Rn.fetchUser(t).catch(()=>null);if(!!n)switch(e){case 1:Bt.store.friends&&to(`${zn(n)} removed you as a friend.`,n.getAvatarURL(void 0,void 0,!1),()=>mn(n.id));break;case 3:Bt.store.friendRequestCancels&&to(`A friend request from ${zn(n)} has been removed.`,n.getAvatarURL(void 0,void 0,!1),()=>mn(n.id));break}}function GS({guild:{id:e,unavailable:t}}){if(!Bt.store.servers||t)return;if(Fd===e){Dd(e),Fd=void 0;return}let n=OS(e);n&&(Dd(e),to(`You were removed from the server ${n.name}.`,n.iconURL))}function HS({channel:{id:e,type:t}}){if(!Bt.store.groups||t!==3)return;if($d===e){Od(e),$d=void 0;return}let n=_S(e);n&&(Od(e),to(`You were removed from the group ${n.name}.`,n.iconURL))}var Bd,Fd,$d,BS,FS,$S,zS=m(()=>{"use strict";a();tt();T();Aa();Ld();_d();BS=e=>Bd=e,FS=e=>Fd=e,$S=e=>$d=e});var Ud,jS=m(()=>{"use strict";a();w();b();zS();Aa();_d();Ud=g({name:"RelationshipNotifier",description:"Notifies you when a friend, group chat, or server removes you.",authors:[p.nick],settings:Bt,patches:[{find:"removeRelationship:function(",replacement:{match:/(removeRelationship:function\((\i),\i,\i\){)/,replace:"$1$self.removeFriend($2);"}},{find:"leaveGuild:function(",replacement:{match:/(leaveGuild:function\((\i)\){)/,replace:"$1$self.removeGuild($2);"}},{find:"closePrivateChannel:function(",replacement:{match:/(closePrivateChannel:function\((\i)\){)/,replace:"$1$self.removeGroup($2);"}}],flux:{GUILD_CREATE:Ea,GUILD_DELETE:GS,CHANNEL_CREATE:Da,CHANNEL_DELETE:HS,RELATIONSHIP_ADD:Ni,RELATIONSHIP_UPDATE:Ni,RELATIONSHIP_REMOVE(e){US(e),Ni()},CONNECTION_OPEN:Ed},async start(){setTimeout(()=>{Ed()},5e3)},removeFriend:BS,removeGroup:$S,removeGuild:FS})});var BM,FM,Gd,WS=m(()=>{"use strict";a();w();b();O();BM=P("spoilerContent"),FM=P("messagesWrapper","messages"),Gd=g({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=function",replacement:{match:/(?<=\.removeObscurity=function\((\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}=BM,{messagesWrapper:l}=FM,c=n?document.querySelector(`div.${l}`):r.parentElement;for(let u of c.querySelectorAll(`span.${i}.${s}`))u.click()}})});function qS(e,t){open(t+encodeURIComponent(e),"_blank")}var Oa,KS,Hd,YS=m(()=>{"use strict";a();Pt();wt();_n();w();b();T();Oa={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="};KS=(e,t)=>()=>{if(!t)return;let{reverseImageSearchType:n,itemHref:r,itemSrc:i}=t;if(!n||n!=="img")return;let s=r??i,l=nt("copy-link",e);l&&l.push(o(L.MenuItem,{label:"Search Image",key:"search-image",id:"search-image"},Object.keys(Oa).map((c,u)=>{let h="search-image-"+c;return o(L.MenuItem,{key:h,id:h,label:o(le,{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",Oa[c]).toString().replace("lens.","")}),c),action:()=>qS(s,Oa[c])})}),o(L.MenuItem,{key:"search-image-all",id:"search-image-all",label:o(le,{style:{alignItems:"center",gap:"0.5em"}},o(zo,{height:16,width:16}),"All"),action:()=>Object.values(Oa).forEach(c=>qS(s,c))})))},Hd=g({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(){pe("message",KS)},stop(){de("message",KS)}})});var ZS=m(()=>{});var _a=m(()=>{"use strict";a()});function Pr(e){let{OAuth2AuthorizeModal:t}=Nn("OAuth2AuthorizeModal");Ce(n=>o(t,{...n,scopes:["identify"],responseType:"code",redirectUri:"https://manti.vendicated.dev/api/reviewdb/auth",permissions:0n,clientId:"915703782174752809",cancelCompletesFlow:!1,callback:async r=>{try{let i=new URL(r.location);i.searchParams.append("clientMod","vencord");let s=await fetch(i,{headers:new Headers({Accept:"application/json"})}),{token:l,success:c}=await s.json();c?(_e.store.token=l,Ft("Successfully logged in!"),e?.()):s.status===1&&Ft("An Error occurred while logging in.")}catch(i){new Y("ReviewDB").error("Failed to authorize",i)}}}))}function Ft(e){X.show({type:X.Type.MESSAGE,message:e,id:X.genId(),options:{position:X.Position.BOTTOM}})}function XS(e,t){return e.sender.discordID===t||_e.store.user?.type===1}var tn,Io=m(()=>{"use strict";a();Ge();be();Ze();O();T();_a();Jo();tn=Ee("vc-rdb-")});var _e,Jo=m(()=>{"use strict";a();D();b();T();Io();_e=k({authorize:{type:6,description:"Authorize with ReviewDB",component:()=>o(N,{onClick:Pr},"Authorize with ReviewDB")},notifyReviews:{type:3,description:"Notify about new reviews on startup",default:!0},showWarning:{type:3,description:"Display warning to be respectful at the top of the reviews list",default:!0},hideTimestamps:{type:3,description:"Hide timestamps on reviews",default:!1},website:{type:6,description:"ReviewDB website",component:()=>o(N,{onClick:()=>{let e="https://reviewdb.mantikafasi.dev/";_e.store.token&&(e+="/api/redirect?token="+encodeURIComponent(_e.store.token)),VencordNative.native.openExternal(e)}},"ReviewDB website")},supportServer:{type:6,description:"ReviewDB Support Server",component:()=>o(N,{onClick:()=>{VencordNative.native.openExternal("https://discord.gg/eWPBSbvznt")}},"ReviewDB Support Server")}}).withPrivateSettings()});async function JS(e,t=0){let n=0;_e.store.showWarning||(n|=UM);let r=new URLSearchParams({flags:String(n),offset:String(t)}),i=await fetch(`${Ri}/api/reviewdb/users/${e}/reviews?${r}`),s=i.status===200?await i.json():{success:!1,message:"An Error occured while fetching reviews. Please try again later.",reviews:[],updated:!1,hasNextPage:!1,reviewCount:0};return s.success?s:(Ft(s.message),{...s,reviews:[{id:0,comment:"An Error occured while fetching reviews. Please try again later.",star:0,timestamp:0,sender:{id:0,username:"Error",profilePhoto:"https://cdn.discordapp.com/attachments/1045394533384462377/1084900598035513447/646808599204593683.png?size=128",discordID:"0",badges:[]}}]})}async function QS(e){return e.token=_e.store.token,e.token?fetch(Ri+`/api/reviewdb/users/${e.userid}/reviews`,{method:"PUT",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}}).then(t=>t.json()).then(t=>(Ft(t.message),t??null)):(Ft("Please authorize to add a review."),Pr(),null)}function VS(e){return fetch(Ri+`/api/reviewdb/users/${e}/reviews`,{method:"DELETE",headers:new Headers({"Content-Type":"application/json",Accept:"application/json"}),body:JSON.stringify({token:_e.store.token,reviewid:e})}).then(t=>t.json())}async function e0(e){let t=await fetch(Ri+"/api/reviewdb/reports",{method:"PUT",headers:new Headers({"Content-Type":"application/json",Accept:"application/json"}),body:JSON.stringify({reviewid:e,token:_e.store.token})}).then(n=>n.json());Ft(t.message)}function t0(e){return fetch(Ri+"/api/reviewdb/users",{body:JSON.stringify({token:e}),method:"POST"}).then(t=>t.json())}var Ri,Ba,UM,Ai=m(()=>{"use strict";a();Jo();Io();Ri="https://manti.vendicated.dev",Ba=50,UM=2});function n0({onClick:e}){return o(W,{text:"Delete Review"},t=>o("div",{...t,className:J(zd.button,zd.dangerous),onClick:e},o("svg",{width:"16",height:"16",viewBox:"0 0 20 20"},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"}))))}function o0({onClick:e}){return o(W,{text:"Report Review"},t=>o("div",{...t,className:zd.button,onClick:e},o("svg",{width:"16",height:"16",viewBox:"0 0 20 20"},o("path",{fill:"currentColor",d:"M20,6.002H14V3.002C14,2.45 13.553,2.002 13,2.002H4C3.447,2.002 3,2.45 3,3.002V22.002H5V14.002H10.586L8.293,16.295C8.007,16.581 7.922,17.011 8.076,17.385C8.23,17.759 8.596,18.002 9,18.002H20C20.553,18.002 21,17.554 21,17.002V7.002C21,6.45 20.553,6.002 20,6.002Z"}))))}var zd,r0=m(()=>{"use strict";a();fe();O();T();zd=P("button","wrapper","disabled","separator")});function jd(e){return o(W,{text:e.name},({onMouseEnter:t,onMouseLeave:n})=>o("img",{className:tn("badge"),width:"24px",height:"24px",onMouseEnter:t,onMouseLeave:n,src:e.icon,alt:e.description,onClick:()=>Ml.openUntrustedLink({href:e.redirectURL})}))}var i0=m(()=>{"use strict";a();T();Io()});var Fa,Wd=m(()=>{"use strict";a();tt();fe();ve();O();T();_a();Ai();Jo();Io();r0();i0();Fa=re(()=>{let e=K.byProps,[{cozyMessage:t,buttons:n,message:r,groupStart:i},{container:s,isHeader:l},{avatar:c,clickable:u,username:h,messageContent:f,wrapper:y,cozy:S},x,R]=Or(e("cozyMessage"),e("container","isHeader"),e("avatar","zalgo"),e("button","wrapper","selected"),e("botTag")),C=new Intl.DateTimeFormat;return function({review:$,refetch:B}){function q(){mn($.sender.discordID)}function ee(){bt.show({title:"Are you sure?",body:"Do you really want to delete this review?",confirmText:"Delete",cancelText:"Nevermind",onConfirm:()=>{VS($.id).then(z=>{z.success&&B(),Ft(z.message)})}})}function j(){bt.show({title:"Are you sure?",body:"Do you really you want to report this review?",confirmText:"Report",cancelText:"Nevermind",onConfirm:()=>e0($.id)})}return o("div",{className:J(t,y,r,i,S,tn("review")),style:{marginLeft:"0px",paddingLeft:"52px",paddingRight:"16px"}},o("img",{className:J(c,u),onClick:q,src:$.sender.profilePhoto||"/assets/1f0bfc0865d324c2587920a7d80c609b.png?size=128",style:{left:"0px"}}),o("div",{style:{display:"inline-flex",justifyContent:"center",alignItems:"center"}},o("span",{className:J(u,h),style:{color:"var(--channels-default)",fontSize:"14px"},onClick:()=>q()},$.sender.username),$.type===3&&o("span",{className:J(R.botTagVerified,R.botTagRegular,R.botTag,R.px,R.rem),style:{marginLeft:"4px"}},o("span",{className:R.botText},"System"))),$.sender.badges.map(z=>o(jd,{...z})),!_e.store.hideTimestamps&&$.type!==3&&o(kn,{timestamp:Jt($.timestamp*1e3)},C.format($.timestamp*1e3)),o("p",{className:J(f),style:{fontSize:15,marginTop:4,color:"var(--text-normal)"}},$.comment),$.id!==0&&o("div",{className:J(s,l,n),style:{padding:"0px"}},o("div",{className:x.wrapper},o(o0,{onClick:j}),XS($,F.getCurrentUser().id)&&o(n0,{onClick:ee}))))}})});function Li({discordId:e,name:t,onFetchReviews:n,refetchSignal:r,scrollToTop:i,page:s=1,showInput:l=!1,hideOwnReview:c=!1}){let[u,h]=Lt(!0),[f]=ot(()=>JS(e,(s-1)*Ba),{fallbackValue:null,deps:[r,u,s],onSuccess:y=>{i?.(),n(y)}});return f?o(d,null,o(HM,{refetch:h,reviews:f.reviews,hideOwnReview:c}),l&&o(qd,{name:t,discordId:e,refetch:h,isAuthor:f.reviews?.some(y=>y.sender.discordID===F.getCurrentUser().id)})):null}function HM({refetch:e,reviews:t,hideOwnReview:n}){let r=F.getCurrentUser().id;return o("div",{className:tn("view")},t?.map(i=>(i.sender.discordID!==r||!n)&&o(Fa,{key:i.id,review:i,refetch:e})),t?.length===0&&o(v.FormText,{className:tn("placeholder")},"Looks like nobody reviewed this user yet. You could be the first!"))}function qd({discordId:e,isAuthor:t,refetch:n,name:r}){let{token:i}=_e.store;function s({key:l,target:c}){l==="Enter"&&QS({userid:e,comment:c.value,star:-1}).then(u=>{u?.success?(c.value="",n()):u?.message&&Ft(u.message)})}return o("textarea",{className:J(GM.inputDefault,"enter-comment",tn("input")),onKeyDownCapture:l=>{l.key==="Enter"&&l.preventDefault()},placeholder:i?t?`Update review for @${r}`:`Review @${r}`:"You need to authorize to review users!",onKeyDown:s,onClick:()=>{i||(Ft("Opening authorization window..."),Pr())}})}var GM,Kd=m(()=>{"use strict";a();fe();ve();O();T();Ai();Jo();Io();Wd();GM=P("inputDefault","editable")});function zM({modalProps:e,discordId:t,name:n}){let[r,i]=V(),[s,l]=Lt(!0),[c,u]=V(1),h=Xt(null),f=r?.reviewCount,y=r?.reviews.find(S=>S.sender.discordID===_e.store.user?.discordID);return o(A,null,o(Le,{...e,size:"medium"},o($e,null,o(Q,{variant:"heading-lg/semibold",className:tn("modal-header")},n,"'s Reviews",!!f&&o("span",null," (",f," Reviews)")),o(xt,{onClick:e.onClose})),o(Ue,{scrollerRef:h},o("div",{className:tn("modal-reviews")},o(Li,{discordId:t,name:n,page:c,refetchSignal:s,onFetchReviews:i,scrollToTop:()=>h.current?.scrollTo({top:0,behavior:"smooth"}),hideOwnReview:!0}))),o(Tt,{className:tn("modal-footer")},o("div",null,y&&o(Fa,{refetch:l,review:y}),o(qd,{isAuthor:y!=null,discordId:t,name:n,refetch:l}),!!f&&o(cs,{currentPage:c,maxVisiblePages:5,pageSize:Ba,totalCount:f,onPageChange:u})))))}function Yd(e,t){Ce(n=>o(zM,{modalProps:n,discordId:e,name:t}))}var s0=m(()=>{"use strict";a();ie();Ze();ve();T();Ai();Jo();Io();Wd();Kd()});var a0,Zd,l0=m(()=>{"use strict";a();ZS();Pt();ie();Qp();_n();w();b();T();s0();Kd();_a();Ai();Jo();Io();a0=(e,t)=>()=>{e.push(o(L.MenuItem,{label:"View Reviews",id:"vc-rdb-server-reviews",icon:zo,action:()=>Yd(t.guild.id,t.guild.name)}))},Zd=g({name:"ReviewDB",description:"Review other users (Adds a new settings to profiles)",authors:[p.mantikafasi,p.Ven],settings:_e,patches:[{find:"disableBorderColor:!0",replacement:{match:/\(.{0,10}\{user:(.),setNote:.,canDM:.,.+?\}\)/,replace:"$&,$self.getReviewsComponent($1)"}}],async start(){let e=_e.store,{token:t,lastReviewId:n,notifyReviews:r}=e;!r||!t||setTimeout(async()=>{let i=await t0(t);if(n&&nDate.now()&&(e.user?.banInfo?.banEndDate??0)VencordNative.native.openExternal("https://reviewdb.mantikafasi.dev/api/redirect?"+new URLSearchParams({token:_e.store.token,page:"dashboard/appeal"}))})}e.user=i},4e3)},stop(){de("guild-header-popout",a0)},getReviewsComponent:A.wrap(e=>{let[t,n]=V();return o(Pi,{headerText:"User Reviews",onMoreClick:()=>Yd(e.id,e.username),moreTooltipText:t&&t>50?`View all ${t} reviews`:"Open Review Modal",onDropDownClick:r=>_e.store.reviewsDropdownState=!r,defaultState:_e.store.reviewsDropdownState},o(Li,{discordId:e.id,name:e.username,onFetchReviews:r=>n(r.reviewCount),showInput:!0}))},{message:"Failed to render Reviews"})})});var Ei,Xd,c0=m(()=>{"use strict";a();D();w();b();T();Ei=k({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}}),Xd=g({name:"RoleColorEverywhere",authors:[p.KingFish,p.lewisakura],description:"Adds the top role color anywhere possible",patches:[{find:'className:"mention"',replacement:[{match:/user:(\i),channel:(\i).{0,300}?"@"\.concat\(.+?\)/,replace:"$&,color:$self.getUserColor($1?.id,{channelId:$2?.id})"}],predicate:()=>Ei.store.chatMentions},{find:".source,children",replacement:[{match:/function \i\((\i)\).{5,20}id.{5,20}guildId.{5,10}channelId.{100,150}hidePersonalInformation.{5,50}jsx.{5,20},{/,replace:"$&color:$self.getUserColor($1.id,{guildId:$1?.guildId}),"}],predicate:()=>Ei.store.chatMentions},{find:".memberGroupsPlaceholder",replacement:[{match:/(memo\(\(function\((\i)\).{300,500}CHANNEL_MEMBERS_A11Y_LABEL.{100,200}roleIcon.{5,20}null,).," \u2014 ",.\]/,replace:"$1$self.roleGroupColor($2)]"}],predicate:()=>Ei.store.memberList},{find:"renderPrioritySpeaker",replacement:[{match:/renderName=function\(\).{50,75}speaking.{50,100}jsx.{5,10}{/,replace:"$&...$self.getVoiceProps(this.props),"}],predicate:()=>Ei.store.voiceUsers}],settings:Ei,getColor(e,{channelId:t,guildId:n}){return(n??=Z.getChannel(t)?.guild_id)?Ae.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}){let s=ue.getGuild(r)?.roles[e];return o("span",{style:{color:s?.colorString,fontWeight:"unset",letterSpacing:".05em"}},n," \u2014 ",t)},getVoiceProps({user:{id:e},guildId:t}){return{style:{color:this.getColor(e,{guildId:t})}}}})});var u0,p0,d0,Jd,m0=m(()=>{"use strict";a();Pt();w();ve();b();O();T();u0=re(()=>ze("M10 8.26667V4L3 11.4667L10 18.9333V14.56C15 14.56 18.5 16.2667 21 20C20 14.6667 17 9.33333 10 8.26667Z")),p0=ce("showMentionToggle","TEXTAREA_FOCUS","shiftKey"),d0=(e,{message:t})=>()=>{if(Pe.getChannelId()!==t.channel_id)return;let n=Z.getChannel(t?.channel_id);if(!n)return;let r=nt("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(L.MenuItem,{id:"reply",label:it.Messages.MESSAGE_ACTION_REPLY,icon:u0,action:l=>p0(n,t,l)}))}let i=nt("mark-unread",e);if(i&&!i.some(s=>s?.props?.id==="reply"))return i.unshift(o(L.MenuItem,{id:"reply",label:it.Messages.MESSAGE_ACTION_REPLY,icon:u0,action:s=>p0(n,t,s)}))},Jd=g({name:"SearchReply",description:"Adds a reply button to search results",authors:[p.Aria],start(){pe("message",d0)},stop(){de("message",d0)}})});var f0=m(()=>{});function g0(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 WM({rootProps:e,close:t}){let[n,r]=V(),[i,s]=V(""),l=Math.round((new Date(n).getTime()||Date.now())/1e3),c=(f,y)=>``,[u,h]=zt(()=>{let f=c(l,i);return[f,Ie.parse(f)]},[l,i]);return o(Le,{...e},o($e,{className:Di("modal-header")},o(v.FormTitle,{tag:"h2"},"Timestamp Picker"),o(xt,{onClick:t})),o(Ue,{className:Di("modal-content")},o("input",{type:"datetime-local",value:n,onChange:f=>r(f.currentTarget.value),style:{colorScheme:zr()===2?"light":"dark"}}),o(v.FormTitle,null,"Timestamp Format"),o(ln,{options:jM.map(f=>({label:f,value:f})),isSelected:f=>f===i,select:f=>s(f),serialize:f=>f,renderOptionLabel:f=>o("div",{className:Di("format-label")},Ie.parse(c(l,f.value))),renderOptionValue:()=>h}),o(v.FormTitle,{className:G.bottom8},"Preview"),o(v.FormText,{className:Di("preview-text")},h," (",u,")")),o(Tt,null,o(N,{onClick:()=>{Hn(u+" "),t()}},"Insert")))}var jM,Di,Qd,h0=m(()=>{"use strict";a();f0();Sn();Ge();w();tt();Xe();Ze();b();T();jM=["","t","T","d","D","f","F","R"],Di=Ee("vc-st-");Qd=g({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:".activeCommandOption",replacement:{match:/(.)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&;try{$2||$1.push($self.chatBarIcon())}catch{}"}}],start(){this.listener=lt((e,t)=>{t.content=t.content.replace(/`\d{1,2}:\d{2} ?(?:AM|PM)?`/gi,g0)})},stop(){ct(this.listener)},chatBarIcon(){return o(W,{text:"Insert Timestamp"},({onMouseEnter:e,onMouseLeave:t})=>o("div",{style:{display:"flex"}},o(N,{"aria-haspopup":"dialog","aria-label":"",size:"",look:Zt.BLANK,onMouseEnter:e,onMouseLeave:t,innerClassName:mt.button,onClick:()=>{let n=Ce(r=>o(WM,{rootProps:r,close:()=>Gn(n)}))},className:Di("button")},o("div",{className:mt.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(d,null,o(v.FormText,null,"To quickly send send time only timestamps, include timestamps formatted as `HH:MM` (including the backticks!) in your message"),o(v.FormText,null,"See below for examples. If you need anything more specific, use the Date button in the chat bar!"),o(v.FormText,null,"Examples:",o("ul",null,e.map(t=>o("li",{key:t},o("code",null,t)," ","->"," ",Ie.parse(g0(t)))))))}})});function qM(){return S0=Lt(),o("span",{id:"vc-friendcount",style:{display:"inline-block",width:"100%",fontSize:"12px",fontWeight:"600",color:"var(--header-secondary)",textTransform:"uppercase",textAlign:"center"}},em," online")}function KM(){return b0=Lt(),o("span",{id:"vc-guildcount",style:{display:"inline-block",width:"100%",fontSize:"12px",fontWeight:"600",color:"var(--header-secondary)",textTransform:"uppercase",textAlign:"center"}},v0," servers")}function y0(){em=0;let e=et.getRelationships();for(let t of Object.keys(e))e[t]===1&&ao.getStatus(t)!=="offline"&&(em+=1);S0?.()}function Vd(){v0=ue.getGuildCount(),b0?.()}var em,v0,S0,b0,tm,T0=m(()=>{"use strict";a();Ra();D();ie();w();ve();b();T();em=0,v0=0;tm=g({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}=M.plugins.ServerListIndicators;return o(A,{noop:!0},o("div",{style:{marginBottom:"4px"}},!!(e&2)&&o(qM,null),!!(e&1)&&o(KM,null)))},flux:{PRESENCE_UPDATES:y0,GUILD_CREATE:Vd,GUILD_DELETE:Vd},start(){Ii(0,this.renderIndicator),y0(),Vd()},stop(){Ci(0,this.renderIndicator)}})});var x0=m(()=>{});var w0,P0=m(()=>{a();w0=`/* eslint-disable 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 I0=Lr((aW,nm)=>{"use strict";a();var YM=Object.prototype.hasOwnProperty,kt="~";function Oi(){}Object.create&&(Oi.prototype=Object.create(null),new Oi().__proto__||(kt=!1));function ZM(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function M0(e,t,n,r,i){if(typeof n!="function")throw new TypeError("The listener must be a function");var s=new ZM(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 $a(e,t){--e._eventsCount===0?e._events=new Oi:delete e._events[t]}function gt(){this._events=new Oi,this._eventsCount=0}gt.prototype.eventNames=function(){var t=[],n,r;if(this._eventsCount===0)return t;for(r in n=this._events)YM.call(n,r)&&t.push(kt?r.slice(1):r);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(n)):t};gt.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(Mr,"__esModule",{value:!0});Mr.Channel=Mr.ChannelPort=void 0;var XM=I0(),Ua="vapIpc",om=Symbol.for("vapIpc.edgeCreate"),rm=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}};Mr.ChannelPort=rm;var im=class{id;_edges=new Map;_callbacks=new Map;_callers=new Map;_edgePipes=new Map;_pipes=[];_emitter=new XM.EventEmitter;_logger;_destroyed=!1;constructor(t){this.id=t}addPipe(t){t.listen(`${Ua}:handshake`,n=>{this._handleHandshake(t,n)}),t.listen(`${Ua}: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(om,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(`${Ua}:handshake`,n)}_emitMessage(t){let n=this.findEdgeId(t.destination);if(!n)return;this._edgePipes.get(n)?.emit(`${Ua}: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(om,i),r(s.id))};this._emitter.on(om,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}};Mr.Channel=im});var cm=Lr(Ir=>{"use strict";a();Object.defineProperty(Ir,"__esModule",{value:!0});Ir.RemoteClient=Ir.RemoteHost=void 0;var am=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()}};Ir.RemoteHost=am;var lm=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})}};Ir.RemoteClient=lm});var k0=Lr(Cr=>{"use strict";a();Object.defineProperty(Cr,"__esModule",{value:!0});Cr.WorkerClient=Cr.createWorkerHost=void 0;var C0=sm(),N0=cm(),JM=(e,t)=>{let n=new C0.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 N0.RemoteHost(n,t)};Cr.createWorkerHost=JM;var um=class extends N0.RemoteClient{workerOpts;worker;workerListeners=[];url;constructor(t,n,r,i={}){let s=new C0.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)}};Cr.WorkerClient=um});var R0=Lr(no=>{"use strict";a();var QM=no&&no.__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]}),pm=no&&no.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&QM(t,e,n)};Object.defineProperty(no,"__esModule",{value:!0});pm(sm(),no);pm(cm(),no);pm(k0(),no)});function mm(e){Ga.id!==e.id&&(Object.assign(Ga,e),dm.forEach(t=>t(e)))}var Ga,dm,A0,fm=m(()=>{"use strict";a();T();Ga={id:null,theme:null},dm=new Set,A0=()=>{let[,e]=I.useState(Ga);return I.useEffect(()=>(dm.add(e),()=>void dm.delete(e)),[]),Ga}});function Qo(e){if(Object.prototype.hasOwnProperty.call(Nr,e))return Nr[e];let t=Object.values(Nr).find(n=>n.aliases?.includes(e));return t?(oI.set(e,t),t):null}var VM,eI,L0,tI,nI,Nr,E0,D0,oI,Ha=m(()=>{"use strict";a();VM="Vap0r1ze/vapcord",eI="88a7032a59cca40da170926651b08201ea3b965a",L0=`https://raw.githubusercontent.com/${VM}/${eI}/assets/shiki-codeblocks`,tI=e=>`${L0}/${e}`,nI=`${L0}/languages.json`,Nr={},E0=async()=>{let e=await fetch(nI).then(n=>n.json()),t=Object.fromEntries(e.map(n=>[n.id,{...n,grammarUrl:tI(n.fileName)}]));Object.assign(Nr,t)},D0=e=>e.grammar?Promise.resolve(e.grammar):fetch(e.grammarUrl).then(t=>t.json()),oI=new Map});var rI,iI,Se,oo,gm=m(()=>{"use strict";a();rI="shikijs/shiki",iI="0b28ad8ccfbf2615f2d9d38ea8255416b8ac3043",Se=e=>`https://raw.githubusercontent.com/${rI}/${iI}/packages/shiki/themes/${e}.json`,oo={DarkPlus:Se("dark-plus"),MaterialCandy:"https://raw.githubusercontent.com/millsp/material-candy/master/material-candy.json",DraculaSoft:Se("dracula-soft"),Dracula:Se("dracula"),GithubDarkDimmed:Se("github-dark-dimmed"),GithubDark:Se("github-dark"),GithubLight:Se("github-light"),LightPlus:Se("light-plus"),MaterialDarker:Se("material-darker"),MaterialDefault:Se("material-default"),MaterialLighter:Se("material-lighter"),MaterialOcean:Se("material-ocean"),MaterialPalenight:Se("material-palenight"),MinDark:Se("min-dark"),MinLight:Se("min-light"),Monokai:Se("monokai"),Nord:Se("nord"),OneDarkPro:Se("one-dark-pro"),Poimandres:Se("poimandres"),RosePineDawn:Se("rose-pine-dawn"),RosePineMoon:Se("rose-pine-moon"),RosePine:Se("rose-pine"),SlackDark:Se("slack-dark"),SlackOchin:Se("slack-ochin"),SolarizedDark:Se("solarized-dark"),SolarizedLight:Se("solarized-light"),VitesseDark:Se("vitesse-dark"),VitesseLight:Se("vitesse-light"),CssVariables:Se("css-variables")}});var _0,hm,O0,se,_i=m(()=>{"use strict";a();mi();_0=al(R0());fm();Ha();gm();hm=Object.values(oo),se={client:null,currentTheme:null,currentThemeUrl:null,timeoutMs:1e4,languages:Nr,themes:oo,loadedThemes:new Set,loadedLangs:new Set,clientPromise:new Promise(e=>O0=e),init:async e=>{let t=await fetch(Qy).then(i=>i.blob()),n=se.client=new _0.WorkerClient("shiki-client","shiki-host",t,{name:"ShikiWorker"});await n.init();let r=e||hm[0];await E0(),await n.run("setOnigasm",{wasm:Vy}),await n.run("setHighlighter",{theme:r,langs:[]}),se.loadedThemes.add(r),await se._setTheme(r),O0(n)},_setTheme:async e=>{se.currentThemeUrl=e;let{themeData:t}=await se.client.run("getTheme",{theme:e});se.currentTheme=JSON.parse(t),mm({id:e,theme:se.currentTheme})},loadTheme:async e=>{let t=await se.clientPromise;se.loadedThemes.has(e)||(await t.run("loadTheme",{theme:e}),se.loadedThemes.add(e))},setTheme:async e=>{await se.clientPromise,e||=hm[0],se.loadedThemes.has(e)||await se.loadTheme(e),await se._setTheme(e)},loadLang:async e=>{let t=await se.clientPromise,n=Qo(e);!n||se.loadedLangs.has(n.id)||(await t.run("loadLanguage",{lang:{...n,grammar:n.grammar??await D0(n)}}),se.loadedLangs.add(n.id))},tokenizeCode:async(e,t)=>{let n=await se.clientPromise,r=Qo(t);return r?(se.loadedLangs.has(r.id)||await se.loadLang(r.id),await n.run("codeToThemedTokens",{code:e,lang:t,theme:se.currentThemeUrl??hm[0]})):[]},destroy(){se.currentTheme=null,se.currentThemeUrl=null,mm({id:null,theme:null}),se.client?.destroy()}}});var Bi,ym=m(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/shikiCodeblocks/devicon.css",{name:"src/plugins/shikiCodeblocks/devicon.css",source:`@import url("https://cdn.jsdelivr.net/gh/devicons/devicon@v2.10.1/devicon.min.css"); +`,classNames:{},dom:null});Bi="src/plugins/shikiCodeblocks/devicon.css"});var Fi=m(()=>{"use strict";a()});var aI,Co,vm=m(()=>{"use strict";a();D();Ge();fe();Wn();b();_i();gm();ym();Fi();aI=Object.keys(oo),Co=k({theme:{type:4,description:"Default themes",options:aI.map(e=>({label:jn(_l(e)),value:oo[e],default:oo[e]===oo.DarkPlus})),onChange:se.setTheme},customTheme:{type:0,description:"A link to a custom vscode theme",placeholder:oo.MaterialCandy,onChange:e=>{se.setTheme(e||Co.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"?Mt(Bi):Je(Bi)}},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=vl(e);return t?t.pathname.endsWith(".json")?!0:"Must be a json file":"Must be a valid URL"}}})});function F0(e,t){let n=Co.use(e),[r,i]=I.useState(!1),s={...n,...t},l=s.customTheme||s.theme;if(t){let c=se.currentThemeUrl&&l&&l!==se.currentThemeUrl,u=Object.keys(t).length===0;r&&(!c||u)&&i(!1),!r&&c&&(i(!0),se.setTheme(l))}return{...s,isThemeLoading:l!==se.currentThemeUrl}}var $0=m(()=>{"use strict";a();T();_i();vm()});function U0(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 G0=m(()=>{"use strict";a()});var wn,H0,$i=m(()=>{"use strict";a();Ge();T();Ha();Fi();wn=Ee("shiki-"),H0=({lang:e,tryHljs:t})=>{let n=e?Bo?.getLanguage?.(e):null,i=(e?Qo(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 z0(e){let[t,n]=I.useState(!1);function r(i){Kt.copy(i),n(!0),setTimeout(()=>{n(!1)},e)}return[t,r]}var j0=m(()=>{"use strict";a();T()});function W0({content:e,...t}){let[n,r]=z0(1e3);return o("button",{...t,style:{...t.style,cursor:n?"default":void 0},onClick:()=>r(e)},n?"Copied!":"Copy")}var q0=m(()=>{"use strict";a();j0()});function K0({content:e,theme:t}){let n=[];return Kt.SUPPORTS_COPY&&n.push(o(W0,{content:e,className:wn("btn"),style:{backgroundColor:t.accentBgColor,color:t.accentFgColor}})),o("div",{className:wn("btns")},n)}var Y0=m(()=>{"use strict";a();T();$i();q0()});var Z0,X0=m(()=>{"use strict";a();T();$i();Z0=({theme:e,useHljs:t,lang:n,content:r,tokens:i})=>{let s;if(t)try{let{value:c}=Bo.highlight(n,r,!0);s=c.split(` +`).map((u,h)=>o("span",{key:h,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(d,null,u.map(({content:h,color:f,fontStyle:y},S)=>o("span",{key:S,style:{color:f,fontStyle:(y??0)&1?"italic":void 0,fontWeight:(y??0)&2?"bold":void 0,textDecoration:(y??0)&4?"underline":void 0}},h))));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:wn("table")},...l)}});function J0({langName:e,useDevIcon:t,shikiLang:n}){return e?o("div",{className:wn("lang")},t!=="DISABLED"&&n?.devicon&&o("i",{className:`${wn("devicon")} devicon-${n.devicon}${t==="COLOR"?" colored":""}`}),e):o(d,null)}var Q0=m(()=>{"use strict";a();Fi();$i()});var za,lI,V0=m(()=>{"use strict";a();ie();ve();T();Ha();_i();$0();fm();G0();$i();Y0();X0();Q0();za=e=>o("pre",{className:wn("container")},o(A,null,o(lI,{...e}))),lI=({lang:e,content:t,isPreview:n,tempSettings:r})=>{let{tryHljs:i,useDevIcon:s,bgOpacity:l}=F0(["tryHljs","useDevIcon","bgOpacity"],r),{id:c,theme:u}=A0(),h=e?Qo(e):null,f=H0({lang:e,tryHljs:i}),[y,S]=bl(!0),[x]=ot(async()=>!h||f||!S?null:await se.tokenizeCode(t,e),{fallbackValue:null,deps:[e,t,c,S]}),R={plainColor:u?.fg||"var(--text-normal)",accentBgColor:u?.colors?.["statusBar.background"]||(f?"#7289da":"#007BC8"),accentFgColor:u?.colors?.["statusBar.foreground"]||"#FFF",backgroundColor:u?.colors?.["editor.background"]||"var(--background-secondary)"},C;return e&&(C=f?Bo?.getLanguage?.(e)?.name:h?.name),o("div",{ref:y,className:wn("root",{plain:!C,preview:n}),style:{backgroundColor:f?R.backgroundColor:`rgba(${U0(R.backgroundColor).concat(l/100).join(", ")})`,color:R.plainColor}},o("code",null,o(J0,{langName:C,useDevIcon:s,shikiLang:h}),o(Z0,{theme:R,useHljs:f,lang:e,content:t,tokens:x}),!n&&o(K0,{content:t,theme:R})))}});var eb,tb,nb=m(()=>{"use strict";a();eb=new Map,tb=()=>{eb.forEach(e=>e.remove()),eb.clear()}});var Sm,ob=m(()=>{"use strict";a();x0();Ge();w();b();P0();_i();V0();ym();vm();Fi();nb();Sm=g({name:"ShikiCodeblocks",description:"Brings vscode-style codeblocks into Discord, powered by Shiki",authors:[p.Vap],patches:[{find:"codeBlock:{react:function",replacement:{match:/codeBlock:\{react:function\((\i),(\i),(\i)\)\{/,replace:"$&return $self.renderHighlighter($1,$2,$3);"}}],start:async()=>{Co.store.useDevIcon!=="DISABLED"&&Je(Bi),await se.init(Co.store.customTheme||Co.store.theme)},stop:()=>{se.destroy(),tb()},settingsAboutComponent:({tempSettings:e})=>za({lang:"tsx",content:w0,isPreview:!0,tempSettings:e}),settings:Co,shiki:se,createHighlighter:za,renderHighlighter:({lang:e,content:t})=>za({lang:e,content:t,isPreview:!1})})});var bm,rb=m(()=>{"use strict";a();w();b();bm=g({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),(?<=,\1=\i&&(?=(!.+?)[,;]).+?)/,replace:"isExpanded:$2,"}}]})});var ib=m(()=>{});function ab(){let e=Fr(sb.colors.INTERACTIVE_MUTED).hex(),t=Fr(sb.colors.INTERACTIVE_ACTIVE).hex();return o(cI,{color:e,forcedIconColor:t,size:16,tooltipText:it.Messages.CONNECTION_VERIFIED})}var sb,cI,lb=m(()=>{"use strict";a();ve();O();T();sb=ke(e=>e.colors?.INTERACTIVE_MUTED?.css),cI=re(()=>ze(".CONNECTIONS_ROLE_OFFICIAL_ICON_TOOLTIP"))});function cb({id:e,theme:t}){let n=pI.getUserProfile(e);if(!n)return null;let r=n.connectedAccounts;return r?.length?o(uI,null,o(Q,{tag:"h2",variant:"eyebrow",style:{color:"var(--header-primary)"}},"Connections"),o(le,{style:{marginTop:"8px",gap:gI(ja.store.iconSpacing),flexWrap:"wrap"}},r.map(i=>o(vI,{connection:i,theme:t})))):null}function vI({connection:e,theme:t}){let n=mI.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:ja.store.iconSize,height:ja.store.iconSize}}),s=r?Ys:hy;return o(W,{text:o("span",{className:"vc-sc-tooltip"},e.name,e.verified&&o(ab,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:()=>Yt(e.name)},i))}var uI,pI,dI,mI,fI,gI,ja,hI,yI,Tm,ub=m(()=>{"use strict";a();ib();D();ie();wt();_n();w();fe();ve();b();O();T();lb();uI=re(()=>ze("().lastSection")),pI=ae("UserProfileStore"),dI=ae("ThemeStore"),mI=P("isSupported","getByUrl"),fI=ce(',"--profile-gradient-primary-color"'),gI=e=>(e??0)*2+4,ja=k({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}]}}),hI=A.wrap(e=>o(cb,{id:e.user.id,theme:fI(e.user,e.displayProfile).profileTheme})),yI=A.wrap(e=>o(cb,{id:e.channel.recipients[0],theme:dI.theme}));Tm=g({name:"ShowConnections",description:"Show connected accounts in user popouts",authors:[p.TheKodeToad],patches:[{find:".Messages.BOT_PROFILE_SLASH_COMMANDS",replacement:{match:/,theme:\i\}\)(?=,.{0,100}setNote:)/,replace:"$&,$self.profilePopoutComponent(arguments[0])"}},{find:'"Profile Panel: user cannot be undefined"',replacement:{match:/\(0,\i\.jsx\)\(\i\.\i,\{\}\).{0,100}setNote:/,replace:"$self.profilePanelComponent(arguments[0]),$&"}}],settings:ja,profilePopoutComponent:hI,profilePanelComponent:yI})});var pb=m(()=>{});function fb(e){mb=e}function NI({channel:e}){let[t,n]=V(No.store.defaultAllowedUsersAndRolesDropdownState),[r,i]=V([]),{type:s,topic:l,lastMessageId:c,defaultForumLayout:u,lastPinTimestamp:h,defaultAutoArchiveDuration:f,availableTags:y,id:S,rateLimitPerUser:x,defaultThreadRateLimitPerUser:R,defaultSortOrder:C,defaultReactionEmoji:_,bitrate:$,rtcRegion:B,videoQualityMode:q,permissionOverwrites:ee,guild_id:j}=e;return rt(()=>{let z=[],te=ue.getGuild(j).ownerId;Ae.getMember(j,te)||z.push(te),Object.values(ee).forEach(({type:U,id:Ne})=>{U===1&&!Ae.getMember(j,Ne)&&z.push(Ne)}),z.length>0&&E.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[j],userIds:z}),M.plugins.PermissionsViewer.enabled&&i(ha(Object.values(ee).map(U=>({type:U.type,id:U.id,overwriteAllow:U.allow,overwriteDeny:U.deny})),j))},[S]),o("div",{className:db.auto+" "+db.customTheme+" "+SI.chatContent+" shc-lock-screen-outer-container"},o("div",{className:"shc-lock-screen-container"},o("img",{className:"shc-lock-screen-logo",src:CI}),o("div",{className:"shc-lock-screen-heading-container"},o(Q,{variant:"heading-xxl/bold"},"This is a ",je.can(xm,e)?"locked":"hidden"," ",wI[s]," channel."),e.isNSFW()&&o(W,{text:"NSFW"},({onMouseLeave:z,onMouseEnter:te})=>o("svg",{onMouseLeave:z,onMouseEnter:te,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(Q,{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"},Ie.parseTopic(l,!1,{channelId:S})),c&&o(Q,{variant:"text-md/normal"},"Last ",e.isForumChannel()?"post":"message"," created:",o(kn,{timestamp:Jt(ir.extractTimestamp(c))})),h&&o(Q,{variant:"text-md/normal"},"Last message pin: ",o(kn,{timestamp:Jt(h)})),(x??0)>0&&o(Q,{variant:"text-md/normal"},"Slowmode: ",qr(x,"seconds")),(R??0)>0&&o(Q,{variant:"text-md/normal"},"Default thread slowmode: ",qr(R,"seconds")),(e.isGuildVoice()||e.isGuildStageVoice())&&$!=null&&o(Q,{variant:"text-md/normal"},"Bitrate: ",$," bits"),B!==void 0&&o(Q,{variant:"text-md/normal"},"Region: ",B??"Automatic"),(e.isGuildVoice()||e.isGuildStageVoice())&&o(Q,{variant:"text-md/normal"},"Video quality mode: ",II[q??1]),(f??0)>0&&o(Q,{variant:"text-md/normal"},"Default inactivity duration before archiving ",e.isForumChannel()?"posts":"threads",":"," "+qr(f,"minutes")),u!=null&&o(Q,{variant:"text-md/normal"},"Default layout: ",MI[u]),C!=null&&o(Q,{variant:"text-md/normal"},"Default sort order: ",PI[C]),_!=null&&o("div",{className:"shc-lock-screen-default-emoji-container"},o(Q,{variant:"text-md/normal"},"Default reaction emoji:"),Ie.defaultRules[_.emojiName?"emoji":"customEmoji"].react({name:_.emojiName?TI.convertSurrogateToName(_.emojiName):pn.getCustomEmojiById(_.emojiId)?.name??"",emojiId:_.emojiId??void 0,surrogate:_.emojiName??void 0,src:_.emojiName?xI.getURL(_.emojiName):void 0},void 0,{key:"0"})),e.hasFlag(16)&&o(Q,{variant:"text-md/normal"},"Posts on this forum require a tag to be set."),y&&y.length>0&&o("div",{className:"shc-lock-screen-tags-container"},o(Q,{variant:"text-lg/bold"},"Available tags:"),o("div",{className:"shc-lock-screen-tags"},y.map(z=>o(bI,{tag:z})))),o("div",{className:"shc-lock-screen-allowed-users-and-roles-container"},o("div",{className:"shc-lock-screen-allowed-users-and-roles-container-title"},M.plugins.PermissionsViewer.enabled&&o(W,{text:"Permission Details"},({onMouseLeave:z,onMouseEnter:te})=>o("button",{onMouseLeave:z,onMouseEnter:te,className:"shc-lock-screen-allowed-users-and-roles-container-permdetails-btn",onClick:()=>Sr(r,ue.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(Q,{variant:"text-lg/bold"},"Allowed users and roles:"),o(W,{text:t?"Hide Allowed Users and Roles":"View Allowed Users and Roles"},({onMouseLeave:z,onMouseEnter:te})=>o("button",{onMouseLeave:z,onMouseEnter:te,className:"shc-lock-screen-allowed-users-and-roles-container-toggle-btn",onClick:()=>n(U=>!U)},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(mb,{channel:e}))))}var mb,db,SI,bI,TI,xI,wI,PI,MI,II,CI,gb,hb=m(()=>{"use strict";a();D();ie();ve();Wn();O();T();xi();Ti();wm();db=P("auto","content","scrollerBase"),SI=P("chat","content","noChat","chatContent"),bI=re(()=>Ht(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")})),TI=P("convertSurrogateToName"),xI=P("getURL","buildEmojiReactionColorsPlatformed"),wI={[0]:"text",[5]:"announcement",[15]:"forum",[2]:"voice",[13]:"stage"},PI={[0]:"Latest activity",[1]:"Creation date"},MI={[0]:"Not set",[1]:"List view",[2]:"Gallery view"},II={[1]:"Automatic",[2]:"720p"},CI="/assets/433e3ec4319a9d11b0cbe39342614982.svg";gb=A.wrap(NI)});var yb,xm,Pm,No,Mm,wm=m(()=>{"use strict";a();pb();D();ie();w();Wr();b();O();T();hb();yb=P("channelEmoji","unread","icon"),xm=1n<<10n,Pm=1n<<20n,No=k({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}}),Mm=g({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:No,patches:[{find:".CannotShow=",replacement:[{match:/(?<=isChannelGatedAndVisible\(this\.record\.guild_id,this\.record\.id\).+?renderLevel:)(\i)\..+?(?=,)/,replace:(e,t)=>`this.category.isCollapsed?${t}.WouldShowIfUncollapsed:${t}.Show`},{match:/(?<=(if\(!\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL.+?{)if\(this\.id===\i\).+?};)(if\(!\i\.\i\.isChannelGatedAndVisible\(.+?})(.+?)(?=return{renderLevel:\i\.Show.{0,40}?return \i)/,replace:(e,t,n,r)=>`${r}${t}${n}}`},{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=function.+?return ).+?\?(.+?):\i\.CannotShow(?=})/,replace:(e,t)=>t}]},{find:"VoiceChannel, transitionTo: Channel does not have a guildId",replacement:[{match:/(?<=getCurrentClientVoiceChannelId\((\i)\.guild_id\);if\()/,replace:(e,t)=>`!$self.isHiddenChannel(${t})&&`},{match:/(?=\|\|\i\.default\.selectVoiceChannel\((\i)\.id\))/,replace:(e,t)=>`||$self.isHiddenChannel(${t})`},{match:/!__OVERLAY__&&\((?<=selectVoiceChannel\((\i)\.id\).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t},true)||`}]},{find:"VoiceChannel.renderPopout: There must always be something to render",replacement:[...["renderEditButton","renderInviteButton","renderOpenChatButton"].map(e=>({match:new RegExp(`(?<=${e}=function\\(\\){)`,"g"),replace:"if($self.isHiddenChannel(this.props.channel))return null;"}))]},{find:".Messages.CHANNEL_TOOLTIP_DIRECTORY",predicate:()=>No.store.showMode===0,replacement:{match:/(?=switch\((\i)\.type\).{0,30}\.GUILD_ANNOUNCEMENT.{0,30}\(0,\i\.\i\))/,replace:(e,t)=>`if($self.isHiddenChannel(${t}))return $self.LockIcon;`}},{find:".UNREAD_HIGHLIGHT",predicate:()=>No.store.showMode===1,replacement:[{match:/(?<=\i\.name,\i=)(?=(\i)\.muted)/,replace:(e,t)=>`$self.isHiddenChannel(${t}.channel)?true:`},{match:/\(\).children.+?:null(?<=(\i)=\i\.channel,.+?)/,replace:(e,t)=>`${e},$self.isHiddenChannel(${t})?$self.HiddenChannelIcon():null`},{match:/(?<=\.wrapper:\i\(\)\.notInteractive,)(.+?)((\i)\?\i\.MUTED)/,replace:(e,t,n,r)=>`${n}:"",${t}${r}?""`}]},{find:".UNREAD_HIGHLIGHT",replacement:[{predicate:()=>No.store.hideUnreads===!1&&No.store.showMode===1,match:/\.LOCKED:\i(?<=(\i)=\i\.channel,.+?)/,replace:(e,t)=>`${e}&&!$self.isHiddenChannel(${t})`},{predicate:()=>No.store.hideUnreads===!0,match:/(?<=\i\.connected,\i=)(?=(\i)\.unread)/,replace:(e,t)=>`$self.isHiddenChannel(${t}.channel)?false:`}]},{find:'.displayName="ChannelListUnreadsStore"',replacement:{match:/(?<=return null!=(\i))(?=.{0,130}?hasRelevantUnread\(\i\))/g,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`}},{find:"Missing channel in Channel.renderHeaderToolbar",replacement:[{match:/(?<=renderHeaderToolbar=function.+?case \i\.\i\.GUILD_TEXT:)(?=.+?;(.+?{channel:(\i)},"notifications"\)\);))/,replace:(e,t,n)=>`if($self.isHiddenChannel(${n})){${t}break;}`},{match:/(?<=renderHeaderToolbar=function.+?case \i\.\i\.GUILD_FORUM:.+?if\(!\i\){)(?=.+?;(.+?{channel:(\i)},"notifications"\)\)))/,replace:(e,t,n)=>`if($self.isHiddenChannel(${n})){${t};break;}`},{match:/renderMobileToolbar=function.+?case \i\.\i\.GUILD_FORUM:(?<=(\i)\.renderMobileToolbar.+?)/,replace:(e,t)=>`${e}if($self.isHiddenChannel(${t}.props.channel))break;`},{match:/(?<=renderHeaderBar=function.+?hideSearch:(\i)\.isDirectory\(\))/,replace:(e,t)=>`||$self.isHiddenChannel(${t})`},{match:/(?<=renderSidebar=function\(\){)/,replace:"if($self.isHiddenChannel(this.props.channel))return null;"},{match:/(?<=renderChat=function\(\){)/,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"\);else{(?=.+?getChannel\((\i)\))/,replace:(e,t)=>`${e}if($self.isHiddenChannel({channelId:${t}}))return;`}},{find:'"alt+shift+down"',replacement:{match:/(?<=getChannel\(\i\);return null!=(\i))(?=.{0,130}?hasRelevantUnread\(\i\))/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`}},{find:'"alt+down"',replacement:{match:/(?<=getState\(\)\.channelId.{0,30}?\(0,\i\.\i\)\(\i\))(?=\.map\()/,replace:".filter(ch=>!$self.isHiddenChannel(ch))"}},{find:".Messages.ROLE_REQUIRED_SINGLE_USER_MESSAGE",replacement:[{match:/computePermissionsForRoles.+?}\)}(?<=function (\i)\(.+?)(?=var)/,replace:(e,t)=>`${e}$self.setChannelBeginHeaderComponent(${t});`},{match:/ADMINISTRATOR\)\|\|(?<=context:(\i)}.+?)(?=(.+?)VIEW_CHANNEL)/,replace:(e,t,n)=>`${e}!Vencord.Webpack.Common.PermissionStore.can(${Pm}n,${t})?${n}CONNECT):`},{match:/permissionOverwrites\[.+?\i=(?<=context:(\i)}.+?)(?=(.+?)VIEW_CHANNEL)/,replace:(e,t,n)=>`${e}!Vencord.Webpack.Common.PermissionStore.can(${Pm}n,${t})?${n}CONNECT):`},{match:/sortBy.{0,100}?return (?<=var (\i)=\i\.channel.+?)(?=\i\.id)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?true:`},{match:/computePermissionsForRoles.+?.value\(\)(?<=var (\i)=\i\.channel.+?)/,replace:(e,t)=>`${e}.reduce(...$self.makeAllowedRolesReduce(${t}.guild_id))`},{match:/MANAGE_ROLES.{0,60}?return(?=\(.+?(\(0,\i\.jsxs\)\("div",{className:\i\(\)\.members.+?guildId:(\i)\.guild_id.+?roleColor.+?]}\)))/,replace:(e,t,n)=>(t=t.replace(Uo(/(?<=users:\i)/),`,channel:${n}`),t=t.replace(Uo(/1!==\i\.length/),"true"),`${e} $self.isHiddenChannel(${n},true)?${t}:`)}]},{find:"().avatars),children",replacement:[{match:/=(\i)\.maxUsers,/,replace:(e,t)=>`${e}channel=${t}.channel,`},{match:/\i>0(?=&&.{0,60}renderPopout)/,replace:e=>`($self.isHiddenChannel(typeof channel!=="undefined"?channel:void 0,true)?true:${e})`},{match:/(?<=\.value\(\),(\i)=.+?length-)1(?=\]=.{0,60}renderPopout)/,replace:(e,t)=>`($self.isHiddenChannel(typeof channel!=="undefined"?channel:void 0,true)&&${t}<=0?0:1)`},{match:/(?<="\+",)(\i)\+1/,replace:(e,t)=>`$self.isHiddenChannel(typeof channel!=="undefined"?channel:void 0,true)&&${t}<=0?"":${e}`}]},{find:".Messages.SHOW_CHAT",replacement:[{match:/"more-options-popout"\)\);if\((?<=function \i\((\i)\).+?)/,replace:(e,t)=>`${e}!${t}.inCall&&$self.isHiddenChannel(${t}.channel,true)){}else if(`},{match:/"popup".{0,100}?if\((?<=(\i)\.channel.+?)/,replace:(e,t)=>`${e}(${t}.inCall||!$self.isHiddenChannel(${t}.channel,true))&&`},{match:/this\.renderVoiceChannelEffects.+?children:(?<=renderContent=function.+?)/,replace:"$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?$self.HiddenChannelLockScreen(this.props.channel):"},{match:/this\.renderVoiceChannelEffects.+?disableGradients:(?<=renderContent=function.+?)/,replace:"$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)||"},{match:/(?:{|,)render(?!Header|ExternalHeader).{0,30}?:(?<=renderContent=function.+?)(?!void)/g,replace:"$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?null:"},{match:/callContainer,(?<=\(\)\.callContainer,)/,replace:'$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?"":'}]},{find:"useNotificationSettingsItem: channel cannot be undefined",replacement:[{match:/"124px".+?children:(?<=var (\i)=\i\.channel.+?)(?=.{0,20}?}\)}function)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?$self.HiddenChannelLockScreen(${t}):`},{match:/render(?:BottomLeft|BottomCenter|BottomRight|ChatToasts):(?<=var (\i)=\i\.channel.+?)/g,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?null:`},{match:/"124px".+?disableGradients:(?<=(\i)\.getGuildId\(\).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})||`},{match:/"124px".+?style:(?<=(\i)\.getGuildId\(\).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?void 0:`},{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:'"^/guild-stages/(\\\\d+)(?:/)?(\\\\d+)?"',replacement:{match:/\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL,\i\)/,replace:"true"}},{find:".shouldCloseDefaultModals",replacement:{match:/(?<=getChannel\((\i)\)\)(?=.{0,100}?selectVoiceChannel))/,replace:(e,t)=>`&&!$self.isHiddenChannel({channelId:${t}})`}},{find:'.displayName="GuildChannelStore"',replacement:[{match:/isChannelGated\(.+?\)(?=\|\|)/,replace:e=>`${e}||true`},{match:/(?<=getChannels=function\(\i)\).+?(?=return (\i)})/,replace:(e,t)=>`,shouldIncludeHidden=false${e}${t}=$self.resolveGuildChannels(${t},shouldIncludeHidden);`}]},{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"}}],setChannelBeginHeaderComponent:fb,isHiddenChannel(e,t=!1){return!e||(e.channelId&&(e=Z.getChannel(e.channelId)),!e||e.isDM()||e.isGroupDM()||e.isMultiUserDM())?!1:!je.can(xm,e)||t&&!je.can(Pm,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(gb,{channel:e}),LockIcon:A.wrap(()=>o("svg",{className:yb.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:A.wrap(()=>o(W,{text:"Hidden Channel"},({onMouseLeave:e,onMouseEnter:t})=>o("svg",{onMouseLeave:e,onMouseEnter:t,className:yb.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 vb=m(()=>{});var Wa,Im,Sb=m(()=>{"use strict";a();vb();D();w();b();Wa=k({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"}]},inReplies:{type:3,default:!1,description:"Also apply functionality to reply previews"}}),Im=g({name:"ShowMeYourName",description:"Display usernames next to nicks, or no nicks at all",authors:[p.dzshn],patches:[{find:".withMentionPrefix",replacement:{match:/(?<=onContextMenu:\i,children:)\i\+\i/,replace:"$self.renderUsername(arguments[0])"}}],settings:Wa,renderUsername:({author:e,message:t,isRepliedMessage:n,withMentionPrefix:r})=>{if(t.interaction)return e?.nick;try{let{username:i}=t.author,{nick:s}=e,l=r?"@":"";return i===s||n&&!Wa.store.inReplies?l+s:Wa.store.mode==="user-nick"?o(d,null,l,i," ",o("span",{className:"vc-smyn-suffix"},s)):Wa.store.mode==="nick-user"?o(d,null,l,s," ",o("span",{className:"vc-smyn-suffix"},i)):l+i}catch{return e?.nick}}})});function kI(e){let[t,n]=I.useState(Cm);function r(i){Nm.store.persistState&&(Cm=i),n(i)}return I.useEffect(()=>{let i=(s,l)=>{t&&(Nm.store.autoDisable&&r(!1),l.content.startsWith("@silent ")||(l.content="@silent "+l.content))};return lt(i),()=>void ct(i)},[t]),e.type.analyticsName!=="normal"?null:o(W,{text:t?"Disable Silent Message":"Enable Silent Message"},i=>o("div",{style:{display:"flex"}},o(N,{...i,onClick:()=>r(!t),size:"",look:Zt.BLANK,innerClassName:mt.button,style:{padding:"0 6px"}},o("div",{className:mt.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 Cm,Nm,km,bb=m(()=>{"use strict";a();Sn();D();ie();w();b();T();Cm=!1,Nm=k({persistState:{type:3,description:"Whether to persist the state of the silent message toggle when changing channels",default:!1,onChange(e){e===!1&&(Cm=!1)}},autoDisable:{type:3,description:"Automatically disable the silent message toggle again after sending one",default:!0}});km=g({name:"SilentMessageToggle",authors:[p.Nuckyz,p.CatNoir],description:"Adds a button to the chat bar to toggle sending a silent message.",dependencies:["MessageEventsAPI"],settings:Nm,patches:[{find:".activeCommandOption",replacement:{match:/"gift"\)\);(?<=(\i)\.push.+?disabled:(\i),.+?)/,replace:(e,t,n)=>`${e};try{${n}||${t}.push($self.SilentMessageToggle(arguments[0]));}catch{}`}}],SilentMessageToggle:A.wrap(kI,{noop:!0})})});function RI(e){let{isEnabled:t}=ro.use(["isEnabled"]),n=()=>ro.store.isEnabled=!ro.store.isEnabled;return e.type.analyticsName!=="normal"?null:o(W,{text:t?"Disable Silent Typing":"Enable Silent Typing"},r=>o("div",{style:{display:"flex"}},o(N,{...r,onClick:n,size:"",look:Zt.BLANK,innerClassName:mt.button,style:{padding:"0 6px"}},o("div",{className:mt.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 ro,Rm,Tb=m(()=>{"use strict";a();_t();D();ie();w();b();T();ro=k({showIcon:{type:3,default:!1,description:"Show an icon for toggling the plugin",restartNeeded:!0},isEnabled:{type:3,description:"Toggle functionality",default:!0}});Rm=g({name:"SilentTyping",authors:[p.Ven,p.dzshn],description:"Hide that you are typing",patches:[{find:"startTyping:",replacement:{match:/startTyping:.+?,stop/,replace:"startTyping:$self.startTyping,stop"}},{find:".activeCommandOption",predicate:()=>ro.store.showIcon,replacement:{match:/(.)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&;try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}"}}],dependencies:["CommandsAPI"],settings:ro,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)=>{ro.store.isEnabled=!!Oe(e,"value",!ro.store.isEnabled),oe(t.channel.id,{content:ro.store.isEnabled?"Silent typing enabled!":"Silent typing disabled!"})}}],async startTyping(e){ro.store.isEnabled||E.dispatch({type:"TYPING_START_LOCAL",channelId:e})},chatBarIcon:A.wrap(RI,{noop:!0})})});var Am,xb=m(()=>{"use strict";a();wt();w();b();T();Lm();Am=g({name:"SortFriendRequests",authors:[p.Megu],description:"Sorts friend requests by date of receipt",patches:[{find:".PENDING_INCOMING||",replacement:[{match:/\.sortBy\(\(function\((\w)\){return \w{1,3}\.comparator}\)\)/,replace:(e,t)=>`.sortBy((function(${t}) { + return ${t}.type === 3 || ${t}.type === 4 + ? -Vencord.Plugins.plugins.SortFriendRequests.getSince(${t}.user) + : ${t}.comparator + }))`},{predicate:()=>M.plugins.SortFriendRequests.showDates,match:/(user:(\w{1,3}),.{10,30}),subText:(\w{1,3}),(.{10,30}userInfo}\))/,replace:(e,t,n,r,i)=>`${t}, + subText: Vencord.Plugins.plugins.SortFriendRequests.makeSubtext(${r}, ${n}), + ${i}`}]}],getSince(e){return new Date(et.getSince(e.id))},makeSubtext(e,t){let n=this.getSince(t);return o(le,{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 wb,Pb=m(()=>{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-album-image { - border-radius: 3px; -} +#vc-spotify-player:hover .vc-spotify-button-row { + opacity: 1; + height: 32px; + pointer-events: auto; -#vc-spotify-album-image:hover { - filter: brightness(1.2); - cursor: pointer; + /* only transition opacity on show to prevent clipping */ + transition-property: height, opacity; } +`,classNames:{},dom:null});wb="src/plugins/spotifyControls/hoverOnly.css"});var Mb=m(()=>{});var ye,Ib=m(()=>{"use strict";a();D();sn();O();T();ye=dt(()=>{let{Store:e}=wl,t=P("getActiveSocketAndDevice"),n=P("SpotifyAPIMarker"),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=M.plugins.SpotifyControls.useSpotifyUris||Vencord.Plugins.isPluginEnabled("OpenInApp")?"spotify:"+c.replaceAll("/",(h,f)=>f===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,h={}){this.device?.is_active&&((h.query??={}).device_id=this.device.id);let{socket:f}=t.getActiveSocketAndDevice();return n[c](f.accountId,f.accessToken,{url:r+u,...h})}}let s=new i(E,{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 Em(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 kr(e,t){return()=>o("svg",{className:J(we("button-icon"),we(t)),height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":t,focusable:!1},o("path",{d:e}))}function Ui(e){return o("button",{className:we("button"),...e},e.children)}function BI({name:e,path:t}){let n=`spotify-copy-${e}`,r=`spotify-open-${e}`;return o(L.Menu,{navId:`spotify-${e}-menu`,onClose:()=>E.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":`Spotify ${e} Menu`},o(L.MenuItem,{key:n,id:n,label:`Copy ${e} Link`,action:()=>Yt("https://open.spotify.com"+t),icon:Ys}),o(L.MenuItem,{key:r,id:r,label:`Open ${e} in Spotify`,action:()=>ye.openExternal(t),icon:zo}))}function FI(e,t){return n=>cn.open(n,()=>o(BI,{name:e,path:t}))}function $I(){let[e,t,n]=Fe([ye],()=>[ye.isPlaying,ye.shuffle,ye.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(le,{className:we("button-row"),style:{gap:0}},o(Ui,{className:J(we("button"),we(t?"shuffle-on":"shuffle-off")),onClick:()=>ye.setShuffle(!t)},o(_I,null)),o(Ui,{onClick:()=>ye.prev()},o(EI,null)),o(Ui,{onClick:()=>ye.setPlaying(!e)},e?o(LI,null):o(AI,null)),o(Ui,{onClick:()=>ye.next()},o(DI,null)),o(Ui,{className:J(we("button"),we(i)),onClick:()=>ye.setRepeat(r),style:{position:"relative"}},n==="track"&&o("span",{className:we("repeat-1")},"1"),o(OI,null)))}function GI(){let{duration:e}=ye.track,[t,n,r]=Fe([ye],()=>[ye.mPosition,ye.isSettingPosition,ye.isPlaying]),[i,s]=V(t);return rt(()=>{if(r&&!n){s(ye.position);let l=setInterval(()=>{s(c=>c+1e3)},1e3);return()=>clearInterval(l)}},[t,n,r]),o("div",{id:we("progress-bar")},o(v.FormText,{variant:"text-xs/medium",className:we("progress-time")+" "+we("time-left"),"aria-label":"Progress"},Em(i)),o(L.MenuSliderControl,{minValue:0,maxValue:e,value:i,onChange:l=>{n||(s(l),UI(l))},renderValue:Em}),o(v.FormText,{variant:"text-xs/medium",className:we("progress-time")+" "+we("time-right"),"aria-label":"Total Duration"},Em(e)))}function HI({track:e}){let t=Fe([ye],()=>ye.volume);return o(L.Menu,{navId:"spotify-album-menu",onClose:()=>E.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Spotify Album Menu"},o(L.MenuItem,{key:"open-album",id:"open-album",label:"Open Album",action:()=>ye.openExternal(`/album/${e.album.id}`),icon:zo}),o(L.MenuItem,{key:"view-cover",id:"view-cover",label:"View Album Cover",action:()=>Fo(e.album.image.url),icon:jo}),o(L.MenuControlItem,{id:"spotify-volume",key:"spotify-volume",label:"Volume",control:(n,r)=>o(L.MenuSliderControl,{...n,ref:r,value:t,minValue:0,maxValue:100,onChange:At(i=>ye.setVolume(i))})}))}function Dm(e,t,n){return t?{role:"link",onClick:()=>ye.openExternal(n),onContextMenu:FI(e,n)}:{}}function zI({track:e}){let t=e?.album?.image,[n,r]=V(!1),i=o(d,null,t&&o("img",{id:we("album-image"),src:t.url,alt:"Album Image",onClick:()=>r(!n),onContextMenu:s=>{cn.open(s,()=>o(HI,{track:e}))}}));return n&&t?o("div",{id:we("album-expanded-wrapper")},i):o("div",{id:we("info-wrapper")},i,o("div",{id:we("titles")},o(v.FormText,{variant:"text-sm/semibold",id:we("song-title"),className:we("ellipoverflow"),title:e.name,...Dm("Song",e.id,`/track/${e.id}`)},e.name),e.artists.some(s=>s.name)&&o(v.FormText,{variant:"text-sm/normal",className:we("ellipoverflow")},"by\xA0",e.artists.map((s,l)=>o(I.Fragment,{key:s.name},o("span",{className:we("artist"),style:{fontSize:"inherit"},title:s.name,...Dm("Artist",s.id,`/artist/${s.id}`)},s.name),l!==e.artists.length-1&&o("span",{className:we("comma")},", ")))),e.album.name&&o(v.FormText,{variant:"text-sm/normal",className:we("ellipoverflow")},"on\xA0",o("span",{id:we("album-title"),className:we("album"),style:{fontSize:"inherit"},title:e.album.name,...Dm("Album",e.album.id,`/album/${e.album.id}`)},e.album.name))))}function Cb(){let e=Fe([ye],()=>ye.track,null,(s,l)=>s?.id?s.id===l?.id:s?.name===l?.name),t=Fe([ye],()=>ye.device,null,(s,l)=>s?.id===l?.id),n=Fe([ye],()=>ye.isPlaying),[r,i]=V(!1);return I.useEffect(()=>{if(i(!1),!n){let s=setTimeout(()=>i(!0),3e5);return()=>clearTimeout(s)}},[n]),!e||!t?.is_active||r?null:o(A,{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:we("player")},o(zI,{track:e}),o(GI,null),o($I,null)))}var we,AI,LI,EI,DI,OI,_I,UI,Nb=m(()=>{"use strict";a();Mb();ie();wt();_n();nr();tt();fe();T();Ib();we=e=>`vc-spotify-${e}`;AI=kr("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"),LI=kr("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"),EI=kr("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"),DI=kr("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"),OI=kr("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"),_I=kr("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");UI=At(e=>{ye.seek(e)})});function kb(e){(e?Je:Mt)(wb)}var Om,Rb=m(()=>{"use strict";a();D();Ge();w();b();Pb();Nb();Om=g({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=>kb(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:(.{1,3})\.bind\(null,(.{1,6})\.get\)/,replace:"SpotifyAPIMarker:1,post:$1.bind(null,$2.post),$&"}},{find:'repeat:"off"!==',replacement:{match:/repeat:"off"!==(.{1,3}),/,replace:"actual_repeat:$1,$&"}}],start:()=>kb(M.plugins.SpotifyControls.hoverControls),renderPlayer:()=>o(Cb,null)})});var _m,Bm,Ab=m(()=>{"use strict";a();D();w();b();_m=k({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}}),Bm=g({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:_m,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:()=>_m.store.noSpotifyAutoPause,match:/(?<=function \i\(\){)(?=.{0,200}SPOTIFY_AUTO_PAUSED\))/,replace:"return;"},{predicate:()=>_m.store.keepSpotifyActivityOnIdle,match:/(?<=shouldShowActivity=function\(\){.{0,50})&&!\i\.\i\.isIdle\(\)/,replace:""}]}]})});function $m(e,t){t={invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};let n=jI.getPendingReply(e);Lb.sendMessage(e,t,void 0,Lb.getSendMessageOptionsForReply(n)).then(()=>{n&&E.dispatch({type:"DELETE_PENDING_REPLY",channelId:e})})}var Fm,Lb,jI,Um,Eb=m(()=>{"use strict";a();_t();w();b();O();T();Fm=P("getPlayerState"),Lb=P("getSendMessageOptionsForReply","sendMessage"),jI=P("getPendingReply");Um=g({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=Fm.getTrack();if(n===null){oe(t.channel.id,{content:"You're not listening to any music."});return}$m(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=Fm.getTrack();if(n===null){oe(t.channel.id,{content:"You're not listening to any music."});return}$m(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=Fm.getTrack();if(n===null){oe(t.channel.id,{content:"You're not listening to any music."});return}$m(t.channel.id,{content:n.artists[0].external_urls.spotify})}}]})});var Db={};ge(Db,{default:()=>ZI});function WI({emoji:e,prefix:t,log:n,delta:r,instance:i}){return o(I.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 qI({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,h=(c-i)/1e3;return i=c,{sinceStart:u,sinceLast:h}});return o(v.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"),Gi.logs.map((l,c)=>o(WI,{key:c,...l,instance:s[c]})))))}function KI({trace:e}){let t=e.split(` +`);return o(v.FormSection,{title:"Server Trace",tag:"h2"},o("code",null,o(le,{flexDirection:"column",style:{color:"var(--header-primary)",gap:5,userSelect:"text"}},t.map(n=>o("span",null,n)))))}function YI(){if(!Gi?.logs)return o("div",null,"Loading...");let e=Gi.logGroups.find(t=>t.serverTrace)?.serverTrace;return o(I.Fragment,null,o(qI,{title:"Startup Timings",logs:Gi.logs,traceEnd:Gi.endTime_}),o("div",{style:{marginTop:5}},"\xA0"),e&&o(KI,{trace:e}))}var Gi,ZI,Ob=m(()=>{"use strict";a();ie();wt();O();T();Gi=P("markWithDelta","markAndLog","markAt");ZI=A.wrap(YI)});var Gm,_b=m(()=>{"use strict";a();w();ve();b();Gm=g({name:"StartupTimings",description:"Adds Startup Timings to the Settings menu",authors:[p.Megu],patches:[{find:"PAYMENT_FLOW_MODAL_TEST_PAGE,",replacement:{match:/{section:.{1,2}\..{1,3}\.PAYMENT_FLOW_MODAL_TEST_PAGE/,replace:'{section:"StartupTimings",label:"Startup Timings",element:$self.StartupTimingPage},$&'}}],StartupTimingPage:re(()=>(Ob(),Lo(Db)).default)})});var Bb,XI,Hm,Fb=m(()=>{"use strict";a();ki();w();fe();Wn();b();dr();T();Dr();pr();Jc();Bb="Vencord-SupportHelper-Dismiss",XI=[Xi,"1024286218801926184","1033680203433660458"],Hm=g({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=>XI.includes(e.channel.id),execute(){let{RELEASE_CHANNEL:e}=window.GLOBAL_ENV,t=(()=>"armcord"in window?`ArmCord v${window.armcord.version}`:`${typeof unsafeWindow<"u"?"UserScript":"Web"} (${navigator.userAgent})`)(),n=c=>c.endsWith("API")||Te[c].required,r=Object.keys(Te).filter(c=>Vencord.Plugins.isPluginEnabled(c)&&!n(c)),i=Object.keys(Te).filter(c=>Vencord.Plugins.isPluginEnabled(c)&&n(c)),s={Vencord:`v1.3.4 \u2022 ${rn}${ui.additionalInfo} - ${Intl.DateTimeFormat("en-GB",{dateStyle:"medium"}).format(1689131711949)}`,"Discord Branch":e,Client:t,Platform:window.navigator.platform,Outdated:ho,OpenAsar:"openasar"in window};return{content:` +**Vencord Debug Info** +>>> ${Object.entries(s).map(([c,u])=>`${c}: ${u}`).join(` +`)} -#vc-spotify-progress-bar { - position: relative; +Enabled Plugins (${r.length+i.length}): +${Kr(r.join(", ")+` - color: var(--text-normal); - width: 100%; - margin: 0.5em 0; - margin-bottom: 5px; -} - -#vc-spotify-progress-bar > [class^="slider"] { - flex-grow: 1; - width: 100%; - padding: 0 !important; -} - -#vc-spotify-progress-bar > [class^="slider"] [class^="bar-"] { - height: 4px !important; -} -#vc-spotify-progress-bar > [class^="slider"] [class^="grabber"] { - /* these importants are neccessary, it applies a width and height through inline styles */ - height: 10px !important; - width: 10px !important; - background-color: var(--interactive-normal); - border-color: var(--interactive-normal); - color: var(--interactive-normal); -} - -#vc-spotify-progress-text { - margin: 0; -} - -.vc-spotify-progress-time { - font-size: 12px; - - top: 10px; - position: absolute; -} - -.vc-spotify-time-left { - left: 0; -} -.vc-spotify-time-right { - right: 0; -} -`});var W,Dd=m(()=>{"use strict";i();ze();Et();L();k();Fd();W=We(()=>{let e=document.createElement("style");e.innerText=Ed,document.head.appendChild(e);let{Store:t}=Uo,n=M("getActiveSocketAndDevice"),r=M("SpotifyAPIMarker"),s="https://api.spotify.com/v1/me/player";class a extends t{constructor(d,v){super(d,v)}mPosition=0;start=0;track=null;device=null;isPlaying=!1;repeat="off";shuffle=!1;volume=0;isSettingPosition=!1;openExternal(d){VencordNative.ipc.invoke(j.OPEN_EXTERNAL,"https://open.spotify.com"+d)}get position(){let d=this.mPosition;return this.isPlaying&&(d+=Date.now()-this.start),d}set position(d){this.mPosition=d,this.start=Date.now()}prev(){this.req("post","/previous")}next(){this.req("post","/next")}setVolume(d){this.req("put","/volume",{query:{volume_percent:Math.round(d)}}).then(()=>{this.volume=d,this.emitChange()})}setPlaying(d){this.req("put",d?"/play":"/pause")}setRepeat(d){this.req("put","/repeat",{query:{state:d}})}setShuffle(d){this.req("put","/shuffle",{query:{state:d}}).then(()=>{this.shuffle=d,this.emitChange()})}seek(d){return this.isSettingPosition?Promise.resolve():(this.isSettingPosition=!0,this.req("put","/seek",{query:{position_ms:Math.round(d)}}).catch(v=>{console.error("[VencordSpotifyControls] Failed to seek",v),this.isSettingPosition=!1}))}req(d,v,h={}){this.device?.is_active&&((h.query??={}).device_id=this.device.id);let{socket:g}=n.getActiveSocketAndDevice();return r[d](g.accountId,g.accessToken,{url:s+v,...h})}}let c=new a(I,{SPOTIFY_PLAYER_STATE(f){c.track=f.track,c.device=f.device??null,c.isPlaying=f.isPlaying??!1,c.volume=f.volumePercent??0,c.repeat=f.actual_repeat||"off",c.position=f.position??0,c.isSettingPosition=!1,c.emitChange()},SPOTIFY_SET_DEVICES({devices:f}){c.device=f.find(d=>d.is_active)??f[0]??null,c.emitChange()}});return c})});function Zs(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 Yt(e,t){return()=>o("svg",{className:ie(K("button-icon"),K(t)),height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":t,focusable:!1},o("path",{d:e}))}function An(e){return o("button",{className:K("button"),...e},e.children)}function ug(){let[e,t,n]=Kt([W],()=>[W.isPlaying,W.shuffle,W.repeat]),[r,s]=(()=>{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(Z,{className:K("button-row"),style:{gap:0}},o(An,{className:ie(K("button"),K(t?"shuffle-on":"shuffle-off")),onClick:()=>W.setShuffle(!t)},o(mg,null)),o(An,{onClick:()=>W.prev()},o(lg,null)),o(An,{onClick:()=>W.setPlaying(!e)},e?o(cg,null):o(ag,null)),o(An,{onClick:()=>W.next()},o(pg,null)),o(An,{className:ie(K("button"),K(s)),onClick:()=>W.setRepeat(r),style:{position:"relative"}},n==="track"&&o("span",{className:K("repeat-1")},"1"),o(dg,null)))}function gg(){let{duration:e}=W.track,[t,n,r]=Kt([W],()=>[W.mPosition,W.isSettingPosition,W.isPlaying]),[s,a]=b.useState(t);return b.useEffect(()=>{if(r&&!n){a(W.position);let c=setInterval(()=>{a(f=>f+1e3)},1e3);return()=>clearInterval(c)}},[t,n,r]),o("div",{id:K("progress-bar")},o(y.FormText,{variant:"text-xs/medium",className:K("progress-time")+" "+K("time-left"),"aria-label":"Progress"},Zs(s)),o(Nd,{minValue:0,maxValue:e,value:s,onChange:c=>{n||(a(c),fg(c))},renderValue:Zs}),o(y.FormText,{variant:"text-xs/medium",className:K("progress-time")+" "+K("time-right"),"aria-label":"Total Duration"},Zs(e)))}function hg({track:e}){let t=Kt([W],()=>W.volume);return o(ue.ContextMenu,{navId:"spotify-album-menu",onClose:()=>I.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Spotify Album Menu"},o(ue.MenuItem,{key:"open-album",id:"open-album",label:"Open Album",action:()=>W.openExternal(`/album/${e.album.id}`)}),o(ue.MenuItem,{key:"view-cover",id:"view-cover",label:"View Album Cover",action:()=>Vencord.Plugins.plugins.ViewIcons.openImage(e.album.image.url)}),o(ue.MenuControlItem,{id:"spotify-volume",key:"spotify-volume",label:"Volume",control:(n,r)=>o(Nd,{...n,ref:r,value:t,minValue:0,maxValue:100,onChange:gt(s=>W.setVolume(s))})}))}function yg({track:e}){let t=e?.album?.image,[n,r]=b.useState(!1),s=o(l,null,t&&o("img",{id:K("album-image"),src:t.url,alt:"Album Image",onClick:()=>r(!n),onContextMenu:a=>{Yo.open(a,()=>o(hg,{track:e}))}}));return n&&t?o("div",{id:K("album-expanded-wrapper")},s):o("div",{id:K("info-wrapper")},s,o("div",{id:K("titles")},o(y.FormText,{variant:"text-sm/semibold",id:K("song-title"),className:K("ellipoverflow"),role:e.id?"link":void 0,title:e.name,onClick:e.id?()=>{W.openExternal(`/track/${e.id}`)}:void 0},e.name),e.artists.some(a=>a.name)&&o(y.FormText,{variant:"text-sm/normal",className:K("ellipoverflow")},"by\xA0",e.artists.map((a,c)=>o(b.Fragment,{key:a.name},o(Pe,{className:K("artist"),disabled:!a.id,href:`https://open.spotify.com/artist/${a.id}`,style:{fontSize:"inherit"},title:a.name},a.name),c!==e.artists.length-1&&o("span",{className:K("comma")},", ")))),e.album.name&&o(y.FormText,{variant:"text-sm/normal",className:K("ellipoverflow")},"on\xA0",o(Pe,{id:K("album-title"),href:`https://open.spotify.com/album/${e.album.id}`,target:"_blank",className:K("album"),disabled:!e.album.id,style:{fontSize:"inherit"},title:e.album.name},e.album.name))))}function Od(){let e=Kt([W],()=>W.track,null,(a,c)=>a?.id?a.id===c?.id:a?.name===c?.name),t=Kt([W],()=>W.device,null,(a,c)=>a?.id===c?.id),n=Kt([W],()=>W.isPlaying),[r,s]=b.useState(!1);return b.useEffect(()=>{if(s(!1),!n){let a=setTimeout(()=>s(!0),3e5);return()=>clearTimeout(a)}},[n]),!e||!t?.is_active||r?null:o(D,{fallback:()=>o(l,null,o(y.FormText,null,"Failed to render Spotify Modal :("),o(y.FormText,null,"Check the console for errors"))},o("div",{id:K("player")},o(yg,{track:e}),o(gg,null),o(ug,null)))}var K,Kt,ag,cg,lg,pg,dg,mg,fg,Nd,Bd=m(()=>{"use strict";i();ne();Ne();wt();yn();O();L();k();Dd();K=e=>`vc-spotify-${e}`;Kt=re("useStateFromStores");ag=Yt("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"),cg=Yt("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"),lg=Yt("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"),pg=Yt("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"),dg=Yt("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"),mg=Yt("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");fg=gt(e=>{W.seek(e)}),Nd=Q(()=>{let e=E.byCode("sliderContainer");return Ce(t=>t.render&&e(t.render))})});var Vs,$d=m(()=>{"use strict";i();x();T();Bd();Vs=u({name:"SpotifyControls",description:"Spotify Controls",authors:[p.Ven,p.afn,p.KraXen72],dependencies:["MenuItemDeobfuscatorAPI"],patches:[{find:"showTaglessAccountPanel:",replacement:{match:/return ?(.{0,30}\(.{1,3},\{[^}]+?,showTaglessAccountPanel:.+?\}\))/,replace:"return [Vencord.Plugins.plugins.SpotifyControls.renderPlayer(),$1]"}},{find:".PLAYER_DEVICES",replacement:{match:/get:(.{1,3})\.bind\(null,(.{1,6})\.get\)/,replace:"SpotifyAPIMarker:1,post:$1.bind(null,$2.post),$&"}},{find:'repeat:"off"!==',replacement:{match:/repeat:"off"!==(.{1,3}),/,replace:"actual_repeat:$1,$&"}}],renderPlayer:()=>o(Od,null)})});var ea,Ud=m(()=>{"use strict";i();R();x();T();X("SpotifyCrack","Ify");ea=u({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],patches:[{find:'dispatch({type:"SPOTIFY_PROFILE_UPDATE"',replacement:[{match:/(function\((.{1,2})\){)(.{1,6}dispatch\({type:"SPOTIFY_PROFILE_UPDATE")/,replace:(e,t,n,r)=>`${t}${n}.body.product="premium";${r}`}]},{find:'.displayName="SpotifyStore"',predicate:()=>S.plugins.SpotifyCrack.noSpotifyAutoPause,replacement:{match:/function (.{1,2})\(\).{0,200}SPOTIFY_AUTO_PAUSED\);.{0,}}}}/,replace:"function $1(){}"}},{find:'.displayName="SpotifyStore"',predicate:()=>S.plugins.SpotifyCrack.keepSpotifyActivityOnIdle,replacement:{match:/(shouldShowActivity=function\(\){.{1,50})&&!.{1,6}\.isIdle\(\)(.{0,}?})/,replace:(e,t,n)=>`${t}${n}`}}],options:{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}}})});function na(e,t){t={invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};let n=vg.getPendingReply(e);Hd.sendMessage(e,t,void 0,Hd.getSendMessageOptionsForReply(n)).then(()=>{n&&I.dispatch({type:"DELETE_PENDING_REPLY",channelId:e})})}var ta,Hd,vg,oa,jd=m(()=>{"use strict";i();be();R();x();T();L();k();ta=M("getPlayerState"),Hd=M("getSendMessageOptionsForReply","sendMessage"),vg=M("getPendingReply");X("SpotifyShareCommands","Sendify");oa=u({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=ta.getTrack();if(n===null){U(t.channel.id,{content:"You're not listening to any music."});return}na(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=ta.getTrack();if(n===null){U(t.channel.id,{content:"You're not listening to any music."});return}na(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=ta.getTrack();if(n===null){U(t.channel.id,{content:"You're not listening to any music."});return}na(t.channel.id,{content:n.artists[0].external_urls.spotify})}}]})});var Gd={};ee(Gd,{default:()=>wg});function bg({emoji:e,prefix:t,log:n,delta:r,instance:s}){return o(b.Fragment,null,o("span",null,s.sinceStart.toFixed(3),"s"),o("span",null,s.sinceLast.toFixed(3),"s"),o("span",null,r?.toFixed(0)??""),o("span",null,o("pre",null,e," ",t??" ",n)))}function Sg({title:e,logs:t,traceEnd:n}){let r=t.find(c=>c.timestamp)?.timestamp??0,s=r,a=t.map(c=>{let f=c.timestamp??s,d=(f-r)/1e3,v=(f-s)/1e3;return s=f,{sinceStart:d,sinceLast:v}});return o(y.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"),_n.logs.map((c,f)=>o(bg,{key:f,...c,instance:a[f]})))))}function xg({trace:e}){let t=e.split(` -`);return o(y.FormSection,{title:"Server Trace",tag:"h2"},o("code",null,o(Z,{flexDirection:"column",style:{color:"var(--header-primary)",gap:5,userSelect:"text"}},t.map(n=>o("span",null,n)))))}function Tg(){if(!_n?.logs)return o("div",null,"Loading...");let e=_n.logGroups.find(t=>t.serverTrace)?.serverTrace;return o(b.Fragment,null,o(Sg,{title:"Startup Timings",logs:_n.logs,traceEnd:_n.endTime_}),o("div",{style:{marginTop:5}},"\xA0"),e&&o(xg,{trace:e}))}var _n,wg,zd=m(()=>{"use strict";i();ne();Ne();L();k();_n=M("markWithDelta","markAndLog","markAt");wg=D.wrap(Tg)});var ra,Wd=m(()=>{"use strict";i();x();O();T();ra=u({name:"StartupTimings",description:"Adds Startup Timings to the Settings menu",authors:[p.Megu],patches:[{find:"PAYMENT_FLOW_MODAL_TEST_PAGE,",replacement:{match:/({section:[\w.]+?\.PAYMENT_FLOW_MODAL_TEST_PAGE,)/,replace:'{section:"StartupTimings",label:"Startup Timings",element:Vencord.Plugins.plugins.StartupTimings.StartupTimingPage},$1'}}],StartupTimingPage:Q(()=>(zd(),Ao(Gd)).default)})});var ia,qd=m(()=>{"use strict";i();pt();x();T();ia=u({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(` +`+i.join(", "))} +`.trim().replaceAll("```\n","```")}}}],flux:{async CHANNEL_SELECT({channelId:e}){if(e===Xi&&!_r(F.getCurrentUser().id)&&ho&&rn!==await Nt.get(Bb)){let t=()=>Nt.set(Bb,rn);bt.show({title:"Hold on!",body:o("div",null,o(v.FormText,null,"You are using an outdated version of Vencord! Chances are, your issue is already fixed."),o(v.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})}}}})});function zb(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 QI(e){try{return zb(e),null}catch(t){return o("span",{style:{color:"var(--text-danger)"}},String(t))}}function zm({initialValue:e,onChange:t,placeholder:n}){let[r,i]=V(e);return o(Re,{placeholder:n,value:r,onChange:i,spellCheck:!1,onBlur:()=>r!==e&&t(r)})}function $b({title:e,rulesArray:t,rulesKey:n,update:r}){let i=e==="Using Regex";async function s(c){t.splice(c,1),await Nt.set(n,t),r()}async function l(c,u,h){u===t.length-1&&t.push(Hb()),t[u][h]=c,t[u].find===""&&t[u].replace===""&&t[u].onlyIfIncludes===""&&u!==t.length-1&&t.splice(u,1),await Nt.set(n,t),r()}return o(d,null,o(v.FormTitle,{tag:"h4"},e),o(le,{flexDirection:"column",style:{gap:"0.5em"}},t.map((c,u)=>o(I.Fragment,{key:`${c.find}-${u}`},o(le,{flexDirection:"row",style:{gap:0}},o(le,{flexDirection:"row",style:{flexGrow:1,gap:"0.5em"}},o(zm,{placeholder:"Find",initialValue:c.find,onChange:h=>l(h,u,"find")}),o(zm,{placeholder:"Replace",initialValue:c.replace,onChange:h=>l(h,u,"replace")}),o(zm,{placeholder:"Only if includes",initialValue:c.onlyIfIncludes,onChange:h=>l(h,u,"onlyIfIncludes")})),o(N,{size:N.Sizes.MIN,onClick:()=>s(u),style:{background:"none",...u===t.length-1?{visibility:"hidden",pointerEvents:"none"}:{}}},o("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},o("title",null,"Delete Rule"),o("path",{fill:"var(--status-danger)",d:"M15 3.999V2H9V3.999H3V5.999H21V3.999H15Z"}),o("path",{fill:"var(--status-danger)",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"})))),i&&QI(c.find)))))}function VI(){let[e,t]=V("");return o(d,null,o(v.FormTitle,{tag:"h4"},"Test Rules"),o(Re,{placeholder:"Type a message",onChange:t}),o(Re,{placeholder:"Message with rules applied",editable:!1,value:jb(e)}))}function jb(e){if(e.length===0)return e;if(e=" "+e+" ",Ka)for(let t of Ka)!t.find||!t.replace||t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)||(e=e.replaceAll(t.find,t.replace.replaceAll("\\n",` +`)));if(Ya){for(let t of Ya)if(!(!t.find||!t.replace)&&!(t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)))try{let n=zb(t.find);e=e.replace(n,t.replace.replaceAll("\\n",` +`))}catch{new Y("TextReplace").error(`Invalid regex: ${t.find}`)}}return e=e.trim(),e}var Ub,Gb,Hb,qa,Ka,Ya,JI,eC,jm,Wb=m(()=>{"use strict";a();ki();Sn();D();wt();w();be();ve();b();T();Ub="TextReplace_rulesString",Gb="TextReplace_rulesRegex",Hb=()=>({find:"",replace:"",onlyIfIncludes:""}),qa=()=>[Hb()],Ka=qa(),Ya=qa(),JI=k({replace:{type:6,description:"",component:()=>{let e=Lt();return o(d,null,o($b,{title:"Using String",rulesArray:Ka,rulesKey:Ub,update:e}),o($b,{title:"Using Regex",rulesArray:Ya,rulesKey:Gb,update:e}),o(VI,null))}}});eC="1102784112584040479",jm=g({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:JI,async start(){Ka=await Nt.get(Ub)??qa(),Ya=await Nt.get(Gb)??qa(),this.preSend=lt((e,t)=>{e!==eC&&(t.content=jb(t.content))})},stop(){ct(this.preSend)}})});var Wm,qb=m(()=>{"use strict";a();w();b();Wm=g({name:"TimeBarAllActivities",description:"Adds the Spotify time bar to all activities if they have start and end timestamps",authors:[p.obscurity],patches:[{find:"renderTimeBar=function",replacement:{match:/renderTimeBar=function\((.{1,3})\){.{0,50}?var/,replace:"renderTimeBar=function($1){var"}}]})});var Kb=m(()=>{});var ht,Hi=m(()=>{"use strict";a();D();b();ht=k({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 Za,qm=m(()=>{"use strict";a();Za={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 zi(e,t){let n=ht.store[e+"Input"],r=ht.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 io,ji=m(()=>{"use strict";a();Ge();Hi();io=Ee("vc-trans-")});function nC({settingsKey:e,includeAuto:t}){let n=ht.use([e])[e],r=zt(()=>{let i=Object.entries(Za).map(([s,l])=>({value:s,label:l}));return t||i.shift(),i},[]);return o("section",{className:G.bottom16},o(v.FormTitle,{tag:"h3"},ht.def[e].description),o(ls,{options:r,value:r.find(i=>i.value===n),placeholder:"Select a language",maxVisibleItems:5,closeOnSelect:!0,onChange:i=>ht.store[e]=i}))}function oC(){let e=ht.use(["autoTranslate"]).autoTranslate;return o(ft,{value:e,onChange:t=>ht.store.autoTranslate=t,note:ht.def.autoTranslate.description,hideBorder:!0},"Auto Translate")}function Yb({rootProps:e}){return o(Le,{...e},o($e,{className:io("modal-header")},o(v.FormTitle,{tag:"h2"},"Translate"),o(xt,{onClick:e.onClose})),o(Ue,{className:io("modal-content")},tC.map(t=>o(nC,{key:t,settingsKey:t,includeAuto:t.endsWith("Input")})),o(v.FormDivider,{className:G.bottom16}),o(oC,null)))}var tC,Zb=m(()=>{"use strict";a();Xe();Ze();T();qm();Hi();ji();tC=["receivedInput","receivedOutput","sentInput","sentOutput"]});function Rr({height:e=24,width:t=24,className:n}){return o("svg",{viewBox:"0 96 960 960",height:e,width:t,className:J(io("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 Xb({slateProps:e}){let{autoTranslate:t}=ht.use(["autoTranslate"]);if(e.type.analyticsName!=="normal")return null;let n=()=>ht.store.autoTranslate=!t;return o(W,{text:"Open Translate Modal"},({onMouseEnter:r,onMouseLeave:i})=>o("div",{style:{display:"flex"}},o(N,{"aria-haspopup":"dialog","aria-label":"",size:"",look:Zt.BLANK,onMouseEnter:r,onMouseLeave:i,innerClassName:mt.button,onClick:s=>{if(s.shiftKey)return n();Ce(l=>o(Yb,{rootProps:l}))},onContextMenu:()=>n(),style:{padding:"0 4px"}},o("div",{className:mt.buttonWrapper},o(Rr,{className:io({"auto-translate":t})})))))}var Km=m(()=>{"use strict";a();fe();Ze();T();Hi();Zb();ji()});function Zm(e,t){Ym.get(e)(t)}function rC({onDismiss:e}){return o("button",{onClick:e,className:io("dismiss")},"Dismiss")}function Jb({message:e}){let[t,n]=V();return rt(()=>{if(!e.vencordEmbeddedBy)return Ym.set(e.id,n),()=>void Ym.delete(e.id)},[]),t?o("span",{className:io("accessory")},o(Rr,{width:16,height:16}),Ie.parse(t.text)," ","(translated from ",Za[t.src]??t.src," - ",o(rC,{onDismiss:()=>n(void 0)}),")"):null}var Ym,Qb=m(()=>{"use strict";a();T();qm();Km();ji();Ym=new Map});var Vb,Xm,eT=m(()=>{"use strict";a();Kb();Pt();la();Sn();Ko();ie();w();b();T();Hi();Km();Qb();ji();Vb=(e,{message:t})=>()=>{if(!t.content)return;let n=nt("copy-text",e);!n||n.splice(n.findIndex(r=>r?.props?.id==="copy-text")+1,0,o(L.MenuItem,{id:"vc-trans",label:"Translate",icon:Rr,action:async()=>{let r=await zi("received",t.content);Zm(t.id,r)}}))},Xm=g({name:"Translate",description:"Translate messages with Google Translate",authors:[p.Ven],dependencies:["MessageAccessoriesAPI","MessagePopoverAPI","MessageEventsAPI"],settings:ht,translate:zi,patches:[{find:".activeCommandOption",replacement:{match:/(.)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&;try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}"}}],start(){Si("vc-translation",e=>o(Jb,{message:e.message})),pe("message",Vb),bn("vc-translate",e=>e.content?{label:"Translate",icon:Rr,message:e,channel:Z.getChannel(e.channel_id),onClick:async()=>{let t=await zi("received",e.content);Zm(e.id,t)}}:null),this.preSend=lt(async(e,t)=>{!ht.store.autoTranslate||!t.content||(t.content=(await zi("sent",t.content)).text)})},stop(){ct(this.preSend),de("message",Vb),Tn("vc-translate"),Sp("vc-translation")},chatBarIcon:e=>o(A,{noop:!0},o(Xb,{slateProps:e}))})});function Jm({a:e,b:t,c:n}){return[o("strong",{key:"0"},e),", ",o("strong",{key:"2"},t),`, and ${n} others are typing...`]}var iC,Xa,sC,Qm,Vm=m(()=>{"use strict";a();D();ie();w();tt();b();O();T();iC=ce(".typingIndicatorRef","svg"),Xa=k({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"}});sC=A.wrap(function({user:e,guildId:t}){return o("strong",{role:"button",onClick:()=>{mn(e.id)},style:{display:"grid",gridAutoFlow:"column",gap:"4px",color:Xa.store.showRoleColors?Ae.getMember(t,e.id)?.colorString:void 0,cursor:"pointer"}},Xa.store.showAvatars&&o("div",{style:{marginTop:"4px"}},o(iC,{size:"SIZE_16",src:e.getAvatarURL(t,128)})),Ae.getNick(t,e.id)||!t&&et.getNickname(e.id)||e.globalName||e.username)},{noop:!0}),Qm=g({name:"TypingTweaks",description:"Show avatars and role colours in the typing indicator",authors:[p.zt],patches:[{find:"getCooldownTextStyle",replacement:{match:/=(\i)\[2];(.+)"aria-atomic":!0,children:(\i)}\)/,replace:'=$1[2];$2"aria-atomic":!0,style:{display:"grid",gridAutoFlow:"column",gridGap:"0.25em"},children:$self.mutateChildren(this.props,$1,$3)})'}},{find:"getCooldownTextStyle",replacement:{match:/return \i\.\i\.getName\(.,.\.props\.channel\.id,(.)\)/,replace:"return $1"}},{find:"getCooldownTextStyle",replacement:{match:/((\i)\.length\?.\..\.Messages\.THREE_USERS_TYPING.format\(\{a:(\i),b:(\i),c:.}\)):.+?SEVERAL_USERS_TYPING/,replace:"$1:$self.buildSeveralUsers({a:$3,b:$4,c:$2.length-2})"},predicate:()=>Xa.store.alternativeFormatting}],settings:Xa,buildSeveralUsers:Jm,mutateChildren(e,t,n){if(!Array.isArray(n))return n;let r=0;return n.map(i=>i.type==="strong"?o(sC,{...e,user:t[r++]}):i)}})});function ko(e,t){return Ae.getNick(e,t)??F.getUser(t).username}function cC({channelId:e}){let t=Fe([tT],()=>({...tT.getTypingUsers(e)}),null,(l,c)=>{let u=Object.keys(l),h=Object.keys(c);return u.length===h.length&&JSON.stringify(u)===JSON.stringify(h)}),n=Z.getChannel(e).guild_id;if(!ef.store.includeMutedChannels&&lC.isChannelMuted(n,e))return null;let r=F.getCurrentUser()?.id,i=Object.keys(t).filter(l=>l!==r&&!(et.isBlocked(l)&&!ef.store.includeBlockedUsers)),s;switch(i.length){case 0:break;case 1:{s=Ja.Messages.ONE_USER_TYPING.format({a:ko(n,i[0])});break}case 2:{s=Ja.Messages.TWO_USERS_TYPING.format({a:ko(n,i[0]),b:ko(n,i[1])});break}case 3:{s=Ja.Messages.THREE_USERS_TYPING.format({a:ko(n,i[0]),b:ko(n,i[1]),c:ko(n,i[2])});break}default:{s=M.plugins.TypingTweaks.enabled?Jm({a:ko(n,i[0]),b:ko(n,i[1]),c:i.length-2}):Ja.Messages.SEVERAL_USERS_TYPING;break}}return i.length>0?o(W,{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(aC,{dotRadius:3,themed:!0}))):null}var aC,tT,lC,Ja,ef,tf,nT=m(()=>{"use strict";a();D();ie();w();ve();b();O();T();Vm();aC=re(()=>Ht(e=>e.type?.render?.toString()?.includes("().dots"))),tT=ae("TypingStore"),lC=ae("UserGuildSettingsStore"),Ja=ke(e=>e.Messages?.SEVERAL_USERS_TYPING);ef=k({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}}),tf=g({name:"TypingIndicator",description:"Adds an indicator if someone is typing on a channel.",authors:[p.Nuckyz,p.obscurity],settings:ef,patches:[{find:".UNREAD_HIGHLIGHT",replacement:{match:/\(\).children.+?:null(?<=(\i)=\i\.channel,.+?)/,replace:(e,t)=>`${e},$self.TypingIndicator(${t}.id)`}}],TypingIndicator:e=>o(A,{noop:!0},o(cC,{channelId:e}))})});var nf,oT=m(()=>{"use strict";a();Sn();w();b();nf=g({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=$e((e,t)=>this.unindentMsg(t)),this.preEdit=Pt((e,t,n)=>this.unindentMsg(n))},stop(){Ue(this.preSend),kt(this.preEdit)}})});var sa,Pg,aa,Kd=m(()=>{"use strict";i();x();T();Pg="https://raw.githubusercontent.com/facebook/react/17.0.2/scripts/error-codes/codes.json",aa=u({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(){sa=await fetch(Pg).then(e=>e.json()).catch(e=>console.error(`[ReactErrorDecoder] Failed to fetch React error codes -`,e))},stop(){sa=void 0},decodeError(e,...t){let n=0;return sa?.[e]?.replace(/%s/g,()=>{let r=t[n];return n++,r})}})});function Ig(e){return e.split(" ").map(t=>{let n=!1,r=t.toLowerCase();if(t.length<4)return t;for(let[s,a]of kg)t.includes(s)&&(t=t.replace(s,a),n=!0);return r.includes("u")&&!r.includes("uwu")&&(t=t.replace("u","UwU"),n=!0),r.includes("o")&&!r.includes("owo")&&(t=t.replace("o","OwO"),n=!0),r.endsWith("y")&&t.length<7&&(t=t+" w"+t.slice(1),n=!0),n||(r.endsWith("n")||(t=t.replace("n","ny")),Math.floor(Math.random()*2)===1&&t.replace("s","sh"),Math.floor(Math.random()*5)===3&&!n&&(t=t[0]+"-"+t[0]+"-"+t),Math.floor(Math.random()*5)===3&&(t=t+" "+Yd[Math.floor(Math.random()*Yd.length)]),t=t.replaceAll("r","w").replaceAll("l","w")),t}).join(" ")}var Yd,kg,ca,Qd=m(()=>{"use strict";i();be();x();T();Yd=["owo","UwU",">w<","^w^","\u25CFw\u25CF","\u2606w\u2606","\u{1D5E8}\u{1D604}\u{1D5E8}","(\u15D2\u15E8\u15D5)","(\u25B0\u02D8v\u02D8\u25B0)","( \xB4 \u25BD ` ).\uFF61\uFF4F\u2661","*unbuttons shirt*",">3<",">:3",":3","murr~","\u2665(\u3002U \u03C9 U\u3002)","(\u02D8\u03B5\u02D8)","*screams*","*twerks*","*sweats*"],kg=[["love","wuv"],["mr","mistuh"],["dog","doggo"],["cat","kitteh"],["hello","henwo"],["hell","heck"],["fuck","fwick"],["fuk","fwick"],["shit","shoot"],["friend","fwend"],["stop","stawp"],["god","gosh"],["dick","peepee"],["penis","bulge"],["damn","darn"]];ca=u({name:"UwUifier",description:"Simply uwuify commands",authors:[p.echo],dependencies:["CommandsAPI"],commands:[{name:"uwuify",description:"uwuifies your messages",options:[It],execute:e=>({content:Ig(ce(e,"message",""))})}]})});var la,pa,Jd=m(()=>{"use strict";i();R();x();T();k();la={};X("VoiceChatDoubleClick","vcDoubleClick");pa=u({name:"VoiceChatDoubleClick",description:"Join voice chats via double click instead of single click",authors:[p.Ven,p.D3SOX],patches:[{find:"VoiceChannel.renderPopout",replacement:[{match:/onClick:(.*)function\(\)\{(e\.handleClick.+?)}/g,replace:"onClick:$1function(){Vencord.Plugins.plugins.VoiceChatDoubleClick.schedule(()=>{$2}, e)}"},{match:/onClick:(.{0,15})this\.handleClick,/g,replace:"onClick:$1(...args)=>Vencord.Plugins.plugins.VoiceChatDoubleClick.schedule(()=>{this.handleClick(...args);}, args[0]),"}]},{find:'className:"channelMention",iconType:(',replacement:{match:/onClick:(.{1,3}),/,replace:"onClick:(_vcEv)=>(_vcEv.detail>=2||_vcEv.target.className.includes('MentionText'))&&($1)(),"}}],schedule(e,t){let n=t?.id??t.props.channel.id;if(pe.getVoiceChannelId()===n){e();return}let r=la[n]??={timeout:void 0,i:0};clearTimeout(r.timeout),++r.i>=2?(e(),delete la[n]):r.timeout=setTimeout(()=>{delete la[n]},500)}})});var Mg,Rg,Cg,Xd,da,Zd=m(()=>{"use strict";i();x();O();Ye();L();k();Mg=Q(()=>Ce(e=>e.prototype?.render?.toString().includes("OPEN_ORIGINAL_IMAGE"))),Rg=Q(()=>Ce(e=>e.type?.toString().includes("MASKED_LINK)"))),Cg=M("getGuildBannerURL"),Xd="Vencord.Plugins.plugins.ViewIcons.openImage(",da=new class{name="ViewIcons";authors=[p.Ven];description="Makes Avatars/Banners in user profiles clickable, and adds Guild Context Menu Entries to View Banner/Icon.";dependencies=["MenuItemDeobfuscatorAPI"];openImage(t){let n=new URL(t);n.searchParams.set("size","512"),t=n.toString(),we(r=>o(Be,{size:"dynamic",...r},o(Mg,{shouldAnimate:!0,original:t,src:t,renderLinkComponent:()=>o(Rg,null)})))}patches=[{find:"onAddFriend:",replacement:{match:/\{src:(.{1,2}),avatarDecoration/g,replace:(t,n)=>`{src:${n},onClick:()=>${Xd}${n}),avatarDecoration`}},{find:"().popoutNoBannerPremium",replacement:{match:/style:.{0,10}\{\},(.{1,2})\)/,replace:(t,n)=>`onClick:${n}.backgroundImage&&(${n}.cursor="pointer",()=>${Xd}${n}.backgroundImage.replace("url(", ""))),${t}`}},{find:'"GuildContextMenu:',replacement:[{match:/\w=(\w)\.id/,replace:"_guild=$1,$&"},{match:/(id:"leave-guild".{0,200}),(\(0,.{1,3}\.jsxs?\).{0,200}function)/,replace:"$1,Vencord.Plugins.plugins.ViewIcons.buildGuildContextMenuEntries(_guild),$2"}]}];buildGuildContextMenuEntries(t){return o(ue.MenuGroup,null,t.banner&&o(ue.MenuItem,{id:"view-banner",key:"view-banner",label:"View Banner",action:()=>this.openImage(Cg.getGuildBannerURL(t))}),t.icon&&o(ue.MenuItem,{id:"view-icon",key:"view-icon",label:"View Icon",action:()=>this.openImage(t.getIconURL(0,!0))}))}}});function _g(e){return Object.fromEntries(Object.entries(e).sort(([t],[n])=>t.localeCompare(n)))}function Lg(e){let t=_g(JSON.parse(JSON.stringify(e)));for(let r in t.author)switch(r){case"id":case"username":case"usernameNormalized":case"discriminator":case"avatar":case"bot":case"system":case"publicFlags":break;default:delete t.author[r]}let n=t;return delete n.editHistory,delete n.deleted,n.attachments?.forEach(r=>delete r.deleted),t}function Vd(e){return o("div",{style:{userSelect:"text"}},Ke.defaultRules.codeBlock.react(e,null,{}))}function Eg(e){e=Lg(e);let t=JSON.stringify(e,null,4),n=we(r=>o(D,null,o(Be,{...r,size:"large"},o(nt,null,o(y.FormTitle,{tag:"h1"},"View Raw"),o(cr,{onClick:()=>an(n)})),o(ot,{style:{padding:"1em"}},o(Z,{style:{marginBottom:"1em",marginTop:"1em"}},o(F,{onClick:()=>en(e.content,"Content copied to clipboard!")},"Copy Raw Content"),o(F,{onClick:()=>en(t,"Message data copied to clipboard!")},"Copy Message JSON")),!!e.content&&o(l,null,o(y.FormTitle,{tag:"h5"},"Content"),o(Vd,{content:e.content,lang:""}),o(y.FormDivider,{classes:V.marginBottom20})),o(y.FormTitle,{tag:"h5"},"Message Data"),o(Vd,{content:t,lang:"json"})))))}var Ag,ma,em=m(()=>{"use strict";i();fn();ne();Ne();x();O();Ye();T();k();Ag=()=>o("svg",{viewBox:"0 0 512.002 512.002",fill:"currentColor","aria-hidden":"true",width:"22",height:"22"},o("path",{d:"M462.002,92.002h-42.001V50c0-27.57-22.43-50-50-50h-320c-27.57,0-50,22.43-50,50v320.002c0,27.57,22.43,50,50,50h42.001 v42c0,27.57,22.43,50,50,50h320c27.57,0,50-22.43,50-50v-320C512.001,114.432,489.573,92.002,462.002,92.002z M50.001,400.002 c-16.542,0-30-13.458-30-30V50c0-16.542,13.458-30,30-30h320c16.542,0,30,13.458,30,30v320.002c0,16.542-13.458,30-30,30H50.001z M492.002,462.002c0,16.542-13.458,30-30,30h-320c-16.542,0-30-13.458-30-30v-42h257.999c27.57,0,50-22.43,50-50v-258h42.001 c16.542,0,30,13.458,30,30V462.002z"}),o("path",{d:"M462.024,457.002H170.98c-5.522,0-10,4.478-10,10c0,5.523,4.478,10,10,10h291.043c5.522,0,10-4.477,10-10 S467.546,457.002,462.024,457.002z"}),o("path",{d:"M142.25,457.002h-0.27c-5.522,0-10,4.478-10,10c0,5.523,4.478,10,10,10h0.27c5.523,0,10-4.477,10-10 S147.773,457.002,142.25,457.002z"}),o("path",{d:"M110.035,35h-0.27c-5.522,0-10,4.478-10,10s4.478,10,10,10h0.27c5.522,0,10-4.478,10-10S115.558,35,110.035,35z"}),o("path",{d:"M81.036,35H50.001c-5.522,0-10,4.478-10,10s4.478,10,10,10h31.034c5.523,0,10.001-4.478,10.001-10S86.558,35,81.036,35z"}),o("path",{d:"M122.084,246.829l-0.008-0.008l-14.8-30.002c5.407-2.305,10.07-5.975,13.466-10.537c3.725-5.006,5.931-11.08,5.931-17.604 c0-8.588-3.248-15.902-9.743-21.965c-3.196-2.992-6.739-5.242-10.627-6.744c-3.891-1.506-8.097-2.258-12.612-2.258H64.936 c-2.793,0-5.327,1.145-7.163,2.996c-1.832,1.85-2.968,4.396-2.968,7.205v82.777c0,2.896,1.137,5.338,2.893,7.105 c0.962,0.969,2.107,1.728,3.349,2.246c1.249,0.52,2.597,0.797,3.953,0.797c2.49,0,5.028-0.92,7.096-2.967 c1.004-0.99,1.761-2.09,2.271-3.297c0.516-1.221,0.771-2.516,0.771-3.885v-31.139h10.844l17.862,36.184l-0.004,0.005 c1.315,2.699,3.416,4.4,5.763,5.201c1.275,0.434,2.616,0.596,3.938,0.502c1.317-0.094,2.618-0.44,3.812-1.022 c2.307-1.123,4.237-3.123,5.179-5.881h0.002c0.45-1.307,0.639-2.609,0.564-3.904C123.023,249.327,122.684,248.058,122.084,246.829 z M106.124,190.85c-0.438,1.795-1.473,3.546-3.189,5.07c-1.205,1.039-2.538,1.838-3.996,2.395c-1.45,0.553-3.02,0.865-4.704,0.934 v-0.006H75.138v-21.221H93.69c3.19,0,5.9,0.893,7.984,2.328c1.83,1.26,3.187,2.939,3.96,4.791 C106.393,186.957,106.591,188.942,106.124,190.85z"}),o("path",{d:"M364.199,163.706c-1.12-2.354-3.136-4.285-5.777-5.254l-0.055-0.016c-2.721-0.916-5.49-0.688-7.823,0.439 c-2.349,1.135-4.243,3.172-5.193,5.861v0.008l-19.568,55.744l-19.571-55.816h-0.001c-0.705-2.352-2.14-4.141-3.935-5.322 c-1.589-1.047-3.458-1.609-5.345-1.656c-1.887-0.047-3.801,0.42-5.479,1.43c-1.938,1.164-3.553,3.031-4.445,5.637h0.002 l-19.564,55.73l-19.569-55.746l-0.008-0.016c-0.997-2.779-2.938-4.752-5.235-5.846c-1.222-0.584-2.552-0.918-3.899-0.99 c-1.34-0.074-2.701,0.115-3.991,0.578c-2.347,0.842-4.429,2.57-5.701,5.24c-1.206,2.529-1.354,5.119-0.441,7.766l0.005,0.009 l29.181,83.133l0.016,0.047c1.186,3.139,3.318,5.213,5.775,6.234c1.141,0.473,2.355,0.717,3.581,0.73 c1.219,0.016,2.438-0.197,3.595-0.635c2.602-0.982,4.914-3.084,6.238-6.268l0.039-0.109l19.595-55.779l20.043,56.877l0.047,0.125 c0.967,2.25,2.404,3.912,4.071,4.99c1.666,1.078,3.544,1.563,5.408,1.465c1.854-0.096,3.686-0.764,5.274-1.992 c1.666-1.289,3.059-3.191,3.899-5.686l29.251-83.133C365.546,168.825,365.317,166.053,364.199,163.706z"}),o("path",{d:"M226.7,247.37l-0.008-0.031l-8.818-21.24l-0.003,0.002l-25.528-61.617h0.001c-1.024-2.709-3.167-4.654-5.674-5.645 c-1.165-0.461-2.429-0.715-3.708-0.742c-1.28-0.027-2.565,0.178-3.773,0.635c-2.393,0.906-4.479,2.764-5.647,5.719l0.005,0.002 l-25.54,61.719h-0.003l-8.818,21.168v0.008c-1.076,2.607-1,5.383-0.008,7.783c0.994,2.408,2.91,4.433,5.51,5.527l0.038,0.023 c2.619,1.035,5.435,1.064,7.886,0.041c2.295-0.955,4.242-2.813,5.384-5.6l6.147-14.877h37.566l6.148,14.877 c1.175,2.844,3.171,4.674,5.459,5.609c1.261,0.518,2.601,0.752,3.932,0.73c1.324-0.021,2.642-0.295,3.865-0.801 c2.418-0.998,4.496-2.9,5.579-5.547l0.008-0.016C227.723,252.523,227.723,249.945,226.7,247.37z M172.552,219.938l10.344-25.01 l10.416,25.01H172.552z"}));ma=u({name:"ViewRaw",description:"Copy and view the raw content/data of any message.",authors:[p.KingFish,p.Ven],dependencies:["MessagePopoverAPI"],start(){Mt("ViewRaw",e=>({label:"View Raw (Left Click) / Copy Raw (Right Click)",icon:Ag,message:e,channel:ae.getChannel(e.channel_id),onClick:()=>Eg(e),onContextMenu:t=>{t.preventDefault(),t.stopPropagation(),en(e.content)}}))},stop(){Rt("CopyRawMessage")}})});var ua,tm=m(()=>{"use strict";i();Jn();x();T();ua=u({name:"VolumeBooster",authors:[p.Nuckyz],description:"Allows you to set the user and stream volume above the default maximum.",patches:[{find:".Messages.USER_VOLUME",replacement:{match:/maxValue:(.{1,2}\..{1,2})\?(\d+?):(\d+?),/,replace:(e,t,n,r)=>`maxValue:${t}?${n}*Vencord.Settings.plugins.VolumeBooster.multiplier:${r}*Vencord.Settings.plugins.VolumeBooster.multiplier,`}},{find:"currentVolume:",replacement:{match:/maxValue:(.{1,2}\..{1,2})\?(\d+?):(\d+?),/,replace:(e,t,n,r)=>`maxValue:${t}?${n}*Vencord.Settings.plugins.VolumeBooster.multiplier:${r}*Vencord.Settings.plugins.VolumeBooster.multiplier,`}}],options:{multiplier:{description:"Volume Multiplier",type:5,markers:Ot(1,5,1),default:2,stickToMarkers:!0}}})});var fa,nm=m(()=>{"use strict";i();x();T();fa=u({name:"WebContextMenus",description:"Re-adds some of context menu items missing on the web version of Discord, namely Copy/Open Link",authors:[p.Ven],target:"WEB",patches:[{find:"open-native-link",replacement:[{match:/if\(!\w\..{1,3}\|\|null==/,replace:"if(null=="},{match:/\w\.default\.copy/,replace:"Vencord.Webpack.Common.Clipboard.copy"}]}]})});var ga,om=m(()=>{"use strict";i();x();T();ga=u({name:"Webhook Tags",description:"Changes the bot tag to say webhook for webhooks",authors:[p.Cyn],patches:[{find:'.BOT=0]="BOT"',replacement:[{match:/(.)\[.\.BOT=0\]="BOT";/,replace:(e,t)=>`${t}[${t}.WEBHOOK=99]="WEBHOOK";${e}`},{match:/case (.)\.BOT:default:(.)=/,replace:(e,t,n)=>`case ${t}.WEBHOOK:${n}="WEBHOOK";break;${e}`}]},{find:".Types.ORIGINAL_POSTER",replacement:{match:/return null==(.)\?null:\(0,.{1,3}\.jsxs?\)\((.{1,3})\.Z/,replace:(e,t,n)=>`if(arguments[0].message.webhookId&&arguments[0].user.isNonUserBot()){${t}=${n}.Z.Types.WEBHOOK}${e}`}}]})});var Ln,ha=m(()=>{"use strict";i();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}}});function Bg(e,t){let n=t.name+(t.id?`:${t.id}`:"");return Ho.get({url:`/channels/${e.channel_id}/messages/${e.id}/reactions/${n}`,query:{limit:100},oldFormErrors:!0}).then(r=>I.dispatch({type:"MESSAGE_REACTION_ADD_USERS",channelId:e.channel_id,messageId:e.id,users:r.body,emoji:t})).catch(console.error).finally(()=>Vt(250))}function $g(e,t){let n=`${e.id}:${t.name}:${t.id??""}`,r=Ng.__getLocalVars().reactions[n]??={fetched:!1,users:{}};return r.fetched||(Og.unshift(()=>Bg(e,t)),r.fetched=!0),r.users}function Ug(e){return function(n,r){return o(me,{text:e.slice(5).map(s=>s.username).join(", ")},({onMouseEnter:s,onMouseLeave:a})=>o("div",{className:Dg.moreUsers,onMouseEnter:s,onMouseLeave:a},"+",e.length-5))}}var Fg,Dg,Ng,Og,ya,rm=m(()=>{"use strict";i();ne();x();O();ha();T();L();k();Fg=Q(()=>xe("defaultRenderUser","showDefaultAvatarsForNullUsers")),Dg=M("moreUsers","emptyUser","avatarContainer","clickableAvatar"),Ng=M("getReactions"),Og=new Ln;ya=u({name:"WhoReacted",description:"Renders the Avatars of reactors",authors:[p.Ven],patches:[{find:",reactionRef:",replacement:{match:/((.)=(.{1,3})\.hideCount)(,.+?reactionCount.+?\}\))/,replace:"$1,whoReactedProps=$3$4,$2?null:Vencord.Plugins.plugins.WhoReacted.renderUsers(whoReactedProps)"}}],renderUsers(e){return e.message.reactions.length>10?null:o(D,{noop:!0},o(this._renderUsers,{...e}))},_renderUsers({message:e,emoji:t}){let n=ct();b.useEffect(()=>{let a=c=>{c.messageId===e.id&&n()};return I.subscribe("MESSAGE_REACTION_ADD_USERS",a),()=>I.unsubscribe("MESSAGE_REACTION_ADD_USERS",a)},[e.id]);let r=$g(e,t),s=Object.values(r).filter(Boolean);return o("div",{style:{marginLeft:"0.5em",transform:"scale(0.9)"}},o(Fg,{users:s,guildId:ae.getChannel(e.channel_id)?.guild_id,renderIcon:!1,max:5,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:Ug(s)}))}})});var te,tn=m(()=>{i();$a();Ua();Ha();Wa();qa();Ya();Qa();Ja();Xa();Za();Va();oc();rc();ic();sc();ac();lc();pc();fc();gc();Sc();xc();Tc();Pc();kc();Cc();Uc();jc();Gc();zc();Yc();Qc();Jc();Xc();Zc();el();nl();il();al();ll();pl();dl();ml();ul();fl();gl();hl();yl();vl();bl();Sl();xl();Tl();wl();Il();Ml();Cl();Xi();Fl();zl();Wl();ql();ip();lp();zp();Ad();_d();Ld();$d();Ud();jd();Wd();qd();Kd();Qd();Jd();Zd();em();tm();nm();om();rm();te={[nr.name]:nr,[or.name]:or,[rr.name]:rr,[mr.name]:mr,[gr.name]:gr,[hr.name]:hr,[yr.name]:yr,[vr.name]:vr,[br.name]:br,[Sr.name]:Sr,[xr.name]:xr,[Ir.name]:Ir,[Mr.name]:Mr,[Rr.name]:Rr,[Cr.name]:Cr,[Ar.name]:Ar,[_r.name]:_r,[Lr.name]:Lr,[Ur.name]:Ur,[jr.name]:jr,[Yr.name]:Yr,[Qr.name]:Qr,[Jr.name]:Jr,[Vr.name]:Vr,[ti.name]:ti,[ni.name]:ni,[ii.name]:ii,[si.name]:si,[ai.name]:ai,[ci.name]:ci,[mi.name]:mi,[ui.name]:ui,[gi.name]:gi,[hi.name]:hi,[Si.name]:Si,[xi.name]:xi,[ki.name]:ki,[Mi.name]:Mi,[Ri.name]:Ri,[Ci.name]:Ci,[Ai.name]:Ai,[_i.name]:_i,[Fi.name]:Fi,[Di.name]:Di,[Ni.name]:Ni,[Oi.name]:Oi,[Bi.name]:Bi,[$i.name]:$i,[Ui.name]:Ui,[Hi.name]:Hi,[ji.name]:ji,[Gi.name]:Gi,[zi.name]:zi,[Wi.name]:Wi,[qi.name]:qi,[Ki.name]:Ki,[Yi.name]:Yi,[es.name]:es,[ts.name]:ts,[ns.name]:ns,[is.name]:is,[as.name]:as,[ds.name]:ds,[us.name]:us,[Cs.name]:Cs,[Ks.name]:Ks,[Js.name]:Js,[Xs.name]:Xs,[Vs.name]:Vs,[ea.name]:ea,[oa.name]:oa,[ra.name]:ra,[ia.name]:ia,[aa.name]:aa,[ca.name]:ca,[pa.name]:pa,[da.name]:da,[ma.name]:ma,[ua.name]:ua,[fa.name]:fa,[ga.name]:ga,[ya.name]:ya}});var ba={};ee(ba,{BadgePosition:()=>ur,addBadge:()=>Hg,inject:()=>Gg,removeBadge:()=>jg});function Hg(e){va.add(e)}function jg(e){return va.delete(e)}function Gg(e,t){for(let n of va)(!n.shouldShow||n.shouldShow(t))&&(n.position===0?e.unshift(n):e.push(n));return te.BadgeAPI.addDonorBadge(e,t.user.id),e}var ur,va,fr=m(()=>{"use strict";i();tn();ur=(n=>(n[n.START=0]="START",n[n.END=1]="END",n))(ur||{}),va=new Set});var Sa={};ee(Sa,{_modifyAccessories:()=>qg,accessories:()=>Ro,addAccessory:()=>zg,removeAccessory:()=>Wg});function zg(e,t,n){Ro.set(e,{callback:t,position:n})}function Wg(e){Ro.delete(e)}function qg(e,t){for(let n of Ro.values())e.splice(n.position!=null?n.position<0?e.length+n.position:n.position:e.length,0,n.callback(t));return e}var Ro,im=m(()=>{"use strict";i();Ro=new Map});var xa={};ee(xa,{Badges:()=>Vg,Commands:()=>Qg,DataStore:()=>Jg,MessageAccessories:()=>Xg,MessageEvents:()=>Kg,MessagePopover:()=>Zg,Notices:()=>Yg,ServerList:()=>eh});var Kg,Yg,Qg,Jg,Xg,Zg,Vg,eh,sm=m(()=>{"use strict";i();fr();be();$t();im();pt();fn();pn();mo();Kg=$r,Yg=kr,Qg=Kr,Jg=Bt,Xg=Sa,Zg=di,Vg=ba,eh=rs});function th(e,t,n){let r=t;if(t in e)return void n(e[r]);Object.defineProperty(e,t,{set(s){delete e[r],e[r]=s,n(s)},configurable:!0,enumerable:!1})}var am=m(()=>{"use strict";i()});var Ta={};ee(Ta,{ChangeList:()=>wn,Constants:()=>tr,Discord:()=>Ti,IpcEvents:()=>j,LazyComponent:()=>Q,Logger:()=>N,Modals:()=>dr,Queue:()=>Ln,checkIntersecting:()=>Jo,classes:()=>ie,copyWithToast:()=>en,debounce:()=>gt,humanFriendlyJoin:()=>Fm,isObject:()=>Nm,makeCodeblock:()=>Gn,makeLazy:()=>Fe,mergeDefaults:()=>xt,onceDefined:()=>th,parseUrl:()=>Qo,proxyLazy:()=>We,sleep:()=>Vt,suppressErrors:()=>Dm,useAwaiter:()=>ve,useForceUpdater:()=>ct});var cm=m(()=>{"use strict";i();vs();x();yn();wi();ze();le();O();Ye();am();Et();ha();});var Pa={};ee(Pa,{toggle:()=>wa});async function wa(e){_t?_t.disabled=!e:e&&(_t=document.createElement("style"),_t.id="vencord-custom-css",document.head.appendChild(_t),VencordNative.ipc.on(j.QUICK_CSS_UPDATE,(t,n)=>_t.innerText=n),_t.textContent=await VencordNative.ipc.invoke(j.GET_QUICK_CSS))}async function lm(){En||(En=document.createElement("style"),En.id="vencord-themes",document.head.appendChild(En));let{themeLinks:e}=S,t=e.map(n=>`@import url("${n.trim()}");`).join(` -`);En.textContent=t}var _t,En,ka=m(()=>{"use strict";i();R();ze();document.addEventListener("DOMContentLoaded",()=>{wa(S.useQuickCss),Zo("useQuickCss",wa),lm(),Zo("themeLinks",lm)})});function nh(){function e(t){try{let n=t[1],{subscriptions:r,listeners:s}=Vencord.Webpack,{patches:a}=Vencord.Plugins;for(let c in n){let f=n[c],d=f.toString().replaceAll(` -`,"");d.startsWith("function(")&&(d="0,"+d);let v=f,h=new Set,g=n[c]=function(w,P,B){try{f(w,P,B)}catch(_){if(f===v)throw _;return Lt.error("Error in patched chunk",_),void v(w,P,B)}if(w.exports===window){Object.defineProperty(B.c,c,{value:B.c[c],enumerable:!1,configurable:!0,writable:!0});return}for(let _ of s)try{_(P)}catch(oe){Lt.error("Error in webpack listener",oe)}for(let[_,oe]of r)try{if(_(P))r.delete(_),oe(P);else if(typeof P=="object"){P.default&&_(P.default)&&(r.delete(_),oe(P.default));for(let C in P)C.length<=3&&P[C]&&_(P[C])&&(r.delete(_),oe(P[C]))}}catch(C){Lt.error("Error while firing callback for webpack chunk",C)}};try{g.toString=()=>f.toString(),g.original=v}catch{}for(let w=0;we,set:t=>e.original=t,configurable:!0})}var pm,Lt,dm=m(()=>{"use strict";i();x();le();L();Lt=new N("WebpackInterceptor","#8caaee");Object.defineProperty(window,tt,{get:()=>pm,set:e=>{e?.push!==Array.prototype.push&&(Lt.info(`Patching ${tt}.push`),Do(e),nh(),delete window[tt],window[tt]=e),pm=e},configurable:!0})});var uC,mm,um=m(()=>{"use strict";i();yn();O();L();k();Zr();ne();uC=gt(function({find:e,setModule:t,setError:n}){let r=Oo(e),s=Object.keys(r),a=s.length;a===0?n("No match. Perhaps that module is lazy loaded?"):a!==1?n("Multiple matches. Please refine your filter"):t([s[0],r[s[0]]])}),mm=null});var fm={};ee(fm,{PatchHelper:()=>mm,PluginSettings:()=>So,VencordSettings:()=>Ms});var gm=m(()=>{"use strict";i();um();Is();Rs()});async function oh(){if(await Eo,Ss(),hm=await Promise.resolve().then(()=>(gm(),fm)),!1)try{}catch(e){}}var hm,Ys=m(()=>{"use strict";i();sm();bo();cm();ka();Tn();L();ka();dm();pn();R();bo();Tn();L();k();oh()});var rh={};ee(rh,{Api:()=>xa,Components:()=>hm,PlainSettings:()=>Oa,Plugins:()=>Ts,QuickCss:()=>Pa,Settings:()=>S,Updater:()=>hs,Util:()=>Ta,Webpack:()=>Bo});i();i();var Dn,wm=new Promise(e=>{setTimeout(()=>{new QWebChannel(qt.webChannelTransport,function(t){Dn=t.objects.webclass,e()})})});async function Ca(){Dn||await wm}window.VencordNative={getVersions:()=>({}),ipc:{send:async(e,...t)=>{await Ca(),Dn.vencordSend(e,t)},sendSync:(e,...t)=>{if(e==="VencordGetSettings")return window.discordScreenaudioVencordSettings||"{}";throw new Error("Synchroneous IPC not implemented")},on(e,t){},off(e,t){},invoke:async(e,...t)=>(await Ca(),e==="VencordSetSettings"&&(window.discordScreenaudioVencordSettings=t[0]),Dn.vencordSend(e,t))}};Ys();return Ao(rh);})(); +${r}`})},start(){this.preSend=lt((e,t)=>this.unindentMsg(t)),this.preEdit=Jn((e,t,n)=>this.unindentMsg(n))},stop(){ct(this.preSend),Qn(this.preEdit)}})});var of,rT,rf,iT=m(()=>{"use strict";a();Pt();_n();w();b();T();of=1<<2,rT=(e,{channel:t,message:{author:n,embeds:r,flags:i,id:s}})=>()=>{let l=(i&of)!==0;if(!l&&!r.length)return;let c=t.isPrivate()||!!(je.getChannelPermissions({id:t.id})&An.EMBED_LINKS);if(n.id===F.getCurrentUser().id&&!c)return;let u=nt("delete",e),h=u?.findIndex(f=>f?.props?.id==="delete");!h||!u||u.splice(h-1,0,o(L.MenuItem,{id:"unsuppress-embeds",key:"unsuppress-embeds",label:l?"Unsuppress Embeds":"Suppress Embeds",color:l?void 0:"danger",icon:l?Zs:Xs,action:()=>Dt.patch({url:`/channels/${t.id}/messages/${s}`,body:{flags:l?i&~of:i|of}})}))},rf=g({name:"UnsuppressEmbeds",authors:[p.rad,p.HypedDomi],description:"Allows you to unsuppress embeds in messages",start(){pe("message",rT)},stop(){de("message",rT)}})});var sf,sT=m(()=>{"use strict";a();_t();zs();w();b();sf=g({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 oe(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 oe(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){oe(t.channel.id,{content:`Something went wrong: \`${n}\``})}}}]})});var aT=m(()=>{});var uC,pC,dC,lT,cT=m(()=>{"use strict";a();aT();O();T();uC=P("selectChannel","selectVoiceChannel"),pC=ce(".lastSection",".children"),dC=1n<<20n,lT=({channel:e,label:t,showHeader:n})=>o(pC,null,n&&o(v.FormTitle,{className:"vc-uvs-header"},"In a voice channel"),o(N,{className:"vc-uvs-button",color:N.Colors.TRANSPARENT,size:N.Sizes.SMALL,onClick:()=>{je.can(dC,e)?uC.selectVoiceChannel(e.id):X.show({message:"Insufficient permissions to enter the channel.",id:"user-voice-show-insufficient-permissions",type:X.Type.FAILURE,options:{position:X.Position.BOTTOM}})}},t))});var mC,fC,af,uT,lf,pT=m(()=>{"use strict";a();D();ie();w();b();O();T();cT();mC=ae("VoiceStateStore"),fC=P("section","lastSection"),af=k({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}}),uT=A.wrap(({user:e})=>{let{channelId:t}=mC.getVoiceStateForUser(e.id)??{};if(!t)return null;let n=Z.getChannel(t),r=ue.getGuild(n.guild_id);if(!r)return null;let i=`${r.name} | ${n.name}`;return o(lT,{channel:n,label:i,showHeader:af.store.showVoiceChannelSectionHeader})}),lf=g({name:"UserVoiceShow",description:"Shows whether a User is currently in a voice channel somewhere in their profile",authors:[p.LordElias],settings:af,patchModal({user:e}){return af.store.showInUserProfileModal?o("div",{className:"vc-uvs-modal-margin"},o(uT,{user:e})):null},patchPopout:({user:e})=>{let t=e.id===F.getCurrentUser().id;return o("div",{className:t?`vc-uvs-popout-margin ${fC.lastSection}`:""},o(uT,{user:e}))},patches:[{find:".showCopiableUsername",replacement:{match:/\(0,\w\.jsx\)\(\w{2},{user:\w,setNote/,replace:"$self.patchPopout(arguments[0]),$&"}},{find:".USER_PROFILE_MODAL",replacement:{match:/\(\)\.body.+?displayProfile:\i}\),/,replace:"$&$self.patchModal(arguments[0]),"}}]})});var dT,mT=m(()=>{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});dT="src/plugins/usrbg/index.css"});var gC,Vo,Qa,cf,fT=m(()=>{"use strict";a();D();Ge();bo();w();b();mT();gC="https://raw.githubusercontent.com/AutumnVN/usrbg/main/usrbg.json",Vo={},Qa=k({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}}),cf=g({name:"USRBG",description:"Displays user banners from USRBG, allowing anyone to get a banner without Nitro",authors:[p.AutumnVN,p.pylix,p.TheKodeToad],settings:Qa,patches:[{find:".NITRO_BANNER,",replacement:[{match:/(\i)\.premiumType/,replace:"$self.premiumHook($1)||$&"},{match:/(\i)\.bannerSrc,/,replace:"$self.useBannerHook($1),"},{match:/\?\(0,\i\.jsx\)\(\i,{type:\i,shown/,replace:"&&$self.shouldShowBadge(arguments[0])$&"}]},{find:'"data-selenium-video-tile":',predicate:()=>Qa.store.voiceBackground,replacement:[{match:/(\i)\.style,/,replace:"$self.voiceBackgroundHook($1),"}]}],settingsAboutComponent:()=>o(at,{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-")&&Vo[t])return{backgroundImage:`url(${Vo[t]})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}},useBannerHook({displayProfile:e,user:t}){if(!(e?.banner&&Qa.store.nitroFirst)&&Vo[t.id])return Vo[t.id]},premiumHook({userId:e}){if(Vo[e])return 2},shouldShowBadge({displayProfile:e,user:t}){return e?.banner&&(!Vo[t.id]||Qa.store.nitroFirst)},async start(){Je(dT);let e=await fetch(gC);e.ok&&(Vo=await e.json())}})});function vC(e){let t=Math.floor(Math.random()*e.length);return e[t]}function hT(e){e=e.toLowerCase();for(let t of yC)e=e.replaceAll(t[0],t[1]);return e=e.replaceAll(/([ \t\n])n/g,"$1ny").replaceAll(/[lr]/g,"w").replaceAll(/([ \t\n])([a-z])/g,(t,n,r)=>Math.random()<.5?`${n}${r}-${r}`:`${n}${r}`).replaceAll(/([^.,!][.,!])([ \t\n])/g,(t,n,r)=>`${n} ${vC(hC)}${r}`),e}var hC,yC,gT,uf,yT=m(()=>{"use strict";a();_t();Sn();D();w();b();hC=["rawr x3","OwO","UwU","o.O","-.-",">w<","(\u2445\u02D8\uA4B3\u02D8)","(\uA20D\u1D17\uA20D)","(\u02D8\u03C9\u02D8)","(U \u1D55 U\u2741)","\u03C3\u03C9\u03C3","\xF2\u03C9\xF3","(///\u02EC///\u273F)","(U \uFE4F U)","( \u0361o \u03C9 \u0361o )","\u0298w\u0298",":3",":3","XD","nyaa~~","mya",">_<","\u{1F633}","\u{1F97A}","\u{1F633}\u{1F633}\u{1F633}","rawr","^^","^^;;","(\u02C6 \uFECC \u02C6)\u2661","^\u2022\uFECC\u2022^","/(^\u2022\u03C9\u2022^)","(\u273Fo\u03C9o)"],yC=[["small","smol"],["cute","kawaii~"],["fluff","floof"],["love","luv"],["stupid","baka"],["what","nani"],["meow","nya~"],["hello","hewwo"]],gT=k({uwuEveryMessage:{description:"Make every single message uwuified",type:3,default:!1,restartNeeded:!1}});uf=g({name:"UwUifier",description:"Simply uwuify commands",authors:[p.echo,p.skyevg,p.PandaNinjas],dependencies:["CommandsAPI","MessageEventsAPI"],settings:gT,commands:[{name:"uwuify",description:"uwuifies your messages",options:[Ho],execute:e=>({content:hT(Oe(e,"message",""))})}],onSend(e){gT.store.uwuEveryMessage&&(e.content=hT(e.content))},start(){this.preSend=lt((e,t)=>this.onSend(t)),this.preEdit=Jn((e,t,n)=>this.onSend(n))},stop(){ct(this.preSend),Qn(this.preEdit)}})});function bC({data:e,UserMention:t,RoleMention:n,parse:r,props:i}){let[s,l]=V(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 h=u.match(/<@!?(\d+)>/)?.[1];if(!h||Va.has(h))return;if(F.getUser(h))return l(h);let f=()=>{Va.add(h),vT.unshift(()=>SC(h).then(()=>{l(h),Va.delete(h)}).catch(y=>{y?.status===429&&(vT.unshift(()=>so(1e3).then(f)),Va.delete(h))}).finally(()=>so(300)))};f()}},c))}var Va,vT,SC,pf,ST=m(()=>{"use strict";a();ie();w();fe();ar();b();O();T();Va=new Set,vT=new fn(5),SC=ce("USER(");pf=g({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:(?=function\(\i,\i,\i\).{0,50}return null==\i\?\(0,\i\.jsx\)\((\i),.+?jsx\)\((\i),\{className:"mention")/,replace:"react:(...args)=>$self.renderMention($1,$2,...args),originalReact:"}}],renderMention(e,t,n,r,i){return o(A,{noop:!0},o(bC,{RoleMention:e,UserMention:t,data:n,parse:r,props:i}))}})});var df,mf,bT=m(()=>{"use strict";a();w();b();T();df={},mf=g({name:"VoiceChatDoubleClick",description:"Join voice chats via double click instead of single click",authors:[p.Ven,p.D3SOX],patches:[{find:"VoiceChannel.renderPopout",replacement:[{match:/onClick:function\(\)\{(e\.handleClick.+?)}/g,replace:"onClick:function(){$self.schedule(()=>{$1},e)}"}]},{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=Z.getChannel(t);return!n||![2,13].includes(n.type)?!0:e.detail>=2},schedule(e,t){let n=t.props.channel.id;if(Pe.getVoiceChannelId()===n){e();return}let r=df[n]??={timeout:void 0,i:0};clearTimeout(r.timeout),++r.i>=2?(e(),delete df[n]):r.timeout=setTimeout(()=>{delete df[n]},500)}})});function el(e,t=M.plugins.VcNarrator){if(!e)return;let n=new SpeechSynthesisUtterance(e),r=speechSynthesis.getVoices().find(i=>i.voiceURI===t.voice);!r&&(new Y("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 xT(e){let t=M.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,"").trim()}function tl(e,t,n){return e.replaceAll("{{USER}}",xT(t)||(t?"Someone":"")).replaceAll("{{CHANNEL}}",xT(n)||"channel")}function TC({channelId:e,oldChannelId:t},n){if(n&&e!==ff&&(t=ff,ff=e),e!==t){if(e)return[t?"move":"join",e];if(t)return["leave",t]}return["",""]}function xC(e,t){let n=Object.assign({},M.plugins.VcNarrator,e);el(tl(n[t+"Message"],F.getCurrentUser().username,"general"),n)}var TT,ff,gf,wT=m(()=>{"use strict";a();D();Yr();w();be();Xe();Wn();b();O();T();TT=P("getVoiceStatesForChannel","getCurrentClientVoiceChannelId");gf=g({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=Pe.getVoiceChannelId(),n=F.getCurrentUser().id;if(Z.getChannel(t)?.type!==13)for(let r of e){let{userId:i,channelId:s,oldChannelId:l}=r,c=i===n;if(!c&&(!t||s!==t&&l!==t))continue;let[u,h]=TC(r,c);if(!u)continue;let f=M.plugins.VcNarrator[u+"Message"],y=c&&!M.plugins.VcNarrator.sayOwnName?"":F.getUser(i).username,S=Z.getChannel(h).name;el(tl(f,y,S))}},AUDIO_TOGGLE_SELF_MUTE(){let e=Pe.getVoiceChannelId(),t=TT.getVoiceStateForChannel(e);if(!t)return;let n=t.mute||t.selfMute?"unmute":"mute";el(tl(M.plugins.VcNarrator[n+"Message"],"",Z.getChannel(e).name))},AUDIO_TOGGLE_SELF_DEAF(){let e=Pe.getVoiceChannelId(),t=TT.getVoiceStateForChannel(e);if(!t)return;let n=t.deaf||t.selfDeaf?"undeafen":"deafen";el(tl(M.plugins.VcNarrator[n+"Message"],"",Z.getChannel(e).name))}},start(){if(typeof speechSynthesis>"u"||speechSynthesis.getVoices().length===0){new Y("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]=zt(()=>{let s=speechSynthesis.getVoices();return[s.length!==0,s.some(l=>l.lang.startsWith("en"))]},[]),r=zt(()=>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(qn,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(qn,null,s)}return o(v.FormSection,null,o(v.FormText,null,"You can customise the spoken messages below. You can disable specific messages by setting them to nothing"),o(v.FormText,null,"The special placeholders ",o("code",null,"{{USER}}")," and ",o("code",null,"{{CHANNEL}}")," ","will be replaced with the user's name (nothing if it's yourself) and the channel's name respectively"),n&&o(d,null,o(v.FormTitle,{className:G.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(N,{key:s,onClick:()=>xC(e,s)},jn([s]))))),i)}})});var PT=m(()=>{});function PC(e){let t=[];for(let n of Object.values(Vencord.Plugins.plugins))n.toolboxActions&&t.push(o(L.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(L.MenuItem,{id:s,key:s,label:r,action:i})})));return o(L.Menu,{navId:"vc-toolbox",onClose:e},o(L.MenuItem,{id:"vc-toolbox-notifications",label:"Open Notification Log",action:Ns}),o(L.MenuItem,{id:"vc-toolbox-quickcss",label:"Open QuickCSS",action:()=>VencordNative.quickCss.openEditor()}),...t)}function MC(){return o("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96",width:24,height:24},o("path",{fill:"currentColor",d:"M53 10h7v1h-1v1h-1v1h-1v1h-1v1h-1v1h5v1h-7v-1h1v-1h1v-1h1v-1h1v-1h1v-1h-5m-43 1v32h2v2h2v2h2v2h2v2h2v2h2v2h2v2h2v2h8v-2h2V46h-2v2h-2v2h-4v-2h-2v-2h-2v-2h-2v-2h-2v-2h-2V12m24 0v27h-2v3h4v-6h2v-2h4V12m13 2h5v1h-1v1h-1v1h-1v1h3v1h-5v-1h1v-1h1v-1h1v-1h-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-1h1m-13 4h2v1h-1v4h1v2h1v1h1v1h1v1h4v1h-6v-1h-6v-1h-1v-5h1v-1h1v-2h2m17 3h1v3h-1v1h-1v1h-1v2h-2v-2h2v-1h1v-1h1m1 0h1v3h-1v1h-2v-1h1v-1h1m-30 2v8h-8v32h8v8h32v-8h8v-8H70v8H54V44h16v8h16v-8h-8v-8h-1v1h-7v-1h-2v1h-8v-1"}))}function IC(){let[e,t]=V(!1);return o(Br,{position:"bottom",align:"right",animation:Br.Animation.NONE,shouldShow:e,onRequestClose:()=>t(!1),renderPopout:()=>PC(()=>t(!1))},(n,{isShown:r})=>o(wC,{className:"vc-toolbox-btn",onClick:()=>t(i=>!i),tooltip:r?null:"Vencord Toolbox",icon:MC,selected:r}))}function CC({children:e}){return e.splice(e.length-1,0,o(A,{noop:!0},o(IC,null))),o(d,null,e)}var wC,hf,MT=m(()=>{"use strict";a();PT();ks();ie();w();ve();b();O();T();wC=re(()=>ze(".HEADER_BAR_BADGE,",".tooltip"));hf=g({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:".mobileToolbar",replacement:{match:/(?<=toolbar:function.{0,100}\()\i.Fragment,/,replace:"$self.ToolboxFragmentWrapper,"}}],ToolboxFragmentWrapper:A.wrap(CC,{fallback:()=>o("p",{style:{color:"red"}},"Failed to render :(")})})});function Wi(e){let t=e.startsWith("/")?"png":yf.store.format,n=new URL(e,window.location.href);n.searchParams.set("size",yf.store.imgSize),n.pathname=n.pathname.replace(/\.(png|jpe?g|webp)$/,`.${t}`),e=n.toString(),n.searchParams.set("size","4096");let r=n.toString();Fo(e,{original:r,height:256})}var nl,yf,IT,CT,vf,NT=m(()=>{"use strict";a();Pt();D();_n();w();tt();b();O();T();nl=P("getGuildBannerURL"),yf=k({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"}))}});IT=(e,{user:t,guildId:n})=>()=>{let r=Ae.getMember(n,t.id)?.avatar||null;e.splice(-1,0,o(L.MenuGroup,null,o(L.MenuItem,{id:"view-avatar",label:"View Avatar",action:()=>Wi(nl.getUserAvatarURL(t,!0)),icon:jo}),r&&o(L.MenuItem,{id:"view-server-avatar",label:"View Server Avatar",action:()=>Wi(nl.getGuildMemberAvatarURLSimple({userId:t.id,avatar:r,guildId:n,canAnimate:!0},!0)),icon:jo})))},CT=(e,{guild:t})=>()=>{if(!t)return;let{id:n,icon:r,banner:i}=t;!i&&!r||e.splice(-1,0,o(L.MenuGroup,null,r?o(L.MenuItem,{id:"view-icon",label:"View Icon",action:()=>Wi(nl.getGuildIconURL({id:n,icon:r,canAnimate:!0})),icon:jo}):null,i?o(L.MenuItem,{id:"view-banner",label:"View Banner",action:()=>Wi(nl.getGuildBannerURL({id:n,banner:i},!0)),icon:jo}):null))},vf=g({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:yf,openImage:Wi,start(){pe("user-context",IT),pe("guild-context",CT)},stop(){de("user-context",IT),de("guild-context",CT)},patches:[{find:"onAddFriend:",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:"().avatarWrapperNonUserBot",replacement:{match:/(?<=avatarPositionPanel.+?)onClick:(\i\|\|\i)\?void 0(?<=,(\i)=\i\.avatarSrc.+?)/,replace:'style:($1)?{cursor:"pointer"}:{},onClick:$1?()=>{$self.openImage($2)}'}}]})});function kC(e){return Object.fromEntries(Object.entries(e).sort(([t],[n])=>t.localeCompare(n)))}function RC(e){let t=kC(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 kT(e){return o("div",{style:{userSelect:"text"}},Ie.defaultRules.codeBlock.react(e,null,{}))}function RT(e){e=RC(e);let t=JSON.stringify(e,null,4),n=Ce(r=>o(A,null,o(Le,{...r,size:"large"},o($e,null,o(Q,{variant:"heading-lg/semibold",style:{flexGrow:1}},"View Raw"),o(xt,{onClick:()=>Gn(n)})),o(Ue,null,o("div",{style:{padding:"16px 0"}},!!e.content&&o(d,null,o(v.FormTitle,{tag:"h5"},"Content"),o(kT,{content:e.content,lang:""}),o(v.FormDivider,{className:G.bottom20})),o(v.FormTitle,{tag:"h5"},"Message Data"),o(kT,{content:t,lang:"json"}))),o(Tt,null,o(le,{cellSpacing:10},o(N,{onClick:()=>Yt(t,"Message data copied to clipboard!")},"Copy Message JSON"),o(N,{onClick:()=>Yt(e.content,"Content copied to clipboard!")},"Copy Raw Content"))))))}var NC,ol,Sf,AT=m(()=>{"use strict";a();Ko();D();ie();wt();w();Xe();fe();Ze();b();T();NC=()=>o("svg",{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",width:"22",height:"22"},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"}));ol=k({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"}]}}),Sf=g({name:"ViewRaw",description:"Copy and view the raw content/data of any message.",authors:[p.KingFish,p.Ven,p.rad],dependencies:["MessagePopoverAPI"],settings:ol,start(){bn("ViewRaw",e=>{let t=()=>{ol.store.clickMethod==="Right"?Yt(e.content):RT(e)},n=i=>{ol.store.clickMethod==="Left"?(i.preventDefault(),i.stopPropagation(),Yt(e.content)):(i.preventDefault(),i.stopPropagation(),RT(e))};return{label:ol.store.clickMethod==="Right"?"Copy Raw (Left Click) / View Raw (Right Click)":"View Raw (Left Click) / Copy Raw (Right Click)",icon:NC,message:e,channel:Z.getChannel(e.channel_id),onClick:t,onContextMenu:n}})},stop(){Tn("CopyRawMessage")}})});async function AC(e){let t=await fetch(e);if(t.status===200)return await t.blob()}var LC,er,bf,LT=m(()=>{"use strict";a();D();w();b();xc();O();T();LC=ke(e=>e.emitter?._events?.INSERT_TEXT),er=k({addBack:{type:3,description:"Add back the Discord context menus for images, links and the chat input bar",default:!1,restartNeeded:!0}}),bf=g({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:!1,settings:er,start(){if(er.store.addBack){let e=Nn("contextMenuCallbackNative");window.removeEventListener("contextmenu",e.contextMenuCallbackWeb),window.addEventListener("contextmenu",e.contextMenuCallbackNative),this.changedListeners=!0}},stop(){if(this.changedListeners){let e=Nn("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:/\w\.default\.copy/,replace:"Vencord.Webpack.Common.Clipboard.copy"}]},{find:'id:"copy-image"',replacement:[{match:/if\(!\i\.\i\|\|null==/,replace:"if(null=="},{match:/return\s*?\[\i\.default\.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:()=>er.store.addBack,replacement:{match:/return \i\.\i\?/,replace:"return true?"}},{find:'"interactionUsernameProfile"',predicate:()=>er.store.addBack,replacement:{match:/if\("A"===\i\.tagName&&""!==\i\.textContent\)/,replace:"if(false)"}},{find:'"slate-toolbar"',predicate:()=>er.store.addBack,replacement:{match:/(?<=\.handleContextMenu=.+?"bottom";)\i\.\i\?/,replace:"true?"}},{find:'navId:"textarea-context"',all:!0,predicate:()=>er.store.addBack,replacement:[{match:/if\(!\i\.\i\)return null;/,replace:""},{match:/\b\i\.default\.(copy|cut|paste)/g,replace:"$self.$1"}]},{find:'"add-to-dictionary"',predicate:()=>er.store.addBack,replacement:{match:/var \i=\i\.text,/,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 AC(e);if(!t)return;let n=new URL(e).pathname.split("/").pop(),r=new File([t],n,{type:t.type});Ds(r)},copy(){let e=document.getSelection();!e||Kt.copy(e.toString())},cut(){this.copy(),LC.dispatch("INSERT_TEXT",{rawText:""})},async paste(){let e=await navigator.clipboard.readText(),t=new DataTransfer;t.setData("text/plain",e),document.dispatchEvent(new ClipboardEvent("paste",{clipboardData:t}))}})});function ET(e,t,n){let r=Tf.getSendMessageOptionsForReply({channel:e,message:t,shouldMention:!0,showMentionToggle:!0});if(rl.store.greetMode==="Message"||n.length>1){r.stickerIds=n;let i={content:"",tts:!1,invalidEmojis:[],validNonShortcutEmojis:[]};Tf._sendMessage(e.id,i,r)}else Tf.sendGreetMessage(e.id,n[0],r)}function EC({stickers:e,channel:t,message:n}){let r=rl.use(["greetMode","multiGreetChoices"]),{greetMode:i,multiGreetChoices:s=[]}=r;return o(L.Menu,{navId:"greet-sticker-picker",onClose:()=>E.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Greet Sticker Picker"},o(L.MenuGroup,{label:"Greet Mode"},Object.values(DT).map(l=>o(L.MenuRadioItem,{key:l,group:"greet-mode",id:"greet-mode-"+l,label:l,checked:l===i,action:()=>r.greetMode=l}))),o(L.MenuSeparator,null),o(L.MenuGroup,{label:"Greet Stickers"},e.map(l=>o(L.MenuItem,{key:l.id,id:"greet-"+l.id,label:l.description.split(" ")[0],action:()=>ET(t,n,[l.id])}))),rl.store.unholyMultiGreetEnabled?o(d,null,o(L.MenuSeparator,null),o(L.MenuItem,{label:"Unholy Multi-Greet",id:"unholy-multi-greet"},e.map(l=>{let c=s.some(u=>u===l.id);return o(L.MenuCheckboxItem,{key:l.id,id:"multi-greet-"+l.id,label:l.description.split(" ")[0],checked:c,disabled:!c&&s.length>=3,action:()=>{r.multiGreetChoices=c?s.filter(u=>u!==l.id):[...s,l.id]}})}),o(L.MenuSeparator,null),o(L.MenuItem,{id:"multi-greet-submit",label:"Send Greets",action:()=>ET(t,n,s),disabled:s.length===0}))):null)}var DT,rl,Tf,xf,OT=m(()=>{"use strict";a();D();w();b();O();T();DT=(n=>(n.Greet="Greet",n.NormalMessage="Message",n))(DT||{}),rl=k({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(),Tf=P("sendGreetMessage");xf=g({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:rl,patches:[{find:"Messages.WELCOME_CTA_LABEL",replacement:{match:/innerClassName:\i\(\).welcomeCTAButton,(?<=%\i\.length;return (\i)\[\i\].+?)/,replace:"$&onContextMenu:(e)=>$self.pickSticker(e,$1,arguments[0]),"}}],pickSticker(e,t,n){n.message.deleted||cn.open(e,()=>o(EC,{stickers:t,...n}))}})});function FC(e,t,n){let r=t.name+(t.id?`:${t.id}`:"");return Dt.get({url:`/channels/${e.channel_id}/messages/${e.id}/reactions/${r}`,query:{limit:100,type:n},oldFormErrors:!0}).then(i=>E.dispatch({type:"MESSAGE_REACTION_ADD_USERS",channelId:e.channel_id,messageId:e.id,users:i.body,emoji:t,reactionType:n})).catch(console.error).finally(()=>so(250))}function $C(e,t,n){let r=`${e.id}:${t.name}:${t.id??""}:${n}`,i=_C.__getLocalVars().reactions[r]??={fetched:!1,users:{}};return i.fetched||(BC.unshift(()=>FC(e,t,n)),i.fetched=!0),i.users}function UC(e){return function(n,r){return o(W,{text:e.slice(5).map(i=>i.username).join(", ")},({onMouseEnter:i,onMouseLeave:s})=>o("div",{className:OC.moreUsers,onMouseEnter:i,onMouseLeave:s},"+",e.length-5))}}function GC(e){e.stopPropagation()}var DC,OC,_C,BC,wf,_T=m(()=>{"use strict";a();ie();w();fe();ar();ve();b();O();T();DC=re(()=>ze("defaultRenderUser","showDefaultAvatarsForNullUsers")),OC=P("moreUsers","emptyUser","avatarContainer","clickableAvatar"),_C=P("getReactions"),BC=new fn;wf=g({name:"WhoReacted",description:"Renders the Avatars of reactors",authors:[p.Ven,p.KannaDev],patches:[{find:",reactionRef:",replacement:{match:/(?<=(\i)=(\i)\.hideCount,)(.+?reactionCount.+?\}\))/,replace:(e,t,n,r)=>`whoReactedProps=${n},${r},${t}?null:$self.renderUsers(whoReactedProps)`}}],renderUsers(e){return e.message.reactions.length>10?null:o(A,{noop:!0},o(this._renderUsers,{...e}))},_renderUsers({message:e,emoji:t,type:n}){let r=Lt();I.useEffect(()=>{let l=c=>{c.messageId===e.id&&r()};return E.subscribe("MESSAGE_REACTION_ADD_USERS",l),()=>E.unsubscribe("MESSAGE_REACTION_ADD_USERS",l)},[e.id]);let i=$C(e,t,n),s=Object.values(i).filter(Boolean);for(let l of s)E.dispatch({type:"USER_UPDATE",user:l});return o("div",{style:{marginLeft:"0.5em",transform:"scale(0.9)"}},o("div",{onClick:GC},o(DC,{users:s,guildId:Z.getChannel(e.channel_id)?.guild_id,renderIcon:!1,max:5,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:UC(s)})))}})});var Pf,BT=m(()=>{"use strict";a();_t();w();b();Pf=g({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=Oe(e,"search","");if(!n)return oe(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),oe(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),oe(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),oe(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};oe(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 Te,pr=m(()=>{a();fg();gg();hg();yg();vg();Sg();bg();Tg();xg();wg();Pg();Mg();Jc();Xh();Jh();Qh();ty();ny();uy();py();dy();my();fy();Iy();Ny();ky();Ey();Dy();Oy();_y();Uy();Gy();Yy();Zy();Xy();ov();lv();cv();uv();pv();dv();hv();yv();bv();Tv();Pv();ip();ia();_v();Fv();Uv();zv();qv();Xv();r1();s1();a1();l1();u1();p1();d1();m1();f1();g1();h1();y1();v1();S1();b1();T1();x1();w1();P1();k1();wi();H1();eS();tS();rS();yS();vS();kS();RS();AS();jS();WS();YS();l0();c0();m0();h0();T0();ob();rb();ub();wm();Sb();bb();Tb();xb();Rb();Ab();Eb();_b();Fb();Wb();qb();eT();nT();Vm();oT();iT();sT();pT();fT();yT();ST();bT();wT();MT();NT();AT();LT();OT();_T();BT();Te={[zl.name]:zl,[jl.name]:jl,[Wl.name]:Wl,[ql.name]:ql,[Kl.name]:Kl,[Yl.name]:Yl,[Zl.name]:Zl,[Xl.name]:Xl,[Jl.name]:Jl,[Ql.name]:Ql,[Vl.name]:Vl,[ec.name]:ec,[ui.name]:ui,[Qc.name]:Qc,[Vc.name]:Vc,[eu.name]:eu,[tu.name]:tu,[nu.name]:nu,[iu.name]:iu,[su.name]:su,[au.name]:au,[lu.name]:lu,[cu.name]:cu,[uu.name]:uu,[pu.name]:pu,[du.name]:du,[bu.name]:bu,[Tu.name]:Tu,[xu.name]:xu,[Iu.name]:Iu,[Cu.name]:Cu,[Nu.name]:Nu,[Ru.name]:Ru,[Eu.name]:Eu,[Du.name]:Du,[Fu.name]:Fu,[$u.name]:$u,[Uu.name]:Uu,[Gu.name]:Gu,[Hu.name]:Hu,[ju.name]:ju,[Zu.name]:Zu,[Xu.name]:Xu,[Qu.name]:Qu,[Vu.name]:Vu,[tp.name]:tp,[ap.name]:ap,[up.name]:up,[pp.name]:pp,[fp.name]:fp,[gp.name]:gp,[hp.name]:hp,[vp.name]:vp,[wp.name]:wp,[Ip.name]:Ip,[Cp.name]:Cp,[Np.name]:Np,[kp.name]:kp,[Ap.name]:Ap,[Dp.name]:Dp,[Op.name]:Op,[_p.name]:_p,[Bp.name]:Bp,[Fp.name]:Fp,[$p.name]:$p,[Up.name]:Up,[Gp.name]:Gp,[Hp.name]:Hp,[zp.name]:zp,[jp.name]:jp,[Wp.name]:Wp,[qp.name]:qp,[Kp.name]:Kp,[Yp.name]:Yp,[td.name]:td,[nd.name]:nd,[ad.name]:ad,[ld.name]:ld,[Sd.name]:Sd,[Pd.name]:Pd,[Md.name]:Md,[Id.name]:Id,[Nd.name]:Nd,[Ad.name]:Ad,[Ud.name]:Ud,[Gd.name]:Gd,[Hd.name]:Hd,[Zd.name]:Zd,[Xd.name]:Xd,[Jd.name]:Jd,[Qd.name]:Qd,[tm.name]:tm,[Sm.name]:Sm,[bm.name]:bm,[Tm.name]:Tm,[Mm.name]:Mm,[Im.name]:Im,[km.name]:km,[Rm.name]:Rm,[Am.name]:Am,[Om.name]:Om,[Bm.name]:Bm,[Um.name]:Um,[Gm.name]:Gm,[Hm.name]:Hm,[jm.name]:jm,[Wm.name]:Wm,[Xm.name]:Xm,[tf.name]:tf,[Qm.name]:Qm,[nf.name]:nf,[rf.name]:rf,[sf.name]:sf,[lf.name]:lf,[cf.name]:cf,[uf.name]:uf,[pf.name]:pf,[mf.name]:mf,[gf.name]:gf,[hf.name]:hf,[vf.name]:vf,[Sf.name]:Sf,[bf.name]:bf,[xf.name]:xf,[wf.name]:wf,[Pf.name]:Pf}});var If={};ge(If,{BadgePosition:()=>ws,_getBadges:()=>HC,addBadge:()=>bd,removeBadge:()=>Td});function bd(e){e.component&&=A.wrap(e.component,{noop:!0}),Mf.add(e)}function Td(e){return Mf.delete(e)}function HC(e){let t=[];for(let r of Mf)(!r.shouldShow||r.shouldShow(e))&&(r.position===0?t.unshift({...r,...e}):t.push({...r,...e}));let n=Te.BadgeAPI.getDonorBadges(e.user.id);return n&&t.unshift(...n),t}var ws,Mf,Ps=m(()=>{"use strict";a();ie();pr();ws=(n=>(n[n.START=0]="START",n[n.END=1]="END",n))(ws||{}),Mf=new Set});var Cf={};ge(Cf,{Badges:()=>KC,Commands:()=>jC,ContextMenu:()=>tN,DataStore:()=>Nt,MemberListDecorators:()=>XC,MessageAccessories:()=>WC,MessageDecorations:()=>ZC,MessageEvents:()=>zC,MessagePopover:()=>qC,Notices:()=>La,Notifications:()=>eN,ServerList:()=>YC,Settings:()=>JC,SettingsStore:()=>QC,Styles:()=>VC});var zC,La,jC,Nt,WC,qC,KC,YC,ZC,XC,JC,QC,VC,eN,tN,ki=m(()=>{"use strict";a();Ps();_t();Pt();Cn();dd();la();hd();Sn();Ko();Gs();uo();Ra();D();Ku();Ge();zC=Su,La=Rc,jC=Fc,Nt=In,WC=bp,qC=Ju,KC=If,YC=Rd,ZC=gd,XC=pd,JC=Pc,QC=qu,VC=sc,eN=lc,tN=nc});var kf={};ge(kf,{toggle:()=>Nf});async function Nf(e){Ro?Ro.disabled=!e:e&&(Ro=document.createElement("style"),Ro.id="vencord-custom-css",document.documentElement.appendChild(Ro),VencordNative.quickCss.addChangeListener(t=>{Ro.textContent=t,Ro.disabled=!M.useQuickCss}),Ro.textContent=await VencordNative.quickCss.get())}async function FT(){qi||(qi=document.createElement("style"),qi.id="vencord-themes",document.documentElement.appendChild(qi));let{themeLinks:e}=M,t=e.map(n=>`@import url("${n.trim()}");`).join(` +`);qi.textContent=t}var Ro,qi,Rf=m(()=>{"use strict";a();D();document.addEventListener("DOMContentLoaded",()=>{Nf(M.useQuickCss),Bs("useQuickCss",Nf),FT(),Bs("themeLinks",FT)})});var Af={};ge(Af,{Common:()=>Cl,_initWebpack:()=>ns,_resolveReady:()=>ts,addListener:()=>ix,cache:()=>Un,extract:()=>yl,filters:()=>K,find:()=>Ht,findAll:()=>or,findBulk:()=>Or,findByCode:()=>ze,findByCodeLazy:()=>ce,findByProps:()=>Nn,findByPropsLazy:()=>P,findLazy:()=>ke,findModuleId:()=>os,findStore:()=>rx,findStoreLazy:()=>ae,listeners:()=>gl,mapMangledModule:()=>Hf,mapMangledModuleLazy:()=>Ke,onceReady:()=>fl,removeListener:()=>sx,search:()=>hl,subscriptions:()=>Gf,waitFor:()=>Ye,wreq:()=>Gt});var il=m(()=>{"use strict";a();T();O()});function UT(){function e(t){try{let n=t[1],{subscriptions:r,listeners:i}=Vencord.Webpack,{patches:s}=Vencord.Plugins;for(let l in n){let c=n[l],u=c.toString().replaceAll(` +`,"");u.startsWith("function(")&&(u="0,"+u);let h=c,f=new Set,y=n[l]=function(S,x,R){try{c(S,x,R)}catch(_){if(c===h)throw _;return Ao.error("Error in patched chunk",_),void h(S,x,R)}if(S.exports===window){Object.defineProperty(R.c,l,{value:R.c[l],enumerable:!1,configurable:!0,writable:!0});return}let C=Number(l);for(let _ of i)try{_(x,C)}catch($){Ao.error("Error in webpack listener",$)}for(let[_,$]of r)try{if(_(x))r.delete(_),$(x,C);else if(typeof x=="object"){x.default&&_(x.default)&&(r.delete(_),$(x.default,C));for(let B in x)B.length<=3&&x[B]&&_(x[B])&&(r.delete(_),$(x[B],C))}}catch(B){Ao.error("Error while firing callback for webpack chunk",B)}};try{y.toString=()=>c.toString(),y.original=h}catch{}for(let S=0;Su.replace(C,_));if(!(x.predicate&&!x.predicate())&&u.includes(x.find)){f.add(x.plugin);for(let C of x.replacement){if(C.predicate&&!C.predicate())continue;let _=c,$=u;jr(C,x.plugin);try{let B=R(C.match,C.replace);B===u&&!x.noWarn?Ao.warn(`Patch by ${x.plugin} had no effect (Module id is ${l}): ${C.match}`):(u=B,c=(0,eval)(`// Webpack Module ${l} - Patched by ${[...f].join(", ")} +${B} +//# sourceURL=WebpackModule${l}`))}catch(B){Ao.error(`Patch by ${x.plugin} errored (Module id is ${l}): ${C.match} +`,B),u=$,c=_,f.delete(x.plugin)}}x.all||s.splice(S--,1)}}}}catch(n){Ao.error("Error in handlePush",n)}return e.original.call(window[qt],t)}e.original=window[qt].push,Object.defineProperty(window[qt],"push",{get:()=>e,set:t=>e.original=t,configurable:!0})}var $T,Ao,GT=m(()=>{"use strict";a();w();be();Wr();es();il();Ao=new Y("WebpackInterceptor","#8caaee");window[qt]?(Ao.info(`Patching ${qt}.push (was already existant, likely from cache!)`),ns(window[qt]),UT()):Object.defineProperty(window,qt,{get:()=>$T,set:e=>{e?.push!==Array.prototype.push&&(Ao.info(`Patching ${qt}.push`),ns(e),UT(),delete window[qt],window[qt]=e),$T=e},configurable:!0})});async function nN(){M.cloud.settingsSync&&M.cloud.authenticated&&($o.Vencord_settingsDirty?(await ur(),delete $o.Vencord_settingsDirty):await Os(!1)&&he({title:"Cloud Settings",body:"Your settings have been updated! Click here to restart to fully apply changes!",color:"var(--green-360)",onClick:Fs}))}async function oN(){if(await fl,qc(),nN(),!1)try{}catch(e){}}var Lm=m(()=>{"use strict";a();ki();qs();Fl();Rf();dr();il();Rf();GT();uo();D();qs();bs();ri();oi();dr();il();T();oN()});var rN={};ge(rN,{Api:()=>Cf,PlainSettings:()=>En,Plugins:()=>Yc,QuickCss:()=>kf,Settings:()=>M,Updater:()=>Ic,Util:()=>Bl,Webpack:()=>Af});a();a();a();var Bf=` + + + + Vencord QuickCSS Editor + + + + + +
+