discord-awesomeaudio/assets/vencord/vencord.js

411 lines
209 KiB
JavaScript
Raw Normal View History

2023-02-18 09:46:56 -05:00
// Vencord 62b2ace
// Standalone: false
// Platform: linux
"use strict";var Vencord=(()=>{var ym=Object.create;var Fn=Object.defineProperty;var vm=Object.getOwnPropertyDescriptor;var bm=Object.getOwnPropertyNames;var Sm=Object.getPrototypeOf,xm=Object.prototype.hasOwnProperty;var Tm=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var m=(e,t)=>()=>(e&&(t=e(e=0)),t);var Qt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ee=(e,t)=>{for(var n in t)Fn(e,n,{get:t[n],enumerable:!0})},Ma=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of bm(t))!xm.call(e,s)&&s!==n&&Fn(e,s,{get:()=>t[s],enumerable:!(r=vm(t,s))||r.enumerable});return e};var Ra=(e,t,n)=>(n=e!=null?ym(Sm(e)):{},Ma(t||!e||!e.__esModule?Fn(n,"default",{value:e,enumerable:!0}):n,e)),Ao=e=>Ma(Fn({},"__esModule",{value:!0}),e);var l,o,i=m(()=>{"use strict";l=Symbol.for("react.fragment"),o=(...e)=>(o=Vencord.Webpack.Common.React.createElement)(...e)});function Pm(e){let t={};for(let n in e)t[n]=e[n],t[e[n]]=n;return Object.freeze(t)}var j,ze=m(()=>{"use strict";i();j=Pm({QUICK_CSS_UPDATE:"VencordQuickCssUpdate",GET_QUICK_CSS:"VencordGetQuickCss",SET_QUICK_CSS:"VencordSetQuickCss",GET_SETTINGS_DIR:"VencordGetSettingsDir",GET_SETTINGS:"VencordGetSettings",SET_SETTINGS:"VencordSetSettings",OPEN_EXTERNAL:"VencordOpenExternal",OPEN_QUICKCSS:"VencordOpenQuickCss",GET_UPDATES:"VencordGetUpdates",GET_REPO:"VencordGetRepo",GET_HASHES:"VencordGetHashes",UPDATE:"VencordUpdate",BUILD:"VencordBuild",GET_DESKTOP_CAPTURE_SOURCES:"VencordGetDesktopCaptureSources",OPEN_MONACO_EDITOR:"VencordOpenMonacoEditor"})});var N,le=m(()=>{"use strict";i();N=class{constructor(t,n="white"){this.name=t;this.color=n}static makeTitle(t,n){return["%c %c %s ","",`background: ${t}; color: black; font-weight: bold; border-radius: 5px;`,n]}_log(t,n,r,s=""){console[t](`%c Vencord %c %c ${this.name} ${s}`,`background: ${n}; color: black; font-weight: bold; border-radius: 5px;`,"",`background: ${this.color}; color: black; font-weight: bold; border-radius: 5px;`,...r)}log(...t){this._log("log","#a6d189",t)}info(...t){this._log("info","#a6d189",t)}error(...t){this._log("error","#e78284",t)}errorCustomFmt(t,...n){this._log("error","#e78284",n,t)}warn(...t){this._log("warn","#e5c890",t)}debug(...t){this._log("debug","#eebebe",t)}}});function We(e){let t=function(){};return t.cachedValue=void 0,t.get=()=>t.cachedValue??=e(),new Proxy(t,Nn)}var Aa,Nn,Et=m(()=>{"use strict";i();Aa=["arguments","caller","prototype"],Nn={};for(let e of["apply","construct","defineProperty","deleteProperty","get","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","set","setPrototypeOf"])Nn[e]=(t,...n)=>Reflect[e](t.get(),...n);Nn.ownKeys=e=>{let t=e.get(),n=Reflect.ownKeys(t);for(let r of Aa)n.includes(r)||n.push(r);return n};Nn.getOwnPropertyDescriptor=(e,t)=>typeof t=="string"&&Aa.includes(t)?Reflect.getOwnPropertyDescriptor(e,t):Reflect.getOwnPropertyDescriptor(e.get(),t)});var km,Ve,_o=m(()=>{"use strict";i();le();km=(e,t,n)=>t,Ve=km});function Do(e){if(et!==void 0)throw"no.";st=e.push([[Symbol("Vencord")],{},t=>t]),et=st.c,e.pop()}function Ae(e,t=!0){return We(()=>Ce(e,t))}function La(e,t=!0){if(typeof e!="function")throw new Error("Invalid filter. Expected a function got "+typeof e);let n=[];for(let r in et){let s=et[r];if(!!s?.exports){if(e(s.exports))n.push(s.exports);else if(typeof s.exports!="object")continue;if(s.exports.default&&e(s.exports.default))n.push(t?s.exports.default:s.exports);else for(let a in s.exports)if(a.length<=3){let c=s.exports[a];c&&e(c)&&n.push(c)}}}return n}function Me(e,t){return We(()=>Bn(e,t))}function _e(...e){return Ce(E.byProps(...e))}function M(...e){return Ae(E.byProps(...e))}function Im(...e){return La(E.byProps(...e))}function xe(...e){return Ce(E.byCode(...e))}function re(...e){return Ae(E.byCode(...e))}function $(e,t){if(typeof e=="string")e=E.byProps(e);else if(Array.isArray(e))e=E.by
2022-10-14 17:16:34 -04:00
// [EXTRACTED] WebpackModule${e}
// WARNING: This module was extracted to be more easily readable.
// This module is NOT ACTUALLY USED! This means putting breakpoints will have NO EFFECT!!
${t.toString()}
//# sourceURL=ExtractedWebpackModule${e}
2023-02-18 09:46:56 -05:00
`;return(0,eval)(n)}var Lo,On,Eo,st,et,E,_a,Fo,Ce,No,Ea,Bn,Fa=m(()=>{"use strict";i();le();Et();_o();Lo=new N("Webpack"),Eo=new Promise(e=>On=e),E={byProps:(...e)=>e.length===1?t=>t[e[0]]!==void 0:t=>e.every(n=>t[n]!==void 0),byCode:(...e)=>t=>{if(typeof t!="function")return!1;let n=Function.prototype.toString.call(t);for(let r of e)if(!n.includes(r))return!1;return!0}},_a=new Map,Fo=new Set;Ce=Ve("find",function(t,n=!0,r=!1){if(typeof t!="function")throw new Error("Invalid filter. Expected a function got "+typeof t);for(let s in et){let a=et[s];if(!!a?.exports){if(t(a.exports))return a.exports;if(typeof a.exports=="object"){if(a.exports.default&&t(a.exports.default))return n?a.exports.default:a.exports;for(let c in a.exports)if(c.length<=3){let f=a.exports[c];if(f&&t(f))return f}}}}if(!r){let s=new Error("Didn't find module matching this filter");Lo.warn(s)}return null});No=Ve("findBulk",function(...t){if(!Array.isArray(t))throw new Error("Invalid filters. Expected function[] got "+typeof t);let{length:n}=t;if(n===0)throw new Error("Expected at least two filters.");if(n===1)return Ce(t[0]);let r=t,s=0,a=Array(n);e:for(let c in et){let f=et[c];if(!!f?.exports)for(let d=0;d<n;d++){let v=r[d];if(v!==void 0){if(v(f.exports)){if(a[d]=f.exports,r[d]=void 0,++s===n)break e;break}if(typeof f.exports=="object"){if(f.exports.default&&v(f.exports.default)){if(a[d]=f.exports.default,r[d]=void 0,++s===n)break e;break}for(let h in f.exports)if(h.length<=3){let g=f.exports[h];if(g&&v(g)){if(a[d]=g,r[d]=void 0,++s===n)break e;continue e}}}}}}if(s!==n){let c=new Error(`Got ${n} filters, but only found ${s} modules!`);Lo.warn(c)}return a}),Ea=Ve("findModuleId",function(t){for(let r in st.m)if(st.m[r].toString().includes(t))return Number(r);let n=new Error(`Didn't find module with code:
`+t);return Lo.warn(n),null}),Bn=Ve("mapMangledModule",function(t,n){let r={},s=Ea(t);if(s===null)return r;let a=st(s);e:for(let c in a){let f=a[c];for(let d in n)if(n[d](f)){r[d]=f;continue e}}return r})});var Bo={};ee(Bo,{Common:()=>$o,_initWebpack:()=>Do,_resolveReady:()=>On,addListener:()=>Mm,cache:()=>et,extract:()=>Cm,filters:()=>E,find:()=>Ce,findAll:()=>La,findAllByProps:()=>Im,findBulk:()=>No,findByCode:()=>xe,findByCodeLazy:()=>re,findByProps:()=>_e,findByPropsLazy:()=>M,findLazy:()=>Ae,findModuleId:()=>Ea,listeners:()=>Fo,mapMangledModule:()=>Bn,mapMangledModuleLazy:()=>Me,onceReady:()=>Eo,removeListener:()=>Rm,search:()=>Oo,subscriptions:()=>_a,waitFor:()=>$,wreq:()=>st});var L=m(()=>{"use strict";i();k();Fa()});var $o={};ee($o,{Alerts:()=>at,Button:()=>F,Card:()=>Te,ChannelStore:()=>ae,Clipboard:()=>Ee,ContextMenu:()=>Yo,Flux:()=>Uo,FluxDispatcher:()=>I,Forms:()=>y,GuildChannelStore:()=>zo,GuildStore:()=>qe,Margins:()=>V,Menu:()=>ue,MessageStore:()=>vt,NavigationRouter:()=>Ko,Parser:()=>Ke,PermissionStore:()=>jo,PresenceStore:()=>Xt,PrivateChannelsStore:()=>Go,React:()=>b,ReactDOM:()=>Am,ReadStateStore:()=>$n,RelationshipStore:()=>Hn,RestAPI:()=>Ho,Router:()=>jn,Select:()=>St,SelectedChannelStore:()=>pe,SelectedGuildStore:()=>Un,Slider:()=>qo,Switch:()=>bt,Text:()=>Y,TextArea:()=>Wo,TextInput:()=>Le,Toasts:()=>A,Tooltip:()=>me,UserStore:()=>G,UserUtils:()=>Zt,hljs:()=>Jt,moment:()=>_m});var V,I,Uo,b,Am,Ho,_m,Jt,vt,jo,Go,zo,$n,Xt,qe,G,pe,Un,ae,Hn,y,Te,F,bt,me,jn,Le,Y,Wo,St,qo,Ke,at,Lm,Em,A,Zt,Ee,Ko,ue,Yo,k=m(()=>{"use strict";i();O();Et();L();V=M("marginTop20"),Uo=M("connectStores"),Am=M("createPortal","render"),Ho=M("getAPIBaseURL","get"),_m=M("parseTwoDigitYear"),Jt=M("highlight"),vt=M("getRawMessages"),jo=M("can","getGuildPermissions"),Go=M("openPrivateChannel"),zo=M("getChannels"),$n=M("lastMessageId"),Xt=M("setCurrentUserOnConnectionOpen"),y={},Wo=re("handleSetRef","textArea"),St=Q(()=>xe("optionClassName","popoutPosition","autoFocus","maxVisibleItems")),qo=Q(()=>xe("closestMarkerIndex","stickToMarkers")),Lm={MESSAGE:0,SUCCESS:1,FAILURE:2,CUSTOM:3},Em={TOP:0,BOTTOM:1},A={Type:Lm,Position:Em,genId:()=>(Math.random()||Math.random()).toString(36).slice(2)},Zt={fetchUser:re(".USER(","getUser")},Ee=Me('document.queryCommandEnabled("copy")||document.queryCommandSupported("copy")',{copy:E.byCode(".default.copy("),SUPPORTS_COPY:e=>typeof e=="boolean"}),Ko=Me("Transitioning to external path",{transitionTo:E.byCode("Transitioning to external path"),transitionToGuild:E.byCode("transitionToGuild"),goBack:E.byCode("goBack()"),goForward:E.byCode("goForward()")});$("useState",e=>b=e);$(["dispatch","subscribe"],e=>{I=e;let t=()=>{e.unsubscribe("CONNECTION_OPEN",t),On()};e.subscribe("CONNECTION_OPEN",t)});$(["getCurrentUser","initialize"],e=>G=e);$("getSortedPrivateChannels",e=>ae=e);$("getCurrentlySelectedChannelId",e=>pe=e);$("getLastSelectedGuildId",e=>Un=e);$("getGuildCount",e=>qe=e);$("getRelationshipType",e=>Hn=e);$(["Hovers","Looks","Sizes"],e=>F=e);$(E.byCode("helpdeskArticleId"),e=>bt=e);$(["Positions","Colors"],e=>me=e);$(e=>e.Types?.PRIMARY==="cardPrimary",e=>Te=e);$(E.byCode("errorSeparator"),e=>y.FormTitle=e);$(E.byCode("titleClassName","sectionTitle"),e=>y.FormSection=e);$(e=>e.Types?.INPUT_PLACEHOLDER,e=>y.FormText=e);$(e=>{if(typeof e!="function")return!1;let t=e.toString();return t.length<200&&t.includes("().divider")},e=>y.FormDivider=e);$(E.byCode("currentToast?"),e=>A.show=e);$(E.byCode("currentToast:null"),e=>A.pop=e);$(["show","close"],e=>at=e);$("parseTopic",e=>Ke=e);$(["open","saveAccountChanges"],e=>jn=e);$(["defaultProps","Sizes","contextType"],e=>Le=e);$(e=>{if(typeof e!="function")return!1;let t=e.toString();return t.length<1500&&t.includes("data-text-variant")&&t.includes("always-white")},e=>Y=e);ue=We(()=>{let e=Vencord.Settings.plugins.MenuItemDeobfuscatorAPI.enabled,t=["MenuSeparator","MenuGroup","MenuItem","MenuCheckboxItem","MenuRadioItem","MenuControlItem"],n=Bn("\u266B \u2282(\uFF61\u25D5\u203F\u203F\u25D5\uFF61\u2282) \u266A",{ContextMenu:E.byCode("getContainerProps"),...Object.fromE
`,r)}}:function(){try{t.apply(n??this,arguments)}catch(r){console.error(`Caught an Error in ${e||"anonymous"}
`,r)}}}function Gn(e,t){let n="```";return`${n}${t||""}
${e.replaceAll("```","\\`\\`\\`")}
${n}`}function en(e,t="Copied to clipboard!"){Ee.SUPPORTS_COPY?Ee.copy(e):t="Your browser does not support copying to clipboard",A.show({message:t,id:A.genId(),type:A.Type.SUCCESS})}function Nm(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Qo(e){try{return new URL(e)}catch{return null}}var Jo,O=m(()=>{"use strict";i();k();Jo=e=>{let t=e.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(t.bottom<0||t.top-n>=0)}});function u(e){return e}var T=m(()=>{"use strict";i()});function Xo(e,t=e,n=""){return Om[n]??=new Proxy(e,{get(r,s){let a=r[s];if(!(s in r)){if(n==="plugins"&&s in te)return r[s]=Xo({enabled:te[s].required??!1},t,`plugins.${s}`);if(n.startsWith("plugins.")){let c=n.slice(8);if(c in te){let f=te[c].options?.[s];if(!f)return a;if("default"in f)return r[s]=f.default;if(f.type===4){let d=f.options.find(v=>v.default);return d&&(r[s]=d.value),d?.value}}}return a}return typeof a=="object"&&!Array.isArray(a)&&a!==null?Xo(a,t,`${n}${n&&"."}${s}`):a},set(r,s,a){if(r[s]===a)return!0;r[s]=a;let c=`${n}${n&&"."}${s}`;for(let f of zn)(!f._path||f._path===c)&&f(a,c);return VencordNative.ipc.invoke(j.SET_SETTINGS,JSON.stringify(t,null,4)),!0}})}function De(e){let[,t]=b.useReducer(()=>({}),{}),n=e?(r,s)=>e.includes(s)&&t():t;return b.useEffect(()=>(zn.add(n),()=>void zn.delete(n)),[]),S}function Zo(e,t){t._path=e,zn.add(t)}function X(e,...t){let{plugins:n}=lt;if(!(e in n)){for(let r of t)if(r in n){Na.info(`Migrating settings from old name ${r} to ${e}`),n[e]=n[r],delete n[r],VencordNative.ipc.invoke(j.SET_SETTINGS,JSON.stringify(lt,null,4));break}}}var Na,Da,lt,zn,Om,Oa,S,R=m(()=>{"use strict";i();ze();le();O();T();k();tn();Na=new N("Settings"),Da={notifyAboutUpdates:!0,useQuickCss:!0,themeLinks:[],enableReactDevtools:!1,plugins:{}};try{lt=JSON.parse(VencordNative.ipc.sendSync(j.GET_SETTINGS)),xt(lt,Da)}catch(e){lt=xt({},Da),Na.error(`An error occurred while loading the settings. Corrupt settings file?
`,e)}zn=new Set,Om={};Oa=lt,S=Xo(lt)});var Tt,nn=m(()=>{i();Tt="62b2ace"});var Vo,Ba=m(()=>{i();Vo="Vendicated/Vencord"});var tr={};ee(tr,{Devs:()=>p,REACT_GLOBAL:()=>Bm,VENCORD_USER_AGENT:()=>er,WEBPACK_CHUNK:()=>tt});var tt,Bm,er,p,x=m(()=>{"use strict";i();nn();Ba();tt="webpackChunkdiscord_app",Bm="Vencord.Webpack.Common.React",er=`Vencord/${Tt}${Vo?` (https://github.com/${Vo})`:""}`,p=Object.freeze({Ven:{name:"Vendicated",id:343383572805058560n},Arjix:{name:"ArjixWasTaken",id:674710789138939916n},Cyn:{name:"Cynosphere",id:150745989836308480n},Megu:{name:"Megumin",id:545581357812678656n},botato:{name:"botato",id:440990343899643943n},obscurity:{name:"obscurity",id:336678828233588736n},rushii:{name:"rushii",id:295190422244950017n},Glitch:{name:"Glitchy",id:269567451199569920n},Samu:{name:"Samu",id:702973430449832038n},Animal:{name:"Animal",id:118437263754395652n},MaiKokain:{name:"Mai",id:722647978577363026n},echo:{name:"ECHO",id:712639419785412668n},katlyn:{name:"katlyn",id:250322741406859265n},nea:{name:"nea",id:310702108997320705n},Nuckyz:{name:"Nuckyz",id:235834946571337729n},D3SOX:{name:"D3SOX",id:201052085641281538n},Nickyux:{name:"Nickyux",id:427146305651998721n},mantikafasi:{name:"mantikafasi",id:287555395151593473n},Xinto:{name:"Xinto",id:423915768191647755n},JacobTm:{name:"Jacob.Tm",id:302872992097107991n},DustyAngel47:{name:"DustyAngel47",id:714583473804935238n},BanTheNons:{name:"BanTheNons",id:460478012794863637n},BigDuck:{name:"BigDuck",id:1024588272623681609n},AverageReactEnjoyer:{name:"Average React Enjoyer",id:1004904120056029256n},adryd:{name:"adryd",id:0n},Tyman:{name:"Tyman",id:487443883127472129n},afn:{name:"afn",id:420043923822608384n},KraXen72:{name:"KraXen72",id:379304073515499530n},kemo:{name:"kemo",id:299693897859465228n},dzshn:{name:"dzshn",id:310449948011528192n},Ducko:{name:"Ducko",id:506482395269169153n},jewdev:{name:"jewdev",id:222369866529636353n},Luna:{name:"Luny",id:821472922140803112n},Vap:{name:"Vap0r1ze",id:454072114492866560n},KingFish:{name:"King Fish",id:499400512559382538n}})});var nr,$a=m(()=>{"use strict";i();R();x();O();T();nr=u({name:"BetterNotesBox",description:"Hide notes or disable spellcheck (Configure in settings!!)",authors:[p.Ven],patches:[{find:"hideNote:",all:!0,predicate:Fe(()=>Vencord.Settings.plugins.BetterNotesBox.hide),replacement:{match:/hideNote:.+?(?=[,}])/g,replace:"hideNote:true"}},{find:"Messages.NOTE_PLACEHOLDER",replacement:{match:/\.NOTE_PLACEHOLDER,/,replace:"$&spellCheck:!Vencord.Settings.plugins.BetterNotesBox.noSpellCheck,"}}],options:{hide:{type:3,description:"Hide notes",default:!1,restartNeeded:!0},noSpellCheck:{type:3,description:"Disable spellcheck in notes",disabled:()=>S.plugins.BetterNotesBox.hide,default:!1}}})});var or,Ua=m(()=>{"use strict";i();x();T();or=u({name:"TimeBarAllActivities",description:"Adds the Spotify time bar to all activities if they have start and end timestamps",authors:[p.obscurity],patches:[{find:"renderTimeBar=function",replacement:{match:/renderTimeBar=function\((.{1,3})\){.{0,50}?var/,replace:"renderTimeBar=function($1){var"}}]})});var rr,Ha=m(()=>{"use strict";i();R();x();T();rr=u({name:"AnonymiseFileNames",authors:[p.obscurity],description:"Anonymise uploaded file names",patches:[{find:"instantBatchUpload:function",replacement:{match:/uploadFiles:(.{1,2}),/,replace:"uploadFiles:(...args)=>(args[0].uploads.forEach(f=>f.filename=Vencord.Plugins.plugins.AnonymiseFileNames.anonymise(f.filename)),$1(...args)),"}}],options:{method:{description:"Anonymising method",type:4,options:[{label:"Random Characters",value:0,default:!0},{label:"Consistent",value:1},{label:"Timestamp (4chan-like)",value:2}]},randomisedLength:{description:"Random characters length",type:1,default:7,disabled:()=>S.plugins.AnonymiseFileNames.method!==0},consistent:{description:"Consistent filename",type:0,default:"image",disabled:()=>S.plugins.AnonymiseFileNames.method!==1}},anonymise(e){let t="image",n=e.lastIndexOf("."),r=n!==-1?e.slice(n):"";switch(S.plugins.AnonymiseFileNames.method){case 0:let s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxy
`);s!==-1&&(r=n.slice(0,s),n=n.slice(s+1).replace(/https:\/\/\S+\/assets\//g,""))}return{error:t,stack:n,message:r}}componentDidCatch(t,n){this.props.onError?.(t,n),ja.error(`A component threw an Error
`,t),ja.error("Component Stack",n.componentStack)}render(){if(this.state.error===Ga)return this.props.children;if(this.props.noop)return null;if(this.props.fallback)return o(this.props.fallback,{children:this.props.children,...this.state});let t=this.props.message||"An error occurred while rendering this Component. More info can be found below and in your console.";return o(rn,{style:{overflow:"hidden"}},o("h1",null,"Oh no!"),o("p",null,t),o("code",null,this.state.message,!!this.state.stack&&o("pre",{className:V.marginTop8},this.state.stack)))}});ar.wrap=(e,t)=>n=>o(ar,{...t},o(e,{...n}));D=ar});function Z(e){return e.style??={},e.style.display="flex",e.style.gap??="1em",e.style.flexDirection||=e.flexDirection,delete e.flexDirection,o("div",{...e},e.children)}var Ne=m(()=>{"use strict";i()});var dr={};ee(dr,{ModalCloseButton:()=>cr,ModalContent:()=>ot,ModalFooter:()=>sn,ModalHeader:()=>nt,ModalRoot:()=>Be,ModalSize:()=>Ft,Modals:()=>Oe,closeModal:()=>an,openModal:()=>we,openModalLazy:()=>pr});function pr(e,t){return lr.openModalLazy(e,t)}function we(e,t,n){return lr.openModal(e,t,n)}function an(e,t){return lr.closeModal(e,t)}var Ft,Oe,Be,nt,ot,sn,cr,lr,Ye=m(()=>{"use strict";i();L();Ft=(s=>(s.SMALL="small",s.MEDIUM="medium",s.LARGE="large",s.DYNAMIC="dynamic",s))(Ft||{}),Oe=Me("().closeWithCircleBackground",{ModalRoot:E.byCode("().root"),ModalHeader:E.byCode("().header"),ModalContent:E.byCode("().content"),ModalFooter:E.byCode("().footerSeparator"),ModalCloseButton:E.byCode("().closeWithCircleBackground")}),Be=e=>o(Oe.ModalRoot,{...e}),nt=e=>o(Oe.ModalHeader,{...e}),ot=e=>o(Oe.ModalContent,{...e}),sn=e=>o(Oe.ModalFooter,{...e}),cr=e=>o(Oe.ModalCloseButton,{...e}),lr=Me("onCloseRequest:null!=",{openModal:E.byCode("onCloseRequest:null!="),closeModal:E.byCode("onCloseCallback&&"),openModalLazy:e=>e?.length===1&&E.byCode(".apply(this,arguments)")(e)})});var Um,Hm,jm,za,mr,Wa=m(()=>{"use strict";i();fr();sr();ne();Ne();ir();x();ze();le();Ye();T();k();Um="https://media.discordapp.net/stickers/1026517526106087454.webp",Hm=Object.values(p).map(e=>e.id.toString()),jm={tooltip:"Vencord Contributor",image:Um,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},shouldShow:({user:e})=>Hm.includes(e.id),onClick:()=>VencordNative.ipc.invoke(j.OPEN_EXTERNAL,"https://github.com/Vendicated/Vencord")},za={},mr=u({name:"BadgeAPI",description:"API to add badges to users.",authors:[p.Megu],required:!0,patches:[{find:"PREMIUM_GUILD_SUBSCRIPTION_TOOLTIP.format({date:",replacement:{match:/&&((\w{1,3})\.push\({tooltip:\w{1,3}\.\w{1,3}\.Messages\.PREMIUM_GUILD_SUBSCRIPTION_TOOLTIP\.format.+?;)(?:return\s\w{1,3};?})/,replace:(e,t,n)=>`&&${t} return Vencord.Api.Badges.inject(${n}, arguments[0]);}`}},{find:"Messages.PROFILE_USER_BADGES,role:",replacement:{match:/src:(\w{1,3})\[(\w{1,3})\.key\],/,replace:(e,t,n)=>`src: ${n}.image ?? ${t}[${n}.key], ...${n}.props,`}}],async start(){Vencord.Api.Badges.addBadge(jm);let t=(await fetch("https://gist.githubusercontent.com/Vendicated/51a3dd775f6920429ec6e9b735ca7f01/raw/badges.csv").then(n=>n.text())).trim().split(`
`);if(t.shift()!=="id,tooltip,image"){new N("BadgeAPI").error("Invalid badges.csv file!");return}for(let n of t){let[r,s,a]=n.split(",");za[r]={image:a,tooltip:s}}},addDonorBadge(e,t){let n=za[t];n&&e.unshift({...n,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},onClick(){let r=we(s=>o(D,{noop:!0,onError:()=>{an(r),VencordNative.ipc.invoke(j.OPEN_EXTERNAL,"https://github.com/sponsors/Vendicated")}},o(Oe.ModalRoot,{...s},o(Oe.ModalHeader,null,o(Z,{style:{width:"100%",justifyContent:"center"}},o(y.FormTitle,{tag:"h2",style:{width:"100%",textAlign:"center",margin:0}},o(Wn,null),"Vencord Donor"))),o(Oe.ModalContent,null,o(Z,null,o("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533070955872337.png",alt:"",style:{margin:"auto"}}),o("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533090627174460.png",alt:"",style:{margin:"auto"}})),o("div",{style:{padding:"1em"}},o(y.FormText,null,"This Badge is a special perk for Vencord Donors"),o(y.FormText,{className:V.marginTop20},"Please consider supporting the development of Vencord by becoming a donor. It would mean a lot!!"))),o(Oe.ModalFooter,null,o(Z,{style:{width:"100%",justifyContent:"center"}},o(on,null))))))}})}})});var gr,qa=m(()=>{"use strict";i();x();T();gr=u({name:"CommandsAPI",authors:[p.Arjix],description:"Api required by anything that uses commands",patches:[{find:'"giphy","tenor"',replacement:[{match:/(?<=\w=)(\w)(\.filter\(.{0,30}giphy)/,replace:"Vencord.Api.Commands._init($1)$2"}]},{find:"Unexpected value for option",replacement:{match:/,(.{1,2})\.execute\((.{1,2}),(.{1,2})\)]/,replace:(e,t,n,r)=>`,Vencord.Api.Commands._handleCommand(${t}, ${n}, ${r})]`}},{find:"().source,children",replacement:{match:/(?<=:(.{1,3})\.displayDescription\}.{0,200}\(\)\.source,children:)[^}]+/,replace:"$1.plugin||($&)"}}]})});var Ka,hr,Ya=m(()=>{"use strict";i();R();x();T();Ka={radio:"MenuRadioItem",separator:"MenuSeparator",checkbox:"MenuCheckboxItem",groupstart:"MenuGroup",control:"MenuControlItem",compositecontrol:"MenuControlItem",item:"MenuItem",customitem:"MenuItem"};X("MenuItemDeobfuscatorAPI","MenuItemDeobfuscatorApi");hr=u({name:"MenuItemDeobfuscatorAPI",description:"Deobfuscates Discord's Menu Item module",authors:[p.Ven],patches:[{find:'"Menu API',replacement:{match:/function.{0,80}type===(.{1,3})\..{1,3}\).{0,50}navigable:.+?Menu API/s,replace:(e,t)=>{let n="",r=[],s=/\(.{1,3}\.type===(.{1,5})\)/g,a=/type:"(\w+)"/g,c;for(;(c=s.exec(e))!==null;){let f=c[1];a.lastIndex=s.lastIndex;let d=a.exec(e)?.[1];if(d&&d in Ka){let v=Ka[d];n+=`Object.defineProperty(${f},"name",{value:"${v}"});`,r.push(`${v}:${f}`)}}return r.length<6&&console.warn("[ApiMenuItemDeobfuscator] Expected to at least remap 6 items, only remapped",r.length),`${n}Object.assign(${t},{${r.join(",")}});${e}`}}}]})});var yr,Qa=m(()=>{"use strict";i();x();T();yr=u({name:"MessageAccessoriesAPI",description:"API to add message accessories.",authors:[p.Cyn],patches:[{find:"_messageAttachmentToEmbedMedia",replacement:{match:/(\(\)\.container\)?,children:)(\[[^\]]+\])(}\)\};return)/,replace:(e,t,n,r)=>`${t}Vencord.Api.MessageAccessories._modifyAccessories(${n},this.props)${r}`}}]})});var vr,Ja=m(()=>{"use strict";i();x();T();vr=u({name:"MessageEventsAPI",description:"Api required by anything using message events.",authors:[p.Arjix],patches:[{find:"sendMessage:function",replacement:[{match:/(?<=_sendMessage:function\([^)]+\)){/,replace:"{if(Vencord.Api.MessageEvents._handlePreSend(...arguments)){return;};"},{match:/(?<=\beditMessage:function\([^)]+\)){/,replace:"{Vencord.Api.MessageEvents._handlePreEdit(...arguments);"}]},{find:'("interactionUsernameProfile',replacement:{match:/var \w=(\w)\.id,\w=(\w)\.id;return .{1,2}\.useCallback\(\(?function\((.{1,2})\){/,replace:(e,t,n,r)=>`var _msg=${t},_chan=${n};${e}Vencord.Api.MessageEvents._handleClick(_msg, _chan, ${r});`}}]})});var br,Xa=m(()=>{"use strict";i();x();T();br=u({name:"MessagePopoverAPI",description:"API to add buttons to message popovers.",authors:[p.KingFish],patches:[{find:"Messages.MESSAGE_UTILITIES_A11
.vc-nsfw-img [class^=imageWrapper] img,
.vc-nsfw-img [class^=wrapperPaused] video {
filter: blur(${S.plugins.BlurNSFW.blurAmount}px);
transition: filter 0.2s;
}
.vc-nsfw-img [class^=imageWrapper]:hover img,
.vc-nsfw-img [class^=wrapperPaused]:hover video {
filter: unset;
}
`}var dn,_r,lc=m(()=>{"use strict";i();R();x();T();_r=u({name:"BlurNSFW",description:"Blur attachments in NSFW channels until hovered",authors:[p.Ven],patches:[{find:"().embedWrapper,embed",replacement:[{match:/(\.renderEmbed=.+?(.)=.\.props)(.+?\(\)\.embedWrapper)/g,replace:"$1,vcProps=$2$3+(vcProps.channel.nsfw?' vc-nsfw-img':'')"},{match:/(\.renderAttachments=.+?(.)=this\.props)(.+?\(\)\.embedWrapper)/g,replace:"$1,vcProps=$2$3+(vcProps.channel.nsfw?' vc-nsfw-img':'')"}]}],options:{blurAmount:{type:1,description:"Blur Amount",default:10,onChange:cc}},start(){dn=document.createElement("style"),dn.id="VcBlurNsfw",document.head.appendChild(dn),cc()},stop(){dn?.remove()}})});function qm(e){let t=S.plugins.CallTimer.format==="human",n=h=>t?h:h.toString().padStart(2,"0"),r=h=>t?h:"",s=t?" ":":",a=Math.floor(e/864e5),c=Math.floor(e%864e5/36e5),f=Math.floor(e%864e5%36e5/6e4),d=Math.floor(e%864e5%36e5%6e4/1e3),v="";return a&&(v+=`${a}d `),(c||v)&&(v+=`${n(c)}${r("h")}${s}`),(f||v||!t)&&(v+=`${n(f)}${r("m")}${s}`),v+=`${n(d)}${r("s")}`,v}var Lr,pc=m(()=>{"use strict";i();R();ne();x();T();k();Lr=u({name:"CallTimer",description:"Adds a timer to vcs",authors:[p.Ven],startTime:0,interval:void 0,options:{format:{type:4,description:"The timer format. This can be any valid moment.js format",options:[{label:"30d 23:00:42",value:"stopwatch",default:!0},{label:"30d 23h 00m 42s",value:"human"}]}},patches:[{find:".renderConnectionStatus=",replacement:{match:/(?<=renderConnectionStatus=.+\(\)\.channel,children:)\w/,replace:"[$&, Vencord.Plugins.plugins.CallTimer.renderTimer(this.props.channel.id)]"}}],renderTimer(e){return o(D,{noop:!0},o(this.Timer,{channelId:e}))},Timer({channelId:e}){let[t,n]=b.useState(0),r=b.useMemo(()=>Date.now(),[e]);return b.useEffect(()=>{let s=setInterval(()=>n(Date.now()-r),1e3);return()=>{clearInterval(s),n(0)}},[e]),o("p",{style:{margin:0}},"Connected for ",qm(t))}})});var $r={};ee($r,{_handleClick:()=>Qm,_handlePreEdit:()=>Ym,_handlePreSend:()=>Km,addClickListener:()=>Or,addPreEditListener:()=>Pt,addPreSendListener:()=>$e,removeClickListener:()=>Br,removePreEditListener:()=>kt,removePreSendListener:()=>Ue});function Km(e,t,n){for(let r of Fr)try{let s=r(e,t,n);if(s&&s.cancel===!0)return!0}catch(s){Er.error(`MessageSendHandler: Listener encountered an unknown error
`,s)}return!1}function Ym(e,t,n){for(let r of Dr)try{r(e,t,n)}catch(s){Er.error(`MessageEditHandler: Listener encountered an unknown error
`,s)}}function $e(e){return Fr.add(e),e}function Pt(e){return Dr.add(e),e}function Ue(e){return Fr.delete(e)}function kt(e){return Dr.delete(e)}function Qm(e,t,n){e=vt.getMessage(t.id,e.id)??e;for(let r of Nr)try{r(e,t,n)}catch(s){Er.error(`MessageClickHandler: Listener encountered an unknown error
`,s)}}function Or(e){return Nr.add(e),e}function Br(e){return Nr.delete(e)}var Er,Fr,Dr,Nr,pt=m(()=>{"use strict";i();le();k();Er=new N("MessageEvents","#e5c890"),Fr=new Set,Dr=new Set;Nr=new Set});var dc,mc=m(()=>{"use strict";i();dc=["action_object_map","action_type_map","action_ref_map","spm@*.aliexpress.com","scm@*.aliexpress.com","aff_platform","aff_trace_key","algo_expid@*.aliexpress.*","algo_pvid@*.aliexpress.*","btsid","ws_ab_test","pd_rd_*@amazon.*","_encoding@amazon.*","psc@amazon.*","tag@amazon.*","ref_@amazon.*","pf_rd_*@amazon.*","pf@amazon.*","crid@amazon.*","keywords@amazon.*","sprefix@amazon.*","sr@amazon.*","ie@amazon.*","node@amazon.*","qid@amazon.*","callback@bilibili.com","cvid@bing.com","form@bing.com","sk@bing.com","sp@bing.com","sc@bing.com","qs@bing.com","pq@bing.com","sc_cid","mkt_tok","trk","trkCampaign","ga_*","gclid","gclsrc","hmb_campaign","hmb_medium","hmb_source","spReportId","spJobID","spUserID","spMailingID","itm_*","s_cid","elqTrackId","elqTrack","assetType","assetId","recipientId","campaignId","siteId","mc_cid","mc_eid","pk_*","sc_campaign","sc_channel","sc_content","sc_medium","sc_outcome","sc_geo","sc_country","nr_email_referer","vero_conv","vero_id","yclid","_openstat","mbid","cmpid","cid","c_id","campaign_id","Campaign","hash@ebay.*","fb_action_ids","fb_action_types","fb_ref","fb_source","fbclid","refsrc@facebook.com","hrc@facebook.com","gs_l","gs_lcp@google.*","ved@google.*","ei@google.*","sei@google.*","gws_rd@google.*","gs_gbg@google.*","gs_mss@google.*","gs_rn@google.*","_hsenc","_hsmi","__hssc","__hstc","hsCtaTracking","source@sourceforge.net","position@sourceforge.net","t@*.twitter.com","s@*.twitter.com","ref_*@*.twitter.com","tt_medium","tt_content","lr@yandex.*","redircnt@yandex.*","feature@youtube.com","kw@youtube.com","wt_zmc","utm_source","utm_content","utm_medium","utm_campaign","utm_term","si@open.spotify.com"]});var uc,Jm,Ur,fc=m(()=>{"use strict";i();pt();R();x();T();mc();uc=/[\\^$.*+?()[\]{}|]/g,Jm=RegExp(uc.source);X("ClearURLs","clearURLs");Ur=u({name:"ClearURLs",description:"Removes tracking garbage from URLs",authors:[p.adryd],dependencies:["MessageEventsAPI"],escapeRegExp(e){return e&&Jm.test(e)?e.replace(uc,"\\$&"):e||""},createRules(){let e=dc;this.universalRules=new Set,this.rulesByHost=new Map,this.hostRules=new Map;for(let t of e){let n=t.split("@"),r=new RegExp("^"+this.escapeRegExp(n[0]).replace(/\\\*/,".+?")+"$");if(!n[1]){this.universalRules.add(r);continue}let s=new RegExp("^(www\\.)?"+this.escapeRegExp(n[1]).replace(/\\\./,"\\.").replace(/^\\\*\\\./,"(.+?\\.)?").replace(/\\\*/,".+?")+"$"),a=s.toString();this.hostRules.set(a,s),this.rulesByHost.get(a)==null&&this.rulesByHost.set(a,new Set),this.rulesByHost.get(a).add(r)}},removeParam(e,t,n){(t===e||e instanceof RegExp&&e.test(t))&&n.delete(t)},replacer(e){try{var t=new URL(e)}catch{return e}return t.searchParams.entries().next().done?e:(this.universalRules.forEach(n=>{t.searchParams.forEach((r,s,a)=>{this.removeParam(n,s,a)})}),this.hostRules.forEach((n,r)=>{!n.test(t.hostname)||this.rulesByHost.get(r).forEach(s=>{t.searchParams.forEach((a,c,f)=>{this.removeParam(s,c,f)})})}),t.toString())},onSend(e){e.content.match(/http(s)?:\/\//)&&(e.content=e.content.replace(/(https?:\/\/[^\s<]+[^<.,:;"'>)|\]\s])/g,t=>this.replacer(t)))},start(){this.createRules(),this.preSend=$e((e,t)=>this.onSend(t)),this.preEdit=Pt((e,t,n)=>this.onSend(n))},stop(){Ue(this.preSend),kt(this.preEdit)}})});var Hr,jr,gc=m(()=>{"use strict";i();x();T();Hr=e=>()=>{throw new Error(`'${e}' is Discord Desktop only.`)},jr=u({name:"ConsoleShortcuts",description:"Adds shorter Aliases for many things on the window. Run `shortcutList` for a list.",authors:[p.Ven],getShortcuts(){return{toClip:Hr("toClip"),fromClip:Hr("fromClip"),wp:Vencord.Webpack,wpc:Vencord.Webpack.wreq.c,wreq:Vencord.Webpack.wreq,wpsearch:Vencord.Webpack.search,wpex:Vencord.Webpack.extract,wpexs:e=>Vencord.Webpack.extract(Vencord.Webpack.findModuleId(e)),findByProps:Vencord.Webpack.findByProps,find:Vencord.Webpack.find,Plugins:Vencord.Plugins,React:Vencord.Webpack.Common.Re
${Gn(c)}`,author:{username:"Vencord"}})};try{let s=e.execute(t,n);return s instanceof Promise?s.catch(r):s}catch(s){return r(s)}}});var bc,Yr,Sc=m(()=>{"use strict";i();be();Kn();mn();x();T();L();bc=0,Yr=u({name:"CorruptMp4s",description:"Create corrupt mp4s with extremely high or negative duration",authors:[p.Ven],dependencies:["CommandsAPI"],commands:[{name:"corrupt",description:"Create a corrupt mp4 with extremely high or negative duration",inputType:0,options:[{name:"mp4",description:"the video to corrupt",type:11,required:!0},{name:"kind",description:"the kind of corruption",type:3,choices:[{name:"infinite",value:"infinite",label:"Very high duration"},{name:"negative",value:"negative",label:"Negative duration"}]}],execute:async(e,t)=>{let s=_e("getUploads").getUploads(t.channel.id,bc)[0]?.item?.file;if(s?.type!=="video/mp4")return void U(t.channel.id,{content:"Please upload a mp4 file"});let a=ce(e,"kind","infinite"),c=new Uint8Array(await s.arrayBuffer()),f=!1;for(let g=0;g<c.length;g++)if(c[g]===109&&c[g+1]===118&&c[g+2]===104&&c[g+3]===100){let w=g+18;c[w++]=0,c[w++]=1,c[w++]=a==="negative"?255:127,c[w++]=255,c[w++]=255,c[w++]=a==="negative"?240:255,f=!0;break}if(!f)return void U(t.channel.id,{content:"Could not find signature. Is this even a mp4?"});let d=s.name.replace(/\.mp4$/i,".corrupt.mp4"),v=xe("UPLOAD_FILE_LIMIT_ERROR"),h=new File([c],d,{type:"video/mp4"});setImmediate(()=>v([h],t.channel,bc))}}]})});var Qr,xc=m(()=>{"use strict";i();be();mn();x();T();Qr=u({name:"UrbanDictionary",description:"Searches for a word on Urban Dictionary",authors:[p.jewdev],dependencies:["CommandsAPI"],commands:[{name:"urban",description:"Returns the definition of a word from Urban Dictionary",inputType:0,options:[{type:3,name:"word",description:"The word to search for on Urban Dictionary",required:!0}],execute:async(e,t)=>{try{let{list:[n]}=await(await fetch(`https://api.urbandictionary.com/v0/define?term=${e[0].value}`)).json();if(!n)return void U(t.channel.id,{content:"No results found."});let r=s=>s.replace(/\[(.+?)\]/g,(a,c)=>`[${c}](https://www.urbandictionary.com/define.php?term=${encodeURIComponent(c)})`);return void U(t.channel.id,{embeds:[{type:"rich",author:{name:`Definition of ${n.word}`,url:n.permalink},description:r(n.definition),fields:[{name:"Example",value:r(n.example)}],color:16750848,footer:{text:`\u{1F44D} ${n.thumbs_up.toString()} | \u{1F44E} ${n.thumbs_down.toString()} | Uploaded by ${n.author}`,icon_url:"https://www.urbandictionary.com/favicon.ico"},timestamp:new Date(n.written_on).toISOString()}]})}catch(n){return void U(t.channel.id,{content:`Something went wrong: \`${n}\``})}}}]})});var Jr,Tc=m(()=>{"use strict";i();T();Jr=u({name:"discord-screenaudio",authors:[{name:"maltejur",id:205966226709676032n}],required:!0,description:"UI patches for discord-screenaudio.",patches:[]})});function Xr({value:e,onChange:t,validate:n}){let[r,s]=b.useState(e),[a,c]=b.useState();function f(d){s(d);let v=n(d);v===!0?(c(void 0),t(d)):c(v)}return o(l,null,o(Le,{type:"text",value:r,onChange:f,error:a}))}var Zr=m(()=>{"use strict";i();k()});function ru(e){let t=G.getCurrentUser().id;return Object.values(qe.getGuilds()).filter(n=>{if(!(n.ownerId===t||BigInt(jo.getGuildPermissions({id:n.id})&wc)===wc))return!1;let s=n.getMaxEmojiSlots(),{emojis:a}=nu.getGuilds()[n.id],c=0;for(let f of a)f.animated===e&&c++;return c<s}).sort((n,r)=>n.name.localeCompare(r.name))}async function iu(e,t,n,r){let s=await fetch(`https://cdn.discordapp.com/emojis/${t}.${r?"gif":"png"}`).then(c=>c.blob()),a=new FileReader;a.onload=()=>{ou({guildId:e,name:n,image:a.result}).then(()=>{A.show({message:`Successfully cloned ${n}!`,type:A.Type.SUCCESS,id:A.genId()})}).catch(c=>{new N("EmoteCloner").error("Failed to upload emoji",c),A.show({message:"Oopsie something went wrong :( Check console!!!",type:A.Type.FAILURE,id:A.genId()})})},a.readAsDataURL(s)}function cu({id:e,name:t,isAnimated:n}){let[r,s]=b.useState(!1),[a,c]=b.useState(t),[f,d]=b.useReducer(h=>h+1,0),v=b.useMemo(()=>ru(n),[n,f]);return o(l,null,o(y.FormTitle,{className:V.marginTop20},"Custom
discord.gg/${r.code}
Expires: <t:${new Date(r.expires_at).getTime()/1e3}:R>
Max uses: \`${r.max_uses}\`
`.trim().replace(/\s+/g," ")})}},{name:"view friend invites",description:"View a list of all generated friend invites.",inputType:3,execute:async(e,t)=>{let s=(await _e("createFriendInvite").getAllFriendInvites()).map(a=>`_discord.gg/${a.code}_
Expires: <t:${new Date(a.expires_at).getTime()/1e3}:R>
Times used: \`${a.uses}/${a.max_uses}\``.trim().replace(/\s+/g," "));return void U(t.channel.id,{content:s.join(`
`)||"You have no active friend invites!"})}},{name:"revoke friend invites",description:"Revokes ALL generated friend invite links.",inputType:3,execute:async(e,t)=>(await _e("createFriendInvite").revokeFriendInvites(),void U(t.channel.id,{content:"All friend links have been revoked."}))}]})});var uu,ci,zc=m(()=>{"use strict";i();pt();x();T();uu=/https?:\/\/twitter\.com(?=\/\w+?\/status\/)/g,ci=u({name:"FxTwitter",description:"Uses FxTwitter to improve embeds from twitter on send",authors:[p.Samu],dependencies:["MessageEventsAPI"],addPrefix(e){e.content=e.content.replace(uu,"https://fxtwitter.com")},start(){this.preSend=$e((e,t)=>this.addPrefix(t))},stop(){Ue(this.preSend)}})});var Bt={};ee(Bt,{clear:()=>bu,createStore:()=>Wc,del:()=>yu,delMany:()=>vu,entries:()=>Tu,get:()=>Je,getMany:()=>gu,keys:()=>Su,promisifyRequest:()=>he,set:()=>Re,setMany:()=>fu,update:()=>hu,values:()=>xu});function he(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Wc(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=he(n);return(s,a)=>r.then(c=>a(c.transaction(t,s).objectStore(t)))}function He(){return li||(li=Wc("VencordData","VencordStore")),li}function Je(e,t=He()){return t("readonly",n=>he(n.get(e)))}function Re(e,t,n=He()){return n("readwrite",r=>(r.put(t,e),he(r.transaction)))}function fu(e,t=He()){return t("readwrite",n=>(e.forEach(r=>n.put(r[1],r[0])),he(n.transaction)))}function gu(e,t=He()){return t("readonly",n=>Promise.all(e.map(r=>he(n.get(r)))))}function hu(e,t,n=He()){return n("readwrite",r=>new Promise((s,a)=>{r.get(e).onsuccess=function(){try{r.put(t(this.result),e),s(he(r.transaction))}catch(c){a(c)}}}))}function yu(e,t=He()){return t("readwrite",n=>(n.delete(e),he(n.transaction)))}function vu(e,t=He()){return t("readwrite",n=>(e.forEach(r=>n.delete(r)),he(n.transaction)))}function bu(e=He()){return e("readwrite",t=>(t.clear(),he(t.transaction)))}function pi(e,t){return e.openCursor().onsuccess=function(){!this.result||(t(this.result),this.result.continue())},he(e.transaction)}function Su(e=He()){return e("readonly",t=>{if(t.getAllKeys)return he(t.getAllKeys());let n=[];return pi(t,r=>n.push(r.key)).then(()=>n)})}function xu(e=He()){return e("readonly",t=>{if(t.getAll)return he(t.getAll());let n=[];return pi(t,r=>n.push(r.value)).then(()=>n)})}function Tu(e=He()){return e("readonly",t=>{if(t.getAll&&t.getAllKeys)return Promise.all([he(t.getAllKeys()),he(t.getAll())]).then(([r,s])=>r.map((a,c)=>[a,s[c]]));let n=[];return e("readonly",r=>pi(r,s=>n.push([s.key,s.value])).then(()=>n))})}var li,$t=m(()=>{"use strict";i();});var di={};ee(di,{_buildPopoverElements:()=>Pu,addButton:()=>Mt,buttons:()=>Xn,removeButton:()=>Rt});function Mt(e,t){Xn.set(e,t)}function Rt(e){Xn.delete(e)}function Pu(e,t){let n=[];for(let[r,s]of Xn.entries())try{let a=s(e);a&&(a.key??=r,n.push(t(a)))}catch(a){wu.error(`[${r}]`,a)}return n}var wu,Xn,fn=m(()=>{"use strict";i();le();wu=new N("MessagePopover"),Xn=new Map});var gn,Kc,ku,Iu,hn,qc,Mu,mi,Yc=m(()=>{"use strict";i();$t();fn();x();T();k();Kc="HideAttachments_HiddenIds",ku=()=>o("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},o("path",{d:"M5 21q-.825 0-1.413-.587Q3 19.825 3 19V5q0-.825.587-1.413Q4.175 3 5 3h14q.825 0 1.413.587Q21 4.175 21 5v14q0 .825-.587 1.413Q19.825 21 19 21Zm0-2h14V5H5v14Zm1-2h12l-3.75-5-3 4L9 13Zm-1 2V5v14Z"})),Iu=()=>o("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},o("path",{d:"m21 18.15-2-2V5H7.85l-2-2H19q.825 0 1.413.587Q21 4.175 21 5Zm-1.2 4.45L18.2 21H5q-.825 0-1.413-.587Q3 19.825 3 19V5.8L1.4 4.2l1.4-1.4 18.4 18.4ZM6 17l3-4 2.25 3 .825-1.1L5 7.825V19h11.175l-2-2Zm7.425-6.425ZM10.6 13.4Z"})),hn=new Set,qc=()=>Je(Kc).then(e=>(hn=e??new Set,hn)),Mu=e=>Re(Kc,e),mi=u({name:"HideAttachments",description:"Hide attachments and Embeds for individual messages via hover button",authors:[p.Ven],dependencies:["MessagePopoverAPI"],async start(){gn=document.createElement("style"),gn.id="VencordHideAttachments",document.head.appendChild(gn),await
:is(${e}) [class*="embedWrapper"] {
/* 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 qc();t.delete(e)||t.add(e),await Mu(t),await this.buildCss(),I.dispatch({type:"MESSAGE_UPDATE",message:{id:e}})}})});var ui,Qc=m(()=>{"use strict";i();x();T();ui=u({name:"iLoveSpam",description:"Do not hide messages from 'likely spammers'",authors:[p.botato,p.Animal],patches:[{find:"),{hasFlag:",replacement:{match:/(if\((.{1,2})<=1<<30\)return)/,replace:"if($2===(1<<20)){return false};$1"}}]})});var fi,Se,gi,Jc=m(()=>{"use strict";i();$t();x();T();L();fi=M("IgnoreActivities_reRenderGames"),Se=[],gi=u({name:"IgnoreActivities",authors:[p.Nuckyz],description:"Ignore certain activities (like games) from showing up on your status. You can configure which ones are ignored from the Registered Games tab.",patches:[{find:".Messages.SETTINGS_GAMES_OVERLAY_ON",replacement:[{match:/;(.\.renderOverlayToggle=function\(\).+?\)};)/,replace:(e,t)=>{let n=[{match:/,.{1,2}=.{1,2}\.overlayWarn/,replace:""},{match:/,.{1,2}=.{1,2}\?\(0,.{1,2}\.jsx\)\(.{1,20}Messages\.SETTINGS_GAMES_OVERLAY_WARNING.{1,100}null/,replace:""},{match:/,.{1,2}=.{1,2}\?.{1,50}Messages\.SETTINGS_GAMES_OVERLAY_OFF/,replace:""},{match:/[^[]{1,2},\(0,.{1,2}\.jsx\)\("div".{1,20}\(\)\.overlayStatusText.+}\),/,replace:""},{match:/renderOverlayToggle/,replace:"renderIgnoreActivitiesToggle"},{match:/((.)=this\.props\.game)(.{1,70})=.{1,2}overlay/,replace:"$1,IgnoreActivities_gameProps=$2$3=Vencord.Plugins.plugins.IgnoreActivities.isActivityEnabled(IgnoreActivities_gameProps)"},{match:/.\.handleOverlayToggle/,replace:"() => Vencord.Plugins.plugins.IgnoreActivities.handleActivityToggle(IgnoreActivities_gameProps)"},{match:/(\(0,.{1,2}\.jsx\)\()(.{2})\..(.{1,50}\.overlayToggleIconOn)/,replace:"$1$2.IgnoreActivities_toggleOn$3"},{match:/(\(0,.{1,2}\.jsx\)\()(.{2})\..{1}(.{1,50}\.overlayToggleIconOff)/,replace:"$1$2.IgnoreActivities_toggleOff$3"},{match:/text:.{2}\..\.Messages\.SETTINGS_GAMES_TOGGLE_OVERLAY/,replace:'text:"Toggle activity"'},{match:/"aria-label":.{2}\..\.Messages\.SETTINGS_GAMES_TOGGLE_OVERLAY/,replace:'"aria-label":"Toggle activity"'}].reduce((r,{match:s,replace:a})=>r.replace(s,a),t);return`;${t}${n}`}},{match:/(this.renderLastPlayed\(\)]}\),this.renderOverlayToggle\(\))/,replace:"$1,this.renderIgnoreActivitiesToggle()"}]},{find:'.displayName="RunningGameStore"',replacement:{match:/(.:\(\)=>.{2})(.+function (.{2})\(\){.+\.dispatch\({type:"RUNNING_GAMES_CHANGE")/,replace:"$1,IgnoreActivities_reRenderGames:()=>$3$2"}},{find:"M8.67872 19H11V21H7V23H17V21H13V19H20C21.103 19 22 18.104 22 17V6C22 5.89841 21.9924 5.79857 21.9777 5.70101L20 7.67872V15H12.6787L8.67872 19ZM13.1496 6H4V15H4.14961L2.00515 17.1445C2.00174 17.0967 2 17.0486 2 17V6C2 4.897 2.897 4 4 4H15.1496L13.1496 6Z",replacement:{match:/(.:\(\)=>.)(.+)(function (.)\(.{1,10}\.width.+\)\)})/s,replace:(e,t,n,r)=>{let s=[{match:/function ./,replace:"function IgnoreActivities_toggleOffToExport"},{match:/M8.67872 19H11V21H7V23H17V21H13V19H20C21.103 19 22 18.104 22 17V6C22 5.89841 21.9924 5.79857 21.9777 5.70101L20 7.67872V15H12.6787L8.67872 19ZM13.1496 6H4V15H4.14961L2.00515 17.1445C2.00174 17.0967 2 17.0486 2 17V6C2 4.897 2.897 4 4 4H15.1496L13.1496 6Z/,replace:"M 16 8 C 7.664063 8 1.25 15.34375 1.25 15.34375 L 0.65625 16 L 1.25 16.65625 C 1.25 16.65625 7.097656 23.324219 14.875 23.9375 C 15.246094 23.984375 15.617188 24 16 24 C 16.382813 24 16.753906 23.984375 17.125 23.9375 C 24.902344 23.324219 30.75 16.65625 30.75 16.65625 L 31.34375 16 L 30.75 15.34375 C 30.75 15.34375 24.335938 8 16 8 Z M 16 10 C 18.203125 10 20.234375 10.601563 22 11.40625 C 22.636719 12.460938 23 13.675781 23 15 C 23 18.613281 20.289063 21.582031 16.78125 21.96875 C 16.761719 21.972656 16.738281 21.964844 16.71875 21.96875 C 16.480469 21.980469 16.242188 22 16 22 C 15.734375 22 15.476563 21.984375 15.21875 21.96875 C 11.710938 21.582031 9 18.613281 9 15 C 9 13.695313 9.351563 12.480469 9.96875 11.4375 L 9.9375 11.4375 C 11.71875 10.617188 13.773438 10 16 10 Z M 16 12 C 14.34375 12 13 13.34375 13 15 C 13 16.65625 14.34375 18 16 18 C 17.65625 18 19 16.65625 19 15 C 19 13.34375 17.65625 12 16 12
.messagelogger-red-overlay .messageLogger-deleted {
background-color: rgba(240, 71, 71, 0.15);
}
.messagelogger-red-text .messageLogger-deleted div {
color: #f04747;
}
.messageLogger-deleted [class^="buttons"] {
display: none;
}
.messageLogger-deleted-attachment {
filter: grayscale(1);
}
.messageLogger-deleted-attachment:hover {
filter: grayscale(0);
transition: 250ms filter linear;
}
.theme-dark .messageLogger-edited {
filter: brightness(80%);
}
.theme-light .messageLogger-edited {
opacity: 0.5;
}
`,start(){this.moment=M("relativeTimeRounding","relativeTimeThreshold"),this.timestampModule=M("messageLogger_TimestampComponent");let e=this.style=document.createElement("style");e.textContent=this.css,e.id="MessageLogger-css",document.head.appendChild(e),sl()},stop(){this.style?.remove(),document.querySelectorAll(".messageLogger-deleted").forEach(e=>e.remove()),document.querySelectorAll(".messageLogger-edited").forEach(e=>e.remove()),document.body.classList.remove("messagelogger-red-overlay"),document.body.classList.remove("messagelogger-red-text")},renderEdit(e){let t=this.timestampModule.messageLogger_TimestampComponent;return o(D,{noop:!0},o("div",{className:"messageLogger-edited"},Ke.parse(e.content),o(t,{timestamp:e.timestamp,isEdited:!0,isInline:!1},o("span",null," ","(edited)"))))},makeEdit(e,t){return{timestamp:this.moment?.call(e.edited_timestamp),content:t.content}},options:{deleteStyle:{type:4,description:"The style of deleted messages",default:"text",options:[{label:"Red text",value:"text",default:!0},{label:"Red overlay",value:"overlay"}],onChange:()=>sl()},ignoreBots:{type:3,description:"Whether to ignore messages by bots",default:!1},ignoreSelf:{type:3,description:"Whether to ignore messages by yourself",default:!1}},handleDelete(e,t,n){try{let f=function(d){let v=e.get(d);if(!v)return;let h=64;(v.flags&h)===h||s&&v.author?.bot||a&&v.author?.id===c?e=e.remove(d):e=e.update(d,w=>w.set("deleted",!0).set("attachments",w.attachments.map(P=>(P.deleted=!0,P))))};var r=f;if(e==null||!n&&!e.has(t.id))return e;let{ignoreBots:s,ignoreSelf:a}=S.plugins.MessageLogger,c=G.getCurrentUser().id;n?t.ids.forEach(f):f(t.id)}catch(s){new N("MessageLogger").error("Error during handleDelete",s)}return e},patches:[{find:'displayName="MessageStore"',replacement:[{match:/MESSAGE_DELETE:function\((\w)\){var .+?((?:\w{1,2}\.){2})getOrCreate.+?},/,replace:"MESSAGE_DELETE:function($1){ var cache = $2getOrCreate($1.channelId); cache = Vencord.Plugins.plugins.MessageLogger.handleDelete(cache, $1, false); $2commit(cache);},"},{match:/MESSAGE_DELETE_BULK:function\((\w)\){var .+?((?:\w{1,2}\.){2})getOrCreate.+?},/,replace:"MESSAGE_DELETE_BULK:function($1){ var cache = $2getOrCreate($1.channelId); cache = Vencord.Plugins.plugins.MessageLogger.handleDelete(cache, $1, true); $2commit(cache);},"},{match:/(MESSAGE_UPDATE:function\((\w)\).+?)\.update\((\w)/,replace:"$1.update($3,m => $2.message.content !== m.editHistory?.[0]?.content && $2.message.content !== m.content ? m.set('editHistory',[...(m.editHistory || []), Vencord.Plugins.plugins.MessageLogger.makeEdit($2.message, m)]) : m).update($3"}]},{find:"isFirstMessageInForumPost=function",replacement:[{match:/(\w)\.customRenderedContent=(\w)\.customRenderedContent;/,replace:"$1.customRenderedContent = $2.customRenderedContent;$1.deleted = $2.deleted || false;$1.editHistory = $2.editHistory || [];"}]},{find:"THREAD_STARTER_MESSAGE?null===",replacement:[{match:/interactionData:(\w)\.interactionData/,replace:"interactionData:$1.interactionData,deleted:$1.deleted,editHistory:$1.editHistory,attachments:$1.attachments"},{match:/attachments:(\w{1,2})\((\w)\)/,replace:"attachments: $1((() => { let old = arguments[1]?.attachments; if (!old) return $2; let new_ = $2.attachments?.map(a => a.id) ?? []; let diff = old.filter(a => !new_.includes(a.id)); old.forEach(a => a.deleted = true); $2.attachments = [...diff, ...$2.attachments]; return $2;})()),deleted: arguments[1]?.deleted,editHistory: arguments[1]?.editHistory"},{match:/(\((\w)\){return null==\2\.attachments.+?)spoiler:/,replace:"$1deleted: arguments[0]?.deleted,spoiler:"}]},{find:'["className","attachment","inlineMedia"]',replacement:[{match:/((\w)\.className,\w=\2\.attachment),/,replace:"$1,deleted=$2.attachment?.deleted,"},{match:/(hiddenSpoilers:\w,className:)/,replace:"$1 (deleted ? 'messageLogger-deleted-attachment ' : '') +"}]},{find:"Message must not be a thread starter message",replacement:[{match:/var (\w)=(\w).id,(?=\w=\w.message)/,replace:"var $1=$2.id,deleted=$2.message.deleted,"},{match:/
`)}):(U(n.channel.id,{author:Xe,content:`${ft} The tag **${e.name}** does not exist anymore! Please reload ur Discord to fix :)`}),{content:`/${e.name}`}),[Eu]:!0},"CustomTags")}var ft,to,Eu,Xe,eo,Vn,Fu,Du,Ci,ll=m(()=>{"use strict";i();be();$t();R();x();T();ft="<:luna:1035316192220553236>",to="MessageTags_TAGS",Eu=Symbol("MessageTags"),Xe={id:"821472922140803112",bot:!1},eo=()=>Je(to).then(e=>e??[]),Vn=e=>Je(to).then(t=>(t??[]).find(n=>n.name===e)??null),Fu=async e=>{let t=await eo();return t.push(e),Re(to,t),t},Du=async e=>{let t=await eo();return t=await t.filter(n=>n.name!==e),Re(to,t),t};Ci=u({name:"MessageTags",description:"Allows you to save messages and to use them with a simple command.",authors:[p.Luna],options:{clyde:{name:"Clyde message on send",description:"If enabled, clyde will send you an ephemeral message when a tag was used.",type:3,default:!0}},dependencies:["CommandsAPI"],async start(){for(let e of await eo())cl(e)},commands:[{name:"tags",description:"Manage all the tags for yourself",inputType:0,options:[{name:"create",description:"Create a new tag",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0},{name:"message",description:"The message that you will send when using this tag",type:3,required:!0}]},{name:"list",description:"List all tags from yourself",type:1,options:[]},{name:"delete",description:"Remove a tag from your yourself",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0}]},{name:"preview",description:"Preview a tag without sending it publicly",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0}]}],async execute(e,t){switch(e[0].name){case"create":{let n=ce(e[0].options,"tag-name",""),r=ce(e[0].options,"message","");if(await Vn(n))return U(t.channel.id,{author:Xe,content:`${ft} A Tag with the name **${n}** already exists!`});let s={name:n,enabled:!0,message:r};cl(s),await Fu(s),U(t.channel.id,{author:Xe,content:`${ft} Successfully created the tag **${n}**!`});break}case"delete":{let n=ce(e[0].options,"tag-name","");if(!await Vn(n))return U(t.channel.id,{author:Xe,content:`${ft} A Tag with the name **${n}** does not exist!`});un(n),await Du(n),U(t.channel.id,{author:Xe,content:`${ft} Successfully deleted the tag **${n}**!`});break}case"list":{U(t.channel.id,{author:Xe,embeds:[{title:"All Tags:",description:(await eo()).map(n=>`\`${n.name}\`: ${n.message.slice(0,72).replaceAll("\\n"," ")}${n.message.length>72?"...":""}`).join(`
`)||`${ft} Woops! There are no tags yet, use \`/tags create\` to create one!`,color:14122879,type:"rich"}]});break}case"preview":{let n=ce(e[0].options,"tag-name",""),r=await Vn(n);if(!r)return U(t.channel.id,{author:Xe,content:`${ft} A Tag with the name **${n}** does not exist!`});U(t.channel.id,{author:Xe,content:r.message.replaceAll("\\n",`
`)});break}}return U(t.channel.id,{author:Xe,content:"Invalid sub-command"})}}]})});function Nu(e){let t="";for(let n=0;n<e.length;n++)t+=n%2?e[n].toUpperCase():e[n].toLowerCase();return t}var Ai,pl=m(()=>{"use strict";i();be();x();T();Ai=u({name:"MoreCommands",description:"echo, lenny, mock",authors:[p.Arjix,p.echo,p.Samu],dependencies:["CommandsAPI"],commands:[{name:"echo",description:"Sends a message as Clyde (locally)",options:[ut],inputType:3,execute:(e,t)=>{let n=ce(e,"message","");U(t.channel.id,{content:n})}},{name:"lenny",description:"Sends a lenny face",options:[ut],execute:e=>({content:ce(e,"message","")+" ( \u0361\xB0 \u035C\u0296 \u0361\xB0)"})},{name:"mock",description:"mOcK PeOpLe",options:[It],execute:e=>({content:Nu(ce(e,"message",""))})}]})});var _i,dl=m(()=>{"use strict";i();be();R();x();T();X("MoreKaomoji","moarKaomojis");_i=u({name:"MoreKaomoji",description:"Adds more Kaomoji to discord. \u30FD(\xB4\u25BD`)/",authors:[p.JacobTm],dependencies:["CommandsAPI"],commands:[{name:"dissatisfaction",description:" \uFF1E\uFE4F\uFF1C"},{name:"smug",description:" \u0CA0_\u0CA0"},{name:"happy",description:" \u30FD(\xB4\u25BD`)/"},{name:"crying",description:" \u0CA5_\u0CA5"},{name:"angry",description:" \u30FD(\uFF40\u0414\xB4)\uFF89"},{name:"anger",description:" \u30FD(\uFF4F`\u76BF\u2032\uFF4F)\uFF89"},{name:"joy",description:" <(\uFFE3\uFE36\uFFE3)>"}].map(e=>({...e,options:[ut],execute:t=>({content:ce(t,"message","")+e.description})}))})});function Bu(e,t){let n=0,r=0;for(;(r=e.indexOf(t,r)+1)!==0;)n++;return n}function $u(e,t){if(!t.global)throw new Error("pattern must be global");let n=0;for(;t.test(e);)n++;return n}function Hu(e){let t=Bu(e,Ei)+$u(e,Uu);return Math.min(t,10)}function Li(){if(!S.plugins.Moyai.triggerWhenUnfocused&&!document.hasFocus())return;let e=document.createElement("audio");e.src=Ou,e.volume=S.plugins.Moyai.volume,e.play()}var Ei,Ou,Fi,Uu,ml=m(()=>{"use strict";i();R();Jn();x();O();T();k();Ei="\u{1F5FF}",Ou="https://raw.githubusercontent.com/MeguminSama/VencordPlugins/main/plugins/moyai/moyai.mp3",Fi=u({name:"Moyai",authors:[p.Megu,p.Nuckyz],description:"\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}\u{1F5FF}",async onMessage(e){if(e.optimistic||e.type!=="MESSAGE_CREATE"||e.message.state==="SENDING"||S.plugins.Moyai.ignoreBots&&e.message.author?.bot||!e.message.content||e.channelId!==pe.getChannelId())return;let t=Hu(e.message.content);for(let n=0;n<t;n++)Li(),await Vt(300)},onReaction(e){if(e.optimistic||e.type!=="MESSAGE_REACTION_ADD"||S.plugins.Moyai.ignoreBots&&G.getUser(e.userId)?.bot||e.channelId!==pe.getChannelId())return;let t=e.emoji.name.toLowerCase();t!==Ei&&!t.includes("moyai")&&!t.includes("moai")||Li()},onVoiceChannelEffect(e){if(!e.emoji?.name)return;let t=e.emoji.name.toLowerCase();t!==Ei&&!t.includes("moyai")&&!t.includes("moai")||Li()},start(){I.subscribe("MESSAGE_CREATE",this.onMessage),I.subscribe("MESSAGE_REACTION_ADD",this.onReaction),I.subscribe("VOICE_CHANNEL_EFFECT_SEND",this.onVoiceChannelEffect)},stop(){I.unsubscribe("MESSAGE_CREATE",this.onMessage),I.unsubscribe("MESSAGE_REACTION_ADD",this.onReaction),I.unsubscribe("VOICE_CHANNEL_EFFECT_SEND",this.onVoiceChannelEffect)},options:{volume:{description:"Volume of the \u{1F5FF}\u{1F5FF}\u{1F5FF}",type:5,markers:Ot(0,1,.1),default:.5,stickToMarkers:!1},triggerWhenUnfocused:{description:"Trigger the \u{1F5FF} even when the window is unfocused",type:3,default:!0,restartNeeded:!1},ignoreBots:{description:"Ignore bots",type:3,default:!0,restartNeeded:!1}}});Uu=/<a?:\w*moy?ai\w*:\d{17,20}>/gi});var Di,ul=m(()=>{"use strict";i();x();T();Di=u({name:"MuteNewGuild",description:"Mutes newly joined guilds",authors:[p.Glitch],patches:[{find:",acceptInvite:function",replacement:{match:/(\w=null!==[^;]+)/,replace:"$1;Vencord.Webpack.findByProps('updateGuildNotificationSettings').updateGuildNotificationSettings($1,{'muted':true,'suppress_everyone':true,'suppress_roles':true})"}}]})});var ju,Ni,fl=m(()=>{"use strict";i();R();x();T();L();ju=M("getRelationships","isBlocked"),Ni=u({name:"NoBlockedMessages",descriptio
`,a),"Failed to fetch user. Check the console for more info."}}return null}var Pl,Gu,zu,no,Wu,qu,Ku,Yu,qi,Il=m(()=>{"use strict";i();be();x();Qn();O();T();L();Pl=0,Gu=20,zu=128,no=10,Wu=Fe(()=>Promise.all(Array.from({length:no},(e,t)=>kl(`https://raw.githubusercontent.com/VenPlugs/petpet/main/frames/pet${t}.gif`)))),qu=re(".USER("),Ku=re("UPLOAD_FILE_LIMIT_ERROR"),Yu=M("getUploads");qi=u({name:"petpet",description:"headpet a cutie",authors:[p.Ven],dependencies:["CommandsAPI"],commands:[{inputType:0,name:"petpet",description:"Create a petpet gif. You can only specify one of the image options",options:[{name:"delay",description:"The delay between each frame. Defaults to 20.",type:4},{name:"resolution",description:"Resolution for the gif. Defaults to 120. If you enter an insane number and it freezes Discord that's your fault.",type:4},{name:"image",description:"Image attachment to use",type:11},{name:"url",description:"URL to fetch image from",type:3},{name:"user",description:"User whose avatar to use as image",type:6},{name:"no-server-pfp",description:"Use the normal avatar instead of the server specific one when using the 'user' option",type:5}],execute:async(e,t)=>{let{GIFEncoder:n,quantize:r,applyPalette:s}=await Yn(),a=await Wu(),c=ce(e,"no-server-pfp",!1);try{var f=await Qu(e,t,c);if(!f)throw"No Image specified!"}catch(_){U(t.channel.id,{content:String(_)});return}let d=await kl(f),v=ce(e,"delay",Gu),h=ce(e,"resolution",zu),g=new n,w=document.createElement("canvas");w.width=w.height=h;let P=w.getContext("2d");for(let _=0;_<no;_++){P.clearRect(0,0,w.width,w.height);let oe=_<no/2?_:no-_,C=.8+oe*.02,q=.8-oe*.05,se=(1-C)*.5+.1,de=1-q-.08;P.drawImage(d,se*h,de*h,C*h,q*h),P.drawImage(a[_],0,0,h,h);let{data:Ie}=P.getImageData(0,0,h,h),ge=r(Ie,256),Ge=s(Ie,ge);g.writeFrame(Ge,h,h,{transparent:!0,palette:ge,delay:v})}g.finish();let B=new File([g.bytesView()],"petpet.gif",{type:"image/gif"});setImmediate(()=>Ku([B],t.channel,Pl))}}]})});var Ki,Ml=m(()=>{"use strict";i();x();T();Ki=u({name:"PlainFolderIcon",description:"Doesn't show the small guild icons in folders",authors:[p.botato],patches:[{find:"().expandedFolderIconWrapper",replacement:[{match:/\(\w\|\|\w\)&&(\(.{0,40}\(.{1,3}\.animated)/,replace:"$1"}]}]})});function oo(e,t="0 0 24 24"){return({color:n,tooltip:r})=>o(me,{text:r},s=>o("svg",{...s,height:"18",width:"18",viewBox:t,fill:n},o("path",{d:e})))}var Rl,Ju,Xu,Zu,Yi,Cl=m(()=>{"use strict";i();R();ne();x();T();L();k();Rl={desktop:oo("M4 2.5c-1.103 0-2 .897-2 2v11c0 1.104.897 2 2 2h7v2H7v2h10v-2h-4v-2h7c1.103 0 2-.896 2-2v-11c0-1.103-.897-2-2-2H4Zm16 2v9H4v-9h16Z"),web:oo("M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2Zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93Zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39Z"),mobile:oo("M15.5 1h-8A2.5 2.5 0 0 0 5 3.5v17A2.5 2.5 0 0 0 7.5 23h8a2.5 2.5 0 0 0 2.5-2.5v-17A2.5 2.5 0 0 0 15.5 1zm-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zm4.5-4H7V4h9v14z"),console:oo("M14.8 2.7 9 3.1V47h3.3c1.7 0 6.2.3 10 .7l6.7.6V2l-4.2.2c-2.4.1-6.9.3-10 .5zm1.8 6.4c1 1.7-1.3 3.6-2.7 2.2C12.7 10.1 13.5 8 15 8c.5 0 1.2.5 1.6 1.1zM16 33c0 6-.4 10-1 10s-1-4-1-10 .4-10 1-10 1 4 1 10zm15-8v23.3l3.8-.7c2-.3 4.7-.6 6-.6H43V3h-2.2c-1.3 0-4-.3-6-.6L31 1.7V25z","0 0 50 50")},Ju=re("STATUS_YELLOW","TWITCH","STATUS_GREY"),Xu=({platform:e,status:t})=>{let n=e[0].toUpperCase()+e.slice(1),r=Rl[e]??Rl.desktop;return o(r,{color:`var(--${Ju(t)}`,tooltip:n})},Zu=({user:e})=>{if(!e||e.bot)return null;let t=Xt.getState()?.clientStatuses?.[e.id];if(!t)return null;let n=Object.entries(t).map(([r,s])=>o(Xu,{key:r,platform:r,status:s}));return n.length?o("div",{className:"vc-platform-indicator",style:{display:"flex",alignItems:"center",marginLeft:"4px",gap:"4px"}},n):null},Yi=u({name:"PlatformIndicators",description:"Adds platform indicators (Desktop, Mobile, Web...) to users",authors:[p.kemo],patches:[{find:"this.renderPremium()",predi
margin-top: 20px;
margin-bottom: -2px;
border-bottom: 2px solid var(--background-modifier-accent);
}
.vcSettingsTabBarItem {
margin-right: 32px;
padding-bottom: 16px;
margin-bottom: -2px;
}
.vcSettingsQuickActionCard {
padding: 1em;
display: flex;
gap: 1em;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
flex-grow: 1;
flex-direction: row;
margin-bottom: 1em;
}
`});async function bf(e){try{var t=JSON.parse(e)}catch(n){throw console.log(e),new Error("Failed to parse JSON: "+String(n))}if("settings"in t&&"quickCss"in t)await VencordNative.ipc.invoke(j.SET_SETTINGS,JSON.stringify(t.settings,null,4)),await VencordNative.ipc.invoke(j.SET_QUICK_CSS,t.quickCss);else throw new Error("Invalid Settings. Is this even a Vencord Settings file?")}async function Sf(){let e=JSON.parse(VencordNative.ipc.sendSync(j.GET_SETTINGS)),t=await VencordNative.ipc.invoke(j.GET_QUICK_CSS);return JSON.stringify({settings:e,quickCss:t},null,4)}async function mp(){let e="vencord-settings-backup.json",t=await Sf(),n=new TextEncoder().encode(t);{let r=new File([n],e,{type:"application/json"}),s=document.createElement("a");s.href=URL.createObjectURL(r),s.download=e,document.body.appendChild(s),s.click(),setImmediate(()=>{URL.revokeObjectURL(s.href),document.body.removeChild(s)})}}async function up(e=!0){if(!0){let t=document.createElement("input");t.type="file",t.style.display="none",t.accept="application/json",t.onchange=async()=>{let n=t.files?.[0];if(!n)return;let r=new FileReader;r.onload=async()=>{try{await bf(r.result),e&&xf()}catch(s){new N("SettingsSync").error(s),e&&Tf(s)}},r.readAsText(n)},document.body.appendChild(t),t.click(),setImmediate(()=>document.body.removeChild(t))}else if(t)try{}catch(n){}}var xf,Tf,fp=m(()=>{"use strict";i();k();ze();le();xf=()=>A.show({type:A.Type.SUCCESS,message:"Settings successfully imported. Restart to apply changes!",id:A.genId()}),Tf=e=>A.show({type:A.Type.FAILURE,message:`Failed to import settings: ${String(e)}`,id:A.genId()})});function wf(){return o(y.FormSection,{title:"Settings Sync"},o(Te,{style:{backgroundColor:"var(--info-warning-background)",borderColor:"var(--info-warning-foreground)",color:"var(--info-warning-text)",padding:"1em",marginBottom:"0.5em"}},o(Z,{flexDirection:"column"},o("strong",null,"Warning"),o("span",null,"Importing a settings file will overwrite your current settings."))),o(Y,{variant:"text-md/normal",className:V.marginBottom8},"You can import and export your Vencord settings as a JSON file. This allows you to easily transfer your settings to another device, or recover your settings after reinstalling Vencord or Discord."),o(Y,{variant:"text-md/normal",className:V.marginBottom8},"Settings Export contains:",o("ul",null,o("li",null,"\u2014 Custom QuickCSS"),o("li",null,"\u2014 Plugin Settings"))),o(Z,null,o(F,{onClick:up,size:F.Sizes.SMALL},"Import Settings"),o(F,{onClick:mp,size:F.Sizes.SMALL},"Export Settings")))}var gp,hp=m(()=>{"use strict";i();ne();Ne();fp();k();gp=D.wrap(wf)});var hs={};ee(hs,{UpdateLogger:()=>yp,changes:()=>xn,checkForUpdates:()=>vp,getRepo:()=>bp,isNewer:()=>fs,isOutdated:()=>Ct,rebuild:()=>yo,update:()=>ho,updateError:()=>gs});async function Ht(e){let t=await e;if(t.ok)return t.value;throw gs=t.error,t.error}async function vp(){return xn=await Ht(VencordNative.ipc.invoke(j.GET_UPDATES)),xn.some(e=>e.hash===Tt)?(fs=!0,Ct=!1):Ct=xn.length>0}async function ho(){if(!Ct)return!0;let e=await Ht(VencordNative.ipc.invoke(j.UPDATE));return e&&(Ct=!1),e}function bp(){return Ht(VencordNative.ipc.invoke(j.GET_REPO))}async function yo(){let e=await Ht(VencordNative.ipc.invoke(j.GET_HASHES));if(!await Ht(VencordNative.ipc.invoke(j.BUILD)))throw new Error("The Build failed. Please try manually building the new update");let t=await Ht(VencordNative.ipc.invoke(j.GET_HASHES));return e["patcher.js"]!==t["patcher.js"]||e["preload.js"]!==t["preload.js"]}var yp,Ct,fs,gs,xn,Tn=m(()=>{"use strict";i();nn();ze();le();yp=new N("Updater","white"),Ct=!1,fs=!1});async function Sp(){Ct&&setImmediate(async()=>{if(confirm("Uh Oh! Failed to render this Page. However, there is an update available that might fix it. Would you like to update and restart now?"))try{await ho(),await yo(),location.reload()}catch(t){console.error(t),alert("That also failed :( Try updating or reinstalling with the installer!")}})}var ys=m(()=>{"use strict";i();Tn()});var wn,vs=m(()=>{"use strict";i();wn=class{set=new Set;get changeCount(){return this.set.size}get hasChang
`,n),!1}}if(t.commands?.length){ke.info("Registering commands of plugin",t.name);for(let n of t.commands)try{Nt(n,t.name)}catch(r){return ke.error(`Failed to register command ${n.name}
`,r),!1}}return!0},e=>`startPlugin ${e.name}`),xs=Ve("stopPlugin",function(t){if(t.stop){if(ke.info("Stopping plugin",t.name),!t.started)return ke.warn(`${t.name} already stopped`),!1;try{t.stop(),t.started=!1}catch(n){return ke.error(`Failed to stop ${t.name}
`,n),!1}}if(t.commands?.length){ke.info("Unregistering commands of plugin",t.name);for(let n of t.commands)try{un(n.name)}catch(r){return ke.error(`Failed to unregister command ${n.name}
`,r),!1}}return!0},e=>`stopPlugin ${e.name}`)});function Pp(e){let t=new Rf({username:e.name,id:Gr(),bot:!0});return I.dispatch({type:"USER_UPDATE",user:t}),t}function ws({plugin:e,onRestartNeeded:t,onClose:n,transitionState:r}){let[s,a]=b.useState([]),c=De().plugins[e.name],[f,d]=b.useState({}),[v,h]=b.useState({}),[g,w]=b.useState(null),P=()=>Object.values(v).every(C=>!C);b.useEffect(()=>{(async()=>{for(let C of e.authors.slice(0,6)){let q=C.id?await Zt.fetchUser(`${C.id}`).catch(()=>Pp(C)):Pp(C);a(se=>[...se,q])}})()},[]);async function B(){if(!e.options){n();return}if(e.beforeSave){let q=await Promise.resolve(e.beforeSave(f));if(q!==!0){w(q);return}}let C=!1;for(let[q,se]of Object.entries(f)){let de=e.options[q];c[q]=se,de?.onChange?.(se),de?.restartNeeded&&(C=!0)}C&&t(),n()}function _(){if(!c||!e.options)return o(y.FormText,null,"There are no settings for this plugin.");let C=Object.entries(e.options).map(([q,se])=>{function de(Ge){d(yt=>({...yt,[q]:Ge}))}function Ie(Ge){h(yt=>({...yt,[q]:Ge}))}let ge=Cf[se.type];return o(ge,{id:q,key:q,option:se,onChange:de,onError:Ie,pluginSettings:c})});return o(Z,{flexDirection:"column",style:{gap:12}},C)}function oe(C,q){let se=e.authors.length-q,de=e.authors.length-se,Ie=de+e.authors.length-q;return o(me,{text:e.authors.slice(de,Ie).map(ge=>ge.name).join(", ")},({onMouseEnter:ge,onMouseLeave:Ge})=>o("div",{className:Mf.moreUsers,onMouseEnter:ge,onMouseLeave:Ge},"+",se))}return o(Be,{transitionState:r,size:"medium"},o(nt,null,o(Y,{variant:"heading-md/bold"},e.name)),o(ot,{style:{marginBottom:8,marginTop:8}},o(y.FormSection,null,o(y.FormTitle,{tag:"h3"},"About ",e.name),o(y.FormText,null,e.description),o("div",{style:{marginTop:8,marginBottom:8,width:"fit-content"}},o(If,{users:s,count:e.authors.length,guildId:void 0,renderIcon:!1,max:6,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:oe}))),!!e.settingsAboutComponent&&o("div",{style:{marginBottom:8}},o(y.FormSection,null,o(D,{message:"An error occurred while rendering this plugin's custom InfoComponent"},o(e.settingsAboutComponent,null)))),o(y.FormSection,null,o(y.FormTitle,{tag:"h3"},"Settings"),_())),o(sn,null,o(Z,{flexDirection:"column",style:{width:"100%"}},o(Z,{style:{marginLeft:"auto"}},o(F,{onClick:n,size:F.Sizes.SMALL,color:F.Colors.RED},"Cancel"),o(me,{text:"You must fix all errors before saving",shouldShow:!P()},({onMouseEnter:C,onMouseLeave:q})=>o(F,{size:F.Sizes.SMALL,color:F.Colors.BRAND,onClick:B,onMouseEnter:C,onMouseLeave:q,disabled:!P()},"Save & Close"))),g&&o(Y,{variant:"text-md/semibold",style:{color:"var(--text-danger)"}},"Error while saving: ",g))))}var If,Mf,Rf,Cf,kp=m(()=>{"use strict";i();be();R();ne();Ne();O();Ye();Et();T();L();k();ri();If=Q(()=>xe("defaultRenderUser","showDefaultAvatarsForNullUsers")),Mf=M("moreUsers","emptyUser","avatarContainer","clickableAvatar"),Rf=We(()=>G.getCurrentUser().constructor);Cf={[0]:Bc,[1]:oi,[2]:oi,[3]:Ac,[4]:Dc,[5]:Oc,[6]:Lc}});var Ps,Ip,Mp,Rp,Cp=m(()=>{"use strict";i();Ps={marginTop:16,display:"grid",gridGap:16,gridTemplateColumns:"repeat(auto-fill, minmax(250px, 1fr))"},Ip={backgroundColor:"var(--background-modifier-selected)",color:"var(--interactive-active)",borderRadius:3,cursor:"pointer",display:"block",height:"min-content",padding:10,width:"100%"},Mp={gap:10,height:40,gridTemplateColumns:"1fr 150px",display:"grid"},Rp={height:"24px",width:"24px",padding:"0",background:"transparent",marginRight:8}});function Ef(e){A.show({message:e,type:A.Type.FAILURE,id:A.genId(),options:{position:A.Position.BOTTOM}})}function Ff({plugins:e,...t}){if(e.length===0)return null;let n=e.length===1?"The plugin":"The following plugins require a reload to apply changes:",r=e.length===1?" requires a reload to apply changes.":".";return o(rn,{...t,style:{padding:"1em",display:"grid",gridTemplateColumns:"1fr auto",gap:8,...t.style}},o("span",{style:{margin:"auto 0"}},n," ",o("code",null,e.join(", ")),r),o(F,{look:F.Looks.INVERTED,onClick:()=>location.reload()},"Reload"))}function Lp({plugin:e,disabled:t,onRestartNeeded:n,onMouseEnter:r,onMouseLeave:s}){let c=De().plug
`),className:Nf.textarea,placeholder:"Theme Links",spellCheck:!1,onBlur:n}),o(Bf,{themeLinks:e.themeLinks}))})});var Op=m(()=>{"use strict";i();ne();qn();Ne();ys();wt();O();Tn();k();nn()});function Uf(){let[e,,t]=ve(()=>VencordNative.ipc.invoke(j.GET_SETTINGS_DIR),{fallbackValue:"Loading..."}),n=De(),[r]=b.useState(Math.random()>.5?"https://cdn.discordapp.com/emojis/1026533090627174460.png":"https://media.discordapp.net/stickers/1039992459209490513.png");return o(b.Fragment,null,o(Hf,{image:r}),o(y.FormSection,{title:"Quick Actions"},o(Te,{className:$f("QuickActionCard")},o(F,{onClick:()=>VencordNative.ipc.send(j.OPEN_EXTERNAL,e),size:F.Sizes.SMALL,disabled:e==="Loading..."},"Launch Directory"))),o(y.FormDivider,null),o(y.FormSection,{title:"Settings"},o(y.FormText,{className:V.marginBottom20},'Hint: You can change the position of this settings section in the settings of the "Settings" plugin!'),o(bt,{value:n.useQuickCss,onChange:s=>n.useQuickCss=s,note:"Loads styles from your QuickCss file"},"Use QuickCss"),!1))}function Hf({image:e}){return o(Te,{style:{padding:"1em",display:"flex",flexDirection:"row",marginBottom:"1em",marginTop:"1em"}},o("div",null,o(y.FormTitle,{tag:"h5"},"Support the Project"),o(y.FormText,null,"Please consider supporting the Development of Vencord by donating!"),o(on,{style:{transform:"translateX(-1em)"}})),o("img",{role:"presentation",src:e,alt:"",height:128,style:{marginLeft:"auto",transform:"rotate(10deg)"}}))}var $f,Bp,$p=m(()=>{"use strict";i();R();sr();ne();ze();O();k();$f=e=>`vcSettings${e}`;Bp=D.wrap(Uf)});var Gp={};ee(Gp,{default:()=>Ms});function jf(e){let{tab:t="VencordSettings"}=e,n=Hp[t]?.component;return o(y.FormSection,null,o(Y,{variant:"heading-md/normal",tag:"h2"},"Vencord Settings"),o(xo,{type:xo.Types.TOP,look:xo.Looks.BRAND,className:Up("TabBar"),selectedItem:t,onItemSelect:jn.open},Object.entries(Hp).map(([r,{name:s,component:a}])=>a?o(xo.Item,{id:r,className:Up("TabBarItem"),key:r},s):null)),o(y.FormDivider,null),n&&o(n,null))}function Ms(e){return o(D,null,o(jf,{tab:e.tab}))}var jp,Up,xo,Hp,Rs=m(()=>{"use strict";i();ne();L();k();dp();hp();Fp();Np();Op();$p();jp=document.createElement("style");jp.textContent=pp;document.head.appendChild(jp);Up=e=>`vcSettings${e}`,xo=re('[role="tab"][aria-disabled="false"]'),Hp={VencordSettings:{name:"Vencord",component:()=>o(Bp,null)},VencordPlugins:{name:"Plugins",component:()=>o(Ep,null)},VencordThemes:{name:"Themes",component:()=>o(Dp,null)},VencordUpdater:{name:"Updater"},VencordSettingsSync:{name:"Backup & Restore",component:()=>o(gp,null)}}});var kn,Cs,zp=m(()=>{"use strict";i();R();x();le();O();T();nn();kn=Q(()=>(Rs(),Ao(Gp)).default),Cs=u({name:"Settings",description:"Adds Settings UI and debug info",authors:[p.Ven,p.Megu],required:!0,patches:[{find:"().versionHash",replacement:[{match:/\[\(0,.{1,3}\.jsxs?\)\((.{1,10}),(\{[^{}}]+\{.{0,20}\(\)\.versionHash,.+?\})\)," "/,replace:(e,t,n)=>(n=n.replace(/children:\[.+\]/,""),`${e},Vencord.Plugins.plugins.Settings.makeInfoElements(${t}, ${n})`)}]},{find:"Messages.ACTIVITY_SETTINGS",replacement:{get match(){switch(S.plugins.Settings.settingsLocation){case"top":return/\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.USER_SETTINGS\}/;case"aboveNitro":return/\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.BILLING_SETTINGS\}/;case"belowNitro":return/\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.APP_SETTINGS\}/;case"aboveActivity":return/\{section:(.{1,2})\.ID\.HEADER,\s*label:(.{1,2})\..{1,2}\.Messages\.ACTIVITY_SETTINGS\}/;case"belowActivity":return/(?<=\{section:(.{1,2})\.ID\.DIVIDER},)\{section:"changelog"/;case"bottom":return/\{section:(.{1,2})\.ID\.CUSTOM,\s*element:.+?}/;default:return new N("Settings").error(new Error("No switch case matched????? Don't mess with the settings, silly")),/(?!a)a/}},replace:(e,t)=>{let n="",r="";return`{section:${t}.ID.HEADER,label:"Vencord"},{section:"VencordSettings",label:"Vencord",element:Vencord.Plugins.plugins.Settings.tabs.vencord},{section:"VencordPlugins",label:"Plugins",element:Vencord.P
border-radius: 4px;
}
.shiki-root code {
display: block;
overflow-x: auto;
padding: 0.5em;
position: relative;
font-size: 0.875rem;
line-height: 1.125rem;
text-indent: 0;
white-space: pre-wrap;
background: transparent;
border: none;
}
.shiki-root [class^='devicon-'],
.shiki-root [class*=' devicon-'] {
margin-right: 8px;
user-select: none;
}
.shiki-plain code {
padding-top: 8px;
}
.shiki-btns {
font-size: 1em;
position: absolute;
right: 0;
bottom: 0;
opacity: 0;
}
.shiki-root:hover .shiki-btns {
opacity: 1;
}
.shiki-btn {
border-radius: 4px 4px 0 0;
padding: 4px 8px;
}
.shiki-btn~.shiki-btn {
margin-left: 4px;
}
.shiki-btn:last-child {
border-radius: 4px 0;
}
.shiki-spinner-container {
align-items: center;
background-color: rgba(0, 0, 0, 0.6);
display: flex;
position: absolute;
justify-content: center;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.shiki-preview {
margin-bottom: 2em;
}
.shiki-lang {
padding: 0 5px;
margin-bottom: 6px;
font-weight: bold;
text-transform: capitalize;
display: flex;
align-items: center;
}
.shiki-table {
border-collapse: collapse;
width: 100%;
}
.shiki-table tr {
height: 19px;
width: 100%;
}
.shiki-root td:first-child {
border-right: 1px solid transparent;
padding-left: 5px;
padding-right: 8px;
user-select: none;
}
.shiki-root td:last-child {
padding-left: 8px;
word-break: break-word;
width: 100%;
}
`});var Xp=Qt((lk,As)=>{"use strict";i();var Gf=Object.prototype.hasOwnProperty,ye="~";function In(){}Object.create&&(In.prototype=Object.create(null),new In().__proto__||(ye=!1));function zf(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function Jp(e,t,n,r,s){if(typeof n!="function")throw new TypeError("The listener must be a function");var a=new zf(n,r||e,s),c=ye?ye+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function To(e,t){--e._eventsCount===0?e._events=new In:delete e._events[t]}function fe(){this._events=new In,this._eventsCount=0}fe.prototype.eventNames=function(){var t=[],n,r;if(this._eventsCount===0)return t;for(r in n=this._events)Gf.call(n,r)&&t.push(ye?r.slice(1):r);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(n)):t};fe.prototype.listeners=function(t){var n=ye?ye+t:t,r=this._events[n];if(!r)return[];if(r.fn)return[r.fn];for(var s=0,a=r.length,c=new Array(a);s<a;s++)c[s]=r[s].fn;return c};fe.prototype.listenerCount=function(t){var n=ye?ye+t:t,r=this._events[n];return r?r.fn?1:r.length:0};fe.prototype.emit=function(t,n,r,s,a,c){var f=ye?ye+t:t;if(!this._events[f])return!1;var d=this._events[f],v=arguments.length,h,g;if(d.fn){switch(d.once&&this.removeListener(t,d.fn,void 0,!0),v){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,n),!0;case 3:return d.fn.call(d.context,n,r),!0;case 4:return d.fn.call(d.context,n,r,s),!0;case 5:return d.fn.call(d.context,n,r,s,a),!0;case 6:return d.fn.call(d.context,n,r,s,a,c),!0}for(g=1,h=new Array(v-1);g<v;g++)h[g-1]=arguments[g];d.fn.apply(d.context,h)}else{var w=d.length,P;for(g=0;g<w;g++)switch(d[g].once&&this.removeListener(t,d[g].fn,void 0,!0),v){case 1:d[g].fn.call(d[g].context);break;case 2:d[g].fn.call(d[g].context,n);break;case 3:d[g].fn.call(d[g].context,n,r);break;case 4:d[g].fn.call(d[g].context,n,r,s);break;default:if(!h)for(P=1,h=new Array(v-1);P<v;P++)h[P-1]=arguments[P];d[g].fn.apply(d[g].context,h)}}return!0};fe.prototype.on=function(t,n,r){return Jp(this,t,n,r,!1)};fe.prototype.once=function(t,n,r){return Jp(this,t,n,r,!0)};fe.prototype.removeListener=function(t,n,r,s){var a=ye?ye+t:t;if(!this._events[a])return this;if(!n)return To(this,a),this;var c=this._events[a];if(c.fn)c.fn===n&&(!s||c.once)&&(!r||c.context===r)&&To(this,a);else{for(var f=0,d=[],v=c.length;f<v;f++)(c[f].fn!==n||s&&!c[f].once||r&&c[f].context!==r)&&d.push(c[f]);d.length?this._events[a]=d.length===1?d[0]:d:To(this,a)}return this};fe.prototype.removeAllListeners=function(t){var n;return t?(n=ye?ye+t:t,this._events[n]&&To(this,n)):(this._events=new In,this._eventsCount=0),this};fe.prototype.off=fe.prototype.removeListener;fe.prototype.addListener=fe.prototype.on;fe.prefixed=ye;fe.EventEmitter=fe;typeof As<"u"&&(As.exports=fe)});var Fs=Qt(jt=>{"use strict";i();Object.defineProperty(jt,"__esModule",{value:!0});jt.Channel=jt.ChannelPort=void 0;var Wf=Xp(),wo="vapIpc",_s=Symbol.for("vapIpc.edgeCreate"),Ls=class{_pipes=new Map;_listeners=new Map;_createListenerMap(){return new Map}_emit(t,n,...r){for(let[s,a]of this._listeners.entries()){if(s===t)continue;let c=a.get(n);c&&c(...r)}}createPipe(t){let n=this.getPipe(t);if(n)return n;let r=this._createListenerMap();this._listeners.set(t,r);let s={emit:this._emit.bind(this,t),listen:(a,c)=>void r.set(a,c)};return this._pipes.set(t,s),s}getPipe(t){return this._pipes.get(t)??null}};jt.ChannelPort=Ls;var Es=class{id;_edges=new Map;_callbacks=new Map;_callers=new Map;_edgePipes=new Map;_pipes=[];_emitter=new Wf.EventEmitter;_logger;_destroyed=!1;constructor(t){this.id=t}addPipe(t){t.listen(`${wo}:handshake`,n=>{this._handleHandshake(t,n)}),t.listen(`${wo}:message`,n=>{this._handleMessage(t,n)}),this._pipes.push(t),this._logger?.log(`Adding pipe to channel "${this.id}"`)}setLogger(t){this._logger=t}_handleHandshake(t,n){if(this.id===n.id)return;this._logger?.log(`\u{1F91D} "${n.id}" -> "${this.id}" (edges: [${n.channelIds.join(", ")}])`);let r=this._edges.get(n.id);if(r){let s=n.channelIds.filter(a=>!r?.channelIds.includ
`).map((d,v)=>o("span",{key:v,dangerouslySetInnerHTML:{__html:d}}))}catch{a=r.split(`
`).map(f=>o("span",null,f))}else a=(s??r.split(`
`).map(d=>[{color:e.plainColor,content:d}])).map(d=>d.length===0?o("span",null,`
`):o(l,null,d.map(({content:v,color:h,fontStyle:g},w)=>o("span",{key:w,style:{color:h,fontStyle:(g??0)&1?"italic":void 0,fontWeight:(g??0)&2?"bold":void 0,textDecoration:(g??0)&4?"underline":void 0}},v))));let c=a.map((f,d)=>o("tr",{key:d},o("td",{style:{color:e.plainColor}},d+1),o("td",null,f)));return o("table",{className:je("table")},...c)}});function wd({langName:e,useDevIcon:t,shikiLang:n}){return e?o("div",{className:je("lang")},t!=="DISABLED"&&n?.devicon&&o("i",{className:`devicon-${n.devicon}${t==="COLOR"?" colored":""}`}),e):o(l,null)}var Pd=m(()=>{"use strict";i();Io();Mn()});var qs,og,kd=m(()=>{"use strict";i();ne();O();ld();k();ko();Ws();dd();js();ud();Mn();Sd();Td();Pd();qs=e=>o(D,null,o(og,{...e})),og=({lang:e,content:t,isPreview:n})=>{let{tryHljs:r,useDevIcon:s,bgOpacity:a}=pd(["tryHljs","useDevIcon","bgOpacity"]),{id:c,theme:f}=nd(),d=e?At(e):null,v=fd({lang:e,tryHljs:r}),[h,g]=cd(!0),[w]=ve(async()=>!d||v||!g?null:await H.tokenizeCode(t,e),{fallbackValue:null,deps:[e,t,c,g]}),P={plainColor:f?.fg||"var(--text-normal)",accentBgColor:f?.colors?.["statusBar.background"]||(v?"#7289da":"#007BC8"),accentFgColor:f?.colors?.["statusBar.foreground"]||"#FFF",backgroundColor:f?.colors?.["editor.background"]||"var(--background-secondary)"},B;e&&(B=v?Jt?.getLanguage?.(e)?.name:d?.name);let _=[je("root")];return B||_.push(je("plain")),n&&_.push(je("preview")),o("pre",{ref:h,className:_.join(" "),style:{backgroundColor:v?P.backgroundColor:`rgba(${md(P.backgroundColor).concat(a/100).join(", ")})`,color:P.plainColor}},o("code",null,o(wd,{langName:B,useDevIcon:s,shikiLang:d}),o(xd,{theme:P,useHljs:v,lang:e,content:t,tokens:w}),!n&&o(bd,{content:t,theme:P})))}});function Mo(e,t){let n=document.createElement("style");n.innerText=e,document.head.appendChild(n),Rn.set(t,n)}function Id(e){return Rn.get(e)?.remove(),Rn.delete(e)}var Rn,Md,Rd=m(()=>{"use strict";i();Rn=new Map;Md=()=>{Rn.forEach(e=>e.remove()),Rn.clear()}});var rg,Cd,Cn,Ks,Ad=m(()=>{"use strict";i();x();O();Kp();T();Qp();Ys();Ws();Gs();kd();Io();Rd();rg=Object.keys(it),Cd="@import url('https://cdn.jsdelivr.net/gh/devicons/devicon@v2.10.1/devicon.min.css');",Cn=()=>S.plugins.ShikiCodeblocks,Ks=u({name:"ShikiCodeblocks",description:"Brings vscode-style codeblocks into Discord, powered by Shiki",authors:[p.Vap],patches:[{find:"codeBlock:{react:function",replacement:{match:/codeBlock:\{react:function\((.),(.),(.)\)\{/,replace:"$&return Vencord.Plugins.plugins.ShikiCodeblocks.renderHighlighter($1,$2,$3);"}}],start:async()=>{Mo(Yp,"MAIN"),Cn().useDevIcon!=="DISABLED"&&Mo(Cd,"DEVICONS"),await H.init(Cn().customTheme||Cn().theme)},stop:()=>{H.destroy(),Md()},options:{theme:{type:4,description:"Default themes",options:rg.map(e=>({label:qp(Wp(e)),value:it[e],default:it[e]===it.DarkPlus})),disabled:()=>!!Cn().customTheme,onChange:H.setTheme},customTheme:{type:0,description:"A link to a custom vscode theme",placeholder:it.MaterialCandy,isValid:e=>{if(!e)return!0;let t=Qo(e);return t?t.pathname.endsWith(".json")?!0:"Must be a json file":"Must be a valid URL"},onChange:e=>H.setTheme(e||Cn().theme)},tryHljs:{type:4,description:"Use the more lightweight default Discord highlighter and theme.",options:[{label:"Never",value:"NEVER"},{label:"Prefer Shiki instead of Highlight.js",value:"SECONDARY",default:!0},{label:"Prefer Highlight.js instead of Shiki",value:"PRIMARY"},{label:"Always",value:"ALWAYS"}]},useDevIcon:{type:4,description:"How to show language icons on codeblocks",options:[{label:"Disabled",value:"DISABLED"},{label:"Colorless",value:"GREYSCALE",default:!0},{label:"Colored",value:"COLOR"}],onChange:e=>{e==="DISABLED"?Id("DEVICONS"):Mo(Cd,"DEVICONS")}},bgOpacity:{type:5,description:"Background opacity",markers:[0,20,40,60,80,100],default:100,stickToMarkers:!1}},shiki:H,createHighlighter:qs,renderHighlighter:({lang:e,content:t})=>qs({lang:e,content:t,isPreview:!1})})});var ig,sg,Qs,Js,_d=m(()=>{"use strict";i();R();Ne();x();Ye();T();L();k();ig=1048576n,sg=1024n,Qs=(e,t)=>!0;$(e=>e.can&&e.initialize,e=>({can:Qs}=e));Js=u({name:"ShowHiddenChannels",description:"Show hidden
padding: 0.375rem 0.5rem;
border-bottom: 1px solid var(--background-modifier-accent);
--vc-spotify-green: #1db954; /* so cusotm themes can easily change it */
}
.vc-spotify-button {
background: none;
color: var(--interactive-normal);
padding: 0;
width: 32px;
height: 32px;
border-radius: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.vc-spotify-button:hover {
color: var(--interactive-hover);
background-color: var(--background-modifier-selected);
}
.vc-spotify-button svg {
height: 24px;
width: 24px;
}
[class*="vc-spotify-shuffle"] > svg,
[class*="vc-spotify-repeat"] > svg {
width: 22px;
height: 22px;
}
.vc-spotify-button svg path {
width: 100%;
height: 100%;
}
/* .vc-spotify-button:hover {
filter: brightness(1.3);
} */
.vc-spotify-shuffle-on,
.vc-spotify-repeat-context,
.vc-spotify-repeat-track,
.vc-spotify-shuffle-on:hover,
.vc-spotify-repeat-context:hover,
.vc-spotify-repeat-track:hover {
color: var(--vc-spotify-green);
}
.vc-spotify-tooltip-text {
overflow: hidden;
white-space: nowrap;
padding-right: 0.2em;
max-width: 100%;
}
.vc-spotify-repeat-1 {
font-size: 70%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.vc-spotify-button-row {
justify-content: center;
}
#vc-spotify-info-wrapper {
display: flex;
flex-direction: row;
align-items: center;
height: 3em;
gap: 0.5em;
}
#vc-spotify-info-wrapper img {
height: 90%;
object-fit: contain;
}
#vc-spotify-album-expanded-wrapper img {
width: 100%;
object-fit: contain;
}
#vc-spotify-titles {
display: flex;
flex-direction: column;
padding: 0.2rem;
justify-content: center;
align-items: flex-start;
align-content: flex-start;
overflow: hidden;
}
.vc-spotify-tooltip-text {
margin: unset;
}
#vc-spotify-song-title {
color: var(--header-primary);
font-size: 14px;
font-weight: 600;
}
.vc-spotify-ellipoverflow {
white-space: nowrap;
overflow: hidden;
width: 100%;
text-overflow: ellipsis;
}
.vc-spotify-artist,
.vc-spotify-album {
font-size: 12px;
text-decoration: none;
color: var(--header-secondary);
}
.vc-spotify-comma {
color: var(--header-secondary);
}
.vc-spotify-artist:hover,
#vc-spotify-album-title:hover,
#vc-spotify-song-title[role="link"]:hover {
text-decoration: underline;
cursor: pointer;
}
#vc-spotify-album-image {
border-radius: 3px;
}
#vc-spotify-album-image:hover {
filter: brightness(1.2);
cursor: pointer;
}
#vc-spotify-progress-bar {
position: relative;
color: var(--text-normal);
width: 100%;
margin: 0.5em 0;
margin-bottom: 5px;
}
#vc-spotify-progress-bar > [class^="slider"] {
flex-grow: 1;
width: 100%;
padding: 0 !important;
}
#vc-spotify-progress-bar > [class^="slider"] [class^="bar-"] {
height: 4px !important;
}
#vc-spotify-progress-bar > [class^="slider"] [class^="grabber"] {
/* these importants are neccessary, it applies a width and height through inline styles */
height: 10px !important;
width: 10px !important;
background-color: var(--interactive-normal);
border-color: var(--interactive-normal);
color: var(--interactive-normal);
}
#vc-spotify-progress-text {
margin: 0;
}
.vc-spotify-progress-time {
font-size: 12px;
top: 10px;
position: absolute;
}
.vc-spotify-time-left {
left: 0;
}
.vc-spotify-time-right {
right: 0;
}
`});var W,Dd=m(()=>{"use strict";i();ze();Et();L();k();Fd();W=We(()=>{let e=document.createElement("style");e.innerText=Ed,document.head.appendChild(e);let{Store:t}=Uo,n=M("getActiveSocketAndDevice"),r=M("SpotifyAPIMarker"),s="https://api.spotify.com/v1/me/player";class a extends t{constructor(d,v){super(d,v)}mPosition=0;start=0;track=null;device=null;isPlaying=!1;repeat="off";shuffle=!1;volume=0;isSettingPosition=!1;openExternal(d){VencordNative.ipc.invoke(j.OPEN_EXTERNAL,"https://open.spotify.com"+d)}get position(){let d=this.mPosition;return this.isPlaying&&(d+=Date.now()-this.start),d}set position(d){this.mPosition=d,this.start=Date.now()}prev(){this.req("post","/previous")}next(){this.req("post","/next")}setVolume(d){this.req("put","/volume",{query:{volume_percent:Math.round(d)}}).then(()=>{this.volume=d,this.emitChange()})}setPlaying(d){this.req("put",d?"/play":"/pause")}setRepeat(d){this.req("put","/repeat",{query:{state:d}})}setShuffle(d){this.req("put","/shuffle",{query:{state:d}}).then(()=>{this.shuffle=d,this.emitChange()})}seek(d){return this.isSettingPosition?Promise.resolve():(this.isSettingPosition=!0,this.req("put","/seek",{query:{position_ms:Math.round(d)}}).catch(v=>{console.error("[VencordSpotifyControls] Failed to seek",v),this.isSettingPosition=!1}))}req(d,v,h={}){this.device?.is_active&&((h.query??={}).device_id=this.device.id);let{socket:g}=n.getActiveSocketAndDevice();return r[d](g.accountId,g.accessToken,{url:s+v,...h})}}let c=new a(I,{SPOTIFY_PLAYER_STATE(f){c.track=f.track,c.device=f.device??null,c.isPlaying=f.isPlaying??!1,c.volume=f.volumePercent??0,c.repeat=f.actual_repeat||"off",c.position=f.position??0,c.isSettingPosition=!1,c.emitChange()},SPOTIFY_SET_DEVICES({devices:f}){c.device=f.find(d=>d.is_active)??f[0]??null,c.emitChange()}});return c})});function Zs(e){let t=e/1e3/60,n=Math.floor(t),r=Math.floor((t-n)*60);return`${n.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`}function Yt(e,t){return()=>o("svg",{className:ie(K("button-icon"),K(t)),height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":t,focusable:!1},o("path",{d:e}))}function An(e){return o("button",{className:K("button"),...e},e.children)}function ug(){let[e,t,n]=Kt([W],()=>[W.isPlaying,W.shuffle,W.repeat]),[r,s]=(()=>{switch(n){case"off":return["context","repeat-off"];case"context":return["track","repeat-context"];case"track":return["off","repeat-track"];default:throw new Error(`Invalid repeat state ${n}`)}})();return o(Z,{className:K("button-row"),style:{gap:0}},o(An,{className:ie(K("button"),K(t?"shuffle-on":"shuffle-off")),onClick:()=>W.setShuffle(!t)},o(mg,null)),o(An,{onClick:()=>W.prev()},o(lg,null)),o(An,{onClick:()=>W.setPlaying(!e)},e?o(cg,null):o(ag,null)),o(An,{onClick:()=>W.next()},o(pg,null)),o(An,{className:ie(K("button"),K(s)),onClick:()=>W.setRepeat(r),style:{position:"relative"}},n==="track"&&o("span",{className:K("repeat-1")},"1"),o(dg,null)))}function gg(){let{duration:e}=W.track,[t,n,r]=Kt([W],()=>[W.mPosition,W.isSettingPosition,W.isPlaying]),[s,a]=b.useState(t);return b.useEffect(()=>{if(r&&!n){a(W.position);let c=setInterval(()=>{a(f=>f+1e3)},1e3);return()=>clearInterval(c)}},[t,n,r]),o("div",{id:K("progress-bar")},o(y.FormText,{variant:"text-xs/medium",className:K("progress-time")+" "+K("time-left"),"aria-label":"Progress"},Zs(s)),o(Nd,{minValue:0,maxValue:e,value:s,onChange:c=>{n||(a(c),fg(c))},renderValue:Zs}),o(y.FormText,{variant:"text-xs/medium",className:K("progress-time")+" "+K("time-right"),"aria-label":"Total Duration"},Zs(e)))}function hg({track:e}){let t=Kt([W],()=>W.volume);return o(ue.ContextMenu,{navId:"spotify-album-menu",onClose:()=>I.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":"Spotify Album Menu"},o(ue.MenuItem,{key:"open-album",id:"open-album",label:"Open Album",action:()=>W.openExternal(`/album/${e.album.id}`)}),o(ue.MenuItem,{key:"view-cover",id:"view-cover",label:"View Album Cover",action:()=>Vencord.Plugins.plugins.ViewIcons.openImage(e.album.image.url)}),o(ue.MenuControlItem,{id:"spotify-volume",key:"spotify-volume",label:"Volume",contro
`);return o(y.FormSection,{title:"Server Trace",tag:"h2"},o("code",null,o(Z,{flexDirection:"column",style:{color:"var(--header-primary)",gap:5,userSelect:"text"}},t.map(n=>o("span",null,n)))))}function Tg(){if(!_n?.logs)return o("div",null,"Loading...");let e=_n.logGroups.find(t=>t.serverTrace)?.serverTrace;return o(b.Fragment,null,o(Sg,{title:"Startup Timings",logs:_n.logs,traceEnd:_n.endTime_}),o("div",{style:{marginTop:5}},"\xA0"),e&&o(xg,{trace:e}))}var _n,wg,zd=m(()=>{"use strict";i();ne();Ne();L();k();_n=M("markWithDelta","markAndLog","markAt");wg=D.wrap(Tg)});var ra,Wd=m(()=>{"use strict";i();x();O();T();ra=u({name:"StartupTimings",description:"Adds Startup Timings to the Settings menu",authors:[p.Megu],patches:[{find:"PAYMENT_FLOW_MODAL_TEST_PAGE,",replacement:{match:/({section:[\w.]+?\.PAYMENT_FLOW_MODAL_TEST_PAGE,)/,replace:'{section:"StartupTimings",label:"Startup Timings",element:Vencord.Plugins.plugins.StartupTimings.StartupTimingPage},$1'}}],StartupTimingPage:Q(()=>(zd(),Ao(Gd)).default)})});var ia,qd=m(()=>{"use strict";i();pt();x();T();ia=u({name:"Unindent",description:"Trims leading indentation from codeblocks",authors:[p.Ven],dependencies:["MessageEventsAPI"],patches:[{find:"inQuote:",replacement:{match:/,content:([^,]+),inQuote/,replace:(e,t)=>`,content:Vencord.Plugins.plugins.Unindent.unindent(${t}),inQuote`}}],unindent(e){e=e.replace(/\t/g," ");let t=e.match(/^ *(?=\S)/gm)?.reduce((n,r)=>Math.min(n,r.length),1/0)??0;return t?e.replace(new RegExp(`^ {${t}}`,"gm"),""):e},unindentMsg(e){e.content=e.content.replace(/```(.|\n)*?```/g,t=>{let n=t.split(`
`);if(n.length<2)return t;let r="";return n[n.length-1]==="```"&&(r=n.pop()),`${n[0]}
2022-10-14 17:16:34 -04:00
${this.unindent(n.slice(1).join(`
`))}
2023-02-18 09:46:56 -05:00
${r}`})},start(){this.preSend=$e((e,t)=>this.unindentMsg(t)),this.preEdit=Pt((e,t,n)=>this.unindentMsg(n))},stop(){Ue(this.preSend),kt(this.preEdit)}})});var sa,Pg,aa,Kd=m(()=>{"use strict";i();x();T();Pg="https://raw.githubusercontent.com/facebook/react/17.0.2/scripts/error-codes/codes.json",aa=u({name:"ReactErrorDecoder",description:'Replaces "Minifed React Error" with the actual error.',authors:[p.Cyn],patches:[{find:'"https://reactjs.org/docs/error-decoder.html?invariant="',replacement:{match:/(function .\(.\)){(for\(var .="https:\/\/reactjs\.org\/docs\/error-decoder\.html\?invariant="\+.,.=1;.<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(){sa=await fetch(Pg).then(e=>e.json()).catch(e=>console.error(`[ReactErrorDecoder] Failed to fetch React error codes
`,e))},stop(){sa=void 0},decodeError(e,...t){let n=0;return sa?.[e]?.replace(/%s/g,()=>{let r=t[n];return n++,r})}})});function Ig(e){return e.split(" ").map(t=>{let n=!1,r=t.toLowerCase();if(t.length<4)return t;for(let[s,a]of kg)t.includes(s)&&(t=t.replace(s,a),n=!0);return r.includes("u")&&!r.includes("uwu")&&(t=t.replace("u","UwU"),n=!0),r.includes("o")&&!r.includes("owo")&&(t=t.replace("o","OwO"),n=!0),r.endsWith("y")&&t.length<7&&(t=t+" w"+t.slice(1),n=!0),n||(r.endsWith("n")||(t=t.replace("n","ny")),Math.floor(Math.random()*2)===1&&t.replace("s","sh"),Math.floor(Math.random()*5)===3&&!n&&(t=t[0]+"-"+t[0]+"-"+t),Math.floor(Math.random()*5)===3&&(t=t+" "+Yd[Math.floor(Math.random()*Yd.length)]),t=t.replaceAll("r","w").replaceAll("l","w")),t}).join(" ")}var Yd,kg,ca,Qd=m(()=>{"use strict";i();be();x();T();Yd=["owo","UwU",">w<","^w^","\u25CFw\u25CF","\u2606w\u2606","\u{1D5E8}\u{1D604}\u{1D5E8}","(\u15D2\u15E8\u15D5)","(\u25B0\u02D8v\u02D8\u25B0)","( \xB4 \u25BD ` ).\uFF61\uFF4F\u2661","*unbuttons shirt*",">3<",">:3",":3","murr~","\u2665(\u3002U \u03C9 U\u3002)","(\u02D8\u03B5\u02D8)","*screams*","*twerks*","*sweats*"],kg=[["love","wuv"],["mr","mistuh"],["dog","doggo"],["cat","kitteh"],["hello","henwo"],["hell","heck"],["fuck","fwick"],["fuk","fwick"],["shit","shoot"],["friend","fwend"],["stop","stawp"],["god","gosh"],["dick","peepee"],["penis","bulge"],["damn","darn"]];ca=u({name:"UwUifier",description:"Simply uwuify commands",authors:[p.echo],dependencies:["CommandsAPI"],commands:[{name:"uwuify",description:"uwuifies your messages",options:[It],execute:e=>({content:Ig(ce(e,"message",""))})}]})});var la,pa,Jd=m(()=>{"use strict";i();R();x();T();k();la={};X("VoiceChatDoubleClick","vcDoubleClick");pa=u({name:"VoiceChatDoubleClick",description:"Join voice chats via double click instead of single click",authors:[p.Ven,p.D3SOX],patches:[{find:"VoiceChannel.renderPopout",replacement:[{match:/onClick:(.*)function\(\)\{(e\.handleClick.+?)}/g,replace:"onClick:$1function(){Vencord.Plugins.plugins.VoiceChatDoubleClick.schedule(()=>{$2}, e)}"},{match:/onClick:(.{0,15})this\.handleClick,/g,replace:"onClick:$1(...args)=>Vencord.Plugins.plugins.VoiceChatDoubleClick.schedule(()=>{this.handleClick(...args);}, args[0]),"}]},{find:'className:"channelMention",iconType:(',replacement:{match:/onClick:(.{1,3}),/,replace:"onClick:(_vcEv)=>(_vcEv.detail>=2||_vcEv.target.className.includes('MentionText'))&&($1)(),"}}],schedule(e,t){let n=t?.id??t.props.channel.id;if(pe.getVoiceChannelId()===n){e();return}let r=la[n]??={timeout:void 0,i:0};clearTimeout(r.timeout),++r.i>=2?(e(),delete la[n]):r.timeout=setTimeout(()=>{delete la[n]},500)}})});var Mg,Rg,Cg,Xd,da,Zd=m(()=>{"use strict";i();x();O();Ye();L();k();Mg=Q(()=>Ce(e=>e.prototype?.render?.toString().includes("OPEN_ORIGINAL_IMAGE"))),Rg=Q(()=>Ce(e=>e.type?.toString().includes("MASKED_LINK)"))),Cg=M("getGuildBannerURL"),Xd="Vencord.Plugins.plugins.ViewIcons.openImage(",da=new class{name="ViewIcons";authors=[p.Ven];description="Makes Avatars/Banners in user profiles clickable, and adds Guild Context Menu Entries to View Banner/Icon.";dependencies=["MenuItemDeobfuscatorAPI"];openImage(t){let n=new URL(t);n.searchParams.set("size","512"),t=n.toString(),we(r=>o(Be,{size:"dynamic",...r},o(Mg,{shouldAnimate:!0,original:t,src:t,renderLinkComponent:()=>o(Rg,null)})))}patches=[{find:"onAddFriend:",replacement:{match:/\{src:(.{1,2}),avatarDecoration/g,replace:(t,n)=>`{src:${n},onClick:()=>${Xd}${n}),avatarDecoration`}},{find:"().popoutNoBannerPremium",replacement:{match:/style:.{0,10}\{\},(.{1,2})\)/,replace:(t,n)=>`onClick:${n}.backgroundImage&&(${n}.cursor="pointer",()=>${Xd}${n}.backgroundImage.replace("url(", ""))),${t}`}},{find:'"GuildContextMenu:',replacement:[{match:/\w=(\w)\.id/,replace:"_guild=$1,$&"},{match:/(id:"leave-guild".{0,200}),(\(0,.{1,3}\.jsxs?\).{0,200}function)/,replace:"$1,Vencord.Plugins.plugins.ViewIcons.buildGuildContextMenuEntries(_guild),$2"}]}];buildGuildContextMenuEntries(t){return o(ue.MenuGroup,null,t.banner&&o(ue.MenuItem,{id:"view-banner",key:"view-banner",label:"View Ban
`);En.textContent=t}var _t,En,ka=m(()=>{"use strict";i();R();ze();document.addEventListener("DOMContentLoaded",()=>{wa(S.useQuickCss),Zo("useQuickCss",wa),lm(),Zo("themeLinks",lm)})});function nh(){function e(t){try{let n=t[1],{subscriptions:r,listeners:s}=Vencord.Webpack,{patches:a}=Vencord.Plugins;for(let c in n){let f=n[c],d=f.toString().replaceAll(`
`,"");d.startsWith("function(")&&(d="0,"+d);let v=f,h=new Set,g=n[c]=function(w,P,B){try{f(w,P,B)}catch(_){if(f===v)throw _;return Lt.error("Error in patched chunk",_),void v(w,P,B)}if(w.exports===window){Object.defineProperty(B.c,c,{value:B.c[c],enumerable:!1,configurable:!0,writable:!0});return}for(let _ of s)try{_(P)}catch(oe){Lt.error("Error in webpack listener",oe)}for(let[_,oe]of r)try{if(_(P))r.delete(_),oe(P);else if(typeof P=="object"){P.default&&_(P.default)&&(r.delete(_),oe(P.default));for(let C in P)C.length<=3&&P[C]&&_(P[C])&&(r.delete(_),oe(P[C]))}}catch(C){Lt.error("Error while firing callback for webpack chunk",C)}};try{g.toString=()=>f.toString(),g.original=v}catch{}for(let w=0;w<a.length;w++){let P=a[w];if(!(P.predicate&&!P.predicate())&&d.includes(P.find)){h.add(P.plugin);for(let B of P.replacement){let _=f,oe=d;try{let C=d.replace(B.match,B.replace);C===d&&!B.noWarn?Lt.warn(`Patch by ${P.plugin} had no effect (Module id is ${c}): ${B.match}`):(d=C,f=(0,eval)(`// Webpack Module ${c} - Patched by ${[...h].join(", ")}
${C}
//# sourceURL=WebpackModule${c}`))}catch(C){Lt.error(`Patch by ${P.plugin} errored (Module id is ${c}): ${B.match}
`,C),d=oe,f=_,h.delete(P.plugin)}}P.all||a.splice(w--,1)}}}}catch(n){Lt.error("Error in handlePush",n)}return e.original.call(window[tt],t)}e.original=window[tt].push,Object.defineProperty(window[tt],"push",{get:()=>e,set:t=>e.original=t,configurable:!0})}var pm,Lt,dm=m(()=>{"use strict";i();x();le();L();Lt=new N("WebpackInterceptor","#8caaee");Object.defineProperty(window,tt,{get:()=>pm,set:e=>{e?.push!==Array.prototype.push&&(Lt.info(`Patching ${tt}.push`),Do(e),nh(),delete window[tt],window[tt]=e),pm=e},configurable:!0})});var uC,mm,um=m(()=>{"use strict";i();yn();O();L();k();Zr();ne();uC=gt(function({find:e,setModule:t,setError:n}){let r=Oo(e),s=Object.keys(r),a=s.length;a===0?n("No match. Perhaps that module is lazy loaded?"):a!==1?n("Multiple matches. Please refine your filter"):t([s[0],r[s[0]]])}),mm=null});var fm={};ee(fm,{PatchHelper:()=>mm,PluginSettings:()=>So,VencordSettings:()=>Ms});var gm=m(()=>{"use strict";i();um();Is();Rs()});async function oh(){if(await Eo,Ss(),hm=await Promise.resolve().then(()=>(gm(),fm)),!1)try{}catch(e){}}var hm,Ys=m(()=>{"use strict";i();sm();bo();cm();ka();Tn();L();ka();dm();pn();R();bo();Tn();L();k();oh()});var rh={};ee(rh,{Api:()=>xa,Components:()=>hm,PlainSettings:()=>Oa,Plugins:()=>Ts,QuickCss:()=>Pa,Settings:()=>S,Updater:()=>hs,Util:()=>Ta,Webpack:()=>Bo});i();i();var Dn,wm=new Promise(e=>{setTimeout(()=>{new QWebChannel(qt.webChannelTransport,function(t){Dn=t.objects.webclass,e()})})});async function Ca(){Dn||await wm}window.VencordNative={getVersions:()=>({}),ipc:{send:async(e,...t)=>{await Ca(),Dn.vencordSend(e,t)},sendSync:(e,...t)=>{if(e==="VencordGetSettings")return window.discordScreenaudioVencordSettings||"{}";throw new Error("Synchroneous IPC not implemented")},on(e,t){},off(e,t){},invoke:async(e,...t)=>(await Ca(),e==="VencordSetSettings"&&(window.discordScreenaudioVencordSettings=t[0]),Dn.vencordSend(e,t))}};Ys();return Ao(rh);})();
2022-10-14 17:16:34 -04:00
//# sourceURL=VencordWeb
2022-10-22 17:56:49 -04:00
/*! For license information please see browser.js.LEGAL.txt */