206 lines
451 KiB
JavaScript
206 lines
451 KiB
JavaScript
// Vencord ec16fd8
|
|
// Standalone: true
|
|
// Platform: Universal
|
|
// Updater disabled: false
|
|
"use strict";var Vencord=(()=>{var z2=Object.create;var Ws=Object.defineProperty;var j2=Object.getOwnPropertyDescriptor;var W2=Object.getOwnPropertyNames;var q2=Object.getPrototypeOf,K2=Object.prototype.hasOwnProperty;var Lr=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var g=(e,t)=>()=>(e&&(t=e(e=0)),t);var or=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Be=(e,t)=>{for(var n in t)Ws(e,n,{get:t[n],enumerable:!0})},Gg=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of W2(t))!K2.call(e,i)&&i!==n&&Ws(e,i,{get:()=>t[i],enumerable:!(r=j2(t,i))||r.enumerable});return e};var qs=(e,t,n)=>(n=e!=null?z2(q2(e)):{},Gg(t||!e||!e.__esModule?Ws(n,"default",{value:e,enumerable:!0}):n,e)),To=e=>Gg(Ws({},"__esModule",{value:!0}),e);var f,o,a=g(()=>{"use strict";f=Symbol.for("react.fragment"),o=(...e)=>(o=Vencord.Webpack.Common.React.createElement)(...e)});var ie,Ze=g(()=>{"use strict";a();ie=class{constructor(t,n="white"){this.name=t;this.color=n}static makeTitle(t,n){return["%c %c %s ","",`background: ${t}; color: black; font-weight: bold; border-radius: 5px;`,n]}_log(t,n,r,i=""){console[t](`%c Vencord %c %c ${this.name} ${i}`,`background: ${n}; color: black; font-weight: bold; border-radius: 5px;`,"",`background: ${this.color}; color: black; font-weight: bold; border-radius: 5px;`,...r)}log(...t){this._log("log","#a6d189",t)}info(...t){this._log("info","#a6d189",t)}error(...t){this._log("error","#e78284",t)}errorCustomFmt(t,...n){this._log("error","#e78284",n,t)}warn(...t){this._log("warn","#e5c890",t)}debug(...t){this._log("debug","#eebebe",t)}}});var Hg,q,it=g(()=>{"use strict";a();Hg="",q={};for(let e of["top","bottom","left","right"])for(let t of[8,16,20]){let n=`vc-m-${e}-${t}`;q[`${e}${t}`]=n,Hg+=`.${n}{margin-${e}:${t}px;}`}document.addEventListener("DOMContentLoaded",()=>document.head.append(Object.assign(document.createElement("style"),{textContent:Hg,id:"vencord-margins"})),{once:!0})});function xo(e,t=5){let n=0,r;return()=>(!r&&t>n++&&(r=e(),!r&&t===n&&console.error("Lazy factory failed:",e)),r)}function Fn(e,t=5,n=!1){let r=!0;n||setTimeout(()=>r=!1,0);let i=0,s=Object.assign(function(){},{[Mi]:void 0,[Er](){return!s[Mi]&&t>i++&&(s[Mi]=e(),!s[Mi]&&t===i&&console.error("Lazy factory failed:",e)),s[Mi]}});return new Proxy(s,{...Ks,get(l,c,u){return!n&&r?Fn(()=>Reflect.get(l[Er](),c,u),t,!0):Reflect.get(l[Er](),c,u)}})}var zg,Ks,Er,Mi,rr=g(()=>{"use strict";a();zg=["arguments","caller","prototype"],Ks={},Er=Symbol.for("vencord.lazy.get"),Mi=Symbol.for("vencord.lazy.cached");for(let e of["apply","construct","defineProperty","deleteProperty","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf"])Ks[e]=(t,...n)=>Reflect[e](t[Er](),...n);Ks.ownKeys=e=>{let t=e[Er](),n=Reflect.ownKeys(t);for(let r of zg)n.includes(r)||n.push(r);return n};Ks.getOwnPropertyDescriptor=(e,t)=>{if(typeof t=="string"&&zg.includes(t))return Reflect.getOwnPropertyDescriptor(e,t);let n=Reflect.getOwnPropertyDescriptor(e[Er](),t);return n&&Object.defineProperty(e,t,n),n}});function ht(e,t=5){let n=xo(e,t),r=i=>{let s=n()??Y2;return o(s,{...i})};return r.$$get=n,r}var Y2,tc=g(()=>{"use strict";a();rr();Y2=()=>null});var Z2,Un,Ys=g(()=>{"use strict";a();Ze();Z2=(e,t,n)=>t,Un=Z2});function Xs(e){if(Xn!==void 0)throw"no.";return e.push([[Symbol("Vencord")],{},t=>xn=t]),e.pop(),xn?(Xn=xn.c,!0):!1}function Pi(e,...t){let n=new Error(`webpack.${e} found no module`);nc.error(n,"Filter:",t)}function ir(e){if(typeof e!="function")throw new Error("Invalid filter. Expected a function got "+typeof e);let t=[];for(let n in Xn){let r=Xn[n];!r?.exports||(e(r.exports)&&t.push(r.exports),r.exports.default&&e(r.exports.default)&&t.push(r.exports.default))}return t}function Jn(e,t){return Fn(e,t)}function Ii(e,t){return ht(e,t)}function nn(e){return Fn(()=>tn(e))}function Dt(...e){let t=tn(Ke.byProps(...e),{isIndirect:!0});return t||Pi("findByProps",...e),t}function A(...e){return Fn(()=>Dt(...e))}function Wg(...e){let t=tn(Ke.byCode(...e),{isIndirect:!0});return t||Pi("findByCode",...e),t}function Ai(...e){return Fn(()=>Wg(...e))}function qg(e){let t=tn(Ke.byStoreName(e),{isIndirect:!0});return t||Pi("findStore",e),t}function Me(e){return Fn(()=>qg(e))}function Kg(...e){let t=tn(Ke.componentByCode(...e),{isIndirect:!0});return t||Pi("findComponentByCode",...e),t}function ac(e){return ht(()=>tn(e))}function Xe(...e){return ht(()=>Kg(...e))}function lc(...e){return ht(()=>Dt(...e)?.[e[0]])}function ct(e,t,{isIndirect:n=!1}={}){if(typeof e=="string")e=Ke.byProps(e);else if(Array.isArray(e))e=Ke.byProps(...e);else if(typeof e!="function")throw new Error("filter must be a string, string[] or function, got "+typeof e);let[r,i]=tn(e,{isIndirect:!0,isWaitFor:!0});if(r)return void t(r,i);jg.set(e,t)}function J2(e){rc.add(e)}function Q2(e){rc.delete(e)}function cc(...e){let t={},n=xn.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 Js(e){let t=xn.m[e];if(!t)return null;let n=`
|
|
// [EXTRACTED] WebpackModule${e}
|
|
// WARNING: This module was extracted to be more easily readable.
|
|
// This module is NOT ACTUALLY USED! This means putting breakpoints will have NO EFFECT!!
|
|
|
|
0,${t.toString()}
|
|
//# sourceURL=ExtractedWebpackModule${e}
|
|
`;return(0,eval)(n)}var nc,Zs,oc,xn,Xn,Ke,jg,rc,tn,ic,sc,X2,j=g(()=>{"use strict";a();rr();tc();Ze();Ys();nc=new ie("Webpack"),oc=new Promise(e=>Zs=e),Ke={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,componentByCode:(...e)=>{let t=Ke.byCode(...e);return n=>t(n)?!0:n.$$typeof?n.type?t(n.type):n.render?t(n.render):!1:!1}},jg=new Map,rc=new Set;tn=Un("find",function(t,{isIndirect:n=!1,isWaitFor:r=!1}={}){if(typeof t!="function")throw new Error("Invalid filter. Expected a function got "+typeof t);for(let i in Xn){let s=Xn[i];if(!!s?.exports){if(t(s.exports))return r?[s.exports,Number(i)]:s.exports;if(s.exports.default&&t(s.exports.default)){let l=s.exports.default;return r?[l,Number(i)]:l}}}return n||Pi("find",t),r?[null,null]:null});ic=Un("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 tn(t[0]);let r=t,i=0,s=Array(n);e:for(let l in Xn){let c=Xn[l];if(!!c?.exports)for(let u=0;u<n;u++){let d=r[u];if(d!==void 0){if(d(c.exports)){if(s[u]=c.exports,r[u]=void 0,++i===n)break e;break}if(c.exports.default&&d(c.exports.default)){if(s[u]=c.exports.default,r[u]=void 0,++i===n)break e;break}}}}if(i!==n){let l=new Error(`Got ${n} filters, but only found ${i} modules!`);nc.warn(l)}return s}),sc=Un("findModuleId",function(t){for(let r in xn.m)if(xn.m[r].toString().includes(t))return Number(r);let n=new Error(`Didn't find module with code:
|
|
`+t);return nc.warn(n),null}),X2=[]});var Qs,yt,Yg=g(()=>{"use strict";a();j();Qs=nn(e=>e.image&&e.modal&&!e.applicationIcon),yt=A("buttonWrapper","buttonContent")});function Vs(e,t){let n=function(){throw new Error(`Vencord could not find the ${e} Component`)},r=ht(()=>n);return ct(t,i=>{n=i,Object.assign(r,i)},{isIndirect:!0}),r}function It(e,t){ct(Ke.byStoreName(e),t,{isIndirect:!0})}var uc=g(()=>{"use strict";a();st();j()});var S,xt,R,ut,V,Qe,ea,re,wn,ta,sr,qt,Ci,Zg,Mn,Xg,Dr,Or,_r,Ni,Br,$n,ew,Jg=g(()=>{"use strict";a();j();uc();S={},Br=Vs("MaskedLink",e=>e?.type?.toString().includes("MASKED_LINK)")),$n=Vs("Timestamp",Ke.byCode(".Messages.MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL.format")),ew=Vs("Flex",["Justify","Align","Wrap"]);ct(["FormItem","Button"],e=>{({useToken:Ni,Card:xt,Button:R,FormSwitch:ut,Tooltip:V,TextInput:Qe,TextArea:ea,Text:re,Select:wn,SearchableSelect:ta,Slider:sr,ButtonLooks:qt,TabBar:Mn,Popout:Ci,Dialog:Zg,Paginator:Xg,ScrollerThin:Dr,Clickable:Or,Avatar:_r}=e),S=e})});var G,pn,Qg=g(()=>{"use strict";a();j();G={};ct(["MenuItem","MenuSliderControl"],e=>G=e);pn=A("closeContextMenu","openContextMenu")});var O,J,De,At,Kt,Fr,na,ar,Vg=g(()=>{"use strict";a();j();ar=A("createPortal","render");ct("useState",e=>{O=e,{useEffect:De,useState:J,useMemo:At,useRef:Kt,useReducer:Fr,useCallback:na}=O})});var pc,Ur,ki,eh=g(()=>{"use strict";a();j();pc=A("MessageDisplayCompact"),Ur=A("ShowCurrentGame"),ki=A("PreloadedUserSettingsActionCreators")});var dc,mc,Pn,fc,Ne,$r,lr,Gn,tw,Te,W,on,Pe,rn,Q,ke,et,In,Ri,Li,He,th=g(()=>{"use strict";a();j();uc();dc=A("connectStores"),mc=(i=>(i[i.ChannelMessage=0]="ChannelMessage",i[i.ThreadSettings=1]="ThreadSettings",i[i.FirstThreadMessage=2]="FirstThreadMessage",i[i.ApplicationLauncherCommand=3]="ApplicationLauncherCommand",i))(mc||{}),fc=A("openPrivateChannel"),{useStateFromStores:He}=A("useStateFromStores");It("DraftStore",e=>Li=e);It("UserStore",e=>W=e);It("UserProfileStore",e=>on=e);It("ChannelStore",e=>Q=e);It("SelectedChannelStore",e=>Pe=e);It("SelectedGuildStore",e=>rn=e);It("GuildStore",e=>Te=e);It("GuildMemberStore",e=>ke=e);It("RelationshipStore",e=>et=e);It("PermissionStore",e=>Ne=e);It("PresenceStore",e=>Gn=e);It("ReadStateStore",e=>lr=e);It("GuildChannelStore",e=>$r=e);It("MessageStore",e=>Pn=e);It("WindowStore",e=>Ri=e);It("EmojiStore",e=>In=e)});var nh={};var oh=g(()=>{"use strict";a()});var rh={};var ih=g(()=>{"use strict";a()});var sh={};var ah=g(()=>{"use strict";a()});function mn(e,t=lh.MESSAGE){ee.show({id:ee.genId(),message:e,type:t})}var F,wo,wt,dn,cr,ur,tt,Hn,Fe,sn,lh,nw,ee,kt,Ei,pr,Yt,dr,Qn,Se,ch=g(()=>{"use strict";a();j();ct(["dispatch","subscribe"],e=>{F=e;let t=()=>{e.unsubscribe("CONNECTION_OPEN",t),Zs()};e.subscribe("CONNECTION_OPEN",t)});ct(["ComponentDispatch","ComponentDispatcher"],e=>wo=e.ComponentDispatch);wt=A("getAPIBaseURL","get"),dn=A("parseTwoDigitYear"),cr=A("highlight","registerLanguage"),ur=A("debounce","cloneDeep"),tt=nn(e=>e.Messages?.["en-US"]);ct(["fromTimestamp","extractTimestamp"],e=>Hn=e);ct("parseTopic",e=>Fe=e);ct(["show","close"],e=>sn=e);lh={MESSAGE:0,SUCCESS:1,FAILURE:2,CUSTOM:3},nw={TOP:0,BOTTOM:1},ee={Type:lh,Position:nw,genId:()=>(Math.random()||Math.random()).toString(36).slice(2)};ct("showToast",e=>{ee.show=e.showToast,ee.pop=e.popToast});kt=A("getUser","fetchCurrentUser"),Ei=A("showUploadFileSizeExceededError","promptToUpload"),pr=A("fetchAssetIds","getAssetImage"),Yt=A("SUPPORTS_COPY","copy"),dr=A("transitionTo","replaceWith","transitionToGuild");ct(["open","saveAccountChanges"],e=>Qn=e);({Permissions:Se}=nn(e=>typeof e.Permissions?.ADMINISTRATOR=="bigint"))});var gc={};Be(gc,{Alerts:()=>sn,ApplicationAssetUtils:()=>pr,Avatar:()=>_r,Button:()=>R,ButtonLooks:()=>qt,ButtonWrapperClasses:()=>yt,Card:()=>xt,ChannelStore:()=>Q,Clickable:()=>Or,Clipboard:()=>Yt,ComponentDispatch:()=>wo,ComponentTypes:()=>nh,ContextMenuApi:()=>pn,Dialog:()=>Zg,DraftStore:()=>Li,DraftType:()=>mc,EmojiStore:()=>In,Flex:()=>ew,Flux:()=>dc,FluxDispatcher:()=>F,Forms:()=>S,GuildChannelStore:()=>$r,GuildMemberStore:()=>ke,GuildStore:()=>Te,MaskedLink:()=>Br,Menu:()=>G,MenuTypes:()=>rh,MessageStore:()=>Pn,ModalImageClasses:()=>Qs,NavigationRouter:()=>dr,Paginator:()=>Xg,Parser:()=>Fe,PermissionStore:()=>Ne,PermissionsBits:()=>Se,PoggerModeSettingsStore:()=>tw,Popout:()=>Ci,PresenceStore:()=>Gn,PrivateChannelsStore:()=>fc,React:()=>O,ReactDOM:()=>ar,ReadStateStore:()=>lr,RelationshipStore:()=>et,RestAPI:()=>wt,ScrollerThin:()=>Dr,SearchableSelect:()=>ta,Select:()=>wn,SelectedChannelStore:()=>Pe,SelectedGuildStore:()=>rn,SettingsRouter:()=>Qn,Slider:()=>sr,SnowflakeUtils:()=>Hn,StatusSettingsStores:()=>Ur,Switch:()=>ut,TabBar:()=>Mn,Text:()=>re,TextAndImagesSettingsStores:()=>pc,TextArea:()=>ea,TextInput:()=>Qe,Timestamp:()=>$n,Toasts:()=>ee,Tooltip:()=>V,UploadHandler:()=>Ei,UserProfileStore:()=>on,UserSettingsActionCreators:()=>ki,UserStore:()=>W,UserUtils:()=>kt,UtilTypes:()=>sh,WindowStore:()=>Ri,hljs:()=>cr,i18n:()=>tt,lodash:()=>ur,moment:()=>dn,showToast:()=>mn,useCallback:()=>na,useEffect:()=>De,useMemo:()=>At,useReducer:()=>Fr,useRef:()=>Kt,useState:()=>J,useStateFromStores:()=>He,useToken:()=>Ni});var I=g(()=>{"use strict";a();Yg();Jg();Qg();Vg();eh();th();oh();ih();ah();ch()});var an,Gr=g(()=>{a();an="ec16fd8"});var oa,uh=g(()=>{a();oa="Vendicated/Vencord"});var zn,ow,hc,ra,p,Hr,M=g(()=>{"use strict";a();Gr();uh();zn="webpackChunkdiscord_app",ow="Vencord.Webpack.Common.React",hc=`Vencord/${an}${oa?` (https://github.com/${oa})`:""}`,ra="1026515880080842772",p=Object.freeze({Ven:{name:"Vendicated",id:343383572805058560n},Arjix:{name:"ArjixWasTaken",id:674710789138939916n},Cyn:{name:"Cynosphere",id:150745989836308480n},Megu:{name:"Megumin",id:545581357812678656n},botato:{name:"botato",id:440990343899643943n},obscurity:{name:"obscurity",id:336678828233588736n},rushii:{name:"rushii",id:295190422244950017n},Glitch:{name:"Glitchy",id:269567451199569920n},Samu:{name:"Samu",id:702973430449832038n},Animal:{name:"Animal",id:118437263754395652n},MaiKokain:{name:"Mai",id:722647978577363026n},echo:{name:"ECHO",id:712639419785412668n},katlyn:{name:"katlyn",id:250322741406859265n},nea:{name:"nea",id:310702108997320705n},Nuckyz:{name:"Nuckyz",id:235834946571337729n},D3SOX:{name:"D3SOX",id:201052085641281538n},Nickyux:{name:"Nickyux",id:427146305651998721n},mantikafasi:{name:"mantikafasi",id:287555395151593473n},Xinto:{name:"Xinto",id:423915768191647755n},JacobTm:{name:"Jacob.Tm",id:302872992097107991n},DustyAngel47:{name:"DustyAngel47",id:714583473804935238n},BanTheNons:{name:"BanTheNons",id:460478012794863637n},BigDuck:{name:"BigDuck",id:1024588272623681609n},AverageReactEnjoyer:{name:"Average React Enjoyer",id:1004904120056029256n},adryd:{name:"adryd",id:0n},Tyman:{name:"Tyman",id:487443883127472129n},afn:{name:"afn",id:420043923822608384n},KraXen72:{name:"KraXen72",id:379304073515499530n},kemo:{name:"kemo",id:299693897859465228n},dzshn:{name:"dzshn",id:310449948011528192n},Ducko:{name:"Ducko",id:506482395269169153n},jewdev:{name:"jewdev",id:222369866529636353n},Luna:{name:"Luny",id:821472922140803112n},Vap:{name:"Vap0r1ze",id:454072114492866560n},KingFish:{name:"King Fish",id:499400512559382538n},Commandtechno:{name:"Commandtechno",id:296776625432035328n},TheSun:{name:"ActuallyTheSun",id:406028027768733696n},axyie:{name:"'ax",id:273562710745284628n},pointy:{name:"pointy",id:99914384989519872n},SammCheese:{name:"Samm-Cheese",id:372148345894076416n},zt:{name:"zt",id:289556910426816513n},captain:{name:"Captain",id:347366054806159360n},nick:{name:"nick",id:347884694408265729n,badge:!1},whqwert:{name:"whqwert",id:586239091520176128n},lewisakura:{name:"lewisakura",id:96269247411400704n},RuiNtD:{name:"RuiNtD",id:157917665162297344n},hunt:{name:"hunt-g",id:222800179697287168n},cloudburst:{name:"cloudburst",id:892128204150685769n},Aria:{name:"Syncxv",id:549244932213309442n},TheKodeToad:{name:"TheKodeToad",id:706152404072267788n},LordElias:{name:"LordElias",id:319460781567639554n},juby:{name:"Juby210",id:324622488644616195n},Alyxia:{name:"Alyxia Sother",id:952185386350829688n},Remty:{name:"Remty",id:335055032204656642n},skyevg:{name:"skyevg",id:1090310844283363348n},Dziurwa:{name:"Dziurwa",id:1001086404203389018n},F53:{name:"F53",id:280411966126948353n},AutumnVN:{name:"AutumnVN",id:393694671383166998n},pylix:{name:"pylix",id:492949202121261067n},Tyler:{name:"\\\\GGTyler\\\\",id:143117463788191746n},RyanCaoDev:{name:"RyanCaoDev",id:952235800110694471n},Strencher:{name:"Strencher",id:415849376598982656n},FieryFlames:{name:"Fiery",id:890228870559698955n},KannaDev:{name:"Kanna",id:317728561106518019n},carince:{name:"carince",id:818323528755314698n},PandaNinjas:{name:"PandaNinjas",id:455128749071925248n},CatNoir:{name:"CatNoir",id:260371016348336128n},outfoxxed:{name:"outfoxxed",id:837425748435796060n},UwUDev:{name:"UwU",id:691413039156690994n},amia:{name:"amia",id:142007603549962240n},phil:{name:"phil",id:305288513941667851n},ImLvna:{name:"Luna <3",id:799319081723232267n},rad:{name:"rad",id:610945092504780823n},AndrewDLO:{name:"Andrew-DLO",id:434135504792059917n},HypedDomi:{name:"HypedDomi",id:354191516979429376n},Rini:{name:"Rini",id:1079479184478441643n},castdrian:{name:"castdrian",id:224617799434108928n},Arrow:{name:"arrow",id:958158495302176778n},bb010g:{name:"bb010g",id:72791153467990016n},Lumap:{name:"lumap",id:635383782576357407n},Dolfies:{name:"Dolfies",id:852892297661906993n},RuukuLada:{name:"RuukuLada",id:119705748346241027n},blahajZip:{name:"blahaj.zip",id:683954422241427471n},archeruwu:{name:"archer_uwu",id:160068695383736320n},ProffDea:{name:"ProffDea",id:609329952180928513n},ant0n:{name:"ant0n",id:145224646868860928n}}),Hr=(()=>Object.freeze(Object.fromEntries(Object.entries(p).filter(e=>e[1].id!==0n).map(([e,t])=>[t.id,t]))))()});function mr(e,t){for(let n in t){let r=t[n];typeof r=="object"&&!Array.isArray(r)?(e[n]??={},mr(e[n],r)):e[n]??=r}return e}function oe(...e){return e.filter(Boolean).join(" ")}function Mo(e){return new Promise(t=>setTimeout(t,e))}function fn(e,t="Copied to clipboard!"){Yt.SUPPORTS_COPY?Yt.copy(e):t="Your browser does not support copying to clipboard",ee.show({message:t,id:ee.genId(),type:ee.Type.SUCCESS})}function rw(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Di(e){for(let t in e)if(Object.hasOwn(e,t))return!1;return!0}function yc(e){try{return new URL(e)}catch{return null}}function ia(e){return e}var vc,iw,Oi,Re=g(()=>{"use strict";a();I();M();vc=e=>{let t=e.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(t.bottom<0||t.top-n>=0)};iw=navigator.userAgent.includes("Mobi"),Oi=e=>Object.hasOwn(Hr,e)});function nt(e,t){let n=Object.assign({fallbackValue:null,deps:[],onError:null},t),[r,i]=J({value:n.fallbackValue,error:null,pending:!0});return De(()=>{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 Po(e){let t=Fr(n=>n+1,0);return e?t:t[1]}function _i({interval:e=1e3,deps:t=[]}){let[n,r]=J(0),i=At(()=>Date.now(),t);return De(()=>{let s=setInterval(()=>r(Date.now()-i),e);return()=>{r(0),clearInterval(s)}},t),n}var sw,Sc,st=g(()=>{"use strict";a();I();Re();tc();sw=()=>null,Sc=(e=!1)=>{let t=O.useRef(null),[n,r]=J(!1);return[s=>{t.current?.disconnect(),t.current=null,s&&(vc(s)&&(r(!0),e)||(t.current=new IntersectionObserver(l=>{for(let c of l)c.target===s&&(c.isIntersecting&&e?(r(!0),t.current?.disconnect(),t.current=null):r(c.isIntersecting))}),t.current.observe(s)))},n]}});var ph=g(()=>{});function gn(e){return o("div",{...e,className:oe(e.className,"vc-error-card")},e.children)}var zr=g(()=>{"use strict";a();ph();Re()});var aw,dh,mh,bc,_,le=g(()=>{"use strict";a();Ze();it();st();I();zr();aw="#e78284",dh=new ie("React ErrorBoundary",aw),mh={},bc=ht(()=>class extends O.PureComponent{state={error:mh,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}),dh.error(`A component threw an Error
|
|
`,t),dh.error("Component Stack",n.componentStack)}render(){if(this.state.error===mh)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(gn,{style:{overflow:"hidden"}},o("h1",null,"Oh no!"),o("p",null,t),o("code",null,this.state.message,!!this.state.stack&&o("pre",{className:q.top8},this.state.stack)))}});bc.wrap=(e,t)=>n=>o(bc,{...t,wrappedProps:n},o(e,{...n}));_=bc});function sa(){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 Tc=g(()=>{"use strict";a()});function Bi(e){return o(R,{...e,look:R.Looks.LINK,color:R.Colors.TRANSPARENT,onClick:()=>VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")},o(sa,null),"Donate")}var xc=g(()=>{"use strict";a();I();Tc()});function ge(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 Rt=g(()=>{"use strict";a()});function Fi(e,t){return aa.openModalLazy(e,t)}function je(e,t,n){return aa.openModal(e,t,n)}function Vn(e,t){return aa.closeModal(e,t)}function Mc(){return aa.closeAllModals()}var Io,An,wc,ze,at,Ve,Ot,ln,aa,pt=g(()=>{"use strict";a();j();st();Io=(i=>(i.SMALL="small",i.MEDIUM="medium",i.LARGE="large",i.DYNAMIC="dynamic",i))(Io||{}),An=A("ModalRoot","ModalCloseButton"),wc=ht(()=>Dt("ImageModal").ImageModal),ze=ht(()=>An.ModalRoot),at=ht(()=>An.ModalHeader),Ve=ht(()=>An.ModalContent),Ot=ht(()=>An.ModalFooter),ln=ht(()=>An.ModalCloseButton),aa=A("openModalLazy")});function y(e){return e}var w=g(()=>{"use strict";a()});async function fh(e=!1){Pc={};let t={};e&&(t.cache="no-cache");let r=(await fetch("https://gist.githubusercontent.com/Vendicated/51a3dd775f6920429ec6e9b735ca7f01/raw/badges.csv",t).then(i=>i.text())).trim().split(`
|
|
`);if(r.shift()!=="id,tooltip,image"){new ie("BadgeAPI").error("Invalid badges.csv file!");return}for(let i of r){let[s,l,c]=i.split(",");(Pc[s]??=[]).push({image:c,description:l})}}var lw,cw,Pc,Ic,gh=g(()=>{"use strict";a();ca();xc();le();Rt();Tc();M();Ze();it();Re();pt();w();I();lw="https://cdn.discordapp.com/attachments/1033680203433660458/1092089947126780035/favicon.png",cw={description:"Vencord Contributor",image:lw,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},shouldShow:({user:e})=>Oi(e.id),link:"https://github.com/Vendicated/Vencord"},Pc={};Ic=y({name:"BadgeAPI",description:"API to add badges to users.",authors:[p.Megu,p.Ven,p.TheSun],required:!0,patches:[{find:"Messages.PROFILE_USER_BADGES,role:",replacement:[{match:/&&(\i)\.push\(\{id:"premium".+?\}\);/,replace:"$&$1.unshift(...Vencord.Api.Badges._getBadges(arguments[0]));"},{match:/alt:" ","aria-hidden":!0,src:(?=(\i)\.src)/,replace:"...$1.props,$& $1.image??"},{match:/(?<=text:(\i)\.description,spacing:12,)children:/,replace:"children:$1.component ? () => $self.renderBadgeComponent($1) :"},{match:/href:(\i)\.link/,replace:"...($1.onClick && { onClick: $1.onClick }),$&"}]}],toolboxActions:{async"Refetch Badges"(){await fh(!0),ee.show({id:ee.genId(),message:"Successfully refetched badges!",type:ee.Type.SUCCESS})}},async start(){Vencord.Api.Badges.addBadge(cw),await fh()},renderBadgeComponent:_.wrap(e=>{let t=e.component;return o(t,{...e})},{noop:!0}),getDonorBadges(e){return Pc[e]?.map(t=>({...t,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},onClick(){let n=je(r=>o(_,{noop:!0,onError:()=>{Vn(n),VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")}},o(An.ModalRoot,{...r},o(An.ModalHeader,null,o(ge,{style:{width:"100%",justifyContent:"center"}},o(S.FormTitle,{tag:"h2",style:{width:"100%",textAlign:"center",margin:0}},o(sa,null),"Vencord Donor"))),o(An.ModalContent,null,o(ge,null,o("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533070955872337.png",alt:"",style:{margin:"auto"}}),o("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533090627174460.png",alt:"",style:{margin:"auto"}})),o("div",{style:{padding:"1em"}},o(S.FormText,null,"This Badge is a special perk for Vencord Donors"),o(S.FormText,{className:q.top20},"Please consider supporting the development of Vencord by becoming a donor. It would mean a lot!!"))),o(An.ModalFooter,null,o(ge,{style:{width:"100%",justifyContent:"center"}},o(Bi,null))))))}}))}})});var Ac,hh=g(()=>{"use strict";a();M();w();Ac=y({name:"CommandsAPI",authors:[p.Arjix],description:"Api required by anything that uses commands",patches:[{find:',"tenor"',replacement:[{match:/(?<=\w=)(\w)(\.filter\(.{0,60}tenor)/,replace:"Vencord.Api.Commands._init($1)$2"}]},{find:"Unexpected value for option",replacement:{match:/,(\i)\.execute\((\i),(\i)\)/,replace:(e,t,n,r)=>`,Vencord.Api.Commands._handleCommand(${t}, ${n}, ${r})`}},{find:".source,children",replacement:{match:/(?<=:(.{1,3})\.displayDescription\}.{0,200}\.source,children:)[^}]+/,replace:"$1.plugin||($&)"}}]})});var Cc,yh=g(()=>{"use strict";a();M();w();Cc=y({name:"ContextMenuAPI",description:"API for adding/removing items to/from context menus.",authors:[p.Nuckyz,p.Ven],required:!0,patches:[{find:"\u266B (\u3064\uFF61\u25D5\u203F\u203F\u25D5\uFF61)\u3064 \u266A",replacement:{match:/let{navId:/,replace:"Vencord.Api.ContextMenu._patchContextMenu(arguments[0]);$&"}},{find:".Menu,{",all:!0,replacement:{match:/Menu,{(?<=\.jsxs?\)\(\i\.Menu,{)/g,replace:"$&contextMenuApiArguments:typeof arguments!=='undefined'?arguments:[],"}}]})});var Nc,vh=g(()=>{"use strict";a();M();w();Nc=y({name:"MemberListDecoratorsAPI",description:"API to add decorators to member list (both in servers and DMs)",authors:[p.TheSun,p.Ven],patches:[{find:".lostPermission)",replacement:[{match:/let\{[^}]*lostPermissionTooltipText:\i[^}]*\}=(\i),/,replace:"$&vencordProps=$1,"},{match:/decorators:.{0,100}?children:\[/,replace:"$&...(typeof vencordProps=='undefined'?[]:Vencord.Api.MemberListDecorators.__getDecorators(vencordProps)),"}]},{find:"PrivateChannel.renderAvatar",replacement:{match:/decorators:(\i\.isSystemDM\(\))\?(.+?):null/,replace:"decorators:[...Vencord.Api.MemberListDecorators.__getDecorators(arguments[0]), $1?$2:null]"}}]})});var kc,Sh=g(()=>{"use strict";a();M();w();kc=y({name:"MessageAccessoriesAPI",description:"API to add message accessories.",authors:[p.Cyn],patches:[{find:".Messages.REMOVE_ATTACHMENT_BODY",replacement:{match:/(?<=.container\)?,children:)(\[.+?\])/,replace:"Vencord.Api.MessageAccessories._modifyAccessories($1,this.props)"}}]})});var Rc,bh=g(()=>{"use strict";a();M();w();Rc=y({name:"MessageDecorationsAPI",description:"API to add decorations to messages",authors:[p.TheSun],patches:[{find:'"Message Username"',replacement:{match:/\.Messages\.GUILD_COMMUNICATION_DISABLED_BOTTOM_SHEET_TITLE.+?}\),\i(?=\])/,replace:"$&,...Vencord.Api.MessageDecorations.__addDecorationsToMessage(arguments[0])"}}]})});var Lc,Th=g(()=>{"use strict";a();M();w();Lc=y({name:"MessageEventsAPI",description:"Api required by anything using message events.",authors:[p.Arjix,p.hunt,p.Ven],patches:[{find:'"MessageActionCreators"',replacement:{match:/async editMessage\(.+?\)\{/,replace:"$&await Vencord.Api.MessageEvents._handlePreEdit(...arguments);"}},{find:".handleSendMessage=",replacement:{match:/(type:this\.props\.chatInputType.+?\.then\()(\i=>\{.+?let (\i)=\i\.\i\.parse\((\i),.+?let (\i)=\i\.\i\.getSendMessageOptionsForReply\(\i\);)(?<=\)\(({.+?})\)\.then.+?)/,replace:(e,t,n,r,i,s,l)=>`${t}async ${n}if(await Vencord.Api.MessageEvents._handlePreSend(${i}.id,${r},${l},${s}))return{shoudClear:true,shouldRefocus:true};`}},{find:'("interactionUsernameProfile',replacement:{match:/let\{id:\i}=(\i),{id:\i}=(\i);return \i\.useCallback\((\i)=>\{/,replace:(e,t,n,r)=>`const vcMsg=${t},vcChan=${n};${e}Vencord.Api.MessageEvents._handleClick(vcMsg, vcChan, ${r});`}}]})});var Ec,xh=g(()=>{"use strict";a();M();w();Ec=y({name:"MessagePopoverAPI",description:"API to add buttons to message popovers.",authors:[p.KingFish,p.Ven,p.Nuckyz],patches:[{find:"Messages.MESSAGE_UTILITIES_A11Y_LABEL",replacement:{match:/\i&&!\i\?\(0,\i\.jsxs?\)\(.{0,200}renderEmojiPicker:.{0,500}\?(\i)\(\{key:"reply-other"/,replace:(e,t)=>{let n=e.match(/message:(.{1,3}),/)?.[1];if(!n)throw new Error("Could not find message variable");return`...Vencord.Api.MessagePopover._buildPopoverElements(${n},${t}),${e}`}}}]})});var Dc,wh=g(()=>{"use strict";a();M();w();Dc=y({name:"NoticesAPI",description:"Fixes notices being automatically dismissed",authors:[p.Ven],required:!0,patches:[{find:'displayName="NoticeStore"',replacement:[{match:/\i=null;(?=.{0,80}getPremiumSubscription\(\))/g,replace:"if(Vencord.Api.Notices.currentNotice)return false;$&"},{match:/(?<=,NOTICE_DISMISS:function\(\i\){)return null!=(\i)/,replace:'if($1.id=="VencordNotice")return($1=null,Vencord.Api.Notices.nextNotice(),true);$&'}]}]})});var Oc,Mh=g(()=>{"use strict";a();M();w();Oc=y({name:"ServerListAPI",authors:[p.kemo],description:"Api required for plugins that modify the server list",patches:[{find:"Messages.DISCODO_DISABLED",replacement:{match:/(?<=Messages\.DISCODO_DISABLED.+?return)(\(.{0,75}?tutorialContainer.+?}\))(?=}function)/,replace:"[$1].concat(Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.Above))"}},{find:"Messages.SERVERS,children",replacement:{match:/(?<=Messages\.SERVERS,children:).+?default:return null\}\}\)/,replace:"Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.In).concat($&)"}}]})});var _c,Ph=g(()=>{"use strict";a();M();w();_c=y({name:"NoTrack",description:"Disable Discord's tracking ('science'), metrics and Sentry crash reporting",authors:[p.Cyn,p.Ven,p.Nuckyz,p.Arrow],required:!0,patches:[{find:"AnalyticsActionHandlers.handle",replacement:{match:/^.+$/,replace:"()=>{}"}},{find:"window.DiscordSentry=",replacement:{match:/^.+$/,replace:"()=>{}"}},{find:".METRICS,",replacement:[{match:/this\._intervalId=/,replace:"this._intervalId=undefined&&"},{match:/(increment\(\i\){)/,replace:"$1return;"}]},{find:".installedLogHooks)",replacement:{match:"getDebugLogging(){",replace:"getDebugLogging(){return false;"}}]})});var Fc={};Be(Fc,{_patchContextMenu:()=>dw,addContextMenuPatch:()=>ce,addGlobalContextMenuPatch:()=>uw,findGroupChildrenByChildId:()=>dt,globalPatches:()=>ua,navPatches:()=>Ui,removeContextMenuPatch:()=>de,removeGlobalContextMenuPatch:()=>pw});function ce(e,t){Array.isArray(e)||(e=[e]);for(let n of e){let r=Ui.get(n);r||(r=new Set,Ui.set(n,r)),r.add(t)}}function uw(e){ua.add(e)}function de(e,t){let r=(Array.isArray(e)?e:[e]).map(i=>Ui.get(i)?.delete(t)??!1);return Array.isArray(e)?r:r[0]}function pw(e){return ua.delete(e)}function dt(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=dt(e,i,i);if(s!==null)return s}}return null}function dw(e){e.contextMenuApiArguments??=[];let t=Ui.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);Bc.has(e)||r?.()}catch(r){Ih.error(`Patch for ${e.navId} errored,`,r)}for(let n of ua)try{let r=n(e.navId,e.children,...e.contextMenuApiArguments);Bc.has(e)||r?.()}catch(r){Ih.error("Global patch errored,",r)}Bc.add(e)}var Ih,Ui,ua,Bc,Mt=g(()=>{"use strict";a();Ze();Ih=new ie("ContextMenu"),Ui=new Map,ua=new Set;Bc=new WeakSet});function hn(e,t=300){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}var jr=g(()=>{"use strict";a()});var fr,pa=g(()=>{"use strict";a();({localStorage:fr}=window)});var Cn,Wr=g(()=>{"use strict";a();Cn=class{constructor(t=1/0){this.maxSize=t}queue=[];promise;next(){let t=this.queue.shift();t?this.promise=Promise.resolve().then(t).finally(()=>this.next()):this.promise=void 0}run(){this.promise||this.next()}push(t){this.size>=this.maxSize&&this.queue.shift(),this.queue.push(t),this.run()}unshift(t){this.size>=this.maxSize&&this.queue.pop(),this.queue.unshift(t),this.run()}get size(){return this.queue.length}}});var Ah=g(()=>{});var da,Uc=g(()=>{"use strict";a();Ah();U();le();Re();I();da=_.wrap(function({title:t,body:n,richBody:r,color:i,icon:s,onClick:l,onClose:c,image:u,permanent:d,className:m,dismissOnClick:h}){let{timeout:v,position:T}=lt(["notifications.timeout","notifications.position"]).notifications,P=He([Ri],()=>Ri.isFocused()),[b,x]=J(!1),[C,k]=J(0),B=At(()=>Date.now(),[v,b,P]);De(()=>{if(b||!P||v===0||d)return void k(0);let Y=setInterval(()=>{let K=Date.now()-B;K>=v?c():k(K)},10);return()=>clearInterval(Y)},[v,b,P]);let $=C/v;return o("button",{className:oe("vc-notification-root",m),style:T==="bottom-right"?{bottom:"1rem"}:{top:"3rem"},onClick:()=>{l?.(),h!==!1&&c()},onContextMenu:Y=>{Y.preventDefault(),Y.stopPropagation(),c()},onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1)},o("div",{className:"vc-notification"},s&&o("img",{className:"vc-notification-icon",src:s,alt:""}),o("div",{className:"vc-notification-content"},o("div",{className:"vc-notification-header"},o("h2",{className:"vc-notification-title"},t),o("button",{className:"vc-notification-close-btn",onClick:Y=>{Y.preventDefault(),Y.stopPropagation(),c()}},o("svg",{width:"24",height:"24",viewBox:"0 0 24 24",role:"img","aria-labelledby":"vc-notification-dismiss-title"},o("title",{id:"vc-notification-dismiss-title"},"Dismiss Notification"),o("path",{fill:"currentColor",d:"M18.4 4L12 10.4L5.6 4L4 5.6L10.4 12L4 18.4L5.6 20L12 13.6L18.4 20L20 18.4L13.6 12L20 5.6L18.4 4Z"})))),o("div",null,r??o("p",{className:"vc-notification-p"},n)))),u&&o("img",{className:"vc-notification-img",src:u,alt:""}),v!==0&&!d&&o("div",{className:"vc-notification-progressbar",style:{width:`${(1-$)*100}%`,backgroundColor:i||"var(--brand-experiment)"}}))},{onError:({props:e})=>e.onClose()})});var eo={};Be(eo,{clear:()=>hw,createStore:()=>Ch,del:()=>Gc,delMany:()=>gw,entries:()=>Sw,get:()=>Pt,getMany:()=>fw,keys:()=>yw,promisifyRequest:()=>_t,set:()=>Zt,setMany:()=>mw,update:()=>gr,values:()=>vw});function _t(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Ch(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=_t(n);return(i,s)=>r.then(l=>s(l.transaction(t,i).objectStore(t)))}function Nn(){return $c||($c=Ch("VencordData","VencordStore")),$c}function Pt(e,t=Nn()){return t("readonly",n=>_t(n.get(e)))}function Zt(e,t,n=Nn()){return n("readwrite",r=>(r.put(t,e),_t(r.transaction)))}function mw(e,t=Nn()){return t("readwrite",n=>(e.forEach(r=>n.put(r[1],r[0])),_t(n.transaction)))}function fw(e,t=Nn()){return t("readonly",n=>Promise.all(e.map(r=>_t(n.get(r)))))}function gr(e,t,n=Nn()){return n("readwrite",r=>new Promise((i,s)=>{r.get(e).onsuccess=function(){try{r.put(t(this.result),e),i(_t(r.transaction))}catch(l){s(l)}}}))}function Gc(e,t=Nn()){return t("readwrite",n=>(n.delete(e),_t(n.transaction)))}function gw(e,t=Nn()){return t("readwrite",n=>(e.forEach(r=>n.delete(r)),_t(n.transaction)))}function hw(e=Nn()){return e("readwrite",t=>(t.clear(),_t(t.transaction)))}function Hc(e,t){return e.openCursor().onsuccess=function(){!this.result||(t(this.result),this.result.continue())},_t(e.transaction)}function yw(e=Nn()){return e("readonly",t=>{if(t.getAllKeys)return _t(t.getAllKeys());let n=[];return Hc(t,r=>n.push(r.key)).then(()=>n)})}function vw(e=Nn()){return e("readonly",t=>{if(t.getAll)return _t(t.getAll());let n=[];return Hc(t,r=>n.push(r.value)).then(()=>n)})}function Sw(e=Nn()){return e("readonly",t=>{if(t.getAll&&t.getAllKeys)return Promise.all([_t(t.getAllKeys()),_t(t.getAll())]).then(([r,i])=>r.map((s,l)=>[s,i[l]]));let n=[];return e("readonly",r=>Hc(r,i=>n.push([i.key,i.value])).then(()=>n))})}var $c,jn=g(()=>{"use strict";a();});var Wc={};Be(Wc,{classNameFactory:()=>Ue,classNameToSelector:()=>kh,compileStyle:()=>jc,disableStyle:()=>Bt,enableStyle:()=>vt,isStyleEnabled:()=>zc,requireStyle:()=>$i,setStyleClassNames:()=>Tw,styleMap:()=>Nh,toggleStyle:()=>bw});function $i(e){let t=Nh.get(e);if(!t)throw new Error(`Style "${e}" does not exist`);return t}function vt(e){let t=$i(e);return t.dom?.isConnected?!1:(t.dom||(t.dom=document.createElement("style"),t.dom.dataset.vencordName=t.name),jc(t),document.head.appendChild(t.dom),!0)}function Bt(e){let t=$i(e);return t.dom?.isConnected?(t.dom.remove(),t.dom=null,!0):!1}var Nh,bw,zc,Tw,jc,kh,Ue,Je=g(()=>{"use strict";a();Nh=window.VencordStyles??=new Map;bw=e=>zc(e)?Bt(e):vt(e),zc=e=>$i(e).dom?.isConnected??!1,Tw=(e,t,n=!0)=>{let r=$i(e);r.classNames=t,n&&zc(r.name)&&jc(r)},jc=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?kh(r):t})},kh=(e,t="")=>e.split(" ").map(n=>`.${t}${n}`).join(""),Ue=(e="")=>(...t)=>{let n=new Set;for(let r of t)r&&typeof r=="string"?n.add(r):Array.isArray(r)?r.forEach(i=>n.add(i)):r&&typeof r=="object"&&Object.entries(r).forEach(([i,s])=>s&&n.add(i));return Array.from(n,r=>e+r).join(" ")}});var Rh,Lh=g(()=>{a();Rh=(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 Dh(e){if(e.noPersist)return;let t=E.notifications.logLimit;t!==0&&(await gr(ma,n=>{let r=n??[],{onClick:i,onClose:s,richBody:l,permanent:c,noPersist:u,dismissOnClick:d,...m}=e;return r.unshift({...m,timestamp:Date.now(),id:Rh()}),r.length>t&&t!==200&&(r.length=t),r}),Gi.forEach(n=>n()))}async function xw(e){let t=await Eh(),n=t.findIndex(r=>r.timestamp===e);n!==-1&&(t.splice(n,1),await Zt(ma,t),Gi.forEach(r=>r()))}function ww(){let[e,t]=Fr(s=>s+1,0);De(()=>(Gi.add(t),()=>void Gi.delete(t)),[]);let[n,r,i]=nt(Eh,{fallbackValue:[],deps:[e]});return[n,i]}function Mw({data:e}){let[t,n]=J(!1),r=O.useRef(null);return De(()=>{let i=r.current,s=()=>{if(i.clientHeight===0)return requestAnimationFrame(s);i.style.height=`${i.clientHeight}px`};s()},[]),o("div",{className:qr("wrapper",{removing:t}),ref:r},o(da,{...e,permanent:!0,dismissOnClick:!1,onClose:()=>{t||(n(!0),setTimeout(()=>xw(e.timestamp),200))},richBody:o("div",{className:qr("body")},e.body,o($n,{timestamp:dn(e.timestamp),className:qr("timestamp")}))}))}function Pw({log:e,pending:t}){return!e.length&&!t?o("div",{className:qr("container")},o("div",{className:qr("empty")}),o(S.FormText,{style:{textAlign:"center"}},"No notifications yet")):o("div",{className:qr("container")},e.map(n=>o(Mw,{data:n,key:n.id})))}function Iw({modalProps:e,close:t}){let[n,r]=ww();return o(ze,{...e,size:"large"},o(at,null,o(re,{variant:"heading-lg/semibold",style:{flexGrow:1}},"Notification Log"),o(ln,{onClick:t})),o(Ve,null,o(Pw,{log:n,pending:r})),o(Ot,null,o(R,{disabled:n.length===0,onClick:()=>{sn.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 Zt(ma,[]),Gi.forEach(i=>i())},confirmText:"Do it!",confirmColor:"vc-notification-log-danger-btn",cancelText:"Nevermind"})}},"Clear Notification Log")))}function fa(){let e=je(t=>o(Iw,{modalProps:t,close:()=>Vn(e)}))}var ma,Eh,qr,Gi,ga=g(()=>{"use strict";a();jn();U();Je();pt();st();I();Lh();Uc();ma="notification-log",Eh=async()=>await Pt(ma)??[],qr=Ue("vc-notification-log-"),Gi=new Set});function Nw(){if(!qc){let e=document.createElement("div");e.id="vc-notification-container",document.body.append(e),qc=ar.createRoot(e)}return qc}function kw(e,t){let n=Nw();return new Promise(r=>{n.render(o(da,{key:t,...e,onClose:()=>{e.onClose?.(),n.render(null),r()}}))})}function Rw(){if(typeof Notification>"u")return!1;let{useNative:e}=E.notifications;return e==="always"?!0:e==="not-focused"?!document.hasFocus():!1}async function Oh(){return Notification.permission==="granted"||Notification.permission!=="denied"&&await Notification.requestPermission()==="granted"}async function Ie(e){if(Dh(e),Rw()&&await Oh()){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 Aw.push(()=>kw(e,Cw++))}var Aw,qc,Cw,_h=g(()=>{"use strict";a();U();Wr();I();Uc();ga();Aw=new Cn,Cw=42});var Kc={};Be(Kc,{requestPermission:()=>Oh,showNotification:()=>Ie});var Ao=g(()=>{"use strict";a();_h()});function Wh(e,t){return Gw(e,t||{},0,0)}function qh(e,t){return Fw(e,t)}var Ft,Xt,ha,ya,va,Jc,$h,Gh,Hh,Qc,zh,Lw,Bh,Vc,to,Le,Wn,No,Le,Le,Le,Le,ji,Le,Ew,Dw,Ow,_w,Yc,kn,Zc,nu,jh,Bw,Co,Fw,no,Hi,Xc,eu,Fh,zi,tu,Uh,Uw,ou,$w,Gw,Hw,zw,Kh=g(()=>{a();Ft=Uint8Array,Xt=Uint16Array,ha=Uint32Array,ya=new Ft([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]),va=new Ft([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]),Jc=new Ft([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),$h=function(e,t){for(var n=new Xt(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new ha(n[30]),r=1;r<30;++r)for(var s=n[r];s<n[r+1];++s)i[s]=s-n[r]<<5|r;return[n,i]},Gh=$h(ya,2),Hh=Gh[0],Qc=Gh[1];Hh[28]=258,Qc[258]=28;zh=$h(va,0),Lw=zh[0],Bh=zh[1],Vc=new Xt(32768);for(Le=0;Le<32768;++Le)to=(Le&43690)>>>1|(Le&21845)<<1,to=(to&52428)>>>2|(to&13107)<<2,to=(to&61680)>>>4|(to&3855)<<4,Vc[Le]=((to&65280)>>>8|(to&255)<<8)>>>1;Wn=function(e,t,n){for(var r=e.length,i=0,s=new Xt(t);i<r;++i)e[i]&&++s[e[i]-1];var l=new Xt(t);for(i=0;i<t;++i)l[i]=l[i-1]+s[i-1]<<1;var c;if(n){c=new Xt(1<<t);var u=15-t;for(i=0;i<r;++i)if(e[i])for(var d=i<<4|e[i],m=t-e[i],h=l[e[i]-1]++<<m,v=h|(1<<m)-1;h<=v;++h)c[Vc[h]>>>u]=d}else for(c=new Xt(r),i=0;i<r;++i)e[i]&&(c[i]=Vc[l[e[i]-1]++]>>>15-e[i]);return c},No=new Ft(288);for(Le=0;Le<144;++Le)No[Le]=8;for(Le=144;Le<256;++Le)No[Le]=9;for(Le=256;Le<280;++Le)No[Le]=7;for(Le=280;Le<288;++Le)No[Le]=8;ji=new Ft(32);for(Le=0;Le<32;++Le)ji[Le]=5;Ew=Wn(No,9,0),Dw=Wn(No,9,1),Ow=Wn(ji,5,0),_w=Wn(ji,5,1),Yc=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},kn=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&n},Zc=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},nu=function(e){return(e+7)/8|0},jh=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?Xt:e.BYTES_PER_ELEMENT==4?ha:Ft)(n-t);return r.set(e.subarray(t,n)),r},Bw=["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"],Co=function(e,t,n){var r=new Error(t||Bw[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,Co),!n)throw r;return r},Fw=function(e,t,n){var r=e.length;if(!r||n&&n.f&&!n.l)return t||new Ft(0);var i=!t||n,s=!n||n.i;n||(n={}),t||(t=new Ft(r*3));var l=function(Vo){var So=t.length;if(Vo>So){var bo=new Ft(Math.max(So*2,Vo));bo.set(t),t=bo}},c=n.f||0,u=n.p||0,d=n.b||0,m=n.l,h=n.d,v=n.m,T=n.n,P=r*8;do{if(!m){c=kn(e,u,1);var b=kn(e,u+1,3);if(u+=3,b)if(b==1)m=Dw,h=_w,v=9,T=5;else if(b==2){var B=kn(e,u,31)+257,$=kn(e,u+10,15)+4,Y=B+kn(e,u+5,31)+1;u+=14;for(var K=new Ft(Y),z=new Ft(19),L=0;L<$;++L)z[Jc[L]]=kn(e,u+L*3,7);u+=$*3;for(var X=Yc(z),ne=(1<<X)-1,be=Wn(z,X,1),L=0;L<Y;){var ae=be[kn(e,u,ne)];u+=ae&15;var x=ae>>>4;if(x<16)K[L++]=x;else{var Ae=0,me=0;for(x==16?(me=3+kn(e,u,3),u+=2,Ae=K[L-1]):x==17?(me=3+kn(e,u,7),u+=3):x==18&&(me=11+kn(e,u,127),u+=7);me--;)K[L++]=Ae}}var ye=K.subarray(0,B),xe=K.subarray(B);v=Yc(ye),T=Yc(xe),m=Wn(ye,v,1),h=Wn(xe,T,1)}else Co(1);else{var x=nu(u)+4,C=e[x-4]|e[x-3]<<8,k=x+C;if(k>r){s&&Co(0);break}i&&l(d+C),t.set(e.subarray(x,k),d),n.b=d+=C,n.p=u=k*8,n.f=c;continue}if(u>P){s&&Co(0);break}}i&&l(d+131072);for(var we=(1<<v)-1,ve=(1<<T)-1,pe=u;;pe=u){var Ae=m[Zc(e,u)&we],ft=Ae>>>4;if(u+=Ae&15,u>P){s&&Co(0);break}if(Ae||Co(2),ft<256)t[d++]=ft;else if(ft==256){pe=u,m=null;break}else{var Ye=ft-254;if(ft>264){var L=ft-257,Ce=ya[L];Ye=kn(e,u,(1<<Ce)-1)+Hh[L],u+=Ce}var Wt=h[Zc(e,u)&ve],bt=Wt>>>4;Wt||Co(3),u+=Wt&15;var xe=Lw[bt];if(bt>3){var Ce=va[bt];xe+=Zc(e,u)&(1<<Ce)-1,u+=Ce}if(u>P){s&&Co(0);break}i&&l(d+131072);for(var gt=d+Ye;d<gt;d+=4)t[d]=t[d-xe],t[d+1]=t[d+1-xe],t[d+2]=t[d+2-xe],t[d+3]=t[d+3-xe];d=gt}}n.l=m,n.p=pe,n.b=d,n.f=c,m&&(c=1,n.m=v,n.d=h,n.n=T)}while(!c);return d==t.length?t:jh(t,0,d)},no=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8},Hi=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},Xc=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,s=n.slice();if(!i)return[ou,0];if(i==1){var l=new Ft(n[0].s+1);return l[n[0].s]=1,[l,1]}n.sort(function(Y,K){return Y.f-K.f}),n.push({s:-1,f:25001});var c=n[0],u=n[1],d=0,m=1,h=2;for(n[0]={s:-1,f:c.f+u.f,l:c,r:u};m!=i-1;)c=n[n[d].f<n[h].f?d++:h++],u=n[d!=m&&n[d].f<n[h].f?d++:h++],n[m++]={s:-1,f:c.f+u.f,l:c,r:u};for(var v=s[0].s,r=1;r<i;++r)s[r].s>v&&(v=s[r].s);var T=new Xt(v+1),P=eu(n[m-1],T,0);if(P>t){var r=0,b=0,x=P-t,C=1<<x;for(s.sort(function(K,z){return T[z.s]-T[K.s]||K.f-z.f});r<i;++r){var k=s[r].s;if(T[k]>t)b+=C-(1<<P-T[k]),T[k]=t;else break}for(b>>>=x;b>0;){var B=s[r].s;T[B]<t?b-=1<<t-T[B]++-1:++r}for(;r>=0&&b;--r){var $=s[r].s;T[$]==t&&(--T[$],++b)}P=t}return[new Ft(T),P]},eu=function(e,t,n){return e.s==-1?Math.max(eu(e.l,t,n+1),eu(e.r,t,n+1)):t[e.s]=n},Fh=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Xt(++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]},zi=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},tu=function(e,t,n){var r=n.length,i=nu(t+2);e[i]=r&255,e[i+1]=r>>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var s=0;s<r;++s)e[i+s+4]=n[s];return(i+4+r)*8},Uh=function(e,t,n,r,i,s,l,c,u,d,m){no(t,m++,n),++i[256];for(var h=Xc(i,15),v=h[0],T=h[1],P=Xc(s,15),b=P[0],x=P[1],C=Fh(v),k=C[0],B=C[1],$=Fh(b),Y=$[0],K=$[1],z=new Xt(19),L=0;L<k.length;++L)z[k[L]&31]++;for(var L=0;L<Y.length;++L)z[Y[L]&31]++;for(var X=Xc(z,7),ne=X[0],be=X[1],ae=19;ae>4&&!ne[Jc[ae-1]];--ae);var Ae=d+5<<3,me=zi(i,No)+zi(s,ji)+l,ye=zi(i,v)+zi(s,b)+l+14+3*ae+zi(z,ne)+(2*z[16]+3*z[17]+7*z[18]);if(Ae<=me&&Ae<=ye)return tu(t,m,e.subarray(u,u+d));var xe,we,ve,pe;if(no(t,m,1+(ye<me)),m+=2,ye<me){xe=Wn(v,T,0),we=v,ve=Wn(b,x,0),pe=b;var ft=Wn(ne,be,0);no(t,m,B-257),no(t,m+5,K-1),no(t,m+10,ae-4),m+=14;for(var L=0;L<ae;++L)no(t,m+3*L,ne[Jc[L]]);m+=3*ae;for(var Ye=[k,Y],Ce=0;Ce<2;++Ce)for(var Wt=Ye[Ce],L=0;L<Wt.length;++L){var bt=Wt[L]&31;no(t,m,ft[bt]),m+=ne[bt],bt>15&&(no(t,m,Wt[L]>>>5&127),m+=Wt[L]>>>12)}}else xe=Ew,we=No,ve=Ow,pe=ji;for(var L=0;L<c;++L)if(r[L]>255){var bt=r[L]>>>18&31;Hi(t,m,xe[bt+257]),m+=we[bt+257],bt>7&&(no(t,m,r[L]>>>23&31),m+=ya[bt]);var gt=r[L]&31;Hi(t,m,ve[gt]),m+=pe[gt],gt>3&&(Hi(t,m,r[L]>>>5&8191),m+=va[gt])}else Hi(t,m,xe[r[L]]),m+=we[r[L]];return Hi(t,m,xe[256]),m+we[256]},Uw=new ha([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ou=new Ft(0),$w=function(e,t,n,r,i,s){var l=e.length,c=new Ft(r+l+5*(1+Math.ceil(l/7e3))+i),u=c.subarray(r,c.length-i),d=0;if(!t||l<8)for(var m=0;m<=l;m+=65535){var h=m+65535;h>=l&&(u[d>>3]=s),d=tu(u,d+1,e.subarray(m,h))}else{for(var v=Uw[t-1],T=v>>>13,P=v&8191,b=(1<<n)-1,x=new Xt(32768),C=new Xt(b+1),k=Math.ceil(n/3),B=2*k,$=function(se){return(e[se]^e[se+1]<<k^e[se+2]<<B)&b},Y=new ha(25e3),K=new Xt(288),z=new Xt(32),L=0,X=0,m=0,ne=0,be=0,ae=0;m<l;++m){var Ae=$(m),me=m&32767,ye=C[Ae];if(x[me]=ye,C[Ae]=me,be<=m){var xe=l-m;if((L>7e3||ne>24576)&&xe>423){d=Uh(e,u,0,Y,K,z,X,ne,ae,m-ae,d),ne=L=X=0,ae=m;for(var we=0;we<286;++we)K[we]=0;for(var we=0;we<30;++we)z[we]=0}var ve=2,pe=0,ft=P,Ye=me-ye&32767;if(xe>2&&Ae==$(m-Ye))for(var Ce=Math.min(T,xe)-1,Wt=Math.min(32767,m),bt=Math.min(258,xe);Ye<=Wt&&--ft&&me!=ye;){if(e[m+ve]==e[m+ve-Ye]){for(var gt=0;gt<bt&&e[m+gt]==e[m+gt-Ye];++gt);if(gt>ve){if(ve=gt,pe=Ye,gt>Ce)break;for(var Vo=Math.min(Ye,gt-2),So=0,we=0;we<Vo;++we){var bo=m-Ye+we+32768&32767,er=x[bo],Nt=bo-er+32768&32767;Nt>So&&(So=Nt,ye=bo)}}}me=ye,ye=x[me],Ye+=me-ye+32768&32767}if(pe){Y[ne++]=268435456|Qc[ve]<<18|Bh[pe];var tr=Qc[ve]&31,N=Bh[pe]&31;X+=ya[tr]+va[N],++K[257+tr],++z[N],be=m+ve,++L}else Y[ne++]=e[m],++K[e[m]]}}d=Uh(e,u,s,Y,K,z,X,ne,ae,m-ae,d),!s&&d&7&&(d=tu(u,d+1,ou))}return jh(c,0,r+nu(d)+i)},Gw=function(e,t,n,r,i){return $w(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)};Hw=typeof TextDecoder<"u"&&new TextDecoder,zw=0;try{Hw.decode(ou,{stream:!0}),zw=1}catch{}});async function Yh(){let e=await Pt("Vencord_cloudSecret")??{},t=ru();return e[t]?(await gr("Vencord_cloudSecret",n=>(n??={},n[`${t}:${Wi()}`]=n[t],delete n[t],n)),e[t]):e[`${t}:${Wi()}`]}async function jw(e){await gr("Vencord_cloudSecret",t=>(t??={},t[`${ru()}:${Wi()}`]=e,t))}async function iu(){await gr("Vencord_cloudSecret",e=>(e??={},delete e[`${ru()}:${Wi()}`],e))}async function Zh(){if(await Yh()!==void 0){E.cloud.authenticated=!0;return}try{let r=await fetch(new URL("/v1/oauth/settings",ko()));var{clientId:e,redirectUri:t}=await r.json()}catch{Ie({title:"Cloud Integration",body:"Setup failed (couldn't retrieve OAuth configuration)."}),E.cloud.authenticated=!1;return}let{OAuth2AuthorizeModal:n}=Dt("OAuth2AuthorizeModal");je(r=>o(n,{...r,scopes:["identify"],responseType:"code",redirectUri:t,permissions:0n,clientId:e,cancelCompletesFlow:!1,callback:async({location:i})=>{if(!i){E.cloud.authenticated=!1;return}try{let s=await fetch(i,{headers:new Headers({Accept:"application/json"})}),{secret:l}=await s.json();l?(Sa.info("Authorized with secret"),await jw(l),Ie({title:"Cloud Integration",body:"Cloud integrations enabled!"}),E.cloud.authenticated=!0):(Ie({title:"Cloud Integration",body:"Setup failed (no secret returned?)."}),E.cloud.authenticated=!1)}catch(s){Sa.error("Failed to authorize",s),Ie({title:"Cloud Integration",body:`Setup failed (${s.toString()}).`}),E.cloud.authenticated=!1}}}))}async function Kr(){let e=await Yh();return window.btoa(`${e}:${Wi()}`)}var Sa,ko,ru,Wi,su=g(()=>{"use strict";a();jn();Ao();U();j();I();Ze();pt();Sa=new ie("Cloud","#39b7e0"),ko=()=>new URL(E.cloud.url),ru=()=>ko().origin,Wi=()=>{let e=W.getCurrentUser()?.id;if(!e)throw new Error("User not yet logged in");return e}});function cn(){window.VesktopNative.app.relaunch()}function ba(e){window.VesktopNative.fileManager.showItemInFolder(e)}var Ro=g(()=>{"use strict";a()});function Ta(e){let t=document.createElement("a");t.href=URL.createObjectURL(e),t.download=e.name,document.body.appendChild(t),t.click(),setImmediate(()=>{URL.revokeObjectURL(t.href),document.body.removeChild(t)})}function xa(e){return new Promise(t=>{let n=document.createElement("input");n.type="file",n.style.display="none",n.accept=e,n.onchange=async()=>{t(n.files?.[0]??null)},document.body.appendChild(n),n.click(),setImmediate(()=>document.body.removeChild(n))})}var wa=g(()=>{"use strict";a()});async function Xh(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(qn,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 Jh({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 Qh(){let e="vencord-settings-backup.json",t=await Jh(),n=new TextEncoder().encode(t);Ta(new File([n],e,{type:"application/json"}))}async function ey(e=!0){if(!1){if(t)try{}catch(n){}}else{let t=await xa("application/json");if(!t)return;let n=new FileReader;n.onload=async()=>{try{await Xh(n.result),e&&Ww()}catch(r){new ie("SettingsSync").error(r),e&&qw(r)}},n.readAsText(t)}}async function Yr(e){let t=await Jh({minify:!0});try{let n=await fetch(new URL("/v1/settings",ko()),{method:"PUT",headers:new Headers({Authorization:await Kr(),"Content-Type":"application/octet-stream"}),body:Wh(new TextEncoder().encode(t))});if(!n.ok){Rn.error(`Failed to sync up, API returned ${n.status}`),Ie({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();qn.cloud.settingsSyncVersion=r,VencordNative.settings.set(JSON.stringify(qn,null,4)),Rn.info("Settings uploaded to cloud successfully"),e&&Ie({title:"Cloud Settings",body:"Synchronized settings to the cloud!",noPersist:!0})}catch(n){Rn.error("Failed to sync up",n),Ie({title:"Cloud Settings",body:`Could not synchronize settings to the cloud (${n.toString()}).`,color:"var(--red-360)"})}}async function Ma(e=!0,t=!1){try{let n=await fetch(new URL("/v1/settings",ko()),{method:"GET",headers:new Headers({Authorization:await Kr(),Accept:"application/octet-stream","If-None-Match":E.cloud.settingsSyncVersion.toString()})});if(n.status===404)return Rn.info("No settings on the cloud"),e&&Ie({title:"Cloud Settings",body:"There are no settings in the cloud.",noPersist:!0}),!1;if(n.status===304)return Rn.info("Settings up to date"),e&&Ie({title:"Cloud Settings",body:"Your settings are up to date.",noPersist:!0}),!1;if(!n.ok)return Rn.error(`Failed to sync down, API returned ${n.status}`),Ie({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=E.cloud.settingsSyncVersion;if(!t&&r<i){e&&Ie({title:"Cloud Settings",body:"Your local settings are newer than the cloud ones.",noPersist:!0});return}let s=await n.arrayBuffer(),l=new TextDecoder().decode(qh(new Uint8Array(s)));return await Xh(l),qn.cloud.settingsSyncVersion=r,VencordNative.settings.set(JSON.stringify(qn,null,4)),Rn.info("Settings loaded from cloud successfully"),e&&Ie({title:"Cloud Settings",body:"Your settings have been updated! Click here to restart to fully apply changes!",color:"var(--green-360)",onClick:cn,noPersist:!0}),!0}catch(n){return Rn.error("Failed to sync down",n),Ie({title:"Cloud Settings",body:`Could not synchronize settings from the cloud (${n.toString()}).`,color:"var(--red-360)"}),!1}}async function ty(){try{let e=await fetch(new URL("/v1/settings",ko()),{method:"DELETE",headers:new Headers({Authorization:await Kr()})});if(!e.ok){Rn.error(`Failed to delete, API returned ${e.status}`),Ie({title:"Cloud Settings",body:`Could not delete settings (API returned ${e.status}).`,color:"var(--red-360)"});return}Rn.info("Settings deleted from cloud successfully"),Ie({title:"Cloud Settings",body:"Settings deleted from cloud!",color:"var(--green-360)"})}catch(e){Rn.error("Failed to delete",e),Ie({title:"Cloud Settings",body:`Could not delete settings (${e.toString()}).`,color:"var(--red-360)"})}}var Vh,Ww,qw,Rn,qi=g(()=>{"use strict";a();Ao();U();I();Kh();su();Ze();Ro();wa();Vh=(e,t)=>ee.show({type:e,message:t,id:ee.genId()}),Ww=()=>Vh(ee.Type.SUCCESS,"Settings successfully imported. Restart to apply changes!"),qw=e=>Vh(ee.Type.FAILURE,`Failed to import settings: ${String(e)}`);Rn=new ie("Cloud:Settings","#39b7e0")});var lu={};Be(lu,{PlainSettings:()=>qn,Settings:()=>E,addSettingsListener:()=>Ki,definePluginSettings:()=>D,migratePluginSettings:()=>Yw,useSettings:()=>lt});function au(e,t=e,n=""){return oy[n]??=new Proxy(e,{get(r,i){let s=r[i];if(!(i in r)){if(n==="plugins"&&i in Oe)return r[i]=au({enabled:Oe[i].required??Oe[i].enabledByDefault??!1},t,`plugins.${i}`);if(n.startsWith("plugins.")){let l=n.slice(8);if(l in Oe){let c=Oe[l].options?.[i];if(!c)return s;if("default"in c)return r[i]=c.default;if(c.type===4){let u=c.options.find(d=>d.default);return u&&(r[i]=u.value),u?.value}}}return s}return typeof s=="object"&&!Array.isArray(s)&&s!==null?au(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 oy[l];for(let c of Pa)(!c._paths||c._paths.includes(l))&&c(s,l);return qn.cloud.settingsSyncVersion=Date.now(),fr.Vencord_settingsDirty=!0,Kw(),VencordNative.settings.set(JSON.stringify(t,null,4)),!0}})}function lt(e){let[,t]=O.useReducer(()=>({}),{}),n=e?(r,i)=>e.includes(i)&&t():t;return O.useEffect(()=>(Pa.add(n),()=>void Pa.delete(n)),[]),E}function Ki(e,t){e&&(t._paths??=[]).push(e),Pa.add(t)}function Yw(e,...t){let{plugins:n}=Lo;if(!(e in n)){for(let r of t)if(r in n){ry.info(`Migrating settings from old name ${r} to ${e}`),n[e]=n[r],delete n[r],VencordNative.settings.set(JSON.stringify(Lo,null,4));break}}}function D(e,t){let n={get store(){if(!n.pluginName)throw new Error("Cannot access settings before plugin is initialized");return E.plugins[n.pluginName]},use:r=>lt(r?.map(i=>`plugins.${n.pluginName}.${i}`)).plugins[n.pluginName],def:e,checks:t??{},pluginName:"",withPrivateSettings(){return this}};return n}var ry,ny,Lo,Kw,Pa,oy,qn,E,U=g(()=>{"use strict";a();jr();pa();Ze();Re();qi();w();I();hr();ry=new ie("Settings"),ny={notifyAboutUpdates:!0,autoUpdate:!1,autoUpdateNotification:!0,useQuickCss:!0,themeLinks:[],enabledThemes:[],enableReactDevtools:!1,frameless:!1,transparent:!1,winCtrlQ:!1,macosTranslucency:!1,disableMinSize:!1,winNativeTitleBar:!1,plugins:{},notifications:{timeout:5e3,position:"bottom-right",useNative:"not-focused",logLimit:50},cloud:{authenticated:!1,url:"https://api.vencord.dev/",settingsSync:!1,settingsSyncVersion:0}};try{Lo=JSON.parse(VencordNative.settings.get()),mr(Lo,ny)}catch(e){Lo=mr({},ny),ry.error(`An error occurred while loading the settings. Corrupt settings file?
|
|
`,e)}Kw=hn(async()=>{E.cloud.settingsSync&&E.cloud.authenticated&&(await Yr(),delete fr.Vencord_settingsDirty)},6e4),Pa=new Set,oy={};qn=Lo,E=au(Lo)});var iy=g(()=>{});var sy=g(()=>{});var uu={};Be(uu,{UpdateLogger:()=>yr,changes:()=>Eo,checkForUpdates:()=>Xr,getRepo:()=>cu,isNewer:()=>Yi,isOutdated:()=>Do,maybePromptToUpdate:()=>Zi,update:()=>Jr,updateError:()=>Zr});async function Ia(e){let t=await e;if(t.ok)return t.value;throw Zr=t.error,t.error}async function Xr(){return Eo=await Ia(VencordNative.updater.getUpdates()),Eo.some(e=>e.hash===an)?(Yi=!0,Do=!1):Do=Eo.length>0}async function Jr(){if(!Do)return!0;let e=await Ia(VencordNative.updater.update());if(e&&(Do=!1,!await Ia(VencordNative.updater.rebuild())))throw new Error("The Build failed. Please try manually building the new update");return e}async function Zi(e,t=!1){try{if(await Xr()){let r=confirm(e);if(r&&Yi)return alert("Your local copy has more recent commits. Please stash or reset them.");r&&(await Jr(),cn())}}catch(n){yr.error(n),alert("That also failed :( Try updating or re-installing with the installer!")}}var yr,Do,Yi,Zr,Eo,cu,vr=g(()=>{"use strict";a();Gr();Ze();Ro();yr=new ie("Updater","white"),Do=!1,Yi=!1;cu=()=>Ia(VencordNative.updater.getRepo())});function ay(){Zi("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 ly=g(()=>{"use strict";a();vr()});function pu(e){let t=!1,n;return function(){return t?n:(t=!0,n=e.apply(this,arguments))}}var du=g(()=>{"use strict";a()});function yn({title:e,children:t}){return o(S.FormSection,null,o(re,{variant:"heading-lg/semibold",tag:"h2",className:q.bottom16},e),t)}function vn(e,t){return _.wrap(e,{message:`Failed to render the ${t} tab. If this issue persists, try using the installer to reinstall!`,onError:Zw})}var Zw,Oo=g(()=>{"use strict";a();iy();sy();le();ly();it();du();I();Zw=pu(ay)});var dy={};Be(dy,{default:()=>Vw});function Xw(){let[e,,t]=nt(VencordNative.settings.getSettingsDir,{fallbackValue:"Loading..."}),n=lt(),r=O.useMemo(()=>Math.random()>.5?uy:py,[]),i=navigator.platform.toLowerCase().startsWith("win"),s=navigator.platform.toLowerCase().startsWith("mac"),l=[{key:"useQuickCss",title:"Enable Custom CSS",note:"Loads your Custom CSS"},{key:"enableReactDevtools",title:"Enable React Developer Tools",note:"Requires a full restart"},{key:"frameless",title:"Disable the window frame",note:"Requires a full restart"},!1,i&&{key:"winCtrlQ",title:"Register Ctrl+Q as shortcut to close Discord (Alternative to Alt+F4)",note:"Requires a full restart"},!1,!1];return o(yn,{title:"Vencord Settings"},o(Qw,{image:r}),o(S.FormSection,{title:"Quick Actions"},o(xt,{className:cy("quick-actions-card")},o(O.Fragment,null,o(R,{onClick:cn,size:R.Sizes.SMALL},"Restart Client"),o(R,{onClick:()=>VencordNative.quickCss.openEditor(),size:R.Sizes.SMALL,disabled:e==="Loading..."},"Open QuickCSS File"),o(R,{onClick:()=>ba(e),size:R.Sizes.SMALL,disabled:t},"Open Settings Folder"),o(R,{onClick:()=>VencordNative.native.openExternal("https://github.com/Vendicated/Vencord"),size:R.Sizes.SMALL,disabled:t},"Open in GitHub")))),o(S.FormDivider,null),o(S.FormSection,{className:q.top16,title:"Settings",tag:"h5"},o(S.FormText,{className:q.bottom20},'Hint: You can change the position of this settings section in the settings of the "Settings" plugin!'),l.map(c=>c&&o(ut,{key:c.key,value:n[c.key],onChange:u=>n[c.key]=u,note:c.note},c.title))),typeof Notification<"u"&&o(Jw,{settings:n.notifications}))}function Jw({settings:e}){return o(f,null,o(S.FormTitle,{tag:"h5"},"Notification Style"),e.useNative!=="never"&&Notification?.permission==="denied"&&o(gn,{style:{padding:"1em"},className:q.bottom8},o(S.FormTitle,{tag:"h5"},"Desktop Notification Permission denied"),o(S.FormText,null,"You have denied Notification Permissions. Thus, Desktop notifications will not work!")),o(S.FormText,{className:q.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(wn,{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:ia}),o(S.FormTitle,{tag:"h5",className:q.top16+" "+q.bottom8},"Notification Position"),o(wn,{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:ia}),o(S.FormTitle,{tag:"h5",className:q.top16+" "+q.bottom8},"Notification Timeout"),o(S.FormText,{className:q.bottom16},"Set to 0s to never automatically time out"),o(sr,{disabled:e.useNative==="always",markers:[0,1e3,2500,5e3,1e4,2e4],minValue:0,maxValue:2e4,initialValue:e.timeout,onValueChange:t=>e.timeout=t,onValueRender:t=>(t/1e3).toFixed(2)+"s",onMarkerRender:t=>t/1e3+"s",stickToMarkers:!1}),o(S.FormTitle,{tag:"h5",className:q.top16+" "+q.bottom8},"Notification Log Limit"),o(S.FormText,{className:q.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(sr,{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(R,{onClick:fa,disabled:e.logLimit===0},"Open Notification Log"))}function Qw({image:e}){return o(xt,{className:cy("card","donate")},o("div",null,o(S.FormTitle,{tag:"h5"},"Support the Project"),o(S.FormText,null,"Please consider supporting the development of Vencord by donating!"),o(Bi,{style:{transform:"translateX(-1em)"}})),o("img",{role:"presentation",src:e,alt:"",height:128,style:{imageRendering:e===py?"pixelated":void 0,marginLeft:"auto",transform:e===uy?"rotate(10deg)":void 0}}))}var cy,uy,py,Vw,my=g(()=>{"use strict";a();ga();U();Je();xc();zr();it();Re();Ro();st();I();Oo();cy=Ue("vc-settings-"),uy="https://cdn.discordapp.com/emojis/1026533090627174460.png",py="https://media.discordapp.net/stickers/1039992459209490513.png";Vw=vn(Xw,"Vencord Settings")});var fy=g(()=>{});var hu={};Be(hu,{currentNotice:()=>Xi,nextNotice:()=>gy,noticesQueue:()=>fu,popNotice:()=>gu,showNotice:()=>Ji});function gu(){mu.dismiss()}function gy(){Xi=fu.shift(),Xi&&mu.show(...Xi,"VencordNotice")}function Ji(e,t,n){fu.push(["GENERIC",e,t,n]),Xi||gy()}var mu,fu,Xi,Aa=g(()=>{"use strict";a();j();ct(e=>e.show&&e.dismiss&&!e.suppressAll,e=>mu=e);fu=[],Xi=null});var hy=g(()=>{});function un({height:e=24,width:t=24,className:n,children:r,viewBox:i,...s}){return o("svg",{className:oe(n,"vc-icon"),role:"img",width:t,height:e,viewBox:i,...s},r)}function Qr({height:e=24,width:t=24,className:n}){return o(un,{height:e,width:t,className:oe(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 yy(e){return o(un,{...e,className:oe(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 Qi(e){return o(un,{...e,className:oe(e.className,"vc-open-external-icon"),viewBox:"0 0 24 24"},o("polygon",{fill:"currentColor",fillRule:"nonzero",points:"13 20 11 20 11 8 5.5 13.5 4.08 12.08 12 4.16 19.92 12.08 18.5 13.5 13 8"}))}function Sr(e){return o(un,{...e,className:oe(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 Ca(e){return o(un,{...e,className:oe(e.className,"vc-info-icon"),viewBox:"0 0 24 24"},o("path",{fill:"currentColor",transform:"translate(2 2)",d:"M9,7 L11,7 L11,5 L9,5 L9,7 Z M10,18 C5.59,18 2,14.41 2,10 C2,5.59 5.59,2 10,2 C14.41,2 18,5.59 18,10 C18,14.41 14.41,18 10,18 L10,18 Z M10,4.4408921e-16 C4.4771525,-1.77635684e-15 4.4408921e-16,4.4771525 0,10 C-1.33226763e-15,12.6521649 1.0535684,15.195704 2.92893219,17.0710678 C4.80429597,18.9464316 7.3478351,20 10,20 C12.6521649,20 15.195704,18.9464316 17.0710678,17.0710678 C18.9464316,15.195704 20,12.6521649 20,10 C20,7.3478351 18.9464316,4.80429597 17.0710678,2.92893219 C15.195704,1.0535684 12.6521649,2.22044605e-16 10,0 L10,4.4408921e-16 Z M9,15 L11,15 L11,9 L9,9 L9,15 L9,15 Z"}))}function vy(e){return o(un,{"aria-label":tt.Messages.GUILD_OWNER,...e,className:oe(e.className,"vc-owner-crown-icon"),role:"img",viewBox:"0 0 16 16"},o("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M13.6572 5.42868C13.8879 5.29002 14.1806 5.30402 14.3973 5.46468C14.6133 5.62602 14.7119 5.90068 14.6473 6.16202L13.3139 11.4954C13.2393 11.7927 12.9726 12.0007 12.6666 12.0007H3.33325C3.02725 12.0007 2.76058 11.792 2.68592 11.4954L1.35258 6.16202C1.28792 5.90068 1.38658 5.62602 1.60258 5.46468C1.81992 5.30468 2.11192 5.29068 2.34325 5.42868L5.13192 7.10202L7.44592 3.63068C7.46173 3.60697 7.48377 3.5913 7.50588 3.57559C7.5192 3.56612 7.53255 3.55663 7.54458 3.54535L6.90258 2.90268C6.77325 2.77335 6.77325 2.56068 6.90258 2.43135L7.76458 1.56935C7.89392 1.44002 8.10658 1.44002 8.23592 1.56935L9.09792 2.43135C9.22725 2.56068 9.22725 2.77335 9.09792 2.90268L8.45592 3.54535C8.46794 3.55686 8.48154 3.56651 8.49516 3.57618C8.51703 3.5917 8.53897 3.60727 8.55458 3.63068L10.8686 7.10202L13.6572 5.42868ZM2.66667 12.6673H13.3333V14.0007H2.66667V12.6673Z"}))}function Sy(e){return o(un,{...e,className:oe(e.className,"vc-screenshare-icon"),viewBox:"0 0 24 24"},o("path",{fill:"currentColor",d:"M2 4.5C2 3.397 2.897 2.5 4 2.5H20C21.103 2.5 22 3.397 22 4.5V15.5C22 16.604 21.103 17.5 20 17.5H13V19.5H17V21.5H7V19.5H11V17.5H4C2.897 17.5 2 16.604 2 15.5V4.5ZM13.2 14.3375V11.6C9.864 11.6 7.668 12.6625 6 15C6.672 11.6625 8.532 8.3375 13.2 7.6625V5L18 9.6625L13.2 14.3375Z"}))}function Na(e){return o(un,{...e,className:oe(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 ka(e){return o(un,{...e,className:oe(e.className,"vc-image-invisible"),viewBox:"0 0 24 24"},o("path",{fill:"currentColor",d:"m21 18.15-2-2V5H7.85l-2-2H19q.825 0 1.413.587Q21 4.175 21 5Zm-1.2 4.45L18.2 21H5q-.825 0-1.413-.587Q3 19.825 3 19V5.8L1.4 4.2l1.4-1.4 18.4 18.4ZM6 17l3-4 2.25 3 .825-1.1L5 7.825V19h11.175l-2-2Zm7.425-6.425ZM10.6 13.4Z"}))}function by(e){return o(un,{...e,className:oe(e.className,"vc-microphone"),viewBox:"0 0 24 24"},o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.99 11C14.99 12.66 13.66 14 12 14C10.34 14 9 12.66 9 11V5C9 3.34 10.34 2 12 2C13.66 2 15 3.34 15 5L14.99 11ZM12 16.1C14.76 16.1 17.3 14 17.3 11H19C19 14.42 16.28 17.24 13 17.72V21H11V17.72C7.72 17.23 5 14.41 5 11H6.7C6.7 14 9.24 16.1 12 16.1ZM12 4C11.2 4 11 4.66667 11 5V11C11 11.3333 11.2 12 12 12C12.8 12 13 11.3333 13 11V5C13 4.66667 12.8 4 12 4Z",fill:"currentColor"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.99 11C14.99 12.66 13.66 14 12 14C10.34 14 9 12.66 9 11V5C9 3.34 10.34 2 12 2C13.66 2 15 3.34 15 5L14.99 11ZM12 16.1C14.76 16.1 17.3 14 17.3 11H19C19 14.42 16.28 17.24 13 17.72V22H11V17.72C7.72 17.23 5 14.41 5 11H6.7C6.7 14 9.24 16.1 12 16.1Z",fill:"currentColor"}))}function Ty(e){return o(un,{...e,className:oe(e.className,"vc-cog-wheel"),viewBox:"0 0 24 24"},o("path",{clipRule:"evenodd",fill:"currentColor",d:"M19.738 10H22V14H19.739C19.498 14.931 19.1 15.798 18.565 16.564L20 18L18 20L16.565 18.564C15.797 19.099 14.932 19.498 14 19.738V22H10V19.738C9.069 19.498 8.203 19.099 7.436 18.564L6 20L4 18L5.436 16.564C4.901 15.799 4.502 14.932 4.262 14H2V10H4.262C4.502 9.068 4.9 8.202 5.436 7.436L4 6L6 4L7.436 5.436C8.202 4.9 9.068 4.502 10 4.262V2H14V4.261C14.932 4.502 15.797 4.9 16.565 5.435L18 3.999L20 5.999L18.564 7.436C19.099 8.202 19.498 9.069 19.738 10ZM12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16Z"}))}function yu(e){return o(un,{...e,className:oe(e.className,"vc-reply-icon"),viewBox:"0 0 24 24"},o("path",{fill:"currentColor",d:"M10 8.26667V4L3 11.4667L10 18.9333V14.56C15 14.56 18.5 16.2667 21 20C20 14.6667 17 9.33333 10 8.26667Z"}))}function xy(e){return o(un,{...e,className:oe(e.className,"vc-delete-icon"),viewBox:"0 0 24 24"},o("path",{fill:"currentColor",d:"M15 3.999V2H9V3.999H3V5.999H21V3.999H15Z"}),o("path",{fill:"currentColor",d:"M5 6.99902V18.999C5 20.101 5.897 20.999 7 20.999H17C18.103 20.999 19 20.101 19 18.999V6.99902H5ZM11 17H9V11H11V17ZM15 17H13V11H15V17Z"}))}var Ut=g(()=>{"use strict";a();hy();Re();I()});function wy(e,t,n){return n===!1?t?e.slice(0,-1):e:e[0]}function Vi(e,t,n=!1){let r=dn.duration(e,t),i=aM.map(u=>({amount:r[u](),unit:u})),s=0;e:for(let u=0;u<i.length;u++)if(!(i[u].amount===0||!(u+1<i.length))){for(let d=u+1;d<i.length;d++)if(i[d].amount!==0)continue e;s=i.length-(u+1)}i=s===0?i:i.slice(0,-s);let l=i.findIndex(({unit:u})=>u==="days");if(l!==-1){let u=i[l],d=u.amount%7;d===0?i.splice(l,1):u.amount=d}let c="";for(;i.length;){let{amount:u,unit:d}=i.shift();c.length&&(c+=i.length?", ":" and "),(u>0||c.length)&&(c+=`${u} ${wy(d,u===1,n)}`)}return c.length?c:`0 ${wy(t,!1,n)}`}function lM(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;i<n;i++)r+=t(e[i]),n-i>2?r+=", ":n-i>1&&(r+=" and ");return r}function es(e,t){let n="```";return`${n}${t||""}
|
|
${e.replaceAll("```","\\`\\`\\`")}
|
|
${n}`}var vu,eM,tM,Su,nM,oM,rM,iM,sM,oo,aM,ro=g(()=>{"use strict";a();I();vu=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),eM=e=>e.toLowerCase().split("_"),tM=e=>e.toLowerCase().split("-"),Su=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),nM=e=>e.toLowerCase().split(" "),oM=e=>e.map((t,n)=>n?t[0].toUpperCase()+t.slice(1):t).join(""),rM=e=>e.join("_").toUpperCase(),iM=e=>e.join("-").toLowerCase(),sM=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(""),oo=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(" "),aM=["years","months","weeks","days","hours","minutes","seconds"]});function ts(){return`-${Hn.fromTimestamp(Date.now())}`}function ue(e,t){let n=cM.createBotMessage({channelId:e,content:"",embeds:[]});return uM.receiveMessage(e,mr(t,n)),t}function ot(e,t,n){return e.find(r=>r.name===t)?.value||n}var cM,uM,bu=g(()=>{"use strict";a();Re();j();I();cM=A("createBotMessage"),uM=A("receiveMessage")});var io,Ln,Tu,Ra=g(()=>{"use strict";a();io=(h=>(h[h.SUB_COMMAND=1]="SUB_COMMAND",h[h.SUB_COMMAND_GROUP=2]="SUB_COMMAND_GROUP",h[h.STRING=3]="STRING",h[h.INTEGER=4]="INTEGER",h[h.BOOLEAN=5]="BOOLEAN",h[h.USER=6]="USER",h[h.CHANNEL=7]="CHANNEL",h[h.ROLE=8]="ROLE",h[h.MENTIONABLE=9]="MENTIONABLE",h[h.NUMBER=10]="NUMBER",h[h.ATTACHMENT=11]="ATTACHMENT",h))(io||{}),Ln=(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))(Ln||{}),Tu=(r=>(r[r.CHAT_INPUT=1]="CHAT_INPUT",r[r.USER=2]="USER",r[r.MESSAGE=3]="MESSAGE",r))(Tu||{})});var Mu={};Be(Mu,{ApplicationCommandInputType:()=>Ln,ApplicationCommandOptionType:()=>io,ApplicationCommandType:()=>Tu,BUILT_IN:()=>_o,OptionalMessageOption:()=>Bo,RequiredMessageOption:()=>ns,_handleCommand:()=>dM,_init:()=>pM,commands:()=>xu,findOption:()=>ot,generateId:()=>ts,prepareOption:()=>wu,registerCommand:()=>Vr,sendBotMessage:()=>ue,unregisterCommand:()=>os});function wu(e){return e.displayName||=e.name,e.displayDescription||=e.description,e.options?.forEach((t,n,r)=>{t===My?r[n]=Bo:t===Py&&(r[n]=ns),t.choices?.forEach(i=>i.displayName||=i.name),wu(r[n])}),e}function mM(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};Vr(r,t)})}function Vr(e,t){if(!_o){console.warn("[CommandsAPI]",`Not registering ${e.name} as the CommandsAPI hasn't been initialised.`,"Please restart to use commands");return}if(_o.some(n=>n.name===e.name))throw new Error(`Command '${e.name}' already exists.`);if(e.isVencordCommand=!0,e.id??=`-${_o.length+1}`,e.applicationId??="-1",e.type??=1,e.inputType??=1,e.plugin||=t,wu(e),e.options?.[0]?.type===1){mM(e,t);return}xu[e.name]=e,_o.push(e)}function os(e){let t=_o.findIndex(n=>n.name===e);return t===-1?!1:(_o.splice(t,1),delete xu[e],!0)}var _o,xu,My,Py,Bo,ns,pM,dM,Jt=g(()=>{"use strict";a();ro();bu();Ra();bu();Ra();xu={},My=Symbol("OptionalMessageOption"),Py=Symbol("RequiredMessageOption"),Bo=My,ns=Py,pM=function(e){try{_o=e,Bo=e.find(t=>t.name==="shrug").options[0],ns=e.find(t=>t.name==="me").options[0]}catch{console.error("Failed to load CommandsApi")}return e},dM=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),ue(n.channel.id,{content:`${s}:
|
|
${es(l)}`,author:{username:"Vencord"}})};try{let i=e.execute(t,n);return i instanceof Promise?i.catch(r):i}catch(i){return r(i)}}});function Iy({text:e,color:t}){return o("div",{className:"vc-plugins-badge",style:{backgroundColor:t,justifySelf:"flex-end",marginLeft:"auto"}},e)}var Pu=g(()=>{"use strict";a()});function Ay({option:e,pluginSettings:t,definedSettings:n,id:r,onChange:i,onError:s}){let l=t[r]??e.default,[c,u]=O.useState(l??!1),[d,m]=O.useState(null);O.useEffect(()=>{s(d!==null)},[d]);function h(v){let T=e.isValid?.call(n,v)??!0;typeof T=="string"?m(T):T?(m(null),u(v),i(v)):m("Invalid input provided.")}return o(S.FormSection,null,o(ut,{value:c,onChange:h,note:e.description,disabled:e.disabled?.call(n)??!1,...e.componentProps,hideBorder:!0,style:{marginBottom:"0.5em"}},oo(vu(r))),d&&o(S.FormText,{style:{color:"var(--text-danger)"}},d))}var Cy=g(()=>{"use strict";a();ro();I()});function Ny({option:e,onChange:t,onError:n}){return e.component({setValue:t,setError:n,option:e})}var ky=g(()=>{"use strict";a()});function Iu({option:e,pluginSettings:t,definedSettings:n,id:r,onChange:i,onError:s}){function l(v){return e.type===2?BigInt(v):Number(v)}let[c,u]=O.useState(`${t[r]??e.default??0}`),[d,m]=O.useState(null);O.useEffect(()=>{s(d!==null)},[d]);function h(v){let T=e.isValid?.call(n,v)??!0;m(null),typeof T=="string"?m(T):T||m("Invalid input provided."),e.type===1&&BigInt(v)>=fM?(u(`${Number.MAX_SAFE_INTEGER}`),i(l(v))):(u(v),i(l(v)))}return o(S.FormSection,null,o(S.FormTitle,null,e.description),o(Qe,{type:"number",pattern:"-?[0-9]+",value:c,onChange:h,placeholder:e.placeholder??"Enter a number",disabled:e.disabled?.call(n)??!1,...e.componentProps}),d&&o(S.FormText,{style:{color:"var(--text-danger)"}},d))}var fM,Ry=g(()=>{"use strict";a();w();I();fM=BigInt(Number.MAX_SAFE_INTEGER)});function Ly({option:e,pluginSettings:t,definedSettings:n,onChange:r,onError:i,id:s}){let l=t[s]??e.options?.find(v=>v.default)?.value,[c,u]=O.useState(l??null),[d,m]=O.useState(null);O.useEffect(()=>{i(d!==null)},[d]);function h(v){let T=e.isValid?.call(n,v)??!0;typeof T=="string"?m(T):T?(m(null),u(v),r(v)):m("Invalid input provided.")}return o(S.FormSection,null,o(S.FormTitle,null,e.description),o(wn,{isDisabled:e.disabled?.call(n)??!1,options:e.options,placeholder:e.placeholder??"Select an option",maxVisibleItems:5,closeOnSelect:!0,select:h,isSelected:v=>v===c,serialize:v=>String(v),...e.componentProps}),d&&o(S.FormText,{style:{color:"var(--text-danger)"}},d))}var Ey=g(()=>{"use strict";a();I()});function Fo(e,t,n=1){let r=[];for(let i=e;i<=t;i+=n)r.push(Math.round(i*100)/100);return r}function Dy({option:e,pluginSettings:t,definedSettings:n,id:r,onChange:i,onError:s}){let l=t[r]??e.default,[c,u]=O.useState(null);O.useEffect(()=>{s(c!==null)},[c]);function d(m){let h=e.isValid?.call(n,m)??!0;typeof h=="string"?u(h):h?(u(null),i(m)):u("Invalid input provided.")}return o(S.FormSection,null,o(S.FormTitle,null,e.description),o(sr,{disabled:e.disabled?.call(n)??!1,markers:e.markers,minValue:e.markers[0],maxValue:e.markers[e.markers.length-1],initialValue:l,onValueChange:d,onValueRender:m=>String(m.toFixed(2)),stickToMarkers:e.stickToMarkers??!0,...e.componentProps}))}var Au=g(()=>{"use strict";a();I()});function Oy({option:e,pluginSettings:t,definedSettings:n,id:r,onChange:i,onError:s}){let[l,c]=O.useState(t[r]??e.default??null),[u,d]=O.useState(null);O.useEffect(()=>{s(u!==null)},[u]);function m(h){let v=e.isValid?.call(n,h)??!0;d(typeof v=="string"?v:v?null:"Invalid input provided."),c(h),i(h)}return o(S.FormSection,null,o(S.FormTitle,null,e.description),o(Qe,{type:"text",value:l,onChange:m,placeholder:e.placeholder??"Enter a value",disabled:e.disabled?.call(n)??!1,...e.componentProps}),u&&o(S.FormText,{style:{color:"var(--text-danger)"}},u))}var _y=g(()=>{"use strict";a();I()});var La=g(()=>{"use strict";a();Pu();Cy();ky();Ry();Ey();Au();_y()});var By=g(()=>{});function ei(){return Q.getChannel(Pe.getChannelId())}function Cu(){return Te.getGuild(ei()?.guild_id)}function yM(e){fc.openPrivateChannel(e)}function Uo(){return ki.PreloadedUserSettingsActionCreators.getCurrentValue()?.appearance?.theme}function so(e){wo.dispatchToLastSubscribed("INSERT_TEXT",{rawText:e,plainText:e})}function vM(e,t,n,r){let i={content:"",invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};return gM.sendMessage(e,i,n,r)}function En(e,t){return je(n=>o(ze,{...n,className:Qs.modal,size:"dynamic"},o(wc,{className:Qs.image,original:e,placeholder:e,src:e,renderLinkComponent:r=>o(Br,{...r}),shouldHideMediaOptions:!1,shouldAnimate:!0,...t})))}async function Dn(e){if(!await kt.getUser(e))throw new Error("No such user: "+e);let n=rn.getGuildId();hM.openUserProfileModal({userId:e,guildId:n,channelId:Pe.getChannelId(),analyticsLocation:{page:n?"Guild Channel":"DM Channel",section:"Profile Popout"}})}async function Nu(e,t){let n=on.getUserProfile(e);if(n)return n;F.dispatch({type:"USER_PROFILE_FETCH_START",userId:e});let{body:r}=await wt.get({url:`/users/${e}/profile`,query:{with_mutual_guilds:!1,with_mutual_friends_count:!1,...t},oldFormErrors:!0});return F.dispatch({type:"USER_UPDATE",user:r.user}),await F.dispatch({type:"USER_PROFILE_FETCH_SUCCESS",...r}),t?.guild_id&&r.guild_member&&F.dispatch({type:"GUILD_MEMBER_PROFILE_UPDATE",guildId:t.guild_id,guildMember:r.guild_member}),on.getUserProfile(e)}function ao(e){return e.discriminator==="0"?e.username:e.tag}var gM,hM,rs,St=g(()=>{"use strict";a();j();I();pt();gM=A("editMessage","sendMessage"),hM=A("openUserProfileModal","closeUserProfileModal");rs=(n=>(n[n.Dark=1]="Dark",n[n.Light=2]="Light",n))(rs||{})});function Fy(e){je(t=>o(ze,{...t},o(_,null,o(Ve,{className:ti("root")},o(PM,{user:e})))))}function wM(){let e=Uo()===2?TM:xM;return o("img",{src:e,alt:"GitHub"})}function MM(){let e=Uo()===2?bM:SM;return o("img",{src:e,alt:"Website"})}function PM({user:e}){lt();let t=He([on],()=>on.getUserProfile(e.id));De(()=>{!t&&!e.bot&&e.id&&Nu(e.id)},[e.id]);let n=t?.connectedAccounts?.find(s=>s.type==="github")?.name,r=t?.connectedAccounts?.find(s=>s.type==="domain")?.name,i=At(()=>{let s=Object.values(Oe);return(Hr[e.id]?s.filter(c=>c.authors.includes(Hr[e.id])):s.filter(c=>c.authors.some(u=>u.name===e.username))).filter(c=>!c.name.endsWith("API")).sort((c,u)=>Number(c.required??!1)-Number(u.required??!1))},[e.id,e.username]);return o(f,null,o("div",{className:ti("header")},o("img",{className:ti("avatar"),src:e.getAvatarURL(void 0,512,!0),alt:""}),o(S.FormTitle,{tag:"h2",className:ti("name")},e.username),o("div",{className:ti("links")},r&&o(Br,{href:"https://"+r},o(MM,null)),n&&o(Br,{href:`https://github.com/${n}`},o(wM,null)))),o("div",{className:ti("plugins")},i.map(s=>o(Ea,{key:s.name,plugin:s,disabled:s.required??!1,onRestartNeeded:()=>mn("Restart to apply changes!")}))))}var SM,bM,TM,xM,ti,Uy=g(()=>{"use strict";a();By();U();Je();le();M();St();pt();I();hr();ku();SM="/assets/e1e96d89e192de1997f73730db26e94f.svg",bM="/assets/730f58bcfd5a57a5e22460c445a0c6cf.svg",TM="/assets/3ff98ad75ac94fa883af5ed62d17c459.svg",xM="/assets/6a853b4c87fce386cbfef4a2efbacb09.svg",ti=Ue("vc-author-modal-")});function $y(e){let t=new AM({username:e.username,id:e.id??ts(),avatar:e.avatar,bot:!0});return F.dispatch({type:"USER_UPDATE",user:t}),t}function Lu({plugin:e,onRestartNeeded:t,onClose:n,transitionState:r}){let[i,s]=O.useState([]),l=lt().plugins[e.name],[c,u]=O.useState({}),[d,m]=O.useState({}),[h,v]=O.useState(null),T=()=>Object.values(d).every(k=>!k),P=Boolean(l&&e.options&&!Di(e.options));O.useEffect(()=>{(async()=>{for(let k of e.authors.slice(0,6)){let B=k.id?await kt.getUser(`${k.id}`).catch(()=>$y({username:k.name})):$y({username:k.name});s($=>[...$,B])}})()},[]);async function b(){if(!e.options){n();return}if(e.beforeSave){let B=await Promise.resolve(e.beforeSave(c));if(B!==!0){v(B);return}}let k=!1;for(let[B,$]of Object.entries(c)){let Y=e.options[B];l[B]=$,Y?.onChange?.($),Y?.restartNeeded&&(k=!0)}k&&t(),n()}function x(){if(!P||!e.options)return o(S.FormText,null,"There are no settings for this plugin.");{let k=Object.entries(e.options).map(([B,$])=>{if($.hidden)return null;function Y(L){u(X=>({...X,[B]:L}))}function K(L){m(X=>({...X,[B]:L}))}let z=CM[$.type];return o(z,{id:B,key:B,option:$,onChange:Y,onError:K,pluginSettings:l,definedSettings:e.settings})});return o(ge,{flexDirection:"column",style:{gap:12,marginBottom:16}},k)}}function C(k,B){let $=e.authors.length-B,Y=e.authors.length-$,K=Y+e.authors.length-B;return o(V,{text:e.authors.slice(Y,K).map(z=>z.name).join(", ")},({onMouseEnter:z,onMouseLeave:L})=>o("div",{className:Ru.moreUsers,onMouseEnter:z,onMouseLeave:L},"+",$))}return o(ze,{transitionState:r,size:"medium",className:"vc-text-selectable"},o(at,{separator:!1},o(re,{variant:"heading-lg/semibold",style:{flexGrow:1}},e.name),o(ln,{onClick:n})),o(Ve,null,o(S.FormSection,null,o(S.FormTitle,{tag:"h3"},"About ",e.name),o(S.FormText,null,e.description),o(S.FormTitle,{tag:"h3",style:{marginTop:8,marginBottom:0}},"Authors"),o("div",{style:{width:"fit-content",marginBottom:8}},o(IM,{users:i,count:e.authors.length,guildId:void 0,renderIcon:!1,max:6,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:C,renderUser:k=>o(Or,{className:Ru.clickableAvatar,onClick:()=>Fy(k)},o("img",{className:Ru.avatar,src:k.getAvatarURL(void 0,80,!0),alt:k.username,title:k.username}))}))),!!e.settingsAboutComponent&&o("div",{className:oe(q.bottom8,"vc-text-selectable")},o(S.FormSection,null,o(_,{message:"An error occurred while rendering this plugin's custom InfoComponent"},o(e.settingsAboutComponent,{tempSettings:c})))),o(S.FormSection,{className:q.bottom16},o(S.FormTitle,{tag:"h3"},"Settings"),x())),P&&o(Ot,null,o(ge,{flexDirection:"column",style:{width:"100%"}},o(ge,{style:{marginLeft:"auto"}},o(R,{onClick:n,size:R.Sizes.SMALL,color:R.Colors.PRIMARY,look:R.Looks.LINK},"Cancel"),o(V,{text:"You must fix all errors before saving",shouldShow:!T()},({onMouseEnter:k,onMouseLeave:B})=>o(R,{size:R.Sizes.SMALL,color:R.Colors.BRAND,onClick:b,onMouseEnter:k,onMouseLeave:B,disabled:!T()},"Save & Close"))),h&&o(re,{variant:"text-md/semibold",style:{color:"var(--text-danger)"}},"Error while saving: ",h))))}var IM,Ru,AM,CM,Gy=g(()=>{"use strict";a();Jt();U();le();Rt();rr();it();Re();pt();w();j();I();La();Uy();IM=Xe("defaultRenderUser","showDefaultAvatarsForNullUsers"),Ru=A("moreUsers","emptyUser","avatarContainer","clickableAvatar"),AM=Fn(()=>W.getCurrentUser().constructor);CM={[0]:Oy,[1]:Iu,[2]:Iu,[3]:Ay,[4]:Ly,[5]:Dy,[6]:Ny}});var Hy=g(()=>{});var zy=g(()=>{});function jy({checked:e,onChange:t,disabled:n}){return o("div",null,o("div",{className:oe(Da.container,"default-colors",e?Da.checked:void 0),style:{backgroundColor:e?Eu:Du,opacity:n?.3:1}},o("svg",{className:Da.slider+" vc-switch-slider",viewBox:"0 0 28 20",preserveAspectRatio:"xMinYMid meet","aria-hidden":"true",style:{transform:e?"translateX(12px)":"translateX(-3px)"}},o("rect",{fill:"white",x:"4",y:"0",height:"20",width:"20",rx:"10"}),o("svg",{viewBox:"0 0 20 20",fill:"none"},e?o(f,null,o("path",{fill:Eu,d:"M7.89561 14.8538L6.30462 13.2629L14.3099 5.25755L15.9009 6.84854L7.89561 14.8538Z"}),o("path",{fill:Eu,d:"M4.08643 11.0903L5.67742 9.49929L9.4485 13.2704L7.85751 14.8614L4.08643 11.0903Z"})):o(f,null,o("path",{fill:Du,d:"M5.13231 6.72963L6.7233 5.13864L14.855 13.2704L13.264 14.8614L5.13231 6.72963Z"}),o("path",{fill:Du,d:"M13.2704 5.13864L14.8614 6.72963L6.72963 14.8614L5.13864 13.2704L13.2704 5.13864Z"})))),o("input",{disabled:n,type:"checkbox",className:Da.input,tabIndex:0,checked:e,onChange:r=>t(r.currentTarget.checked)})))}var Eu,Du,Da,Wy=g(()=>{"use strict";a();zy();Re();j();Eu="var(--green-360)",Du="var(--primary-400)",Da=A("slider","input","container")});function Oa({disabled:e,isNew:t,name:n,infoButton:r,footer:i,author:s,enabled:l,setEnabled:c,description:u,onMouseEnter:d,onMouseLeave:m}){return o("div",{className:ni("card",{"card-disabled":e}),onMouseEnter:d,onMouseLeave:m},o("div",{className:ni("header")},o("div",{className:ni("name-author")},o(re,{variant:"text-md/bold",className:ni("name")},n,t&&o(Iy,{text:"NEW",color:"#ED4245"})),!!s&&o(re,{variant:"text-md/normal",className:ni("author")},s)),r,o(jy,{checked:l,onChange:c,disabled:e})),o(re,{className:ni("note"),variant:"text-sm/normal"},u),i)}var ni,Ou=g(()=>{"use strict";a();Hy();Je();Pu();Wy();I();ni=Ue("vc-addon-")});var is,_u=g(()=>{"use strict";a();is=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 $u={};Be($u,{PMLogger:()=>NM,isPluginEnabled:()=>Fu,patches:()=>Ky,plugins:()=>kM,startAllPlugins:()=>ss,startDependenciesRecursive:()=>_a,startPlugin:()=>as,stopPlugin:()=>Uu});function Fu(e){return(Oe[e]?.required||Oe[e]?.isDependency||Bu[e]?.enabled)??!1}function _a(e){let t=!1,n=[];return e.dependencies?.forEach(r=>{if(!E.plugins[r].enabled){if(_a(Oe[r]),E.plugins[r].enabled=!0,Oe[r].patches){Qt.warn(`Enabling dependency ${r} requires restart.`),t=!0;return}as(Oe[r])||n.push(r)}}),{restartNeeded:t,failures:n}}var Qt,NM,kM,Ky,Bu,Yy,ss,as,Uu,Ba=g(()=>{"use strict";a();Jt();U();Ze();w();I();hr();Ys();Qt=new ie("PluginManager","#a6d189"),NM=Qt,kM=Oe,Ky=[],Bu=E.plugins;Yy=Object.values(Oe);for(let e of Yy)Bu[e.name]?.enabled&&e.dependencies?.forEach(t=>{let n=Oe[t];if(n)Bu[t].enabled=!0,n.isDependency=!0;else{let r=new Error(`Plugin ${e.name} has unresolved dependency ${t}`);Qt.warn(r)}});for(let e of Yy){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&&Fu(e.name))for(let t of e.patches)t.plugin=e.name,Array.isArray(t.replacement)||(t.replacement=[t.replacement]),Ky.push(t)}ss=Un("startAllPlugins",function(t){Qt.info(`Starting plugins (stage ${t})`);for(let n in Oe)if(Fu(n)){if((Oe[n].startAt??"WebpackReady")!==t)continue;as(Oe[n])}});as=Un("startPlugin",function(t){let{name:n,commands:r,flux:i}=t;if(t.start){if(Qt.info("Starting plugin",n),t.started)return Qt.warn(`${n} already started`),!1;try{t.start(),t.started=!0}catch(s){return Qt.error(`Failed to start ${n}
|
|
`,s),!1}}if(r?.length){Qt.info("Registering commands of plugin",n);for(let s of r)try{Vr(s,n)}catch(l){return Qt.error(`Failed to register command ${s.name}
|
|
`,l),!1}}if(i)for(let s in i)F.subscribe(s,i[s]);return!0},e=>`startPlugin ${e.name}`),Uu=Un("stopPlugin",function(t){let{name:n,commands:r,flux:i}=t;if(t.stop){if(Qt.info("Stopping plugin",n),!t.started)return Qt.warn(`${n} already stopped`),!1;try{t.stop(),t.started=!1}catch(s){return Qt.error(`Failed to stop ${n}
|
|
`,s),!1}}if(r?.length){Qt.info("Unregistering commands of plugin",n);for(let s of r)try{os(s.name)}catch(l){return Qt.error(`Failed to unregister command ${s.name}
|
|
`,l),!1}}if(i)for(let s in i)F.unsubscribe(s,i[s]);return!0},e=>`stopPlugin ${e.name}`)});function LM(e){ee.show({message:e,type:ee.Type.FAILURE,id:ee.genId(),options:{position:ee.Position.BOTTOM}})}function EM({required:e}){return o(xt,{className:br("info-card",{"restart-card":e})},e?o(f,null,o(S.FormTitle,{tag:"h5"},"Restart required!"),o(S.FormText,{className:br("dep-text")},"Restart now to apply new plugins and their settings"),o(R,{color:R.Colors.YELLOW,onClick:()=>location.reload()},"Restart")):o(f,null,o(S.FormTitle,{tag:"h5"},"Plugin Management"),o(S.FormText,null,"Press the cog wheel or info icon to get more info on a plugin"),o(S.FormText,null,"Plugins with a cog wheel have settings you can modify!")))}function Ea({plugin:e,disabled:t,onRestartNeeded:n,onMouseEnter:r,onMouseLeave:i,isNew:s}){let l=E.plugins[e.name],c=()=>l.enabled??!1;function u(){Fi(async()=>m=>o(Lu,{...m,plugin:e,onRestartNeeded:()=>n(e.name)}))}function d(){let m=c();if(!m){let{restartNeeded:v,failures:T}=_a(e);if(T.length){Zy.error(`Failed to start dependencies for ${e.name}: ${T.join(", ")}`),Ji("Failed to start dependencies: "+T.join(", "),"Close",()=>null);return}else if(v){l.enabled=!0,n(e.name);return}}if(e.patches?.length){l.enabled=!m,n(e.name);return}if(m&&!e.started){l.enabled=!m;return}if(!(m?Uu(e):as(e))){l.enabled=!1;let v=`Error while ${m?"stopping":"starting"} plugin ${e.name}`;Zy.error(v),LM(v);return}l.enabled=!m}return o(Oa,{name:e.name,description:e.description,isNew:s,enabled:c(),setEnabled:d,disabled:t,onMouseEnter:r,onMouseLeave:i,infoButton:o("button",{role:"switch",onClick:()=>u(),className:oe(RM.button,br("info-button"))},e.options&&!Di(e.options)?o(Ty,null):o(Ca,null))})}function Gu(){let e=lt(),t=O.useMemo(()=>new is,[]);O.useEffect(()=>()=>void(t.hasChanges&&sn.show({title:"Restart required",body:o(f,null,o("p",null,"The following plugins require a restart:"),o("div",null,t.map((v,T)=>o(f,null,T>0&&", ",Fe.parse("`"+v+"`"))))),confirmText:"Restart now",cancelText:"Later!",onConfirm:()=>location.reload()})),[]);let n=O.useMemo(()=>{let v={};for(let T in Oe){let P=Oe[T].dependencies;if(P)for(let b of P)v[b]??=[],v[b].push(T)}return v},[]),r=O.useMemo(()=>Object.values(Oe).sort((v,T)=>v.name.localeCompare(T.name)),[]),[i,s]=O.useState({value:"",status:0}),l=v=>s(T=>({...T,value:v})),c=v=>s(T=>({...T,status:v})),u=v=>{let T=e.plugins[v.name]?.enabled;if(T&&i.status===2||!T&&i.status===1||i.status===3&&!d?.includes(v.name))return!1;if(!i.value.length)return!0;let P=i.value.toLowerCase();return v.name.toLowerCase().includes(P)||v.description.toLowerCase().includes(P)||v.tags?.some(b=>b.toLowerCase().includes(P))},[d]=nt(()=>Pt("Vencord_existingPlugins").then(v=>{let T=Date.now()/1e3,P={},b=Object.values(r).map(C=>C.name),x=[];for(let{name:C}of r)(P[C]=v?.[C]??T)+60*60*24*2>T&&x.push(C);return Zt("Vencord_existingPlugins",P),ur.isEqual(x,b)?[]:x})),m,h;if(r?.length){m=[],h=[];for(let v of r){if(!v.options&&v.name.endsWith("API")&&i.value!=="API"||!u(v))continue;if(v.required||n[v.name]?.some(P=>e.plugins[P].enabled)){let P=v.required?"This plugin is required for Vencord to function.":DM(n[v.name]?.filter(b=>e.plugins[b].enabled));h.push(o(V,{text:P,key:v.name},({onMouseLeave:b,onMouseEnter:x})=>o(Ea,{onMouseLeave:b,onMouseEnter:x,onRestartNeeded:C=>t.handleChange(C),disabled:!0,plugin:v})))}else m.push(o(Ea,{onRestartNeeded:P=>t.handleChange(P),disabled:!1,plugin:v,isNew:d?.includes(v.name),key:v.name}))}}else m=h=o(re,{variant:"text-md/normal"},"No plugins meet search criteria.");return o(yn,{title:"Plugins"},o(EM,{required:t.hasChanges}),o(S.FormTitle,{tag:"h5",className:oe(q.top20,q.bottom8)},"Filters"),o("div",{className:br("filter-controls")},o(Qe,{autoFocus:!0,value:i.value,placeholder:"Search for a plugin...",onChange:l,className:q.bottom20}),o("div",{className:Xy.inputWrapper},o(wn,{className:Xy.inputDefault,options:[{label:"Show All",value:0,default:!0},{label:"Show Enabled",value:1},{label:"Show Disabled",value:2},{label:"Show New",value:3}],serialize:String,select:c,isSelected:v=>v===i.status,closeOnSelect:!0}))),o(S.FormTitle,{className:q.top20},"Plugins"),o("div",{className:br("grid")},m),o(S.FormDivider,{className:q.top20}),o(S.FormTitle,{tag:"h5",className:oe(q.top20,q.bottom8)},"Required Plugins"),o("div",{className:br("grid")},h))}function DM(e){return o(O.Fragment,null,o(S.FormText,null,"This plugin is required by:"),e.map(t=>o(S.FormText,{className:br("dep-text")},t)))}var br,Zy,Xy,RM,ku=g(()=>{"use strict";a();fy();jn();Aa();U();Je();Ut();Gy();Ou();Oo();_u();Ze();it();Re();pt();st();j();I();hr();Ba();br=Ue("vc-plugins-"),Zy=new ie("PluginSettings","#a6d189"),Xy=A("inputDefault","inputWrapper"),RM=A("button","disabled","enabled")});var Jy={};Be(Jy,{default:()=>OM});var OM,Qy=g(()=>{"use strict";a();ku();Oo();OM=vn(Gu,"Plugins")});function rt(e){return e.disabled&&(e.style??={},e.style.pointerEvents="none",e["aria-disabled"]=!0),o("a",{role:"link",target:"_blank",...e},e.children)}var lo=g(()=>{"use strict";a()});var Vy={};Be(Vy,{default:()=>zM});function UM({link:e}){let[t,n,r]=nt(()=>fetch(e).then(s=>{if(s.status>300)throw`${s.status} ${s.statusText}`;let l=s.headers.get("Content-Type");if(!l?.startsWith("text/css")&&!l?.startsWith("text/plain"))throw"Not a CSS file. Remember to use the raw link!";return"Okay!"})),i=r?"Checking...":n?`Error: ${n instanceof Error?n.message:String(n)}`:"Valid!";return o(S.FormText,{style:{color:r?"var(--text-muted)":n?"var(--text-danger)":"var(--text-positive)"}},i)}function $M({themeLinks:e}){return e.length?o(f,null,o(S.FormTitle,{className:q.top20,tag:"h5"},"Validator"),o(S.FormText,null,"This section will tell you whether your themes can successfully be loaded"),o("div",null,e.map(t=>o(xt,{style:{padding:".5em",marginBottom:".5em",marginTop:".5em"},key:t},o(S.FormTitle,{tag:"h5",style:{overflowWrap:"break-word"}},t),o(UM,{link:t}))))):null}function GM({theme:e,enabled:t,onChange:n,onDelete:r}){return o(Oa,{name:e.name,description:e.description,author:e.author,enabled:t,setEnabled:n,infoButton:!1,footer:o(ge,{flexDirection:"row",style:{gap:"0.2em"}},!!e.website&&o(rt,{href:e.website},"Website"),!!(e.website&&e.invite)&&" \u2022 ",!!e.invite&&o(rt,{href:`https://discord.gg/${e.invite}`,onClick:async i=>{i.preventDefault();let{invite:s}=await _M.resolveInvite(e.invite,"Desktop Modal");if(!s)return mn("Invalid or expired invite");F.dispatch({type:"INVITE_MODAL_OPEN",invite:s,code:e.invite,context:"APP"})}},"Discord Server"))})}function HM(){let e=lt(["themeLinks","enabledThemes"]),t=Kt(null),[n,r]=J(0),[i,s]=J(e.themeLinks.join(`
|
|
`)),[l,c]=J(null),[u,,d]=nt(VencordNative.themes.getThemesDir);De(()=>{m()},[]);async function m(){let x=await VencordNative.themes.getThemesList();c(x)}function h(x,C){if(C){if(e.enabledThemes.includes(x))return;e.enabledThemes=[...e.enabledThemes,x]}else e.enabledThemes=e.enabledThemes.filter(k=>k!==x)}async function v(x){if(x.stopPropagation(),x.preventDefault(),!x.currentTarget?.files?.length)return;let{files:C}=x.currentTarget,k=Array.from(C,B=>{let{name:$}=B;if(!!$.endsWith(".css"))return new Promise((Y,K)=>{let z=new FileReader;z.onload=()=>{VencordNative.themes.uploadTheme($,z.result).then(Y).catch(K)},z.readAsText(B)})});await Promise.all(k),m()}function T(){return o(f,null,o(xt,{className:"vc-settings-card"},o(S.FormTitle,{tag:"h5"},"Find Themes:"),o("div",{style:{marginBottom:".5em",display:"flex",flexDirection:"column"}},o(rt,{style:{marginRight:".5em"},href:"https://betterdiscord.app/themes"},"BetterDiscord Themes"),o(rt,{href:"https://github.com/search?q=discord+theme"},"GitHub")),o(S.FormText,null,'If using the BD site, click on "Download" and place the downloaded .theme.css file into your themes folder.')),o(S.FormSection,{title:"Local Themes"},o(xt,{className:"vc-settings-quick-actions-card"},o(f,null,o(R,{onClick:()=>ba(u),size:R.Sizes.SMALL,disabled:d},"Open Themes Folder"),o(R,{onClick:m,size:R.Sizes.SMALL},"Load missing Themes"),o(R,{onClick:()=>VencordNative.quickCss.openEditor(),size:R.Sizes.SMALL},"Edit QuickCSS"))),o("div",{className:FM("grid")},l?.map(x=>o(GM,{key:x.fileName,enabled:e.enabledThemes.includes(x.fileName),onChange:C=>h(x.fileName,C),onDelete:async()=>{h(x.fileName,!1),await VencordNative.themes.deleteTheme(x.fileName),m()},theme:x})))))}function P(){e.themeLinks=[...new Set(i.trim().split(/\n+/).map(x=>x.trim()).filter(Boolean))]}function b(){return o(f,null,o(xt,{className:"vc-settings-card vc-text-selectable"},o(S.FormTitle,{tag:"h5"},"Paste links to css files here"),o(S.FormText,null,"One link per line"),o(S.FormText,null,"Make sure to use direct links to files (raw or github.io)!")),o(S.FormSection,{title:"Online Themes",tag:"h5"},o(ea,{value:i,onChange:s,className:oe(BM.textarea,"vc-settings-theme-links"),placeholder:"Theme Links",spellCheck:!1,onBlur:P,rows:10}),o($M,{themeLinks:e.themeLinks})))}return o(yn,{title:"Themes"},o(Mn,{type:"top",look:"brand",className:"vc-settings-tab-bar",selectedItem:n,onItemSelect:r},o(Mn.Item,{className:"vc-settings-tab-bar-item",id:0},"Local Themes"),o(Mn.Item,{className:"vc-settings-tab-bar-item",id:1},"Online Themes")),n===0&&T(),n===1&&b())}var _M,JO,BM,FM,zM,ev=g(()=>{"use strict";a();U();Je();Rt();Ut();lo();it();Re();Ro();st();j();I();Ou();Oo();_M=A("resolveInvite"),JO=nn(e=>e.prototype?.activateUploadDialogue&&e.prototype.setRef),BM=nn(e=>typeof e.textarea=="string"),FM=Ue("vc-settings-theme-");zM=vn(HM,"Themes")});var rv={};Be(rv,{default:()=>KM});function tv(e,t){return async()=>{e(!0);try{await t()}catch(r){if(yr.error("Failed to update",r),r)if(r.code&&r.cmd){let{code:i,path:s,cmd:l,stderr:c}=r;if(i==="ENOENT")var n=`Command \`${s}\` not found.
|
|
Please install it and try again`;else{var n=`An error occurred while running \`${l}\`:
|
|
`;n+=c||`Code \`${i}\`. See the console for more info`}}else var n="An unknown error occurred. See the console for more info.";else var n=`An unknown error occurred (error is undefined).
|
|
Please try again.`;sn.show({title:"Oops!",body:o(gn,null,n.split(`
|
|
`).map(i=>o("div",null,Fe.parse(i))))})}finally{e(!1)}}}function nv({repo:e,hash:t,disabled:n=!1}){return o(rt,{href:`${e}/commit/${t}`,disabled:n},t)}function ov({updates:e,repo:t,repoPending:n}){return o(xt,{style:{padding:".5em"}},e.map(({hash:r,author:i,message:s})=>o("div",null,o("code",null,o(nv,{repo:t,hash:r,disabled:n})),o("span",{style:{marginLeft:"0.5em",color:"var(--text-normal)"}},s," - ",i))))}function jM(e){let[t,n]=O.useState(Eo),[r,i]=O.useState(!1),[s,l]=O.useState(!1),c=(t?.length??0)>0;return o(f,null,!t&&Zr?o(f,null,o(S.FormText,null,"Failed to check updates. Check the console for more info"),o(gn,{style:{padding:"1em"}},o("p",null,Zr.stderr||Zr.stdout||"An unknown error occurred"))):o(S.FormText,{className:q.bottom8},c?`There are ${t.length} Updates`:"Up to Date!"),c&&o(ov,{updates:t,...e}),o(ge,{className:oe(q.bottom8,q.top8)},c&&o(R,{size:R.Sizes.SMALL,disabled:s||r,onClick:tv(l,async()=>{await Jr()&&(n([]),await new Promise(u=>{sn.show({title:"Update Success!",body:"Successfully updated. Restart now to apply the changes?",confirmText:"Restart",cancelText:"Not now!",onConfirm(){cn(),u()},onCancel:u})}))})},"Update Now"),o(R,{size:R.Sizes.SMALL,disabled:s||r,onClick:tv(i,async()=>{await Xr()?n(Eo):(n([]),ee.show({message:"No updates found!",id:ee.genId(),type:ee.Type.MESSAGE,options:{position:ee.Position.BOTTOM}}))})},"Check for Updates")))}function WM(e){return o(f,null,o(S.FormText,{className:q.bottom8},"Your local copy has more recent commits. Please stash or reset them."),o(ov,{...e,updates:Eo}))}function qM(){let e=lt(["notifyAboutUpdates","autoUpdate","autoUpdateNotification"]),[t,n,r]=nt(cu,{fallbackValue:"Loading..."});O.useEffect(()=>{n&&yr.error("Failed to retrieve repo",n)},[n]);let i={repo:t,repoPending:r};return o(yn,{title:"Vencord Updater"},o(S.FormTitle,{tag:"h5"},"Updater Settings"),o(ut,{value:e.notifyAboutUpdates,onChange:s=>e.notifyAboutUpdates=s,note:"Shows a notification on startup",disabled:e.autoUpdate},"Get notified about new updates"),o(ut,{value:e.autoUpdate,onChange:s=>e.autoUpdate=s,note:"Automatically update Vencord without confirmation prompt"},"Automatically update"),o(ut,{value:e.autoUpdateNotification,onChange:s=>e.autoUpdateNotification=s,note:"Shows a notification when Vencord automatically updates",disabled:!e.autoUpdate},"Get notified when an automatic update completes"),o(S.FormTitle,{tag:"h5"},"Repo"),o(S.FormText,{className:"vc-text-selectable"},r?t:n?"Failed to retrieve - check console":o(rt,{href:t},t.split("/").slice(-2).join("/"))," ","(",o(nv,{hash:an,repo:t,disabled:r}),")"),o(S.FormDivider,{className:q.top8+" "+q.bottom8}),o(S.FormTitle,{tag:"h5"},"Updates"),Yi?o(WM,{...i}):o(jM,{...i}))}var KM,iv=g(()=>{"use strict";a();U();zr();Rt();lo();it();Re();Ro();st();vr();I();Gr();Oo();KM=vn(qM,"Updater")});function Fa({value:e,onChange:t,validate:n}){let[r,i]=O.useState(e),[s,l]=O.useState();function c(u){i(u);let d=n(u);d===!0?(l(void 0),t(u)):l(d)}return o(f,null,o(Qe,{type:"text",value:r,onChange:c,error:s}))}var Hu=g(()=>{"use strict";a();I()});var sv={};Be(sv,{default:()=>QM});function YM(e){try{return new URL(e),!0}catch{return"Invalid URL"}}async function ZM(){let e=await fetch(new URL("/v1/",ko()),{method:"DELETE",headers:new Headers({Authorization:await Kr()})});if(!e.ok){Sa.error(`Failed to erase data, API returned ${e.status}`),Ie({title:"Cloud Integrations",body:`Could not erase all data (API returned ${e.status}), please contact support.`,color:"var(--red-360)"});return}E.cloud.authenticated=!1,await iu(),Ie({title:"Cloud Integrations",body:"Successfully erased all data.",color:"var(--green-360)"})}function XM(){let{cloud:e}=lt(["cloud.authenticated","cloud.settingsSync"]),t=e.authenticated&&e.settingsSync;return o(S.FormSection,{title:"Settings Sync",className:q.top16},o(S.FormText,{variant:"text-md/normal",className:q.bottom20},"Synchronize your settings to the cloud. This allows easy synchronization across multiple devices with minimal effort."),o(ut,{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(R,{size:R.Sizes.SMALL,disabled:!t,onClick:()=>Yr(!0)},"Sync to Cloud"),o(V,{text:"This will overwrite your local settings with the ones on the cloud. Use wisely!"},({onMouseLeave:n,onMouseEnter:r})=>o(R,{onMouseLeave:n,onMouseEnter:r,size:R.Sizes.SMALL,color:R.Colors.RED,disabled:!t,onClick:()=>Ma(!0,!0)},"Sync from Cloud")),o(R,{size:R.Sizes.SMALL,color:R.Colors.RED,disabled:!t,onClick:()=>ty()},"Delete Cloud Settings")))}function JM(){let e=lt(["cloud.authenticated","cloud.url"]);return o(yn,{title:"Vencord Cloud"},o(S.FormSection,{title:"Cloud Settings",className:q.top16},o(S.FormText,{variant:"text-md/normal",className:q.bottom20},"Vencord comes with a cloud integration that adds goodies like settings sync across devices. It ",o(rt,{href:"https://vencord.dev/cloud/privacy"},"respects your privacy"),", and the ",o(rt,{href:"https://github.com/Vencord/Backend"},"source code")," is AGPL 3.0 licensed so you can host it yourself."),o(ut,{key:"backend",value:e.cloud.authenticated,onChange:t=>{t&&Zh(),t||(e.cloud.authenticated=t)},note:"This will request authorization if you have not yet set up cloud integrations."},"Enable Cloud Integrations"),o(S.FormTitle,{tag:"h5"},"Backend URL"),o(S.FormText,{className:q.bottom8},"Which backend to use when using cloud integrations."),o(Fa,{key:"backendUrl",value:e.cloud.url,onChange:t=>{e.cloud.url=t,e.cloud.authenticated=!1,iu()},validate:YM}),o(R,{className:q.top8,size:R.Sizes.MEDIUM,color:R.Colors.RED,disabled:!e.cloud.authenticated,onClick:()=>sn.show({title:"Are you sure?",body:"Once your data is erased, we cannot recover it. There's no going back!",onConfirm:ZM,confirmText:"Erase it!",confirmColor:"vc-cloud-erase-data-danger-btn",cancelText:"Nevermind"})},"Erase All Data"),o(S.FormDivider,{className:q.top16})),o(XM,null))}var QM,av=g(()=>{"use strict";a();Ao();U();Hu();lo();su();it();qi();I();Oo();QM=vn(JM,"Cloud")});var lv={};Be(lv,{default:()=>eP});function VM(){return o(yn,{title:"Backup & Restore"},o(xt,{className:oe("vc-settings-card","vc-backup-restore-card")},o(ge,{flexDirection:"column"},o("strong",null,"Warning"),o("span",null,"Importing a settings file will overwrite your current settings."))),o(re,{variant:"text-md/normal",className:q.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(re,{variant:"text-md/normal",className:q.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(ge,null,o(R,{onClick:()=>ey(),size:R.Sizes.SMALL},"Import Settings"),o(R,{onClick:Qh,size:R.Sizes.SMALL},"Export Settings")))}var eP,cv=g(()=>{"use strict";a();Rt();it();Re();qi();I();Oo();eP=vn(VM,"Backup & Restore")});var ls,zu=g(()=>{"use strict";a();Mt();U();M();w();I();Gr();ls=y({name:"Settings",description:"Adds Settings UI and debug info",authors:[p.Ven,p.Megu],required:!0,start(){ce("user-settings-cog",e=>()=>{e.find(n=>Array.isArray(n)&&n.some(r=>r?.props?.id==="VencordSettings"))?.forEach(n=>{let r=n?.props?.id;(r?.startsWith("Vencord")||r?.startsWith("Vesktop"))&&(n.props.action=()=>Qn.open(r))})})},patches:[{find:".versionHash",replacement:[{match:/\[\(0,.{1,3}\.jsxs?\)\((.{1,10}),(\{[^{}}]+\{.{0,20}.versionHash,.+?\})\)," "/,replace:(e,t,n)=>(n=n.replace(/children:\[.+\]/,""),`${e},Vencord.Plugins.plugins.Settings.makeInfoElements(${t}, ${n})`)}]},{find:"Messages.ACTIVITY_SETTINGS",replacement:{get match(){switch(E.plugins.Settings.settingsLocation){case"top":return/\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.USER_SETTINGS\}/;case"aboveNitro":return/\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.BILLING_SETTINGS\}/;case"belowNitro":return/\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.APP_SETTINGS\}/;case"belowActivity":return/(?<=\{section:(\i\.\i)\.DIVIDER},)\{section:"changelog"/;case"bottom":return/\{section:(\i\.\i)\.CUSTOM,\s*element:.+?}/;case"aboveActivity":default:return/\{section:(\i\.\i)\.HEADER,\s*label:(\i)\.\i\.Messages\.ACTIVITY_SETTINGS\}/}},replace:"...$self.makeSettingsCategories($1),$&"}}],customSections:[],makeSettingsCategories(e){return[{section:e.HEADER,label:"Vencord",className:"vc-settings-header"},{section:"VencordSettings",label:"Vencord",element:(my(),To(dy)).default,className:"vc-settings"},{section:"VencordPlugins",label:"Plugins",element:(Qy(),To(Jy)).default,className:"vc-plugins"},{section:"VencordThemes",label:"Themes",element:(ev(),To(Vy)).default,className:"vc-themes"},{section:"VencordUpdater",label:"Updater",element:(iv(),To(rv)).default,className:"vc-updater"},{section:"VencordCloud",label:"Cloud",element:(av(),To(sv)).default,className:"vc-cloud"},{section:"VencordSettingsSync",label:"Backup & Restore",element:(cv(),To(lv)).default,className:"vc-backup-restore"},!1,...this.customSections.map(t=>t(e)),{section:e.DIVIDER}].filter(Boolean)},options:{settingsLocation:{type:4,description:"Where to put the Vencord settings section",options:[{label:"At the very top",value:"top"},{label:"Above the Nitro section",value:"aboveNitro"},{label:"Below the Nitro section",value:"belowNitro"},{label:"Above Activity Settings",value:"aboveActivity",default:!0},{label:"Below Activity Settings",value:"belowActivity"},{label:"At the very bottom",value:"bottom"}],restartNeeded:!0}},get electronVersion(){return VencordNative.native.getVersions().electron||window.armcord?.electron||null},get chromiumVersion(){try{return VencordNative.native.getVersions().chrome||navigator.userAgentData?.brands?.find(e=>e.brand==="Chromium"||e.brand==="Google Chrome")?.version||null}catch{return null}},get additionalInfo(){return` (Vesktop v${VesktopNative.app.getVersion()})`},makeInfoElements(e,t){let{electronVersion:n,chromiumVersion:r,additionalInfo:i}=this;return o(f,null,o(e,{...t},"Vencord ",an,i),n&&o(e,{...t},"Electron ",n),r&&o(e,{...t},"Chromium ",r))}})});var uv,tP,ju,pv=g(()=>{"use strict";a();cs();M();Re();ro();w();vr();I();Gr();hr();zu();uv="Vencord-SupportHelper-Dismiss",tP=[ra,"1024286218801926184","1033680203433660458"],ju=y({name:"SupportHelper",required:!0,description:"Helps us provide support to you",authors:[p.Ven],dependencies:["CommandsAPI"],commands:[{name:"vencord-debug",description:"Send Vencord Debug info",predicate:e=>tP.includes(e.channel.id),async execute(){let{RELEASE_CHANNEL:e}=window.GLOBAL_ENV,t=(()=>`Vesktop v${VesktopNative.app.getVersion()}`)(),n=c=>c.endsWith("API")||Oe[c].required,r=Object.keys(Oe).filter(c=>Vencord.Plugins.isPluginEnabled(c)&&!n(c)),i=Object.keys(Oe).filter(c=>Vencord.Plugins.isPluginEnabled(c)&&n(c)),s={Vencord:`v1.6.4 \u2022 ${an}${ls.additionalInfo} - ${Intl.DateTimeFormat("en-GB",{dateStyle:"medium"}).format(1700877388959)}`,"Discord Branch":e,Client:t,Platform:window.navigator.platform,Outdated:Do,OpenAsar:"openasar"in window};return{content:`
|
|
**Vencord Debug Info**
|
|
>>> ${Object.entries(s).map(([c,u])=>`${c}: ${u}`).join(`
|
|
`)}
|
|
|
|
Enabled Plugins (${r.length+i.length}):
|
|
${es(r.join(", ")+`
|
|
|
|
`+i.join(", "))}
|
|
`.trim().replaceAll("```\n","```")}}}],flux:{async CHANNEL_SELECT({channelId:e}){if(e===ra&&!Oi(W.getCurrentUser().id)&&Do&&an!==await $t.get(uv)){let t=()=>$t.set(uv,an);sn.show({title:"Hold on!",body:o("div",null,o(S.FormText,null,"You are using an outdated version of Vencord! Chances are, your issue is already fixed."),o(S.FormText,null,"Please first update using the Updater Page in Settings, or use the VencordInstaller (Update Vencord Button) to do so, in case you can't access the Updater page.")),onCancel:t,onConfirm:t})}}}})});var Wu,dv=g(()=>{"use strict";a();M();w();Wu=y({name:"AlwaysAnimate",description:"Animates anything that can be animated",authors:[p.FieryFlames],patches:[{find:"canAnimate:",all:!0,noWarn:!0,replacement:{match:/canAnimate:.+?(?=([,}].*?\)))/g,replace:(e,t)=>t.match(/}=.+/)==null?"canAnimate:!0":e}},{find:".Messages.GUILD_OWNER,",replacement:{match:/(?<=\.activityEmoji,.+?animate:)\i/,replace:"!0"}}]})});var qu,mv=g(()=>{"use strict";a();M();w();qu=y({name:"AlwaysTrust",description:"Removes the annoying untrusted domain and suspicious file popup",authors:[p.zt],patches:[{find:'.displayName="MaskedLinkStore"',replacement:{match:/(?<=isTrustedDomain\(\i\){)return \i\(\i\)/,replace:"return true"}},{find:"isSuspiciousDownload:",replacement:{match:/function \i\(\i\){(?=.{0,60}\.parse\(\i\))/,replace:"$&return null;"}}]})});var nP,Ku,fv=g(()=>{"use strict";a();U();M();w();nP=/\.tar\.\w+$/,Ku=y({name:"AnonymiseFileNames",authors:[p.obscurity],description:"Anonymise uploaded file names",patches:[{find:"instantBatchUpload:function",replacement:{match:/uploadFiles:(.{1,2}),/,replace:"uploadFiles:(...args)=>(args[0].uploads.forEach(f=>f.filename=$self.anonymise(f.filename)),$1(...args)),"}}],options:{method:{description:"Anonymising method",type:4,options:[{label:"Random Characters",value:0,default:!0},{label:"Consistent",value:1},{label:"Timestamp (4chan-like)",value:2}]},randomisedLength:{description:"Random characters length",type:1,default:7,disabled:()=>E.plugins.AnonymiseFileNames.method!==0},consistent:{description:"Consistent filename",type:0,default:"image",disabled:()=>E.plugins.AnonymiseFileNames.method!==1}},anonymise(e){let t="image",r=nP.exec(e)?.index??e.lastIndexOf("."),i=r!==-1?e.slice(r):"";switch(E.plugins.AnonymiseFileNames.method){case 0:let s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";t=Array.from({length:E.plugins.AnonymiseFileNames.randomisedLength},()=>s[Math.floor(Math.random()*s.length)]).join("");break;case 1:t=E.plugins.AnonymiseFileNames.consistent;break;case 2:t=`${Math.floor(Date.now()/1e3)}${Math.floor(window.performance.now())}`;break}return t+i}})});async function gv(e,t){return(await pr.fetchAssetIds(e,[t]))[0]}async function rP(e){let t={};return await oP.fetchApplicationsRPC(t,e),t.application}var oP,hv,oi,Yu,yv=g(()=>{"use strict";a();Aa();lo();M();w();j();I();oP=A("fetchApplicationsRPC","getRemoteIconURL");hv={};Yu=y({name:"WebRichPresence (arRPC)",description:"Client plugin for arRPC to enable RPC on Discord Web (experimental)",authors:[p.Ducko],settingsAboutComponent:()=>o(f,null,o(S.FormTitle,{tag:"h3"},"How to use arRPC"),o(S.FormText,null,o(rt,{href:"https://github.com/OpenAsar/arrpc/tree/main#server"},"Follow the instructions in the GitHub repo")," to get the server running, and then enable the plugin.")),async handleEvent(e){let t=JSON.parse(e.data),{activity:n}=t,r=n?.assets;if(r?.large_image&&(r.large_image=await gv(n.application_id,r.large_image)),r?.small_image&&(r.small_image=await gv(n.application_id,r.small_image)),n){let i=n.application_id;hv[i]||=await rP(i);let s=hv[i];n.name||=s.name}F.dispatch({type:"LOCAL_ACTIVITY_UPDATE",...t})},async start(){if("armcord"in window)return;if(oi&&oi.close(),oi=new WebSocket("ws://127.0.0.1:1337"),oi.onmessage=this.handleEvent,!await new Promise(t=>setTimeout(()=>t(oi.readyState===WebSocket.OPEN),1e3))){Ji("Failed to connect to arRPC, is it running?","Retry",()=>{gu(),this.start()});return}ee.show({message:"Connected to arRPC",type:ee.Type.SUCCESS,id:ee.genId(),options:{duration:1e3,position:ee.Position.BOTTOM}})},stop(){F.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:null}),oi?.close()}})});var Zu,vv=g(()=>{"use strict";a();M();w();Zu=y({name:"BANger",description:"Replaces the GIF in the ban dialogue with a custom one.",authors:[p.Xinto,p.Glitch],patches:[{find:"BAN_CONFIRM_TITLE.",replacement:{match:/src:\i\("\d+"\)/g,replace:"src: Vencord.Settings.plugins.BANger.source"}}],options:{source:{description:"Source to replace ban GIF with (Video or Gif)",type:0,default:"https://i.imgur.com/wp5q52C.mp4",restartNeeded:!0}}})});var Sv,bv,iP,Tv,xv=g(()=>{"use strict";a();le();j();I();Xu();Sv=Me("ChannelRTCStore"),bv=A("a","animated","useTransition"),iP=Xe('("guildsnav")'),Tv=_.wrap(e=>{let t=He([ri],()=>ri.getExpandedFolders()),n=He([Sv],()=>Sv.isFullscreenInContext()),r=o(iP,{...e,isBetterFolders:!0,betterFoldersExpandedIds:t}),i=!!t.size,s=document.querySelector(e.className.split(" ").map(c=>`.${c}`).join("")),l={display:n?"none":"flex"};return!s||!mt.store.sidebarAnim?i?o("div",{style:l},r):null:o(bv.Transition,{items:i,from:{width:0},enter:{width:s.getBoundingClientRect().width},leave:{width:0},config:{duration:200}},(c,u)=>u&&o(bv.animated.div,{style:{...c,...l}},r))},{noop:!0})});function lP(e){return aP.getGuildFolders().find(t=>t.guildIds.includes(e))}function Mv(){for(let e of ri.getExpandedFolders())Qu.toggleGuildFolderExpand(e)}var sP,aP,ri,Qu,wv,Ju,mt,Vu,Xu=g(()=>{"use strict";a();U();M();w();j();I();xv();({GuildsTree:sP}=A("GuildsTree")),aP=Me("SortedGuildStore"),ri=Me("ExpandedGuildFolderStore"),Qu=A("move","toggleGuildFolderExpand"),wv=null,Ju=!1;mt=D({sidebar:{type:3,description:"Display servers from folder on dedicated sidebar",restartNeeded:!0,default:!0},sidebarAnim:{type:3,description:"Animate opening the folder sidebar",default:!0},closeAllFolders:{type:3,description:"Close all folders when selecting a server not in a folder",default:!1},closeAllHomeButton:{type:3,description:"Close all folders when clicking on the home button",restartNeeded:!0,default:!1},closeOthers:{type:3,description:"Close other folders when opening a folder",default:!1},forceOpen:{type:3,description:"Force a folder to open when switching to a server of that folder",default:!1},keepIcons:{type:3,description:"Keep showing guild icons in the primary guild bar folder when it's open in the BetterFolders sidebar",restartNeeded:!0,default:!1},showFolderIcon:{type:4,description:"Show the folder icon above the folder guilds in the BetterFolders sidebar",options:[{label:"Never",value:0},{label:"Always",value:1,default:!0},{label:"When more than one folder is expanded",value:2}],restartNeeded:!0}}),Vu=y({name:"BetterFolders",description:"Shows server folders on dedicated sidebar and adds folder related improvements",authors:[p.juby,p.AutumnVN,p.Nuckyz],settings:mt,patches:[{find:'("guildsnav")',predicate:()=>mt.store.sidebar,replacement:[{match:/(?<=let{disableAppDownload:\i=\i\.isPlatformEmbedded,isOverlay:.+?)(?=}=\i,)/,replace:",isBetterFolders"},{match:/(useStateFromStoresArray\).{0,25}let \i)=(\i\.\i.getGuildsTree\(\))/,replace:(e,t,n)=>`${t}=$self.getGuildTree(!!arguments[0].isBetterFolders,${n},arguments[0].betterFoldersExpandedIds)`},{match:/lastTargetNode:\i\[\i\.length-1\].+?Fragment.+?\]}\)\]/,replace:"$&.filter($self.makeGuildsBarGuildListFilter(!!arguments[0].isBetterFolders))"},{match:/unreadMentionsIndicatorBottom,barClassName.+?}\)\]/,replace:"$&.filter($self.makeGuildsBarTreeFilter(!!arguments[0].isBetterFolders))"},{match:/(?<=\.Messages\.SERVERS.+?switch\((\i)\.type\){case \i\.\i\.FOLDER:.+?folderNode:\i,)/,replace:'isBetterFolders:typeof isBetterFolders!=="undefined"?isBetterFolders:false,'}]},{find:".MAX_GUILD_FOLDER_NAME_LENGTH,",predicate:()=>mt.store.sidebar&&mt.store.showFolderIcon!==1,replacement:[{match:/(useStateFromStores\).{0,20}=>)(\i\.\i)\.isFolderExpanded\(\i\)/,replace:(e,t,n)=>`${t}${n}.getExpandedFolders()`},{match:/(?<=folderNode:(\i),expanded:)\i(?=,)/,replace:(e,t)=>`typeof ${e}==="boolean"?${e}:${e}.has(${t}.id),betterFoldersExpandedIds:${e} instanceof Set?${e}:void 0`}]},{find:".FOLDER_ITEM_GUILD_ICON_MARGIN);",predicate:()=>mt.store.sidebar,replacement:[{predicate:()=>mt.store.keepIcons,match:/(?<=let{folderNode:\i,setNodeRef:\i,.+?expanded:(\i),.+?;)(?=let)/,replace:(e,t)=>`${t}=!!arguments[0].isBetterFolders&&${t};`},{predicate:()=>!mt.store.keepIcons,match:/(?<=\.Messages\.SERVER_FOLDER_PLACEHOLDER.+?useTransition\)\()/,replace:"!!arguments[0].isBetterFolders&&"},{predicate:()=>!mt.store.keepIcons,match:/expandedFolderBackground,.+?,(?=\i\(\(\i,\i,\i\)=>{let{key.{0,45}ul)(?<=selected:\i,expanded:(\i),.+?)/,replace:(e,t)=>`${e}!arguments[0].isBetterFolders&&${t}?null:`},{predicate:()=>mt.store.showFolderIcon!==1,match:/(?<=\.wrapper,children:\[)/,replace:"$self.shouldShowFolderIconAndBackground(!!arguments[0].isBetterFolders,arguments[0].betterFoldersExpandedIds)&&"},{predicate:()=>mt.store.showFolderIcon!==1,match:/(?<=\.expandedFolderBackground.+?}\),)(?=\i,)/,replace:"!$self.shouldShowFolderIconAndBackground(!!arguments[0].isBetterFolders,arguments[0].betterFoldersExpandedIds)?null:"}]},{find:"APPLICATION_LIBRARY,render",predicate:()=>mt.store.sidebar,replacement:{match:/(?<=({className:\i\.guilds,themeOverride:\i})\))/,replace:",$self.FolderSideBar($1)"}},{find:".Messages.DISCODO_DISABLED",predicate:()=>mt.store.closeAllHomeButton,replacement:{match:/(?<=onClick:\(\)=>{)(?=.{0,200}"discodo")/,replace:"$self.closeFolders();"}}],flux:{CHANNEL_SELECT(e){if(!(!mt.store.closeAllFolders&&!mt.store.forceOpen)&&wv!==e.guildId){wv=e.guildId;let t=lP(e.guildId);t?.folderId?mt.store.forceOpen&&!ri.isFolderExpanded(t.folderId)&&Qu.toggleGuildFolderExpand(t.folderId):mt.store.closeAllFolders&&Mv()}},TOGGLE_GUILD_FOLDER_EXPAND(e){mt.store.closeOthers&&!Ju&&(Ju=!0,F.wait(()=>{let t=ri.getExpandedFolders();if(t.size>1)for(let n of t)n!==e.folderId&&Qu.toggleGuildFolderExpand(n);Ju=!1}))}},getGuildTree(e,t,n){if(!e||n==null)return t;let r=new sP;return r.root.children=t.root.children.filter(i=>n.has(i.id)),r.nodes=Object.fromEntries(Object.entries(t.nodes).filter(([i,s])=>n.has(s.id)||n.has(s.parentId))),r},makeGuildsBarGuildListFilter(e){return t=>e?t?.props?.["aria-label"]===tt.Messages.SERVERS:!0},makeGuildsBarTreeFilter(e){return t=>e?"onScroll"in t.props:!0},shouldShowFolderIconAndBackground(e,t){if(!e)return!0;switch(mt.store.showFolderIcon){case 0:return!1;case 1:return!0;case 2:return(t?.size??0)>1;default:return!0}},FolderSideBar:e=>o(Tv,{...e}),closeFolders:Mv})});var ep,Pv=g(()=>{"use strict";a();M();w();ep=y({name:"BetterGifAltText",authors:[p.Ven],description:"Change GIF alt text from simply being 'GIF' to containing the gif tags / filename",patches:[{find:"onCloseImage=",replacement:{match:/(return.{0,10}\.jsx.{0,50}isWindowFocused)/,replace:"$self.altify(e);$1"}},{find:".Messages.GIF,",replacement:{match:/alt:(\i)=(\i\.default\.Messages\.GIF)(?=,[^}]*\}=(\i))/,replace:"alt_$$:$1=$self.altify($3)||$2"}}],altify(e){if(e.alt??="GIF",e.alt!=="GIF")return e.alt;let t=e.original||e.src;try{t=decodeURI(t)}catch{}let n=t.slice(t.lastIndexOf("/")+1).replace(/\d/g,"").replace(/.gif$/,"").split(/[,\-_ ]+/g).slice(0,20).join(" ");return n.length>300&&(n=n.slice(0,300)+"..."),n&&(e.alt+=` - ${n}`),e.alt}})});var cP,tp,Iv=g(()=>{"use strict";a();U();M();w();j();cP=A("section","lastSection"),tp=y({name:"BetterNotesBox",description:"Hide notes or disable spellcheck (Configure in settings!!)",authors:[p.Ven],patches:[{find:"hideNote:",all:!0,noWarn:!0,predicate:()=>Vencord.Settings.plugins.BetterNotesBox.hide,replacement:{match:/hideNote:.+?(?=([,}].*?\)))/g,replace:(e,t)=>t.match(/}=.+/)==null?"hideNote:!0":e}},{find:"Messages.NOTE_PLACEHOLDER",replacement:{match:/\.NOTE_PLACEHOLDER,/,replace:"$&spellCheck:!Vencord.Settings.plugins.BetterNotesBox.noSpellCheck,"}},{find:".Messages.NOTE}",replacement:{match:/(?<=return \i\?)null(?=:\(0,\i\.jsxs)/,replace:"$self.patchPadding(arguments[0])"}}],options:{hide:{type:3,description:"Hide notes",default:!1,restartNeeded:!0},noSpellCheck:{type:3,description:"Disable spellcheck in notes",disabled:()=>E.plugins.BetterNotesBox.hide,default:!1}},patchPadding(e){if(!!e.lastSection)return o("div",{className:cP.lastSection})}})});var np,Av=g(()=>{"use strict";a();U();M();w();I();np=y({name:"BetterRoleDot",authors:[p.Ven,p.AutumnVN],description:"Copy role colour on RoleDot (accessibility setting) click. Also allows using both RoleDot and coloured names simultaneously",patches:[{find:".dotBorderBase",replacement:{match:/,viewBox:"0 0 20 20"/,replace:"$&,onClick:()=>$self.copyToClipBoard(arguments[0].color),style:{cursor:'pointer'}"}},{find:'"dot"===',all:!0,noWarn:!0,predicate:()=>E.plugins.BetterRoleDot.bothStyles,replacement:{match:/"(?:username|dot)"===\i(?!\.\i)/g,replace:"true"}},{find:".ADD_ROLE_A11Y_LABEL",predicate:()=>E.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!E.plugins.BetterRoleDot.bothStyles,noWarn:!0,replacement:{match:/"dot"===\i/,replace:"true"}},{find:".roleVerifiedIcon",predicate:()=>E.plugins.BetterRoleDot.copyRoleColorInProfilePopout&&!E.plugins.BetterRoleDot.bothStyles,noWarn:!0,replacement:{match:/"dot"===\i/,replace:"true"}}],options:{bothStyles:{type:3,description:"Show both role dot and coloured names",restartNeeded:!0,default:!1},copyRoleColorInProfilePopout:{type:3,description:"Allow click on role dot in profile popout to copy role color",restartNeeded:!0,default:!1}},copyToClipBoard(e){Yt.copy(e),ee.show({message:"Copied to Clipboard!",type:ee.Type.SUCCESS,id:ee.genId(),options:{duration:1e3,position:ee.Position.BOTTOM}})}})});var op,Cv=g(()=>{"use strict";a();M();w();op=y({name:"BetterUploadButton",authors:[p.obscurity,p.Ven],description:"Upload with a single click, open menu with right click",patches:[{find:"Messages.CHAT_ATTACH_UPLOAD_OR_INVITE",replacement:{match:/CHAT_ATTACH_UPLOAD_OR_INVITE,onDoubleClick:(.+?:void 0),\.\.\.(\i),/,replace:"$&onClick:$1,onContextMenu:$2.onClick,"}}]})});var Nv,kv,Rv=g(()=>{"use strict";a();j();Nv=Me("ApplicationStreamPreviewStore"),kv=Me("ApplicationStreamingStore")});var uP,Dv,Lv,Ev,rp,Ov=g(()=>{"use strict";a();Mt();Ut();M();St();w();I();Rv();uP=async({guildId:e,channelId:t,ownerId:n})=>{let r=await Nv.getPreviewURL(e,t,n);!r||En(r)},Dv=(e,{userId:t})=>()=>{let n=kv.getAnyStreamForUser(t);if(!n)return;let r=o(G.MenuItem,{label:"View Stream Preview",id:"view-stream-preview",icon:Sy,action:()=>n&&uP(n),disabled:!n});e.push(o(G.MenuSeparator,null),r)},Lv=(e,{stream:t})=>Dv(e,{userId:t.ownerId}),Ev=(e,{user:t})=>Dv(e,{userId:t.id}),rp=y({name:"BiggerStreamPreview",description:"This plugin allows you to enlarge stream previews",authors:[p.phil],start:()=>{ce("user-context",Ev),ce("stream-context",Lv)},stop:()=>{de("user-context",Ev),de("stream-context",Lv)}})});function _v(){us.textContent=`
|
|
.vc-nsfw-img [class^=imageWrapper] img,
|
|
.vc-nsfw-img [class^=wrapperPaused] video {
|
|
filter: blur(${E.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 us,ip,Bv=g(()=>{"use strict";a();U();M();w();ip=y({name:"BlurNSFW",description:"Blur attachments in NSFW channels until hovered",authors:[p.Ven],patches:[{find:".embedWrapper,embed",replacement:[{match:/\.embedWrapper/g,replace:"$&+(this.props.channel.nsfw?' vc-nsfw-img':'')"}]}],options:{blurAmount:{type:1,description:"Blur Amount",default:10,onChange:_v}},start(){us=document.createElement("style"),us.id="VcBlurNsfw",document.head.appendChild(us),_v()},stop(){us?.remove()}})});function pP(e){let t=E.plugins.CallTimer.format==="human",n=m=>t?m:m.toString().padStart(2,"0"),r=m=>t?m:"",i=t?" ":":",s=Math.floor(e/864e5),l=Math.floor(e%864e5/36e5),c=Math.floor(e%864e5%36e5/6e4),u=Math.floor(e%864e5%36e5%6e4/1e3),d="";return s&&(d+=`${s}d `),(l||d)&&(d+=`${n(l)}${r("h")}${i}`),(c||d||!t)&&(d+=`${n(c)}${r("m")}${i}`),d+=`${n(u)}${r("s")}`,d}var sp,Fv=g(()=>{"use strict";a();U();le();M();st();w();sp=y({name:"CallTimer",description:"Adds a timer to vcs",authors:[p.Ven],startTime:0,interval:void 0,options:{format:{type:4,description:"The timer format. This can be any valid moment.js format",options:[{label:"30d 23:00:42",value:"stopwatch",default:!0},{label:"30d 23h 00m 42s",value:"human"}]}},patches:[{find:"renderConnectionStatus(){",replacement:{match:/(?<=renderConnectionStatus\(\)\{.+\.channel,children:)\i/,replace:"[$&, $self.renderTimer(this.props.channel.id)]"}}],renderTimer(e){return o(_,{noop:!0},o(this.Timer,{channelId:e}))},Timer({channelId:e}){let t=_i({deps:[e]});return o("p",{style:{margin:0}},"Connected for ",o("span",{style:{fontFamily:"var(--font-code)"}},pP(t)))}})});var mp={};Be(mp,{_handleClick:()=>fP,_handlePreEdit:()=>mP,_handlePreSend:()=>dP,addClickListener:()=>pp,addPreEditListener:()=>Tr,addPreSendListener:()=>Gt,removeClickListener:()=>dp,removePreEditListener:()=>xr,removePreSendListener:()=>Ht});async function dP(e,t,n,r){n.replyOptions=r;for(let i of lp)try{let s=await i(e,t,n);if(s&&s.cancel===!0)return!0}catch(s){ap.error(`MessageSendHandler: Listener encountered an unknown error
|
|
`,s)}return!1}async function mP(e,t,n){for(let r of cp)try{await r(e,t,n)}catch(i){ap.error(`MessageEditHandler: Listener encountered an unknown error
|
|
`,i)}}function Gt(e){return lp.add(e),e}function Tr(e){return cp.add(e),e}function Ht(e){return lp.delete(e)}function xr(e){return cp.delete(e)}function fP(e,t,n){e=Pn.getMessage(t.id,e.id)??e;for(let r of up)try{r(e,t,n)}catch(i){ap.error(`MessageClickHandler: Listener encountered an unknown error
|
|
`,i)}}function pp(e){return up.add(e),e}function dp(e){return up.delete(e)}var ap,lp,cp,up,Kn=g(()=>{"use strict";a();Ze();I();ap=new ie("MessageEvents","#e5c890"),lp=new Set,cp=new Set;up=new Set});var Uv,$v=g(()=>{"use strict";a();Uv=["action_object_map","action_type_map","action_ref_map","spm@*.aliexpress.com","scm@*.aliexpress.com","aff_platform","aff_trace_key","algo_expid@*.aliexpress.*","algo_pvid@*.aliexpress.*","btsid","ws_ab_test","pd_rd_*@amazon.*","_encoding@amazon.*","psc@amazon.*","tag@amazon.*","ref_@amazon.*","pf_rd_*@amazon.*","pf@amazon.*","crid@amazon.*","keywords@amazon.*","sprefix@amazon.*","sr@amazon.*","ie@amazon.*","node@amazon.*","qid@amazon.*","callback@bilibili.com","cvid@bing.com","form@bing.com","sk@bing.com","sp@bing.com","sc@bing.com","qs@bing.com","pq@bing.com","sc_cid","mkt_tok","trk","trkCampaign","ga_*","gclid","gclsrc","hmb_campaign","hmb_medium","hmb_source","spReportId","spJobID","spUserID","spMailingID","itm_*","s_cid","elqTrackId","elqTrack","assetType","assetId","recipientId","campaignId","siteId","mc_cid","mc_eid","pk_*","sc_campaign","sc_channel","sc_content","sc_medium","sc_outcome","sc_geo","sc_country","nr_email_referer","vero_conv","vero_id","yclid","_openstat","mbid","cmpid","cid","c_id","campaign_id","Campaign","hash@ebay.*","fb_action_ids","fb_action_types","fb_ref","fb_source","fbclid","refsrc@facebook.com","hrc@facebook.com","gs_l","gs_lcp@google.*","ved@google.*","ei@google.*","sei@google.*","gws_rd@google.*","gs_gbg@google.*","gs_mss@google.*","gs_rn@google.*","_hsenc","_hsmi","__hssc","__hstc","hsCtaTracking","source@sourceforge.net","position@sourceforge.net","t@*.twitter.com","s@*.twitter.com","ref_*@*.twitter.com","t@*.x.com","s@*.x.com","ref_*@*.x.com","tt_medium","tt_content","lr@yandex.*","redircnt@yandex.*","feature@youtube.com","kw@youtube.com","si@youtube.com","pp@youtube.com","si@youtu.be","wt_zmc","utm_source","utm_content","utm_medium","utm_campaign","utm_term","si@open.spotify.com","igshid","share_id@reddit.com"]});var Gv,gP,fp,Hv=g(()=>{"use strict";a();Kn();M();w();$v();Gv=/[\\^$.*+?()[\]{}|]/g,gP=RegExp(Gv.source),fp=y({name:"ClearURLs",description:"Removes tracking garbage from URLs",authors:[p.adryd],dependencies:["MessageEventsAPI"],escapeRegExp(e){return e&&gP.test(e)?e.replace(Gv,"\\$&"):e||""},createRules(){let e=Uv;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=Gt((e,t)=>this.onSend(t)),this.preEdit=Tr((e,t,n)=>this.onSend(n))},stop(){Ht(this.preSend),xr(this.preEdit)}})});var zv=g(()=>{});function Wv(e){let t=e.toString(16).padStart(6,"0");ps.store.color=t,qv(t)}function vP(){let e=TP(ps.store.color)>45,t=Uo()===2;return o("div",{className:"client-theme-settings"},o("div",{className:"client-theme-container"},o("div",{className:"client-theme-settings-labels"},o(S.FormTitle,{tag:"h3"},"Theme Color"),o(S.FormText,null,"Add a color to your Discord client theme")),o(hP,{color:parseInt(ps.store.color,16),onChange:Wv,showEyeDropper:!1,suggestedColors:yP})),e||t?o("div",null,o(S.FormDivider,{className:oe(q.top8,q.bottom8)}),o(S.FormText,{className:"client-theme-warning"},"Your theme won't look good:"),e&&o(S.FormText,{className:"client-theme-warning"},"Selected color is very light"),t&&o(S.FormText,{className:"client-theme-warning"},"Light mode isn't supported")):null)}async function SP(){let e=document.querySelectorAll('link[rel="stylesheet"]'),t={};for(let i of e){let s=i.getAttribute("href");if(!s)continue;let c=await(await fetch(s)).text(),u=jv.exec(c);for(;u!==null;){let[,d,m]=u;t[d]=parseFloat(m),u=jv.exec(c)}}let n=Object.entries(t).map(([i,s])=>{let l=s-t["--primary-600-hsl"],c=l>=0?"+":"-";return`${i}: var(--theme-h) var(--theme-s) calc(var(--theme-l) ${c} ${Math.abs(l).toFixed(2)}%);`}).join(`
|
|
`),r=document.createElement("style");r.setAttribute("id","clientThemeOffsets"),r.textContent=`:root:root {
|
|
${n}
|
|
}`,document.head.appendChild(r)}function qv(e){let{hue:t,saturation:n,lightness:r}=bP(e),i=document.getElementById("clientThemeVars");i||(i=document.createElement("style"),i.setAttribute("id","clientThemeVars"),document.head.appendChild(i)),i.textContent=`:root {
|
|
--theme-h: ${t};
|
|
--theme-s: ${n}%;
|
|
--theme-l: ${r}%;
|
|
}`}function bP(e){let t=parseInt(e.substring(0,2),16)/255,n=parseInt(e.substring(2,4),16)/255,r=parseInt(e.substring(4,6),16)/255,i=Math.max(t,n,r),s=Math.min(t,n,r),l=i-s,c,u,d;return d=(i+s)/2,l===0?(c=0,u=0):(u=l/(1-Math.abs(2*d-1)),i===t?c=(n-r)/l%6:i===n?c=(r-t)/l+2:c=(t-n)/l+4,c*=60,c<0&&(c+=360)),u*=100,d*=100,{hue:c,saturation:u,lightness:d}}function TP(e){let t=parseInt(e.substring(0,2),16)/255,n=parseInt(e.substring(2,4),16)/255,r=parseInt(e.substring(4,6),16)/255,i=Math.max(t,n,r),s=Math.min(t,n,r);return 100*((i+s)/2)}var hP,yP,ps,gp,jv,Kv=g(()=>{"use strict";a();zv();U();M();St();it();Re();w();j();I();hP=Xe(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR"),yP=["#1E1514","#172019","#13171B","#1C1C28","#402D2D","#3A483D","#344242","#313D4B","#2D2F47","#322B42","#3C2E42","#422938"];ps=D({color:{description:"Color your Discord client theme will be based around. Light mode isn't supported",type:6,default:"313338",component:()=>o(vP,null)},resetColor:{description:"Reset Theme Color",type:6,default:"313338",component:()=>o(R,{onClick:()=>Wv(3224376)},"Reset Theme Color")}}),gp=y({name:"ClientTheme",authors:[p.F53,p.Nuckyz],description:"Recreation of the old client theme experiment. Add a color to your Discord client theme",settings:ps,startAt:"DOMContentLoaded",start(){qv(ps.store.color),SP()},stop(){document.getElementById("clientThemeVars")?.remove(),document.getElementById("clientThemeOffsets")?.remove()}}),jv=/(--primary-[5-9]\d{2}-hsl):.*?(\S*)%;/g});var hp,Yv=g(()=>{"use strict";a();M();w();hp=y({name:"ColorSighted",description:"Removes the colorblind-friendly icons from statuses, just like 2015-2017 Discord",authors:[p.lewisakura],patches:[{find:"Masks.STATUS_ONLINE",replacement:{match:/Masks\.STATUS_(?:IDLE|DND|STREAMING|OFFLINE)/g,replace:"Masks.STATUS_ONLINE"}},{find:".AVATAR_STATUS_MOBILE_16;",replacement:{match:/(?<=fromIsMobile:\i=!0,.+?)status:(\i)/,replace:'status_$:$1="online"'}}]})});function wr(e){if(typeof e=="string")return e;let t=e.source.replaceAll("\\i","[A-Za-z_$][\\w$]*");return new RegExp(t,e.flags)}function Ua(e,t){let n=`Vencord.Plugins.plugins[${JSON.stringify(t)}]`;return typeof e!="function"?e.replaceAll("$self",n):(...r)=>e(...r).replaceAll("$self",n)}function yp(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 ds(e,t){let n=Object.getOwnPropertyDescriptors(e);n.match=yp(n.match,wr),n.replace=yp(n.replace,r=>Ua(r,t)),Object.defineProperties(e,n)}var ms=g(()=>{"use strict";a()});var vp,Zv=g(()=>{"use strict";a();M();Ro();ms();w();j();j();I();vp=y({name:"ConsoleShortcuts",description:"Adds shorter Aliases for many things on the window. Run `shortcutList` for a list.",authors:[p.Ven],getShortcuts(){function e(r){let i=new Map;return function(...s){let l=String(s);if(i.has(l))return i.get(l);let c=ir(r(...s)),u=(()=>{switch(c.length){case 0:return null;case 1:return c[0];default:let d=[...new Set(c)];return d.length>1&&console.warn(`Warning: This filter matches ${c.length} modules. Make it more specific!
|
|
`,d),c[0]}})();return u&&l&&i.set(l,u),u}}let t,n=e(r=>r);return{...Vencord.Webpack.Common,wp:Vencord.Webpack,wpc:xn.c,wreq:xn,wpsearch:cc,wpex:Js,wpexs:r=>Js(sc(r)),find:n,findAll:ir,findByProps:e(Ke.byProps),findAllByProps:(...r)=>ir(Ke.byProps(...r)),findByCode:e(Ke.byCode),findAllByCode:r=>ir(Ke.byCode(r)),findComponentByCode:e(Ke.componentByCode),findAllComponentsByCode:(...r)=>ir(Ke.componentByCode(...r)),findExportedComponent:(...r)=>n(...r)[r[0]],findStore:e(Ke.byStoreName),PluginsApi:Vencord.Plugins,plugins:Vencord.Plugins.plugins,Settings:Vencord.Settings,Api:Vencord.Api,reload:()=>location.reload(),restart:cn,canonicalizeMatch:wr,canonicalizeReplace:Ua,canonicalizeReplacement:ds,fakeRender:(r,i)=>{let s=t?.deref(),l=s?.closed===!1?s:window.open("about:blank","Fake Render","popup,width=500,height=500");t=new WeakRef(l),l.focus();let c=l.document;c.body.style.margin="1em",l.prepared||(l.prepared=!0,[...document.querySelectorAll("style"),...document.querySelectorAll("link[rel=stylesheet]")].forEach(u=>{let d=u.cloneNode(!0);u.parentElement?.tagName==="HEAD"?c.head.append(d):d.id?.startsWith("vencord-")||d.id?.startsWith("vcd-")?c.documentElement.append(d):c.body.append(d)})),ar.render(O.createElement(r,i),c.body.appendChild(document.createElement("div")))}}},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 Xv,Sp,Jv=g(()=>{"use strict";a();Mt();Ut();M();w();I();Xv=(e,{user:t})=>()=>{e.push(o(G.MenuItem,{id:"vc-copy-user-url",label:"Copy User URL",action:()=>Yt.copy(`<https://discord.com/users/${t.id}>`),icon:Qr}))},Sp=y({name:"CopyUserURLs",authors:[p.castdrian],description:"Adds a 'Copy User URL' option to the user context menu.",start(){ce("user-context",Xv)},stop(){de("user-context",Xv)}})});var $o,xP,bp,Tp,$a,xp,wp,Qv=g(()=>{"use strict";a();Ao();U();M();Ze();pt();w();vr();j();I();$o=new ie("CrashHandler"),xP=A("pushLazy","popAll"),bp=D({attemptToPreventCrashes:{type:3,description:"Whether to attempt to prevent Discord crashes.",default:!0},attemptToNavigateToHome:{type:3,description:"Whether to attempt to navigate to the home when preventing Discord crashes.",default:!1}}),Tp=0,$a=0,xp=!1,wp=y({name:"CrashHandler",description:"Utility plugin for handling and possibly recovering from Crashes without a restart",authors:[p.Nuckyz],enabledByDefault:!0,settings:bp,patches:[{find:".Messages.ERRORS_UNEXPECTED_CRASH",replacement:{match:/(?=this\.setState\()/,replace:"$self.handleCrash(this)||"}}],handleCrash(e){if(Date.now()-$a<=1e3&&!xp)return!0;if(xp=!1,++Tp>5){try{Ie({color:"#eed202",title:"Discord has crashed!",body:"Awn :( Discord has crashed more than five times, not attempting to recover.",noPersist:!0})}catch{}return $a=Date.now(),!1}setTimeout(()=>Tp--,6e4);try{return Tp===1&&Zi("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),bp.store.attemptToPreventCrashes?(this.handlePreventCrash(e),!0):!1}catch(t){return $o.error("Failed to handle crash",t),!1}finally{$a=Date.now()}},handlePreventCrash(e){if(Date.now()-$a>=1e3)try{Ie({color:"#eed202",title:"Discord has crashed!",body:"Attempting to recover...",noPersist:!0})}catch{}try{F.dispatch({type:"CONTEXT_MENU_CLOSE"})}catch(t){$o.debug("Failed to close open context menu.",t)}try{xP?.popAll()}catch(t){$o.debug("Failed to close old modals.",t)}try{Mc()}catch(t){$o.debug("Failed to close all open modals.",t)}try{F.dispatch({type:"USER_PROFILE_MODAL_CLOSE"})}catch(t){$o.debug("Failed to close user popout.",t)}try{F.dispatch({type:"LAYER_POP_ALL"})}catch(t){$o.debug("Failed to pop all layers.",t)}if(bp.store.attemptToNavigateToHome)try{dr.transitionTo("/channels/@me")}catch(t){$o.debug("Failed to navigate to home",t)}try{xp=!0,e.forceUpdate()}catch(t){$o.debug("Failed to update crash handler component.",t)}}})});function Ga(e){return Boolean(e)}function Mp(e){return e!=null}var Ha=g(()=>{"use strict";a()});async function Vv(e){return/https?:\/\/(cdn|media)\.discordapp\.(com|net)\/attachments\//.test(e)?"mp:"+e.replace(/https?:\/\/(cdn|media)\.discordapp\.(com|net)\//,""):(await pr.fetchAssetIds(Mr.store.appID,[e]))[0]}function Ct(){za(!0),E.plugins.CustomRPC.enabled&&za()}function n1(){return Mr.store.type!==1}function IP(e){return!n1()&&!/https?:\/\/(www\.)?(twitch\.tv|youtube\.com)\/\w+/.test(e)?"Streaming link must be a valid URL.":!0}function e1(){return Mr.store.timestampMode!==3}function t1(e){return/https?:\/\/(?!i\.)?imgur\.com\//.test(e)?"Imgur link must be a direct link to the image. (e.g. https://i.imgur.com/...)":/https?:\/\/(?!media\.)?tenor\.com\//.test(e)?"Tenor link must be a direct link to the image. (e.g. https://media.tenor.com/...)":!0}async function o1(){let{appID:e,appName:t,details:n,state:r,type:i,streamLink:s,startTime:l,endTime:c,imageBig:u,imageBigTooltip:d,imageSmall:m,imageSmallTooltip:h,buttonOneText:v,buttonOneURL:T,buttonTwoText:P,buttonTwoURL:b}=Mr.store;if(!t)return;let x={application_id:e||"0",name:t,state:r,details:n,type:i,flags:1<<0};switch(i===1&&(x.url=s),Mr.store.timestampMode){case 1:x.timestamps={start:Math.floor(Date.now()/1e3)};break;case 2:x.timestamps={start:Math.floor(Date.now()/1e3)-new Date().getHours()*3600-new Date().getMinutes()*60-new Date().getSeconds()};break;case 3:(l||c)&&(x.timestamps={},l&&(x.timestamps.start=l),c&&(x.timestamps.end=c));break;case 0:default:break}v&&(x.buttons=[v,P].filter(Ga),x.metadata={button_urls:[T,b].filter(Ga)}),u&&(x.assets={large_image:await Vv(u),large_text:d||void 0}),m&&(x.assets={...x.assets,small_image:await Vv(m),small_text:h||void 0});for(let C in x){if(C==="type")continue;let k=x[C];(!k||k.length===0)&&delete x[C]}return x}async function za(e){let t=await o1();F.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e?null:t,socketId:"CustomRPC"})}var wP,MP,PP,Mr,Pp,r1=g(()=>{"use strict";a();U();lo();M();Ha();st();w();j();I();wP=Xe("onOpenGameProfile"),MP=A("activity","buttonColor"),PP=A("profileColors");Mr=D({appID:{type:0,description:"Application ID (required)",onChange:Ct,isValid:e=>e?e&&!/^\d+$/.test(e)?"Application ID must be a number.":!0:"Application ID is required."},appName:{type:0,description:"Application name (required)",onChange:Ct,isValid:e=>e?e.length>128?"Application name must be not longer than 128 characters.":!0:"Application name is required."},details:{type:0,description:"Details (line 1)",onChange:Ct,isValid:e=>e&&e.length>128?"Details (line 1) must be not longer than 128 characters.":!0},state:{type:0,description:"State (line 2)",onChange:Ct,isValid:e=>e&&e.length>128?"State (line 2) must be not longer than 128 characters.":!0},type:{type:4,description:"Activity type",onChange:Ct,options:[{label:"Playing",value:0,default:!0},{label:"Streaming",value:1},{label:"Listening",value:2},{label:"Watching",value:3},{label:"Competing",value:5}]},streamLink:{type:0,description:"Twitch.tv or Youtube.com link (only for Streaming activity type)",onChange:Ct,disabled:n1,isValid:IP},timestampMode:{type:4,description:"Timestamp mode",onChange:Ct,options:[{label:"None",value:0,default:!0},{label:"Since discord open",value:1},{label:"Same as your current time",value:2},{label:"Custom",value:3}]},startTime:{type:1,description:"Start timestamp (only for custom timestamp mode)",onChange:Ct,disabled:e1,isValid:e=>e&&e<0?"Start timestamp must be greater than 0.":!0},endTime:{type:1,description:"End timestamp (only for custom timestamp mode)",onChange:Ct,disabled:e1,isValid:e=>e&&e<0?"End timestamp must be greater than 0.":!0},imageBig:{type:0,description:"Big image key/link",onChange:Ct,isValid:t1},imageBigTooltip:{type:0,description:"Big image tooltip",onChange:Ct,isValid:e=>e&&e.length>128?"Big image tooltip must be not longer than 128 characters.":!0},imageSmall:{type:0,description:"Small image key/link",onChange:Ct,isValid:t1},imageSmallTooltip:{type:0,description:"Small image tooltip",onChange:Ct,isValid:e=>e&&e.length>128?"Small image tooltip must be not longer than 128 characters.":!0},buttonOneText:{type:0,description:"Button 1 text",onChange:Ct,isValid:e=>e&&e.length>31?"Button 1 text must be not longer than 31 characters.":!0},buttonOneURL:{type:0,description:"Button 1 URL",onChange:Ct},buttonTwoText:{type:0,description:"Button 2 text",onChange:Ct,isValid:e=>e&&e.length>31?"Button 2 text must be not longer than 31 characters.":!0},buttonTwoURL:{type:0,description:"Button 2 URL",onChange:Ct}});Pp=y({name:"CustomRPC",description:"Allows you to set a custom rich presence.",authors:[p.captain,p.AutumnVN],start:za,stop:()=>za(!0),settings:Mr,settingsAboutComponent:()=>{let e=nt(o1);return o(f,null,o(S.FormText,null,"Go to ",o(rt,{href:"https://discord.com/developers/applications"},"Discord Developer Portal")," to create an application and get the application ID."),o(S.FormText,null,"Upload images in the Rich Presence tab to get the image keys."),o(S.FormText,null,"If you want to use image link, download your image and reupload the image to ",o(rt,{href:"https://imgur.com"},"Imgur"),' and get the image link by right-clicking the image and select "Copy image address".'),o(S.FormDivider,null),o("div",{style:{width:"284px"},className:PP.profileColors},e[0]&&o(wP,{activity:e[0],className:MP.activity,channelId:Pe.getChannelId(),guild:Te.getGuild(rn.getLastSelectedGuildId()),application:{id:Mr.store.appID},user:W.getCurrentUser()})))}})});var i1=g(()=>{});async function CP(){try{let{embed:e}=this.props;if(!e||e.dearrow||e.provider?.name!=="YouTube"||!e.video?.url)return;let t=AP.exec(e.video.url)?.[1];if(!t)return;let n=await fetch(`https://sponsor.ajay.app/api/branding?videoID=${t}`);if(!n.ok)return;let{titles:r,thumbnails:i}=await n.json(),s=r[0]?.votes>=0,l=i[0]?.votes>=0&&!i[0].original;if(!s&&!l)return;e.dearrow={enabled:!0},s&&(e.dearrow.oldTitle=e.rawTitle,e.rawTitle=r[0].title),l&&(e.dearrow.oldThumb=e.thumbnail.proxyURL,e.thumbnail.proxyURL=`https://dearrow-thumb.ajay.app/api/v1/getThumbnail?videoID=${t}&time=${i[0].timestamp}`),this.forceUpdate()}catch(e){new ie("Dearrow").error("Failed to dearrow embed",e)}}function NP({component:e}){let{embed:t}=e.props;return t?.dearrow?o(V,{text:t.dearrow.enabled?"This embed has been dearrowed, click to restore":"Click to dearrow"},({onMouseEnter:n,onMouseLeave:r})=>o("button",{onMouseEnter:n,onMouseLeave:r,className:"vc-dearrow-toggle-"+(t.dearrow.enabled?"on":"off"),onClick:()=>{let{enabled:i,oldThumb:s,oldTitle:l}=t.dearrow;t.dearrow.enabled=!i,l&&(t.dearrow.oldTitle=t.rawTitle,t.rawTitle=l),s&&(t.dearrow.oldThumb=t.thumbnail.proxyURL,t.thumbnail.proxyURL=s),e.forceUpdate()}},o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24px",height:"24px",viewBox:"0 0 36 36","aria-label":"Toggle Dearrow"},o("path",{fill:"#1213BD",d:"M36 18.302c0 4.981-2.46 9.198-5.655 12.462s-7.323 5.152-12.199 5.152s-9.764-1.112-12.959-4.376S0 23.283 0 18.302s2.574-9.38 5.769-12.644S13.271 0 18.146 0s9.394 2.178 12.589 5.442C33.931 8.706 36 13.322 36 18.302z"}),o("path",{fill:"#88c9f9",d:"m 30.394282,18.410186 c 0,3.468849 -1.143025,6.865475 -3.416513,9.137917 -2.273489,2.272442 -5.670115,2.92874 -9.137918,2.92874 -3.467803,0 -6.373515,-1.147212 -8.6470033,-3.419654 -2.2734888,-2.272442 -3.5871299,-5.178154 -3.5871299,-8.647003 0,-3.46885 0.9420533,-6.746149 3.2144954,-9.0196379 2.2724418,-2.2734888 5.5507878,-3.9513905 9.0196378,-3.9513905 3.46885,0 6.492841,1.9322561 8.76633,4.204698 2.273489,2.2724424 3.788101,5.2974804 3.788101,8.7663304 z"}),o("path",{fill:"#0a62a5",d:"m 23.95823,17.818306 c 0,3.153748 -2.644888,5.808102 -5.798635,5.808102 -3.153748,0 -5.599825,-2.654354 -5.599825,-5.808102 0,-3.153747 2.446077,-5.721714 5.599825,-5.721714 3.153747,0 5.798635,2.567967 5.798635,5.721714 z"})))):null}var AP,Ip,s1=g(()=>{"use strict";a();i1();le();M();Ze();w();I();AP=/https:\/\/www\.youtube\.com\/embed\/([a-zA-Z0-9_-]{11})/;Ip=y({name:"Dearrow",description:"Makes YouTube embed titles and thumbnails less sensationalist, powered by Dearrow",authors:[p.Ven],embedDidMount:CP,renderButton(e){return o(_,{noop:!0},o(NP,{component:e}))},patches:[{find:"this.renderInlineMediaEmbed",replacement:[{match:/render\(\)\{let\{embed:/,replace:"componentDidMount=$self.embedDidMount;$&"},{match:/children:\[(?=null!=\i\?\i\.renderSuppressButton)/,replace:"children:[$self.renderButton(this),"}]}]})});var Ap,a1=g(()=>{"use strict";a();M();w();Ap=y({name:"DisableDMCallIdle",description:"Disables automatically getting kicked from a DM voice call after 3 minutes.",authors:[p.Nuckyz],patches:[{find:".Messages.BOT_CALL_IDLE_DISCONNECT",replacement:{match:/(?<=function \i\(\){)(?=.{1,120}\.Messages\.BOT_CALL_IDLE_DISCONNECT)/,replace:"return;"}}]})});function Cp(e){return e.t==="Emoji"?`${location.protocol}//${window.GLOBAL_ENV.CDN_HOST}/emojis/${e.id}.${e.isAnimated?"gif":"png"}`:`${location.origin}/stickers/${e.id}.${LP[e.format_type]}`}async function u1(e){let t=kP.getStickerById(e);if(t)return t;let{body:n}=await wt.get({url:`/stickers/${e}`});return F.dispatch({type:"STICKER_FETCH_SUCCESS",sticker:n}),n}async function EP(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 p1(Cp(t)));let{body:r}=await wt.post({url:`/guilds/${e}/stickers`,body:n});F.dispatch({type:"GUILD_STICKERS_CREATE_SUCCESS",guildId:e,sticker:{...r,user:W.getCurrentUser()}})}async function DP(e,t){let n=await p1(Cp(t)),r=await new Promise(i=>{let s=new FileReader;s.onload=()=>i(s.result),s.readAsDataURL(n)});return RP.uploadEmoji({guildId:e,name:t.name.split("~")[0],image:r})}function OP(e){let t=W.getCurrentUser().id;return Object.values(Te.getGuilds()).filter(n=>{if(!(n.ownerId===t||(Ne.getGuildPermissions({id:n.id})&Se.CREATE_GUILD_EXPRESSIONS)===Se.CREATE_GUILD_EXPRESSIONS))return!1;if(e.t==="Sticker")return!0;let{isAnimated:i}=e,s=n.getMaxEmojiSlots(),{emojis:l}=In.getGuilds()[n.id],c=0;for(let u of l)u.animated===i&&c++;return c<s}).sort((n,r)=>n.name.localeCompare(r.name))}async function p1(e){let t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch ${e} - ${t.status}`);return t.blob()}async function _P(e,t){try{t.t==="Sticker"?await EP(e,t):await DP(e,t),ee.show({message:`Successfully cloned ${t.name} to ${Te.getGuild(e)?.name??"your server"}!`,type:ee.Type.SUCCESS,id:ee.genId()})}catch(n){let r="Something went wrong (check console!)";try{r=JSON.parse(n.text).message}catch{}new ie("EmoteCloner").error("Failed to clone",t.name,"to",e,n),ee.show({message:"Failed to clone: "+r,type:ee.Type.FAILURE,id:ee.genId()})}}function UP({data:e}){let[t,n]=O.useState(!1),[r,i]=O.useState(e.name),[s,l]=O.useReducer(u=>u+1,0),c=O.useMemo(()=>OP(e),[e.id,s]);return o(f,null,o(S.FormTitle,{className:q.top20},"Custom Name"),o(Fa,{value:r,onChange:u=>{e.name=u,i(u)},validate:u=>e.t==="Emoji"&&u.length>2&&u.length<32&&FP.test(u)||e.t==="Sticker"&&u.length>2&&u.length<30||"Name must be between 2 and 32 characters and only contain alphanumeric characters"}),o("div",{style:{display:"flex",flexWrap:"wrap",gap:"1em",padding:"1em 0.5em",justifyContent:"center",alignItems:"center"}},c.map(u=>o(V,{text:u.name},({onMouseLeave:d,onMouseEnter:m})=>o("div",{onMouseLeave:d,onMouseEnter:m,role:"button","aria-label":"Clone to "+u.name,"aria-disabled":t,style:{borderRadius:"50%",backgroundColor:"var(--background-secondary)",display:"inline-flex",justifyContent:"center",alignItems:"center",width:"4em",height:"4em",cursor:t?"not-allowed":"pointer",filter:t?"brightness(50%)":"none"},onClick:t?void 0:async()=>{n(!0),_P(u.id,e).finally(()=>{l(),n(!1)})}},u.icon?o("img",{"aria-hidden":!0,style:{borderRadius:"50%",width:"100%",height:"100%"},src:u.getIconURL(512,!0),alt:u.name}):o(S.FormText,{style:{fontSize:BP(u.acronym),width:"100%",overflow:"hidden",whiteSpace:"nowrap",textAlign:"center",cursor:t?"not-allowed":"pointer"}},u.acronym))))))}function ja(e,t){return o(G.MenuItem,{id:"emote-cloner",key:"emote-cloner",label:`Clone ${e}`,action:()=>Fi(async()=>{let n=await t(),r={t:e,...n},i=Cp(r);return s=>o(ze,{...s},o(at,null,o("img",{role:"presentation","aria-hidden":!0,src:i,alt:"",height:24,width:24,style:{marginRight:"0.5em"}}),o(S.FormText,null,"Clone ",r.name)),o(Ve,null,o(UP,{data:r})))})})}function d1(e){return new URL(e).pathname.endsWith(".gif")}var kP,RP,LP,BP,FP,l1,c1,Np,m1=g(()=>{"use strict";a();Mt();Hu();M();Ze();it();pt();w();j();I();kP=Me("StickersStore"),RP=A("fetchEmoji","uploadEmoji","deleteEmoji"),LP=[,"png","png","json","gif"];BP=e=>[20,20,18,18,16,14,12][e.length]??4,FP=/^\w+$/i;l1=(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(`<a?:(\\w+)(?:~\\d+)?:${n}>|https://cdn\\.discordapp\\.com/emojis/${n}\\.`));if(!c)return;let u=c[1]??"FakeNitroEmoji";return ja("Emoji",()=>({id:n,name:u,isAnimated:d1(r??i)}));case"sticker":return t.message.stickerItems.find(m=>m.id===n)?.format_type===3?void 0:ja("Sticker",()=>u1(n))}})();l&&dt("copy-link",e)?.push(l)},c1=(e,t)=>()=>{let{id:n,name:r,type:i}=t?.target?.dataset??{};if(!!n)if(i==="emoji"&&r){let s=t.target.firstChild;e.push(ja("Emoji",()=>({id:n,name:r,isAnimated:s&&d1(s.src)})))}else i==="sticker"&&!t.target.className?.includes("lottieCanvas")&&e.push(ja("Sticker",()=>u1(n)))},Np=y({name:"EmoteCloner",description:"Allows you to clone Emotes & Stickers to your own server (right click them)",tags:["StickerCloner"],authors:[p.Ven,p.Nuckyz],start(){ce("message",l1),ce("expression-picker",c1)},stop(){de("message",l1),de("expression-picker",c1)}})});var kp,f1,Rp,g1=g(()=>{"use strict";a();U();le();zr();M();it();w();j();I();kp=A("key","removeBuildOverride"),f1=D({enableIsStaff:{description:"Enable isStaff",type:3,default:!1,restartNeeded:!0}}),Rp=y({name:"Experiments",description:"Enable Access to Experiments in Discord!",authors:[p.Megu,p.Ven,p.Nickyux,p.BanTheNons,p.Nuckyz],settings:f1,patches:[{find:"Object.defineProperties(this,{isDeveloper",replacement:{match:/(?<={isDeveloper:\{[^}]+?,get:\(\)=>)\i/,replace:"true"}},{find:'type:"user",revision',replacement:{match:/!(\i)&&"CONNECTION_OPEN".+?;/g,replace:"$1=!0;"}},{find:".isStaff=()",predicate:()=>f1.store.enableIsStaff,replacement:[{match:/=>*?(\i)\.hasFlag\((\i\.\i)\.STAFF\)}/,replace:(e,t,n)=>`=>Vencord.Webpack.Common.UserStore.getCurrentUser()?.id===${t}.id||${t}.hasFlag(${n}.STAFF)}`},{match:/hasFreePremium\(\){return this.isStaff\(\)\s*?\|\|/,replace:"hasFreePremium(){return "}]},{find:'H1,title:"Experiments"',replacement:{match:'title:"Experiments",children:[',replace:"$&$self.WarningCard(),"}}],settingsAboutComponent:()=>{let e=navigator.platform.includes("Mac"),t=e?"cmd":"ctrl",n=e?"opt":"alt";return o(O.Fragment,null,o(S.FormTitle,{tag:"h3"},"More Information"),o(S.FormText,{variant:"text-md/normal"},"You can enable client DevTools"," ",o("kbd",{className:kp.key},t)," +"," ",o("kbd",{className:kp.key},n)," +"," ",o("kbd",{className:kp.key},"O")," ","after enabling ",o("code",null,"isStaff")," below"),o(S.FormText,null,"and then toggling ",o("code",null,"Enable DevTools")," in the ",o("code",null,"Developer Options")," tab in settings."))},WarningCard:_.wrap(()=>o(gn,{id:"vc-experiments-warning-card",className:q.bottom16},o(S.FormTitle,{tag:"h2"},"Hold on!!"),o(S.FormText,null,"Experiments are unreleased Discord features. They might not work, or even break your client or get your account disabled."),o(S.FormText,{className:q.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 Lp,h1=g(()=>{"use strict";a();M();w();Lp=y({name:"F8Break",description:"Pause the client when you press F8 with DevTools (+ breakpoints) open.",authors:[p.lewisakura],start(){window.addEventListener("keydown",this.event)},stop(){window.removeEventListener("keydown",this.event)},event(e){if(e.code==="F8")debugger}})});var y1=g(()=>{"use strict";a()});var S1=or((D8,v1)=>{"use strict";a();var co=v1.exports;(function e(t,n,r){function i(c,u){if(!n[c]){if(!t[c]){var d=typeof Lr=="function"&&Lr;if(!u&&d)return d(c,!0);if(s)return s(c,!0);throw new Error("Cannot find module '"+c+"'")}var m=n[c]={exports:{}};t[c][0].call(m.exports,function(h){var v=t[c][1][h];return i(v||h)},m,m.exports,e,t,n,r)}return n[c].exports}for(var s=typeof Lr=="function"&&Lr,l=0;l<r.length;l++)i(r[l]);return i})({1:[function(e,t,n){(function(r,i){var s,l;s=this,l=function(){"use strict";function c(N){return typeof N=="function"}var u=Array.isArray?Array.isArray:function(N){return Object.prototype.toString.call(N)==="[object Array]"},d=0,m=void 0,h=void 0,v=function(N,H){B[d]=N,B[d+1]=H,(d+=2)===2&&(h?h($):X())},T=typeof window<"u"?window:void 0,P=T||{},b=P.MutationObserver||P.WebKitMutationObserver,x=typeof co>"u"&&r!==void 0&&{}.toString.call(r)==="[object process]",C=typeof Uint8ClampedArray<"u"&&typeof importScripts<"u"&&typeof MessageChannel<"u";function k(){var N=setTimeout;return function(){return N($,1)}}var B=new Array(1e3);function $(){for(var N=0;N<d;N+=2)(0,B[N])(B[N+1]),B[N]=void 0,B[N+1]=void 0;d=0}var Y,K,z,L,X=void 0;function ne(N,H){var se=this,te=new this.constructor(Ae);te[ae]===void 0&&So(te);var fe=se._state;if(fe){var Ee=arguments[fe-1];v(function(){return gt(fe,te,Ee,se._result)})}else Wt(se,te,N,H);return te}function be(N){if(N&&typeof N=="object"&&N.constructor===this)return N;var H=new this(Ae);return pe(H,N),H}X=x?function(){return r.nextTick($)}:b?(K=0,z=new b($),L=document.createTextNode(""),z.observe(L,{characterData:!0}),function(){L.data=K=++K%2}):C?((Y=new MessageChannel).port1.onmessage=$,function(){return Y.port2.postMessage(0)}):T===void 0&&typeof e=="function"?function(){try{var N=Function("return this")().require("vertx");return(m=N.runOnLoop||N.runOnContext)!==void 0?function(){m($)}:k()}catch{return k()}}():k();var ae=Math.random().toString(36).substring(2);function Ae(){}var me=void 0,ye=1,xe=2;function we(N,H,se){v(function(te){var fe=!1,Ee=function(Tt,Zn,nr,G2){try{Tt.call(Zn,nr,G2)}catch(H2){return H2}}(se,H,function(Tt){fe||(fe=!0,H!==Tt?pe(te,Tt):Ye(te,Tt))},function(Tt){fe||(fe=!0,Ce(te,Tt))},te._label);!fe&&Ee&&(fe=!0,Ce(te,Ee))},N)}function ve(N,H,se){H.constructor===N.constructor&&se===ne&&H.constructor.resolve===be?function(te,fe){fe._state===ye?Ye(te,fe._result):fe._state===xe?Ce(te,fe._result):Wt(fe,void 0,function(Ee){return pe(te,Ee)},function(Ee){return Ce(te,Ee)})}(N,H):se===void 0?Ye(N,H):c(se)?we(N,H,se):Ye(N,H)}function pe(N,H){if(N===H)Ce(N,new TypeError("You cannot resolve a promise with itself"));else if(function(te){var fe=typeof te;return te!==null&&(fe=="object"||fe=="function")}(H)){var se=void 0;try{se=H.then}catch(te){return void Ce(N,te)}ve(N,H,se)}else Ye(N,H)}function ft(N){N._onerror&&N._onerror(N._result),bt(N)}function Ye(N,H){N._state===me&&(N._result=H,N._state=ye,N._subscribers.length!==0&&v(bt,N))}function Ce(N,H){N._state===me&&(N._state=xe,N._result=H,v(ft,N))}function Wt(N,H,se,te){var fe=N._subscribers,Ee=fe.length;N._onerror=null,fe[Ee]=H,fe[Ee+ye]=se,fe[Ee+xe]=te,Ee===0&&N._state&&v(bt,N)}function bt(N){var H=N._subscribers,se=N._state;if(H.length!==0){for(var te=void 0,fe=void 0,Ee=N._result,Tt=0;Tt<H.length;Tt+=3)te=H[Tt],fe=H[Tt+se],te?gt(se,te,fe,Ee):fe(Ee);N._subscribers.length=0}}function gt(N,H,se,te){var fe=c(se),Ee=void 0,Tt=void 0,Zn=!0;if(fe){try{Ee=se(te)}catch(nr){Zn=!1,Tt=nr}if(H===Ee)return void Ce(H,new TypeError("A promises callback cannot return that same promise."))}else Ee=te;H._state!==me||(fe&&Zn?pe(H,Ee):Zn===!1?Ce(H,Tt):N===ye?Ye(H,Ee):N===xe&&Ce(H,Ee))}var Vo=0;function So(N){N[ae]=Vo++,N._state=void 0,N._result=void 0,N._subscribers=[]}var bo=(er.prototype._enumerate=function(N){for(var H=0;this._state===me&&H<N.length;H++)this._eachEntry(N[H],H)},er.prototype._eachEntry=function(N,H){var se=this._instanceConstructor,te=se.resolve;if(te===be){var fe=void 0,Ee=void 0,Tt=!1;try{fe=N.then}catch(nr){Tt=!0,Ee=nr}if(fe===ne&&N._state!==me)this._settledAt(N._state,H,N._result);else if(typeof fe!="function")this._remaining--,this._result[H]=N;else if(se===Nt){var Zn=new se(Ae);Tt?Ce(Zn,Ee):ve(Zn,N,fe),this._willSettleAt(Zn,H)}else this._willSettleAt(new se(function(nr){return nr(N)}),H)}else this._willSettleAt(te(N),H)},er.prototype._settledAt=function(N,H,se){var te=this.promise;te._state===me&&(this._remaining--,N===xe?Ce(te,se):this._result[H]=se),this._remaining===0&&Ye(te,this._result)},er.prototype._willSettleAt=function(N,H){var se=this;Wt(N,void 0,function(te){return se._settledAt(ye,H,te)},function(te){return se._settledAt(xe,H,te)})},er);function er(N,H){this._instanceConstructor=N,this.promise=new N(Ae),this.promise[ae]||So(this.promise),u(H)?(this.length=H.length,this._remaining=H.length,this._result=new Array(this.length),this.length===0?Ye(this.promise,this._result):(this.length=this.length||0,this._enumerate(H),this._remaining===0&&Ye(this.promise,this._result))):Ce(this.promise,new Error("Array Methods must be provided an Array"))}var Nt=(tr.prototype.catch=function(N){return this.then(null,N)},tr.prototype.finally=function(N){var H=this.constructor;return c(N)?this.then(function(se){return H.resolve(N()).then(function(){return se})},function(se){return H.resolve(N()).then(function(){throw se})}):this.then(N,N)},tr);function tr(N){this[ae]=Vo++,this._result=this._state=void 0,this._subscribers=[],Ae!==N&&(typeof N!="function"&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof tr?function(H,se){try{se(function(te){pe(H,te)},function(te){Ce(H,te)})}catch(te){Ce(H,te)}}(this,N):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return Nt.prototype.then=ne,Nt.all=function(N){return new bo(this,N).promise},Nt.race=function(N){var H=this;return u(N)?new H(function(se,te){for(var fe=N.length,Ee=0;Ee<fe;Ee++)H.resolve(N[Ee]).then(se,te)}):new H(function(se,te){return te(new TypeError("You must pass an array to race."))})},Nt.resolve=be,Nt.reject=function(N){var H=new this(Ae);return Ce(H,N),H},Nt._setScheduler=function(N){h=N},Nt._setAsap=function(N){v=N},Nt._asap=v,Nt.polyfill=function(){var N=void 0;if(i!==void 0)N=i;else if(typeof co<"u")N=co;else try{N=Function("return this")()}catch{throw new Error("polyfill failed because global object is unavailable in this environment")}var H=N.Promise;if(H){var se=null;try{se=Object.prototype.toString.call(H.resolve())}catch{}if(se==="[object Promise]"&&!H.cast)return}N.Promise=Nt},Nt.Promise=Nt},typeof n=="object"&&t!==void 0?t.exports=l():typeof define=="function"&&define.amd?define(l):s.ES6Promise=l()}).call(this,e("VCmEsw"),typeof co<"u"?co:typeof window<"u"?window:{})},{VCmEsw:2}],2:[function(e,t,n){var r=t.exports={};function i(){}r.nextTick=function(){var s=typeof window<"u"&&window.setImmediate,l=typeof window<"u"&&window.postMessage&&window.addEventListener;if(s)return function(u){return window.setImmediate(u)};if(l){var c=[];return window.addEventListener("message",function(u){var d=u.source;d!==window&&d!==null||u.data!=="process-tick"||(u.stopPropagation(),0<c.length&&c.shift()())},!0),function(u){c.push(u),window.postMessage("process-tick","*")}}return function(u){setTimeout(u,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.on=i,r.addListener=i,r.once=i,r.off=i,r.removeListener=i,r.removeAllListeners=i,r.emit=i,r.binding=function(s){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(s){throw new Error("process.chdir is not supported")}},{}],3:[function(e,t,n){"use strict";t.exports=function(){this.width=0,this.height=0,this.numPlays=0,this.playTime=0,this.frames=[],this.play=function(){c||u||(this.rewind(),c=!0,requestAnimationFrame(m))},this.rewind=function(){s=i=0,l=null,u=c=!1},this.addContext=function(v){if(0<d.length){var T=d[0].getImageData(0,0,this.width,this.height);v.putImageData(T,0,0)}d.push(v),v._apng_animation=this},this.removeContext=function(v){var T=d.indexOf(v);T!==-1&&(d.splice(T,1),d.length===0&&this.rewind(),"_apng_animation"in v&&delete v._apng_animation)},this.isPlayed=function(){return c},this.isFinished=function(){return u};var r=this,i=0,s=0,l=null,c=!1,u=!1,d=[],m=function(v){for(;c&&i<=v;)h(v);c&&requestAnimationFrame(m)},h=function(v){var T=s++%r.frames.length,P=r.frames[T];if(r.numPlays==0||s/r.frames.length<=r.numPlays){for(T==0&&(d.forEach(function(b){b.clearRect(0,0,r.width,r.height)}),l=null,P.disposeOp==2&&(P.disposeOp=1)),l&&l.disposeOp==1?d.forEach(function(b){b.clearRect(l.left,l.top,l.width,l.height)}):l&&l.disposeOp==2&&d.forEach(function(b){b.putImageData(l.iData,l.left,l.top)}),(l=P).iData=null,l.disposeOp==2&&(l.iData=d[0].getImageData(P.left,P.top,P.width,P.height)),P.blendOp==0&&d.forEach(function(b){b.clearRect(P.left,P.top,P.width,P.height)}),d.forEach(function(b){b.drawImage(P.img,P.left,P.top)}),i==0&&(i=v);v>i+r.playTime;)i+=r.playTime;i+=P.delay}else u=!(c=!1)}}},{}],4:[function(e,t,n){"use strict";for(var r=new Uint32Array(256),i=0;i<256;i++){for(var s=i,l=0;l<8;l++)s=1&s?3988292384^s>>>1:s>>>1;r[i]=s}t.exports=function(c,u,d){for(var m=-1,h=u=u||0,v=u+(d=d||c.length-u);h<v;h++)m=m>>>8^r[255&(m^c[h])];return-1^m}},{}],5:[function(e,t,n){(function(r){"use strict";var i=e("./support-test"),s=e("./parser"),l=e("./loader"),c=r.APNG={};c.checkNativeFeatures=i.checkNativeFeatures,c.ifNeeded=i.ifNeeded,c.parseBuffer=function(d){return s(d)};var u={};c.parseURL=function(d){return d in u||(u[d]=l(d).then(s)),u[d]},c.animateContext=function(d,m){return c.parseURL(d).then(function(h){return h.addContext(m),h.play(),h})},c.animateImage=function(d){return d.setAttribute("data-is-apng","progress"),c.parseURL(d.src).then(function(m){d.setAttribute("data-is-apng","yes");var h=document.createElement("canvas");h.width=m.width,h.height=m.height,Array.prototype.slice.call(d.attributes).forEach(function(C){["alt","src","usemap","ismap","data-is-apng","width","height"].indexOf(C.nodeName)==-1&&h.setAttributeNode(C.cloneNode(!1))}),h.setAttribute("data-apng-src",d.src),d.alt!=""&&h.appendChild(document.createTextNode(d.alt));var v="",T="",P=0,b="";d.style.width!=""&&d.style.width!="auto"?v=d.style.width:d.hasAttribute("width")&&(v=d.getAttribute("width")+"px"),d.style.height!=""&&d.style.height!="auto"?T=d.style.height:d.hasAttribute("height")&&(T=d.getAttribute("height")+"px"),v!=""&&T==""&&(P=parseFloat(v),b=v.match(/\D+$/)[0],T=Math.round(h.height*P/h.width)+b),T!=""&&v==""&&(P=parseFloat(T),b=T.match(/\D+$/)[0],v=Math.round(h.width*P/h.height)+b),h.style.width=v,h.style.height=T;var x=d.parentNode;x.insertBefore(h,d),x.removeChild(d),m.addContext(h.getContext("2d")),m.play()},function(){d.setAttribute("data-is-apng","no")})},c.releaseCanvas=function(d){var m=d.getContext("2d");"_apng_animation"in m&&m._apng_animation.removeContext(m)}}).call(this,typeof co<"u"?co:typeof window<"u"?window:{})},{"./loader":6,"./parser":7,"./support-test":8}],6:[function(e,t,n){"use strict";var r=r||e("es6-promise").Promise;t.exports=function(i){return new r(function(s,l){var c=new XMLHttpRequest;c.open("GET",i),c.responseType="arraybuffer",c.onload=function(){this.status==200?s(this.response):l(this)},c.send()})}},{"es6-promise":1}],7:[function(e,t,n){"use strict";var r=r||e("es6-promise").Promise,i=e("./animation"),s=e("./crc32"),l=new Uint8Array([137,80,78,71,13,10,26,10]);t.exports=function(b){var x=new Uint8Array(b);return new r(function(C,k){for(var B=0;B<l.length;B++)if(l[B]!=x[B])return void k("Not a PNG file (invalid file signature)");var $=!1;if(c(x,function(we){return we!="acTL"||!($=!0)}),$){var Y=[],K=[],z=null,L=null,X=new i;if(c(x,function(we,ve,pe,ft){switch(we){case"IHDR":z=ve.subarray(pe+8,pe+8+ft),X.width=u(ve,pe+8),X.height=u(ve,pe+12);break;case"acTL":X.numPlays=u(ve,pe+8+4);break;case"fcTL":L&&X.frames.push(L),(L={}).width=u(ve,pe+8+4),L.height=u(ve,pe+8+8),L.left=u(ve,pe+8+12),L.top=u(ve,pe+8+16);var Ye=d(ve,pe+8+20),Ce=d(ve,pe+8+22);Ce==0&&(Ce=100),L.delay=1e3*Ye/Ce,L.delay<=10&&(L.delay=100),X.playTime+=L.delay,L.disposeOp=m(ve,pe+8+24),L.blendOp=m(ve,pe+8+25),L.dataParts=[];break;case"fdAT":L&&L.dataParts.push(ve.subarray(pe+8+4,pe+8+ft));break;case"IDAT":L&&L.dataParts.push(ve.subarray(pe+8,pe+8+ft));break;case"IEND":K.push(h(ve,pe,12+ft));break;default:Y.push(h(ve,pe,12+ft))}}),L&&X.frames.push(L),X.frames.length!=0)for(var ne=0,be=new Blob(Y),ae=new Blob(K),Ae=0;Ae<X.frames.length;Ae++){L=X.frames[Ae];var me=[];me.push(l),z.set(T(L.width),0),z.set(T(L.height),4),me.push(P("IHDR",z)),me.push(be);for(var ye=0;ye<L.dataParts.length;ye++)me.push(P("IDAT",L.dataParts[ye]));me.push(ae);var xe=URL.createObjectURL(new Blob(me,{type:"image/png"}));delete L.dataParts,me=null,L.img=document.createElement("img"),L.img.onload=function(){URL.revokeObjectURL(this.src),++ne==X.frames.length&&C(X)},L.img.onerror=function(){k("Image creation error")},L.img.src=xe}else k("Not an animated PNG")}else k("Not an animated PNG")})};var c=function(b,x){var C=8;do{var k=u(b,C),B=v(b,C+4,4),$=x(B,b,C,k);C+=12+k}while($!==!1&&B!="IEND"&&C<b.length)},u=function(b,x){var C=0;C+=b[0+x]<<24>>>0;for(var k=1;k<4;k++)C+=b[k+x]<<8*(3-k);return C},d=function(b,x){for(var C=0,k=0;k<2;k++)C+=b[k+x]<<8*(1-k);return C},m=function(b,x){return b[x]},h=function(b,x,C){var k=new Uint8Array(C);return k.set(b.subarray(x,x+C)),k},v=function(b,x,C){var k=Array.prototype.slice.call(b.subarray(x,x+C));return String.fromCharCode.apply(String,k)},T=function(b){return[b>>>24&255,b>>>16&255,b>>>8&255,255&b]},P=function(b,x){var C=b.length+x.length,k=new Uint8Array(new ArrayBuffer(C+8));k.set(T(x.length),0),k.set(function($){for(var Y=[],K=0;K<$.length;K++)Y.push($.charCodeAt(K));return Y}(b),4),k.set(x,8);var B=s(k,4,C);return k.set(T(B),C+4),k}},{"./animation":3,"./crc32":4,"es6-promise":1}],8:[function(e,t,n){(function(r){"use strict";var i,s,l=l||e("es6-promise").Promise,c=(i=function(u){var d=document.createElement("canvas"),m={TypedArrays:"ArrayBuffer"in r,BlobURLs:"URL"in r,requestAnimationFrame:"requestAnimationFrame"in r,pageProtocol:location.protocol=="http:"||location.protocol=="https:",canvas:"getContext"in document.createElement("canvas"),APNG:!1};if(m.canvas){var h=new Image;h.onload=function(){var v=d.getContext("2d");v.drawImage(h,0,0),m.APNG=v.getImageData(0,0,1,1).data[3]===0,u(m)},h.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACGFjVEwAAAABAAAAAcMq2TYAAAANSURBVAiZY2BgYPgPAAEEAQB9ssjfAAAAGmZjVEwAAAAAAAAAAQAAAAEAAAAAAAAAAAD6A+gBAbNU+2sAAAARZmRBVAAAAAEImWNgYGBgAAAABQAB6MzFdgAAAABJRU5ErkJggg=="}else u(m)},s=null,function(u){return s=s||new l(i),u&&s.then(u),s});t.exports={checkNativeFeatures:c,ifNeeded:function(u){return u===void 0&&(u=!1),c().then(function(d){if(d.APNG&&!u)reject();else{var m=!0;for(var h in d)d.hasOwnProperty(h)&&h!="APNG"&&(m=m&&d[h])}})}}}).call(this,typeof co<"u"?co:typeof window<"u"?window:{})},{"es6-promise":1}]},{},[5])});var b1,$P,$8,T1,x1,w1,Wa=g(()=>{"use strict";a();rr();y1();b1=xo(()=>S1().APNG),$P="https://unpkg.com/@sapphi-red/web-noise-suppressor@0.3.3/dist",$8=`${$P}/rnnoise/workletProcessor.js`,T1="https://unpkg.com/@vap/shiki-worker@0.0.8/dist/index.min.js",x1="https://unpkg.com/@vap/shiki@0.10.3/dist/onig.wasm",w1=xo(()=>import("https://unpkg.com/stegcloak-dist@1.0.0/index.js"))});var Bp=or(_p=>{a();var A1=Object.defineProperty,GP=e=>A1(e,"__esModule",{value:!0}),HP=(e,t)=>{for(var n in t)A1(e,n,{get:t[n],enumerable:!0})};GP(_p);HP(_p,{GIFEncoder:()=>D1,applyPalette:()=>JP,default:()=>aI,nearestColor:()=>tI,nearestColorIndex:()=>L1,nearestColorIndexWithDistance:()=>E1,prequantize:()=>XP,quantize:()=>YP,snapColorsToPalette:()=>eI});var zP={signature:"GIF",version:"89a",trailer:59,extensionIntroducer:33,applicationExtensionLabel:255,graphicControlExtensionLabel:249,imageSeparator:44,signatureSize:3,versionSize:3,globalColorTableFlagMask:128,colorResolutionMask:112,sortFlagMask:8,globalColorTableSizeMask:7,applicationIdentifierSize:8,applicationAuthCodeSize:3,disposalMethodMask:28,userInputFlagMask:2,transparentColorFlagMask:1,localColorTableFlagMask:128,interlaceFlagMask:64,idSortFlagMask:32,localColorTableSizeMask:7};function C1(e=256){let t=0,n=new Uint8Array(e);return{get buffer(){return n.buffer},reset(){t=0},bytesView(){return n.subarray(0,t)},bytes(){return n.slice(0,t)},writeByte(i){r(t+1),n[t]=i,t++},writeBytes(i,s=0,l=i.length){r(t+l);for(let c=0;c<l;c++)n[t++]=i[c+s]},writeBytesView(i,s=0,l=i.byteLength){r(t+l),n.set(i.subarray(s,s+l),t),t+=l}};function r(i){var s=n.length;if(s>=i)return;var l=1024*1024;i=Math.max(i,s*(s<l?2:1.125)>>>0),s!=0&&(i=Math.max(i,256));let c=n;n=new Uint8Array(i),t>0&&n.set(c.subarray(0,t),0)}}var Ep=12,M1=5003,jP=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function WP(e,t,n,r,i=C1(512),s=new Uint8Array(256),l=new Int32Array(M1),c=new Int32Array(M1)){let u=l.length,d=Math.max(2,r);s.fill(0),c.fill(0),l.fill(-1);let m=0,h=0,v=d+1,T=v,P=!1,b=T,x=(1<<b)-1,C=1<<v-1,k=C+1,B=C+2,$=0,Y=n[0],K=0;for(let X=u;X<65536;X*=2)++K;K=8-K,i.writeByte(d),L(C);let z=n.length;for(let X=1;X<z;X++){e:{let ne=n[X],be=(ne<<Ep)+Y,ae=ne<<K^Y;if(l[ae]===be){Y=c[ae];break e}let Ae=ae===0?1:u-ae;for(;l[ae]>=0;)if(ae-=Ae,ae<0&&(ae+=u),l[ae]===be){Y=c[ae];break e}L(Y),Y=ne,B<1<<Ep?(c[ae]=B++,l[ae]=be):(l.fill(-1),B=C+2,P=!0,L(C))}}return L(Y),L(k),i.writeByte(0),i.bytesView();function L(X){for(m&=jP[h],h>0?m|=X<<h:m=X,h+=b;h>=8;)s[$++]=m&255,$>=254&&(i.writeByte($),i.writeBytesView(s,0,$),$=0),m>>=8,h-=8;if((B>x||P)&&(P?(b=T,x=(1<<b)-1,P=!1):(++b,x=b===Ep?1<<b:(1<<b)-1)),X==k){for(;h>0;)s[$++]=m&255,$>=254&&(i.writeByte($),i.writeBytesView(s,0,$),$=0),m>>=8,h-=8;$>0&&(i.writeByte($),i.writeBytesView(s,0,$),$=0)}}}var qP=WP;function N1(e,t,n){return e<<8&63488|t<<2&992|n>>3}function k1(e,t,n,r){return e>>4|t&240|(n&240)<<4|(r&240)<<8}function R1(e,t,n){return e>>4<<8|t&240|n>>4}function qa(e,t,n){return e<t?t:e>n?n:e}function fs(e){return e*e}function P1(e,t,n){var r=0,i=1e100;let s=e[t],l=s.cnt,c=s.ac,u=s.rc,d=s.gc,m=s.bc;for(var h=s.fw;h!=0;h=e[h].fw){let T=e[h],P=T.cnt,b=l*P/(l+P);if(!(b>=i)){var v=0;n&&(v+=b*fs(T.ac-c),v>=i)||(v+=b*fs(T.rc-u),!(v>=i)&&(v+=b*fs(T.gc-d),!(v>=i)&&(v+=b*fs(T.bc-m),!(v>=i)&&(i=v,r=h))))}}s.err=i,s.nn=r}function Dp(){return{ac:0,rc:0,gc:0,bc:0,cnt:0,nn:0,fw:0,bk:0,tm:0,mtm:0,err:0}}function KP(e,t){let n=t==="rgb444"?4096:65536,r=new Array(n),i=e.length;if(t==="rgba4444")for(let s=0;s<i;++s){let l=e[s],c=l>>24&255,u=l>>16&255,d=l>>8&255,m=l&255,h=k1(m,d,u,c),v=h in r?r[h]:r[h]=Dp();v.rc+=m,v.gc+=d,v.bc+=u,v.ac+=c,v.cnt++}else if(t==="rgb444")for(let s=0;s<i;++s){let l=e[s],c=l>>16&255,u=l>>8&255,d=l&255,m=R1(d,u,c),h=m in r?r[m]:r[m]=Dp();h.rc+=d,h.gc+=u,h.bc+=c,h.cnt++}else for(let s=0;s<i;++s){let l=e[s],c=l>>16&255,u=l>>8&255,d=l&255,m=N1(d,u,c),h=m in r?r[m]:r[m]=Dp();h.rc+=d,h.gc+=u,h.bc+=c,h.cnt++}return r}function YP(e,t,n={}){let{format:r="rgb565",clearAlpha:i=!0,clearAlphaColor:s=0,clearAlphaThreshold:l=0,oneBitAlpha:c=!1}=n;if(!e||!e.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(e instanceof Uint8Array)&&!(e instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");let u=new Uint32Array(e.buffer),d=n.useSqrt!==!1,m=r==="rgba4444",h=KP(u,r),v=h.length,T=v-1,P=new Uint32Array(v+1);for(var b=0,C=0;C<v;++C){let ye=h[C];if(ye!=null){var x=1/ye.cnt;m&&(ye.ac*=x),ye.rc*=x,ye.gc*=x,ye.bc*=x,h[b++]=ye}}fs(t)/b<.022&&(d=!1);for(var C=0;C<b-1;++C)h[C].fw=C+1,h[C+1].bk=C,d&&(h[C].cnt=Math.sqrt(h[C].cnt));d&&(h[C].cnt=Math.sqrt(h[C].cnt));var k,B,$;for(C=0;C<b;++C){P1(h,C,!1);var Y=h[C].err;for(B=++P[0];B>1&&($=B>>1,!(h[k=P[$]].err<=Y));B=$)P[B]=k;P[B]=C}var K=b-t;for(C=0;C<K;){for(var z;;){var L=P[1];if(z=h[L],z.tm>=z.mtm&&h[z.nn].mtm<=z.tm)break;z.mtm==T?L=P[1]=P[P[0]--]:(P1(h,L,!1),z.tm=C);var Y=h[L].err;for(B=1;($=B+B)<=P[0]&&($<P[0]&&h[P[$]].err>h[P[$+1]].err&&$++,!(Y<=h[k=P[$]].err));B=$)P[B]=k;P[B]=L}var X=h[z.nn],ne=z.cnt,be=X.cnt,x=1/(ne+be);m&&(z.ac=x*(ne*z.ac+be*X.ac)),z.rc=x*(ne*z.rc+be*X.rc),z.gc=x*(ne*z.gc+be*X.gc),z.bc=x*(ne*z.bc+be*X.bc),z.cnt+=X.cnt,z.mtm=++C,h[X.bk].fw=X.fw,h[X.fw].bk=X.bk,X.mtm=T}let ae=[];var Ae=0;for(C=0;;++Ae){let me=qa(Math.round(h[C].rc),0,255),ye=qa(Math.round(h[C].gc),0,255),xe=qa(Math.round(h[C].bc),0,255),we=255;m&&(we=qa(Math.round(h[C].ac),0,255),c&&(we=we<=(typeof c=="number"?c:127)?0:255),i&&we<=l&&(me=ye=xe=s,we=0));let ve=m?[me,ye,xe,we]:[me,ye,xe];if(ZP(ae,ve)||ae.push(ve),(C=h[C].fw)==0)break}return ae}function ZP(e,t){for(let n=0;n<e.length;n++){let r=e[n],i=r[0]===t[0]&&r[1]===t[1]&&r[2]===t[2],s=r.length>=4&&t.length>=4?r[3]===t[3]:!0;if(i&&s)return!0}return!1}function Ya(e,t){var n=0,r;for(r=0;r<e.length;r++){let i=e[r]-t[r];n+=i*i}return n}function Ka(e,t){return t>1?Math.round(e/t)*t:e}function XP(e,{roundRGB:t=5,roundAlpha:n=10,oneBitAlpha:r=null}={}){let i=new Uint32Array(e.buffer);for(let s=0;s<i.length;s++){let l=i[s],c=l>>24&255,u=l>>16&255,d=l>>8&255,m=l&255;c=Ka(c,n),r&&(c=c<=(typeof r=="number"?r:127)?0:255),m=Ka(m,t),d=Ka(d,t),u=Ka(u,t),i[s]=c<<24|u<<16|d<<8|m<<0}}function JP(e,t,n="rgb565"){if(!e||!e.buffer)throw new Error("quantize() expected RGBA Uint8Array data");if(!(e instanceof Uint8Array)&&!(e instanceof Uint8ClampedArray))throw new Error("quantize() expected RGBA Uint8Array data");if(t.length>256)throw new Error("applyPalette() only works with 256 colors or less");let r=new Uint32Array(e.buffer),i=r.length,s=n==="rgb444"?4096:65536,l=new Uint8Array(i),c=new Array(s),u=n==="rgba4444";if(n==="rgba4444")for(let d=0;d<i;d++){let m=r[d],h=m>>24&255,v=m>>16&255,T=m>>8&255,P=m&255,b=k1(P,T,v,h),x=b in c?c[b]:c[b]=QP(P,T,v,h,t);l[d]=x}else{let d=n==="rgb444"?R1:N1;for(let m=0;m<i;m++){let h=r[m],v=h>>16&255,T=h>>8&255,P=h&255,b=d(P,T,v),x=b in c?c[b]:c[b]=VP(P,T,v,t);l[m]=x}}return l}function QP(e,t,n,r,i){let s=0,l=1e100;for(let c=0;c<i.length;c++){let u=i[c],d=u[3],m=Pr(d-r);if(m>l)continue;let h=u[0];if(m+=Pr(h-e),m>l)continue;let v=u[1];if(m+=Pr(v-t),m>l)continue;let T=u[2];m+=Pr(T-n),!(m>l)&&(l=m,s=c)}return s}function VP(e,t,n,r){let i=0,s=1e100;for(let l=0;l<r.length;l++){let c=r[l],u=c[0],d=Pr(u-e);if(d>s)continue;let m=c[1];if(d+=Pr(m-t),d>s)continue;let h=c[2];d+=Pr(h-n),!(d>s)&&(s=d,i=l)}return i}function eI(e,t,n=5){if(!e.length||!t.length)return;let r=e.map(l=>l.slice(0,3)),i=n*n,s=e[0].length;for(let l=0;l<t.length;l++){let c=t[l];c.length<s?c=[c[0],c[1],c[2],255]:c.length>s?c=c.slice(0,3):c=c.slice();let u=E1(r,c.slice(0,3),Ya),d=u[0],m=u[1];m>0&&m<=i&&(e[d]=c)}}function Pr(e){return e*e}function L1(e,t,n=Ya){let r=1/0,i=-1;for(let s=0;s<e.length;s++){let l=e[s],c=n(t,l);c<r&&(r=c,i=s)}return i}function E1(e,t,n=Ya){let r=1/0,i=-1;for(let s=0;s<e.length;s++){let l=e[s],c=n(t,l);c<r&&(r=c,i=s)}return[i,r]}function tI(e,t,n=Ya){return e[L1(e,t,n)]}function D1(e={}){let{initialCapacity:t=4096,auto:n=!0}=e,r=C1(t),i=5003,s=new Uint8Array(256),l=new Int32Array(i),c=new Int32Array(i),u=!1;return{reset(){r.reset(),u=!1},finish(){r.writeByte(zP.trailer)},bytes(){return r.bytes()},bytesView(){return r.bytesView()},get buffer(){return r.buffer},get stream(){return r},writeHeader:d,writeFrame(m,h,v,T={}){let{transparent:P=!1,transparentIndex:b=0,delay:x=0,palette:C=null,repeat:k=0,colorDepth:B=8,dispose:$=-1}=T,Y=!1;if(n?u||(Y=!0,d(),u=!0):Y=Boolean(T.first),h=Math.max(0,Math.floor(h)),v=Math.max(0,Math.floor(v)),Y){if(!C)throw new Error("First frame must include a { palette } option");oI(r,h,v,C,B),I1(r,C),k>=0&&rI(r,k)}let K=Math.round(x/10);nI(r,$,K,P,b);let z=Boolean(C)&&!Y;iI(r,h,v,z?C:null),z&&I1(r,C),sI(r,m,h,v,B,s,l,c)}};function d(){O1(r,"GIF89a")}}function nI(e,t,n,r,i){e.writeByte(33),e.writeByte(249),e.writeByte(4),i<0&&(i=0,r=!1);var s,l;r?(s=1,l=2):(s=0,l=0),t>=0&&(l=t&7),l<<=2;let c=0;e.writeByte(0|l|c|s),Go(e,n),e.writeByte(i||0),e.writeByte(0)}function oI(e,t,n,r,i=8){let c=Op(r.length)-1,u=1<<7|i-1<<4|0<<3|c,d=0,m=0;Go(e,t),Go(e,n),e.writeBytes([u,d,m])}function rI(e,t){e.writeByte(33),e.writeByte(255),e.writeByte(11),O1(e,"NETSCAPE2.0"),e.writeByte(3),e.writeByte(1),Go(e,t),e.writeByte(0)}function I1(e,t){let n=1<<Op(t.length);for(let r=0;r<n;r++){let i=[0,0,0];r<t.length&&(i=t[r]),e.writeByte(i[0]),e.writeByte(i[1]),e.writeByte(i[2])}}function iI(e,t,n,r){if(e.writeByte(44),Go(e,0),Go(e,0),Go(e,t),Go(e,n),r){let l=Op(r.length)-1;e.writeByte(128|l)}else e.writeByte(0)}function sI(e,t,n,r,i=8,s,l,c){qP(n,r,t,i,e,s,l,c)}function Go(e,t){e.writeByte(t&255),e.writeByte(t>>8&255)}function O1(e,t){for(var n=0;n<t.length;n++)e.writeByte(t.charCodeAt(n))}function Op(e){return Math.max(Math.ceil(Math.log2(e)),1)}var aI=D1});function B1(e,t){let n=t?.fields?.find(i=>i.localName===e);return n?Object.values(n).find(i=>typeof i=="function")?.():void 0}var ii,lI,Ir,gs,_1,hs,Ho,Za,cI,uI,Fp,Up,Xa,We,$p,F1=g(()=>{"use strict";a();Kn();U();M();Wa();St();Ze();w();j();I();ii=qs(Bp()),lI=0,Ir=Me("StickersStore"),gs=Me("UserSettingsProtoStore"),_1=A("BINARY_READ_OPTIONS");hs=Jn(()=>ki.PreloadedUserSettingsActionCreators),Ho=Jn(()=>B1("appearance",hs.ProtoClass)),Za=Jn(()=>B1("clientThemeSettings",Ho)),cI=1n<<18n,uI=1n<<37n,Fp=/\/emojis\/(\d+?)\.(png|webp|gif)/,Up=/\/stickers\/(\d+?)\./,Xa=/\/attachments\/\d+?\/\d+?\/(\d+?)\.gif/,We=D({enableEmojiBypass:{description:"Allow sending fake emojis",type:3,default:!0,restartNeeded:!0},emojiSize:{description:"Size of the emojis when sending",type:5,default:48,markers:[32,48,64,128,160,256,512]},transformEmojis:{description:"Whether to transform fake emojis into real ones",type:3,default:!0,restartNeeded:!0},enableStickerBypass:{description:"Allow sending fake stickers",type:3,default:!0,restartNeeded:!0},stickerSize:{description:"Size of the stickers when sending",type:5,default:160,markers:[32,64,128,160,256,512]},transformStickers:{description:"Whether to transform fake stickers into real ones",type:3,default:!0,restartNeeded:!0},transformCompoundSentence:{description:"Whether to transform fake stickers and emojis in compound sentences (sentences with more content than just the fake emoji or sticker link)",type:3,default:!1},enableStreamQualityBypass:{description:"Allow streaming in nitro quality",type:3,default:!0,restartNeeded:!0}}),$p=y({name:"FakeNitro",authors:[p.Arjix,p.D3SOX,p.Ven,p.obscurity,p.captain,p.Nuckyz,p.AutumnVN],description:"Allows you to stream in nitro quality, send fake emojis/stickers and use client themes.",dependencies:["MessageEventsAPI"],settings:We,patches:[{find:".PREMIUM_LOCKED;",predicate:()=>We.store.enableEmojiBypass,replacement:[{match:/(?<=,intention:(\i).+?;)/,replace:(e,t)=>`let fakeNitroIntention=${t};`},{match:/\.(?:canUseEmojisEverywhere|canUseAnimatedEmojis)\(\i(?=\))/g,replace:'$&,typeof fakeNitroIntention!=="undefined"?fakeNitroIntention:void 0'},{match:/(&&!\i&&)!(\i)(?=\)return \i\.\i\.DISALLOW_EXTERNAL;)/,replace:(e,t,n)=>`${t}(!${n}&&(typeof fakeNitroIntention==="undefined"||![${3},${4}].includes(fakeNitroIntention)))`},{match:/if\(!\i\.available/,replace:e=>`${e}&&(typeof fakeNitroIntention==="undefined"||![${3},${4}].includes(fakeNitroIntention))`}]},{find:"canUseAnimatedEmojis:function",predicate:()=>We.store.enableEmojiBypass,replacement:{match:/((?:canUseEmojisEverywhere|canUseAnimatedEmojis):function\(\i)\){(.+?\))(?=})/g,replace:(e,t,n)=>`${t},fakeNitroIntention){${n}||fakeNitroIntention==null||[${3},${4}].includes(fakeNitroIntention)`}},{find:"canUseCustomStickersEverywhere:function",predicate:()=>We.store.enableStickerBypass,replacement:{match:/canUseCustomStickersEverywhere:function\(\i\){/,replace:"$&return true;"}},{find:'"SENDABLE"',predicate:()=>We.store.enableStickerBypass,replacement:{match:/(\w+)\.available\?/,replace:"true?"}},{find:"canUseHighVideoUploadQuality:function",predicate:()=>We.store.enableStreamQualityBypass,replacement:["canUseHighVideoUploadQuality","canStreamQuality"].map(e=>({match:new RegExp(`${e}:function\\(\\i(?:,\\i)?\\){`,"g"),replace:"$&return true;"}))},{find:"STREAM_FPS_OPTION.format",predicate:()=>We.store.enableStreamQualityBypass,replacement:{match:/guildPremiumTier:\i\.\i\.TIER_\d,?/g,replace:""}},{find:"canUseClientThemes:function",replacement:{match:/canUseClientThemes:function\(\i\){/,replace:"$&return true;"}},{find:'.displayName="UserSettingsProtoStore"',replacement:[{match:/CONNECTION_OPEN:function\((\i)\){/,replace:(e,t)=>`${e}$self.handleProtoChange(${t}.userSettingsProto,${t}.user);`},{match:/let{settings:/,replace:"arguments[0].local||$self.handleProtoChange(arguments[0].settings.proto);$&"}]},{find:",updateTheme(",replacement:{match:/(function \i\(\i\){let{backgroundGradientPresetId:(\i).+?)(\i\.\i\.updateAsync.+?theme=(.+?),.+?},\i\))/,replace:(e,t,n,r,i)=>`${t}$self.handleGradientThemeSelect(${n},${i},()=>${r});`}},{find:'["strong","em","u","text","inlineCode","s","spoiler"]',replacement:[{predicate:()=>We.store.transformEmojis,match:/1!==(\i)\.length\|\|1!==\i\.length/,replace:(e,t)=>`${e}||$self.shouldKeepEmojiLink(${t}[0])`},{predicate:()=>We.store.transformEmojis||We.store.transformStickers,match:/(?=return{hasSpoilerEmbeds:\i,content:(\i)})/,replace:(e,t)=>`${t}=$self.patchFakeNitroEmojisOrRemoveStickersLinks(${t},arguments[2]?.formatInline);`}]},{find:"renderEmbeds(",replacement:[{predicate:()=>We.store.transformEmojis||We.store.transformStickers,match:/(renderEmbeds\((\i)\){)(.+?embeds\.map\((\i)=>{)/,replace:(e,t,n,r,i)=>`${t}const fakeNitroMessage=${n};${r}if($self.shouldIgnoreEmbed(${i},fakeNitroMessage))return null;`},{predicate:()=>We.store.transformStickers,match:/(?<=renderStickersAccessories\((\i)\){let (\i)=\(0,\i\.\i\)\(\i\).+?;)/,replace:(e,t,n)=>`${n}=$self.patchFakeNitroStickers(${n},${t});`},{predicate:()=>We.store.transformStickers,match:/renderAttachments\(\i\){let{attachments:(\i).+?;/,replace:(e,t)=>`${e}${t}=$self.filterAttachments(${t});`}]},{find:".Messages.STICKER_POPOUT_UNJOINED_PRIVATE_GUILD_DESCRIPTION.format",predicate:()=>We.store.transformStickers,replacement:[{match:/let{renderableSticker:(\i).{0,250}isGuildSticker.+?channel:\i,/,replace:(e,t)=>`${e}fakeNitroRenderableSticker:${t},`},{match:/(let \i,{sticker:\i,channel:\i,closePopout:\i.+?}=(\i).+?;)(.+?description:)(\i)(?=,sticker:\i)/,replace:(e,t,n,r,i)=>`${t}let{fakeNitroRenderableSticker}=${n};${r}$self.addFakeNotice(${0},${i},!!fakeNitroRenderableSticker?.fake)`}]},{find:".EMOJI_UPSELL_POPOUT_MORE_EMOJIS_OPENED,",predicate:()=>We.store.transformEmojis,replacement:{match:/isDiscoverable:\i,shouldHideRoleSubscriptionCTA:\i,(?<={node:(\i),.+?)/,replace:(e,t)=>`${e}fakeNitroNode:${t},`}},{find:".Messages.EMOJI_POPOUT_UNJOINED_DISCOVERABLE_GUILD_DESCRIPTION",predicate:()=>We.store.transformEmojis,replacement:{match:/(?<=isDiscoverable:\i,emojiComesFromCurrentGuild:\i,.+?}=(\i).+?;)(.+?return )(.{0,1000}\.Messages\.EMOJI_POPOUT_UNJOINED_DISCOVERABLE_GUILD_DESCRIPTION.+?)(?=},)/,replace:(e,t,n,r)=>`let{fakeNitroNode}=${t};${n}$self.addFakeNotice(${1},${r},!!fakeNitroNode?.fake)`}},{find:"canUsePremiumAppIcons:function",replacement:{match:/canUsePremiumAppIcons:function\(\i\){/,replace:"$&return true;"}},{find:'location:"AppIconHome"',replacement:{match:/\i\.\i\.isPremium\(\i\.\i\.getCurrentUser\(\)\)/,replace:"true"}}],get guildId(){return Cu()?.id},get canUseEmotes(){return(W.getCurrentUser().premiumType??0)>0},get canUseStickers(){return(W.getCurrentUser().premiumType??0)>1},handleProtoChange(e,t){if(e==null||typeof e=="string"||!gs||!hs||!Ho||!Za)return;if((t?.premium_type??W?.getCurrentUser()?.premiumType??0)!==2){if(e.appearance??=Ho.create(),gs.settings.appearance?.theme!=null){let r=Ho.create({theme:gs.settings.appearance.theme});e.appearance.theme=r.theme}if(gs.settings.appearance?.clientThemeSettings?.backgroundGradientPresetId?.value!=null){let r=Za.create({backgroundGradientPresetId:{value:gs.settings.appearance.clientThemeSettings.backgroundGradientPresetId.value}});e.appearance.clientThemeSettings??=r,e.appearance.clientThemeSettings.backgroundGradientPresetId=r.backgroundGradientPresetId}}},handleGradientThemeSelect(e,t,n){if((W?.getCurrentUser()?.premiumType??0)===2||e==null)return n();if(!hs||!Ho||!Za||!_1)return;let i=hs.getCurrentValue().appearance,s=i!=null?Ho.fromBinary(Ho.toBinary(i),_1.BINARY_READ_OPTIONS):Ho.create();s.theme=t;let l=Za.create({backgroundGradientPresetId:{value:e}});s.clientThemeSettings??=l,s.clientThemeSettings.backgroundGradientPresetId=l.backgroundGradientPresetId;let c=hs.ProtoClass.create();c.appearance=s,F.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")&&!We.store.transformCompoundSentence)return e;let n=e.length,r=c=>{if(We.store.transformEmojis){let u=c.props.href.match(Fp);if(u){let d=null;try{d=new URL(c.props.href)}catch{}let m=In.getCustomEmojiById(u[1])?.name??d?.searchParams.get("name")??"FakeNitroEmoji";return Fe.defaultRules.customEmoji.react({jumboable:!t&&e.length===1&&typeof e[0].type!="string",animated:u[2]==="gif",emojiId:u[1],name:m,fake:!0},void 0,{key:String(n++)})}}if(We.store.transformStickers){if(Up.test(c.props.href))return null;let u=c.props.href.match(Xa);if(u&&Ir.getStickerById(u[1]))return null}return c},i=c=>c?.props?.trusted!=null?r(c):c?.props?.children!=null?Array.isArray(c.props.children)?(c.props.children=l(c.props.children),c.props.children.length===0?null:c):(c.props.children=s(c.props.children),c):c,s=c=>{let u=i(c);if(u?.type==="ul"||u?.type==="ol"){if(this.ensureChildrenIsArray(u),u.props.children.length===0)return null;let d=!1;for(let[m,h]of u.props.children.entries()){if(h==null){delete u.props.children[m];continue}this.ensureChildrenIsArray(h),h.props.children.length>0?d=!0:delete u.props.children[m]}if(!d)return null;u.props.children=this.clearEmptyArrayItems(u.props.children)}return u},l=c=>{for(let[u,d]of c.entries())c[u]=s(d);return c=this.clearEmptyArrayItems(c),this.trimContent(c),c};try{return l(ur.cloneDeep(e))}catch(c){return new ie("FakeNitro").error(c),e}},patchFakeNitroStickers(e,t){let n=[],r=t.content.split(/\s/);We.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(!We.store.transformCompoundSentence&&!i.startsWith("http"))continue;let s=i.match(Up);if(s){let c=null;try{c=new URL(i)}catch{}let u=Ir.getStickerById(s[1])?.name??c?.searchParams.get("name")??"FakeNitroSticker";e.push({format_type:1,id:s[1],name:u,fake:!0});continue}let l=i.match(Xa);if(l){if(!Ir.getStickerById(l[1]))continue;let c=Ir.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&&!We.store.transformCompoundSentence)return!1;switch(e.type){case"image":{if(!We.store.transformCompoundSentence&&!n.includes(e.url)&&!n.includes(e.image?.proxyURL))return!1;if(We.store.transformEmojis&&Fp.test(e.url))return!0;if(We.store.transformStickers){if(Up.test(e.url))return!0;let r=e.url.match(Xa);if(r&&Ir.getStickerById(r[1]))return!0}break}}return!1},filterAttachments(e){return e.filter(t=>{if(t.content_type!=="image/gif")return!0;let n=t.url.match(Xa);return!(n&&Ir.getStickerById(n[1]))})},shouldKeepEmojiLink(e){return e.target&&Fp.test(e.target)},addFakeNotice(e,t,n){if(!n)return t;switch(t=Array.isArray(t)?t:[t],e){case 0:return t.push(" This is a FakeNitro sticker and renders like a real sticker only for you. Appears as a link to non-plugin users."),t;case 1:return t.push(" This is a FakeNitro emoji and renders like a real emoji only for you. Appears as a link to non-plugin users."),t}},hasPermissionToUseExternalEmojis(e){let t=Q.getChannel(e);return!t||t.isDM()||t.isGroupDM()||t.isMultiUserDM()?!0:Ne.can(cI,t)},hasPermissionToUseExternalStickers(e){let t=Q.getChannel(e);return!t||t.isDM()||t.isGroupDM()||t.isMultiUserDM()?!0:Ne.can(uI,t)},getStickerLink(e){return`https://media.discordapp.net/stickers/${e}.png?size=${E.plugins.FakeNitro.stickerSize}`},async sendAnimatedSticker(e,t,n){let{parseURL:r}=b1(),{frames:i,width:s,height:l}=await r(e),c=(0,ii.GIFEncoder)(),u=E.plugins.FakeNitro.stickerSize,d=document.createElement("canvas");d.width=u,d.height=u;let m=d.getContext("2d",{willReadFrequently:!0}),h=u/Math.max(s,l);m.scale(h,h);let v;for(let P of i){let{left:b,top:x,width:C,height:k,img:B,delay:$,blendOp:Y,disposeOp:K}=P;v=m.getImageData(b,x,C,k),Y===0&&m.clearRect(b,x,C,k),m.drawImage(B,b,x,C,k);let{data:z}=m.getImageData(0,0,u,u),L=(0,ii.quantize)(z,256),X=(0,ii.applyPalette)(z,L);c.writeFrame(X,u,u,{transparent:!0,palette:L,delay:$}),K===1?m.clearRect(b,x,C,k):K===2&&m.putImageData(v,b,x)}c.finish();let T=new File([c.bytesView()],`${t}.gif`,{type:"image/gif"});Ei.promptToUpload([T],Q.getChannel(n),lI)},start(){let e=We.store;if(!e.enableEmojiBypass&&!e.enableStickerBypass)return;function t(n,r){return!n[r]||/\s/.test(n[r])?"":" "}this.preSend=Gt((n,r,i)=>{let{guildId:s}=this;e:{if(!e.enableStickerBypass)break e;let l=Ir.getStickerById(i.stickers?.[0]);if(!l||"pack_id"in l)break e;let c=this.canUseStickers&&this.hasPermissionToUseExternalStickers(n);if(l.available!==!1&&(c||l.guild_id===s))break e;let u=this.getStickerLink(l.id);if(l.format_type===2)return this.sendAnimatedSticker(u,l.id,n),{cancel:!0};i.stickers.length=0,r.content+=` ${u}&name=${encodeURIComponent(l.name)}`}if(e.enableEmojiBypass){let l=this.canUseEmotes&&this.hasPermissionToUseExternalEmojis(n);for(let c of r.validNonShortcutEmojis){if(!c.require_colons||c.available!==!1&&l||c.guildId===s&&!c.animated)continue;let u=`<${c.animated?"a":""}:${c.originalName||c.name}:${c.id}>`,d=c.url.replace(/\?size=\d+/,"?"+new URLSearchParams({size:E.plugins.FakeNitro.emojiSize,name:encodeURIComponent(c.name)}));r.content=r.content.replace(u,(m,h,v)=>`${t(v,h-1)}${d}${t(v,h+m.length)}`)}}return{cancel:!1}}),this.preEdit=Tr((n,r,i)=>{if(!e.enableEmojiBypass)return;let s=this.canUseEmotes&&this.hasPermissionToUseExternalEmojis(n),{guildId:l}=this;i.content=i.content.replace(/(?<!\\)<a?:(?:\w+):(\d+)>/ig,(c,u,d,m)=>{let h=In.getCustomEmojiById(u);if(h==null||!h.require_colons||h.available!==!1&&s||h.guildId===l&&!h.animated)return c;let v=h.url.replace(/\?size=\d+/,"?"+new URLSearchParams({size:E.plugins.FakeNitro.emojiSize,name:encodeURIComponent(h.name)}));return`${t(m,d-1)}${v}${t(m,d+c.length)}`})})},stop(){Ht(this.preSend),xr(this.preEdit)}})});function U1(...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 $1,G1=g(()=>{"use strict";a();$1=U1;typeof module<"u"&&(module.exports=U1)});function pI(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 dI(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 H1,Gp,z1=g(()=>{"use strict";a();U();le();M();it();Re();w();I();G1();H1=D({nitroFirst:{description:"Default color source if both are present",type:4,options:[{label:"Nitro colors",value:!0,default:!0},{label:"Fake colors",value:!1}]}}),Gp=y({name:"FakeProfileThemes",description:"Allows profile theming by hiding the colors in your bio thanks to invisible 3y3 encoding",authors:[p.Alyxia,p.Remty],patches:[{find:"UserProfileStore",replacement:{match:/(?<=getUserProfile\(\i\){return )(\i\[\i\])/,replace:"$self.colorDecodeHook($1)"}},{find:".USER_SETTINGS_PROFILE_THEME_ACCENT",replacement:{match:/RESET_PROFILE_THEME}\)(?<=color:(\i),.{0,500}?color:(\i),.{0,500}?)/,replace:"$&,$self.addCopy3y3Button({primary:$1,accent:$2})"}}],settingsAboutComponent:()=>o(S.FormSection,null,o(S.FormTitle,{tag:"h3"},"Usage"),o(S.FormText,null,"After enabling this plugin, you will see custom colors in the profiles of other people using compatible plugins. ",o("br",null),"To set your own colors:",o("ul",null,o("li",null,"\u2022 go to your profile settings"),o("li",null,"\u2022 choose your own colors in the Nitro preview"),o("li",null,'\u2022 click the "Copy 3y3" button'),o("li",null,"\u2022 paste the invisible text anywhere in your bio")),o("br",null),o("b",null,"Please note:")," if you are using a theme which hides nitro ads, you should disable it temporarily to set colors.")),settings:H1,colorDecodeHook(e){if(e){if(H1.store.nitroFirst&&e.themeColors)return e;let t=dI(e.bio);if(t)return $1(e,{premiumType:2,themeColors:t})}return e},addCopy3y3Button:_.wrap(function({primary:e,accent:t}){return o(R,{onClick:()=>{let n=pI(e,t);fn(n)},color:R.Colors.PRIMARY,size:R.Sizes.XLARGE,className:q.left16},"Copy 3y3")},{noop:!0})})});var Hp,j1=g(()=>{"use strict";a();M();w();I();Hp=y({name:"FavoriteEmojiFirst",authors:[p.Aria,p.Ven],description:"Puts your favorite emoji first in the emoji autocomplete.",patches:[{find:"renderResults({results:",replacement:[{match:/let \i=.{1,100}renderResults\({results:(\i)\.query\.results,/,replace:"$self.sortEmojis($1);$&"}]},{find:"MAX_AUTOCOMPLETE_RESULTS+",replacement:[{match:/,maxCount:(\i)(.{1,500}\i)=(\i)\.slice\(0,(\i-\i\.length)\)/,replace:",maxCount:Infinity$2=($3.sliceTo = $4, $3)"}]}],sortEmojis({query:e}){if(e?.type!=="EMOJIS_AND_STICKERS"||e.typeInfo?.sentinel!==":"||!e.results?.emojis?.length)return;let t=In.getDisambiguatedEmojiContext();e.results.emojis=e.results.emojis.sort((n,r)=>{let i=t.isFavoriteEmojiWithoutFetchingLatest(n),s=t.isFavoriteEmojiWithoutFetchingLatest(r);return i&&!s?-1:!i&&s?1:0}).slice(0,e.results.emojis.sliceTo??10)}})});function fI({instance:e,SearchBarComponent:t}){let[n,r]=J(""),i=Kt(null),s=na(l=>{r(l);let{props:c}=e;if(l===""){c.favorites=c.favCopy,e.forceUpdate();return}i.current?.containerRef?.current.closest("#gif-picker-tab-panel")?.querySelector('[class|="content"]')?.firstElementChild?.scrollTo(0,0);let u=c.favCopy.map(d=>({score:gI(l.toLowerCase(),q1(d.url??d.src).replace(/(%20|[_-])/g," ").toLowerCase()),gif:d})).filter(d=>d.score!=null);u.sort((d,m)=>m.score-d.score),c.favorites=u.map(d=>d.gif),e.forceUpdate()},[e.state]);return De(()=>()=>{e.dead=!0},[]),o(t,{ref:i,autoFocus:!0,className:mI.searchBar,size:t.Sizes.MEDIUM,onChange:s,onClear:()=>{r(""),e.props.favCopy!=null&&(e.props.favorites=e.props.favCopy,e.forceUpdate())},query:n,placeholder:"Search Favorite Gifs"})}function q1(e){let t=new URL(e);switch(W1.store.searchOption){case"url":return t.href;case"path":return t.host==="media.discordapp.net"||t.host==="tenor.com"?t.pathname.split("/").at(-1)??t.pathname:t.pathname;case"hostandpath":return t.host==="media.discordapp.net"||t.host==="tenor.com"?`${t.host} ${t.pathname.split("/").at(-1)??t.pathname}`:`${t.host} ${t.pathname}`;default:return""}}function gI(e,t){let n=0,r=0;for(let i=0;i<t.length;i++)if(t[i]===e[n]?(r++,n++):r--,n===e.length)return r;return null}var mI,W1,zp,K1=g(()=>{"use strict";a();U();le();M();w();j();I();mI=A("searchBar","searchBarFullRow"),W1=D({searchOption:{type:4,description:"The part of the url you want to search",options:[{label:"Entire Url",value:"url"},{label:"Path Only (/somegif.gif)",value:"path"},{label:"Host & Path (tenor.com somgif.gif)",value:"hostandpath",default:!0}]}}),zp=y({name:"FavoriteGifSearch",authors:[p.Aria],description:"Adds a search bar to favorite gifs.",patches:[{find:"renderHeaderContent()",replacement:[{match:/(renderHeaderContent\(\).{1,150}FAVORITES:return)(.{1,150});(case.{1,200}default:return\(0,\i\.jsx\)\((?<searchComp>\i\..{1,10}),)/,replace:"$1 this.state.resultType === 'Favorites' ? $self.renderSearchBar(this, $<searchComp>) : $2;$3"},{match:/(,suggestions:\i,favorites:)(\i),/,replace:"$1$self.getFav($2),favCopy:$2,"}]}],settings:W1,getTargetString:q1,instance:null,renderSearchBar(e,t){return this.instance=e,o(_,{noop:!0},o(fI,{instance:e,SearchBarComponent:t}))},getFav(e){if(!this.instance||this.instance.dead)return e;let{favorites:t}=this.instance.props;return t!=null&&t?.length!==e.length?t:e}})});var jp,Y1=g(()=>{"use strict";a();M();w();jp=y({name:"FixImagesQuality",description:"Fixes the quality of images in the chat being horrible.",authors:[p.Nuckyz],patches:[{find:"handleImageLoad=",replacement:{match:/(?<=getSrc\(\i\){.+?format:)\i/,replace:"null"}}]})});var Wp,Z1=g(()=>{"use strict";a();U();La();M();w();Wp=y({name:"FixSpotifyEmbeds",description:"Fixes spotify embeds being incredibly loud by letting you customise the volume",authors:[p.Ven],settings:D({volume:{type:5,description:"The volume % to set for spotify embeds. Anything above 10% is veeeery loud",markers:Fo(0,100,10),stickToMarkers:!1,default:10}})})});var qp,X1=g(()=>{"use strict";a();M();w();I();qp=y({name:"ForceOwnerCrown",description:"Force the owner crown next to usernames even if the server is large.",authors:[p.D3SOX,p.Nickyux],patches:[{find:"AVATAR_DECORATION_PADDING:",replacement:{match:/,isOwner:(\i),/,replace:",_isOwner:$1=$self.isGuildOwner(e),"}}],isGuildOwner(e){if(!e?.user?.id||e.channel?.type===3)return e.isOwner;let t=e.guildId??e.channel?.guild_id,n=e.user.id;return Te.getGuild(t)?.ownerId===n}})});var Ja,hI,Kp,J1=g(()=>{"use strict";a();Jt();M();w();j();I();Ja=A("createFriendInvite"),{uuid4:hI}=A("uuid4"),Kp=y({name:"FriendInvites",description:"Create and manage friend invite links via slash commands (/create friend invite, /view friend invites, /revoke friend invites).",authors:[p.afn,p.Dziurwa],dependencies:["CommandsAPI"],commands:[{name:"create friend invite",description:"Generates a friend invite link.",inputType:3,options:[{name:"Uses",description:"How many uses?",choices:[{label:"1",name:"1",value:"1"},{label:"5",name:"5",value:"5"}],required:!1,type:4}],execute:async(e,t)=>{let n=ot(e,"Uses",5);if(n===1&&!W.getCurrentUser().phone)return ue(t.channel.id,{content:"You need to have a phone number connected to your account to create a friend invite with 1 use!"});let r;if(n===1){let i=hI(),{body:{invite_suggestions:s}}=await wt.post({url:"/friend-finder/find-friends",body:{modified_contacts:{[i]:[1,"",""]},phone_contact_methods_count:1}});r=await Ja.createFriendInvite({code:s[0][3],recipient_phone_number_or_email:i,contact_visibility:1,filter_visibilities:[],filtered_invite_suggestions_index:1})}else r=await Ja.createFriendInvite();ue(t.channel.id,{content:`
|
|
discord.gg/${r.code} \xB7
|
|
Expires: <t:${new Date(r.expires_at).getTime()/1e3}:R> \xB7
|
|
Max uses: \`${r.max_uses}\`
|
|
`.trim().replace(/\s+/g," ")})}},{name:"view friend invites",description:"View a list of all generated friend invites.",inputType:3,execute:async(e,t)=>{let r=(await Ja.getAllFriendInvites()).map(i=>`
|
|
_discord.gg/${i.code}_ \xB7
|
|
Expires: <t:${new Date(i.expires_at).getTime()/1e3}:R> \xB7
|
|
Times used: \`${i.uses}/${i.max_uses}\`
|
|
`.trim().replace(/\s+/g," "));ue(t.channel.id,{content:r.join(`
|
|
`)||"You have no active friend invites!"})}},{name:"revoke friend invites",description:"Revokes all generated friend invites.",inputType:3,execute:async(e,t)=>{await Ja.revokeFriendInvites(),ue(t.channel.id,{content:"All friend invites have been revoked."})}}]})});var Yp,Q1=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/gameActivityToggle/style.css",{name:"src/plugins/gameActivityToggle/style.css",source:`[class*="withTagAsButton"] {
|
|
min-width: 88px !important;
|
|
}
|
|
`,classNames:{},dom:null});Yp="src/plugins/gameActivityToggle/style.css"});function vI(e){return function(){return o("svg",{width:"20",height:"20",viewBox:"0 0 24 24"},o("path",{fill:"currentColor",mask:"url(#gameActivityMask)",d:"M3.06 20.4q-1.53 0-2.37-1.065T.06 16.74l1.26-9q.27-1.8 1.605-2.97T6.06 3.6h11.88q1.8 0 3.135 1.17t1.605 2.97l1.26 9q.21 1.53-.63 2.595T20.94 20.4q-.63 0-1.17-.225T18.78 19.5l-2.7-2.7H7.92l-2.7 2.7q-.45.45-.99.675t-1.17.225Zm14.94-7.2q.51 0 .855-.345T19.2 12q0-.51-.345-.855T18 10.8q-.51 0-.855.345T16.8 12q0 .51.345 .855T18 13.2Zm-2.4-3.6q.51 0 .855-.345T16.8 8.4q0-.51-.345-.855T15.6 7.2q-.51 0-.855.345T14.4 8.4q0 .51.345 .855T15.6 9.6ZM6.9 13.2h1.8v-2.1h2.1v-1.8h-2.1v-2.1h-1.8v2.1h-2.1v1.8h2.1v2.1Z"}),!e&&o(f,null,o("mask",{id:"gameActivityMask"},o("rect",{fill:"white",x:"0",y:"0",width:"24",height:"24"}),o("path",{fill:"black",d:"M23.27 4.54 19.46.73 .73 19.46 4.54 23.27 23.27 4.54Z"})),o("path",{fill:"var(--status-danger)",d:"M23 2.27 21.73 1 1 21.73 2.27 23 23 2.27Z"})))}}function SI(){let e=Ur.ShowCurrentGame.useSetting();return o(yI,{tooltipText:e?"Disable Game Activity":"Enable Game Activity",icon:vI(e),role:"switch","aria-checked":!e,onClick:()=>Ur.ShowCurrentGame.updateSetting(t=>!t)})}var yI,Zp,V1=g(()=>{"use strict";a();Je();le();M();w();j();I();Q1();yI=Xe("Button.Sizes.NONE,disabled:");Zp=y({name:"GameActivityToggle",description:"Adds a button next to the mic and deafen button to toggle game activity.",authors:[p.Nuckyz,p.RuukuLada],patches:[{find:".Messages.ACCOUNT_SPEAKING_WHILE_MUTED",replacement:{match:/this\.renderNameZone\(\).+?children:\[/,replace:"$&$self.GameActivityToggleButton(),"}}],GameActivityToggleButton:_.wrap(SI,{noop:!0}),start(){vt(Yp)},stop(){Bt(Yp)}})});var bI,Xp,eS=g(()=>{"use strict";a();M();St();w();j();({closeExpressionPicker:bI}=A("closeExpressionPicker")),Xp=y({name:"GifPaste",description:"Makes picking a gif in the gif picker insert a link into the chatbox instead of instantly sending it",authors:[p.Ven],patches:[{find:".handleSelectGIF=",replacement:{match:/\.handleSelectGIF=(\i)=>\{/,replace:".handleSelectGIF=$1=>{if (!this.props.className) return $self.handleSelect($1);"}}],handleSelect(e){e&&(so(e.url+" "),bI())}})});function nS(e,t,n){let r=Jp.getSendMessageOptionsForReply({channel:e,message:t,shouldMention:!0,showMentionToggle:!0});if(Qa.store.greetMode==="Message"||n.length>1){r.stickerIds=n;let i={content:"",tts:!1,invalidEmojis:[],validNonShortcutEmojis:[]};Jp._sendMessage(e.id,i,r)}else Jp.sendGreetMessage(e.id,n[0],r)}function TI({channel:e,message:t}){let n=Qa.use(["greetMode","multiGreetChoices"]),{greetMode:r,multiGreetChoices:i=[]}=n;return o(G.Menu,{navId:"greet-sticker-picker",onClose:()=>F.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Greet Sticker Picker"},o(G.MenuGroup,{label:"Greet Mode"},Object.values(oS).map(s=>o(G.MenuRadioItem,{key:s,group:"greet-mode",id:"greet-mode-"+s,label:s,checked:s===r,action:()=>n.greetMode=s}))),o(G.MenuSeparator,null),o(G.MenuGroup,{label:"Greet Stickers"},tS.map(s=>o(G.MenuItem,{key:s.id,id:"greet-"+s.id,label:s.description.split(" ")[0],action:()=>nS(e,t,[s.id])}))),Qa.store.unholyMultiGreetEnabled?o(f,null,o(G.MenuSeparator,null),o(G.MenuItem,{label:"Unholy Multi-Greet",id:"unholy-multi-greet"},tS.map(s=>{let l=i.some(c=>c===s.id);return o(G.MenuCheckboxItem,{key:s.id,id:"multi-greet-"+s.id,label:s.description.split(" ")[0],checked:l,disabled:!l&&i.length>=3,action:()=>{n.multiGreetChoices=l?i.filter(c=>c!==s.id):[...i,s.id]}})}),o(G.MenuSeparator,null),o(G.MenuItem,{id:"multi-greet-submit",label:"Send Greets",action:()=>nS(e,t,i),disabled:i.length===0}))):null)}var oS,Qa,Jp,tS,Qp,rS=g(()=>{"use strict";a();U();M();w();j();I();oS=(n=>(n.Greet="Greet",n.NormalMessage="Message",n))(oS||{}),Qa=D({greetMode:{type:4,options:[{label:"Greet (you can only greet 3 times)",value:"Greet",default:!0},{label:"Normal Message (you can greet spam)",value:"Message"}],description:"Choose the greet mode"}}).withPrivateSettings(),Jp=A("sendGreetMessage"),{WELCOME_STICKERS:tS}=A("WELCOME_STICKERS");Qp=y({name:"GreetStickerPicker",description:"Allows you to use any greet sticker instead of only the random one by right-clicking the 'Wave to say hi!' button",authors:[p.Ven],settings:Qa,patches:[{find:"Messages.WELCOME_CTA_LABEL",replacement:{match:/innerClassName:\i\.welcomeCTAButton,(?<={channel:\i,message:\i}=(\i).{0,400}?)/,replace:"$&onContextMenu:(vcEvent)=>$self.pickSticker(vcEvent, $1),"}}],pickSticker(e,t){t.message.deleted||pn.openContextMenu(e,()=>o(TI,{...t}))}})});var Vp={};Be(Vp,{_buildPopoverElements:()=>wI,addButton:()=>On,buttons:()=>Va,removeButton:()=>_n});function On(e,t){Va.set(e,t)}function _n(e){Va.delete(e)}function wI(e,t){let n=[];for(let[r,i]of Va.entries())try{let s=i(e);s&&(s.key??=r,n.push(t(s)))}catch(s){xI.error(`[${r}]`,s)}return n}var xI,Va,Ar=g(()=>{"use strict";a();Ze();xI=new ie("MessagePopover"),Va=new Map});var ys,sS,vs,iS,MI,ed,aS=g(()=>{"use strict";a();jn();Ar();Ut();M();w();I();sS="HideAttachments_HiddenIds",vs=new Set,iS=()=>Pt(sS).then(e=>(vs=e??new Set,vs)),MI=e=>Zt(sS,e),ed=y({name:"HideAttachments",description:"Hide attachments and Embeds for individual messages via hover button",authors:[p.Ven],dependencies:["MessagePopoverAPI"],async start(){ys=document.createElement("style"),ys.id="VencordHideAttachments",document.head.appendChild(ys),await iS(),await this.buildCss(),On("HideAttachments",e=>{if(!e.attachments.length&&!e.embeds.length&&!e.stickerItems.length)return null;let t=vs.has(e.id);return{label:t?"Show Attachments":"Hide Attachments",icon:t?Na:ka,message:e,channel:Q.getChannel(e.channel_id),onClick:()=>this.toggleHide(e.id)}})},stop(){ys.remove(),vs.clear(),_n("HideAttachments")},async buildCss(){let e=[...vs].map(t=>`#message-accessories-${t}`).join(",");ys.textContent=`
|
|
:is(${e}) :is([class*="embedWrapper"], [class*="clickableSticker"]) {
|
|
/* important is not necessary, but add it to make sure bad themes won't break it */
|
|
display: none !important;
|
|
}
|
|
:is(${e})::after {
|
|
content: "Attachments hidden";
|
|
color: var(--text-muted);
|
|
font-size: 80%;
|
|
}
|
|
`},async toggleHide(e){let t=await iS();t.delete(e)||t.add(e),await MI(t),await this.buildCss()}})});var td,lS=g(()=>{"use strict";a();M();w();td=y({name:"iLoveSpam",description:"Do not hide messages from 'likely spammers'",authors:[p.botato,p.Animal],patches:[{find:"hasFlag:{writable",replacement:{match:/if\((\i)<=(?:1<<30|1073741824)\)return/,replace:"if($1===(1<<20))return false;$&"}}]})});function pS(e,t,n,r){return o(V,{text:t},i=>o("button",{...i,onClick:s=>AI(s,e),style:{all:"unset",cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"center"}},o("svg",{width:"24",height:"24",viewBox:"0 -960 960 960"},o("path",{fill:r,d:n}))))}function uS(e,t=!1){let n=si.use(["ignoredActivities"]),{ignoredActivities:r=[]}=n;return r.some(i=>i.id===e.id)?II(e,"var(--status-danger)"):PI(e,t?"var(--green-300)":"var(--primary-400)")}function AI(e,t){e.stopPropagation();let n=zo().findIndex(r=>r.id===t.id);n===-1?si.store.ignoredActivities=zo().concat(t):si.store.ignoredActivities=zo().filter((r,i)=>i!==n),Ur.ShowCurrentGame.updateSetting(r=>r)}function zo(){return si.store.ignoredActivities??=[]}var cS,PI,II,si,nd,dS=g(()=>{"use strict";a();jn();U();le();M();w();j();I();cS=Me("RunningGameStore");PI=(e,t)=>pS(e,"Disable Activity","M480-320q75 0 127.5-52.5T660-500q0-75-52.5-127.5T480-680q-75 0-127.5 52.5T300-500q0 75 52.5 127.5T480-320Zm0-72q-45 0-76.5-31.5T372-500q0-45 31.5-76.5T480-608q45 0 76.5 31.5T588-500q0 45-31.5 76.5T480-392Zm0 192q-146 0-266-81.5T40-500q54-137 174-218.5T480-800q146 0 266 81.5T920-500q-54 137-174 218.5T480-200Zm0-300Zm0 220q113 0 207.5-59.5T832-500q-50-101-144.5-160.5T480-720q-113 0-207.5 59.5T128-500q50 101 144.5 160.5T480-280Z",t),II=(e,t)=>pS(e,"Enable Activity","m644-428-58-58q9-47-27-88t-93-32l-58-58q17-8 34.5-12t37.5-4q75 0 127.5 52.5T660-500q0 20-4 37.5T644-428Zm128 126-58-56q38-29 67.5-63.5T832-500q-50-101-143.5-160.5T480-720q-29 0-57 4t-55 12l-62-62q41-17 84-25.5t90-8.5q151 0 269 83.5T920-500q-23 59-60.5 109.5T772-302Zm20 246L624-222q-35 11-70.5 16.5T480-200q-151 0-269-83.5T40-500q21-53 53-98.5t73-81.5L56-792l56-56 736 736-56 56ZM222-624q-29 26-53 57t-41 67q50 101 143.5 160.5T480-280q20 0 39-2.5t39-5.5l-36-38q-11 3-21 4.5t-21 1.5q-75 0-127.5-52.5T300-500q0-11 1.5-21t4.5-21l-84-82Zm319 93Zm-151 75Z",t);si=D({}).withPrivateSettings();nd=y({name:"IgnoreActivities",authors:[p.Nuckyz],description:"Ignore activities from showing up on your status ONLY. You can configure which ones are ignored from the Registered Games and Activities tabs.",settings:si,patches:[{find:'.displayName="LocalActivityStore"',replacement:[{match:/HANG_STATUS.+?(?=!\i\(\i,\i\)&&)(?<=(\i)\.push.+?)/,replace:(e,t)=>`${e}${t}=${t}.filter($self.isActivityNotIgnored);`}]},{find:".Messages.SETTINGS_GAMES_TOGGLE_OVERLAY",replacement:{match:/\.Messages\.SETTINGS_GAMES_TOGGLE_OVERLAY.+?}\(\),(?<={overlay:\i,.+?=(\i),.+?)(?=!(\i))/,replace:(e,t,n)=>`${e}$self.renderToggleGameActivityButton(${t},${n}),`}},{find:".activityTitleText,variant",replacement:{match:/(?<=\i\.activityTitleText.+?children:(\i)\.name.*?}\),)/,replace:(e,t)=>`$self.renderToggleActivityButton(${t}),`}},{find:".activityCardDetails,children",replacement:{match:/(?<=\i\.activityCardDetails.+?children:(\i\.application)\.name.*?}\),)/,replace:(e,t)=>`$self.renderToggleActivityButton(${t}),`}}],async start(){let e=await Pt("IgnoreActivities_ignoredActivities");if(e!=null&&(si.store.ignoredActivities=Array.from(e.values()).map(t=>({...t,name:"Unknown Name"})),Gc("IgnoreActivities_ignoredActivities")),zo().length!==0){let t=cS.getGamesSeen();for(let[n,r]of zo().entries())r.type===0&&(t.some(i=>i.id===r.id||i.exePath===r.id)||zo().splice(n,1))}},isActivityNotIgnored(e){if(e.type===0||e.type===3){if(e.application_id!=null)return!zo().some(t=>t.id===e.application_id);{let t=cS.getRunningGames().find(n=>n.name===e.name)?.exePath;if(t)return!zo().some(n=>n.id===t)}}return!0},renderToggleGameActivityButton(e,t){return o(_,{noop:!0},o("div",{style:{marginLeft:12,zIndex:0}},uS({id:e.id??e.exePath,name:e.name,type:0},t)))},renderToggleActivityButton(e){return o(_,{noop:!0},uS({id:e.id,name:e.name,type:1}))}})});var Ss,od=g(()=>{"use strict";a();Ss="vc-imgzoom-magnify-modal"});function rd(e,t){e()?t():requestAnimationFrame(()=>rd(e,t))}var mS=g(()=>{"use strict";a()});var CI,id,fS=g(()=>{"use strict";a();Je();I();od();sd();mS();CI=Ue("vc-imgzoom-"),id=({instance:e,size:t,zoom:n})=>{let[r,i]=J(!1),[s,l]=J({x:0,y:0}),[c,u]=J({x:0,y:0}),[d,m]=J(0),h=Kt(!1),v=Kt(n),T=Kt(t),P=Kt(null),b=Kt(null),x=Kt(null),C=Kt(null);if(O.useLayoutEffect(()=>{let B=ne=>{ne.key==="Shift"&&(h.current=!0)},$=ne=>{ne.key==="Shift"&&(h.current=!1)},Y=()=>{b.current.currentTime=x.current.currentTime},K=ne=>{if(e.state.mouseOver&&e.state.mouseDown){let be=T.current/2,ae={x:ne.pageX,y:ne.pageY},Ae=-((ae.x-P.current.getBoundingClientRect().left)*v.current-be),me=-((ae.y-P.current.getBoundingClientRect().top)*v.current-be);l({x:ne.x-be,y:ne.y-be}),u({x:Ae,y:me}),m(1)}else m(0)},z=ne=>{e.state.mouseOver&&ne.button===0&&(v.current=_e.store.zoom,T.current=_e.store.size,document.getElementById("image-context")&&F.dispatch({type:"CONTEXT_MENU_CLOSE"}),K(ne),m(1))},L=()=>{m(0),_e.store.saveZoomValues&&(_e.store.zoom=v.current,_e.store.size=T.current)},X=async ne=>{if(e.state.mouseOver&&e.state.mouseDown&&!h.current){let be=v.current+ne.deltaY/100*(_e.store.invertScroll?-1:1)*_e.store.zoomSpeed;v.current=be<=1?1:be,K(ne)}if(e.state.mouseOver&&e.state.mouseDown&&h.current){let be=T.current+ne.deltaY*(_e.store.invertScroll?-1:1)*_e.store.zoomSpeed;T.current=be<=50?50:be,K(ne)}};return rd(()=>e.state.readyState==="READY",()=>{let ne=document.getElementById(Ss);P.current=ne,ne.firstElementChild.setAttribute("draggable","false"),e.props.animated&&(x.current=ne.querySelector("video"),x.current.addEventListener("timeupdate",Y)),i(!0)}),document.addEventListener("keydown",B),document.addEventListener("keyup",$),document.addEventListener("mousemove",K),document.addEventListener("mousedown",z),document.addEventListener("mouseup",L),document.addEventListener("wheel",X),()=>{document.removeEventListener("keydown",B),document.removeEventListener("keyup",$),document.removeEventListener("mousemove",K),document.removeEventListener("mousedown",z),document.removeEventListener("mouseup",L),document.removeEventListener("wheel",X),_e.store.saveZoomValues&&(_e.store.zoom=v.current,_e.store.size=T.current)}},[]),!r)return null;let k=P.current.getBoundingClientRect();return o("div",{className:CI("lens",{"nearest-neighbor":_e.store.nearestNeighbour,square:_e.store.square}),style:{opacity:d,width:T.current+"px",height:T.current+"px",transform:`translate(${s.x}px, ${s.y}px)`}},e.props.animated?o("video",{ref:b,style:{position:"absolute",left:`${c.x}px`,top:`${c.y}px`},width:`${k.width*v.current}px`,height:`${k.height*v.current}px`,poster:e.props.src,src:x.current?.src??e.props.src,autoPlay:!0,loop:!0}):o("img",{ref:C,style:{position:"absolute",transform:`translate(${c.x}px, ${c.y}px)`},width:`${k.width*v.current}px`,height:`${k.height*v.current}px`,src:e.props.src,alt:""}))}});var ad,gS=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/imageZoom/styles.css",{name:"src/plugins/imageZoom/styles.css",source:`.vc-imgzoom-lens {
|
|
position: absolute;
|
|
inset: 0;
|
|
z-index: 9999;
|
|
border: 2px solid grey;
|
|
border-radius: 50%;
|
|
overflow: hidden;
|
|
cursor: none;
|
|
box-shadow: inset 0 0 10px 2px grey;
|
|
filter: drop-shadow(0 0 2px grey);
|
|
pointer-events: none;
|
|
}
|
|
|
|
.vc-imgzoom-square {
|
|
border-radius: 0;
|
|
}
|
|
|
|
.vc-imgzoom-nearest-neighbor>img {
|
|
image-rendering: pixelated;
|
|
|
|
/* https://googlechrome.github.io/samples/image-rendering-pixelated/index.html */
|
|
}
|
|
|
|
/* make the carousel take up less space so we can click the backdrop and exit out of it */
|
|
[class*="modalCarouselWrapper_"] {
|
|
top: 0 !important;
|
|
}
|
|
|
|
[class*="carouselModal_"] {
|
|
height: 0 !important;
|
|
}
|
|
`,classNames:{},dom:null});ad="src/plugins/imageZoom/styles.css"});var _e,hS,ld,sd=g(()=>{"use strict";a();Mt();U();Je();La();M();jr();w();I();fS();od();gS();_e=D({saveZoomValues:{type:3,description:"Whether to save zoom and lens size values",default:!0},invertScroll:{type:3,description:"Invert scroll",default:!0},nearestNeighbour:{type:3,description:"Use Nearest Neighbour Interpolation when scaling images",default:!1},square:{type:3,description:"Make the lens square",default:!1},zoom:{description:"Zoom of the lens",type:5,markers:Fo(1,50,4),default:2,stickToMarkers:!1},size:{description:"Radius / Size of the lens",type:5,markers:Fo(50,1e3,50),default:100,stickToMarkers:!1},zoomSpeed:{description:"How fast the zoom / lens size changes",type:5,markers:Fo(.1,5,.2),default:.5,stickToMarkers:!1}}),hS=e=>()=>{e.push(o(G.MenuGroup,{id:"image-zoom"},o(G.MenuCheckboxItem,{id:"vc-square",label:"Square Lens",checked:_e.store.square,action:()=>{_e.store.square=!_e.store.square,pn.closeContextMenu()}}),o(G.MenuCheckboxItem,{id:"vc-nearest-neighbour",label:"Nearest Neighbour",checked:_e.store.nearestNeighbour,action:()=>{_e.store.nearestNeighbour=!_e.store.nearestNeighbour,pn.closeContextMenu()}}),o(G.MenuControlItem,{id:"vc-zoom",label:"Zoom",control:(t,n)=>o(G.MenuSliderControl,{ref:n,...t,minValue:1,maxValue:50,value:_e.store.zoom,onChange:hn(r=>_e.store.zoom=r,100)})}),o(G.MenuControlItem,{id:"vc-size",label:"Lens Size",control:(t,n)=>o(G.MenuSliderControl,{ref:n,...t,minValue:50,maxValue:1e3,value:_e.store.size,onChange:hn(r=>_e.store.size=r,100)})}),o(G.MenuControlItem,{id:"vc-zoom-speed",label:"Zoom Speed",control:(t,n)=>o(G.MenuSliderControl,{ref:n,...t,minValue:.1,maxValue:5,value:_e.store.zoomSpeed,onChange:hn(r=>_e.store.zoomSpeed=r,100),renderValue:r=>`${r.toFixed(3)}x`})})))},ld=y({name:"ImageZoom",description:"Lets you zoom in to images and gifs. Use scroll wheel to zoom in and shift + scroll wheel to increase lens radius / size",authors:[p.Aria],tags:["ImageUtilities"],patches:[{find:"Messages.OPEN_IN_BROWSER",replacement:{match:/return.{1,200}\.wrapper.{1,200}src:\i,/g,replace:`$&id: '${Ss}',`}},{find:"handleImageLoad=",replacement:[{match:/showThumbhashPlaceholder:\i,/,replace:"...$self.makeProps(this),$&"},{match:/componentDidMount\(\){/,replace:"$&$self.renderMagnifier(this);"},{match:/componentWillUnmount\(\){/,replace:"$&$self.unMountMagnifier();"}]},{find:".carouselModal",replacement:{match:/(?<=\.carouselModal.{0,100}onClick:)\i,/,replace:"()=>{},"}}],settings:_e,currentMagnifierElement:null,element:null,Magnifier:id,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===Ss&&(this.currentMagnifierElement||(this.currentMagnifierElement=o(id,{size:_e.store.size,zoom:_e.store.zoom,instance:e}),this.root=ar.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(){vt(ad),ce("image-context",hS),this.element=document.createElement("div"),this.element.classList.add("MagnifierContainer"),document.body.appendChild(this.element)},stop(){Bt(ad),this.root&&this.root.unmount(),this.element?.remove(),de("image-context",hS)}})});function NI(e){let t=e?.message?.content,[n,r]=O.useState("password");return o(ze,{...e},o(at,null,o(S.FormTitle,{tag:"h4"},"Decrypt Message")),o(Ve,null,o(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Message with Encryption"),o(Qe,{defaultValue:t,disabled:!0}),o(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Password"),o(Qe,{style:{marginBottom:"20px"},onChange:r})),o(Ot,null,o(R,{color:R.Colors.GREEN,onClick:()=>{let i=cd(t,n,!0);!i||!e?.message||(Vencord.Plugins.plugins.InvisibleChat.buildEmbed(e?.message,i),e.onClose())}},"Decrypt"),o(R,{color:R.Colors.TRANSPARENT,look:R.Looks.LINK,style:{left:15,position:"absolute"},onClick:e.onClose},"Cancel")))}function yS(e){je(t=>o(NI,{...t,...e}))}var vS=g(()=>{"use strict";a();pt();I();el()});function kI(e){let[t,n]=O.useState(""),[r,i]=O.useState(""),[s,l]=O.useState("password"),[c,u]=O.useState(!1),d=t&&(c||r&&r.trim().split(" ").length>1);return o(ze,{...e},o(at,null,o(S.FormTitle,{tag:"h4"},"Encrypt Message")),o(Ve,null,o(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Secret"),o(Qe,{onChange:m=>{n(m)}}),o(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Cover (2 or more Words!!)"),o(Qe,{disabled:c,onChange:m=>{i(m)}}),o(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Password"),o(Qe,{style:{marginBottom:"20px"},defaultValue:"password",onChange:m=>{l(m)}}),o(ut,{value:c,onChange:m=>{u(m)}},"Don't use a Cover")),o(Ot,null,o(R,{color:R.Colors.GREEN,disabled:!d,onClick:()=>{if(!d)return;let m=TS(t,s,c?"d d":r),h=c?m.replaceAll("d",""):m;!h||(so(h),e.onClose())}},"Send"),o(R,{color:R.Colors.TRANSPARENT,look:R.Looks.LINK,style:{left:15,position:"absolute"},onClick:()=>{e.onClose()}},"Cancel")))}function SS(){je(e=>o(kI,{...e}))}var bS=g(()=>{"use strict";a();St();pt();I();el()});function RI(){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 LI(){return o(V,{text:"This message has a hidden message! (InvisibleChat)"},({onMouseEnter:e,onMouseLeave:t})=>o("img",{"aria-label":"Hidden Message Indicator (InvisibleChat)",onMouseEnter:e,onMouseLeave:t,src:"https://github.com/SammCheese/invisible-chat/raw/NewReplugged/src/assets/lock.png",width:20,height:20,style:{transform:"translateY(4p)",paddingInline:4}}))}function EI(e){return e.type.analyticsName!=="normal"?null:o(V,{text:"Encrypt Message"},({onMouseEnter:t,onMouseLeave:n})=>o("div",{style:{display:"flex"}},o(R,{"aria-haspopup":"dialog","aria-label":"Encrypt Message",size:"",look:qt.BLANK,onMouseEnter:t,onMouseLeave:n,innerClassName:yt.button,onClick:()=>SS(),style:{padding:"0 2px",scale:"0.9"}},o("div",{className:yt.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 TS(e,t,n){return ud.hide(e+"\u200B",t,n)}function cd(e,t,n){let r=ud.reveal(e,t);return n?r.replace("\u200B",""):r}function DI(e){return e.endsWith("\u200B")}async function OI(e){let t=xS.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<t.length;r++){let i=cd(n,t[r],!1);if(DI(i))return i}return!1}var ud,xS,pd,el=g(()=>{"use strict";a();Ar();U();le();M();Wa();w();I();vS();bS();xS=D({savedPasswords:{type:0,default:"password, Password",description:"Saved Passwords (Seperated with a , )"}}),pd=y({name:"InvisibleChat",description:"Encrypt your Messages in a non-suspicious way!",authors:[p.SammCheese],dependencies:["MessagePopoverAPI"],patches:[{find:".Messages.MESSAGE_EDITED,",replacement:{match:/let\{className:\i,message:\i[^}]*\}=(\i)/,replace:"try {$1 && $self.INV_REGEX.test($1.message.content) ? $1.content.push($self.indicator()) : null } catch {};$&"}},{find:"ChannelTextAreaButtons",replacement:{match:/(\i)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&,(()=>{try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}})()"}}],EMBED_API_URL:"https://embed.sammcheese.net",INV_REGEX:new RegExp(/( \u200c|\u200d |[\u2060-\u2064])[^\u200b]/),URL_REGEX:new RegExp(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/),settings:xS,async start(){let{default:e}=await w1();ud=new e(!0,!1),On("invDecrypt",t=>this.INV_REGEX.test(t?.content)?{label:"Decrypt Message",icon:this.popOverIcon,message:t,channel:Q.getChannel(t.channel_id),onClick:async()=>{await OI(t).then(n=>n?void this.buildEmbed(t,n):void yS({message:t}))}}:null)},stop(){_n("invDecrypt")},async getEmbed(e){let{body:t}=await wt.post({url:"/unfurler/embed-urls",body:{urls:[e]}});return await t.embeds[0]},async buildEmbed(e,t){let n=t.match(this.URL_REGEX);if(e.embeds.push({type:"rich",title:"Decrypted Message",color:"0x45f5f5",description:t,footer:{text:"Made with \u2764\uFE0F by c0dine and Sammy!"}}),n?.length){let r=await this.getEmbed(new URL(n[0]));r&&e.embeds.push(r)}this.updateMessage(e)},updateMessage:e=>{F.dispatch({type:"MESSAGE_UPDATE",message:e})},chatBarIcon:_.wrap(EI,{noop:!0}),popOverIcon:()=>o(RI,null),indicator:_.wrap(LI,{noop:!0})})});function wS(e,t){!Q.hasChannel(t)||dr.transitionTo(`/channels/${e??"@me"}/${t}`)}var tl,Sn,dd,MS=g(()=>{"use strict";a();jn();M();w();I();tl=!1;dd=y({name:"KeepCurrentChannel",description:"Attempt to navigate to the channel you were in before switching accounts or loading Discord.",authors:[p.Nuckyz],flux:{LOGOUT(e){({isSwitchingAccount:tl}=e)},CONNECTION_OPEN(){!tl||(tl=!1,Sn?.channelId&&wS(Sn.guildId,Sn.channelId))},async CHANNEL_SELECT({guildId:e,channelId:t}){tl||(Sn={guildId:e,channelId:t},await Zt("KeepCurrentChannel_previousData",Sn))}},async start(){Sn=await Pt("KeepCurrentChannel_previousData"),Sn?Sn.channelId&&wS(Sn.guildId,Sn.channelId):(Sn={guildId:rn.getGuildId(),channelId:Pe.getChannelId()??null},await Zt("KeepCurrentChannel_previousData",Sn))}})});async function md(e){return(await pr.fetchAssetIds(fd,[e]))[0]}function FI(e){F.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e,socketId:"LastFM"})}var fd,_I,PS,BI,bn,gd,IS=g(()=>{"use strict";a();U();lo();M();Ze();w();j();I();fd="1108588077900898414",_I="2a96cbd8b46e442fc41c2b86b821562f",PS=new ie("LastFMRichPresence"),BI=A("getLocalPresence");bn=D({username:{description:"last.fm username",type:0},apiKey:{description:"last.fm api key",type:0},shareUsername:{description:"show link to last.fm profile",type:3,default:!1},hideWithSpotify:{description:"hide last.fm presence if spotify is running",type:3,default:!0},statusName:{description:"custom status text",type:0,default:"some music"},nameFormat:{description:"Show name of song and artist in status name",type:4,options:[{label:"Use custom status name",value:"status-name",default:!0},{label:"Use format 'artist - song'",value:"artist-first"},{label:"Use format 'song - artist'",value:"song-first"},{label:"Use artist name only",value:"artist"},{label:"Use song name only",value:"song"}]},useListeningStatus:{description:'show "Listening to" status instead of "Playing"',type:3,default:!1},missingArt:{description:"When album or album art is missing",type:4,options:[{label:"Use large Last.fm logo",value:"lastfmLogo",default:!0},{label:"Use generic placeholder",value:"placeholder"}]}}),gd=y({name:"LastFMRichPresence",description:"Little plugin for Last.fm rich presence",authors:[p.dzshn,p.RuiNtD,p.blahajZip,p.archeruwu],settingsAboutComponent:()=>o(f,null,o(S.FormTitle,{tag:"h3"},"How to get an API key"),o(S.FormText,null,"An API key is required to fetch your current track. To get one, you can visit ",o(rt,{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:bn,start(){this.updatePresence(),this.updateInterval=setInterval(()=>{this.updatePresence()},16e3)},stop(){clearInterval(this.updateInterval)},async fetchTrackData(){if(!bn.store.username||!bn.store.apiKey)return null;try{let e=new URLSearchParams({method:"user.getrecenttracks",api_key:bn.store.apiKey,user:bn.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 PS.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 PS.error("Failed to query Last.fm API",e),null}},async updatePresence(){FI(await this.getActivity())},getLargeImage(e){if(e.imageUrl&&!e.imageUrl.includes(_I))return e.imageUrl;if(bn.store.missingArt==="placeholder")return"placeholder"},async getActivity(){if(bn.store.hideWithSpotify){for(let s of BI.getActivities())if(s.type===2&&s.application_id!==fd)return null}let e=await this.fetchTrackData();if(!e)return null;let t=this.getLargeImage(e),n=t?{large_image:await md(t),large_text:e.album||void 0,small_image:await md("lastfm-small"),small_text:"Last.fm"}:{large_image:await md("lastfm-large"),large_text:e.album||void 0},r=[{label:"View Song",url:e.url}];bn.store.shareUsername&&r.push({label:"Last.fm Profile",url:`https://www.last.fm/user/${bn.store.username}`});let i=(()=>{switch(bn.store.nameFormat){case"artist-first":return e.artist+" - "+e.name;case"song-first":return e.name+" - "+e.artist;case"artist":return e.artist;case"song":return e.name;default:return bn.store.statusName}})();return{application_id:fd,name:i,details:e.name,state:e.artist,assets:n,buttons:r.map(s=>s.label),metadata:{button_urls:r.map(s=>s.url)},type:bn.store.useListeningStatus?2:0,flags:1}}})});var AS,CS,hd,NS=g(()=>{"use strict";a();U();M();w();AS=["Eyrokac","Rdcg$l`'k|~n",'H`tf$d&iajo+d`{"',"Sucqplh`(Eclhualva()&","Lncgmka'8KNMDC,shpanf'`x./,","Ioqweijnfn*IeuvfvAotkfxo./,","Hd{#cp\x7Ft$)nbd!{lq%mig~*\x7Fh`v#mk&sm{gx nd#idjb(a\x7Ffao\"bja&amdkge!Rlo\xECkhf)hyedfjjb*'^hzdrdmm$lu'|ao+mnqw$fijxh~bbmg#Tjm\xEEefd+fnp#lpkffz5","h",`sijklm&cam*rot"hjjq'|ak\x7F xmv#wc'ep*mawmvvlrb(|ynr>"Aqq&cgg-\x7F ugoh%rom)e\x7Fhdpp%$`,'Tnfb}"u\'~`nno!kp$vvhfzeyee"a}%Tfam*Xh`fls%Jboldos-"lj`&hn)~ce!`jcbct|)gdbhnf$wikm$zgaxkmc%afely+og"144?\'ign+iu%p$qisiefr gpfa$',"Ndtfv%ahfgk+ghtf$|ir(|z' Oguaw&`ggdj mgw$|ir(me|n","(!\u0363\xB3$\u0359\u0290'\u0369\xB9#","(\uFF88\u25D7\u30ED\u25D1,\uFF8F-2\uFF6C\uFF95\u272C","Ynw#hjil(ze+psgwp|&sgmkr!","Tikmolh`(fl+a!dvjk\x7F'y|e\x7Fe/,-","3/3750?5><9>885:7","mdmt","Wdn`khc+(oxbeof","Ig\"zkp*'g{*xolglj`&~g|*gowg/$mgt(Eclm`.#ticf{l*xed\"wl`&Kangj igbhqn'd`dn `v#lqrw{3%$bhv-h|)kangj_imwhlhb","Tscmw%Tnoa~x",'I\u2018f#npus(ec`e!vl$lhsm{`ncu"ekw&f(defeov-$Rnf|)sdu\u2018pf$wcam{ceg!vl$du\'D`d~x-"jw%oi(okht-"DJP)Kag\x7Fs,!mq$du\'A\u2010|n sg`akrkq)~jkdl#pj&diefbnf"jp)&@F\\*{ltq#Hlhrp\'',"Ynw$v`&cg`dl fml`%rhlhs*","Dnl$p%qhz{s' hv$w%hh|aceg!;#gpvt(fl+cndea`&dg|fon&v#wjjqm(","\uD83D)pft`gs(ec`e!13$qojmz#",`a!njcmr'ide~nu"lb%rheoedldpz$lu'gbkr`,'dn"zkp&kg\x7Fo4',"hnpqkw",'sn"fau\x7F','Sn"tmqnh}}*musvkaw&flf&+ldv$w%lr{}*aulr#vlao|)cetn"jp$',"Dxkmc%ot(hhxomwwai\x7F'{hln",`hd{#}js&(pe~'sg#gprb(3#"`,"hd{b${","<;vqkijbq33271:56<3799?24944:",`Thof$lu'ofdn,!qsefc'az*bnrcma+&Om{o+iu"\`khct$)bnrd"bcdoi&`,"snofplkb{)c\x7F'r\"lod\x7F'|f*aurv#cpno`abchijklmno","Wdn`khc'|f*eghl{%"],CS=D({replaceEvents:{description:"Replace Event Quotes too",type:3,default:!0}}),hd=y({name:"LoadingQuotes",description:"Replace Discords loading quotes",authors:[p.Ven,p.KraXen72],settings:CS,patches:[{find:".LOADING_DID_YOU_KNOW}",replacement:[{match:/\._loadingText=function\(\)\{/,replace:"$&return $self.quote;"},{match:/\._eventLoadingText=function\(\)\{/,replace:"$&return $self.quote;",predicate:()=>CS.store.replaceEvents}]}],xor(e){let t="read if cute",n=Array.from(e,(r,i)=>r.charCodeAt(0)^i%t.length);return String.fromCharCode(...n)},get quote(){return this.xor(AS[Math.floor(Math.random()*AS.length)])}})});function $I(){let{id:e,guild_id:t}=He([Pe],()=>ei()),{groups:n}=He([RS],()=>RS.getProps(t,e)),r=He([kS],()=>kS.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(ge,{id:"vc-membercount",style:{marginTop:"1em",paddingInline:"1em",justifyContent:"center",alignContent:"center",gap:0}},o(V,{text:`${nl(i)} online in this channel`,position:"bottom"},s=>o("div",{...s},o("span",{style:{backgroundColor:"var(--green-360)",width:"12px",height:"12px",borderRadius:"50%",display:"inline-block",marginRight:"0.5em"}}),o("span",{style:{color:"var(--green-360)"}},nl(i)))),o(V,{text:`${nl(r)} total server members`,position:"bottom"},s=>o("div",{...s},o("span",{style:{width:"6px",height:"6px",borderRadius:"50%",border:"3px solid var(--primary-400)",display:"inline-block",marginRight:"0.5em",marginLeft:"1em"}}),o("span",{style:{color:"var(--primary-400)"}},nl(r)))))}var kS,RS,UI,nl,yd,LS=g(()=>{"use strict";a();le();Rt();M();St();w();j();I();kS=Me("GuildMemberCountStore"),RS=Me("ChannelMemberStore"),UI=new Intl.NumberFormat,nl=e=>UI.format(e);yd=y({name:"MemberCount",description:"Shows the amount of online & total members in the server member list",authors:[p.Ven,p.Commandtechno],patches:[{find:"{isSidebarVisible:",replacement:{match:/(?<=let\{className:(\i),.+?children):\[(\i\.useMemo[^}]+"aria-multiselectable")/,replace:":[$1?.startsWith('members')?$self.render():null,$2"}}],render:_.wrap($I,{noop:!0})})});var vd,ES,DS,bs,Sd,OS=g(()=>{"use strict";a();Kn();U();M();w();j();I();vd=!1,ES=e=>e.key==="Backspace"&&(vd=!0),DS=e=>e.key==="Backspace"&&(vd=!1),bs=D({enableDeleteOnClick:{type:3,description:"Enable delete on click while holding backspace",default:!0},enableDoubleClickToEdit:{type:3,description:"Enable double click to edit",default:!0},enableDoubleClickToReply:{type:3,description:"Enable double click to reply",default:!0},requireModifier:{type:3,description:"Only do double click actions when shift/ctrl is held",default:!1}}),Sd=y({name:"MessageClickActions",description:"Hold Backspace and click to delete, double click to edit/reply",authors:[p.Ven],dependencies:["MessageEventsAPI"],settings:bs,start(){let e=A("deleteMessage","startEditMessage"),t=A("isEditing","isEditingAny");document.addEventListener("keydown",ES),document.addEventListener("keyup",DS),this.onClick=pp((n,r,i)=>{let s=n.author.id===W.getCurrentUser().id;if(vd)bs.store.enableDeleteOnClick&&(s||Ne.can(Se.MANAGE_MESSAGES,r))&&(n.deleted?F.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||bs.store.requireModifier&&!i.ctrlKey&&!i.shiftKey||r.guild_id&&!Ne.can(Se.SEND_MESSAGES,r))return;if(s){if(!bs.store.enableDoubleClickToEdit||t.isEditing(r.id,n.id))return;e.startEditMessage(r.id,n.id,n.content),i.preventDefault()}else{if(!bs.store.enableDoubleClickToReply)return;F.dispatch({type:"CREATE_PENDING_REPLY",channel:r,message:n,shouldMention:!E.plugins.NoReplyMention.enabled,showMentionToggle:r.guild_id!==null})}}})},stop(){dp(this.onClick),document.removeEventListener("keydown",ES),document.removeEventListener("keyup",DS)}})});var Td={};Be(Td,{_modifyAccessories:()=>GI,accessories:()=>ol,addAccessory:()=>Ts,removeAccessory:()=>bd});function Ts(e,t,n){ol.set(e,{callback:t,position:n})}function bd(e){ol.delete(e)}function GI(e,t){for(let n of ol.values()){let r=n.callback(t);if(r!=null){if(!Array.isArray(r))r=[r];else if(r.length===0)continue;e.splice(n.position!=null?n.position<0?e.length+n.position:n.position:e.length,0,...r.filter(i=>i!=null))}}return e}var ol,rl=g(()=>{"use strict";a();ol=new Map});async function qI(e,t){let n=ai.get(t);if(n)return n.message;ai.set(t,{fetched:!1});let i=(await wt.get({url:`/channels/${e}/messages`,query:{limit:1,around:t},retries:2}).catch(()=>null))?.body?.[0];if(!i)return;let s=Pn.getMessages(i.channel_id).receiveMessage(i).get(i.id);return ai.set(s.id,{message:s,fetched:!0}),s}function KI(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"&&!BS.test(s)&&t.push({height:i.height,width:i.width,url:s});return t}function YI(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 ZI(e){return!!(e.components.length||e.attachments.some(t=>!t.content_type?.startsWith("image/"))||e.embeds.some(t=>t.type!=="image"&&(t.type!=="gifv"||BS.test(t.url))))}function XI(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 JI(e,t){return new Proxy(e,{get(n,r){return r==="vencordEmbeddedBy"?t:Reflect.get(...arguments)}})}function QI({message:e}){let t=e.vencordEmbeddedBy??[],n=[],r=null;for(;(r=xd.exec(e.content))!==null;){let[i,s,l,c]=r;if(t.includes(c))continue;let u=Q.getChannel(l);if(!u||s!=="@me"&&!Ne.can(1024n,u))continue;let{listMode:d,idList:m}=il.store,h=[s,l,e.author.id].some(b=>b&&m.includes(b));if(d==="blacklist"&&h||d==="whitelist"&&!h)continue;let v=ai.get(c)?.message;if(!v)if(v??=Pn.getMessage(l,c),v)ai.set(c,{message:v,fetched:!0});else{let b={...e};delete b.embeds,delete b.interaction,WI.push(()=>qI(l,c).then(x=>x&&F.dispatch({type:"MESSAGE_UPDATE",message:b})));continue}let T={message:JI(v,[...t,e.id]),channel:u,guildID:s},P=il.store.automodEmbeds;n.push(P==="always"||P==="prefer"&&!ZI(v)?o(eA,{...T}):o(VI,{...T}))}return n.length?o(f,null,n):null}function VI({message:e,channel:t,guildID:n}){let r=n==="@me",i=!r&&Te.getGuild(t.guild_id),s=W.getUser(Q.getChannel(t.id).recipients?.[0]);return o(HI,{embed:{rawDescription:"",color:"var(--background-secondary)",author:{name:o(re,{variant:"text-xs/medium",tag:"span"},o("span",null,r?"Direct Message - ":i.name+" - "),r?Fe.parse(`<@${s.id}>`):Fe.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:oe(_S.message,il.store.messageBackgroundColor&&_S.searchResult)},o(jI,{id:`message-link-embeds-${e.id}`,message:e,channel:t,subscribeToComponentDispatch:!1}))})}function eA(e){let{message:t,channel:n,guildID:r}=e,i=pc.MessageDisplayCompact.useSetting(),s=r==="@me",l=KI(t),{parse:c}=Fe;return o(zI,{channel:n,childrenAccessories:o(re,{color:"text-muted",variant:"text-xs/medium",tag:"span"},c(s?`<@${Q.getChannel(n.id).recipients[0]}>`:`<#${n.id}>`),o("span",null,s?" - Direct Message":" - "+Te.getGuild(n.guild_id)?.name)),compact:i,content:o(f,null,t.content||t.attachments.length<=l.length?c(t.content):[YI(t.attachments.length,t.embeds.length)],l.map(u=>{let{width:d,height:m}=XI(u.width,u.height);return o("div",null,o("img",{src:u.url,width:d,height:m}))})),hideTimestamp:!1,message:t,_messageEmbed:"automod"})}var ai,HI,zI,jI,_S,xd,BS,WI,il,wd,FS=g(()=>{"use strict";a();rl();U();le();M();Re();Wr();w();j();I();ai=new Map,HI=Xe(".inlineMediaEmbed"),zI=Xe(".withFooter]:","childrenMessageContent:"),jI=Xe("renderSimpleAccessories)"),_S=A("message","searchResult"),xd=/(?<!<)https?:\/\/(?:\w+\.)?discord(?:app)?\.com\/channels\/(\d{17,20}|@me)\/(\d{17,20})\/(\d{17,20})/g,BS=/^https:\/\/(?:www\.)?tenor\.com\//,WI=new Cn,il=D({messageBackgroundColor:{description:"Background color for messages in rich embeds",type:3},automodEmbeds:{description:"Use automod embeds instead of rich embeds (smaller but less info)",type:4,options:[{label:"Always use automod embeds",value:"always"},{label:"Prefer automod embeds, but use rich embeds if some content can't be shown",value:"prefer"},{label:"Never use automod embeds",value:"never",default:!0}]},listMode:{description:"Whether to use ID list as blacklist or whitelist",type:4,options:[{label:"Blacklist",value:"blacklist",default:!0},{label:"Whitelist",value:"whitelist"}]},idList:{description:"Guild/channel/user IDs to blacklist or whitelist (separate with comma)",type:0,default:""},clearMessageCache:{type:6,description:"Clear the linked message cache",component:()=>o(R,{onClick:()=>ai.clear()},"Clear the linked message cache")}});wd=y({name:"MessageLinkEmbeds",description:"Adds a preview to messages that link another message",authors:[p.TheSun,p.Ven,p.RyanCaoDev],dependencies:["MessageAccessoriesAPI"],settings:il,start(){Ts("messageLinkEmbed",e=>xd.test(e.message.content)?(xd.lastIndex=0,o(_,null,o(QI,{message:e.message}))):null,4)}})});var US=g(()=>{});var Md,$S=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/messageLogger/deleteStyleOverlay.css",{name:"src/plugins/messageLogger/deleteStyleOverlay.css",source:`.messagelogger-deleted {
|
|
background-color: rgba(240 71 71 / 15%) !important;
|
|
}
|
|
`,classNames:{},dom:null});Md="src/plugins/messageLogger/deleteStyleOverlay.css"});var Pd,GS=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/messageLogger/deleteStyleText.css",{name:"src/plugins/messageLogger/deleteStyleText.css",source:`/* Message content highlighting */
|
|
.messagelogger-deleted [class*="contents"] > :is(div, h1, h2, h3, p) {
|
|
color: #f04747 !important;
|
|
}
|
|
|
|
/* Bot "thinking" text highlighting */
|
|
.messagelogger-deleted [class*="colorStandard"] {
|
|
color: #f04747 !important;
|
|
}
|
|
|
|
/* Embed highlighting */
|
|
.messagelogger-deleted article :is(div, span, h1, h2, h3, p) {
|
|
color: #f04747 !important;
|
|
}
|
|
|
|
.messagelogger-deleted a {
|
|
color: #be3535 !important;
|
|
text-decoration: underline;
|
|
}
|
|
`,classNames:{},dom:null});Pd="src/plugins/messageLogger/deleteStyleText.css"});function HS(){E.plugins.MessageLogger.deleteStyle==="text"?(vt(Pd),Bt(Md)):(Bt(Pd),vt(Md))}var tA,zS,jS,WS,Id,qS=g(()=>{"use strict";a();US();Mt();U();Je();le();M();Ze();w();j();I();$S();GS();tA=A("edited","communicationDisabled","isSystemMessage");zS="ml-remove-history",jS="ml-toggle-style",WS=(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(G.MenuItem,{id:jS,key:jS,label:"Toggle Deleted Highlight",action:()=>c.classList.toggle("messagelogger-deleted")}))}e.push(o(G.MenuItem,{id:zS,key:zS,label:"Remove Message History",color:"danger",action:()=>{r?F.dispatch({type:"MESSAGE_DELETE",channelId:l,id:s,mlDeleted:!0}):n.editHistory=[]}}))},Id=y({name:"MessageLogger",description:"Temporarily logs deleted and edited messages.",authors:[p.rushii,p.Ven,p.AutumnVN],start(){HS(),ce("message",WS)},stop(){de("message",WS)},renderEdit(e){return o(_,{noop:!0},o("div",{className:"messagelogger-edited"},Fe.parse(e.content),o($n,{timestamp:e.timestamp,isEdited:!0,isInline:!1},o("span",{className:tA.edited}," ","(",tt.Messages.MESSAGE_EDITED,")"))))},makeEdit(e,t){return{timestamp:dn?.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:()=>HS()},ignoreBots:{type:3,description:"Whether to ignore messages by bots",default:!1},ignoreSelf:{type:3,description:"Whether to ignore messages by yourself",default:!1},ignoreUsers:{type:0,description:"Comma-separated list of user IDs to ignore",default:""},ignoreChannels:{type:0,description:"Comma-separated list of channel IDs to ignore",default:""},ignoreGuilds:{type:0,description:"Comma-separated list of guild IDs to ignore",default:""}},handleDelete(e,t,n){try{if(e==null||!n&&!e.has(t.id))return e;let r=i=>{let s=e.get(i);if(!s)return;let l=64;t.mlDeleted||(s.flags&l)===l||this.shouldIgnore(s)?e=e.remove(i):e=e.update(i,u=>u.set("deleted",!0).set("attachments",u.attachments.map(d=>(d.deleted=!0,d))))};n?t.ids.forEach(r):r(t.id)}catch(r){new ie("MessageLogger").error("Error during handleDelete",r)}return e},shouldIgnore(e){let{ignoreBots:t,ignoreSelf:n,ignoreUsers:r,ignoreChannels:i,ignoreGuilds:s}=E.plugins.MessageLogger,l=W.getCurrentUser().id;return t&&e.author?.bot||n&&e.author?.id===l||r.includes(e.author?.id)||i.includes(e.channel_id)||i.includes(Q.getChannel(e.channel_id)?.parent_id)||s.includes(Q.getChannel(e.channel_id)?.guild_id)},patches:[{find:'displayName="MessageStore"',replacement:[{match:/MESSAGE_DELETE:function\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?},/,replace:"MESSAGE_DELETE:function($1){ var cache = $2getOrCreate($1.channelId); cache = $self.handleDelete(cache, $1, false); $2commit(cache);},"},{match:/MESSAGE_DELETE_BULK:function\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?},/,replace:"MESSAGE_DELETE_BULK:function($1){ var cache = $2getOrCreate($1.channelId); cache = $self.handleDelete(cache, $1, true); $2commit(cache);},"},{match:/(MESSAGE_UPDATE:function\((\i)\).+?)\.update\((\i)/,replace:"$1.update($3,m => (($2.message.flags & 64) === 64 || $self.shouldIgnore($2.message)) ? m : $2.message.content !== m.editHistory?.[0]?.content && $2.message.content !== m.content ? m.set('editHistory',[...(m.editHistory || []), $self.makeEdit($2.message, m)]) : m).update($3"},{match:/(?<=getLastEditableMessage\(\i\)\{.{0,200}\.find\((\i)=>)/,replace:"!$1.deleted &&"}]},{find:"}addReaction(",replacement:[{match:/this\.customRenderedContent=(\i)\.customRenderedContent,/,replace:"this.customRenderedContent = $1.customRenderedContent,this.deleted = $1.deleted || false,this.editHistory = $1.editHistory || [],"}]},{find:"THREAD_STARTER_MESSAGE?null===",replacement:[{match:/interactionData:(\i)\.interactionData/,replace:"interactionData:$1.interactionData,deleted:$1.deleted,editHistory:$1.editHistory,attachments:$1.attachments"},{match:/attachments:(\i)\((\i)\)/,replace:"attachments: $1((() => { if ($self.shouldIgnore($2)) return $2; let old = arguments[1]?.attachments; if (!old) return $2; let new_ = $2.attachments?.map(a => a.id) ?? []; let diff = old.filter(a => !new_.includes(a.id)); old.forEach(a => a.deleted = true); $2.attachments = [...diff, ...$2.attachments]; return $2;})()),deleted: arguments[1]?.deleted,editHistory: arguments[1]?.editHistory"},{match:/(\((\i)\){return null==\2\.attachments.+?)spoiler:/,replace:"$1deleted: arguments[0]?.deleted,spoiler:"}]},{find:".removeAttachmentHoverButton",replacement:[{match:/(className:\i,attachment:\i),/,replace:"$1,attachment: {deleted},"},{match:/\[\i\.obscured\]:.+?,/,replace:"$& 'messagelogger-deleted-attachment': deleted,"}]},{find:"Message must not be a thread starter message",replacement:[{match:/\)\("li",\{(.+?),className:/,replace:')("li",{$1,className:(arguments[0].message.deleted ? "messagelogger-deleted " : "")+'}]},{find:'Messages.MESSAGE_EDITED,")"',replacement:[{match:/(\)\("div",\{id:.+?children:\[)/,replace:"$1 (arguments[0].message.editHistory?.length > 0 ? arguments[0].message.editHistory.map(edit => $self.renderEdit(edit)) : null), "}]},{find:'displayName="ReferencedMessageStore"',replacement:[{match:/MESSAGE_DELETE:function\((\i)\).+?},/,replace:"MESSAGE_DELETE:function($1){},"},{match:/MESSAGE_DELETE_BULK:function\((\i)\).+?},/,replace:"MESSAGE_DELETE_BULK:function($1){},"}]},{find:"useMessageMenu:",replacement:[{match:/children:(\[""===.+?\])/,replace:"children:arguments[0].message.deleted?[]:$1"}]}]})});function KS(e){Vr({name:e.name,description:e.name,inputType:1,execute:async(t,n)=>await sl(e.name)?(E.plugins.MessageTags.clyde&&ue(n.channel.id,{content:`${jo} The tag **${e.name}** has been sent!`}),{content:e.message.replaceAll("\\n",`
|
|
`)}):(ue(n.channel.id,{content:`${jo} The tag **${e.name}** does not exist anymore! Please reload ur Discord to fix :)`}),{content:`/${e.name}`}),[nA]:!0},"CustomTags")}var jo,ll,nA,al,sl,oA,rA,Ad,YS=g(()=>{"use strict";a();Jt();jn();U();M();w();jo="<:luna:1035316192220553236>",ll="MessageTags_TAGS",nA=Symbol("MessageTags"),al=()=>Pt(ll).then(e=>e??[]),sl=e=>Pt(ll).then(t=>(t??[]).find(n=>n.name===e)??null),oA=async e=>{let t=await al();return t.push(e),Zt(ll,t),t},rA=async e=>{let t=await al();return t=await t.filter(n=>n.name!==e),Zt(ll,t),t};Ad=y({name:"MessageTags",description:"Allows you to save messages and to use them with a simple command.",authors:[p.Luna],options:{clyde:{name:"Clyde message on send",description:"If enabled, clyde will send you an ephemeral message when a tag was used.",type:3,default:!0}},dependencies:["CommandsAPI"],async start(){for(let e of await al())KS(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=ot(e[0].options,"tag-name",""),r=ot(e[0].options,"message","");if(await sl(n))return ue(t.channel.id,{content:`${jo} A Tag with the name **${n}** already exists!`});let i={name:n,enabled:!0,message:r};KS(i),await oA(i),ue(t.channel.id,{content:`${jo} Successfully created the tag **${n}**!`});break}case"delete":{let n=ot(e[0].options,"tag-name","");if(!await sl(n))return ue(t.channel.id,{content:`${jo} A Tag with the name **${n}** does not exist!`});os(n),await rA(n),ue(t.channel.id,{content:`${jo} Successfully deleted the tag **${n}**!`});break}case"list":{ue(t.channel.id,{embeds:[{title:"All Tags:",description:(await al()).map(n=>`\`${n.name}\`: ${n.message.slice(0,72).replaceAll("\\n"," ")}${n.message.length>72?"...":""}`).join(`
|
|
`)||`${jo} Woops! There are no tags yet, use \`/tags create\` to create one!`,color:14122879,type:"rich"}]});break}case"preview":{let n=ot(e[0].options,"tag-name",""),r=await sl(n);if(!r)return ue(t.channel.id,{content:`${jo} A Tag with the name **${n}** does not exist!`});ue(t.channel.id,{content:r.message.replaceAll("\\n",`
|
|
`)});break}default:{ue(t.channel.id,{content:"Invalid sub-command"});break}}}}]})});function iA(e){let t="";for(let n=0;n<e.length;n++)t+=n%2?e[n].toUpperCase():e[n].toLowerCase();return t}var Cd,ZS=g(()=>{"use strict";a();Jt();M();w();Cd=y({name:"MoreCommands",description:"echo, lenny, mock",authors:[p.Arjix,p.echo,p.Samu],dependencies:["CommandsAPI"],commands:[{name:"echo",description:"Sends a message as Clyde (locally)",options:[Bo],inputType:3,execute:(e,t)=>{let n=ot(e,"message","");ue(t.channel.id,{content:n})}},{name:"lenny",description:"Sends a lenny face",options:[Bo],execute:e=>({content:ot(e,"message","")+" ( \u0361\xB0 \u035C\u0296 \u0361\xB0)"})},{name:"mock",description:"mOcK PeOpLe",options:[ns],execute:e=>({content:iA(ot(e,"message",""))})}]})});var Nd,XS=g(()=>{"use strict";a();Jt();M();w();Nd=y({name:"MoreKaomoji",description:"Adds more Kaomoji to discord. \u30FD(\xB4\u25BD`)/",authors:[p.JacobTm],dependencies:["CommandsAPI"],commands:[{name:"dissatisfaction",description:" \uFF1E\uFE4F\uFF1C"},{name:"smug",description:" \u0CA0_\u0CA0"},{name:"happy",description:" \u30FD(\xB4\u25BD`)/"},{name:"crying",description:" \u0CA5_\u0CA5"},{name:"angry",description:" \u30FD(\uFF40\u0414\xB4)\uFF89"},{name:"anger",description:" \u30FD(\uFF4F`\u76BF\u2032\uFF4F)\uFF89"},{name:"joy",description:" <(\uFFE3\uFE36\uFFE3)>"},{name:"blush",description:"\u0AEE \u02F6\u1D54 \u1D55 \u1D54\u02F6 \u10D0"},{name:"confused",description:"(\u2022\u0E34_\u2022\u0E34)?"},{name:"sleeping",description:"(\u1D17_\u1D17)"},{name:"laughing",description:"o(\u2267\u25BD\u2266)o"}].map(e=>({...e,options:[Bo],execute:t=>({content:ot(t,"message","")+e.description})}))})});function aA(e){Wo.store.tagSettings??=kd;let[t,n]=J(Wo.store.tagSettings),r=i=>{n(i),e.setValue(i)};return o(ge,{flexDirection:"column"},li.map(i=>o(xt,{style:{padding:"1em 1em 0"}},o(S.FormTitle,{style:{width:"fit-content"}},o(V,{text:i.description},({onMouseEnter:s,onMouseLeave:l})=>o("div",{onMouseEnter:s,onMouseLeave:l},i.displayName," Tag ",o(uo,{type:uo.Types[i.name]})))),o(Qe,{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:q.bottom16}),o(ut,{value:t[i.name]?.showInChat??!0,onChange:s=>{t[i.name].showInChat=s,r(t)},hideBorder:!0},"Show in messages"),o(ut,{value:t[i.name]?.showInNotChat??!0,onChange:s=>{t[i.name].showInNotChat=s,r(t)},hideBorder:!0},"Show in member list and profiles"))))}var sA,uo,JS,li,kd,Wo,Rd,QS=g(()=>{"use strict";a();U();Rt();M();it();w();j();I();sA=A("computePermissions","canEveryoneRole"),uo=nn(e=>e.Types?.[0]==="BOT"),JS=(e,t)=>!!e?.webhookId&&t.isNonUserBot(),li=[{name:"WEBHOOK",displayName:"Webhook",description:"Messages sent by webhooks",condition:JS},{name:"OWNER",displayName:"Owner",description:"Owns the server",condition:(e,t,n)=>Te.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"]}],kd=Object.fromEntries(li.map(({name:e,displayName:t})=>[e,{text:t,showInChat:!0,showInNotChat:!0}]));Wo=D({dontShowForBots:{description:"Don't show extra tags for bots (excluding webhooks)",type:3},dontShowBotTag:{description:"Only show extra tags for bots / Hide [BOT] text",type:3},tagSettings:{type:6,component:aA,description:"fill me"}}),Rd=y({name:"MoreUserTags",description:"Adds tags for webhooks and moderative roles (owner, admin, etc.)",authors:[p.Cyn,p.TheSun,p.RyanCaoDev,p.LordElias,p.AutumnVN],settings:Wo,patches:[{find:"BotTagTypes:",replacement:{match:/\((\i)=\{\}\)\)\[(\i)\.BOT/,replace:"($1=$self.getTagTypes()))[$2.BOT"}},{find:".DISCORD_SYSTEM_MESSAGE_BOT_TAG_TOOLTIP,",replacement:[{match:/(switch\((\i)\){.+?)case (\i(?:\.\i)?)\.BOT:default:(\i)=(\i\.\i\.Messages)\.BOT_TAG_BOT/,replace:(e,t,n,r,i,s)=>`${t}default:{${i} = $self.getTagText(${r}[${n}], ${s})}`},{match:/(\i)=(\i)===\i(?:\.\i)?\.ORIGINAL_POSTER/,replace:"$1=$self.isOPTag($2)"},{match:/.botText,children:(\i)}\)]/,replace:"$&,'data-tag':$1.toLowerCase()"}]},{find:"renderSystemTag:",replacement:{match:/;return\((\(null==\i\?void 0:\i\.isSystemDM\(\).+?.Types.ORIGINAL_POSTER\)),null==(\i)\)/,replace:";$1;$2=$self.getTag({...arguments[0],origType:$2,location:'chat'});return $2 == null"}},{find:".Messages.GUILD_OWNER,",replacement:{match:/(?<type>\i)=\(null==.{0,100}\.BOT;return null!=(?<user>\i)&&\i\.bot/,replace:"$<type> = $self.getTag({user: $<user>, channel: arguments[0].channel, origType: $<user>.bot ? 0 : null, location: 'not-chat' }); return typeof $<type> === 'number'"}},{find:".hasAvatarForGuild(null==",replacement:{match:/(?=usernameIcon:)/,replace:"moreTags_channelId:arguments[0].channelId,"}},{find:'copyMetaData:"User Tag"',replacement:{match:/(?=,botClass:)/,replace:",moreTags_channelId:arguments[0].moreTags_channelId"}},{find:",overrideDiscriminator:",replacement:[{match:/user:\i,nick:\i,/,replace:"$&moreTags_channelId,"},{match:/,botType:(\i\((\i)\)),/g,replace:",botType:$self.getTag({user:$2,channelId:moreTags_channelId,origType:$1,location:'not-chat'}),"}]}],start(){if(!Wo.store.tagSettings)if(!Wo.store.visibility_WEBHOOK)Wo.store.tagSettings=kd;else{let e={...kd};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=Te.getGuild(t?.guild_id);if(!n)return[];let r=sA.computePermissions({user:e,context:n,overwrites:t.permissionOverwrites});return Object.entries(Se).map(([i,s])=>r&s?i:"").filter(Boolean)},getTagTypes(){let e={},t=100;return li.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===uo.Types.ORIGINAL_POSTER||li.some(t=>e===uo.Types[`${t.name}-OP`]),getTagText(e,t){if(!e)return t.BOT_TAG_BOT;let[n,r]=e.split("-"),i=li.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(!t)return null;if(i==="chat"&&t.id==="1")return uo.Types.OFFICIAL;if(t.isClyde())return uo.Types.AI;let l=typeof r=="number"?r:null;if(s??=Q.getChannel(n),!s)return l;let c=this.settings.store,u=this.getPermissions(t,s);for(let d of li)if(!(i==="chat"&&!c.tagSettings[d.name].showInChat)&&!(i==="not-chat"&&!c.tagSettings[d.name].showInNotChat)&&(d.permissions?.some(m=>u.includes(m))||d.condition?.(e,t,s))){s.isForumPost()&&s.ownerId===t.id?l=uo.Types[`${d.name}-OP`]:t.bot&&!JS(e,t)&&!c.dontShowBotTag?l=uo.Types[`${d.name}-BOT`]:l=uo.Types[d.name];break}return l}})});function uA(e,t){let n=0,r=0;for(;(r=e.indexOf(t,r)+1)!==0;)n++;return n}function pA(e,t){if(!t.global)throw new Error("pattern must be global");let n=0;for(;t.test(e);)n++;return n}function mA(e){let t=uA(e,Ed)+pA(e,dA);return Math.min(t,10)}function Ld(){if(!qo.store.triggerWhenUnfocused&&!document.hasFocus())return;let e=document.createElement("audio");e.src=qo.store.quality==="HD"?cA:lA,e.volume=qo.store.volume,e.play()}var Ed,lA,cA,qo,Dd,dA,VS=g(()=>{"use strict";a();U();Au();M();Re();w();I();Ed="\u{1F5FF}",lA="https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai.mp3",cA="https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai_hd.wav",qo=D({volume:{description:"Volume of the \u{1F5FF}\u{1F5FF}\u{1F5FF}",type:5,markers:Fo(0,1,.1),default:.5,stickToMarkers:!1},quality:{description:"Quality of the \u{1F5FF}\u{1F5FF}\u{1F5FF}",type:4,options:[{label:"Normal",value:"Normal",default:!0},{label:"HD",value:"HD"}]},triggerWhenUnfocused:{description:"Trigger the \u{1F5FF} even when the window is unfocused",type:3,default:!0},ignoreBots:{description:"Ignore bots",type:3,default:!0},ignoreBlocked:{description:"Ignore blocked users",type:3,default:!0}}),Dd=y({name:"Moyai",authors:[p.Megu,p.Nuckyz],description:"\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}",settings:qo,flux:{async MESSAGE_CREATE({optimistic:e,type:t,message:n,channelId:r}){if(e||t!=="MESSAGE_CREATE"||n.state==="SENDING"||qo.store.ignoreBots&&n.author?.bot||qo.store.ignoreBlocked&&et.isBlocked(n.author?.id)||!n.content||r!==Pe.getChannelId())return;let i=mA(n.content);for(let s=0;s<i;s++)Ld(),await Mo(300)},MESSAGE_REACTION_ADD({optimistic:e,type:t,channelId:n,userId:r,messageAuthorId:i,emoji:s}){if(e||t!=="MESSAGE_REACTION_ADD"||qo.store.ignoreBots&&W.getUser(r)?.bot||qo.store.ignoreBlocked&&et.isBlocked(i)||n!==Pe.getChannelId())return;let l=s.name.toLowerCase();l!==Ed&&!l.includes("moyai")&&!l.includes("moai")||Ld()},VOICE_CHANNEL_EFFECT_SEND({emoji:e}){if(!e?.name)return;let t=e.name.toLowerCase();t!==Ed&&!t.includes("moyai")&&!t.includes("moai")||Ld()}}});dA=/<a?:\w*moy?ai\w*:\d{17,20}>/gi});var cl,Od,e0=g(()=>{"use strict";a();U();M();w();j();cl=D({guild:{description:"Mute Guild",type:3,default:!0},everyone:{description:"Suppress @everyone and @here",type:3,default:!0},role:{description:"Suppress All Role @mentions",type:3,default:!0}}),Od=y({name:"MuteNewGuild",description:"Mutes newly joined guilds",authors:[p.Glitch,p.Nuckyz,p.carince],patches:[{find:",acceptInvite(",replacement:{match:/INVITE_ACCEPT_SUCCESS.+?,(\i)=null!==.+?;/,replace:(e,t)=>`${e}$self.handleMute(${t});`}},{find:"{joinGuild:",replacement:{match:/guildId:(\i),lurker:(\i).{0,20}}\)\);/,replace:(e,t,n)=>`${e}if(!${n})$self.handleMute(${t});`}}],settings:cl,handleMute(e){e==="@me"||e==="null"||e==null||Dt("updateGuildNotificationSettings").updateGuildNotificationSettings(e,{muted:cl.store.guild,suppress_everyone:cl.store.everyone,suppress_roles:cl.store.role})}})});function vA(e){return e.name||e.recipients.map(W.getUser).filter(Mp).map(t=>et.getNickname(t.id)||hA.getName(t)).join(", ")}var fA,gA,hA,Ko,yA,_d,t0=g(()=>{"use strict";a();M();Ha();w();j();I();fA=A("selectPrivateChannel"),gA=A("getChannelIconURL"),hA=A("getGlobalName"),Ko=A("emptyIconFriends","emptyIconGuilds"),yA=A("guildNick","guildAvatarWithoutIcon");_d=y({name:"MutualGroupDMs",description:"Shows mutual group dms in profiles",authors:[p.amia],patches:[{find:".Messages.USER_PROFILE_MODAL",replacement:{match:/(?<=\.MUTUAL_GUILDS\}\),)(?=(\i\.bot).{0,20}(\(0,\i\.jsx\)\(.{0,100}id:))/,replace:'($1||arguments[0].isCurrentUser)?null:$2"MUTUAL_GDMS",children:"Mutual Groups"}),'}},{find:".UserProfileSections.USER_INFO_CONNECTIONS:",replacement:{match:/(?<={user:(\i),onClose:(\i)}\);)(?=case \i\.\i\.MUTUAL_FRIENDS)/,replace:'case "MUTUAL_GDMS":return $self.renderMutualGDMs($1,$2);'}}],renderMutualGDMs(e,t){let n=Q.getSortedPrivateChannels().filter(r=>r.isGroupDM()&&r.recipients.includes(e.id)).map(r=>o(Or,{className:Ko.listRow,onClick:()=>{t(),fA.selectPrivateChannel(r.id)}},o(_r,{src:gA.getChannelIconURL({id:r.id,icon:r.icon,size:32}),size:"SIZE_40",className:Ko.listAvatar}),o("div",{className:Ko.listRowContent},o("div",{className:Ko.listName},vA(r)),o("div",{className:yA.guildNick},r.recipients.length+1," Members"))));return o(Dr,{className:Ko.listScroller,fade:!0,onClose:t},n.length>0?n:o("div",{className:Ko.empty},o("div",{className:Ko.emptyIconFriends}),o("div",{className:Ko.emptyText},"No group dms in common")))}})});var SA,Bd,n0=g(()=>{"use strict";a();U();M();w();j();SA=A("getRelationships","isBlocked"),Bd=y({name:"NoBlockedMessages",description:"Hides all blocked messages from chat completely.",authors:[p.rushii,p.Samu],patches:[{find:"Messages.BLOCKED_MESSAGES_HIDE",replacement:[{match:/let\{[^}]*collapsedReason[^}]*\}/,replace:"return null;$&"}]},...['displayName="MessageStore"','displayName="ReadStateStore"'].map(e=>({find:e,predicate:()=>E.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=>SA.isBlocked(e.author.id)})});var Fd,o0=g(()=>{"use strict";a();M();w();Fd=y({name:"NoDevtoolsWarning",description:"Disables the 'HOLD UP' banner in the console. As a side effect, also prevents Discord from hiding your token, which prevents random logouts.",authors:[p.Ven],patches:[{find:"setDevtoolsCallbacks",replacement:{match:/if\(null!=\i&&"0.0.0"===\i\.remoteApp\.getVersion\(\)\)/,replace:"if(true)"}}]})});var Ud,r0=g(()=>{"use strict";a();M();w();Ud=y({name:"NoF1",description:"Disables F1 help bind.",authors:[p.Cyn],patches:[{find:',"f1"],comboKeysBindGlobal:',replacement:{match:',"f1"],comboKeysBindGlobal:',replace:"],comboKeysBindGlobal:"}}]})});var $d,i0=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/noMosaic/styles.css",{name:"src/plugins/noMosaic/styles.css",source:`[class^="nonMediaAttachmentsContainer_"] [class*="messageAttachment_"] {
|
|
position: relative;
|
|
}
|
|
`,classNames:{},dom:null});$d="src/plugins/noMosaic/styles.css"});var Gd,Hd,s0=g(()=>{"use strict";a();U();Je();M();w();i0();Gd=D({inlineVideo:{description:"Play videos without carousel modal",type:3,default:!0,restartNeeded:!0},mediaLayoutType:{description:"Choose media layout type",type:4,restartNeeded:!0,options:[{label:"STATIC, render loading image but image isn't resposive, no problem unless discord window width is too small",value:"STATIC",default:!0},{label:"RESPONSIVE, image is responsive but not render loading image, cause messages shift when loaded",value:"RESPONSIVE"}]}}),Hd=y({name:"NoMosaic",authors:[p.AutumnVN],description:"Removes Discord new image mosaic",tags:["image","mosaic","media"],settings:Gd,patches:[{find:".oneByTwoLayoutThreeGrid",replacement:[{match:/mediaLayoutType:\i\.\i\.MOSAIC/,replace:"mediaLayoutType:$self.mediaLayoutType()"},{match:/null!==\(\i=\i\.get\(\i\)\)&&void 0!==\i\?\i:"INVALID"/,replace:'"INVALID"'}]},{find:"renderAttachments(",predicate:()=>Gd.store.inlineVideo,replacement:{match:/url:(\i)\.url\}\);return /,replace:"$&$1.content_type?.startsWith('image/')&&"}},{find:"Messages.REMOVE_ATTACHMENT_TOOLTIP_TEXT",replacement:{match:/\i===\i\.\i\.MOSAIC/,replace:"true"}}],mediaLayoutType(){return Gd.store.mediaLayoutType},start(){vt($d)},stop(){Bt($d)}})});var bA,xs,zd,a0=g(()=>{"use strict";a();U();M();w();j();bA=A("getMessageRequestsCount"),xs=D({hideFriendRequestsCount:{type:3,description:"Hide incoming friend requests count",default:!0,restartNeeded:!0},hideMessageRequestsCount:{type:3,description:"Hide message requests count",default:!0,restartNeeded:!0},hidePremiumOffersCount:{type:3,description:"Hide nitro offers count",default:!0,restartNeeded:!0}}),zd=y({name:"NoPendingCount",description:"Removes the ping count of incoming friend requests, message requests, and nitro offers.",authors:[p.amia],settings:xs,patches:[{find:"getPendingCount(){",predicate:()=>xs.store.hideFriendRequestsCount,replacement:{match:/(?<=getPendingCount\(\)\{)/,replace:"return 0;"}},{find:"getMessageRequestsCount(){",predicate:()=>xs.store.hideMessageRequestsCount,replacement:{match:/(?<=getMessageRequestsCount\(\)\{)/,replace:"return 0;"}},{find:".getSpamChannelsCount(),",predicate:()=>xs.store.hideMessageRequestsCount,replacement:{match:/(?<=getSpamChannelsCount\(\),\i=)\i\.getMessageRequestsCount\(\)/,replace:"$self.getRealMessageRequestCount()"}},{find:"showProgressBadge:",predicate:()=>xs.store.hidePremiumOffersCount,replacement:{match:/(?<=\{unviewedTrialCount:(\i),unviewedDiscountCount:(\i)\}.{0,200}\i=)\1\+\2/,replace:"0"}}],getRealMessageRequestCount(){return bA.getMessageRequestChannelIds().size}})});var jd,l0=g(()=>{"use strict";a();M();w();jd=y({name:"NoProfileThemes",description:"Completely removes Nitro profile themes",authors:[p.TheKodeToad],patches:[{find:".NITRO_BANNER,",replacement:{match:/=(?=\i\.\i\.isPremiumAtLeast\(null==(\i))/,replace:"=(arguments[0]?.bannerSrc||$1?.banner)&&"}},{find:".avatarPositionPremiumNoBanner,default:",replacement:{match:/\.avatarPositionPremiumNoBanner(?=,default:\i\.(\i))/,replace:".$1"}},{find:"hasThemeColors(){",replacement:{match:/get canUsePremiumProfileCustomization\(\){return /,replace:"$&false &&"}}]})});var ul,Wd,c0=g(()=>{"use strict";a();U();M();w();ul=D({userList:{description:"List of users to allow or exempt pings for (separated by commas or spaces)",type:0,default:"1234567890123445,1234567890123445"},shouldPingListed:{description:"Behaviour",type:4,options:[{label:"Do not ping the listed users",value:!1},{label:"Only ping the listed users",value:!0,default:!0}]},inverseShiftReply:{description:"Invert Discord's shift replying behaviour (enable to make shift reply mention user)",type:3,default:!1}}),Wd=y({name:"NoReplyMention",description:"Disables reply pings by default",authors:[p.DustyAngel47,p.axyie,p.pylix,p.outfoxxed],settings:ul,shouldMention(e,t){let n=ul.store.userList.includes(e.author.id),r=ul.store.shouldPingListed?n:!n;return ul.store.inverseShiftReply?t!==r:!t&&r},patches:[{find:',"Message")}function',replacement:{match:/:(\i),shouldMention:!(\i)\.shiftKey/,replace:":$1,shouldMention:$self.shouldMention($1,$2.shiftKey)"}}]})});var qd,u0=g(()=>{"use strict";a();M();w();qd=y({name:"NoScreensharePreview",description:"Disables screenshare previews from being sent.",authors:[p.Nuckyz],patches:[{find:'"ApplicationStreamPreviewUploadManager"',replacement:{match:/await \i\.\i\.(makeChunkedRequest\(|post\(\{url:)\i\.\i\.STREAM_PREVIEW.+?\}\)/g,replace:"0"}}]})});var Kd,p0=g(()=>{"use strict";a();M();w();Kd=y({name:"NoTypingAnimation",authors:[p.AutumnVN],description:"Disables the CPU-intensive typing dots animation",patches:[{find:"dotCycle",replacement:{match:/document.hasFocus\(\)/,replace:"false"}}]})});var Yd,d0=g(()=>{"use strict";a();M();w();Yd=y({name:"NoUnblockToJump",description:"Allows you to jump to messages of blocked users without unblocking them",authors:[p.dzshn],patches:[{find:'.id,"Search Results"',replacement:{match:/if\(.{1,10}\)(.{1,10}\.show\({.{1,50}UNBLOCK_TO_JUMP_TITLE)/,replace:"if(false)$1"}},{find:"renderJumpButton()",replacement:{match:/if\(.{1,10}\)(.{1,10}\.show\({.{1,50}UNBLOCK_TO_JUMP_TITLE)/,replace:"if(false)$1"}},{find:"flash:!0,returnMessageId",replacement:{match:/.\?(.{1,10}\.show\({.{1,50}UNBLOCK_TO_JUMP_TITLE)/,replace:"false?$1"}}]})});var Zd,m0=g(()=>{"use strict";a();M();w();Zd=y({name:"NormalizeMessageLinks",description:"Strip canary/ptb from message links",authors:[p.bb010g],patches:[{find:".Messages.COPY_MESSAGE_LINK,",replacement:{match:/\.concat\(location\.host\)/,replace:".concat($self.normalizeHost(location.host))"}}],normalizeHost(e){return e.replace(/(^|\b)(canary\.|ptb\.)(discord.com)$/,"$1$3")}})});var Xd,f0=g(()=>{"use strict";a();M();w();Xd=y({name:"NSFWGateBypass",description:"Allows you to access NSFW channels without setting/verifying your age",authors:[p.Commandtechno],patches:[{find:".nsfwAllowed=null",replacement:{match:/(\w+)\.nsfwAllowed=/,replace:"$1.nsfwAllowed=true;"}}]})});var ws,Jd,g0=g(()=>{"use strict";a();U();M();w();I();ws=D({channelToAffect:{type:4,description:"Select the type of DM for the plugin to affect",options:[{label:"Both",value:"both_dms",default:!0},{label:"User DMs",value:"user_dm"},{label:"Group DMs",value:"group_dm"}]},allowMentions:{type:3,description:"Receive audio pings for @mentions",default:!1},allowEveryone:{type:3,description:"Receive audio pings for @everyone and @here in group DMs",default:!1}}),Jd=y({name:"OnePingPerDM",description:"If unread messages are sent by a user in DMs multiple times, you'll only receive one audio ping. Read the messages to reset the limit",authors:[p.ProffDea],settings:ws,patches:[{find:".getDesktopType()===",replacement:[{match:/(\i\.\i\.getDesktopType\(\)===\i\.\i\.NEVER)\)/,replace:"$&if(!$self.isPrivateChannelRead(arguments[0]?.message))return;else "},{match:/sound:(\i\?\i:void 0,volume:\i,onClick)/,replace:"sound:!$self.isPrivateChannelRead(arguments[0]?.message)?undefined:$1"}]}],isPrivateChannelRead(e){let t=Q.getChannel(e.channel_id)?.type;return t!==1&&t!==3||t===1&&ws.store.channelToAffect==="group_dm"||t===3&&ws.store.channelToAffect==="user_dm"||ws.store.allowMentions&&e.mentions.some(n=>n.id===W.getCurrentUser().id)||ws.store.allowEveryone&&e.mention_everyone?!0:lr.getOldestUnreadMessageId(e.channel_id)===e.id}})});var Qd,h0=g(()=>{"use strict";a();M();w();Qd=y({name:"oneko",description:"cat follow mouse (real)",authors:[p.Ven,p.adryd],start(){fetch("https://raw.githubusercontent.com/adryd325/oneko.js/8fa8a1864aa71cd7a794d58bc139e755e96a236c/oneko.js").then(e=>e.text()).then(e=>e.replace("./oneko.gif","https://raw.githubusercontent.com/adryd325/oneko.js/14bab15a755d0e35cd4ae19c931d96d306f99f42/oneko.gif")).then(eval)},stop(){document.getElementById("oneko")?.remove()}})});var TA,xA,wA,MA,Cr,PA,Vd,y0=g(()=>{"use strict";a();U();M();w();I();TA=/^https:\/\/(spotify\.link|s\.team)\/.+$/,xA=/^https:\/\/open\.spotify\.com\/(track|album|artist|playlist|user|episode)\/(.+)(?:\?.+?)?$/,wA=/^https:\/\/(steamcommunity\.com|(?:help|store)\.steampowered\.com)\/.+$/,MA=/^https:\/\/store\.epicgames\.com\/(.+)$/,Cr=D({spotify:{type:3,description:"Open Spotify links in the Spotify app",default:!0},steam:{type:3,description:"Open Steam links in the Steam app",default:!0},epic:{type:3,description:"Open Epic Games links in the Epic Games Launcher",default:!0}}),PA=VencordNative.pluginHelpers.OpenInApp,Vd=y({name:"OpenInApp",description:"Open Spotify, Steam and Epic Games URLs in their respective apps instead of your browser",authors:[p.Ven],settings:Cr,patches:[{find:"trackAnnouncementMessageLinkClicked({",replacement:{match:/(?<=handleClick:function\(\)\{return (\i)\}.+?)function \1\(.+?\)\{/,replace:"async $& if(await $self.handleLink(...arguments)) return;"}},{find:"WEB_OPEN(",predicate:()=>Cr.store.spotify,replacement:{match:/\i\.\i\.isProtocolRegistered\(\)(.{0,100})window.open/g,replace:"true$1VencordNative.native.openExternal"}},{find:".CONNECTED_ACCOUNT_VIEWED,",replacement:{match:/(?<=href:\i,onClick:\i=>\{)(?=.{0,10}\i=(\i)\.type,.{0,100}CONNECTED_ACCOUNT_VIEWED)/,replace:"$self.handleAccountView(arguments[0],$1.type,$1.id);"}}],async handleLink(e,t){if(!e)return!1;let n=e.href;TA.test(n)&&(t?.preventDefault(),n=await PA.resolveRedirect(n));e:{if(!Cr.store.spotify)break e;let r=xA.exec(n);if(!r)break e;let[,i,s]=r;return VencordNative.native.openExternal(`spotify:${i}:${s}`),t?.preventDefault(),!0}e:{if(!Cr.store.steam||!wA.test(n))break e;return VencordNative.native.openExternal(`steam://openurl/${n}`),t?.preventDefault(),mn("Opened link in Steam",ee.Type.SUCCESS),!0}e:{if(!Cr.store.epic)break e;let r=MA.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"&&Cr.store.spotify?(VencordNative.native.openExternal(`spotify:user:${n}`),e.preventDefault()):t==="steam"&&Cr.store.steam&&(VencordNative.native.openExternal(`steam://openurl/https://steamcommunity.com/profiles/${n}`),mn("Opened link in Steam",ee.Type.SUCCESS),e.preventDefault())}})});function S0(e){F.dispatch({type:"POGGERMODE_SETTINGS_UPDATE",settings:{enabled:e,settingsVisible:e}})}function b0(e){let t={screenshakeEnabledLocations:{0:!0,1:!0,2:!0},shakeIntensity:1,confettiSize:16,confettiCount:5,combosRequiredCount:1};switch(e){case 0:{Object.assign(t,{screenshakeEnabledLocations:{0:!0,1:!1,2:!1},combosRequiredCount:5});break}case 1:{Object.assign(t,{confettiSize:12,confettiCount:8});break}case 2:{Object.assign(t,{shakeIntensity:20,confettiSize:25,confettiCount:15});break}}F.dispatch({type:"POGGERMODE_SETTINGS_UPDATE",settings:t})}var v0,em,T0=g(()=>{"use strict";a();U();M();w();I();v0=D({superIntensePartyMode:{description:"Party intensity",type:4,options:[{label:"Normal",value:0,default:!0},{label:"Better",value:1},{label:"Project X",value:2}],restartNeeded:!1,onChange:b0}}),em=y({name:"Party mode \u{1F389}",description:"Allows you to use party mode cause the party never ends \u2728",authors:[p.UwUDev],settings:v0,start(){S0(!0),b0(v0.store.superIntensePartyMode)},stop(){S0(!1)}})});var tm,nm,x0=g(()=>{"use strict";a();U();M();w();tm=D({lockout:{type:3,default:!0,description:`Bypass the permission lockout prevention ("Pretty sure you don't want to do this")`,restartNeeded:!0},onboarding:{type:3,default:!0,description:'Bypass the onboarding requirements ("Making this change will make your server incompatible [...]")',restartNeeded:!0}}),nm=y({name:"PermissionFreeWill",description:"Disables the client-side restrictions for channel permission management.",authors:[p.lewisakura],patches:[{find:".showPermissionLockoutModal(",replacement:[{match:/case"DENY":.{0,50}if\((?=\i\.\i\.can)/,replace:"$&true||"}],predicate:()=>tm.store.lockout},{find:".ONBOARDING_CHANNEL_THRESHOLD_WARNING",replacement:[{match:/(?<=(?:isDefaultChannelThresholdMetAfterDelete|checkDefaultChannelThresholdMetAfterChannelPermissionDeny):function\(\)\{)return \i(?=\})/g,replace:"return () => true"}],predicate:()=>tm.store.onboarding}],settings:tm})});var w0=g(()=>{});function IA(e){return oo(e.toLowerCase().split("_"))}function pl(e){return e=M0[e]||e,tt.Messages[e]||IA(e)}function P0(e){e==="USE_APPLICATION_COMMANDS"?e="USE_APPLICATION_COMMANDS_GUILD":e==="SEND_VOICE_MESSAGES"?e="SEND_VOICE_MESSAGE_GUILD":e!=="STREAM"&&(e=M0[e]||e);let t=tt.Messages[`ROLE_PERMISSIONS_${e}_DESCRIPTION`];return t?.hasMarkdown?Fe.parse(t.message):typeof t=="string"?t:""}function dl({roles:e,id:t},n){return[...n.roles,t].map(r=>e[r]).sort((r,i)=>i.position-r.position)}function I0(e){switch(Yo.store.permissionsSortOrder){case 0:return e.sort((t,n)=>n.position-t.position);case 1:return e.sort((t,n)=>t.position-n.position);default:return e}}function ml(e,t){let n=Te.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 zt,M0,Ms=g(()=>{"use strict";a();Je();ro();I();Is();Ps();zt=Ue("vc-permviewer-");M0={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 om(){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 rm(){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 C0(){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 N0=g(()=>{"use strict";a()});function CA(e,t,n){return je(r=>o(RA,{modalProps:r,permissions:e,guild:t,header:n}))}function NA({permissions:e,guild:t,modalProps:n,header:r}){e.sort((c,u)=>c.type-u.type),He([ke],()=>ke.getMemberIds(t.id),null,(c,u)=>c.length===u.length),De(()=>{let c=e.filter(u=>u.type===1&&!ke.isMember(t.id,u.id)).map(({id:u})=>u);F.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[t.id],userIds:c})},[]);let[i,s]=J(0),l=e[i];return o(ze,{...n,size:"large"},o(at,null,o(re,{className:zt("perms-title"),variant:"heading-lg/semibold"},r," permissions:"),o(ln,{onClick:n.onClose})),o(Ve,null,!l&&o("div",{className:zt("perms-no-perms")},o(re,{variant:"heading-lg/normal"},"No permissions to display!")),l&&o("div",{className:zt("perms-container")},o("div",{className:zt("perms-list")},e.map((c,u)=>{let d=W.getUser(c.id??""),m=t.roles[c.id??""];return o("button",{className:zt("perms-list-item-btn"),onClick:()=>s(u)},o("div",{className:zt("perms-list-item",{"perms-list-item-active":i===u}),onContextMenu:h=>{Yo.store.unsafeViewAsRole&&c.type===0&&pn.openContextMenu(h,()=>o(kA,{guild:t,roleId:c.id,onClose:n.onClose}))}},(c.type===0||c.type===2)&&o("span",{className:zt("perms-role-circle"),style:{backgroundColor:m?.colorString??"var(--primary-300)"}}),c.type===1&&d!==void 0&&o("img",{className:zt("perms-user-img"),src:d.getAvatarURL(void 0,void 0,!1)}),o(re,{variant:"text-md/normal"},c.type===0?m?.name??"Unknown Role":c.type===1?(d&&ao(d))??"Unknown User":o(ge,{style:{gap:"0.2em",justifyItems:"center"}},"@owner",o(vy,{height:18,width:18,"aria-hidden":"true"})))))})),o("div",{className:zt("perms-perms")},Object.entries(Se).map(([c,u])=>o("div",{className:zt("perms-perms-item")},o("div",{className:zt("perms-perms-item-icon")},(()=>{let{permissions:d,overwriteAllow:m,overwriteDeny:h}=l;return d?(d&u)===u?rm():om():m&&(m&u)===u?rm():h&&(h&u)===u?om():C0()})()),o(re,{variant:"text-md/normal"},pl(c)),o(V,{text:P0(c)||"No Description"},d=>o(Ca,{...d}))))))))}function kA({guild:e,roleId:t,onClose:n}){return o(G.Menu,{navId:zt("role-context-menu"),onClose:pn.closeContextMenu,"aria-label":"Role Options"},o(G.MenuItem,{id:"vc-pw-view-as-role",label:"View As Role",action:()=>{let r=e.roles[t];!r||(n(),F.dispatch({type:"IMPERSONATE_UPDATE",guildId:e.id,data:{type:"ROLES",roles:{[t]:r}}}))}}))}var RA,ci,Ps=g(()=>{"use strict";a();le();Rt();Ut();St();pt();I();Is();Ms();N0();RA=_.wrap(NA),ci=CA});var k0=g(()=>{});function sm({children:e,onMoreClick:t,buttons:n,moreTooltipText:r,defaultState:i=!1,onDropDownClick:s,headerText:l}){let[c,u]=J(i);return o(f,null,o("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"8px"}},o(re,{tag:"h2",variant:"eyebrow",style:{color:"var(--header-primary)",display:"inline"}},l),o("div",{className:im("center-flex")},n??null,t&&o(V,{text:r},d=>o("button",{...d,className:im("btn"),onClick:t},o("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},o("path",{fill:"var(--text-normal)",d:"M7 12.001C7 10.8964 6.10457 10.001 5 10.001C3.89543 10.001 3 10.8964 3 12.001C3 13.1055 3.89543 14.001 5 14.001C6.10457 14.001 7 13.1055 7 12.001ZM14 12.001C14 10.8964 13.1046 10.001 12 10.001C10.8954 10.001 10 10.8964 10 12.001C10 13.1055 10.8954 14.001 12 14.001C13.1046 14.001 14 13.1055 14 12.001ZM19 10.001C20.1046 10.001 21 10.8964 21 12.001C21 13.1055 20.1046 14.001 19 14.001C17.8954 14.001 17 13.1055 17 12.001C17 10.8964 17.8954 10.001 19 10.001Z"})))),o(V,{text:c?"Hide "+l:"Show "+l},d=>o("button",{...d,className:im("btn"),onClick:()=>{u(m=>!m),s?.(c)}},o("svg",{width:"24",height:"24",viewBox:"0 0 24 24",transform:c?"scale(1 -1)":"scale(1 1)"},o("path",{fill:"var(--text-normal)",d:"M16.59 8.59003L12 13.17L7.41 8.59003L6 10L12 16L18 10L16.59 8.59003Z"})))))),c&&e)}var im,R0=g(()=>{"use strict";a();Je();I();k0();im=Ue("vc-expandableheader-")});function EA({guild:e,guildMember:t,showBorder:n}){let r=Yo.use(["permissionsSortOrder"]),[i,s]=At(()=>{let b=[],x=dl(e,t),C=x.map(k=>({type:0,...k}));if(e.ownerId===t.userId){C.push({type:2,permissions:Object.values(Se).reduce((B,$)=>B|$,0n)});let k=tt.Messages.GUILD_OWNER||"Server Owner";b.push({permission:k,roleColor:"var(--primary-300)",rolePosition:1/0})}I0(x);for(let[k,B]of Object.entries(Se))for(let{permissions:$,colorString:Y,position:K}of x)if(($&B)===B){b.push({permission:pl(k),roleColor:Y||"var(--primary-300)",rolePosition:K});break}return b.sort((k,B)=>B.rolePosition-k.rolePosition),[C,b]},[r.permissionsSortOrder]),{root:l,role:c,roleRemoveButton:u,roleNameOverflow:d,roles:m,rolePill:h,rolePillBorder:v,roleCircle:T,roleName:P}=LA;return o(sm,{headerText:"Permissions",moreTooltipText:"Role Details",onMoreClick:()=>ci(i,e,t.nick||W.getUser(t.userId).username),defaultState:Yo.store.defaultPermissionsDropdownState,buttons:[o(V,{text:`Sorting by ${r.permissionsSortOrder===0?"Highest Role":"Lowest Role"}`},b=>o("button",{...b,className:zt("userperms-sortorder-btn"),onClick:()=>{r.permissionsSortOrder=r.permissionsSortOrder===0?1:0}},o("svg",{width:"20",height:"20",viewBox:"0 96 960 960",transform:r.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"}))))]},s.length>0&&o("div",{className:oe(l,m)},s.map(({permission:b,roleColor:x})=>o("div",{className:oe(c,h,n?v:null)},o("div",{className:u},o("span",{className:T,style:{backgroundColor:x}})),o("div",{className:P},o(re,{className:d,variant:"text-xs/medium"},b))))))}var LA,L0,E0=g(()=>{"use strict";a();le();R0();Re();j();I();Is();Ms();Ps();LA=Jn(()=>{let e=ic(Ke.byProps("roles","rolePill","rolePillBorder"),Ke.byProps("roleCircle","dotBorderBase","dotBorderColor"),Ke.byProps("roleNameOverflow","root","roleName","roleRemoveButton"));return Object.assign({},...e)});L0=_.wrap(EA,{noop:!0})});function am(e,t,n){return n===0&&!ke.isMember(e,t)?null:o(G.MenuItem,{id:"perm-viewer-permissions",label:"Permissions",action:()=>{let r=Te.getGuild(e),i,s;switch(n){case 0:{let l=ke.getMember(e,t);i=dl(r,l).map(c=>({type:0,...c})),r.ownerId===t&&i.push({type:2,permissions:Object.values(Se).reduce((c,u)=>c|u,0n)}),s=l.nick??W.getUser(l.userId).username;break}case 1:{let l=Q.getChannel(t);i=ml(Object.values(l.permissionOverwrites).map(({id:c,allow:u,deny:d,type:m})=>({type:m,id:c,overwriteAllow:u,overwriteDeny:d})),e),s=l.name;break}default:{i=Object.values(r.roles).map(l=>({type:0,...l})),s=r.name;break}}ci(i,r,s)}})}function lm(e,t){return(n,r)=>()=>{if(!r||t===0&&!r.user||t===2&&!r.guild)return n;let i=dt(e,n),s=(()=>{switch(t){case 0:return am(r.guildId,r.user.id,t);case 1:return am(r.guild.id,r.channel.id,t);case 2:return am(r.guild.id);default:return null}})();s!=null&&(i?i.push(s):e==="roles"&&r.guildId&&n.splice(-1,0,o(G.MenuGroup,null,s)))}}var Yo,cm,Is=g(()=>{"use strict";a();w0();Mt();U();M();w();I();Ps();E0();Ms();Yo=D({permissionsSortOrder:{description:"The sort method used for defining which role grants an user a certain permission",type:4,options:[{label:"Highest Role",value:0,default:!0},{label:"Lowest Role",value:1}]},defaultPermissionsDropdownState:{description:"Whether the permissions dropdown on user popouts should be open by default",type:3,default:!1}});cm=y({name:"PermissionsViewer",description:"View the permissions a user or channel has, and the roles of a server",authors:[p.Nuckyz,p.Ven],settings:Yo,patches:[{find:".popularApplicationCommandIds,",replacement:{match:/showBorder:(.{0,60})}\),(?<=guild:(\i),guildMember:(\i),.+?)/,replace:(e,t,n,r)=>`${e}$self.UserPermissions(${n},${r},${t}),`}}],UserPermissions:(e,t,n)=>!!t&&o(L0,{guild:e,guildMember:t,showBorder:n}),userContextMenuPatch:lm("roles",0),channelContextMenuPatch:lm(["mute-channel","unmute-channel"],1),guildContextMenuPatch:lm("privacy",2),start(){ce("user-context",this.userContextMenuPatch),ce("channel-context",this.channelContextMenuPatch),ce(["guild-context","guild-header-popout"],this.guildContextMenuPatch)},stop(){de("user-context",this.userContextMenuPatch),de("channel-context",this.channelContextMenuPatch),de(["guild-context","guild-header-popout"],this.guildContextMenuPatch)}})});function O0(e){let t=e instanceof File,n=t?URL.createObjectURL(e):e;return new Promise((r,i)=>{let s=new Image;s.onload=()=>{t&&URL.revokeObjectURL(n),r(s)},s.onerror=(l,c,u,d,m)=>i(m||l),s.crossOrigin="Anonymous",s.src=n})}async function FA(e,t,n){for(let r of e)switch(r.name){case"image":let i=BA.getUploads(t.channel.id,D0)[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 kt.getUser(r.value)).getAvatarURL(n?void 0:t.guild?.id,2048).replace(/\?size=\d+$/,"?size=2048")}catch(s){throw console.error(`[petpet] Failed to fetch user
|
|
`,s),"Failed to fetch user. Check the console for more info."}}return null}var ui,D0,DA,OA,fl,_A,BA,um,_0=g(()=>{"use strict";a();Jt();M();rr();w();j();I();ui=qs(Bp()),D0=0,DA=20,OA=128,fl=10,_A=xo(()=>Promise.all(Array.from({length:fl},(e,t)=>O0(`https://raw.githubusercontent.com/VenPlugs/petpet/main/frames/pet${t}.gif`)))),BA=A("getUploads");um=y({name:"petpet",description:"Adds a /petpet slash command to create headpet gifs from any image",authors:[p.Ven],dependencies:["CommandsAPI"],commands:[{inputType:0,name:"petpet",description:"Create a petpet gif. You can only specify one of the image options",options:[{name:"delay",description:"The delay between each frame. Defaults to 20.",type:4},{name:"resolution",description:"Resolution for the gif. Defaults to 120. If you enter an insane number and it freezes Discord that's your fault.",type:4},{name:"image",description:"Image attachment to use",type:11},{name:"url",description:"URL to fetch image from",type:3},{name:"user",description:"User whose avatar to use as image",type:6},{name:"no-server-pfp",description:"Use the normal avatar instead of the server specific one when using the 'user' option",type:5}],execute:async(e,t)=>{let n=await _A(),r=ot(e,"no-server-pfp",!1);try{var i=await FA(e,t,r);if(!i)throw"No Image specified!"}catch(v){ue(t.channel.id,{content:String(v)});return}let s=await O0(i),l=ot(e,"delay",DA),c=ot(e,"resolution",OA),u=(0,ui.GIFEncoder)(),d=document.createElement("canvas");d.width=d.height=c;let m=d.getContext("2d");for(let v=0;v<fl;v++){m.clearRect(0,0,d.width,d.height);let T=v<fl/2?v:fl-v,P=.8+T*.02,b=.8-T*.05,x=(1-P)*.5+.1,C=1-b-.08;m.drawImage(s,x*c,C*c,P*c,b*c),m.drawImage(n[v],0,0,c,c);let{data:k}=m.getImageData(0,0,c,c),B=(0,ui.quantize)(k,256),$=(0,ui.applyPalette)(k,B);u.writeFrame($,c,c,{transparent:!0,palette:B,delay:l})}u.finish();let h=new File([u.bytesView()],"petpet.gif",{type:"image/gif"});setTimeout(()=>Ei.promptToUpload([h],t.channel,D0),10)}}]})});var B0=g(()=>{});var F0,pm,U0=g(()=>{"use strict";a();B0();U();le();M();w();I();F0=D({loop:{description:"Whether to make the PiP video loop or not",type:3,default:!0,restartNeeded:!1}}),pm=y({name:"PictureInPicture",description:"Adds picture in picture to videos (next to the Download button)",authors:[p.Lumap],settings:F0,patches:[{find:".nonMediaAttachment]",replacement:{match:/\.nonMediaAttachment\]:!(\i).{0,10}children:\[(\S)/,replace:"$&,$1&&$2&&$self.renderPiPButton(),"}}],renderPiPButton:_.wrap(()=>o(V,{text:"Toggle Picture in Picture"},e=>o("div",{...e,className:"vc-pip-button",role:"button",style:{cursor:"pointer",paddingTop:"4px",paddingLeft:"4px",paddingRight:"4px"},onClick:t=>{let n=t.currentTarget.parentNode.parentNode.querySelector("video"),r=document.body.appendChild(n.cloneNode(!0));r.loop=F0.store.loop,r.style.display="none",r.onleavepictureinpicture=()=>r.remove();function i(){r.currentTime=n.currentTime,r.requestPictureInPicture(),n.pause(),r.play()}r.readyState===4?i():r.onloadedmetadata=i}},o("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24"},o("path",{fill:"currentColor",d:"M21 3a1 1 0 0 1 1 1v7h-2V5H4v14h6v2H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h18zm0 10a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1v-6a1 1 0 0 1 1-1h8zm-1 2h-6v4h6v-4z"})))),{noop:!0})})});function H0(){return lt(["plugins.PinDMs.pinnedDMs"]),gl()}function pi(e){return gl().has(e)}function z0(e){let t=gl();t.delete(e)||t.add(e),G0([...t])}function mm(){return gl(),As.store.pinOrder===0?UA.getPrivateChannelIds().filter(pi):Yn}function j0(e){return mm()[e]}function fm(e,t){let n=$0(),r=n.indexOf(e),i=r+t;[n[r],n[i]]=[n[i],n[r]],G0(n)}var As,UA,Yn,dm,$0,G0,$A,gl,gm=g(()=>{"use strict";a();U();w();j();As=D({pinOrder:{type:4,description:"Which order should pinned DMs be displayed in?",options:[{label:"Most recent message",value:0,default:!0},{label:"Custom (right click channels to reorder)",value:1}]}}),UA=Me("PrivateChannelSortStore"),$0=()=>(E.plugins.PinDMs.pinnedDMs||void 0)?.split(","),G0=e=>{dm=void 0,E.plugins.PinDMs.pinnedDMs=e.join(",")},$A=()=>(Yn=$0()??[],dm=new Set(Yn)),gl=()=>dm??$A()});function W0(e){let t=pi(e),n=t&&As.store.pinOrder===1;return o(f,null,o(G.MenuItem,{id:"pin-dm",label:t?"Unpin DM":"Pin DM",action:()=>z0(e)}),n&&Yn[0]!==e&&o(G.MenuItem,{id:"move-pin-up",label:"Move Pin Up",action:()=>fm(e,-1)}),n&&Yn[Yn.length-1]!==e&&o(G.MenuItem,{id:"move-pin-down",label:"Move Pin Down",action:()=>fm(e,1)}))}function Y0(){ce("gdm-context",q0),ce("user-context",K0)}function Z0(){de("gdm-context",q0),de("user-context",K0)}var q0,K0,X0=g(()=>{"use strict";a();Mt();I();gm();q0=(e,t)=>()=>{let n=dt("leave-channel",e);n&&n.unshift(W0(t.channel.id))},K0=(e,t)=>()=>{let n=dt("close-dm",e);if(n){let r=n.findIndex(i=>i?.props?.id==="close-dm");n.splice(r,0,W0(t.channel.id))}}});var hm,J0=g(()=>{"use strict";a();M();w();X0();gm();hm=y({name:"PinDMs",description:"Allows you to pin private channels to the top of your DM list. To pin/unpin or reorder pins, right click DMs",authors:[p.Ven,p.Strencher],settings:As,start:Y0,stop:Z0,usePinCount(e){let t=H0();return e.length?[t.size]:[]},getChannel(e,t){return e[j0(t)]},isPinned:pi,getSnapshot:mm,getScrollOffset(e,t,n,r,i){return pi(e)?t*(Yn.indexOf(e)+r)+n:(t+n)*2+t*Yn.length+i},patches:[{find:".privateChannelsHeaderContainer,",replacement:[{match:/(?<=\i,{channels:\i,)privateChannelIds:(\i),/,replace:"privateChannelIds:$1.filter(c=>!$self.isPinned(c)),pinCount:$self.usePinCount($1),"},{match:/(?<=renderRow:this\.renderRow,)sections:\[\i,/,replace:"$&...this.props.pinCount??[],"},{match:/children:(\i\.\i\.Messages.DIRECT_MESSAGES)(?<=renderSection=(\i)=>{.+?)/,replace:"children:$2.section===1?'Pinned DMs':$1"},{match:/(?<=renderDM=\((\i),(\i)\)=>{.*?this.state,\i=\i\[\i\],\i=)((\i)\[\i\]);/,replace:"$1===1?$self.getChannel($4,$2):$3;"},{match:/(?<=getRowHeight=\(.{2,50}?)1===\i/,replace:"$&-1"},{match:/(?<=scrollTo\(\{to:\i\}\):\(\i\+=)(\d+)\*\(.+?(?=,)/,replace:"$self.getScrollOffset(arguments[0],$1,this.props.padding,this.state.preRenderedChildren,$&)"}]},{find:".Routes.APPLICATION_STORE&&",replacement:{match:/(?<=\i=__OVERLAY__\?\i:\[\.\.\.\i\(\),\.\.\.)\i/,replace:"$self.getSnapshot().concat($&.filter(c=>!$self.isPinned(c)))"}},{find:".getFlattenedGuildIds()],",replacement:{match:/(?<=\i===\i\.ME\?)\i\.\i\.getPrivateChannelIds\(\)/,replace:"$self.getSnapshot().concat($&.filter(c=>!$self.isPinned(c)))"}}]})});var ym,Q0=g(()=>{"use strict";a();M();w();ym=y({name:"PlainFolderIcon",description:"Doesn't show the small guild icons in folders",authors:[p.botato],patches:[{find:".expandedFolderIconWrapper",replacement:[{match:/\(\w\|\|\w\)&&(\(.{0,40}\(.{1,3}\.animated)/,replace:"$1"}]}]})});var bm={};Be(bm,{__getDecorators:()=>GA,addDecorator:()=>vm,decorators:()=>hl,removeDecorator:()=>Sm});function vm(e,t,n){hl.set(e,{decorator:t,onlyIn:n})}function Sm(e){hl.delete(e)}function GA(e){let t=!!e.guildId;return Array.from(hl.values(),n=>{let{decorator:r,onlyIn:i}=n;return!i||i==="guilds"&&t||i==="dms"&&!t?r(e):null})}var hl,Tm=g(()=>{"use strict";a();hl=new Map});var Mm={};Be(Mm,{__addDecorationsToMessage:()=>HA,addDecoration:()=>xm,decorations:()=>yl,removeDecoration:()=>wm});function xm(e,t){yl.set(e,t)}function wm(e){yl.delete(e)}function HA(e){return[...yl.values()].map(t=>t(e))}var yl,Pm=g(()=>{"use strict";a();yl=new Map});function vl(e,t){return({color:n,tooltip:r,small:i})=>o(V,{text:r},s=>o("svg",{...s,height:(t?.height??20)-(i?3:0),width:(t?.width??20)-(i?3:0),viewBox:t?.viewBox??"0 0 24 24",fill:n},o("path",{d:e})))}var zA,V0,jA,WA,qA,Am,eb,Im,Cm,tb=g(()=>{"use strict";a();ca();Tm();Pm();U();le();M();w();j();I();zA=Me("SessionsStore");V0={desktop:vl("M4 2.5c-1.103 0-2 .897-2 2v11c0 1.104.897 2 2 2h7v2H7v2h10v-2h-4v-2h7c1.103 0 2-.896 2-2v-11c0-1.103-.897-2-2-2H4Zm16 2v9H4v-9h16Z"),web:vl("M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2Zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93Zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39Z"),mobile:vl("M 187 0 L 813 0 C 916.277 0 1000 83.723 1000 187 L 1000 1313 C 1000 1416.277 916.277 1500 813 1500 L 187 1500 C 83.723 1500 0 1416.277 0 1313 L 0 187 C 0 83.723 83.723 0 187 0 Z M 125 1000 L 875 1000 L 875 250 L 125 250 Z M 500 1125 C 430.964 1125 375 1180.964 375 1250 C 375 1319.036 430.964 1375 500 1375 C 569.036 1375 625 1319.036 625 1250 C 625 1180.964 569.036 1125 500 1125 Z",{viewBox:"0 0 1000 1500",height:17,width:17}),console:vl("M14.8 2.7 9 3.1V47h3.3c1.7 0 6.2.3 10 .7l6.7.6V2l-4.2.2c-2.4.1-6.9.3-10 .5zm1.8 6.4c1 1.7-1.3 3.6-2.7 2.2C12.7 10.1 13.5 8 15 8c.5 0 1.2.5 1.6 1.1zM16 33c0 6-.4 10-1 10s-1-4-1-10 .4-10 1-10 1 4 1 10zm15-8v23.3l3.8-.7c2-.3 4.7-.6 6-.6H43V3h-2.2c-1.3 0-4-.3-6-.6L31 1.7V25z",{viewBox:"0 0 50 50"})},jA=A("getStatusColor","StatusTypes"),WA=({platform:e,status:t,small:n})=>{let r=e[0].toUpperCase()+e.slice(1),i=V0[e]??V0.desktop;return o(i,{color:`var(--${jA.getStatusColor(t)}`,tooltip:r,small:n})},qA=e=>Gn.getState()?.clientStatuses?.[e],Am=({user:e,wantMargin:t=!0,wantTopMargin:n=!1,small:r=!1})=>{if(!e||e.bot)return null;if(e.id===W.getCurrentUser().id){let l=zA.getSessions();if(typeof l!="object")return null;let c=Object.values(l).sort(({status:m},{status:h})=>m===h?0:m==="online"?1:h==="online"?-1:m==="idle"?1:h==="idle"?-1:0),u=Object.values(c).reduce((m,h)=>(h.clientInfo.client!=="unknown"&&(m[h.clientInfo.client]=h.status),m),{}),{clientStatuses:d}=Gn.getState();d[W.getCurrentUser().id]=u}let i=Gn.getState()?.clientStatuses?.[e.id];if(!i)return null;let s=Object.entries(i).map(([l,c])=>o(WA,{key:l,platform:l,status:c,small:r}));return s.length?o("span",{className:"vc-platform-indicator",style:{display:"inline-flex",justifyContent:"center",alignItems:"center",marginLeft:t?4:0,verticalAlign:"top",position:"relative",top:n?2:0,padding:t?0:1,gap:2}},s):null},eb={component:e=>o(Am,{...e,wantMargin:!1}),position:0,shouldShow:e=>!!Object.keys(qA(e.user.id)??{}).length,key:"indicator"},Im={list:{description:"In the member list",onEnable:()=>vm("platform-indicator",e=>o(_,{noop:!0},o(Am,{user:e.user,small:!0}))),onDisable:()=>Sm("platform-indicator")},badges:{description:"In user profiles, as badges",onEnable:()=>Nm(eb),onDisable:()=>km(eb)},messages:{description:"Inside messages",onEnable:()=>xm("platform-indicator",e=>o(_,{noop:!0},o(Am,{user:e.message?.author,wantTopMargin:!0}))),onDisable:()=>wm("platform-indicator")}},Cm=y({name:"PlatformIndicators",description:"Adds platform indicators (Desktop, Mobile, Web...) to users",authors:[p.kemo,p.TheSun,p.Nuckyz,p.Ven],dependencies:["MessageDecorationsAPI","MemberListDecoratorsAPI"],start(){let e=E.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(Im).forEach(([n,r])=>{e[n]&&r.onEnable()})},stop(){Object.entries(Im).forEach(([e,t])=>{t.onDisable()})},patches:[{find:".Masks.STATUS_ONLINE_MOBILE",predicate:()=>E.plugins.PlatformIndicators.colorMobileIndicator,replacement:[{match:/\.STATUS_TYPING;switch(?=.+?(if\(\i\)return \i\.\i\.Masks\.STATUS_ONLINE_MOBILE))/,replace:".STATUS_TYPING;$1;switch"},{match:/switch\(\i\)\{case \i\.\i\.ONLINE:(if\(\i\)return\{[^}]+\})/,replace:"$1;$&"}]},{find:".AVATAR_STATUS_MOBILE_16;",predicate:()=>E.plugins.PlatformIndicators.colorMobileIndicator,replacement:[{match:/\i===\i\.\i\.ONLINE&&(?=.{0,70}\.AVATAR_STATUS_MOBILE_16;)/,replace:""},{match:/(?<=\(\i\.status,)(\i)(?=,(\i),\i\))/,replace:(e,t,n)=>`${n}?"online":${t}`},{match:/(?<=\i&&!\i)&&\i===\i\.\i\.ONLINE/,replace:""}]},{find:"}isMobileOnline(",predicate:()=>E.plugins.PlatformIndicators.colorMobileIndicator,replacement:{match:/(?<=\i\[\i\.\i\.MOBILE\])===\i\.\i\.ONLINE/,replace:"!= null"}}],options:{...Object.fromEntries(Object.entries(Im).map(([e,t])=>[e,{type:3,description:`Show indicators ${t.description.toLowerCase()}`,restartNeeded:!0,default:!0}])),colorMobileIndicator:{type:3,description:"Whether to make the mobile indicator match the color of the user status.",default:!0,restartNeeded:!0}}})});function ZA(e){let{isEmpty:t,attachments:n}=e.type,r=Pe.getChannelId(),i=He([Li],()=>nb(r));if(e.type.analyticsName!=="normal")return null;let s=n&&ob.getUploads(r,0).length>0;return!(!t&&i?.length>0)&&!s?null:o(V,{text:"Preview Message"},c=>o(R,{...c,onClick:async()=>ue(r,{content:nb(r),author:W.getCurrentUser(),attachments:s?await YA(r):void 0}),size:"",look:qt.BLANK,innerClassName:yt.button,style:{padding:"0 2px",height:"100%"}},o("div",{className:yt.buttonWrapper},o("img",{width:24,height:24,src:"https://discord.com/assets/4c5a77a89716352686f590a6f014770c.svg"}))))}var ob,nb,KA,YA,Rm,rb=g(()=>{"use strict";a();Jt();le();M();w();j();I();ob=A("getUploads"),nb=e=>Li.getDraft(e,0),KA=e=>new Promise(t=>{let n=new Image;n.onload=()=>t({width:n.width,height:n.height}),n.onerror=()=>t(null),n.src=e}),YA=async e=>await Promise.all(ob.getUploads(e,0).map(async t=>{let{isImage:n,filename:r,spoiler:i,item:{file:s}}=t,l=URL.createObjectURL(s),c={id:ts(),filename:i?"SPOILER_"+r:r,content_type:void 0,size:await t.getSize(),spoiler:i,url:l+"#",proxy_url:l+"#"};if(n){let u=await KA(l);if(!u)return c;c.width=u.width,c.height=u.height}return c}));Rm=y({name:"PreviewMessage",description:"Lets you preview your message before sending it.",authors:[p.Aria],patches:[{find:"ChannelTextAreaButtons",replacement:{match:/(\i)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&,(()=>{try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}})()"}}],chatBarIcon:_.wrap(ZA,{noop:!0})})});var ib=g(()=>{});function Lm(){return o(O.Fragment,null,o(S.FormTitle,{tag:"h3"},"More Information"),o(S.FormText,null,"To add your own pronouns, visit"," ",o(rt,{href:"https://pronoundb.org"},"pronoundb.org")),o(S.FormDivider,null),o(S.FormText,null,"The two pronoun formats are lowercase and capitalized. Example:",o("ul",null,o("li",null,"Lowercase: they/them"),o("li",null,"Capitalized: They/Them")),'Text like "Ask me my pronouns" or "Any pronouns" will always be capitalized. ',o("br",null),o("br",null),"You can also configure whether or not to display pronouns for the current user (since you probably already know them)"))}var sb=g(()=>{"use strict";a();lo();I()});var po,Sl=g(()=>{"use strict";a();U();w();bl();po=D({pronounsFormat:{type:4,description:"The format for pronouns to appear in chat",options:[{label:"Lowercase",value:"LOWERCASE",default:!0},{label:"Capitalized",value:"CAPITALIZED"}]},pronounSource:{type:4,description:"Where to source pronouns from",options:[{label:"Prefer PronounDB, fall back to Discord",value:0,default:!0},{label:"Prefer Discord, fall back to PronounDB (might lead to inconsistency between pronouns in chat and profile)",value:1}]},showSelf:{type:3,description:"Enable or disable showing pronouns for the current user",default:!0},showInMessages:{type:3,description:"Show in messages",default:!0},showInProfile:{type:3,description:"Show in profile",default:!0}})});var Tl,ab=g(()=>{"use strict";a();Tl={hh:"He/Him",hi:"He/It",hs:"He/She",ht:"He/They",ih:"It/Him",ii:"It/Its",is:"It/She",it:"It/They",shh:"She/He",sh:"She/Her",si:"She/It",st:"She/They",th:"They/He",ti:"They/It",ts:"They/She",tt:"They/Them",any:"Any pronouns",other:"Other pronouns",ask:"Ask me my pronouns",avoid:"Avoid pronouns, use my name",unspecified:"Unspecified"}});function JA(e,t=!1){let n=on.getUserProfile(e)?.pronouns;return t?n:on.getGuildMemberProfile(e,ei()?.guild_id)?.pronouns||n}function xl(e,t=!1){let n=JA(e,t)?.trim().replace(QA," "),[r]=nt(()=>VA(e),{fallbackValue:ub(e),onError:i=>console.error("Fetching pronouns failed: ",i)});return po.store.pronounSource===1&&n?[n,"Discord"]:r&&r!=="unspecified"?[tC(r),"PronounDB"]:[n,"Discord"]}function cb(e,t=!1){let n=xl(e,t);return!po.store.showInProfile||!po.store.showSelf&&e===W.getCurrentUser().id?lb:n}function ub(e){let t=Em[e];return t&&t!=="unspecified"?t:t||null}function VA(e){return new Promise(t=>{let n=ub(e);if(n)return t(n);if(e in di)return di[e].push(t);di[e]=[t],XA()})}async function eC(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":hc}})).json().then(r=>(Object.assign(Em,r),r))}catch(n){console.error("PronounDB fetching failed: ",n);let r=Object.fromEntries(e.map(i=>[i,"unspecified"]));return Object.assign(Em,r),r}}function tC(e){let{pronounsFormat:t}=E.plugins.PronounDB;return t==="CAPITALIZED"?Tl[e]:t==="LOWERCASE"&&["any","ask","avoid","other"].includes(e)?Tl[e]:Tl[e].toLowerCase()}var lb,Em,di,XA,QA,bl=g(()=>{"use strict";a();U();M();jr();St();st();I();Sl();ab();lb=[null,""],Em={},di={},XA=hn(async()=>{let e=Object.keys(di),t=await eC(e);for(let n of e)di[n]?.forEach(r=>r(t[n])),delete di[n]});QA=/\n+/g});function pb(e){return!(!po.store.showInMessages||e.author.bot||e.author.system||e.type===nC||!po.store.showSelf&&e.author.id===W.getCurrentUser().id)}function oC({message:e}){let[t]=xl(e.author.id);return t?o("span",{className:oe(wl.timestampInline,wl.timestamp)},"\u2022 ",t):null}var wl,nC,db,mb,rC,fb=g(()=>{"use strict";a();le();Re();j();I();bl();Sl();wl=A("timestampInline"),nC=24;db=_.wrap(({message:e})=>pb(e)?o(oC,{message:e}):null,{noop:!0}),mb=_.wrap(({message:e})=>pb(e)?o(rC,{message:e}):null,{noop:!0});rC=_.wrap(({message:e})=>{let[t]=xl(e.author.id);return t?o("span",{className:oe(wl.timestampInline,wl.timestamp,"vc-pronoundb-compact")},"\u2022 ",t):null},{noop:!0})});var gb,Dm,hb=g(()=>{"use strict";a();ib();M();w();sb();fb();bl();Sl();gb={match:/text:(.{0,10}.Messages\.USER_PROFILE_PRONOUNS)(?=,)/,replace:'$& + (typeof vcPronounSource !== "undefined" ? ` (${vcPronounSource})` : "")'},Dm=y({name:"PronounDB",authors:[p.Tyman,p.TheKodeToad,p.Ven],description:"Adds pronouns to user messages using pronoundb",patches:[{find:"showCommunicationDisabledStyles",replacement:{match:/("span",{id:\i,className:\i,children:\i}\))/,replace:"$1, $self.CompactPronounsChatComponentWrapper(arguments[0])"}},{find:"showCommunicationDisabledStyles",replacement:{match:/(?<=return\s*\(0,\i\.jsxs?\)\(.+!\i&&)(\(0,\i.jsxs?\)\(.+?\{.+?\}\))/,replace:"[$1, $self.PronounsChatComponentWrapper(arguments[0])]"}},{find:".userTagNoNickname",replacement:[{match:/{user:(\i),[^}]*,pronouns:(\i),[^}]*}=\i;/,replace:"$&let vcPronounSource;[$2,vcPronounSource]=$self.useProfilePronouns($1.id);"},gb]},{find:".nameTagSmall)",replacement:[{match:/\.getName\(\i\);(?<=displayProfile.{0,200})/,replace:"$&const [vcPronounce,vcPronounSource]=$self.useProfilePronouns(arguments[0].user.id,true);if(arguments[0].displayProfile&&vcPronounce)arguments[0].displayProfile.pronouns=vcPronounce;"},gb]}],settings:po,settingsAboutComponent:Lm,PronounsChatComponentWrapper:db,CompactPronounsChatComponentWrapper:mb,useProfilePronouns:cb})});var Om,yb=g(()=>{"use strict";a();Ar();M();St();w();I();Om=y({name:"QuickMention",authors:[p.kemo],description:"Adds a quick mention button to the message actions bar",dependencies:["MessagePopoverAPI"],start(){On("QuickMention",e=>{let t=Q.getChannel(e.channel_id);return Ne.can(Se.SEND_MESSAGES,t)?{label:"Quick Mention",icon:this.Icon,message:e,channel:t,onClick:()=>so(`<@${e.author.id}> `)}:null})},stop(){_n("QuickMention")},Icon:()=>o("svg",{className:"icon",height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor"},o("path",{d:"M12 2C6.486 2 2 6.486 2 12C2 17.515 6.486 22 12 22C14.039 22 15.993 21.398 17.652 20.259L16.521 18.611C15.195 19.519 13.633 20 12 20C7.589 20 4 16.411 4 12C4 7.589 7.589 4 12 4C16.411 4 20 7.589 20 12V12.782C20 14.17 19.402 15 18.4 15L18.398 15.018C18.338 15.005 18.273 15 18.209 15H18C17.437 15 16.6 14.182 16.6 13.631V12C16.6 9.464 14.537 7.4 12 7.4C9.463 7.4 7.4 9.463 7.4 12C7.4 14.537 9.463 16.6 12 16.6C13.234 16.6 14.35 16.106 15.177 15.313C15.826 16.269 16.93 17 18 17L18.002 16.981C18.064 16.994 18.129 17 18.195 17H18.4C20.552 17 22 15.306 22 12.782V12C22 6.486 17.514 2 12 2ZM12 14.599C10.566 14.599 9.4 13.433 9.4 11.999C9.4 10.565 10.566 9.399 12 9.399C13.434 9.399 14.6 10.565 14.6 11.999C14.6 13.433 13.434 14.599 12 14.599Z"}))})});function Pb(e,t){let n=e.findIndex(r=>r.id===t);return n===-1?n:e.length-n-1}function bb({channelId:e,messageId:t,_isQuickEdit:n}){if(n)return;let r=W.getCurrentUser().id,i=Pn.getMessages(e)._array.filter(s=>s.author.id===r);Pl=Pb(i,t)}function Tb({message:e,_isQuickReply:t}){t||(Ml=Pb(Pn.getMessages(e.channel_id)._array,e.id))}function xb(e){let t=e.key==="ArrowUp";!t&&e.key!=="ArrowDown"||!sC(e)||aC(e)||(e.shiftKey?uC(t):cC(t))}function Ib(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)&&iC.jumpToMessage({channelId:e,messageId:t,flash:!1,jumpType:"INSTANT"})}function Ab(e,t){let n=Pn.getMessages(Pe.getChannelId())._array;if(!t){let l=W.getCurrentUser().id;n=n.filter(c=>c.author.id===l)}let r=l=>e?Math.min(n.length-1,l+1):Math.max(-1,l-1),i=l=>{do l=r(l);while(l!==-1&&n[n.length-l-1]?.deleted===!0);return l},s;return t?Ml=s=i(Ml):Pl=s=i(Pl),s===-1?void 0:n[n.length-s-1]}function lC(e){let{enabled:t,userList:n,shouldPingListed:r}=E.plugins.NoReplyMention,i=!t||r===n.includes(e.author.id);switch(Mb.store.shouldMention){case 2:return i;case 0:return!1;default:return!0}}function cC(e){let t=Q.getChannel(Pe.getChannelId());if(t.guild_id&&!Ne.can(Se.SEND_MESSAGES,t))return;let n=Ab(e,!0);if(!n)return void F.dispatch({type:"DELETE_PENDING_REPLY",channelId:Pe.getChannelId()});let r=Q.getChannel(n.channel_id),i=W.getCurrentUser().id;F.dispatch({type:"CREATE_PENDING_REPLY",channel:r,message:n,shouldMention:lC(n),showMentionToggle:r.guild_id!==null&&n.author.id!==i,_isQuickReply:!0}),Ib(r.id,n.id)}function uC(e){let t=Q.getChannel(Pe.getChannelId());if(t.guild_id&&!Ne.can(Se.SEND_MESSAGES,t))return;let n=Ab(e,!1);if(!n)return F.dispatch({type:"MESSAGE_END_EDIT",channelId:Pe.getChannelId()});F.dispatch({type:"MESSAGE_START_EDIT",channelId:n.channel_id,messageId:n.id,content:n.content,_isQuickEdit:!0}),Ib(n.channel_id,n.id)}var iC,wb,Ml,Pl,Mb,_m,vb,Sb,sC,aC,Cb=g(()=>{"use strict";a();U();M();w();j();I();iC=A("jumpToMessage"),wb=navigator.platform.includes("Mac"),Ml=-1,Pl=-1,Mb=D({shouldMention:{type:4,description:"Ping reply by default",options:[{label:"Follow NoReplyMention",value:2,default:!0},{label:"Enabled",value:1},{label:"Disabled",value:0}]}}),_m=y({name:"QuickReply",authors:[p.obscurity,p.Ven,p.pylix],description:"Reply to (ctrl + up/down) and edit (ctrl + shift + up/down) messages via keybinds",settings:Mb,start(){F.subscribe("DELETE_PENDING_REPLY",vb),F.subscribe("MESSAGE_END_EDIT",Sb),F.subscribe("MESSAGE_START_EDIT",bb),F.subscribe("CREATE_PENDING_REPLY",Tb),document.addEventListener("keydown",xb)},stop(){F.unsubscribe("DELETE_PENDING_REPLY",vb),F.unsubscribe("MESSAGE_END_EDIT",Sb),F.unsubscribe("MESSAGE_START_EDIT",bb),F.unsubscribe("CREATE_PENDING_REPLY",Tb),document.removeEventListener("keydown",xb)}}),vb=()=>Ml=-1,Sb=()=>Pl=-1;sC=e=>wb?e.metaKey:e.ctrlKey,aC=e=>e.altKey||!wb&&e.metaKey});var Bm,pC,Fm,Nb=g(()=>{"use strict";a();M();w();pC="https://raw.githubusercontent.com/facebook/react/17.0.2/scripts/error-codes/codes.json",Fm=y({name:"ReactErrorDecoder",description:'Replaces "Minifed React Error" with the actual error.',authors:[p.Cyn],patches:[{find:'"https://reactjs.org/docs/error-decoder.html?invariant="',replacement:{match:/(function .\(.\)){(for\(var .="https:\/\/reactjs\.org\/docs\/error-decoder\.html\?invariant="\+.,.=1;.<arguments\.length;.\+\+\).\+="&args\[\]="\+encodeURIComponent\(arguments\[.\]\);return"Minified React error #"\+.\+"; visit "\+.\+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.")}/,replace:(e,t,n)=>`${t}{var decoded=Vencord.Plugins.plugins.ReactErrorDecoder.decodeError.apply(null, arguments);if(decoded)return decoded;${n}}`}}],async start(){Bm=await fetch(pC).then(e=>e.json()).catch(e=>console.error(`[ReactErrorDecoder] Failed to fetch React error codes
|
|
`,e))},stop(){Bm=void 0},decodeError(e,...t){let n=0;return Bm?.[e]?.replace(/%s/g,()=>{let r=t[n];return n++,r})}})});var $m={};Be($m,{ServerListRenderPosition:()=>Il,addServerListElement:()=>Cs,removeServerListElement:()=>Ns,renderAll:()=>gC});function Um(e){return e===0?mC:fC}function Cs(e,t){Um(e).add(t)}function Ns(e,t){Um(e).delete(t)}var dC,Il,mC,fC,gC,Al=g(()=>{"use strict";a();Ze();dC=new ie("ServerListAPI"),Il=(n=>(n[n.Above=0]="Above",n[n.In=1]="In",n))(Il||{}),mC=new Set,fC=new Set;gC=e=>{let t=[];for(let n of Um(e))try{t.unshift(n())}catch(r){dC.error("Failed to render server list element:",r)}return t}});function hC(){let e=[];Object.values(Te.getGuilds()).forEach(t=>{$r.getChannels(t.id).SELECTABLE.forEach(n=>{!lr.hasUnread(n.channel.id)||e.push({channelId:n.channel.id,messageId:lr.lastMessageId(n.channel.id),readStateType:0})})}),F.dispatch({type:"BULK_ACK",context:"APP",channels:e})}var yC,Gm,kb=g(()=>{"use strict";a();Al();M();w();I();yC=()=>o(R,{onClick:hC,size:R.Sizes.MIN,color:R.Colors.BRAND,style:{marginTop:"2px",marginBottom:"8px",marginLeft:"9px"}},"Read all"),Gm=y({name:"ReadAllNotificationsButton",description:"Read all server notifications with a single button click!",authors:[p.kemo],dependencies:["ServerListAPI"],renderReadAllButton:()=>o(yC,null),start(){Cs(0,this.renderReadAllButton)},stop(){Ns(0,this.renderReadAllButton)}})});var Vt,Cl=g(()=>{"use strict";a();U();w();Vt=D({notices:{type:3,description:"Also show a notice at the top of your screen when removed (use this if you don't want to miss any notifications).",default:!1},offlineRemovals:{type:3,description:"Notify you when starting discord if you were removed while offline.",default:!0},friends:{type:3,description:"Notify when a friend removes you",default:!0},friendRequestCancels:{type:3,description:"Notify when a friend request is cancelled",default:!0},servers:{type:3,description:"Notify when removed from a server",default:!0},groups:{type:3,description:"Notify when removed from a group chat",default:!0}})});var Hm=g(()=>{"use strict";a()});async function bC(){$t.delMany(["relationship-notifier-guilds","relationship-notifier-groups","relationship-notifier-friends"])}async function zm(){await bC();let[e,t,n]=await $t.getMany([Rb(),Lb(),Eb()]);if(await Promise.all([kl(),Rl(),ks()]),Vt.store.offlineRemovals){if(Vt.store.groups&&t?.size)for(let[r,i]of t)fi.has(r)||mo(`You are no longer in the group ${i.name}.`,i.iconURL);if(Vt.store.servers&&e?.size)for(let[r,i]of e)mi.has(r)||mo(`You are no longer in the server ${i.name}.`,i.iconURL);if(Vt.store.friends&&n?.friends.length)for(let r of n.friends){if(Nr.friends.includes(r))continue;let i=await kt.getUser(r).catch(()=>{});i&&mo(`You are no longer friends with ${ao(i)}.`,i.getAvatarURL(void 0,void 0,!1),()=>Dn(i.id))}if(Vt.store.friendRequestCancels&&n?.requests?.length)for(let r of n.requests){if(Nr.requests.includes(r)||[1,2,4].includes(et.getRelationshipType(r)))continue;let i=await kt.getUser(r).catch(()=>{});i&&mo(`Friend request from ${ao(i)} has been revoked.`,i.getAvatarURL(void 0,void 0,!1),()=>Dn(i.id))}}}function mo(e,t,n){Vt.store.notices&&Nl.showNotice(e,"OK",()=>Nl.popNotice()),Ie({title:"Relationship Notifier",body:e,icon:t,onClick:n})}function Db(e){return mi.get(e)}function jm(e){mi.delete(e),kl()}async function kl(){mi.clear();let e=W.getCurrentUser().id;for(let[t,{name:n,icon:r}]of Object.entries(Te.getGuilds()))ke.isMember(t,e)&&mi.set(t,{id:t,name:n,iconURL:r&&`https://cdn.discordapp.com/icons/${t}/${r}.png`});await $t.set(Rb(),mi)}function Ob(e){return fi.get(e)}function Wm(e){fi.delete(e),Rl()}async function Rl(){fi.clear();for(let{type:e,id:t,name:n,rawRecipients:r,icon:i}of Q.getSortedPrivateChannels())e===3&&fi.set(t,{id:t,name:n||r.map(s=>s.username).join(", "),iconURL:i&&`https://cdn.discordapp.com/channel-icons/${t}/${i}.png`});await $t.set(Lb(),fi)}async function ks(){Nr.friends=[],Nr.requests=[];let e=et.getRelationships();for(let t in e)switch(e[t]){case 1:Nr.friends.push(t);break;case 3:Nr.requests.push(t);break}await $t.set(Eb(),Nr)}var mi,fi,Nr,Rb,Lb,Eb,qm=g(()=>{"use strict";a();cs();Ao();St();I();Cl();Hm();mi=new Map,fi=new Map,Nr={friends:[],requests:[]},Rb=()=>`relationship-notifier-guilds-${W.getCurrentUser().id}`,Lb=()=>`relationship-notifier-groups-${W.getCurrentUser().id}`,Eb=()=>`relationship-notifier-friends-${W.getCurrentUser().id}`});async function Ub({relationship:{type:e,id:t}}){if(Km===t){Km=void 0;return}let n=await kt.getUser(t).catch(()=>null);if(!!n)switch(e){case 1:Vt.store.friends&&mo(`${ao(n)} removed you as a friend.`,n.getAvatarURL(void 0,void 0,!1),()=>Dn(n.id));break;case 3:Vt.store.friendRequestCancels&&mo(`A friend request from ${ao(n)} has been removed.`,n.getAvatarURL(void 0,void 0,!1),()=>Dn(n.id));break}}function $b({guild:{id:e,unavailable:t}}){if(!Vt.store.servers||t)return;if(Ym===e){jm(e),Ym=void 0;return}let n=Db(e);n&&(jm(e),mo(`You were removed from the server ${n.name}.`,n.iconURL))}function Gb({channel:{id:e,type:t}}){if(!Vt.store.groups||t!==3)return;if(Zm===e){Wm(e),Zm=void 0;return}let n=Ob(e);n&&(Wm(e),mo(`You were removed from the group ${n.name}.`,n.iconURL))}var Km,Ym,Zm,_b,Bb,Fb,Hb=g(()=>{"use strict";a();St();I();Cl();Hm();qm();_b=e=>Km=e,Bb=e=>Ym=e,Fb=e=>Zm=e});var Xm,zb=g(()=>{"use strict";a();M();w();Hb();Cl();qm();Xm=y({name:"RelationshipNotifier",description:"Notifies you when a friend, group chat, or server removes you.",authors:[p.nick],settings:Vt,patches:[{find:"removeRelationship:(",replacement:{match:/(removeRelationship:\((\i),\i,\i\)=>)/,replace:"$1($self.removeFriend($2),0)||"}},{find:"async leaveGuild(",replacement:{match:/(leaveGuild\((\i)\){)/,replace:"$1$self.removeGuild($2);"}},{find:"},closePrivateChannel(",replacement:{match:/(closePrivateChannel\((\i)\){)/,replace:"$1$self.removeGroup($2);"}}],flux:{GUILD_CREATE:kl,GUILD_DELETE:$b,CHANNEL_CREATE:Rl,CHANNEL_DELETE:Gb,RELATIONSHIP_ADD:ks,RELATIONSHIP_UPDATE:ks,RELATIONSHIP_REMOVE(e){Ub(e),ks()},CONNECTION_OPEN:zm},async start(){setTimeout(()=>{zm()},5e3)},removeFriend:_b,removeGroup:Fb,removeGuild:Bb})});var TC,xC,Jm,jb=g(()=>{"use strict";a();M();w();j();TC=A("spoilerContent"),xC=A("messagesWrapper","messages"),Jm=y({name:"RevealAllSpoilers",description:"Reveal all spoilers in a message by Ctrl-clicking a spoiler, or in the chat with Ctrl+Shift-click",authors:[p.whqwert],patches:[{find:".removeObscurity=",replacement:{match:/(?<=\.removeObscurity=(\i)=>{)/,replace:(e,t)=>`$self.reveal(${t});`}}],reveal(e){let{ctrlKey:t,shiftKey:n,target:r}=e;if(!t)return;let{spoilerContent:i,hidden:s}=TC,{messagesWrapper:l}=xC,c=n?document.querySelector(`div.${l}`):r.parentElement;for(let u of c.querySelectorAll(`span.${i}.${s}`))u.click()}})});function Wb(e,t){open(t+encodeURIComponent(e),"_blank")}var Ll,qb,Qm,Kb=g(()=>{"use strict";a();Mt();Rt();Ut();M();w();I();Ll={Google:"https://lens.google.com/uploadbyurl?url=",Yandex:"https://yandex.com/images/search?rpt=imageview&url=",SauceNAO:"https://saucenao.com/search.php?url=",IQDB:"https://iqdb.org/?url=",TinEye:"https://www.tineye.com/search?url=",ImgOps:"https://imgops.com/start?url="};qb=(e,t)=>()=>{if(!t)return;let{reverseImageSearchType:n,itemHref:r,itemSrc:i}=t;if(!n||n!=="img")return;let s=r??i,l=dt("copy-link",e);l&&l.push(o(G.MenuItem,{label:"Search Image",key:"search-image",id:"search-image"},Object.keys(Ll).map((c,u)=>{let d="search-image-"+c;return o(G.MenuItem,{key:d,id:d,label:o(ge,{style:{alignItems:"center",gap:"0.5em"}},o("img",{style:{borderRadius:u>=3?"50%":void 0},"aria-hidden":"true",height:16,width:16,src:new URL("/favicon.ico",Ll[c]).toString().replace("lens.","")}),c),action:()=>Wb(s,Ll[c])})}),o(G.MenuItem,{key:"search-image-all",id:"search-image-all",label:o(ge,{style:{alignItems:"center",gap:"0.5em"}},o(Qi,{height:16,width:16}),"All"),action:()=>Object.values(Ll).forEach(c=>Wb(s,c))})))},Qm=y({name:"ReverseImageSearch",description:"Adds ImageSearch to image context menus",authors:[p.Ven,p.Nuckyz],tags:["ImageUtilities"],patches:[{find:".Messages.MESSAGE_ACTIONS_MENU_LABEL",replacement:{match:/favoriteableType:\i,(?<=(\i)\.getAttribute\("data-type"\).+?)/,replace:(e,t)=>`${e}reverseImageSearchType:${t}.getAttribute("data-role"),`}}],start(){ce("message",qb)},stop(){de("message",qb)}})});var Rs,Vm,Yb=g(()=>{"use strict";a();U();M();w();I();Rs=D({chatMentions:{type:3,default:!0,description:"Show role colors in chat mentions (including in the message box)",restartNeeded:!0},memberList:{type:3,default:!0,description:"Show role colors in member list role headers",restartNeeded:!0},voiceUsers:{type:3,default:!0,description:"Show role colors in the voice chat user list",restartNeeded:!0}}),Vm=y({name:"RoleColorEverywhere",authors:[p.KingFish,p.lewisakura,p.AutumnVN],description:"Adds the top role color anywhere possible",patches:[{find:"CLYDE_AI_MENTION_COLOR:null,",replacement:[{match:/user:(\i),channel:(\i).{0,400}?"@"\.concat\(.+?\)/,replace:"$&,color:$self.getUserColor($1?.id,{channelId:$2?.id})"}],predicate:()=>Rs.store.chatMentions},{find:".userTooltip,children",replacement:[{match:/let\{id:(\i),guildId:(\i)[^}]*\}.*?\.default,{(?=children)/,replace:"$&color:$self.getUserColor($1,{guildId:$2}),"}],predicate:()=>Rs.store.chatMentions},{find:'tutorialId:"whos-online',replacement:[{match:/\i.roleIcon,\.\.\.\i/,replace:"$&,color:$self.roleGroupColor(arguments[0])"},{match:/null,\i," — ",\i\]/,replace:"null,$self.roleGroupColor(arguments[0])]"}],predicate:()=>Rs.store.memberList},{find:"renderPrioritySpeaker",replacement:[{match:/renderName\(\).{0,100}speaking:.{50,100}jsx.{5,10}{/,replace:"$&...$self.getVoiceProps(this.props),"}],predicate:()=>Rs.store.voiceUsers}],settings:Rs,getColor(e,{channelId:t,guildId:n}){return(n??=Q.getChannel(t)?.guild_id)?ke.getMember(n,e)?.colorString??null:null},getUserColor(e,t){let n=this.getColor(e,t);return n&&parseInt(n.slice(1),16)},roleGroupColor({id:e,count:t,title:n,guildId:r,label:i}){let l=Te.getGuild(r)?.roles[e];return o("span",{style:{color:l?.colorString,fontWeight:"unset",letterSpacing:".05em"}},n??i," \u2014 ",t)},getVoiceProps({user:{id:e},guildId:t}){return{style:{color:this.getColor(e,{guildId:t})}}}})});var Zb,Xb,ef,Jb=g(()=>{"use strict";a();Mt();Ut();M();w();j();I();Zb=A("replyToMessage"),Xb=(e,{message:t})=>()=>{if(Pe.getChannelId()!==t.channel_id)return;let n=Q.getChannel(t?.channel_id);if(!n||n.guild_id&&!Ne.can(Se.SEND_MESSAGES,n))return;let r=dt("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(G.MenuItem,{id:"reply",label:tt.Messages.MESSAGE_ACTION_REPLY,icon:yu,action:l=>Zb.replyToMessage(n,t,l)}))}let i=dt("mark-unread",e);if(i&&!i.some(s=>s?.props?.id==="reply"))return i.unshift(o(G.MenuItem,{id:"reply",label:tt.Messages.MESSAGE_ACTION_REPLY,icon:yu,action:s=>Zb.replyToMessage(n,t,s)}))},ef=y({name:"SearchReply",description:"Adds a reply button to search results",authors:[p.Aria],start(){ce("message",Xb)},stop(){de("message",Xb)}})});var tf,Qb=g(()=>{"use strict";a();M();w();tf=y({name:"SecretRingToneEnabler",description:"Always play the secret version of the discord ringtone (except during special ringtone events)",authors:[p.AndrewDLO,p.FieryFlames],patches:[{find:'call_ringing_beat"',replacement:{match:/500===\i\.random\(1,1e3\)/,replace:"true"}}]})});var Vb=g(()=>{});function eT(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),`<t:${Math.round(n)}:t>`)}function MC({rootProps:e,close:t}){let[n,r]=J(),[i,s]=J(""),l=Math.round((new Date(n).getTime()||Date.now())/1e3),c=(m,h)=>`<t:${m}${h&&`:${h}`}>`,[u,d]=At(()=>{let m=c(l,i);return[m,Fe.parse(m)]},[l,i]);return o(ze,{...e},o(at,{className:Ls("modal-header")},o(S.FormTitle,{tag:"h2"},"Timestamp Picker"),o(ln,{onClick:t})),o(Ve,{className:Ls("modal-content")},o("input",{type:"datetime-local",value:n,onChange:m=>r(m.currentTarget.value),style:{colorScheme:Uo()===2?"light":"dark"}}),o(S.FormTitle,null,"Timestamp Format"),o(wn,{options:wC.map(m=>({label:m,value:m})),isSelected:m=>m===i,select:m=>s(m),serialize:m=>m,renderOptionLabel:m=>o("div",{className:Ls("format-label")},Fe.parse(c(l,m.value))),renderOptionValue:()=>d}),o(S.FormTitle,{className:q.bottom8},"Preview"),o(S.FormText,{className:Ls("preview-text")},d," (",u,")")),o(Ot,null,o(R,{onClick:()=>{so(u+" "),t()}},"Insert")))}var wC,Ls,nf,tT=g(()=>{"use strict";a();Vb();Kn();Je();M();St();it();pt();w();I();wC=["","t","T","d","D","f","F","R"],Ls=Ue("vc-st-");nf=y({name:"SendTimestamps",description:"Send timestamps easily via chat box button & text shortcuts. Read the extended description!",authors:[p.Ven,p.Tyler],dependencies:["MessageEventsAPI"],patches:[{find:"ChannelTextAreaButtons",replacement:{match:/(\i)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&,(()=>{try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}})()"}}],start(){this.listener=Gt((e,t)=>{t.content=t.content.replace(/`\d{1,2}:\d{2} ?(?:AM|PM)?`/gi,eT)})},stop(){Ht(this.listener)},chatBarIcon(e){return e.type.analyticsName!=="normal"?null:o(V,{text:"Insert Timestamp"},({onMouseEnter:t,onMouseLeave:n})=>o("div",{style:{display:"flex"}},o(R,{"aria-haspopup":"dialog","aria-label":"Insert Timestamp",size:"",look:qt.BLANK,onMouseEnter:t,onMouseLeave:n,innerClassName:yt.button,onClick:()=>{let r=je(i=>o(MC,{rootProps:i,close:()=>Vn(r)}))},className:Ls("button")},o("div",{className:yt.buttonWrapper},o("svg",{"aria-hidden":"true",role:"img",width:"24",height:"24",viewBox:"0 0 24 24"},o("g",{fill:"none","fill-rule":"evenodd"},o("path",{fill:"currentColor",d:"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7v-5z"}),o("rect",{width:"24",height:"24"})))))))},settingsAboutComponent(){let e=["12:00","3:51","17:59","24:00","12:00 AM","0:13PM"].map(t=>`\`${t}\``);return o(f,null,o(S.FormText,null,"To quickly send send time only timestamps, include timestamps formatted as `HH:MM` (including the backticks!) in your message"),o(S.FormText,null,"See below for examples. If you need anything more specific, use the Date button in the chat bar!"),o(S.FormText,null,"Examples:",o("ul",null,e.map(t=>o("li",{key:t},o("code",null,t)," ","->"," ",Fe.parse(eT(t)))))))}})});function PC(){return rT=Po(),o("span",{id:"vc-friendcount",style:{display:"inline-block",width:"100%",fontSize:"12px",fontWeight:"600",color:"var(--header-secondary)",textTransform:"uppercase",textAlign:"center"}},rf," online")}function IC(){return iT=Po(),o("span",{id:"vc-guildcount",style:{display:"inline-block",width:"100%",fontSize:"12px",fontWeight:"600",color:"var(--header-secondary)",textTransform:"uppercase",textAlign:"center"}},oT," servers")}function nT(){rf=0;let e=et.getRelationships();for(let t of Object.keys(e))e[t]===1&&Gn.getStatus(t)!=="offline"&&(rf+=1);rT?.()}function of(){oT=Te.getGuildCount(),iT?.()}var rf,oT,rT,iT,sf,sT=g(()=>{"use strict";a();Al();U();le();M();st();w();I();rf=0,oT=0;sf=y({name:"ServerListIndicators",description:"Add online friend count or server count in the server list",authors:[p.dzshn],dependencies:["ServerListAPI"],options:{mode:{description:"mode",type:4,options:[{label:"Only online friend count",value:2,default:!0},{label:"Only server count",value:1},{label:"Both server and online friend counts",value:3}]}},renderIndicator:()=>{let{mode:e}=E.plugins.ServerListIndicators;return o(_,{noop:!0},o("div",{style:{marginBottom:"4px"}},!!(e&2)&&o(PC,null),!!(e&1)&&o(IC,null)))},flux:{PRESENCE_UPDATES:nT,GUILD_CREATE:of,GUILD_DELETE:of},start(){Cs(0,this.renderIndicator),nT(),of()},stop(){Ns(0,this.renderIndicator)}})});var aT=g(()=>{});function uT(e){je(t=>o(ze,{...t,size:"medium"},o(CC,{guild:e})))}function cT(e){return o($n,{timestamp:dn(e)})}function CC({guild:e}){let[t,n]=J(),[r,i]=J();De(()=>{Dl.friends=!1,Dl.blocked=!1},[]);let[s,l]=J(0),c=e.banner&&El.getGuildBannerURL({id:e.id,banner:e.banner},!0).replace(/\?size=\d+$/,"?size=1024"),u=e.icon&&El.getGuildIconURL({id:e.id,icon:e.icon,canAnimate:!0,size:512});return o("div",{className:en("root")},c&&s===0&&o("img",{className:en("banner"),src:c,alt:"",onClick:()=>En(c)}),o("div",{className:en("header")},e.icon?o("img",{src:u,alt:"",onClick:()=>En(u)}):o("div",{"aria-hidden":!0,className:oe(lT.childWrapper,lT.acronym)},e.acronym),o("div",{className:en("name-and-description")},o(S.FormTitle,{tag:"h5",className:en("name")},e.name),e.description&&o(S.FormText,null,e.description))),o(Mn,{type:"top",look:"brand",className:en("tab-bar"),selectedItem:s,onItemSelect:l},o(Mn.Item,{className:en("tab",{selected:s===0}),id:0},"Server Info"),o(Mn.Item,{className:en("tab",{selected:s===1}),id:1},"Friends",t!==void 0?` (${t})`:""),o(Mn.Item,{className:en("tab",{selected:s===2}),id:2},"Blocked Users",r!==void 0?` (${r})`:"")),o("div",{className:en("tab-content")},s===0&&o(kC,{guild:e}),s===1&&o(RC,{guild:e,setCount:n}),s===2&&o(LC,{guild:e,setCount:i})))}function NC(e,t){let n=ke.getMember(e,t.id)?.avatar,r=n?El.getGuildMemberAvatarURLSimple({userId:t.id,avatar:n,guildId:e,canAnimate:!0},!0):El.getUserAvatarURL(t,!0);return o("div",{className:en("owner")},o("img",{src:r,alt:"",onClick:()=>En(r)}),Fe.parse(`<@${t.id}>`))}function kC({guild:e}){let[t]=nt(()=>kt.getUser(e.ownerId),{deps:[e.ownerId],fallbackValue:null}),n={"Server Owner":t?NC(e.id,t):"Loading...","Created At":cT(Hn.extractTimestamp(e.id)),"Joined At":e.joinedAt?cT(e.joinedAt.getTime()):"-","Vanity Link":e.vanityURLCode?o("a",null,`discord.gg/${e.vanityURLCode}`):"-","Preferred Locale":e.preferredLocale||"-","Verification Level":["None","Low","Medium","High","Highest"][e.verificationLevel]||"?","Nitro Boosts":`${e.premiumSubscriberCount??0} (Level ${e.premiumTier??0})`,Channels:$r.getChannels(e.id)?.count-1||"?",Roles:Object.keys(e.roles).length-1};return o("div",{className:en("info")},Object.entries(n).map(([r,i])=>o("div",{className:en("server-info-pair"),key:r},o(S.FormTitle,{tag:"h5"},r),typeof i=="string"?o("span",null,i):i)))}function RC({guild:e,setCount:t}){return pT("friends",e,et.getFriendIDs(),t)}function LC({guild:e,setCount:t}){let n=Object.keys(et.getRelationships()).filter(r=>et.isBlocked(r));return pT("blocked",e,n,t)}function pT(e,t,n,r){let i=[],s=[];for(let l of n)ke.isMember(t.id,l)?s.push(l):i.push(l);return He([ke],()=>ke.getMemberIds(t.id),null,(l,c)=>l.length===c.length),De(()=>{!Dl[e]&&i.length&&(Dl[e]=!0,F.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[t.id],userIds:i}))},[]),De(()=>r(s.length),[s.length]),o(Dr,{fade:!0,className:en("scroller")},s.map(l=>o(AC,{user:W.getUser(l),status:Gn.getStatus(l)||"offline",onSelect:()=>Dn(l),onContextMenu:()=>{}})))}var El,lT,AC,en,Dl,dT=g(()=>{"use strict";a();aT();Je();St();Re();pt();st();j();I();El=A("getGuildBannerURL"),lT=A("icon","acronym","childWrapper"),AC=lc("FriendRow"),en=Ue("vc-gp-");Dl={friends:!1,blocked:!1}});var mT,af,fT=g(()=>{"use strict";a();Mt();M();w();I();dT();mT=(e,{guild:t})=>()=>{dt("privacy",e)?.push(o(G.MenuItem,{id:"vc-server-profile",label:"Server Info",action:()=>uT(t)}))},af=y({name:"ServerProfile",description:"Allows you to view info about a server by right clicking it in the server list",authors:[p.Ven,p.Nuckyz],tags:["guild","info"],start(){ce(["guild-context","guild-header-popout"],mT)},stop(){de(["guild-context","guild-header-popout"],mT)}})});var gT=g(()=>{});var hT,yT=g(()=>{a();hT=`/* eslint-disable simple-header/header */
|
|
import React from "react";
|
|
|
|
const handleClick = async () =>
|
|
console.log((await import("@webpack/common")).Clipboard.copy("\\u200b"));
|
|
|
|
export const Example: React.FC<{
|
|
real: boolean,
|
|
shigged?: number,
|
|
}> = ({ real, shigged }) => <>
|
|
<p>{\`Shigg\${real ? \`ies\${shigged === 0x1B ? "t" : ""}\` : "y"}\`}</p>
|
|
<button onClick={handleClick}>Click Me</button>
|
|
</>;
|
|
`});var ST=or((rZ,lf)=>{"use strict";a();var EC=Object.prototype.hasOwnProperty,jt="~";function Es(){}Object.create&&(Es.prototype=Object.create(null),new Es().__proto__||(jt=!1));function DC(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function vT(e,t,n,r,i){if(typeof n!="function")throw new TypeError("The listener must be a function");var s=new DC(n,r||e,i),l=jt?jt+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function Ol(e,t){--e._eventsCount===0?e._events=new Es:delete e._events[t]}function Lt(){this._events=new Es,this._eventsCount=0}Lt.prototype.eventNames=function(){var t=[],n,r;if(this._eventsCount===0)return t;for(r in n=this._events)EC.call(n,r)&&t.push(jt?r.slice(1):r);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(n)):t};Lt.prototype.listeners=function(t){var n=jt?jt+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<s;i++)l[i]=r[i].fn;return l};Lt.prototype.listenerCount=function(t){var n=jt?jt+t:t,r=this._events[n];return r?r.fn?1:r.length:0};Lt.prototype.emit=function(t,n,r,i,s,l){var c=jt?jt+t:t;if(!this._events[c])return!1;var u=this._events[c],d=arguments.length,m,h;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,n),!0;case 3:return u.fn.call(u.context,n,r),!0;case 4:return u.fn.call(u.context,n,r,i),!0;case 5:return u.fn.call(u.context,n,r,i,s),!0;case 6:return u.fn.call(u.context,n,r,i,s,l),!0}for(h=1,m=new Array(d-1);h<d;h++)m[h-1]=arguments[h];u.fn.apply(u.context,m)}else{var v=u.length,T;for(h=0;h<v;h++)switch(u[h].once&&this.removeListener(t,u[h].fn,void 0,!0),d){case 1:u[h].fn.call(u[h].context);break;case 2:u[h].fn.call(u[h].context,n);break;case 3:u[h].fn.call(u[h].context,n,r);break;case 4:u[h].fn.call(u[h].context,n,r,i);break;default:if(!m)for(T=1,m=new Array(d-1);T<d;T++)m[T-1]=arguments[T];u[h].fn.apply(u[h].context,m)}}return!0};Lt.prototype.on=function(t,n,r){return vT(this,t,n,r,!1)};Lt.prototype.once=function(t,n,r){return vT(this,t,n,r,!0)};Lt.prototype.removeListener=function(t,n,r,i){var s=jt?jt+t:t;if(!this._events[s])return this;if(!n)return Ol(this,s),this;var l=this._events[s];if(l.fn)l.fn===n&&(!i||l.once)&&(!r||l.context===r)&&Ol(this,s);else{for(var c=0,u=[],d=l.length;c<d;c++)(l[c].fn!==n||i&&!l[c].once||r&&l[c].context!==r)&&u.push(l[c]);u.length?this._events[s]=u.length===1?u[0]:u:Ol(this,s)}return this};Lt.prototype.removeAllListeners=function(t){var n;return t?(n=jt?jt+t:t,this._events[n]&&Ol(this,n)):(this._events=new Es,this._eventsCount=0),this};Lt.prototype.off=Lt.prototype.removeListener;Lt.prototype.addListener=Lt.prototype.on;Lt.prefixed=jt;Lt.EventEmitter=Lt;typeof lf<"u"&&(lf.exports=Lt)});var df=or(gi=>{"use strict";a();Object.defineProperty(gi,"__esModule",{value:!0});gi.Channel=gi.ChannelPort=void 0;var OC=ST(),_l="vapIpc",cf=Symbol.for("vapIpc.edgeCreate"),uf=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}};gi.ChannelPort=uf;var pf=class{id;_edges=new Map;_callbacks=new Map;_callers=new Map;_edgePipes=new Map;_pipes=[];_emitter=new OC.EventEmitter;_logger;_destroyed=!1;constructor(t){this.id=t}addPipe(t){t.listen(`${_l}:handshake`,n=>{this._handleHandshake(t,n)}),t.listen(`${_l}:message`,n=>{this._handleMessage(t,n)}),this._pipes.push(t),this._logger?.log(`Adding pipe to channel "${this.id}"`)}setLogger(t){this._logger=t}_handleHandshake(t,n){if(this.id===n.id)return;this._logger?.log(`\u{1F91D} "${n.id}" -> "${this.id}" (edges: [${n.channelIds.join(", ")}])`);let r=this._edges.get(n.id);if(r){let i=n.channelIds.filter(s=>!r?.channelIds.includes(s));if(i.includes(this.id)&&i.splice(i.indexOf(this.id),1),!i.length)return;this._edges.set(n.id,{...n,channelIds:[...r.channelIds,...i]})}else{let i=[...n.channelIds].filter(s=>s!==this.id);this._edges.set(n.id,{...n,channelIds:i}),this._edgePipes.set(n.id,t)}this._emitter.emit(cf,n),this.handshakeAll()}_handleMessage(t,n){if(n.proxiedBy===this.id)return;if(n.destination!==this.id)return this._emitMessage({...n,proxiedBy:this.id});if(!n.nonce)return void this._emitter.emit(n.name,n.data);let r=this._callbacks.get(n.nonce);if(r)return void r(n.data);let i=this._callers.get(n.name);if(i){i(n.data).catch(s=>(console.error(s),new Error(s?.message??`${s}`))).then(s=>{this._emitMessage({name:n.name,source:this.id,destination:n.source,data:s,nonce:n.nonce})});return}}_emitHandshake(t){let n=this.getEdge();t.emit(`${_l}:handshake`,n)}_emitMessage(t){let n=this.findEdgeId(t.destination);if(!n)return;this._edgePipes.get(n)?.emit(`${_l}:message`,t)}getEdge(){let t=[...this._edges.keys(),...[...this._edges.values()].map(n=>n.channelIds).flat()].filter((n,r,i)=>i.indexOf(n)===r);return{id:this.id,channelIds:t}}findEdgeId(t){for(let n of this._edges.values())if(n.id===t||n.channelIds.includes(t))return n.id;return null}waitForEdge(t){let n=this.findEdgeId(t);return n?Promise.resolve(n):new Promise(r=>{let i=s=>{(s.id===t||s.channelIds.includes(t))&&(this._emitter.off(cf,i),r(s.id))};this._emitter.on(cf,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}};gi.Channel=pf});var gf=or(hi=>{"use strict";a();Object.defineProperty(hi,"__esModule",{value:!0});hi.RemoteClient=hi.RemoteHost=void 0;var mf=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()}};hi.RemoteHost=mf;var ff=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})}};hi.RemoteClient=ff});var xT=or(yi=>{"use strict";a();Object.defineProperty(yi,"__esModule",{value:!0});yi.WorkerClient=yi.createWorkerHost=void 0;var bT=df(),TT=gf(),_C=(e,t)=>{let n=new bT.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 TT.RemoteHost(n,t)};yi.createWorkerHost=_C;var hf=class extends TT.RemoteClient{workerOpts;worker;workerListeners=[];url;constructor(t,n,r,i={}){let s=new bT.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)}};yi.WorkerClient=hf});var wT=or(fo=>{"use strict";a();var BC=fo&&fo.__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]}),yf=fo&&fo.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&BC(t,e,n)};Object.defineProperty(fo,"__esModule",{value:!0});yf(df(),fo);yf(gf(),fo);yf(xT(),fo)});function Sf(e){Bl.id!==e.id&&(Object.assign(Bl,e),vf.forEach(t=>t(e)))}var Bl,vf,MT,bf=g(()=>{"use strict";a();I();Bl={id:null,theme:null},vf=new Set,MT=()=>{let[,e]=O.useState(Bl);return O.useEffect(()=>(vf.add(e),()=>void vf.delete(e)),[]),Bl}});function kr(e){if(Object.prototype.hasOwnProperty.call(vi,e))return vi[e];let t=Object.values(vi).find(n=>n.aliases?.includes(e));return t?(HC.set(e,t),t):null}var FC,UC,PT,$C,GC,vi,IT,AT,HC,Fl=g(()=>{"use strict";a();FC="Vap0r1ze/vapcord",UC="88a7032a59cca40da170926651b08201ea3b965a",PT=`https://raw.githubusercontent.com/${FC}/${UC}/assets/shiki-codeblocks`,$C=e=>`${PT}/${e}`,GC=`${PT}/languages.json`,vi={},IT=async()=>{let e=await fetch(GC).then(n=>n.json()),t=Object.fromEntries(e.map(n=>[n.id,{...n,grammarUrl:$C(n.fileName)}]));Object.assign(vi,t)},AT=e=>e.grammar?Promise.resolve(e.grammar):fetch(e.grammarUrl).then(t=>t.json()),HC=new Map});var zC,jC,Ge,go,Tf=g(()=>{"use strict";a();zC="shikijs/shiki",jC="0b28ad8ccfbf2615f2d9d38ea8255416b8ac3043",Ge=e=>`https://raw.githubusercontent.com/${zC}/${jC}/packages/shiki/themes/${e}.json`,go={DarkPlus:Ge("dark-plus"),MaterialCandy:"https://raw.githubusercontent.com/millsp/material-candy/master/material-candy.json",DraculaSoft:Ge("dracula-soft"),Dracula:Ge("dracula"),GithubDarkDimmed:Ge("github-dark-dimmed"),GithubDark:Ge("github-dark"),GithubLight:Ge("github-light"),LightPlus:Ge("light-plus"),MaterialDarker:Ge("material-darker"),MaterialDefault:Ge("material-default"),MaterialLighter:Ge("material-lighter"),MaterialOcean:Ge("material-ocean"),MaterialPalenight:Ge("material-palenight"),MinDark:Ge("min-dark"),MinLight:Ge("min-light"),Monokai:Ge("monokai"),Nord:Ge("nord"),OneDarkPro:Ge("one-dark-pro"),Poimandres:Ge("poimandres"),RosePineDawn:Ge("rose-pine-dawn"),RosePineMoon:Ge("rose-pine-moon"),RosePine:Ge("rose-pine"),SlackDark:Ge("slack-dark"),SlackOchin:Ge("slack-ochin"),SolarizedDark:Ge("solarized-dark"),SolarizedLight:Ge("solarized-light"),VitesseDark:Ge("vitesse-dark"),VitesseLight:Ge("vitesse-light"),CssVariables:Ge("css-variables")}});var NT,xf,CT,he,Ds=g(()=>{"use strict";a();Wa();NT=qs(wT());bf();Fl();Tf();xf=Object.values(go),he={client:null,currentTheme:null,currentThemeUrl:null,timeoutMs:1e4,languages:vi,themes:go,loadedThemes:new Set,loadedLangs:new Set,clientPromise:new Promise(e=>CT=e),init:async e=>{let t=await fetch(T1).then(i=>i.blob()),n=he.client=new NT.WorkerClient("shiki-client","shiki-host",t,{name:"ShikiWorker"});await n.init();let r=e||xf[0];await IT(),await n.run("setOnigasm",{wasm:x1}),await n.run("setHighlighter",{theme:r,langs:[]}),he.loadedThemes.add(r),await he._setTheme(r),CT(n)},_setTheme:async e=>{he.currentThemeUrl=e;let{themeData:t}=await he.client.run("getTheme",{theme:e});he.currentTheme=JSON.parse(t),Sf({id:e,theme:he.currentTheme})},loadTheme:async e=>{let t=await he.clientPromise;he.loadedThemes.has(e)||(await t.run("loadTheme",{theme:e}),he.loadedThemes.add(e))},setTheme:async e=>{await he.clientPromise,e||=xf[0],he.loadedThemes.has(e)||await he.loadTheme(e),await he._setTheme(e)},loadLang:async e=>{let t=await he.clientPromise,n=kr(e);!n||he.loadedLangs.has(n.id)||(await t.run("loadLanguage",{lang:{...n,grammar:n.grammar??await AT(n)}}),he.loadedLangs.add(n.id))},tokenizeCode:async(e,t)=>{let n=await he.clientPromise,r=kr(t);return r?(he.loadedLangs.has(r.id)||await he.loadLang(r.id),await n.run("codeToThemedTokens",{code:e,lang:t,theme:he.currentThemeUrl??xf[0]})):[]},destroy(){he.currentTheme=null,he.currentThemeUrl=null,Sf({id:null,theme:null}),he.client?.destroy()}}});var Os,wf=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/shikiCodeblocks.desktop/devicon.css",{name:"src/plugins/shikiCodeblocks.desktop/devicon.css",source:`@import url("https://cdn.jsdelivr.net/gh/devicons/devicon@v2.10.1/devicon.min.css");
|
|
`,classNames:{},dom:null});Os="src/plugins/shikiCodeblocks.desktop/devicon.css"});var _s=g(()=>{"use strict";a()});var qC,Zo,Mf=g(()=>{"use strict";a();U();Je();Re();ro();w();Ds();Tf();wf();_s();qC=Object.keys(go),Zo=D({theme:{type:4,description:"Default themes",options:qC.map(e=>({label:oo(Su(e)),value:go[e],default:go[e]===go.DarkPlus})),onChange:he.setTheme},customTheme:{type:0,description:"A link to a custom vscode theme",placeholder:go.MaterialCandy,onChange:e=>{he.setTheme(e||Zo.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"?Bt(Os):vt(Os)}},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=yc(e);return t?t.pathname.endsWith(".json")?!0:"Must be a json file":"Must be a valid URL"}}})});function RT(e,t){let n=Zo.use(e),[r,i]=O.useState(!1),s={...n,...t},l=s.customTheme||s.theme;if(t){let c=he.currentThemeUrl&&l&&l!==he.currentThemeUrl,u=Object.keys(t).length===0;r&&(!c||u)&&i(!1),!r&&c&&(i(!0),he.setTheme(l))}return{...s,isThemeLoading:l!==he.currentThemeUrl}}var LT=g(()=>{"use strict";a();I();Ds();Mf()});function ET(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 DT=g(()=>{"use strict";a()});var Bn,OT,Bs=g(()=>{"use strict";a();Je();I();Fl();_s();Bn=Ue("shiki-"),OT=({lang:e,tryHljs:t})=>{let n=e?cr?.getLanguage?.(e):null,i=(e?kr(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 _T(e){let[t,n]=O.useState(!1);function r(i){Yt.copy(i),n(!0),setTimeout(()=>{n(!1)},e)}return[t,r]}var BT=g(()=>{"use strict";a();I()});function FT({content:e,...t}){let[n,r]=_T(1e3);return o("button",{...t,style:{...t.style,cursor:n?"default":void 0},onClick:()=>r(e)},n?"Copied!":"Copy")}var UT=g(()=>{"use strict";a();BT()});function $T({content:e,theme:t}){let n=[];return Yt.SUPPORTS_COPY&&n.push(o(FT,{content:e,className:Bn("btn"),style:{backgroundColor:t.accentBgColor,color:t.accentFgColor}})),o("div",{className:Bn("btns")},n)}var GT=g(()=>{"use strict";a();I();Bs();UT()});var HT,zT=g(()=>{"use strict";a();I();Bs();HT=({theme:e,useHljs:t,lang:n,content:r,tokens:i})=>{let s;if(t)try{let{value:c}=cr.highlight(n,r,!0);s=c.split(`
|
|
`).map((u,d)=>o("span",{key:d,dangerouslySetInnerHTML:{__html:u}}))}catch{s=r.split(`
|
|
`).map(c=>o("span",null,c))}else s=(i??r.split(`
|
|
`).map(u=>[{color:e.plainColor,content:u}])).map(u=>u.length===0?o("span",null,`
|
|
`):o(f,null,u.map(({content:d,color:m,fontStyle:h},v)=>o("span",{key:v,style:{color:m,fontStyle:(h??0)&1?"italic":void 0,fontWeight:(h??0)&2?"bold":void 0,textDecoration:(h??0)&4?"underline":void 0}},d))));let l=s.map((c,u)=>o("tr",{key:u},o("td",{style:{color:e.plainColor}},u+1),o("td",null,c)));return o("table",{className:Bn("table")},...l)}});function jT({langName:e,useDevIcon:t,shikiLang:n}){return e?o("div",{className:Bn("lang")},t!=="DISABLED"&&n?.devicon&&o("i",{className:`${Bn("devicon")} devicon-${n.devicon}${t==="COLOR"?" colored":""}`}),e):o(f,null)}var WT=g(()=>{"use strict";a();_s();Bs()});var Ul,KC,qT=g(()=>{"use strict";a();le();st();I();Fl();Ds();LT();bf();DT();Bs();GT();zT();WT();Ul=e=>o("pre",{className:Bn("container")},o(_,null,o(KC,{...e}))),KC=({lang:e,content:t,isPreview:n,tempSettings:r})=>{let{tryHljs:i,useDevIcon:s,bgOpacity:l}=RT(["tryHljs","useDevIcon","bgOpacity"],r),{id:c,theme:u}=MT(),d=e?kr(e):null,m=OT({lang:e,tryHljs:i}),[h,v]=Sc(!0),[T]=nt(async()=>!d||m||!v?null:await he.tokenizeCode(t,e),{fallbackValue:null,deps:[e,t,c,v]}),P={plainColor:u?.fg||"var(--text-normal)",accentBgColor:u?.colors?.["statusBar.background"]||(m?"#7289da":"#007BC8"),accentFgColor:u?.colors?.["statusBar.foreground"]||"#FFF",backgroundColor:u?.colors?.["editor.background"]||"var(--background-secondary)"},b;return e&&(b=m?cr?.getLanguage?.(e)?.name:d?.name),o("div",{ref:h,className:Bn("root",{plain:!b,preview:n}),style:{backgroundColor:m?P.backgroundColor:`rgba(${ET(P.backgroundColor).concat(l/100).join(", ")})`,color:P.plainColor}},o("code",null,o(jT,{langName:b,useDevIcon:s,shikiLang:d}),o(HT,{theme:P,useHljs:m,lang:e,content:t,tokens:T}),!n&&o($T,{content:t,theme:P})))}});var KT,YT,ZT=g(()=>{"use strict";a();KT=new Map,YT=()=>{KT.forEach(e=>e.remove()),KT.clear()}});var Pf,XT=g(()=>{"use strict";a();gT();Je();M();w();yT();Ds();qT();wf();Mf();_s();ZT();Pf=y({name:"ShikiCodeblocks",description:"Brings vscode-style codeblocks into Discord, powered by Shiki",authors:[p.Vap],patches:[{find:"codeBlock:{react(",replacement:{match:/codeBlock:\{react\((\i),(\i),(\i)\)\{/,replace:"$&return $self.renderHighlighter($1,$2,$3);"}}],start:async()=>{Zo.store.useDevIcon!=="DISABLED"&&vt(Os),await he.init(Zo.store.customTheme||Zo.store.theme)},stop:()=>{he.destroy(),YT()},settingsAboutComponent:({tempSettings:e})=>Ul({lang:"tsx",content:hT,isPreview:!0,tempSettings:e}),settings:Zo,shiki:he,createHighlighter:Ul,renderHighlighter:({lang:e,content:t})=>Ul({lang:e?.toLowerCase(),content:t,isPreview:!1})})});var If,JT=g(()=>{"use strict";a();M();w();If=y({name:"ShowAllMessageButtons",description:"Always show all message buttons no matter if you are holding the shift key or not.",authors:[p.Nuckyz],patches:[{find:".Messages.MESSAGE_UTILITIES_A11Y_LABEL",replacement:{match:/isExpanded:\i&&(.+?),/,replace:"isExpanded:$1,"}}]})});var QT=g(()=>{});function ex(){let e=Ni(VT.colors.INTERACTIVE_MUTED).hex(),t=Ni(VT.colors.INTERACTIVE_ACTIVE).hex();return o(YC,{color:e,forcedIconColor:t,size:16,tooltipText:tt.Messages.CONNECTION_VERIFIED})}var VT,YC,tx=g(()=>{"use strict";a();j();I();VT=nn(e=>e.colors?.INTERACTIVE_MUTED?.css),YC=Xe(".CONNECTIONS_ROLE_OFFICIAL_ICON_TOOLTIP")});function nx({id:e,theme:t}){let n=on.getUserProfile(e);if(!n)return null;let r=n.connectedAccounts;return r?.length?o(ZC,null,o(re,{tag:"h2",variant:"eyebrow",style:{color:"var(--header-primary)"}},"Connections"),o(ge,{style:{marginTop:"8px",gap:VC($l.store.iconSpacing),flexWrap:"wrap"}},r.map(i=>o(nN,{connection:i,theme:t})))):null}function nN({connection:e,theme:t}){let n=JC.get(e.type),r=n.getPlatformUserUrl?.(e),i=o("img",{"aria-label":e.name,src:t==="light"?n.icon.lightSVG:n.icon.darkSVG,style:{width:$l.store.iconSize,height:$l.store.iconSize}}),s=r?Qr:yy;return o(V,{text:o("span",{className:"vc-sc-tooltip"},e.name,e.verified&&o(ex,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:()=>fn(e.name)},i))}var ZC,XC,JC,QC,VC,$l,eN,tN,Af,ox=g(()=>{"use strict";a();QT();U();le();Rt();Ut();M();Re();w();j();I();tx();ZC=Xe(".lastSection","children:"),XC=Me("ThemeStore"),JC=A("isSupported","getByUrl"),QC=Ai(',"--profile-gradient-primary-color"'),VC=e=>(e??0)*2+4,$l=D({iconSize:{type:1,description:"Icon size (px)",default:32},iconSpacing:{type:4,description:"Icon margin",default:1,options:[{label:"Compact",value:0},{label:"Cozy",value:1},{label:"Roomy",value:2}]}}),eN=_.wrap(({user:e,displayProfile:t})=>o(nx,{id:e.id,theme:QC(e,t).profileTheme})),tN=_.wrap(({id:e})=>o(nx,{id:e,theme:XC.theme}));Af=y({name:"ShowConnections",description:"Show connected accounts in user popouts",authors:[p.TheKodeToad],patches:[{find:"{isUsingGuildBio:null!==(",replacement:{match:/,theme:\i\}\)(?=,.{0,150}setNote:)/,replace:"$&,$self.profilePopoutComponent({ user: arguments[0].user, displayProfile: arguments[0].displayProfile })"}},{find:'"Profile Panel: user cannot be undefined"',replacement:{match:/\(0,\i\.jsx\)\(\i\.\i,\{\}\).{0,100}setNote:(?=.+?channelId:(\i).id)/,replace:"$self.profilePanelComponent({ id: $1.recipients[0] }),$&"}}],settings:$l,profilePopoutComponent:eN,profilePanelComponent:tN})});var rx=g(()=>{});function mN({channel:e}){let[t,n]=J(Xo.store.defaultAllowedUsersAndRolesDropdownState),[r,i]=J([]),{type:s,topic:l,lastMessageId:c,defaultForumLayout:u,lastPinTimestamp:d,defaultAutoArchiveDuration:m,availableTags:h,id:v,rateLimitPerUser:T,defaultThreadRateLimitPerUser:P,defaultSortOrder:b,defaultReactionEmoji:x,bitrate:C,rtcRegion:k,videoQualityMode:B,permissionOverwrites:$,guild_id:Y}=e;return De(()=>{let K=[],z=Te.getGuild(Y).ownerId;ke.getMember(Y,z)||K.push(z),Object.values($).forEach(({type:L,id:X})=>{L===1&&!ke.getMember(Y,X)&&K.push(X)}),K.length>0&&F.dispatch({type:"GUILD_MEMBERS_REQUEST",guildIds:[Y],userIds:K}),E.plugins.PermissionsViewer.enabled&&i(ml(Object.values($).map(L=>({type:L.type,id:L.id,overwriteAllow:L.allow,overwriteDeny:L.deny})),Y))},[v]),o("div",{className:ix.auto+" "+ix.customTheme+" "+oN.chatContent+" shc-lock-screen-outer-container"},o("div",{className:"shc-lock-screen-container"},o("img",{className:"shc-lock-screen-logo",src:dN}),o("div",{className:"shc-lock-screen-heading-container"},o(re,{variant:"heading-xxl/bold"},"This is a ",Ne.can(Se.VIEW_CHANNEL,e)?"locked":"hidden"," ",lN[s]," channel."),e.isNSFW()&&o(V,{text:"NSFW"},({onMouseLeave:K,onMouseEnter:z})=>o("svg",{onMouseLeave:K,onMouseEnter:z,className:"shc-lock-screen-heading-nsfw-icon",width:"32",height:"32",viewBox:"0 0 48 48","aria-hidden":!0,role:"img"},o("path",{fill:"currentColor",d:"M.7 43.05 24 2.85l23.3 40.2Zm23.55-6.25q.75 0 1.275-.525.525-.525.525-1.275 0-.75-.525-1.3t-1.275-.55q-.8 0-1.325.55-.525.55-.525 1.3t.55 1.275q.55.525 1.3.525Zm-1.85-6.1h3.65V19.4H22.4Z"})))),!e.isGuildVoice()&&!e.isGuildStageVoice()&&o(re,{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"},Fe.parseTopic(l,!1,{channelId:v})),c&&o(re,{variant:"text-md/normal"},"Last ",e.isForumChannel()?"post":"message"," created:",o($n,{timestamp:dn(Hn.extractTimestamp(c))})),d&&o(re,{variant:"text-md/normal"},"Last message pin: ",o($n,{timestamp:dn(d)})),(T??0)>0&&o(re,{variant:"text-md/normal"},"Slowmode: ",Vi(T,"seconds")),(P??0)>0&&o(re,{variant:"text-md/normal"},"Default thread slowmode: ",Vi(P,"seconds")),(e.isGuildVoice()||e.isGuildStageVoice())&&C!=null&&o(re,{variant:"text-md/normal"},"Bitrate: ",C," bits"),k!==void 0&&o(re,{variant:"text-md/normal"},"Region: ",k??"Automatic"),(e.isGuildVoice()||e.isGuildStageVoice())&&o(re,{variant:"text-md/normal"},"Video quality mode: ",pN[B??1]),(m??0)>0&&o(re,{variant:"text-md/normal"},"Default inactivity duration before archiving ",e.isForumChannel()?"posts":"threads",":"," "+Vi(m,"minutes")),u!=null&&o(re,{variant:"text-md/normal"},"Default layout: ",uN[u]),b!=null&&o(re,{variant:"text-md/normal"},"Default sort order: ",cN[b]),x!=null&&o("div",{className:"shc-lock-screen-default-emoji-container"},o(re,{variant:"text-md/normal"},"Default reaction emoji:"),Fe.defaultRules[x.emojiName?"emoji":"customEmoji"].react({name:x.emojiName?sN.convertSurrogateToName(x.emojiName):In.getCustomEmojiById(x.emojiId)?.name??"",emojiId:x.emojiId??void 0,surrogate:x.emojiName??void 0,src:x.emojiName?aN.getURL(x.emojiName):void 0},void 0,{key:"0"})),e.hasFlag(16)&&o(re,{variant:"text-md/normal"},"Posts on this forum require a tag to be set."),h&&h.length>0&&o("div",{className:"shc-lock-screen-tags-container"},o(re,{variant:"text-lg/bold"},"Available tags:"),o("div",{className:"shc-lock-screen-tags"},h.map(K=>o(iN,{tag:K})))),o("div",{className:"shc-lock-screen-allowed-users-and-roles-container"},o("div",{className:"shc-lock-screen-allowed-users-and-roles-container-title"},E.plugins.PermissionsViewer.enabled&&o(V,{text:"Permission Details"},({onMouseLeave:K,onMouseEnter:z})=>o("button",{onMouseLeave:K,onMouseEnter:z,className:"shc-lock-screen-allowed-users-and-roles-container-permdetails-btn",onClick:()=>ci(r,Te.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(re,{variant:"text-lg/bold"},"Allowed users and roles:"),o(V,{text:t?"Hide Allowed Users and Roles":"View Allowed Users and Roles"},({onMouseLeave:K,onMouseEnter:z})=>o("button",{onMouseLeave:K,onMouseEnter:z,className:"shc-lock-screen-allowed-users-and-roles-container-toggle-btn",onClick:()=>n(L=>!L)},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(rN,{channel:e}))))}var ix,oN,rN,iN,sN,aN,lN,cN,uN,pN,dN,sx,ax=g(()=>{"use strict";a();U();le();ro();j();I();Ps();Ms();Cf();ix=A("auto","content","scrollerBase"),oN=A("chat","content","noChat","chatContent"),rN=Xe(".Messages.ROLE_REQUIRED_SINGLE_USER_MESSAGE"),iN=ac(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")}),sN=A("convertSurrogateToName"),aN=A("getURL","getEmojiColors"),lN={[0]:"text",[5]:"announcement",[15]:"forum",[2]:"voice",[13]:"stage"},cN={[0]:"Latest activity",[1]:"Creation date"},uN={[0]:"Not set",[1]:"List view",[2]:"Gallery view"},pN={[1]:"Automatic",[2]:"720p"},dN="/assets/433e3ec4319a9d11b0cbe39342614982.svg";sx=_.wrap(mN)});var lx,Xo,Nf,Cf=g(()=>{"use strict";a();rx();U();le();M();ms();w();j();I();ax();lx=A("channelEmoji","unread","icon"),Xo=D({hideUnreads:{description:"Hide Unreads",type:3,default:!0,restartNeeded:!0},showMode:{description:"The mode used to display hidden channels.",type:4,options:[{label:"Plain style with Lock Icon instead",value:0,default:!0},{label:"Muted style with hidden eye icon on the right",value:1}],restartNeeded:!0},defaultAllowedUsersAndRolesDropdownState:{description:"Whether the allowed users and roles dropdown on hidden channels should be open by default",type:3,default:!0}}),Nf=y({name:"ShowHiddenChannels",description:"Show channels that you do not have access to view.",authors:[p.BigDuck,p.AverageReactEnjoyer,p.D3SOX,p.Ven,p.Nuckyz,p.Nickyux,p.dzshn],settings:Xo,patches:[{find:'"placeholder-channel-id"',replacement:[{match:/if\(!\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL.+?{if\(this\.id===\i\).+?threadIds:\i}}/,replace:""},{match:/(?=!\(0,\i\.getHasImportantUnread\)\(this\.record\))/,replace:"$self.isHiddenChannel(this.record)||"},{match:/(activeJoinedRelevantThreads:.{0,50}VIEW_CHANNEL.+?renderLevel:(.+?),threadIds.+?renderLevel:).+?(?=,threadIds)/g,replace:(e,t,n)=>`${t}${n}`},{match:/(?<=getRenderLevel\(\i\){.+?return)!\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL,this\.record\)\|\|/,replace:" "}]},{find:"VoiceChannel, transitionTo: Channel does not have a guildId",replacement:[{match:/(?<=getCurrentClientVoiceChannelId\((\i)\.guild_id\);return)/,replace:(e,t)=>`!$self.isHiddenChannel(${t})&&`},{match:/(?=&&\i\.\i\.selectVoiceChannel\((\i)\.id\))/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`},{match:/!__OVERLAY__&&\((?<=selectVoiceChannel\((\i)\.id\).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t},true)||`}]},{find:".MAX_STAGE_VOICE_USER_LIMIT})",replacement:{match:/!(\i)\.isRoleSubscriptionTemplatePreviewChannel\(\)/,replace:(e,t)=>`${e}&&!$self.isHiddenChannel(${t})`}},{find:"ChannelItemEditButton:function(){",replacement:[...["renderEditButton","renderInviteButton"].map(e=>({match:new RegExp(`(?<=${e}\\(\\){)`,"g"),replace:"if($self.isHiddenChannel(this.props.channel))return null;"}))]},{find:"VoiceChannel.renderPopout: There must always be something to render",all:!0,replacement:{match:/(?<=renderOpenChatButton=\(\)=>{)/,replace:"if($self.isHiddenChannel(this.props.channel))return null;"}},{find:".Messages.CHANNEL_TOOLTIP_DIRECTORY",predicate:()=>Xo.store.showMode===0,replacement:{match:/(?=switch\((\i)\.type\).{0,30}\.GUILD_ANNOUNCEMENT.{0,70}\(0,\i\.\i\))/,replace:(e,t)=>`if($self.isHiddenChannel(${t}))return $self.LockIcon;`}},{find:"UNREAD_IMPORTANT:",predicate:()=>Xo.store.showMode===1,replacement:[{match:/(?<={channel:(\i),name:\i,muted:(\i).+?;)/,replace:(e,t,n)=>`${n}=$self.isHiddenChannel(${t})?true:${n};`},{match:/\i\.children.+?:null(?<=,channel:(\i).+?)/,replace:(e,t)=>`${e},$self.isHiddenChannel(${t})?$self.HiddenChannelIcon():null`},{match:/(?<=\.wrapper:\i\.notInteractive,)(.+?)if\((\i)\)return (\i\.MUTED);/,replace:(e,t,n,r)=>`${n}?${r}:"",${t}if(${n})return "";`}]},{find:"UNREAD_IMPORTANT:",replacement:[{predicate:()=>Xo.store.hideUnreads===!1&&Xo.store.showMode===1,match:/\.LOCKED;if\((?<={channel:(\i).+?)/,replace:(e,t)=>`${e}!$self.isHiddenChannel(${t})&&`},{predicate:()=>Xo.store.hideUnreads===!0,match:/(?<={channel:(\i),name:\i,.+?unread:(\i).+?;)/,replace:(e,t,n)=>`${n}=$self.isHiddenChannel(${t})?false:${n};`}]},{find:'.displayName="ChannelListUnreadsStore"',replacement:{match:/(?<=if\(null==(\i))(?=.{0,160}?getHasImportantUnread\)\(\i\))/g,replace:(e,t)=>`||$self.isHiddenChannel(${t})`}},{find:"renderBottomUnread(){",replacement:{match:/(?=&&\(0,\i\.getHasImportantUnread\)\((\i\.record)\))/,replace:"&&!$self.isHiddenChannel($1)"}},{find:".useFlattenedChannelIdListWithThreads)",replacement:{match:/(?=&&\(0,\i\.getHasImportantUnread\)\((\i)\))/,replace:"&&!$self.isHiddenChannel($1)"}},{find:"Missing channel in Channel.renderHeaderToolbar",replacement:[{match:/(?<=renderHeaderToolbar=\(\)=>{.+?case \i\.\i\.GUILD_TEXT:)(?=.+?(\i\.push.{0,50}channel:(\i)},"notifications"\)\)))(?<=isLurking:(\i).+?)/,replace:(e,t,n,r)=>`if(!${r}&&$self.isHiddenChannel(${n})){${t};break;}`},{match:/(?<=renderHeaderToolbar=\(\)=>{.+?case \i\.\i\.GUILD_MEDIA:)(?=.+?(\i\.push.{0,40}channel:(\i)},"notifications"\)\)))(?<=isLurking:(\i).+?)/,replace:(e,t,n,r)=>`if(!${r}&&$self.isHiddenChannel(${n})){${t};break;}`},{match:/renderMobileToolbar=\(\)=>{.+?case \i\.\i\.GUILD_DIRECTORY:(?<=let{channel:(\i).+?)/,replace:(e,t)=>`${e}if($self.isHiddenChannel(${t}))break;`},{match:/(?<=renderHeaderBar=\(\)=>{.+?hideSearch:(\i)\.isDirectory\(\))/,replace:(e,t)=>`||$self.isHiddenChannel(${t})`},{match:/(?<=renderSidebar\(\){)/,replace:"if($self.isHiddenChannel(this.props.channel))return null;"},{match:/(?<=renderChat\(\){)/,replace:"if($self.isHiddenChannel(this.props.channel))return $self.HiddenChannelLockScreen(this.props.channel);"}]},{find:'"MessageManager"',replacement:{match:/"Skipping fetch because channelId is a static route"\);return}(?=.+?getChannel\((\i)\))/,replace:(e,t)=>`${e}if($self.isHiddenChannel({channelId:${t}}))return;`}},{find:'"alt+shift+down"',replacement:{match:/(?<=getChannel\(\i\);return null!=(\i))(?=.{0,150}?getHasImportantUnread\)\(\i\))/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`}},{find:".APPLICATION_STORE&&null!=",replacement:{match:/(?<=getState\(\)\.channelId.{0,30}?\(0,\i\.\i\)\(\i\))(?=\.map\()/,replace:".filter(e=>!$self.isHiddenChannel(e))"}},{find:".Messages.ROLE_REQUIRED_SINGLE_USER_MESSAGE",replacement:[{match:/ADMINISTRATOR\)\|\|(?<=context:(\i)}.+?)(?=(.+?)VIEW_CHANNEL)/,replace:(e,t,n)=>`${e}!Vencord.Webpack.Common.PermissionStore.can(${Se.CONNECT}n,${t})?${n}CONNECT):`},{match:/permissionOverwrites\[.+?\i=(?<=context:(\i)}.+?)(?=(.+?)VIEW_CHANNEL)/,replace:(e,t,n)=>`${e}!Vencord.Webpack.Common.PermissionStore.can(${Se.CONNECT}n,${t})?${n}CONNECT):`},{match:/sortBy.{0,30}?\.filter\(\i=>(?<=channel:(\i).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?true:`},{match:/computePermissionsForRoles.+?.value\(\)(?<=channel:(\i).+?)/,replace:(e,t)=>`${e}.reduce(...$self.makeAllowedRolesReduce(${t}.guild_id))`},{match:/MANAGE_ROLES.{0,90}?return(?=\(.+?(\(0,\i\.jsxs\)\("div",{className:\i\.members.+?guildId:(\i)\.guild_id.+?roleColor.+?\]}\)))/,replace:(e,t,n)=>(t=t.replace(wr(/(?<=users:\i)/),`,shcChannel:${n}`),t=t.replace(wr(/1!==\i\.length/),"true"),`${e} $self.isHiddenChannel(${n},true)?${t}:`)}]},{find:".avatars),children",replacement:[{match:/maxUsers:\i,users:\i.+?=(\i).+?;/,replace:(e,t)=>`${e}let{shcChannel}=${t};`},{match:/\i>0(?=&&.{0,60}renderPopout)/,replace:e=>`($self.isHiddenChannel(shcChannel,true)?true:${e})`},{match:/(?<=\.value\(\),(\i)=.+?length-)1(?=\]=.{0,60}renderPopout)/,replace:(e,t)=>`($self.isHiddenChannel(shcChannel,true)&&${t}<=0?0:1)`},{match:/(?<="\+",)(\i)\+1/,replace:(e,t)=>`$self.isHiddenChannel(shcChannel,true)&&${t}<=0?"":${e}`}]},{find:".Messages.CHANNEL_CALL_CURRENT_SPEAKER.format",replacement:[{match:/"more-options-popout"\)\),(?<=let{channel:(\i).+?inCall:(\i).+?)/,replace:(e,t,n)=>`${e}${n}||!$self.isHiddenChannel(${t},true)&&`},{match:/"popup".{0,100}?if\((?<=let{channel:(\i).+?inCall:(\i).+?)/,replace:(e,t,n)=>`${e}(${n}||!$self.isHiddenChannel(${t},true))&&`}]},{find:".Messages.EMBEDDED_ACTIVITIES_DEVELOPER_ACTIVITY_SHELF_FETCH_ERROR",replacement:[{match:/renderContent\(\i\){.+?this\.renderVoiceChannelEffects.+?children:/,replace:"$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?$self.HiddenChannelLockScreen(this.props.channel):"},{match:/renderContent\(\i\){.+?disableGradients:/,replace:"$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)||"},{match:/(?:{|,)render(?!Header|ExternalHeader).{0,30}?:/g,replace:"$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?()=>null:"},{match:/callContainer,(?<=\i\.callContainer,)/,replace:'$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?"":'}]},{find:'"HasBeenInStageChannel"',replacement:[{match:/"124px".+?children:(?<=let \i,{channel:(\i).+?)(?=.{0,20}?}\)}function)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?$self.HiddenChannelLockScreen(${t}):`},{match:/render(?:BottomLeft|BottomCenter|BottomRight|ChatToasts):\(\)=>(?<=let \i,{channel:(\i).+?)/g,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?null:`},{match:/"124px".+?disableGradients:(?<=let \i,{channel:(\i).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})||`},{match:/"124px".+?style:(?<=let \i,{channel:(\i).+?)/,replace:(e,t)=>`${e}$self.isHiddenChannel(${t})?void 0:`}]},{find:".Messages.STAGE_FULL_MODERATOR_TITLE",replacement:[{match:/\(0,\i\.jsx\)\(\i\.\i\.Divider.+?}\)]}\)(?=.+?:(\i)\.guild_id)/,replace:(e,t)=>`$self.isHiddenChannel(${t})?null:(${e})`},{match:/"recents".+?&&(?=\(.+?channelId:(\i)\.id,showRequestToSpeakSidebar)/,replace:(e,t)=>`${e}!$self.isHiddenChannel(${t})&&`}]},{find:",queryStaticRouteChannels(",replacement:[{match:/(?<=queryChannels\(\i\){.+?getChannels\(\i)(?=\))/,replace:",true"},{match:/(?<=queryChannels\(\i\){.+?isGuildChannelType\)\((\i)\.type\))(?=&&!\i\.\i\.can\()/,replace:"&&!$self.isHiddenChannel($1)"}]},{find:'"^/guild-stages/(\\\\d+)(?:/)?(\\\\d+)?"',replacement:{match:/\i\.\i\.can\(\i\.\i\.VIEW_CHANNEL,\i\)/,replace:"true"}},{find:".shouldCloseDefaultModals",replacement:{match:/(?<=getChannel\(\i\);if\(null!=(\i))(?=.{0,100}?selectVoiceChannel)/,replace:(e,t)=>`&&!$self.isHiddenChannel(${t})`}},{find:'.displayName="GuildChannelStore"',replacement:[{match:/isChannelGated\(.+?\)(?=&&)/,replace:e=>`${e}&&false`},{match:/(?<=getChannels\(\i)(\){.+?)return (.+?)}/,replace:(e,t,n)=>`,shouldIncludeHidden${t}return $self.resolveGuildChannels(${n},shouldIncludeHidden??false);}`}]},{find:".Messages.FORM_LABEL_MUTED",replacement:{match:/(?<=getChannels\(\i)(?=\))/,replace:",true"}},{find:'.displayName="NowPlayingViewStore"',replacement:{match:/(getVoiceStateForUser.{0,150}?)&&\i\.\i\.canWithPartialContext.{0,20}VIEW_CHANNEL.+?}\)(?=\?)/,replace:"$1"}}],isHiddenChannel(e,t=!1){return!e||(e.channelId&&(e=Q.getChannel(e.channelId)),!e||e.isDM()||e.isGroupDM()||e.isMultiUserDM())?!1:!Ne.can(Se.VIEW_CHANNEL,e)||t&&!Ne.can(Se.CONNECT,e)},resolveGuildChannels(e,t){if(t)return e;let n={};for(let[r,i]of Object.entries(e)){if(!Array.isArray(i)){n[r]=i;continue}n[r]??=[];for(let s of i)(s.channel.id===null||!this.isHiddenChannel(s.channel))&&n[r].push(s)}return n},makeAllowedRolesReduce(e){return[(t,n,r,i)=>{if(r!==0)return t;let s=i.find(l=>l.id===e);return s?[s]:i},[]]},HiddenChannelLockScreen:e=>o(sx,{channel:e}),LockIcon:_.wrap(()=>o("svg",{className:lx.icon,height:"18",width:"20",viewBox:"0 0 24 24","aria-hidden":!0,role:"img"},o("path",{className:"shc-evenodd-fill-current-color",d:"M17 11V7C17 4.243 14.756 2 12 2C9.242 2 7 4.243 7 7V11C5.897 11 5 11.896 5 13V20C5 21.103 5.897 22 7 22H17C18.103 22 19 21.103 19 20V13C19 11.896 18.103 11 17 11ZM12 18C11.172 18 10.5 17.328 10.5 16.5C10.5 15.672 11.172 15 12 15C12.828 15 13.5 15.672 13.5 16.5C13.5 17.328 12.828 18 12 18ZM15 11H9V7C9 5.346 10.346 4 12 4C13.654 4 15 5.346 15 7V11Z"})),{noop:!0}),HiddenChannelIcon:_.wrap(()=>o(V,{text:"Hidden Channel"},({onMouseLeave:e,onMouseEnter:t})=>o("svg",{onMouseLeave:e,onMouseEnter:t,className:lx.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 cx=g(()=>{});var Fs,kf,ux=g(()=>{"use strict";a();cx();U();M();w();Fs=D({mode:{type:4,description:"How to display usernames and nicks",options:[{label:"Username then nickname",value:"user-nick",default:!0},{label:"Nickname then username",value:"nick-user"},{label:"Username only",value:"user"}]},displayNames:{type:3,description:"Use display names in place of usernames",default:!1},inReplies:{type:3,default:!1,description:"Also apply functionality to reply previews"}}),kf=y({name:"ShowMeYourName",description:"Display usernames next to nicks, or no nicks at all",authors:[p.Rini,p.TheKodeToad],patches:[{find:".useCanSeeRemixBadge)",replacement:{match:/(?<=onContextMenu:\i,children:).*?\}/,replace:"$self.renderUsername(arguments[0])}"}}],settings:Fs,renderUsername:({author:e,message:t,isRepliedMessage:n,withMentionPrefix:r,userOverride:i})=>{try{let s=i??t.author,{username:l}=s;Fs.store.displayNames&&(l=s.globalName||l);let{nick:c}=e,u=r?"@":"";return l===c||n&&!Fs.store.inReplies?u+c:Fs.store.mode==="user-nick"?o(f,null,u,l," ",o("span",{className:"vc-smyn-suffix"},c)):Fs.store.mode==="nick-user"?o(f,null,u,c," ",o("span",{className:"vc-smyn-suffix"},l)):u+l}catch{return e?.nick}}})});var Rf,px=g(()=>{"use strict";a();M();w();Rf=y({name:"ShowTimeouts",description:"Display member timeout icons in chat regardless of permissions.",authors:[p.Dolfies],patches:[{find:"showCommunicationDisabledStyles",replacement:{match:/&&\i\.\i\.canManageUser\(\i\.\i\.MODERATE_MEMBERS,\i\.author,\i\)/,replace:""}}]})});function fN(e){let[t,n]=O.useState(Lf);function r(i){Ef.store.persistState&&(Lf=i),n(i)}return O.useEffect(()=>{let i=(s,l)=>{t&&(Ef.store.autoDisable&&r(!1),l.content.startsWith("@silent ")||(l.content="@silent "+l.content))};return Gt(i),()=>void Ht(i)},[t]),e.type.analyticsName!=="normal"?null:o(V,{text:t?"Disable Silent Message":"Enable Silent Message"},i=>o("div",{style:{display:"flex"}},o(R,{...i,onClick:()=>r(!t),size:"",look:qt.BLANK,innerClassName:yt.button,style:{padding:"0 6px"}},o("div",{className:yt.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 Lf,Ef,Df,dx=g(()=>{"use strict";a();Kn();U();le();M();w();I();Lf=!1,Ef=D({persistState:{type:3,description:"Whether to persist the state of the silent message toggle when changing channels",default:!1,onChange(e){e===!1&&(Lf=!1)}},autoDisable:{type:3,description:"Automatically disable the silent message toggle again after sending one",default:!0}});Df=y({name:"SilentMessageToggle",authors:[p.Nuckyz,p.CatNoir],description:"Adds a button to the chat bar to toggle sending a silent message.",dependencies:["MessageEventsAPI"],settings:Ef,patches:[{find:"ChannelTextAreaButtons",replacement:{match:/(\i)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&,(()=>{try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}})()"}}],chatBarIcon:_.wrap(fN,{noop:!0})})});function gN(e){let{isEnabled:t}=ho.use(["isEnabled"]),n=()=>ho.store.isEnabled=!ho.store.isEnabled;return e.type.analyticsName!=="normal"?null:o(V,{text:t?"Disable Silent Typing":"Enable Silent Typing"},r=>o("div",{style:{display:"flex"}},o(R,{...r,onClick:n,size:"",look:qt.BLANK,innerClassName:yt.button,style:{padding:"0 6px"}},o("div",{className:yt.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 ho,Of,mx=g(()=>{"use strict";a();Jt();U();le();M();w();I();ho=D({showIcon:{type:3,default:!1,description:"Show an icon for toggling the plugin",restartNeeded:!0},isEnabled:{type:3,description:"Toggle functionality",default:!0}});Of=y({name:"SilentTyping",authors:[p.Ven,p.Rini],description:"Hide that you are typing",patches:[{find:'.dispatch({type:"TYPING_START_LOCAL"',replacement:{match:/startTyping\(\i\){.+?},stop/,replace:"startTyping:$self.startTyping,stop"}},{find:"ChannelTextAreaButtons",predicate:()=>ho.store.showIcon,replacement:{match:/(\i)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&,(()=>{try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}})()"}}],dependencies:["CommandsAPI"],settings:ho,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)=>{ho.store.isEnabled=!!ot(e,"value",!ho.store.isEnabled),ue(t.channel.id,{content:ho.store.isEnabled?"Silent typing enabled!":"Silent typing disabled!"})}}],async startTyping(e){ho.store.isEnabled||F.dispatch({type:"TYPING_START_LOCAL",channelId:e})},chatBarIcon:_.wrap(gN,{noop:!0})})});var fx,_f,gx=g(()=>{"use strict";a();U();Rt();M();w();I();fx=D({showDates:{type:3,description:"Show dates on friend requests",default:!1,restartNeeded:!0}}),_f=y({name:"SortFriendRequests",authors:[p.Megu],description:"Sorts friend requests by date of receipt",settings:fx,patches:[{find:"getRelationshipCounts(){",replacement:{match:/\.sortBy\(\i=>\i\.comparator\)/,replace:".sortBy((row) => $self.sortList(row))"}},{find:".Messages.FRIEND_REQUEST_CANCEL",replacement:{predicate:()=>fx.store.showDates,match:/subText:(\i)(?=,className:\i\.userInfo}\))(?<=user:(\i).+?)/,replace:(e,t,n)=>`subText:$self.makeSubtext(${t},${n})`}}],sortList(e){return e.type===3||e.type===4?-this.getSince(e.user):e.comparator},getSince(e){return new Date(et.getSince(e.id))},makeSubtext(e,t){let n=this.getSince(t);return o(ge,{flexDirection:"row",style:{gap:0,flexWrap:"wrap",lineHeight:"0.9rem"}},o("span",null,e),!isNaN(n.getTime())&&o("span",null,"Received \u2014 ",n.toDateString()))}})});var hx,yx=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/spotifyControls/hoverOnly.css",{name:"src/plugins/spotifyControls/hoverOnly.css",source:`.vc-spotify-button-row {
|
|
height: 0;
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transition: 0.2s;
|
|
transition-property: height;
|
|
}
|
|
|
|
#vc-spotify-player:hover .vc-spotify-button-row {
|
|
opacity: 1;
|
|
height: 32px;
|
|
pointer-events: auto;
|
|
|
|
/* only transition opacity on show to prevent clipping */
|
|
transition-property: height, opacity;
|
|
}
|
|
`,classNames:{},dom:null});hx="src/plugins/spotifyControls/hoverOnly.css"});var vx=g(()=>{});var $e,Sx=g(()=>{"use strict";a();U();j();I();$e=Jn(()=>{let{Store:e}=dc,t=Dt("getActiveSocketAndDevice"),n=Dt("SpotifyAPI"),r="https://api.spotify.com/v1/me/player";class i extends e{mPosition=0;start=0;track=null;device=null;isPlaying=!1;repeat="off";shuffle=!1;volume=0;isSettingPosition=!1;openExternal(c){let u=E.plugins.SpotifyControls.useSpotifyUris||Vencord.Plugins.isPluginEnabled("OpenInApp")?"spotify:"+c.replaceAll("/",(d,m)=>m===0?"":":"):"https://open.spotify.com"+c;VencordNative.native.openExternal(u)}get position(){let c=this.mPosition;return this.isPlaying&&(c+=Date.now()-this.start),c}set position(c){this.mPosition=c,this.start=Date.now()}prev(){this.req("post","/previous")}next(){this.req("post","/next")}setVolume(c){this.req("put","/volume",{query:{volume_percent:Math.round(c)}}).then(()=>{this.volume=c,this.emitChange()})}setPlaying(c){this.req("put",c?"/play":"/pause")}setRepeat(c){this.req("put","/repeat",{query:{state:c}})}setShuffle(c){this.req("put","/shuffle",{query:{state:c}}).then(()=>{this.shuffle=c,this.emitChange()})}seek(c){return this.isSettingPosition?Promise.resolve():(this.isSettingPosition=!0,this.req("put","/seek",{query:{position_ms:Math.round(c)}}).catch(u=>{console.error("[VencordSpotifyControls] Failed to seek",u),this.isSettingPosition=!1}))}req(c,u,d={}){this.device?.is_active&&((d.query??={}).device_id=this.device.id);let{socket:m}=t.getActiveSocketAndDevice();return n.SpotifyAPI[c](m.accountId,m.accessToken,{url:r+u,...d})}}let s=new i(F,{SPOTIFY_PLAYER_STATE(l){s.track=l.track,s.device=l.device??null,s.isPlaying=l.isPlaying??!1,s.volume=l.volumePercent??0,s.repeat=l.actual_repeat||"off",s.position=l.position??0,s.isSettingPosition=!1,s.emitChange()},SPOTIFY_SET_DEVICES({devices:l}){s.device=l.find(c=>c.is_active)??l[0]??null,s.emitChange()}});return s})});function Bf(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 Si(e,t){return()=>o("svg",{className:oe(qe("button-icon"),qe(t)),height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":t,focusable:!1},o("path",{d:e}))}function Us(e){return o("button",{className:qe("button"),...e},e.children)}function xN({name:e,path:t}){let n=`spotify-copy-${e}`,r=`spotify-open-${e}`;return o(G.Menu,{navId:`spotify-${e}-menu`,onClose:()=>F.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":`Spotify ${e} Menu`},o(G.MenuItem,{key:n,id:n,label:`Copy ${e} Link`,action:()=>fn("https://open.spotify.com"+t),icon:Qr}),o(G.MenuItem,{key:r,id:r,label:`Open ${e} in Spotify`,action:()=>$e.openExternal(t),icon:Qi}))}function wN(e,t){return n=>pn.openContextMenu(n,()=>o(xN,{name:e,path:t}))}function MN(){let[e,t,n]=He([$e],()=>[$e.isPlaying,$e.shuffle,$e.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(ge,{className:qe("button-row"),style:{gap:0}},o(Us,{className:oe(qe("button"),qe(t?"shuffle-on":"shuffle-off")),onClick:()=>$e.setShuffle(!t)},o(TN,null)),o(Us,{onClick:()=>$e.prev()},o(vN,null)),o(Us,{onClick:()=>$e.setPlaying(!e)},e?o(yN,null):o(hN,null)),o(Us,{onClick:()=>$e.next()},o(SN,null)),o(Us,{className:oe(qe("button"),qe(i)),onClick:()=>$e.setRepeat(r),style:{position:"relative"}},n==="track"&&o("span",{className:qe("repeat-1")},"1"),o(bN,null)))}function IN(){let{duration:e}=$e.track,[t,n,r]=He([$e],()=>[$e.mPosition,$e.isSettingPosition,$e.isPlaying]),[i,s]=J(t);return De(()=>{if(r&&!n){s($e.position);let l=setInterval(()=>{s(c=>c+1e3)},1e3);return()=>clearInterval(l)}},[t,n,r]),o("div",{id:qe("progress-bar")},o(S.FormText,{variant:"text-xs/medium",className:qe("progress-time")+" "+qe("time-left"),"aria-label":"Progress"},Bf(i)),o(G.MenuSliderControl,{minValue:0,maxValue:e,value:i,onChange:l=>{n||(s(l),PN(l))},renderValue:Bf}),o(S.FormText,{variant:"text-xs/medium",className:qe("progress-time")+" "+qe("time-right"),"aria-label":"Total Duration"},Bf(e)))}function AN({track:e}){let t=He([$e],()=>$e.volume);return o(G.Menu,{navId:"spotify-album-menu",onClose:()=>F.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Spotify Album Menu"},o(G.MenuItem,{key:"open-album",id:"open-album",label:"Open Album",action:()=>$e.openExternal(`/album/${e.album.id}`),icon:Qi}),o(G.MenuItem,{key:"view-cover",id:"view-cover",label:"View Album Cover",action:()=>En(e.album.image.url),icon:Sr}),o(G.MenuControlItem,{id:"spotify-volume",key:"spotify-volume",label:"Volume",control:(n,r)=>o(G.MenuSliderControl,{...n,ref:r,value:t,minValue:0,maxValue:100,onChange:hn(i=>$e.setVolume(i))})}))}function Ff(e,t,n){return t?{role:"link",onClick:()=>$e.openExternal(n),onContextMenu:wN(e,n)}:{}}function CN({track:e}){let t=e?.album?.image,[n,r]=J(!1),i=o(f,null,t&&o("img",{id:qe("album-image"),src:t.url,alt:"Album Image",onClick:()=>r(!n),onContextMenu:s=>{pn.openContextMenu(s,()=>o(AN,{track:e}))}}));return n&&t?o("div",{id:qe("album-expanded-wrapper")},i):o("div",{id:qe("info-wrapper")},i,o("div",{id:qe("titles")},o(S.FormText,{variant:"text-sm/semibold",id:qe("song-title"),className:qe("ellipoverflow"),title:e.name,...Ff("Song",e.id,`/track/${e.id}`)},e.name),e.artists.some(s=>s.name)&&o(S.FormText,{variant:"text-sm/normal",className:qe("ellipoverflow")},"by\xA0",e.artists.map((s,l)=>o(O.Fragment,{key:s.name},o("span",{className:qe("artist"),style:{fontSize:"inherit"},title:s.name,...Ff("Artist",s.id,`/artist/${s.id}`)},s.name),l!==e.artists.length-1&&o("span",{className:qe("comma")},", ")))),e.album.name&&o(S.FormText,{variant:"text-sm/normal",className:qe("ellipoverflow")},"on\xA0",o("span",{id:qe("album-title"),className:qe("album"),style:{fontSize:"inherit"},title:e.album.name,...Ff("Album",e.album.id,`/album/${e.album.id}`)},e.album.name))))}function bx(){let e=He([$e],()=>$e.track,null,(s,l)=>s?.id?s.id===l?.id:s?.name===l?.name),t=He([$e],()=>$e.device,null,(s,l)=>s?.id===l?.id),n=He([$e],()=>$e.isPlaying),[r,i]=J(!1);return O.useEffect(()=>{if(i(!1),!n){let s=setTimeout(()=>i(!0),3e5);return()=>clearTimeout(s)}},[n]),!e||!t?.is_active||r?null:o(_,{fallback:()=>o("div",{className:"vc-spotify-fallback"},o("p",null,"Failed to render Spotify Modal :("),o("p",null,"Check the console for errors"))},o("div",{id:qe("player")},o(CN,{track:e}),o(IN,null),o(MN,null)))}var qe,hN,yN,vN,SN,bN,TN,PN,Tx=g(()=>{"use strict";a();vx();le();Rt();Ut();jr();St();Re();I();Sx();qe=e=>`vc-spotify-${e}`;hN=Si("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"),yN=Si("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"),vN=Si("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"),SN=Si("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"),bN=Si("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"),TN=Si("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");PN=hn(e=>{$e.seek(e)})});function xx(e){(e?vt:Bt)(hx)}var Uf,wx=g(()=>{"use strict";a();U();Je();M();w();yx();Tx();Uf=y({name:"SpotifyControls",description:"Adds a Spotify player above the account panel",authors:[p.Ven,p.afn,p.KraXen72],options:{hoverControls:{description:"Show controls on hover",type:3,default:!1,onChange:e=>xx(e)},useSpotifyUris:{type:3,description:"Open Spotify URIs instead of Spotify URLs. Will only work if you have Spotify installed and might not work on all platforms",default:!1}},patches:[{find:"showTaglessAccountPanel:",replacement:{match:/return ?(.{0,30}\(.{1,3},\{[^}]+?,showTaglessAccountPanel:.+?\}\))/,replace:"return [$self.renderPlayer(),$1]"}},{find:".PLAYER_DEVICES",replacement:{match:/get:(\i)\.bind\(null,(\i\.\i)\.get\)/,replace:"post:$1.bind(null,$2.post),$&"}},{find:'repeat:"off"!==',replacement:{match:/repeat:"off"!==(.{1,3}),/,replace:"actual_repeat:$1,$&"}}],start:()=>xx(E.plugins.SpotifyControls.hoverControls),renderPlayer:()=>o(bx,null)})});var $f,Gf,Mx=g(()=>{"use strict";a();U();M();w();$f=D({noSpotifyAutoPause:{description:"Disable Spotify auto-pause",type:3,default:!0,restartNeeded:!0},keepSpotifyActivityOnIdle:{description:"Keep Spotify activity playing when idling",type:3,default:!1,restartNeeded:!0}}),Gf=y({name:"SpotifyCrack",description:"Free listen along, no auto-pausing in voice chat, and allows activity to continue playing when idling",authors:[p.Cyn,p.Nuckyz],settings:$f,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:()=>$f.store.noSpotifyAutoPause,match:/(?<=function \i\(\){)(?=.{0,200}SPOTIFY_AUTO_PAUSED\))/,replace:"return;"},{predicate:()=>$f.store.keepSpotifyActivityOnIdle,match:/(?<=shouldShowActivity\(\){.{0,50})&&!\i\.\i\.isIdle\(\)/,replace:""}]}]})});function zf(e,t){t={invalidEmojis:[],tts:!1,validNonShortcutEmojis:[],...t};let n=NN.getPendingReply(e);Px.sendMessage(e,t,void 0,Px.getSendMessageOptionsForReply(n)).then(()=>{n&&F.dispatch({type:"DELETE_PENDING_REPLY",channelId:e})})}var Hf,Px,NN,jf,Ix=g(()=>{"use strict";a();Jt();M();w();j();I();Hf=A("getPlayerState"),Px=A("getSendMessageOptionsForReply","sendMessage"),NN=A("getPendingReply");jf=y({name:"SpotifyShareCommands",description:"Share your current Spotify track, album or artist via slash command (/track, /album, /artist)",authors:[p.katlyn],dependencies:["CommandsAPI"],commands:[{name:"track",description:"Send your current Spotify track to chat",inputType:0,options:[],execute:(e,t)=>{let n=Hf.getTrack();if(n===null){ue(t.channel.id,{content:"You're not listening to any music."});return}zf(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=Hf.getTrack();if(n===null){ue(t.channel.id,{content:"You're not listening to any music."});return}zf(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=Hf.getTrack();if(n===null){ue(t.channel.id,{content:"You're not listening to any music."});return}zf(t.channel.id,{content:n.artists[0].external_urls.spotify})}}]})});var Ax={};Be(Ax,{default:()=>DN});function kN({emoji:e,prefix:t,log:n,delta:r,instance:i}){return o(O.Fragment,null,o("span",null,i.sinceStart.toFixed(3),"s"),o("span",null,i.sinceLast.toFixed(3),"s"),o("span",null,r?.toFixed(0)??""),o("span",null,o("pre",null,e," ",t??" ",n)))}function RN({title:e,logs:t,traceEnd:n}){let r=t.find(l=>l.timestamp)?.timestamp??0,i=r,s=t.map(l=>{let c=l.timestamp??i,u=(c-r)/1e3,d=(c-i)/1e3;return i=c,{sinceStart:u,sinceLast:d}});return o(S.FormSection,{title:e,tag:"h1"},o("code",null,n&&o("div",{style:{color:"var(--header-primary)",marginBottom:5,userSelect:"text"}},"Trace ended at: ",new Date(n).toTimeString()),o("div",{style:{color:"var(--header-primary)",display:"grid",gridTemplateColumns:"repeat(3, auto) 1fr",gap:"2px 10px",userSelect:"text"}},o("span",null,"Start"),o("span",null,"Interval"),o("span",null,"Delta"),o("span",{style:{marginBottom:5}},"Event"),$s.logs.map((l,c)=>o(kN,{key:c,...l,instance:s[c]})))))}function LN({trace:e}){let t=e.split(`
|
|
`);return o(S.FormSection,{title:"Server Trace",tag:"h2"},o("code",null,o(ge,{flexDirection:"column",style:{color:"var(--header-primary)",gap:5,userSelect:"text"}},t.map(n=>o("span",null,n)))))}function EN(){if(!$s?.logs)return o("div",null,"Loading...");let e=$s.logGroups.find(t=>t.serverTrace)?.serverTrace;return o(O.Fragment,null,o(RN,{title:"Startup Timings",logs:$s.logs,traceEnd:$s.endTime_}),o("div",{style:{marginTop:5}},"\xA0"),e&&o(LN,{trace:e}))}var $s,DN,Cx=g(()=>{"use strict";a();le();Rt();j();I();$s=A("markWithDelta","markAndLog","markAt");DN=_.wrap(EN)});var Wf,Nx=g(()=>{"use strict";a();M();st();w();Wf=y({name:"StartupTimings",description:"Adds Startup Timings to the Settings menu",authors:[p.Megu],patches:[{find:"UserSettingsSections.PAYMENT_FLOW_MODAL_TEST_PAGE,",replacement:{match:/{section:\i\.UserSettingsSections\.PAYMENT_FLOW_MODAL_TEST_PAGE/,replace:'{section:"StartupTimings",label:"Startup Timings",element:$self.StartupTimingPage},$&'}}],StartupTimingPage:ht(()=>(Cx(),To(Ax)).default)})});var qf,Kf,kx=g(()=>{"use strict";a();U();M();w();qf=D({superReactByDefault:{type:3,description:"Reaction picker will default to Super Reactions",default:!0},unlimitedSuperReactionPlaying:{type:3,description:"Remove the limit on Super Reactions playing at once",default:!1},superReactionPlayingLimit:{description:"Max Super Reactions to play at once",type:5,default:20,markers:[5,10,20,40,60,80,100],stickToMarkers:!0}},{superReactionPlayingLimit:{disabled(){return this.store.unlimitedSuperReactionPlaying}}}),Kf=y({name:"SuperReactionTweaks",description:"Customize the limit of Super Reactions playing at once, and super react by default",authors:[p.FieryFlames,p.ant0n],patches:[{find:",BURST_REACTION_EFFECT_PLAY",replacement:{match:/(?<=BURST_REACTION_EFFECT_PLAY:\i=>{.{50,100})(\i\(\i,\i\))>=\d+/,replace:"!$self.shouldPlayBurstReaction($1)"}},{find:".hasAvailableBurstCurrency)",replacement:{match:/(?<=\.useBurstReactionsExperiment.{0,20})useState\(!1\)(?=.+?(\i===\i\.EmojiIntention.REACTION))/,replace:"useState($self.settings.store.superReactByDefault && $1)"}}],settings:qf,shouldPlayBurstReaction(e){return!!(qf.store.unlimitedSuperReactionPlaying||e<=qf.store.superReactionPlayingLimit)}})});function Ox(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 _N(e){try{return Ox(e),null}catch(t){return o("span",{style:{color:"var(--text-danger)"}},String(t))}}function Yf({initialValue:e,onChange:t,placeholder:n}){let[r,i]=J(e);return o(Qe,{placeholder:n,value:r,onChange:i,spellCheck:!1,onBlur:()=>r!==e&&t(r)})}function Rx({title:e,rulesArray:t,rulesKey:n,update:r}){let i=e==="Using Regex";async function s(c){c!==t.length-1&&(t.splice(c,1),await $t.set(n,t),r())}async function l(c,u,d){u===t.length-1&&t.push(Dx()),t[u][d]=c,t[u].find===""&&t[u].replace===""&&t[u].onlyIfIncludes===""&&u!==t.length-1&&t.splice(u,1),await $t.set(n,t),r()}return o(f,null,o(S.FormTitle,{tag:"h4"},e),o(ge,{flexDirection:"column",style:{gap:"0.5em"}},t.map((c,u)=>o(O.Fragment,{key:`${c.find}-${u}`},o(ge,{flexDirection:"row",style:{gap:0}},o(ge,{flexDirection:"row",style:{flexGrow:1,gap:"0.5em"}},o(Yf,{placeholder:"Find",initialValue:c.find,onChange:d=>l(d,u,"find")}),o(Yf,{placeholder:"Replace",initialValue:c.replace,onChange:d=>l(d,u,"replace")}),o(Yf,{placeholder:"Only if includes",initialValue:c.onlyIfIncludes,onChange:d=>l(d,u,"onlyIfIncludes")})),o(R,{size:R.Sizes.MIN,onClick:()=>s(u),style:{background:"none",color:"var(--status-danger)",...u===t.length-1?{visibility:"hidden",pointerEvents:"none"}:{}}},o(xy,null))),i&&_N(c.find)))))}function BN(){let[e,t]=J("");return o(f,null,o(S.FormTitle,{tag:"h4"},"Test Rules"),o(Qe,{placeholder:"Type a message",onChange:t}),o(Qe,{placeholder:"Message with rules applied",editable:!1,value:_x(e)}))}function _x(e){if(e.length===0)return e;if(Hl)for(let t of Hl)!t.find||!t.replace||t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)||(e=` ${e} `.replaceAll(t.find,t.replace.replaceAll("\\n",`
|
|
`)).replace(/^\s|\s$/g,""));if(zl){for(let t of zl)if(!(!t.find||!t.replace)&&!(t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)))try{let n=Ox(t.find);e=e.replace(n,t.replace.replaceAll("\\n",`
|
|
`))}catch{new ie("TextReplace").error(`Invalid regex: ${t.find}`)}}return e=e.trim(),e}var Lx,Ex,Dx,Gl,Hl,zl,ON,FN,Zf,Bx=g(()=>{"use strict";a();cs();Kn();U();Rt();Ut();M();Ze();st();w();I();Lx="TextReplace_rulesString",Ex="TextReplace_rulesRegex",Dx=()=>({find:"",replace:"",onlyIfIncludes:""}),Gl=()=>[Dx()],Hl=Gl(),zl=Gl(),ON=D({replace:{type:6,description:"",component:()=>{let e=Po();return o(f,null,o(Rx,{title:"Using String",rulesArray:Hl,rulesKey:Lx,update:e}),o(Rx,{title:"Using Regex",rulesArray:zl,rulesKey:Ex,update:e}),o(BN,null))}}});FN="1102784112584040479",Zf=y({name:"TextReplace",description:"Replace text in your messages. You can find pre-made rules in the #textreplace-rules channel in Vencord's Server",authors:[p.AutumnVN,p.TheKodeToad],dependencies:["MessageEventsAPI"],settings:ON,async start(){Hl=await $t.get(Lx)??Gl(),zl=await $t.get(Ex)??Gl(),this.preSend=Gt((e,t)=>{e!==FN&&(t.content=_x(t.content))})},stop(){Ht(this.preSend)}})});var Xf,Fx=g(()=>{"use strict";a();M();w();I();Xf=y({name:"ThemeAttributes",description:"Adds data attributes to various elements for theming purposes",authors:[p.Ven],patches:[{find:".tabBarRef",replacement:{match:/style:this\.getStyle\(\),role:"tab"/,replace:"$&,'data-tab-id':this.props.id"}},{find:".messageListItem",replacement:{match:/\.messageListItem(?=,"aria)/,replace:"$&,...$self.getMessageProps(arguments[0])"}}],getMessageProps(e){let t=e.message?.author?.id;return{"data-author-id":t,"data-is-self":t&&t===W.getCurrentUser()?.id}}})});var Jf,Ux=g(()=>{"use strict";a();M();w();Jf=y({name:"TimeBarAllActivities",description:"Adds the Spotify time bar to all activities if they have start and end timestamps",authors:[p.obscurity],patches:[{find:"}renderTimeBar(",replacement:{match:/renderTimeBar\((.{1,3})\){.{0,50}?let/,replace:"renderTimeBar($1){let"}}]})});var $x=g(()=>{});var Et,Gs=g(()=>{"use strict";a();U();w();Et=D({receivedInput:{type:0,description:"Input language for received messages",default:"auto",hidden:!0},receivedOutput:{type:0,description:"Output language for received messages",default:"en",hidden:!0},sentInput:{type:0,description:"Input language for sent messages",default:"auto",hidden:!0},sentOutput:{type:0,description:"Output language for sent messages",default:"en",hidden:!0},autoTranslate:{type:3,description:"Automatically translate your messages before sending. You can also shift/right click the translate button to toggle this",default:!1}})});var jl,Qf=g(()=>{"use strict";a();jl={auto:"Detect language",af:"Afrikaans",sq:"Albanian",am:"Amharic",ar:"Arabic",hy:"Armenian",as:"Assamese",ay:"Aymara",az:"Azerbaijani",bm:"Bambara",eu:"Basque",be:"Belarusian",bn:"Bengali",bho:"Bhojpuri",bs:"Bosnian",bg:"Bulgarian",ca:"Catalan",ceb:"Cebuano",ny:"Chichewa","zh-CN":"Chinese (Simplified)","zh-TW":"Chinese (Traditional)",co:"Corsican",hr:"Croatian",cs:"Czech",da:"Danish",dv:"Dhivehi",doi:"Dogri",nl:"Dutch",en:"English",eo:"Esperanto",et:"Estonian",ee:"Ewe",tl:"Filipino",fi:"Finnish",fr:"French",fy:"Frisian",gl:"Galician",ka:"Georgian",de:"German",el:"Greek",gn:"Guarani",gu:"Gujarati",ht:"Haitian Creole",ha:"Hausa",haw:"Hawaiian",iw:"Hebrew",hi:"Hindi",hmn:"Hmong",hu:"Hungarian",is:"Icelandic",ig:"Igbo",ilo:"Ilocano",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",jw:"Javanese",kn:"Kannada",kk:"Kazakh",km:"Khmer",rw:"Kinyarwanda",gom:"Konkani",ko:"Korean",kri:"Krio",ku:"Kurdish (Kurmanji)",ckb:"Kurdish (Sorani)",ky:"Kyrgyz",lo:"Lao",la:"Latin",lv:"Latvian",ln:"Lingala",lt:"Lithuanian",lg:"Luganda",lb:"Luxembourgish",mk:"Macedonian",mai:"Maithili",mg:"Malagasy",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi","mni-Mtei":"Meiteilon (Manipuri)",lus:"Mizo",mn:"Mongolian",my:"Myanmar (Burmese)",ne:"Nepali",no:"Norwegian",or:"Odia (Oriya)",om:"Oromo",ps:"Pashto",fa:"Persian",pl:"Polish",pt:"Portuguese",pa:"Punjabi",qu:"Quechua",ro:"Romanian",ru:"Russian",sm:"Samoan",sa:"Sanskrit",gd:"Scots Gaelic",nso:"Sepedi",sr:"Serbian",st:"Sesotho",sn:"Shona",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",so:"Somali",es:"Spanish",su:"Sundanese",sw:"Swahili",sv:"Swedish",tg:"Tajik",ta:"Tamil",tt:"Tatar",te:"Telugu",th:"Thai",ti:"Tigrinya",ts:"Tsonga",tr:"Turkish",tk:"Turkmen",ak:"Twi",uk:"Ukrainian",ur:"Urdu",ug:"Uyghur",uz:"Uzbek",vi:"Vietnamese",cy:"Welsh",xh:"Xhosa",yi:"Yiddish",yo:"Yoruba",zu:"Zulu"}});async function Hs(e,t){let n=Et.store[e+"Input"],r=Et.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 yo,zs=g(()=>{"use strict";a();Je();Gs();yo=Ue("vc-trans-")});function $N({settingsKey:e,includeAuto:t}){let n=Et.use([e])[e],r=At(()=>{let i=Object.entries(jl).map(([s,l])=>({value:s,label:l}));return t||i.shift(),i},[]);return o("section",{className:q.bottom16},o(S.FormTitle,{tag:"h3"},Et.def[e].description),o(ta,{options:r,value:r.find(i=>i.value===n),placeholder:"Select a language",maxVisibleItems:5,closeOnSelect:!0,onChange:i=>Et.store[e]=i}))}function GN(){let e=Et.use(["autoTranslate"]).autoTranslate;return o(ut,{value:e,onChange:t=>Et.store.autoTranslate=t,note:Et.def.autoTranslate.description,hideBorder:!0},"Auto Translate")}function Gx({rootProps:e}){return o(ze,{...e},o(at,{className:yo("modal-header")},o(S.FormTitle,{tag:"h2"},"Translate"),o(ln,{onClick:e.onClose})),o(Ve,{className:yo("modal-content")},UN.map(t=>o($N,{key:t,settingsKey:t,includeAuto:t.endsWith("Input")})),o(S.FormDivider,{className:q.bottom16}),o(GN,null)))}var UN,Hx=g(()=>{"use strict";a();it();pt();I();Qf();Gs();zs();UN=["receivedInput","receivedOutput","sentInput","sentOutput"]});function bi({height:e=24,width:t=24,className:n}){return o("svg",{viewBox:"0 96 960 960",height:e,width:t,className:oe(yo("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 zx({slateProps:e}){let{autoTranslate:t}=Et.use(["autoTranslate"]);if(e.type.analyticsName!=="normal")return null;let n=()=>Et.store.autoTranslate=!t;return o(V,{text:"Open Translate Modal"},({onMouseEnter:r,onMouseLeave:i})=>o("div",{style:{display:"flex"}},o(R,{"aria-haspopup":"dialog","aria-label":"Open Translate Modal",size:"",look:qt.BLANK,onMouseEnter:r,onMouseLeave:i,innerClassName:yt.button,onClick:s=>{if(s.shiftKey)return n();je(l=>o(Gx,{rootProps:l}))},onContextMenu:()=>n(),style:{padding:"0 4px"}},o("div",{className:yt.buttonWrapper},o(bi,{className:yo({"auto-translate":t})})))))}var Vf=g(()=>{"use strict";a();Re();pt();I();Gs();Hx();zs()});function tg(e,t){eg.get(e)(t)}function HN({onDismiss:e}){return o("button",{onClick:e,className:yo("dismiss")},"Dismiss")}function jx({message:e}){let[t,n]=J();return De(()=>{if(!e.vencordEmbeddedBy)return eg.set(e.id,n),()=>void eg.delete(e.id)},[]),t?o("span",{className:yo("accessory")},o(bi,{width:16,height:16}),Fe.parse(t.text)," ","(translated from ",jl[t.src]??t.src," - ",o(HN,{onDismiss:()=>n(void 0)}),")"):null}var eg,Wx=g(()=>{"use strict";a();I();Qf();Vf();zs();eg=new Map});var qx,ng,Kx=g(()=>{"use strict";a();$x();Mt();rl();Kn();Ar();le();M();w();I();Gs();Vf();Wx();zs();qx=(e,{message:t})=>()=>{if(!t.content)return;let n=dt("copy-text",e);!n||n.splice(n.findIndex(r=>r?.props?.id==="copy-text")+1,0,o(G.MenuItem,{id:"vc-trans",label:"Translate",icon:bi,action:async()=>{let r=await Hs("received",t.content);tg(t.id,r)}}))},ng=y({name:"Translate",description:"Translate messages with Google Translate",authors:[p.Ven],dependencies:["MessageAccessoriesAPI","MessagePopoverAPI","MessageEventsAPI"],settings:Et,translate:Hs,patches:[{find:"ChannelTextAreaButtons",replacement:{match:/(\i)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&,(()=>{try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}})()"}}],start(){Ts("vc-translation",e=>o(jx,{message:e.message})),ce("message",qx),On("vc-translate",e=>e.content?{label:"Translate",icon:bi,message:e,channel:Q.getChannel(e.channel_id),onClick:async()=>{let t=await Hs("received",e.content);tg(e.id,t)}}:null),this.preSend=Gt(async(e,t)=>{!Et.store.autoTranslate||!t.content||(t.content=(await Hs("sent",t.content)).text)})},stop(){Ht(this.preSend),de("message",qx),_n("vc-translate"),bd("vc-translation")},chatBarIcon:e=>o(_,{noop:!0},o(zx,{slateProps:e}))})});function og({a:e,b:t,count:n}){return[o("strong",{key:"0"},e),", ",o("strong",{key:"1"},t),`, and ${n} others are typing...`]}var Wl,zN,rg,ig=g(()=>{"use strict";a();U();le();M();St();w();I();Wl=D({showAvatars:{type:3,default:!0,description:"Show avatars in the typing indicator"},showRoleColors:{type:3,default:!0,description:"Show role colors in the typing indicator"},alternativeFormatting:{type:3,default:!0,description:"Show a more useful message when several users are typing"}});zN=_.wrap(function({user:e,guildId:t}){return o("strong",{role:"button",onClick:()=>{Dn(e.id)},style:{display:"grid",gridAutoFlow:"column",gap:"4px",color:Wl.store.showRoleColors?ke.getMember(t,e.id)?.colorString:void 0,cursor:"pointer"}},Wl.store.showAvatars&&o("div",{style:{marginTop:"4px"}},o(_r,{size:"SIZE_16",src:e.getAvatarURL(t,128)})),ke.getNick(t,e.id)||!t&&et.getNickname(e.id)||e.globalName||e.username)},{noop:!0}),rg=y({name:"TypingTweaks",description:"Show avatars and role colours in the typing indicator",authors:[p.zt],patches:[{find:"getCooldownTextStyle",replacement:{match:/(?<=children:\[(\i)\.length>0.{0,200}?"aria-atomic":!0,children:)\i/,replace:"$self.mutateChildren(this.props, $1, $&), style: $self.TYPING_TEXT_STYLE"}},{find:"getCooldownTextStyle",replacement:{match:/(?<=map\(\i=>)\i\.\i\.getName\(\i,this\.props\.channel\.id,(\i)\)/,replace:"$1"}},{find:"getCooldownTextStyle",replacement:{match:/(?<=(\i)\.length\?\i.\i\.Messages.THREE_USERS_TYPING\.format\({\i:(\i),(?:\i:)?(\i),\i:\i}\):)\i\.\i\.Messages\.SEVERAL_USERS_TYPING/,replace:(e,t,n,r)=>`$self.buildSeveralUsers({ a: ${n}, b: ${r}, count: ${t}.length - 2 })`},predicate:()=>Wl.store.alternativeFormatting}],settings:Wl,TYPING_TEXT_STYLE:{display:"grid",gridAutoFlow:"column",gridGap:"0.25em"},buildSeveralUsers:og,mutateChildren(e,t,n){if(!Array.isArray(n))return n;let r=0;return n.map(i=>i.type==="strong"?o(zN,{...e,user:t[r++]}):i)}})});function Jo(e,t){let n=W.getUser(t);return ke.getNick(e,t)??n.globalName??n.username}function qN({channelId:e}){let t=He([Yx],()=>({...Yx.getTypingUsers(e)}),null,(l,c)=>{let u=Object.keys(l),d=Object.keys(c);return u.length===d.length&&d.every(m=>l[m]!=null)}),n=Q.getChannel(e).guild_id;if(!sg.store.includeMutedChannels&&WN.isChannelMuted(n,e))return null;let r=W.getCurrentUser()?.id,i=Object.keys(t).filter(l=>l!==r&&!(et.isBlocked(l)&&!sg.store.includeBlockedUsers)),s;switch(i.length){case 0:break;case 1:{s=tt.Messages.ONE_USER_TYPING.format({a:Jo(n,i[0])});break}case 2:{s=tt.Messages.TWO_USERS_TYPING.format({a:Jo(n,i[0]),b:Jo(n,i[1])});break}case 3:{s=tt.Messages.THREE_USERS_TYPING.format({a:Jo(n,i[0]),b:Jo(n,i[1]),c:Jo(n,i[2])});break}default:{s=E.plugins.TypingTweaks.enabled?og({a:Jo(n,i[0]),b:Jo(n,i[1]),count:i.length-2}):tt.Messages.SEVERAL_USERS_TYPING;break}}return i.length>0?o(V,{text:s},l=>o("div",{...l,style:{marginLeft:6,height:16,display:"flex",alignItems:"center",zIndex:0,cursor:"pointer"}},o(jN,{dotRadius:3,themed:!0}))):null}var jN,Yx,WN,sg,ag,Zx=g(()=>{"use strict";a();U();le();M();w();j();I();ig();jN=Ii(()=>tn(t=>t.Dots&&!t.Menu)?.Dots),Yx=Me("TypingStore"),WN=Me("UserGuildSettingsStore");sg=D({includeMutedChannels:{type:3,description:"Whether to show the typing indicator for muted channels.",default:!1},includeBlockedUsers:{type:3,description:"Whether to show the typing indicator for blocked users.",default:!1}}),ag=y({name:"TypingIndicator",description:"Adds an indicator if someone is typing on a channel.",authors:[p.Nuckyz,p.obscurity],settings:sg,patches:[{find:"UNREAD_IMPORTANT:",replacement:{match:/channel:(\i).{0,100}?channelEmoji,.{0,250}?\.children.{0,50}?:null/,replace:"$&,$self.TypingIndicator($1.id)"}},{find:"M11 9H4C2.89543 9 2 8.10457 2 7V1C2 0.447715 1.55228 0 1 0C0.447715 0 0 0.447715 0 1V7C0 9.20914 1.79086 11 4 11H11C11.5523 11 12 10.5523 12 10C12 9.44771 11.5523 9 11 9Z",replacement:{match:/mentionsCount:\i.+?null(?<=channel:(\i).+?)/,replace:"$&,$self.TypingIndicator($1.id)"}}],TypingIndicator:e=>o(_,{noop:!0},o(qN,{channelId:e}))})});var lg,Xx=g(()=>{"use strict";a();Kn();M();w();lg=y({name:"Unindent",description:"Trims leading indentation from codeblocks",authors:[p.Ven],dependencies:["MessageEventsAPI"],patches:[{find:"inQuote:",replacement:{match:/,content:([^,]+),inQuote/,replace:(e,t)=>`,content:Vencord.Plugins.plugins.Unindent.unindent(${t}),inQuote`}}],unindent(e){e=e.replace(/\t/g," ");let t=e.match(/^ *(?=\S)/gm)?.reduce((n,r)=>Math.min(n,r.length),1/0)??0;return t?e.replace(new RegExp(`^ {${t}}`,"gm"),""):e},unindentMsg(e){e.content=e.content.replace(/```(.|\n)*?```/g,t=>{let n=t.split(`
|
|
`);if(n.length<2)return t;let r="";return n[n.length-1]==="```"&&(r=n.pop()),`${n[0]}
|
|
${this.unindent(n.slice(1).join(`
|
|
`))}
|
|
${r}`})},start(){this.preSend=Gt((e,t)=>this.unindentMsg(t)),this.preEdit=Tr((e,t,n)=>this.unindentMsg(n))},stop(){Ht(this.preSend),xr(this.preEdit)}})});var cg,Jx,ug,Qx=g(()=>{"use strict";a();Mt();Ut();M();w();I();cg=1<<2,Jx=(e,{channel:t,message:{author:n,embeds:r,flags:i,id:s}})=>()=>{let l=(i&cg)!==0;if(!l&&!r.length)return;let c=t.isPrivate()||!!(Ne.getChannelPermissions({id:t.id})&Se.EMBED_LINKS);if(n.id===W.getCurrentUser().id&&!c)return;let u=dt("delete",e),d=u?.findIndex(m=>m?.props?.id==="delete");!d||!u||u.splice(d-1,0,o(G.MenuItem,{id:"unsuppress-embeds",key:"unsuppress-embeds",label:l?"Unsuppress Embeds":"Suppress Embeds",color:l?void 0:"danger",icon:l?Na:ka,action:()=>wt.patch({url:`/channels/${t.id}/messages/${s}`,body:{flags:l?i&~cg:i|cg}})}))},ug=y({name:"UnsuppressEmbeds",authors:[p.rad,p.HypedDomi],description:"Allows you to unsuppress embeds in messages",start(){ce("message",Jx)},stop(){de("message",Jx)}})});var pg,Vx=g(()=>{"use strict";a();Jt();Ra();M();w();pg=y({name:"UrbanDictionary",description:"Search for a word on Urban Dictionary via /urban slash command",authors:[p.jewdev],dependencies:["CommandsAPI"],commands:[{name:"urban",description:"Returns the definition of a word from Urban Dictionary",inputType:0,options:[{type:3,name:"word",description:"The word to search for on Urban Dictionary",required:!0}],execute:async(e,t)=>{try{let n=encodeURIComponent(e[0].value),{list:[r]}=await(await fetch(`https://api.urbandictionary.com/v0/define?term=${n}`)).json();if(!r)return void ue(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 ue(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){ue(t.channel.id,{content:`Something went wrong: \`${n}\``})}}}]})});var e2=g(()=>{});var KN,YN,ZN,t2,n2=g(()=>{"use strict";a();e2();j();I();KN=A("selectChannel","selectVoiceChannel"),YN=Ai(".lastSection","children:"),ZN=1n<<20n,t2=({channel:e,label:t,showHeader:n})=>o(YN,null,n&&o(S.FormTitle,{className:"vc-uvs-header"},"In a voice channel"),o(R,{className:"vc-uvs-button",color:R.Colors.TRANSPARENT,size:R.Sizes.SMALL,onClick:()=>{Ne.can(ZN,e)?KN.selectVoiceChannel(e.id):ee.show({message:"Insufficient permissions to enter the channel.",id:"user-voice-show-insufficient-permissions",type:ee.Type.FAILURE,options:{position:ee.Position.BOTTOM}})}},t))});var XN,dg,o2,mg,r2=g(()=>{"use strict";a();U();le();M();w();j();I();n2();XN=Me("VoiceStateStore"),dg=D({showInUserProfileModal:{type:3,description:"Show a user's voice channel in their profile modal",default:!0},showVoiceChannelSectionHeader:{type:3,description:'Whether to show "IN A VOICE CHANNEL" above the join button',default:!0}}),o2=_.wrap(({user:e})=>{let{channelId:t}=XN.getVoiceStateForUser(e.id)??{};if(!t)return null;let n=Q.getChannel(t);if(!n)return null;let r=Te.getGuild(n.guild_id);if(!r)return null;let i=`${r.name} | ${n.name}`;return o(t2,{channel:n,label:i,showHeader:dg.store.showVoiceChannelSectionHeader})}),mg=y({name:"UserVoiceShow",description:"Shows whether a User is currently in a voice channel somewhere in their profile",authors:[p.LordElias],settings:dg,patchModal({user:e}){return dg.store.showInUserProfileModal?o("div",{className:"vc-uvs-modal-margin"},o(o2,{user:e})):null},patchPopout:({user:e})=>{let t=e.id===W.getCurrentUser().id;return o("div",{className:t?"vc-uvs-popout-margin-self":""},o(o2,{user:e}))},patches:[{find:".lastEditedByContainer",replacement:{match:/\(0,\i\.jsx\)\(\i\.\i,{user:\i,setNote/,replace:"$self.patchPopout(arguments[0]),$&"}},{find:".USER_PROFILE_MODAL",replacement:{match:/\.body.+?displayProfile:\i}\),/,replace:"$&$self.patchModal(arguments[0]),"}}]})});var i2,s2=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/usrbg/index.css",{name:"src/plugins/usrbg/index.css",source:`:is([class*="userProfile"], [class*="userPopout"]) [class*="bannerPremium"] {
|
|
background: center / cover no-repeat;
|
|
}
|
|
|
|
[class*="NonPremium"]:has([class*="bannerPremium"]) [class*="avatarPositionNormal"],
|
|
[class*="PremiumWithoutBanner"]:has([class*="bannerPremium"]) [class*="avatarPositionPremiumNoBanner"] {
|
|
top: 76px;
|
|
}
|
|
|
|
[style*="background-image"] [class*="background_"] {
|
|
background-color: transparent !important;
|
|
}
|
|
`,classNames:{},dom:null});i2="src/plugins/usrbg/index.css"});var JN,vo,ql,fg,a2=g(()=>{"use strict";a();U();Je();lo();M();w();s2();JN="https://raw.githubusercontent.com/AutumnVN/usrbg/main/usrbg.json",vo={},ql=D({nitroFirst:{description:"Banner to use if both Nitro and USRBG banners are present",type:4,options:[{label:"Nitro banner",value:!0,default:!0},{label:"USRBG banner",value:!1}]},voiceBackground:{description:"Use USRBG banners as voice chat backgrounds",type:3,default:!0,restartNeeded:!0}}),fg=y({name:"USRBG",description:"Displays user banners from USRBG, allowing anyone to get a banner without Nitro",authors:[p.AutumnVN,p.pylix,p.TheKodeToad],settings:ql,patches:[{find:".NITRO_BANNER,",replacement:[{match:/(\i)\.premiumType/,replace:"$self.premiumHook($1)||$&"},{match:/(?<=function \i\((\i)\)\{)(?=var.{30,50},bannerSrc:)/,replace:"$1.bannerSrc=$self.useBannerHook($1);"},{match:/\?\(0,\i\.jsx\)\(\i,{type:\i,shown/,replace:"&&$self.shouldShowBadge(arguments[0])$&"}]},{find:'"data-selenium-video-tile":',predicate:()=>ql.store.voiceBackground,replacement:[{match:/(?<=function\((\i),\i\)\{)(?=let.{20,40},style:)/,replace:"$1.style=$self.voiceBackgroundHook($1);"}]}],data:vo,settingsAboutComponent:()=>o(rt,{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&&ql.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]||ql.store.nitroFirst)},async start(){vt(i2);let e=await fetch(JN);e.ok&&(vo=await e.json(),this.data=vo)}})});function QN({data:e,UserMention:t,RoleMention:n,parse:r,props:i}){let[s,l]=J(e.userId);if(s)return o(t,{className:"mention",userId:s,channelId:e.channelId,inlinePreview:i.noStyleAndInteraction,key:i.key});let c=r(e.content,i);return o(n,{...e,inlinePreview:i.formatInline},o("span",{onMouseEnter:()=>{let u=c?.[0]?.props?.children;if(typeof u!="string")return;let d=u.match(/<@!?(\d+)>/)?.[1];if(!d||Kl.has(d))return;if(W.getUser(d))return l(d);let m=()=>{Kl.add(d),l2.unshift(()=>kt.getUser(d).then(()=>{l(d),Kl.delete(d)}).catch(h=>{h?.status===429&&(l2.unshift(()=>Mo(1e3).then(m)),Kl.delete(d))}).finally(()=>Mo(300)))};m()}},c))}var Kl,l2,gg,c2=g(()=>{"use strict";a();le();M();Re();Wr();w();I();Kl=new Set,l2=new Cn(5);gg=y({name:"ValidUser",description:"Fix mentions for unknown users showing up as '<@343383572805058560>' (hover over a mention to fix it)",authors:[p.Ven],tags:["MentionCacheFix"],patches:[{find:'className:"mention"',replacement:{match:/react(?=\(\i,\i,\i\).{0,50}return null==\i\?\(0,\i\.jsx\)\((\i\.\i),.+?jsx\)\((\i\.\i),\{className:"mention")/,replace:"react:(...args)=>$self.renderMention($1,$2,...args),originalReact"}}],renderMention(e,t,n,r,i){return o(_,{noop:!0},o(QN,{RoleMention:e,UserMention:t,data:n,parse:r,props:i}))}})});var hg,yg,u2=g(()=>{"use strict";a();M();w();I();hg={},yg=y({name:"VoiceChatDoubleClick",description:"Join voice chats via double click instead of single click",authors:[p.Ven,p.D3SOX],patches:[...[".handleVoiceStatusClick",".handleClickChat"].map(e=>({find:e,replacement:[{match:/onClick:\(\)=>\{this.handleClick\(\)/g,replace:"onClick:()=>{$self.schedule(()=>{this.handleClick()},this)"}]})),{find:".shouldCloseDefaultModals",replacement:{match:/onClick:(\i)(?=,.{0,30}className:"channelMention".+?(\i)\.inContent)/,replace:(e,t,n)=>`onClick:(vcDoubleClickEvt)=>$self.shouldRunOnClick(vcDoubleClickEvt,${n})&&${t}()`}}],shouldRunOnClick(e,{channelId:t}){let n=Q.getChannel(t);return!n||![2,13].includes(n.type)?!0:e.detail>=2},schedule(e,t){let n=t.props.channel.id;if(Pe.getVoiceChannelId()===n){e();return}let r=hg[n]??={timeout:void 0,i:0};clearTimeout(r.timeout),++r.i>=2?(e(),delete hg[n]):r.timeout=setTimeout(()=>{delete hg[n]},500)}})});function Zl(e,t=E.plugins.VcNarrator){if(!e)return;let n=new SpeechSynthesisUtterance(e),r=speechSynthesis.getVoices().find(i=>i.voiceURI===t.voice);!r&&(new ie("VcNarrator").error(`Voice "${t.voice}" not found. Resetting to default.`),r=speechSynthesis.getVoices().find(i=>i.default),t.voice=r?.voiceURI,!r)||(n.voice=r,n.volume=t.volume,n.rate=t.rate,speechSynthesis.speak(n))}function Yl(e){let t=E.plugins.VcNarrator.latinOnly?/[^\p{Script=Latin}\p{Number}\p{Punctuation}\s]/gu:/[^\p{Letter}\p{Number}\p{Punctuation}\s]/gu;return e.normalize("NFKC").replace(t,"").replace(/_{2,}/g,"_").trim()}function Xl(e,t,n,r,i){return e.replaceAll("{{USER}}",Yl(t)||(t?"Someone":"")).replaceAll("{{CHANNEL}}",Yl(n)||"channel").replaceAll("{{DISPLAY_NAME}}",Yl(r)||(r?"Someone":"")).replaceAll("{{NICKNAME}}",Yl(i)||(i?"Someone":""))}function VN({channelId:e,oldChannelId:t},n){if(n&&e!==vg&&(t=vg,vg=e),e!==t){if(e)return[t?"move":"join",e];if(t)return["leave",t]}return["",""]}function ek(e,t){let n=Object.assign({},E.plugins.VcNarrator,e),r=W.getCurrentUser(),i=rn.getGuildId();Zl(Xl(n[t+"Message"],r.username,"general",r.globalName??r.username,ke.getNick(i,r.id)??r.username),n)}var p2,vg,Sg,d2=g(()=>{"use strict";a();U();zr();M();Ze();it();ro();w();j();I();p2=A("getVoiceStatesForChannel","getCurrentClientVoiceChannelId");Sg=y({name:"VcNarrator",description:"Announces when users join, leave, or move voice channels via narrator",authors:[p.Ven],flux:{VOICE_STATE_UPDATES({voiceStates:e}){let t=rn.getGuildId(),n=Pe.getVoiceChannelId(),r=W.getCurrentUser().id;if(Q.getChannel(n)?.type!==13)for(let i of e){let{userId:s,channelId:l,oldChannelId:c}=i,u=s===r;if(!u&&(!n||l!==n&&c!==n))continue;let[d,m]=VN(i,u);if(!d)continue;let h=E.plugins.VcNarrator[d+"Message"],v=u&&!E.plugins.VcNarrator.sayOwnName?"":W.getUser(s).username,T=v&&(W.getUser(s).globalName??v),P=v&&(ke.getNick(t,s)??v),b=Q.getChannel(m).name;Zl(Xl(h,v,b,T,P))}},AUDIO_TOGGLE_SELF_MUTE(){let e=Pe.getVoiceChannelId(),t=p2.getVoiceStateForChannel(e);if(!t)return;let n=t.mute||t.selfMute?"unmute":"mute";Zl(Xl(E.plugins.VcNarrator[n+"Message"],"",Q.getChannel(e).name,"",""))},AUDIO_TOGGLE_SELF_DEAF(){let e=Pe.getVoiceChannelId(),t=p2.getVoiceStateForChannel(e);if(!t)return;let n=t.deaf||t.selfDeaf?"undeafen":"deafen";Zl(Xl(E.plugins.VcNarrator[n+"Message"],"",Q.getChannel(e).name,"",""))}},start(){if(typeof speechSynthesis>"u"||speechSynthesis.getVoices().length===0){new ie("VcNarrator").warn("SpeechSynthesis not supported or no Narrator voices found. Thus, this plugin will not work. Check my Settings for more info");return}},optionsCache:null,get options(){return this.optionsCache??={voice:{type:4,description:"Narrator Voice",options:window.speechSynthesis?.getVoices().map(e=>({label:e.name,value:e.voiceURI,default:e.default}))??[]},volume:{type:5,description:"Narrator Volume",default:1,markers:[0,.25,.5,.75,1],stickToMarkers:!1},rate:{type:5,description:"Narrator Speed",default:1,markers:[.1,.5,1,2,5,10],stickToMarkers:!1},sayOwnName:{description:"Say own name",type:3,default:!1},latinOnly:{description:"Strip non latin characters from names before saying them",type:3,default:!1},joinMessage:{type:0,description:"Join Message",default:"{{USER}} joined"},leaveMessage:{type:0,description:"Leave Message",default:"{{USER}} left"},moveMessage:{type:0,description:"Move Message",default:"{{USER}} moved to {{CHANNEL}}"},muteMessage:{type:0,description:"Mute Message (only self for now)",default:"{{USER}} Muted"},unmuteMessage:{type:0,description:"Unmute Message (only self for now)",default:"{{USER}} unmuted"},deafenMessage:{type:0,description:"Deafen Message (only self for now)",default:"{{USER}} deafened"},undeafenMessage:{type:0,description:"Undeafen Message (only self for now)",default:"{{USER}} undeafened"}}},settingsAboutComponent({tempSettings:e}){let[t,n]=At(()=>{let s=speechSynthesis.getVoices();return[s.length!==0,s.some(l=>l.lang.startsWith("en"))]},[]),r=At(()=>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(gn,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(gn,null,s)}return o(S.FormSection,null,o(S.FormText,null,"You can customise the spoken messages below. You can disable specific messages by setting them to nothing"),o(S.FormText,null,"The special placeholders ",o("code",null,"{{USER}}"),", ",o("code",null,"{{DISPLAY_NAME}}"),", ",o("code",null,"{{NICKNAME}}")," and ",o("code",null,"{{CHANNEL}}")," ","will be replaced with the user's name (nothing if it's yourself), the user's display name, the user's nickname on current server and the channel's name respectively"),n&&o(f,null,o(S.FormTitle,{className:q.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(R,{key:s,onClick:()=>ek(e,s)},oo([s]))))),i)}})});var m2=g(()=>{});function nk(e){let t=[];for(let n of Object.values(Vencord.Plugins.plugins))n.toolboxActions&&t.push(o(G.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(G.MenuItem,{id:s,key:s,label:r,action:i})})));return o(G.Menu,{navId:"vc-toolbox",onClose:e},o(G.MenuItem,{id:"vc-toolbox-notifications",label:"Open Notification Log",action:fa}),o(G.MenuCheckboxItem,{id:"vc-toolbox-quickcss-toggle",checked:E.useQuickCss,label:"Enable QuickCSS",action:()=>{E.useQuickCss=!E.useQuickCss,e()}}),o(G.MenuItem,{id:"vc-toolbox-quickcss",label:"Open QuickCSS",action:()=>VencordNative.quickCss.openEditor()}),...t)}function ok(e){return o("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 27 27",width:24,height:24},o("path",{fill:"currentColor",d:e?"M9 0h1v1h1v2h1v2h3V3h1V1h1V0h1v2h1v2h1v7h-1v-1h-3V9h1V6h-1v4h-3v1h1v-1h2v1h3v1h-1v1h-3v2h1v1h1v1h1v3h-1v4h-2v-1h-1v-4h-1v4h-1v1h-2v-4H9v-3h1v-1h1v-1h1v-2H9v-1H8v-1h3V6h-1v3h1v1H8v1H7V4h1V2h1M5 19h2v1h1v1h1v3H4v-1h2v-1H4v-2h1m15-1h2v1h1v2h-2v1h2v1h-5v-3h1v-1h1m4 3h4v1h-4":"M0 0h7v1H6v1H5v1H4v1H3v1H2v1h5v1H0V6h1V5h1V4h1V3h1V2h1V1H0m13 2h5v1h-1v1h-1v1h-1v1h3v1h-5V7h1V6h1V5h1V4h-3m8 5h1v5h1v-1h1v1h-1v1h1v-1h1v1h-1v3h-1v1h-2v1h-1v1h1v-1h2v-1h1v2h-1v1h-2v1h-1v-1h-1v1h-6v-1h-1v-1h-1v-2h1v1h2v1h3v1h1v-1h-1v-1h-3v-1h-4v-4h1v-2h1v-1h1v-1h1v2h1v1h1v-1h1v1h-1v1h2v-2h1v-2h1v-1h1M8 14h2v1H9v4h1v2h1v1h1v1h1v1h4v1h-6v-1H5v-1H4v-5h1v-1h1v-2h2m17 3h1v3h-1v1h-1v1h-1v2h-2v-2h2v-1h1v-1h1m1 0h1v3h-1v1h-2v-1h1v-1h1"}))}function rk(){let[e,t]=J(!1);return o(Ci,{position:"bottom",align:"right",animation:Ci.Animation.NONE,shouldShow:e,onRequestClose:()=>t(!1),renderPopout:()=>nk(()=>t(!1))},(n,{isShown:r})=>o(tk,{className:"vc-toolbox-btn",onClick:()=>t(i=>!i),tooltip:r?null:"Vencord Toolbox",icon:()=>ok(r),selected:r}))}function ik({children:e}){return e.splice(e.length-1,0,o(_,{noop:!0},o(rk,null))),o(f,null,e)}var tk,bg,f2=g(()=>{"use strict";a();m2();ga();U();le();M();w();j();I();tk=Ii(()=>{let e=Ke.byCode(".HEADER_BAR_BADGE");return tn(t=>t.Icon&&e(t.Icon))?.Icon});bg=y({name:"VencordToolbox",description:"Adds a button next to the inbox button in the channel header that houses Vencord quick actions",authors:[p.Ven,p.AutumnVN],patches:[{find:"toolbar:function",replacement:{match:/(?<=toolbar:function.{0,100}\()\i.Fragment,/,replace:"$self.ToolboxFragmentWrapper,"}}],ToolboxFragmentWrapper:_.wrap(ik,{fallback:()=>o("p",{style:{color:"red"}},"Failed to render :(")})})});function js(e){let t=e.startsWith("/")?"png":Tg.store.format,n=new URL(e,window.location.href);n.searchParams.set("size",Tg.store.imgSize),n.pathname=n.pathname.replace(/\.(png|jpe?g|webp)$/,`.${t}`),e=n.toString(),n.searchParams.set("size","4096");let r=n.toString();En(e,{original:r,height:256})}var Jl,Tg,g2,h2,xg,y2=g(()=>{"use strict";a();Mt();U();Ut();M();St();w();j();I();Jl=A("getGuildBannerURL"),Tg=D({format:{type:4,description:"Choose the image format to use for non animated images. Animated images will always use .gif",options:[{label:"webp",value:"webp",default:!0},{label:"png",value:"png"},{label:"jpg",value:"jpg"}]},imgSize:{type:4,description:"The image size to use",options:["128","256","512","1024","2048","4096"].map(e=>({label:e,value:e,default:e==="1024"}))}});g2=(e,{user:t,guildId:n})=>()=>{if(!t)return;let r=ke.getMember(n,t.id)?.avatar||null;e.splice(-1,0,o(G.MenuGroup,null,o(G.MenuItem,{id:"view-avatar",label:"View Avatar",action:()=>js(Jl.getUserAvatarURL(t,!0)),icon:Sr}),r&&o(G.MenuItem,{id:"view-server-avatar",label:"View Server Avatar",action:()=>js(Jl.getGuildMemberAvatarURLSimple({userId:t.id,avatar:r,guildId:n,canAnimate:!0},!0)),icon:Sr})))},h2=(e,{guild:t})=>()=>{if(!t)return;let{id:n,icon:r,banner:i}=t;!i&&!r||e.splice(-1,0,o(G.MenuGroup,null,r?o(G.MenuItem,{id:"view-icon",label:"View Icon",action:()=>js(Jl.getGuildIconURL({id:n,icon:r,canAnimate:!0})),icon:Sr}):null,i?o(G.MenuItem,{id:"view-banner",label:"View Banner",action:()=>js(Jl.getGuildBannerURL({id:n,banner:i},!0)),icon:Sr}):null))},xg=y({name:"ViewIcons",authors:[p.Ven,p.TheKodeToad,p.Nuckyz],description:"Makes avatars and banners in user profiles clickable, and adds View Icon/Banner entries in the user and server context menu",tags:["ImageUtilities"],settings:Tg,openImage:js,start(){ce("user-context",g2),ce("guild-context",h2)},stop(){de("user-context",g2),de("guild-context",h2)},patches:[{find:"User Profile Modal - Context Menu",replacement:{match:/\{src:(\i)(?=,avatarDecoration)/,replace:"{src:$1,onClick:()=>$self.openImage($1)"}},{find:".NITRO_BANNER,",replacement:{match:/style:\{(?=backgroundImage:(\i&&\i)\?"url\("\.concat\((\i),)/,replace:'onClick:ev=>$1&&ev.target.style.backgroundImage&&$self.openImage($2),style:{cursor:$1?"pointer":void 0,'}},{find:".avatarPositionPanel",replacement:{match:/(?<=avatarWrapperNonUserBot.{0,50})onClick:(\i\|\|\i)\?void 0(?<=,avatarSrc:(\i).+?)/,replace:'style:($1)?{cursor:"pointer"}:{},onClick:$1?()=>{$self.openImage($2)}'}}]})});function wg(e){return o("div",{className:sk.markup},Fe.defaultRules.codeBlock.react(e,null,{}))}var sk,v2=g(()=>{"use strict";a();j();I();sk=A("markup","codeContainer")});function ak(e){return Object.fromEntries(Object.entries(e).sort(([t],[n])=>t.localeCompare(n)))}function lk(e){let t=ak(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 T2(e,t,n){let r=je(i=>o(_,null,o(ze,{...i,size:"large"},o(at,null,o(re,{variant:"heading-lg/semibold",style:{flexGrow:1}},"View Raw"),o(ln,{onClick:()=>Vn(r)})),o(Ve,null,o("div",{style:{padding:"16px 0"}},!!n&&o(f,null,o(S.FormTitle,{tag:"h5"},"Content"),o(wg,{content:n,lang:""}),o(S.FormDivider,{className:q.bottom20})),o(S.FormTitle,{tag:"h5"},t," Data"),o(wg,{content:e,lang:"json"}))),o(Ot,null,o(ge,{cellSpacing:10},o(R,{onClick:()=>fn(e,`${t} data copied to clipboard!`)},"Copy ",t," JSON"),!!n&&o(R,{onClick:()=>fn(n,"Content copied to clipboard!")},"Copy Raw Content"))))))}function S2(e){e=lk(e);let t=JSON.stringify(e,null,4);return T2(t,"Message",e.content)}function Ti(e){return(n,r)=>()=>{if(e==="Guild"&&!r.guild||e==="User"&&!r.user)return;let i=n.at(-1);if(i?.key==="developer-actions"){let s=i.props;Array.isArray(s.children)||(s.children=[s.children]),{children:n}=s}n.splice(-1,0,o(G.MenuItem,{id:`vc-view-${e.toLowerCase()}-raw`,label:"View Raw",action:()=>T2(JSON.stringify(r[e.toLowerCase()],null,4),e),icon:b2}))}}var b2,Ql,Mg,x2=g(()=>{"use strict";a();Mt();Ar();U();v2();le();Rt();M();it();Re();pt();w();I();b2=()=>o("svg",{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",width:"18",height:"18"},o("path",{d:"M12.9297 3.25007C12.7343 3.05261 12.4154 3.05226 12.2196 3.24928L11.5746 3.89824C11.3811 4.09297 11.3808 4.40733 11.5739 4.60245L16.5685 9.64824C16.7614 9.84309 16.7614 10.1569 16.5685 10.3517L11.5739 15.3975C11.3808 15.5927 11.3811 15.907 11.5746 16.1017L12.2196 16.7507C12.4154 16.9477 12.7343 16.9474 12.9297 16.7499L19.2604 10.3517C19.4532 10.1568 19.4532 9.84314 19.2604 9.64832L12.9297 3.25007Z"}),o("path",{d:"M8.42616 4.60245C8.6193 4.40733 8.61898 4.09297 8.42545 3.89824L7.78047 3.24928C7.58466 3.05226 7.26578 3.05261 7.07041 3.25007L0.739669 9.64832C0.5469 9.84314 0.546901 10.1568 0.739669 10.3517L7.07041 16.7499C7.26578 16.9474 7.58465 16.9477 7.78047 16.7507L8.42545 16.1017C8.61898 15.907 8.6193 15.5927 8.42616 15.3975L3.43155 10.3517C3.23869 10.1569 3.23869 9.84309 3.43155 9.64824L8.42616 4.60245Z"}));Ql=D({clickMethod:{description:"Change the button to view the raw content/data of any message.",type:4,options:[{label:"Left Click to view the raw content.",value:"Left",default:!0},{label:"Right click to view the raw content.",value:"Right"}]}});Mg=y({name:"ViewRaw",description:"Copy and view the raw content/data of any message, channel or guild",authors:[p.KingFish,p.Ven,p.rad,p.ImLvna],dependencies:["MessagePopoverAPI"],settings:Ql,start(){On("ViewRaw",e=>{let t=()=>{Ql.store.clickMethod==="Right"?fn(e.content):S2(e)},n=i=>{Ql.store.clickMethod==="Left"?(i.preventDefault(),i.stopPropagation(),fn(e.content)):(i.preventDefault(),i.stopPropagation(),S2(e))};return{label:Ql.store.clickMethod==="Right"?"Copy Raw (Left Click) / View Raw (Right Click)":"View Raw (Left Click) / Copy Raw (Right Click)",icon:b2,message:e,channel:Q.getChannel(e.channel_id),onClick:t,onContextMenu:n}}),ce("guild-context",Ti("Guild")),ce("channel-context",Ti("Channel")),ce("user-context",Ti("User"))},stop(){_n("CopyRawMessage"),de("guild-context",Ti("Guild")),de("channel-context",Ti("Channel")),de("user-context",Ti("User"))}})});var w2=g(()=>{});var xi,Vl=g(()=>{"use strict";a();U();w();xi=D({noiseSuppression:{type:3,description:"Noise Suppression",default:!0},echoCancellation:{type:3,description:"Echo Cancellation",default:!0}})});var Ioe,M2=g(()=>{"use strict";a();I();Vl();Ioe=VencordNative.pluginHelpers.VoiceMessages});var Qo,Pg=g(()=>{"use strict";a();Je();Qo=Ue("vc-vmsg-")});var ck,P2,I2=g(()=>{"use strict";a();st();j();Pg();ck=Xe("waveform:"),P2=({src:e,waveform:t,recording:n})=>{let r=_i({deps:[n]}),i=n?Math.floor(r/1e3):0,s=Math.floor(i/60)+":"+(i%60).toString().padStart(2,"0");return e&&!n?o(ck,{key:e,src:e,waveform:t}):o("div",{className:Qo("preview",n?"preview-recording":[])},o("div",{className:Qo("preview-indicator")}),o("div",{className:Qo("preview-time")},s),o("div",{className:Qo("preview-label")},n?"RECORDING":"----"))}});var A2,C2=g(()=>{"use strict";a();I();Vl();A2=({setAudioBlob:e,onRecordingChange:t})=>{let[n,r]=J(!1),[i,s]=J(!1),[l,c]=J(),[u,d]=J([]),m=v=>{r(v),t?.(v)};function h(){!n?navigator.mediaDevices.getUserMedia({audio:{echoCancellation:xi.store.echoCancellation,noiseSuppression:xi.store.noiseSuppression}}).then(T=>{let P=[];d(P);let b=new MediaRecorder(T);c(b),b.addEventListener("dataavailable",x=>{P.push(x.data)}),b.start(),m(!0)}):l&&(l.addEventListener("stop",()=>{e(new Blob(u,{type:"audio/ogg; codecs=opus"})),m(!1)}),l.stop())}return o(f,null,o(R,{onClick:h},n?"Stop":"Start"," recording"),o(R,{disabled:!n,onClick:()=>{s(!i),i?l?.resume():l?.pause()}},i?"Resume":"Pause"," recording"))}});function fk(e,t){let n=Pe.getChannelId(),r=dk.getPendingReply(n);r&&F.dispatch({type:"DELETE_PENDING_REPLY",channelId:n});let i=new uk.CloudUpload({file:new File([e],"voice-message.ogg",{type:"audio/ogg; codecs=opus"}),isClip:!1,isThumbnail:!1,platform:1},n,!1,0);i.on("complete",()=>{wt.post({url:`/channels/${n}/messages`,body:{flags:1<<13,channel_id:n,content:"",nonce:Hn.fromTimestamp(Date.now()),sticker_ids:[],type:0,attachments:[{id:"0",filename:i.filename,uploaded_filename:i.uploadedFilename,waveform:t.waveform,duration_secs:t.duration}],message_reference:r?pk.getSendMessageOptionsForReply(r)?.messageReference:null}})}),i.on("error",()=>mn("Failed to upload voice message",ee.Type.FAILURE)),i.upload()}function gk(){let[e,t]=J();return[e,r=>{e&&URL.revokeObjectURL(e),t(URL.createObjectURL(r))}]}function hk({modalProps:e}){let[t,n]=J(!1),[r,i]=J(),[s,l]=gk();De(()=>()=>{s&&URL.revokeObjectURL(s)},[s]);let[c]=nt(async()=>{if(!r)return N2;let d=await new AudioContext().decodeAudioData(await r.arrayBuffer()),m=d.getChannelData(0),h=new Uint8Array(ur.clamp(Math.floor(d.duration*10),Math.min(32,m.length),256)),v=Math.floor(m.length/h.length);for(let b=0;b<h.length;b++){let x=0;for(let C=0;C<v;C++){let k=b*v+C;x+=m[k]**2}h[b]=~~(Math.sqrt(x/v)*255)}let T=Math.max(...h),P=1+(255/T-1)*Math.min(1,100*(T/255)**3);for(let b=0;b<h.length;b++)h[b]=Math.min(255,~~(h[b]*P));return{waveform:window.btoa(String.fromCharCode(...h)),duration:d.duration}},{deps:[r],fallbackValue:N2});return o(ze,{...e},o(at,null,o(S.FormTitle,null,"Record Voice Message")),o(Ve,{className:Qo("modal")},o("div",{className:Qo("buttons")},o(mk,{setAudioBlob:u=>{i(u),l(u)},onRecordingChange:n}),o(R,{onClick:async()=>{let u=await xa("audio/*");u&&(i(u),l(u))}},"Upload File")),o(S.FormTitle,null,"Preview"),o(P2,{src:s,waveform:c.waveform,recording:t})),o(Ot,null,o(R,{disabled:!r,onClick:()=>{fk(r,c),e.onClose(),mn("Now sending voice message... Please be patient",ee.Type.MESSAGE)}},"Send")))}var uk,pk,dk,Ig,mk,Ag,N2,k2,R2=g(()=>{"use strict";a();w2();Mt();Ut();M();pt();st();w();wa();j();I();M2();Vl();Pg();I2();C2();uk=A("CloudUpload"),pk=A("getSendMessageOptionsForReply","sendMessage"),dk=Me("PendingReplyStore"),Ig=A("optionName","optionIcon","optionLabel"),mk=A2,Ag=y({name:"VoiceMessages",description:"Allows you to send voice messages like on mobile. To do so, right click the upload button and click Send Voice Message",authors:[p.Ven,p.Vap,p.Nickyux],settings:xi,start(){ce("channel-attach",k2)},stop(){de("channel-attach",k2)}}),N2={waveform:"AAAAAAAAAAAA",duration:1};k2=(e,t)=>()=>{t.channel.guild_id&&!(Ne.can(Se.SEND_VOICE_MESSAGES,t.channel)&&Ne.can(Se.SEND_MESSAGES,t.channel))||e.push(o(G.MenuItem,{id:"vc-send-vmsg",label:o("div",{className:Ig.optionLabel},o(by,{className:Ig.optionIcon,height:24,width:24}),o("div",{className:Ig.optionName},"Send voice message")),action:()=>je(n=>o(hk,{modalProps:n}))}))}});async function yk(e){let t=await fetch(e);if(t.status===200)return await t.blob()}var Rr,Cg,L2=g(()=>{"use strict";a();U();M();w();wa();j();I();Rr=D({addBack:{type:3,description:"Add back the Discord context menus for images, links and the chat input bar",default:!0,restartNeeded:!0}}),Cg=y({name:"WebContextMenus",description:"Re-adds context menus missing in the web version of Discord: Links & Images (Copy/Open Link/Image), Text Area (Copy, Cut, Paste, SpellCheck)",authors:[p.Ven],enabledByDefault:!0,required:!0,settings:Rr,start(){if(Rr.store.addBack){let e=Dt("contextMenuCallbackNative");window.removeEventListener("contextmenu",e.contextMenuCallbackWeb),window.addEventListener("contextmenu",e.contextMenuCallbackNative),this.changedListeners=!0}},stop(){if(this.changedListeners){let e=Dt("contextMenuCallbackNative");window.removeEventListener("contextmenu",e.contextMenuCallbackNative),window.addEventListener("contextmenu",e.contextMenuCallbackWeb)}},patches:[{find:"open-native-link",replacement:[{match:/if\(!\i\.\i\|\|null==/,replace:"if(null=="},{match:/\i\.\i\.copy/,replace:"Vencord.Webpack.Common.Clipboard.copy"}]},{find:'id:"copy-image"',replacement:[{match:/!\i\.isPlatformEmbedded/,replace:"false"},{match:/return\s*?\[\i\.\i\.canCopyImage\(\)/,replace:"return [true"},{match:/(?<=COPY_IMAGE_MENU_ITEM,)action:/,replace:"action:()=>$self.copyImage(arguments[0]),oldAction:"},{match:/(?<=SAVE_IMAGE_MENU_ITEM,)action:/,replace:"action:()=>$self.saveImage(arguments[0]),oldAction:"}]},{find:'navId:"image-context"',all:!0,predicate:()=>Rr.store.addBack,replacement:{match:/return \i\.\i(?=\?|&&)/,replace:"return true"}},{find:'"interactionUsernameProfile"',predicate:()=>Rr.store.addBack,replacement:{match:/if\((?="A"===\i\.tagName&&""!==\i\.textContent)/,replace:"if(false&&"}},{find:'getElementById("slate-toolbar"',predicate:()=>Rr.store.addBack,replacement:{match:/(?<=handleContextMenu\(\i\)\{.{0,200}isPlatformEmbedded)\?/,replace:"||true?"}},{find:".SLASH_COMMAND_SUGGESTIONS_TOGGLED,{",predicate:()=>Rr.store.addBack,replacement:[{match:/if\(!\i\.\i\)return null;/,replace:""},{match:/\b\i\.\i\.(copy|cut|paste)/g,replace:"$self.$1"}]},{find:'"add-to-dictionary"',predicate:()=>Rr.store.addBack,replacement:{match:/let\{text:\i=""/,replace:"return [null,null];$&"}}],async copyImage(e){let t=new Image;t.onload=()=>{let n=document.createElement("canvas");n.width=t.naturalWidth,n.height=t.naturalHeight,n.getContext("2d").drawImage(t,0,0),n.toBlob(r=>{navigator.clipboard.write([new ClipboardItem({"image/png":r})])},"image/png")},t.crossOrigin="anonymous",t.src=e},async saveImage(e){let t=await yk(e);if(!t)return;let n=new URL(e).pathname.split("/").pop(),r=new File([t],n,{type:t.type});Ta(r)},copy(){let e=document.getSelection();!e||Yt.copy(e.toString())},cut(){this.copy(),wo.dispatch("INSERT_TEXT",{rawText:""})},async paste(){let e=(await navigator.clipboard.read())[0];if(!e)return;let t=new DataTransfer;for(let n of e.types)if(n==="image/png"){let r=new File([await e.getType(n)],"unknown.png",{type:n});t.items.add(r)}else if(n==="text/plain"){let r=await e.getType(n);t.setData(n,await r.text())}document.dispatchEvent(new ClipboardEvent("paste",{clipboardData:t}))}})});var Ng,kg,E2=g(()=>{"use strict";a();M();w();j();I();Ng=A("JUMP_TO_GUILD","SERVER_NEXT"),kg=y({name:"WebKeybinds",description:"Re-adds keybinds missing in the web version of Discord: ctrl+t, ctrl+shift+t, ctrl+tab, ctrl+shift+tab, ctrl+1-9, ctrl+,. Only works fully on Vesktop/ArmCord, not inside your browser",authors:[p.Ven],enabledByDefault:!0,onKey(e){if(e.ctrlKey||e.metaKey&&navigator.platform.includes("Mac"))switch(e.key){case"t":case"T":e.preventDefault(),e.shiftKey?(rn.getGuildId()&&dr.transitionToGuild("@me"),wo.safeDispatch("TOGGLE_DM_CREATE")):F.dispatch({type:"QUICKSWITCHER_SHOW",query:"",queryMode:null});break;case",":e.preventDefault(),Qn.open("My Account");break;case"Tab":(e.shiftKey?Ng.SERVER_PREV:Ng.SERVER_NEXT).action(e);break;default:e.key>="1"&&e.key<="9"&&(e.preventDefault(),Ng.JUMP_TO_GUILD.action(e,`mod+${e.key}`));break}},start(){document.addEventListener("keydown",this.onKey)},stop(){document.removeEventListener("keydown",this.onKey)}})});function Tk(e,t,n){let r=t.name+(t.id?`:${t.id}`:"");return wt.get({url:`/channels/${e.channel_id}/messages/${e.id}/reactions/${r}`,query:{limit:100,type:n},oldFormErrors:!0}).then(i=>F.dispatch({type:"MESSAGE_REACTION_ADD_USERS",channelId:e.channel_id,messageId:e.id,users:i.body,emoji:t,reactionType:n})).catch(console.error).finally(()=>Mo(250))}function xk(e,t,n){let r=`${e.id}:${t.name}:${t.id??""}:${n}`,i=D2[r]??={fetched:!1,users:{}};return i.fetched||(bk.unshift(()=>Tk(e,t,n)),i.fetched=!0),i.users}function wk(e){return function(n,r){return o(V,{text:e.slice(5).map(i=>i.username).join(", ")},({onMouseEnter:i,onMouseLeave:s})=>o("div",{className:Sk.moreUsers,onMouseEnter:i,onMouseLeave:s},"+",e.length-5))}}function Mk(e){e.stopPropagation()}var vk,Sk,bk,D2,Rg,O2=g(()=>{"use strict";a();le();M();Re();Wr();st();w();j();I();vk=Xe("defaultRenderUser","showDefaultAvatarsForNullUsers"),Sk=A("moreUsers","emptyUser","avatarContainer","clickableAvatar"),bk=new Cn;Rg=y({name:"WhoReacted",description:"Renders the avatars of users who reacted to a message",authors:[p.Ven,p.KannaDev],patches:[{find:",reactionRef:",replacement:{match:/(\i)\?null:\(0,\i\.jsx\)\(\i\.\i,{className:\i\.reactionCount,.*?}\),/,replace:"$&$1?null:$self.renderUsers(this.props),"}},{find:'.displayName="MessageReactionsStore";',replacement:{match:/(?<=CONNECTION_OPEN:function\(\){)(\i)={}/,replace:"$&;$self.reactions=$1"}}],renderUsers(e){return e.message.reactions.length>10?null:o(_,{noop:!0},o(this._renderUsers,{...e}))},_renderUsers({message:e,emoji:t,type:n}){let r=Po();O.useEffect(()=>{let l=c=>{c.messageId===e.id&&r()};return F.subscribe("MESSAGE_REACTION_ADD_USERS",l),()=>F.unsubscribe("MESSAGE_REACTION_ADD_USERS",l)},[e.id]);let i=xk(e,t,n),s=Object.values(i).filter(Boolean);for(let l of s)F.dispatch({type:"USER_UPDATE",user:l});return o("div",{style:{marginLeft:"0.5em",transform:"scale(0.9)"}},o("div",{onClick:Mk},o(vk,{users:s,guildId:Q.getChannel(e.channel_id)?.guild_id,renderIcon:!1,max:5,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:wk(s)})))},set reactions(e){D2=e}})});var Lg,_2=g(()=>{"use strict";a();Jt();M();w();Lg=y({name:"Wikisearch",description:"Searches Wikipedia for your requested query. (/wikisearch)",authors:[p.Samu],dependencies:["CommandsAPI"],commands:[{name:"wikisearch",description:"Searches Wikipedia for your request.",inputType:0,options:[{name:"search",description:"Word to search for",type:3,required:!0}],execute:async(e,t)=>{let n=ot(e,"search","");if(!n)return ue(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),ue(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),ue(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),ue(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};ue(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 Oe,hr=g(()=>{a();gh();hh();yh();vh();Sh();bh();Th();xh();wh();Mh();Ph();zu();pv();dv();mv();fv();yv();vv();Xu();Pv();Iv();Av();Cv();Ov();Bv();Fv();Hv();Kv();Yv();Zv();Jv();Qv();r1();s1();a1();m1();g1();h1();F1();z1();j1();K1();Y1();Z1();X1();J1();V1();eS();rS();aS();lS();dS();sd();el();MS();IS();NS();LS();OS();FS();qS();YS();ZS();XS();QS();VS();e0();t0();n0();o0();r0();s0();a0();l0();c0();u0();p0();d0();m0();f0();g0();h0();y0();T0();x0();Is();_0();U0();J0();Q0();tb();rb();hb();yb();Cb();Nb();kb();zb();jb();Kb();Yb();Jb();Qb();tT();sT();fT();XT();JT();ox();Cf();ux();px();dx();mx();gx();wx();Mx();Ix();Nx();kx();Bx();Fx();Ux();Kx();Zx();ig();Xx();Qx();Vx();r2();a2();c2();u2();d2();f2();y2();x2();R2();L2();E2();O2();_2();Oe={[Ic.name]:Ic,[Ac.name]:Ac,[Cc.name]:Cc,[Nc.name]:Nc,[kc.name]:kc,[Rc.name]:Rc,[Lc.name]:Lc,[Ec.name]:Ec,[Dc.name]:Dc,[Oc.name]:Oc,[_c.name]:_c,[ls.name]:ls,[ju.name]:ju,[Wu.name]:Wu,[qu.name]:qu,[Ku.name]:Ku,[Yu.name]:Yu,[Zu.name]:Zu,[Vu.name]:Vu,[ep.name]:ep,[tp.name]:tp,[np.name]:np,[op.name]:op,[rp.name]:rp,[ip.name]:ip,[sp.name]:sp,[fp.name]:fp,[gp.name]:gp,[hp.name]:hp,[vp.name]:vp,[Sp.name]:Sp,[wp.name]:wp,[Pp.name]:Pp,[Ip.name]:Ip,[Ap.name]:Ap,[Np.name]:Np,[Rp.name]:Rp,[Lp.name]:Lp,[$p.name]:$p,[Gp.name]:Gp,[Hp.name]:Hp,[zp.name]:zp,[jp.name]:jp,[Wp.name]:Wp,[qp.name]:qp,[Kp.name]:Kp,[Zp.name]:Zp,[Xp.name]:Xp,[Qp.name]:Qp,[ed.name]:ed,[td.name]:td,[nd.name]:nd,[ld.name]:ld,[pd.name]:pd,[dd.name]:dd,[gd.name]:gd,[hd.name]:hd,[yd.name]:yd,[Sd.name]:Sd,[wd.name]:wd,[Id.name]:Id,[Ad.name]:Ad,[Cd.name]:Cd,[Nd.name]:Nd,[Rd.name]:Rd,[Dd.name]:Dd,[Od.name]:Od,[_d.name]:_d,[Bd.name]:Bd,[Fd.name]:Fd,[Ud.name]:Ud,[Hd.name]:Hd,[zd.name]:zd,[jd.name]:jd,[Wd.name]:Wd,[qd.name]:qd,[Kd.name]:Kd,[Yd.name]:Yd,[Zd.name]:Zd,[Xd.name]:Xd,[Jd.name]:Jd,[Qd.name]:Qd,[Vd.name]:Vd,[em.name]:em,[nm.name]:nm,[cm.name]:cm,[um.name]:um,[pm.name]:pm,[hm.name]:hm,[ym.name]:ym,[Cm.name]:Cm,[Rm.name]:Rm,[Dm.name]:Dm,[Om.name]:Om,[_m.name]:_m,[Fm.name]:Fm,[Gm.name]:Gm,[Xm.name]:Xm,[Jm.name]:Jm,[Qm.name]:Qm,[Vm.name]:Vm,[ef.name]:ef,[tf.name]:tf,[nf.name]:nf,[sf.name]:sf,[af.name]:af,[Pf.name]:Pf,[If.name]:If,[Af.name]:Af,[Nf.name]:Nf,[kf.name]:kf,[Rf.name]:Rf,[Df.name]:Df,[Of.name]:Of,[_f.name]:_f,[Uf.name]:Uf,[Gf.name]:Gf,[jf.name]:jf,[Wf.name]:Wf,[Kf.name]:Kf,[Zf.name]:Zf,[Xf.name]:Xf,[Jf.name]:Jf,[ng.name]:ng,[ag.name]:ag,[rg.name]:rg,[lg.name]:lg,[ug.name]:ug,[pg.name]:pg,[mg.name]:mg,[fg.name]:fg,[gg.name]:gg,[yg.name]:yg,[Sg.name]:Sg,[bg.name]:bg,[xg.name]:xg,[Mg.name]:Mg,[Ag.name]:Ag,[Cg.name]:Cg,[kg.name]:kg,[Rg.name]:Rg,[Lg.name]:Lg}});var Dg={};Be(Dg,{BadgePosition:()=>la,_getBadges:()=>Pk,addBadge:()=>Nm,removeBadge:()=>km});function Nm(e){e.component&&=_.wrap(e.component,{noop:!0}),Eg.add(e)}function km(e){return Eg.delete(e)}function Pk(e){let t=[];for(let r of Eg)(!r.shouldShow||r.shouldShow(e))&&(r.position===0?t.unshift({...r,...e}):t.push({...r,...e}));let n=Oe.BadgeAPI.getDonorBadges(e.user.id);return n&&t.unshift(...n),t}var la,Eg,ca=g(()=>{"use strict";a();le();hr();la=(n=>(n[n.START=0]="START",n[n.END=1]="END",n))(la||{}),Eg=new Set});var Og={};Be(Og,{Badges:()=>kk,Commands:()=>Ak,ContextMenu:()=>Bk,DataStore:()=>$t,MemberListDecorators:()=>Ek,MessageAccessories:()=>Ck,MessageDecorations:()=>Lk,MessageEvents:()=>Ik,MessagePopover:()=>Nk,Notices:()=>Nl,Notifications:()=>_k,ServerList:()=>Rk,Settings:()=>Dk,Styles:()=>Ok});var Ik,Nl,Ak,$t,Ck,Nk,kk,Rk,Lk,Ek,Dk,Ok,_k,Bk,cs=g(()=>{"use strict";a();ca();Jt();Mt();jn();Tm();rl();Pm();Kn();Ar();Aa();Ao();Al();U();Je();Ik=mp,Nl=hu,Ak=Mu,$t=eo,Ck=Td,Nk=Vp,kk=Dg,Rk=$m,Lk=Mm,Ek=bm,Dk=lu,Ok=Wc,_k=Kc,Bk=Fc});var Hk={};Be(Hk,{Api:()=>Og,PlainSettings:()=>qn,Plugins:()=>$u,QuickCss:()=>Ug,Settings:()=>E,Updater:()=>uu,Util:()=>_g,Webpack:()=>$g});a();cs();Ba();var _g={};Be(_g,{ChangeList:()=>is,Devs:()=>p,DevsById:()=>Hr,ImageModal:()=>wc,LazyComponent:()=>ht,Logger:()=>ie,Margins:()=>q,ModalCloseButton:()=>ln,ModalContent:()=>Ve,ModalFooter:()=>Ot,ModalHeader:()=>at,ModalRoot:()=>ze,ModalSize:()=>Io,Modals:()=>An,NoopComponent:()=>sw,Queue:()=>Cn,REACT_GLOBAL:()=>ow,SUPPORT_CHANNEL_ID:()=>ra,Theme:()=>rs,VENCORD_USER_AGENT:()=>hc,WEBPACK_CHUNK:()=>zn,canonicalizeDescriptor:()=>yp,canonicalizeMatch:()=>wr,canonicalizeReplace:()=>Ua,canonicalizeReplacement:()=>ds,checkIntersecting:()=>vc,classes:()=>oe,closeAllModals:()=>Mc,closeModal:()=>Vn,copyWithToast:()=>fn,debounce:()=>hn,fetchUserProfile:()=>Nu,formatDuration:()=>Vi,getCurrentChannel:()=>ei,getCurrentGuild:()=>Cu,getTheme:()=>Uo,getUniqueUsername:()=>ao,gitHash:()=>an,gitRemote:()=>oa,humanFriendlyJoin:()=>lM,identity:()=>ia,insertTextIntoChatInputBox:()=>so,isMobile:()=>iw,isNonNullish:()=>Mp,isObject:()=>rw,isObjectEmpty:()=>Di,isPluginDev:()=>Oi,isTruthy:()=>Ga,localStorage:()=>fr,makeCodeblock:()=>es,makeLazy:()=>xo,mergeDefaults:()=>mr,onceDefined:()=>Fk,onlyOnce:()=>pu,openImageModal:()=>En,openModal:()=>je,openModalLazy:()=>Fi,openPrivateChannel:()=>yM,openUserProfile:()=>Dn,parseUrl:()=>yc,proxyLazy:()=>Fn,sendMessage:()=>vM,sleep:()=>Mo,useAwaiter:()=>nt,useForceUpdater:()=>Po,useIntersection:()=>Sc,useTimer:()=>_i,wordsFromCamel:()=>vu,wordsFromKebab:()=>tM,wordsFromPascal:()=>Su,wordsFromSnake:()=>eM,wordsFromTitle:()=>nM,wordsToCamel:()=>oM,wordsToKebab:()=>iM,wordsToPascal:()=>sM,wordsToSnake:()=>rM,wordsToTitle:()=>oo});a();_u();M();jr();St();Ha();rr();pa();Ze();it();Re();pt();a();function Fk(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})}du();ms();Wr();st();ro();var Ug={};Be(Ug,{toggle:()=>Bg});a();U();var wi,B2;function Fg(e){let t=document.createElement("style");return t.id=e,document.documentElement.append(t),t}async function Uk(){let e=await VencordNative.themes.getSystemValues(),t=Object.entries(e).filter(([,n])=>n!=="#").map(([n,r])=>`--${n}: ${r};`).join("");Fg("vencord-os-theme-values").textContent=`:root{${t}}`}async function Bg(e){wi?wi.disabled=!e:e&&(wi=Fg("vencord-custom-css"),VencordNative.quickCss.addChangeListener(t=>{wi.textContent=t,wi.disabled=!E.useQuickCss}),wi.textContent=await VencordNative.quickCss.get())}async function ec(){B2??=Fg("vencord-themes");let{themeLinks:e,enabledThemes:t}=E,n=[...e];{let r=t.map(i=>`vencord:///themes/${i}?v=${Date.now()}`);n.push(...r)}B2.textContent=n.map(r=>`@import url("${r.trim()}");`).join(`
|
|
`)}document.addEventListener("DOMContentLoaded",()=>{Uk(),ec(),Bg(E.useQuickCss),Ki("useQuickCss",Bg),Ki("themeLinks",ec),Ki("enabledThemes",ec),VencordNative.quickCss.addThemeChangeListener(ec)});vr();var $g={};Be($g,{Common:()=>gc,LazyComponentWebpack:()=>Ii,_initWebpack:()=>Xs,_resolveReady:()=>Zs,addListener:()=>J2,cache:()=>Xn,extract:()=>Js,filters:()=>Ke,find:()=>tn,findAll:()=>ir,findBulk:()=>ic,findByCode:()=>Wg,findByCodeLazy:()=>Ai,findByProps:()=>Dt,findByPropsLazy:()=>A,findComponentByCode:()=>Kg,findComponentByCodeLazy:()=>Xe,findComponentLazy:()=>ac,findExportedComponentLazy:()=>lc,findLazy:()=>nn,findModuleId:()=>sc,findStore:()=>qg,findStoreLazy:()=>Me,lazyWebpackSearchHistory:()=>X2,listeners:()=>rc,onceReady:()=>oc,proxyLazyWebpack:()=>Jn,removeListener:()=>Q2,search:()=>cc,subscriptions:()=>jg,waitFor:()=>ct,wreq:()=>xn});a();I();j();a();M();Ze();ms();Ys();var F2,Tn=new ie("WebpackInterceptor","#8caaee");window[zn]?(Tn.info(`Patching ${zn}.push (was already existent, likely from cache!)`),Xs(window[zn]),U2(window[zn])):(Object.defineProperty(window,zn,{get:()=>F2,set:e=>{e?.push&&(e.push.$$vencordOriginal||(Tn.info(`Patching ${zn}.push`),U2(e)),Xs(e)&&(Tn.info("Successfully initialised Vencord webpack"),delete window[zn],window[zn]=e)),F2=e},configurable:!0}),Object.defineProperty(Function.prototype,"m",{set(e){new Error().stack?.includes("discord.com")&&(Tn.info("Found webpack module factory"),$2(e),delete Function.prototype.m),Object.defineProperty(this,"m",{value:e,configurable:!0})},configurable:!0}));function U2(e){function t(n){try{$2(n[1])}catch(r){Tn.error("Error in handlePush",r)}return t.$$vencordOriginal.call(e,n)}t.$$vencordOriginal=e.push,t.bind=(...n)=>t.$$vencordOriginal.bind(...n),Object.defineProperty(e,"push",{get:()=>t,set(n){t.$$vencordOriginal=n},configurable:!0})}function $2(e){let{subscriptions:t,listeners:n}=Vencord.Webpack,{patches:r}=Vencord.Plugins;for(let i in e){let s=e[i],l="0,"+s.toString().replaceAll(`
|
|
`,""),c=s,u=new Set,d=e[i]=function(m,h,v){try{s(m,h,v)}catch(P){if(s===c)throw P;return Tn.error("Error in patched chunk",P),void c(m,h,v)}if(h=m.exports,!h)return;if(h===window){Object.defineProperty(v.c,i,{value:v.c[i],enumerable:!1,configurable:!0,writable:!0});return}let T=Number(i);for(let P of n)try{P(h,T)}catch(b){Tn.error("Error in webpack listener",b)}for(let[P,b]of t)try{P(h)?(t.delete(P),b(h,T)):h.default&&P(h.default)&&(t.delete(P),b(h.default,T))}catch(x){Tn.error("Error while firing callback for webpack chunk",x)}};d.toString=()=>s.toString(),d.original=c;for(let m=0;m<r.length;m++){let h=r[m],v=Un(`patch by ${h.plugin}`,(T,P)=>l.replace(T,P));if(!(h.predicate&&!h.predicate())&&l.includes(h.find)){u.add(h.plugin);let T=s,P=l;for(let b of h.replacement){if(b.predicate&&!b.predicate())continue;let x=s,C=l;ds(b,h.plugin);try{let k=v(b.match,b.replace);if(k===l){if(h.noWarn||Tn.warn(`Patch by ${h.plugin} had no effect (Module id is ${i}): ${b.match}`),h.group){Tn.warn(`Undoing patch ${h.find} by ${h.plugin} because replacement ${b.match} had no effect`),l=P,s=T,u.delete(h.plugin);break}}else l=k,s=(0,eval)(`// Webpack Module ${i} - Patched by ${[...u].join(", ")}
|
|
${k}
|
|
//# sourceURL=WebpackModule${i}`)}catch(k){if(Tn.error(`Patch by ${h.plugin} errored (Module id is ${i}): ${b.match}
|
|
`,k),u.delete(h.plugin),h.group){Tn.warn(`Undoing patch ${h.find} by ${h.plugin} because replacement ${b.match} errored`),l=P,s=T;break}l=C,s=x}}h.all||r.splice(m--,1)}}}}w();jn();Ao();U();Ba();pa();Ro();qi();vr();I();async function $k(){if(E.cloud.authenticated&&await Pt("Vencord_cloudSecret")===null){Ie({title:"Cloud Integrations",body:"We've noticed you have cloud integrations enabled in another client! Due to limitations, you will need to re-authenticate to continue using them. Click here to go to the settings page to do so!",color:"var(--yellow-360)",onClick:()=>Qn.open("VencordCloud")});return}E.cloud.settingsSync&&E.cloud.authenticated&&(fr.Vencord_settingsDirty?(await Yr(),delete fr.Vencord_settingsDirty):await Ma(!1)&&Ie({title:"Cloud Settings",body:"Your settings have been updated! Click here to restart to fully apply changes!",color:"var(--green-360)",onClick:cn}))}async function Gk(){await oc,ss("WebpackReady"),$k();try{if(!await Xr())return;if(E.autoUpdate){await Jr(),E.autoUpdateNotification&&setTimeout(()=>Ie({title:"Vencord has been updated!",body:"Click here to restart",permanent:!0,noPersist:!0,onClick:cn}),1e4);return}E.notifyAboutUpdates&&setTimeout(()=>Ie({title:"A Vencord update is available!",body:"Click here to view the update",permanent:!0,noPersist:!0,onClick(){Qn.open("VencordUpdater")}}),1e4)}catch(e){yr.error("Failed to check for updates",e)}}ss("Init");Gk();document.addEventListener("DOMContentLoaded",()=>{ss("DOMContentLoaded")},{once:!0});return To(Hk);})();
|
|
//# sourceURL=VencordDesktopRenderer
|
|
//# sourceMappingURL=vencord://vencordDesktopRenderer.js.map
|
|
/*! For license information please see vencordDesktopRenderer.js.LEGAL.txt */
|