`;return(0,eval)(n)}var nc,Zs,oc,xn,Xn,Ke,jg,rc,tn,ic,sc,X2,j=g(()=>{"use strict";a();rr();tc();Ze();Ys();nc=new ie("Webpack"),oc=new Promise(e=>Zs=e),Ke={byProps:(...e)=>e.length===1?t=>t[e[0]]!==void 0:t=>e.every(n=>t[n]!==void 0),byCode:(...e)=>t=>{if(typeof t!="function")return!1;let n=Function.prototype.toString.call(t);for(let r of e)if(!n.includes(r))return!1;return!0},byStoreName:e=>t=>t.constructor?.displayName===e,componentByCode:(...e)=>{let t=Ke.byCode(...e);return n=>t(n)?!0:n.$$typeof?n.type?t(n.type):n.render?t(n.render):!1:!1}},jg=new Map,rc=new Set;tn=Un("find",function(t,{isIndirect:n=!1,isWaitFor:r=!1}={}){if(typeof t!="function")throw new Error("Invalid filter. Expected a function got "+typeof t);for(let i in Xn){let s=Xn[i];if(!!s?.exports){if(t(s.exports))return r?[s.exports,Number(i)]:s.exports;if(s.exports.default&&t(s.exports.default)){let l=s.exports.default;return r?[l,Number(i)]:l}}}return n||Pi("find",t),r?[null,null]:null});ic=Un("findBulk",function(...t){if(!Array.isArray(t))throw new Error("Invalid filters. Expected function[] got "+typeof t);let{length:n}=t;if(n===0)throw new Error("Expected at least two filters.");if(n===1)return tn(t[0]);let r=t,i=0,s=Array(n);e:for(let l in Xn){let c=Xn[l];if(!!c?.exports)for(let u=0;u<n;u++){let d=r[u];if(d!==void 0){if(d(c.exports)){if(s[u]=c.exports,r[u]=void 0,++i===n)break e;break}if(c.exports.default&&d(c.exports.default)){if(s[u]=c.exports.default,r[u]=void 0,++i===n)break e;break}}}}if(i!==n){let l=new Error(`Got${n}filters,butonlyfound${i}modules!`);nc.warn(l)}return s}),sc=Un("findModuleId",function(t){for(let r in xn.m)if(xn.m[r].toString().includes(t))return Number(r);let n=new Error(`Didn'tfindmodulewithcode:
`);if(r.shift()!=="id,tooltip,image"){new ie("BadgeAPI").error("Invalid badges.csv file!");return}for(let i of r){let[s,l,c]=i.split(",");(Pc[s]??=[]).push({image:c,description:l})}}var lw,cw,Pc,Ic,gh=g(()=>{"use strict";a();ca();xc();le();Rt();Tc();M();Ze();it();Re();pt();w();I();lw="https://cdn.discordapp.com/attachments/1033680203433660458/1092089947126780035/favicon.png",cw={description:"Vencord Contributor",image:lw,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},shouldShow:({user:e})=>Oi(e.id),link:"https://github.com/Vendicated/Vencord"},Pc={};Ic=y({name:"BadgeAPI",description:"API to add badges to users.",authors:[p.Megu,p.Ven,p.TheSun],required:!0,patches:[{find:"Messages.PROFILE_USER_BADGES,role:",replacement:[{match:/&&(\i)\.push\(\{id:"premium".+?\}\);/,replace:"$&$1.unshift(...Vencord.Api.Badges._getBadges(arguments[0]));"},{match:/alt:" ","aria-hidden":!0,src:(?=(\i)\.src)/,replace:"...$1.props,$& $1.image??"},{match:/(?<=text:(\i)\.description,spacing:12,)children:/,replace:"children:$1.component ? () => $self.renderBadgeComponent($1) :"},{match:/href:(\i)\.link/,replace:"...($1.onClick && { onClick: $1.onClick }),$&"}]}],toolboxActions:{async"Refetch Badges"(){await fh(!0),ee.show({id:ee.genId(),message:"Successfully refetched badges!",type:ee.Type.SUCCESS})}},async start(){Vencord.Api.Badges.addBadge(cw),await fh()},renderBadgeComponent:_.wrap(e=>{let t=e.component;return o(t,{...e})},{noop:!0}),getDonorBadges(e){return Pc[e]?.map(t=>({...t,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},onClick(){let n=je(r=>o(_,{noop:!0,onError:()=>{Vn(n),VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")}},o(An.ModalRoot,{...r},o(An.ModalHeader,null,o(ge,{style:{width:"100%",justifyContent:"center"}},o(S.FormTitle,{tag:"h2",style:{width:"100%",textAlign:"center",margin:0}},o(sa,null),"Vencord Donor"))),o(An.ModalContent,null,o(ge,null,o("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533070955872337.png",alt:"",style:{margin:"auto"}}),o("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533090627174460.png",alt:"",style:{margin:"auto"}})),o("div",{style:{padding:"1em"}},o(S.FormText,null,"This Badge is a special perk for Vencord Donors"),o(S.FormText,{className:q.top20},"Please consider supporting the development of Vencord by becoming a donor. It would mean a lot!!"))),o(An.ModalFooter,null,o(ge,{style:{width:"100%",justifyContent:"center"}},o(Bi,null))))))}}))}})});var Ac,hh=g(()=>{"use strict";a();M();w();Ac=y({name:"CommandsAPI",authors:[p.Arjix],description:"Api required by anything that uses commands",patches:[{find:',"tenor"',replacement:[{match:/(?<=\w=)(\w)(\.filter\(.{0,60}tenor)/,replace:"Vencord.Api.Commands._init($1)$2"}]},{find:"Unexpected value for option",replacement:{match:/,(\i)\.execute\((\i),(\i)\)/,replace:(e,t,n,r)=>`,Vencord.Api.Commands._handleCommand(${t},${n},${r})`}},{find:".source,children",replacement:{match:/(?<=:(.{1,3})\.displayDescription\}.{0,200}\.source,children:)[^}]+/,replace:"$1.plugin||($&)"}}]})});var Cc,yh=g(()=>{"use strict";a();M();w();Cc=y({name:"ContextMenuAPI",description:"API for adding/removing items to/from context menus.",authors:[p.Nuckyz,p.Ven],required:!0,patches:[{find:"\u266B (\u3064\uFF61\u25D5\u203F\u203F\u25D5\uFF61)\u3064 \u266A",replacement:{match:/let{navId:/,replace:"Vencord.Api.ContextMenu._patchContextMenu(arguments[0]);$&"}},{find:".Menu,{",all:!0,replacement:{match:/Menu,{(?<=\.jsxs?\)\(\i\.Menu,{)/g,replace:"$&contextMenuApiArguments:typeof arguments!=='undefined'?arguments:[],"}}]})});var Nc,vh=g(()=>{"use strict";a();M();w();Nc=y({name:"MemberListDecoratorsAPI",description:"API to add decorators to member list (both in servers and DMs)",authors:[p.TheSun,p.Ven],patches:[{find:".lostPermission)",replacement:[{match:/let\{[^}]*lostPermissionTooltipText:\i[^}]*\}=(\i),/,replace:"$&vencordProps=$1,"},{match:/decorators:.{0,100}?children:\[/,replace:"$&...(typeof vencordProps=='undefined'?[]:Vencord.Api.MemberListDecorators.__getDecorators(venco
`,e)}Kw=hn(async()=>{E.cloud.settingsSync&&E.cloud.authenticated&&(await Yr(),delete fr.Vencord_settingsDirty)},6e4),Pa=new Set,oy={};qn=Lo,E=au(Lo)});var iy=g(()=>{});var sy=g(()=>{});var uu={};Be(uu,{UpdateLogger:()=>yr,changes:()=>Eo,checkForUpdates:()=>Xr,getRepo:()=>cu,isNewer:()=>Yi,isOutdated:()=>Do,maybePromptToUpdate:()=>Zi,update:()=>Jr,updateError:()=>Zr});async function Ia(e){let t=await e;if(t.ok)return t.value;throw Zr=t.error,t.error}async function Xr(){return Eo=await Ia(VencordNative.updater.getUpdates()),Eo.some(e=>e.hash===an)?(Yi=!0,Do=!1):Do=Eo.length>0}async function Jr(){if(!Do)return!0;let e=await Ia(VencordNative.updater.update());if(e&&(Do=!1,!await Ia(VencordNative.updater.rebuild())))throw new Error("The Build failed. Please try manually building the new update");return e}async function Zi(e,t=!1){try{if(await Xr()){let r=confirm(e);if(r&&Yi)return alert("Your local copy has more recent commits. Please stash or reset them.");r&&(await Jr(),cn())}}catch(n){yr.error(n),alert("That also failed :( Try updating or re-installing with the installer!")}}var yr,Do,Yi,Zr,Eo,cu,vr=g(()=>{"use strict";a();Gr();Ze();Ro();yr=new ie("Updater","white"),Do=!1,Yi=!1;cu=()=>Ia(VencordNative.updater.getRepo())});function ay(){Zi("Uh Oh! Failed to render this Page. However, there is an update available that might fix it. Would you like to update and restart now?")}var ly=g(()=>{"use strict";a();vr()});function pu(e){let t=!1,n;return function(){return t?n:(t=!0,n=e.apply(this,arguments))}}var du=g(()=>{"use strict";a()});function yn({title:e,children:t}){return o(S.FormSection,null,o(re,{variant:"heading-lg/semibold",tag:"h2",className:q.bottom16},e),t)}function vn(e,t){return _.wrap(e,{message:`Failedtorenderthe${t}tab.Ifthisissuepersists,tryusingtheinstallertoreinstall!`,onError:Zw})}var Zw,Oo=g(()=>{"use strict";a();iy();sy();le();ly();it();du();I();Zw=pu(ay)});var dy={};Be(dy,{default:()=>Vw});function Xw(){let[e,,t]=nt(VencordNative.settings.getSettingsDir,{fallbackValue:"Loading..."}),n=lt(),r=O.useMemo(()=>Math.random()>.5?uy:py,[]),i=navigator.platform.toLowerCase().startsWith("win"),s=navigator.platform.toLowerCase().startsWith("mac"),l=[{key:"useQuickCss",title:"Enable Custom CSS",note:"Loads your Custom CSS"},{key:"enableReactDevtools",title:"Enable React Developer Tools",note:"Requires a full restart"},{key:"frameless",title:"Disable the window frame",note:"Requires a full restart"},!1,i&&{key:"winCtrlQ",title:"Register Ctrl+Q as shortcut to close Discord (Alternative to Alt+F4)",note:"Requires a full restart"},!1,!1];return o(yn,{title:"Vencord Settings"},o(Qw,{image:r}),o(S.FormSection,{title:"Quick Actions"},o(xt,{className:cy("quick-actions-card")},o(O.Fragment,null,o(R,{onClick:cn,size:R.Sizes.SMALL},"Restart Client"),o(R,{onClick:()=>VencordNative.quickCss.openEditor(),size:R.Sizes.SMALL,disabled:e==="Loading..."},"Open QuickCSS File"),o(R,{onClick:()=>ba(e),size:R.Sizes.SMALL,disabled:t},"Open Settings Folder"),o(R,{onClick:()=>VencordNative.native.openExternal("https://github.com/Vendicated/Vencord"),size:R.Sizes.SMALL,disabled:t},"Open in GitHub")))),o(S.FormDivider,null),o(S.FormSection,{className:q.top16,title:"Settings",tag:"h5"},o(S.FormText,{className:q.bottom20},'Hint: You can change the position of this settings section in the settings of the "Settings" plugin!'),l.map(c=>c&&o(ut,{key:c.key,value:n[c.key],onChange:u=>n[c.key]=u,note:c.note},c.title))),typeof Notification<"u"&&o(Jw,{settings:n.notifications}))}function Jw({settings:e}){return o(m,null,o(S.FormTitle,{tag:"h5"},"Notification Style"),e.useNative!=="never"&&Notification?.permission==="denied"&&o(gn,{style:{padding:"1em"},className:q.bottom8},o(S.FormTitle,{tag:"h5"},"Desktop Notification Permission denied"),o(S.FormText,null,"You have denied Notification Permissions. Thus, Desktop notifications will not work!")),o(S.FormText,{className:q.bottom8},"Some plugins may show you notifications. These come in two styles:",o("ul",null,o("li",null,o("strong",null,"Vencord Notifications"),": These are in-app notificatio
`,s),!1}}if(r?.length){Qt.info("Registering commands of plugin",n);for(let s of r)try{Vr(s,n)}catch(l){return Qt.error(`Failedtoregistercommand${s.name}
`,l),!1}}if(i)for(let s in i)F.subscribe(s,i[s]);return!0},e=>`startPlugin${e.name}`),Uu=Un("stopPlugin",function(t){let{name:n,commands:r,flux:i}=t;if(t.stop){if(Qt.info("Stopping plugin",n),!t.started)return Qt.warn(`${n}alreadystopped`),!1;try{t.stop(),t.started=!1}catch(s){return Qt.error(`Failedtostop${n}
`,s),!1}}if(r?.length){Qt.info("Unregistering commands of plugin",n);for(let s of r)try{os(s.name)}catch(l){return Qt.error(`Failedtounregistercommand${s.name}
`,l),!1}}if(i)for(let s in i)F.unsubscribe(s,i[s]);return!0},e=>`stopPlugin${e.name}`)});function LM(e){ee.show({message:e,type:ee.Type.FAILURE,id:ee.genId(),options:{position:ee.Position.BOTTOM}})}function EM({required:e}){return o(xt,{className:br("info-card",{"restart-card":e})},e?o(m,null,o(S.FormTitle,{tag:"h5"},"Restart required!"),o(S.FormText,{className:br("dep-text")},"Restart now to apply new plugins and their settings"),o(R,{color:R.Colors.YELLOW,onClick:()=>location.reload()},"Restart")):o(m,null,o(S.FormTitle,{tag:"h5"},"Plugin Management"),o(S.FormText,null,"Press the cog wheel or info icon to get more info on a plugin"),o(S.FormText,null,"Plugins with a cog wheel have settings you can modify!")))}function Ea({plugin:e,disabled:t,onRestartNeeded:n,onMouseEnter:r,onMouseLeave:i,isNew:s}){let l=E.plugins[e.name],c=()=>l.enabled??!1;function u(){Fi(async()=>f=>o(Lu,{...f,plugin:e,onRestartNeeded:()=>n(e.name)}))}function d(){let f=c();if(!f){let{restartNeeded:v,failures:T}=_a(e);if(T.length){Zy.error(`Failedtostartdependenciesfor${e.name}:${T.join(", ")}`),Ji("Failed to start dependencies: "+T.join(", "),"Close",()=>null);return}else if(v){l.enabled=!0,n(e.name);return}}if(e.patches?.length){l.enabled=!f,n(e.name);return}if(f&&!e.started){l.enabled=!f;return}if(!(f?Uu(e):as(e))){l.enabled=!1;let v=`Errorwhile${f?"stopping":"starting"}plugin${e.name}`;Zy.error(v),LM(v);return}l.enabled=!f}return o(Oa,{name:e.name,description:e.description,isNew:s,enabled:c(),setEnabled:d,disabled:t,onMouseEnter:r,onMouseLeave:i,infoButton:o("button",{role:"switch",onClick:()=>u(),className:oe(RM.button,br("info-button"))},e.options&&!Di(e.options)?o(Ty,null):o(Ca,null))})}function Gu(){let e=lt(),t=O.useMemo(()=>new is,[]);O.useEffect(()=>()=>void(t.hasChanges&&sn.show({title:"Restart required",body:o(m,null,o("p",null,"The following plugins require a restart:"),o("div",null,t.map((v,T)=>o(m,null,T>0&&", ",Fe.parse("`"+v+"`"))))),confirmText:"Restart now",cancelText:"Later!",onConfirm:()=>location.reload()})),[]);let n=O.useMemo(()=>{let v={};for(let T in Oe){let P=Oe[T].dependencies;if(P)for(let b of P)v[b]??=[],v[b].push(T)}return v},[]),r=O.useMemo(()=>Object.values(Oe).sort((v,T)=>v.name.localeCompare(T.name)),[]),[i,s]=O.useState({value:"",status:0}),l=v=>s(T=>({...T,value:v})),c=v=>s(T=>({...T,status:v})),u=v=>{let T=e.plugins[v.name]?.enabled;if(T&&i.status===2||!T&&i.status===1||i.status===3&&!d?.includes(v.name))return!1;if(!i.value.length)return!0;let P=i.value.toLowerCase();return v.name.toLowerCase().includes(P)||v.description.toLowerCase().includes(P)||v.tags?.some(b=>b.toLowerCase().includes(P))},[d]=nt(()=>Pt("Vencord_existingPlugins").then(v=>{let T=Date.now()/1e3,P={},b=Object.values(r).map(C=>C.name),x=[];for(let{name:C}of r)(P[C]=v?.[C]??T)+60*60*24*2>T&&x.push(C);return Zt("Vencord_existingPlugins",P),ur.isEqual(x,b)?[]:x})),f,h;if(r?.length){f=[],h=[];for(let v of r){if(!v.options&&v.name.endsWith("API")&&i.value!=="API"||!u(v))continue;if(v.required||n[v.name]?.some(P=>e.plugins[P].enabled)){let P=v.required?"This plugin is required for Vencord to function.":DM(n[v.name]?.filter(b=>e.plugins[b].enabled));h.push(o(V,{text:P,key:v.name},({onMouseLeave:b,onMouseEnter:x})=>o(Ea,{onMouseLeave:b,onMouseEnter:x,onRestartNeeded:C=>t.handleChange(C),disabled:!0,plugin:v})))}else f.push(o(Ea,{onRestartNeeded:P=>t.handleChange(P),disabled:!1,plugin:v,isNew:d?.includes(v.name),key:v.name}))}}else f=h=o(re,{variant:"text-md/normal"},"No plugins meet search criteria.");return o(yn,{title:"Plugins"},o(EM,{required:t.hasChanges}),o(S.FormTitle,{tag:"h5",className:oe(q.top20,q.bottom8)},"Filters"),o("div",{className:br("filter-controls")},o(Qe,{autoFocus:!0,value:i.value,placeholder:"Search for a plugin...",onChange:l,className:q.bottom20}),o("div",{className:Xy.inputWrapper},o(wn,{className:Xy.inputDefault,options:[{label:"Show All",value:0,default:!0},{label:"Show Enabled",value:1},{label:"Show Disabled",value:2},{label:"Show New",value:3}],serialize:String,select:c,isSelected:v=>v===i.status,closeOnSelect:!0
`)),[l,c]=J(null),[u,,d]=nt(VencordNative.themes.getThemesDir);De(()=>{f()},[]);async function f(){let x=await VencordNative.themes.getThemesList();c(x)}function h(x,C){if(C){if(e.enabledThemes.includes(x))return;e.enabledThemes=[...e.enabledThemes,x]}else e.enabledThemes=e.enabledThemes.filter(k=>k!==x)}async function v(x){if(x.stopPropagation(),x.preventDefault(),!x.currentTarget?.files?.length)return;let{files:C}=x.currentTarget,k=Array.from(C,B=>{let{name:$}=B;if(!!$.endsWith(".css"))return new Promise((Y,K)=>{let z=new FileReader;z.onload=()=>{VencordNative.themes.uploadTheme($,z.result).then(Y).catch(K)},z.readAsText(B)})});await Promise.all(k),f()}function T(){return o(m,null,o(xt,{className:"vc-settings-card"},o(S.FormTitle,{tag:"h5"},"Find Themes:"),o("div",{style:{marginBottom:".5em",display:"flex",flexDirection:"column"}},o(rt,{style:{marginRight:".5em"},href:"https://betterdiscord.app/themes"},"BetterDiscord Themes"),o(rt,{href:"https://github.com/search?q=discord+theme"},"GitHub")),o(S.FormText,null,'If using the BD site, click on "Download" and place the downloaded .theme.css file into your themes folder.')),o(S.FormSection,{title:"Local Themes"},o(xt,{className:"vc-settings-quick-actions-card"},o(m,null,o(R,{onClick:()=>ba(u),size:R.Sizes.SMALL,disabled:d},"Open Themes Folder"),o(R,{onClick:f,size:R.Sizes.SMALL},"Load missing Themes"),o(R,{onClick:()=>VencordNative.quickCss.openEditor(),size:R.Sizes.SMALL},"Edit QuickCSS"))),o("div",{className:FM("grid")},l?.map(x=>o(GM,{key:x.fileName,enabled:e.enabledThemes.includes(x.fileName),onChange:C=>h(x.fileName,C),onDelete:async()=>{h(x.fileName,!1),await VencordNative.themes.deleteTheme(x.fileName),f()},theme:x})))))}function P(){e.themeLinks=[...new Set(i.trim().split(/\n+/).map(x=>x.trim()).filter(Boolean))]}function b(){return o(m,null,o(xt,{className:"vc-settings-card vc-text-selectable"},o(S.FormTitle,{tag:"h5"},"Paste links to css files here"),o(S.FormText,null,"One link per line"),o(S.FormText,null,"Make sure to use direct links to files (raw or github.io)!")),o(S.FormSection,{title:"Online Themes",tag:"h5"},o(ea,{value:i,onChange:s,className:oe(BM.textarea,"vc-settings-theme-links"),placeholder:"Theme Links",spellCheck:!1,onBlur:P,rows:10}),o($M,{themeLinks:e.themeLinks})))}return o(yn,{title:"Themes"},o(Mn,{type:"top",look:"brand",className:"vc-settings-tab-bar",selectedItem:n,onItemSelect:r},o(Mn.Item,{className:"vc-settings-tab-bar-item",id:0},"Local Themes"),o(Mn.Item,{className:"vc-settings-tab-bar-item",id:1},"Online Themes")),n===0&&T(),n===1&&b())}var _M,JO,BM,FM,zM,ev=g(()=>{"use strict";a();U();Je();Rt();Ut();lo();it();Re();Ro();st();j();I();Ou();Oo();_M=A("resolveInvite"),JO=nn(e=>e.prototype?.activateUploadDialogue&&e.prototype.setRef),BM=nn(e=>typeof e.textarea=="string"),FM=Ue("vc-settings-theme-");zM=vn(HM,"Themes")});var rv={};Be(rv,{default:()=>KM});function tv(e,t){return async()=>{e(!0);try{await t()}catch(r){if(yr.error("Failed to update",r),r)if(r.code&&r.cmd){let{code:i,path:s,cmd:l,stderr:c}=r;if(i==="ENOENT")var n=`Command\`${s}\` not found.
`;n+=c||`Code\`${i}\`. See the console for more info`}}elsevarn="An unknown error occurred. See the console for more info.";elsevarn=`An unknown error occurred (error is undefined).
`).map(i=>o("div",null,Fe.parse(i))))})}finally{e(!1)}}}function nv({repo:e,hash:t,disabled:n=!1}){return o(rt,{href:`${e}/commit/${t}`,disabled:n},t)}function ov({updates:e,repo:t,repoPending:n}){return o(xt,{style:{padding:".5em"}},e.map(({hash:r,author:i,message:s})=>o("div",null,o("code",null,o(nv,{repo:t,hash:r,disabled:n})),o("span",{style:{marginLeft:"0.5em",color:"var(--text-normal)"}},s," - ",i))))}function jM(e){let[t,n]=O.useState(Eo),[r,i]=O.useState(!1),[s,l]=O.useState(!1),c=(t?.length??0)>0;return o(m,null,!t&&Zr?o(m,null,o(S.FormText,null,"Failed to check updates. Check the console for more info"),o(gn,{style:{padding:"1em"}},o("p",null,Zr.stderr||Zr.stdout||"An unknown error occurred"))):o(S.FormText,{className:q.bottom8},c?`Thereare${t.length}Updates`:"Up to Date!"),c&&o(ov,{updates:t,...e}),o(ge,{className:oe(q.bottom8,q.top8)},c&&o(R,{size:R.Sizes.SMALL,disabled:s||r,onClick:tv(l,async()=>{await Jr()&&(n([]),await new Promise(u=>{sn.show({title:"Update Success!",body:"Successfully updated. Restart now to apply the changes?",confirmText:"Restart",cancelText:"Not now!",onConfirm(){cn(),u()},onCancel:u})}))})},"Update Now"),o(R,{size:R.Sizes.SMALL,disabled:s||r,onClick:tv(i,async()=>{await Xr()?n(Eo):(n([]),ee.show({message:"No updates found!",id:ee.genId(),type:ee.Type.MESSAGE,options:{position:ee.Position.BOTTOM}}))})},"Check for Updates")))}function WM(e){return o(m,null,o(S.FormText,{className:q.bottom8},"Your local copy has more recent commits. Please stash or reset them."),o(ov,{...e,updates:Eo}))}function qM(){let e=lt(["notifyAboutUpdates","autoUpdate","autoUpdateNotification"]),[t,n,r]=nt(cu,{fallbackValue:"Loading..."});O.useEffect(()=>{n&&yr.error("Failed to retrieve repo",n)},[n]);let i={repo:t,repoPending:r};return o(yn,{title:"Vencord Updater"},o(S.FormTitle,{tag:"h5"},"Updater Settings"),o(ut,{value:e.notifyAboutUpdates,onChange:s=>e.notifyAboutUpdates=s,note:"Shows a notification on startup",disabled:e.autoUpdate},"Get notified about new updates"),o(ut,{value:e.autoUpdate,onChange:s=>e.autoUpdate=s,note:"Automatically update Vencord without confirmation prompt"},"Automatically update"),o(ut,{value:e.autoUpdateNotification,onChange:s=>e.autoUpdateNotification=s,note:"Shows a notification when Vencord automatically updates",disabled:!e.autoUpdate},"Get notified when an automatic update completes"),o(S.FormTitle,{tag:"h5"},"Repo"),o(S.FormText,{className:"vc-text-selectable"},r?t:n?"Failed to retrieve - check console":o(rt,{href:t},t.split("/").slice(-2).join("/"))," ","(",o(nv,{hash:an,repo:t,disabled:r}),")"),o(S.FormDivider,{className:q.top8+" "+q.bottom8}),o(S.FormTitle,{tag:"h5"},"Updates"),Yi?o(WM,{...i}):o(jM,{...i}))}var KM,iv=g(()=>{"use strict";a();U();zr();Rt();lo();it();Re();Ro();st();vr();I();Gr();Oo();KM=vn(qM,"Updater")});function Fa({value:e,onChange:t,validate:n}){let[r,i]=O.useState(e),[s,l]=O.useState();function c(u){i(u);let d=n(u);d===!0?(l(void 0),t(u)):l(d)}return o(m,null,o(Qe,{type:"text",value:r,onChange:c,error:s}))}var Hu=g(()=>{"use strict";a();I()});var sv={};Be(sv,{default:()=>QM});function YM(e){try{return new URL(e),!0}catch{return"Invalid URL"}}async function ZM(){let e=await fetch(new URL("/v1/",ko()),{method:"DELETE",headers:new Headers({Authorization:await Kr()})});if(!e.ok){Sa.error(`Failedtoerasedata,APIreturned${e.status}`),Ie({title:"Cloud Integrations",body:`Couldnoterasealldata(APIreturned${e.status}),pleasecontactsupport.`,color:"var(--red-360)"});return}E.cloud.authenticated=!1,await iu(),Ie({title:"Cloud Integrations",body:"Successfully erased all data.",color:"var(--green-360)"})}function XM(){let{cloud:e}=lt(["cloud.authenticated","cloud.settingsSync"]),t=e.authenticated&&e.settingsSync;return o(S.FormSection,{title:"Settings Sync",className:q.top16},o(S.FormText,{variant:"text-md/normal",className:q.bottom20},"Synchronize your settings to the cloud. This allows easy synchronization across multiple devices with minimal effort."),o(ut,{key:"cloud-sync",disabled:!e.authenticated,value:e.settingsSync,onChange:n=>{e.settingsSync
`.trim().replaceAll("```\n","```")}}}],flux:{async CHANNEL_SELECT({channelId:e}){if(e===ra&&!Oi(W.getCurrentUser().id)&&Do&&an!==await $t.get(uv)){let t=()=>$t.set(uv,an);sn.show({title:"Hold on!",body:o("div",null,o(S.FormText,null,"You are using an outdated version of Vencord! Chances are, your issue is already fixed."),o(S.FormText,null,"Please first update using the Updater Page in Settings, or use the VencordInstaller (Update Vencord Button) to do so, in case you can't access the Updater page.")),onCancel:t,onConfirm:t})}}}})});var Wu,dv=g(()=>{"use strict";a();M();w();Wu=y({name:"AlwaysAnimate",description:"Animates anything that can be animated",authors:[p.FieryFlames],patches:[{find:"canAnimate:",all:!0,noWarn:!0,replacement:{match:/canAnimate:.+?(?=([,}].*?\)))/g,replace:(e,t)=>t.match(/}=.+/)==null?"canAnimate:!0":e}},{find:".Messages.GUILD_OWNER,",replacement:{match:/(?<=\.activityEmoji,.+?animate:)\i/,replace:"!0"}}]})});var qu,mv=g(()=>{"use strict";a();M();w();qu=y({name:"AlwaysTrust",description:"Removes the annoying untrusted domain and suspicious file popup",authors:[p.zt],patches:[{find:'.displayName="MaskedLinkStore"',replacement:{match:/(?<=isTrustedDomain\(\i\){)return \i\(\i\)/,replace:"return true"}},{find:"isSuspiciousDownload:",replacement:{match:/function \i\(\i\){(?=.{0,60}\.parse\(\i\))/,replace:"$&return null;"}}]})});var nP,Ku,fv=g(()=>{"use strict";a();U();M();w();nP=/\.tar\.\w+$/,Ku=y({name:"AnonymiseFileNames",authors:[p.obscurity],description:"Anonymise uploaded file names",patches:[{find:"instantBatchUpload:function",replacement:{match:/uploadFiles:(.{1,2}),/,replace:"uploadFiles:(...args)=>(args[0].uploads.forEach(f=>f.filename=$self.anonymise(f.filename)),$1(...args)),"}}],options:{method:{description:"Anonymising method",type:4,options:[{label:"Random Characters",value:0,default:!0},{label:"Consistent",value:1},{label:"Timestamp (4chan-like)",value:2}]},randomisedLength:{description:"Random characters length",type:1,default:7,disabled:()=>E.plugins.AnonymiseFileNames.method!==0},consistent:{description:"Consistent filename",type:0,default:"image",disabled:()=>E.plugins.AnonymiseFileNames.method!==1}},anonymise(e){let t="image",r=nP.exec(e)?.index??e.lastIndexOf("."),i=r!==-1?e.slice(r):"";switch(E.plugins.AnonymiseFileNames.method){case 0:let s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";t=Array.from({length:E.plugins.AnonymiseFileNames.randomisedLength},()=>s[Math.floor(Math.random()*s.length)]).join("");break;case 1:t=E.plugins.AnonymiseFileNames.consistent;break;case 2:t=`${Math.floor(Date.now()/1e3)}${Math.floor(window.performance.now())}`;break}return t+i}})});async function gv(e,t){return(await pr.fetchAssetIds(e,[t]))[0]}async function rP(e){let t={};return await oP.fetchApplicationsRPC(t,e),t.application}var oP,hv,oi,Yu,yv=g(()=>{"use strict";a();Aa();lo();M();w();j();I();oP=A("fetchApplicationsRPC","getRemoteIconURL");hv={};Yu=y({name:"WebRichPresence (arRPC)",description:"Client plugin for arRPC to enable RPC on Discord Web (experimental)",authors:[p.Ducko],settingsAboutComponent:()=>o(m,null,o(S.FormTitle,{tag:"h3"},"How to use arRPC"),o(S.FormText,null,o(rt,{href:"https://github.com/OpenAsar/arrpc/tree/main#server"},"Follow the instructions in the GitHub repo")," to get the server running, and then enable the plugin.")),async handleEvent(e){let t=JSON.parse(e.data),{activity:n}=t,r=n?.assets;if(r?.large_image&&(r.large_image=await gv(n.application_id,r.large_image)),r?.small_image&&(r.small_image=await gv(n.application_id,r.small_image)),n){let i=n.application_id;hv[i]||=await rP(i);let s=hv[i];n.name||=s.name}F.dispatch({type:"LOCAL_ACTIVITY_UPDATE",...t})},async start(){if("armcord"in window)return;if(oi&&oi.close(),oi=new WebSocket("ws://127.0.0.1:1337"),oi.onmessage=this.handleEvent,!await new Promise(t=>setTimeout(()=>t(oi.readyState===WebSocket.OPEN),1e3))){Ji("Failed to connect to arRPC, is it running?","Retry",()=>{gu(),this.start()});return}ee.show({message:"Connected to arRPC",type:ee.Type.SUCCESS,id:ee.genId(),options:{duration:1e3,positio
`}var us,ip,Bv=g(()=>{"use strict";a();U();M();w();ip=y({name:"BlurNSFW",description:"Blur attachments in NSFW channels until hovered",authors:[p.Ven],patches:[{find:".embedWrapper,embed",replacement:[{match:/\.embedWrapper/g,replace:"$&+(this.props.channel.nsfw?' vc-nsfw-img':'')"}]}],options:{blurAmount:{type:1,description:"Blur Amount",default:10,onChange:_v}},start(){us=document.createElement("style"),us.id="VcBlurNsfw",document.head.appendChild(us),_v()},stop(){us?.remove()}})});function pP(e){let t=E.plugins.CallTimer.format==="human",n=f=>t?f:f.toString().padStart(2,"0"),r=f=>t?f:"",i=t?" ":":",s=Math.floor(e/864e5),l=Math.floor(e%864e5/36e5),c=Math.floor(e%864e5%36e5/6e4),u=Math.floor(e%864e5%36e5%6e4/1e3),d="";return s&&(d+=`${s}d`),(l||d)&&(d+=`${n(l)}${r("h")}${i}`),(c||d||!t)&&(d+=`${n(c)}${r("m")}${i}`),d+=`${n(u)}${r("s")}`,d}var sp,Fv=g(()=>{"use strict";a();U();le();M();st();w();sp=y({name:"CallTimer",description:"Adds a timer to vcs",authors:[p.Ven],startTime:0,interval:void 0,options:{format:{type:4,description:"The timer format. This can be any valid moment.js format",options:[{label:"30d 23:00:42",value:"stopwatch",default:!0},{label:"30d 23h 00m 42s",value:"human"}]}},patches:[{find:"renderConnectionStatus(){",replacement:{match:/(?<=renderConnectionStatus\(\)\{.+\.channel,children:)\i/,replace:"[$&, $self.renderTimer(this.props.channel.id)]"}}],renderTimer(e){return o(_,{noop:!0},o(this.Timer,{channelId:e}))},Timer({channelId:e}){let t=_i({deps:[e]});return o("p",{style:{margin:0}},"Connected for ",o("span",{style:{fontFamily:"var(--font-code)"}},pP(t)))}})});var mp={};Be(mp,{_handleClick:()=>fP,_handlePreEdit:()=>mP,_handlePreSend:()=>dP,addClickListener:()=>pp,addPreEditListener:()=>Tr,addPreSendListener:()=>Gt,removeClickListener:()=>dp,removePreEditListener:()=>xr,removePreSendListener:()=>Ht});async function dP(e,t,n,r){n.replyOptions=r;for(let i of lp)try{let s=await i(e,t,n);if(s&&s.cancel===!0)return!0}catch(s){ap.error(`MessageSendHandler:Listenerencounteredanunknownerror
}`}function bP(e){let t=parseInt(e.substring(0,2),16)/255,n=parseInt(e.substring(2,4),16)/255,r=parseInt(e.substring(4,6),16)/255,i=Math.max(t,n,r),s=Math.min(t,n,r),l=i-s,c,u,d;return d=(i+s)/2,l===0?(c=0,u=0):(u=l/(1-Math.abs(2*d-1)),i===t?c=(n-r)/l%6:i===n?c=(r-t)/l+2:c=(t-n)/l+4,c*=60,c<0&&(c+=360)),u*=100,d*=100,{hue:c,saturation:u,lightness:d}}function TP(e){let t=parseInt(e.substring(0,2),16)/255,n=parseInt(e.substring(2,4),16)/255,r=parseInt(e.substring(4,6),16)/255,i=Math.max(t,n,r),s=Math.min(t,n,r);return 100*((i+s)/2)}var hP,yP,ps,gp,jv,Kv=g(()=>{"use strict";a();zv();U();M();St();it();Re();w();j();I();hP=Xe(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR"),yP=["#1E1514","#172019","#13171B","#1C1C28","#402D2D","#3A483D","#344242","#313D4B","#2D2F47","#322B42","#3C2E42","#422938"];ps=D({color:{description:"Color your Discord client theme will be based around. Light mode isn't supported",type:6,default:"313338",component:()=>o(vP,null)},resetColor:{description:"Reset Theme Color",type:6,default:"313338",component:()=>o(R,{onClick:()=>Wv(3224376)},"Reset Theme Color")}}),gp=y({name:"ClientTheme",authors:[p.F53,p.Nuckyz],description:"Recreation of the old client theme experiment. Add a color to your Discord client theme",settings:ps,startAt:"DOMContentLoaded",start(){qv(ps.store.color),SP()},stop(){document.getElementById("clientThemeVars")?.remove(),document.getElementById("clientThemeOffsets")?.remove()}}),jv=/(--primary-[5-9]\d{2}-hsl):.*?(\S*)%;/g});var hp,Yv=g(()=>{"use strict";a();M();w();hp=y({name:"ColorSighted",description:"Removes the colorblind-friendly icons from statuses, just like 2015-2017 Discord",authors:[p.lewisakura],patches:[{find:"Masks.STATUS_ONLINE",replacement:{match:/Masks\.STATUS_(?:IDLE|DND|STREAMING|OFFLINE)/g,replace:"Masks.STATUS_ONLINE"}},{find:".AVATAR_STATUS_MOBILE_16;",replacement:{match:/(?<=fromIsMobile:\i=!0,.+?)status:(\i)/,replace:'status_$:$1="online"'}}]})});function wr(e){if(typeof e=="string")return e;let t=e.source.replaceAll("\\i","[A-Za-z_$][\\w$]*");return new RegExp(t,e.flags)}function Ua(e,t){let n=`Vencord.Plugins.plugins[${JSON.stringify(t)}]`;return typeof e!="function"?e.replaceAll("$self",n):(...r)=>e(...r).replaceAll("$self",n)}function yp(e,t){if(e.get){let n=e.get;e.get=function(){return t(n.call(this))}}else e.value&&(e.value=t(e.value));return e}function ds(e,t){let n=Object.getOwnPropertyDescriptors(e);n.match=yp(n.match,wr),n.replace=yp(n.replace,r=>Ua(r,t)),Object.defineProperties(e,n)}var ms=g(()=>{"use strict";a()});var vp,Zv=g(()=>{"use strict";a();M();Ro();ms();w();j();j();I();vp=y({name:"ConsoleShortcuts",description:"Adds shorter Aliases for many things on the window. Run `shortcutList` for a list.",authors:[p.Ven],getShortcuts(){function e(r){let i=new Map;return function(...s){let l=String(s);if(i.has(l))return i.get(l);let c=ir(r(...s)),u=(()=>{switch(c.length){case 0:return null;case 1:return c[0];default:let d=[...new Set(c)];return d.length>1&&console.warn(`Warning:Thisfiltermatches${c.length}modules.Makeitmorespecific!
`,d),c[0]}})();return u&&l&&i.set(l,u),u}}let t,n=e(r=>r);return{...Vencord.Webpack.Common,wp:Vencord.Webpack,wpc:xn.c,wreq:xn,wpsearch:cc,wpex:Js,wpexs:r=>Js(sc(r)),find:n,findAll:ir,findByProps:e(Ke.byProps),findAllByProps:(...r)=>ir(Ke.byProps(...r)),findByCode:e(Ke.byCode),findAllByCode:r=>ir(Ke.byCode(r)),findComponentByCode:e(Ke.componentByCode),findAllComponentsByCode:(...r)=>ir(Ke.componentByCode(...r)),findExportedComponent:(...r)=>n(...r)[r[0]],findStore:e(Ke.byStoreName),PluginsApi:Vencord.Plugins,plugins:Vencord.Plugins.plugins,Settings:Vencord.Settings,Api:Vencord.Api,reload:()=>location.reload(),restart:cn,canonicalizeMatch:wr,canonicalizeReplace:Ua,canonicalizeReplacement:ds,fakeRender:(r,i)=>{let s=t?.deref(),l=s?.closed===!1?s:window.open("about:blank","Fake Render","popup,width=500,height=500");t=new WeakRef(l),l.focus();let c=l.document;c.body.style.margin="1em",l.prepared||(l.prepared=!0,[...document.querySelectorAll("style"),...document.querySelectorAll("link[rel=stylesheet]")].forEach(u=>{let d=u.cloneNode(!0);u.parentElement?.tagName==="HEAD"?c.head.append(d):d.id?.startsWith("vencord-")||d.id?.startsWith("vcd-")?c.documentElement.append(d):c.body.append(d)})),ar.render(O.createElement(r,i),c.body.appendChild(document.createElement("div")))}}},start(){let e=this.getShortcuts();window.shortcutList=e;for(let[t,n]of Object.entries(e))window[t]=n},stop(){delete window.shortcutList;for(let e in this.getShortcuts())delete window[e]}})});var Xv,Sp,Jv=g(()=>{"use strict";a();Mt();Ut();M();w();I();Xv=(e,{user:t})=>()=>{e.push(o(G.MenuItem,{id:"vc-copy-user-url",label:"Copy User URL",action:()=>Yt.copy(`<https://discord.com/users/${t.id}>`),icon:Qr}))},Sp=y({name:"CopyUserURLs",authors:[p.castdrian],description:"Adds a 'Copy User URL' option to the user context menu.",start(){ce("user-context",Xv)},stop(){de("user-context",Xv)}})});var $o,xP,bp,Tp,$a,xp,wp,Qv=g(()=>{"use strict";a();Ao();U();M();Ze();pt();w();vr();j();I();$o=new ie("CrashHandler"),xP=A("pushLazy","popAll"),bp=D({attemptToPreventCrashes:{type:3,description:"Whether to attempt to prevent Discord crashes.",default:!0},attemptToNavigateToHome:{type:3,description:"Whether to attempt to navigate to the home when preventing Discord crashes.",default:!1}}),Tp=0,$a=0,xp=!1,wp=y({name:"CrashHandler",description:"Utility plugin for handling and possibly recovering from Crashes without a restart",authors:[p.Nuckyz],enabledByDefault:!0,settings:bp,patches:[{find:".Messages.ERRORS_UNEXPECTED_CRASH",replacement:{match:/(?=this\.setState\()/,replace:"$self.handleCrash(this)||"}}],handleCrash(e){if(Date.now()-$a<=1e3&&!xp)return!0;if(xp=!1,++Tp>5){try{Ie({color:"#eed202",title:"Discord has crashed!",body:"Awn :( Discord has crashed more than five times, not attempting to recover.",noPersist:!0})}catch{}return $a=Date.now(),!1}setTimeout(()=>Tp--,6e4);try{return Tp===1&&Zi("Uh oh, Discord has just crashed... but good news, there is a Vencord update available that might fix this issue! Would you like to update now?",!0),bp.store.attemptToPreventCrashes?(this.handlePreventCrash(e),!0):!1}catch(t){return $o.error("Failed to handle crash",t),!1}finally{$a=Date.now()}},handlePreventCrash(e){if(Date.now()-$a>=1e3)try{Ie({color:"#eed202",title:"Discord has crashed!",body:"Attempting to recover...",noPersist:!0})}catch{}try{F.dispatch({type:"CONTEXT_MENU_CLOSE"})}catch(t){$o.debug("Failed to close open context menu.",t)}try{xP?.popAll()}catch(t){$o.debug("Failed to close old modals.",t)}try{Mc()}catch(t){$o.debug("Failed to close all open modals.",t)}try{F.dispatch({type:"USER_PROFILE_MODAL_CLOSE"})}catch(t){$o.debug("Failed to close user popout.",t)}try{F.dispatch({type:"LAYER_POP_ALL"})}catch(t){$o.debug("Failed to pop all layers.",t)}if(bp.store.attemptToNavigateToHome)try{dr.transitionTo("/channels/@me")}catch(t){$o.debug("Failed to navigate to home",t)}try{xp=!0,e.forceUpdate()}catch(t){$o.debug("Failed to update crash handler component.",t)}}})});function Ga(e){return Boolean(e)}function Mp(e){return e!=null}var Ha=g(()=>{"use strict";a()});async function Vv(e
`.trim().replace(/\s+/g," ")})}},{name:"view friend invites",description:"View a list of all generated friend invites.",inputType:3,execute:async(e,t)=>{let r=(await Ja.getAllFriendInvites()).map(i=>`
`)||"You have no active friend invites!"})}},{name:"revoke friend invites",description:"Revokes all generated friend invites.",inputType:3,execute:async(e,t)=>{await Ja.revokeFriendInvites(),ue(t.channel.id,{content:"All friend invites have been revoked."})}}]})});var Yp,Q1=g(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/gameActivityToggle/style.css",{name:"src/plugins/gameActivityToggle/style.css",source:`[class*="withTagAsButton"]{
`,classNames:{},dom:null});ad="src/plugins/imageZoom/styles.css"});var _e,hS,ld,sd=g(()=>{"use strict";a();Mt();U();Je();La();M();jr();w();I();fS();od();gS();_e=D({saveZoomValues:{type:3,description:"Whether to save zoom and lens size values",default:!0},invertScroll:{type:3,description:"Invert scroll",default:!0},nearestNeighbour:{type:3,description:"Use Nearest Neighbour Interpolation when scaling images",default:!1},square:{type:3,description:"Make the lens square",default:!1},zoom:{description:"Zoom of the lens",type:5,markers:Fo(1,50,4),default:2,stickToMarkers:!1},size:{description:"Radius / Size of the lens",type:5,markers:Fo(50,1e3,50),default:100,stickToMarkers:!1},zoomSpeed:{description:"How fast the zoom / lens size changes",type:5,markers:Fo(.1,5,.2),default:.5,stickToMarkers:!1}}),hS=e=>()=>{e.push(o(G.MenuGroup,{id:"image-zoom"},o(G.MenuCheckboxItem,{id:"vc-square",label:"Square Lens",checked:_e.store.square,action:()=>{_e.store.square=!_e.store.square,pn.closeContextMenu()}}),o(G.MenuCheckboxItem,{id:"vc-nearest-neighbour",label:"Nearest Neighbour",checked:_e.store.nearestNeighbour,action:()=>{_e.store.nearestNeighbour=!_e.store.nearestNeighbour,pn.closeContextMenu()}}),o(G.MenuControlItem,{id:"vc-zoom",label:"Zoom",control:(t,n)=>o(G.MenuSliderControl,{ref:n,...t,minValue:1,maxValue:50,value:_e.store.zoom,onChange:hn(r=>_e.store.zoom=r,100)})}),o(G.MenuControlItem,{id:"vc-size",label:"Lens Size",control:(t,n)=>o(G.MenuSliderControl,{ref:n,...t,minValue:50,maxValue:1e3,value:_e.store.size,onChange:hn(r=>_e.store.size=r,100)})}),o(G.MenuControlItem,{id:"vc-zoom-speed",label:"Zoom Speed",control:(t,n)=>o(G.MenuSliderControl,{ref:n,...t,minValue:.1,maxValue:5,value:_e.store.zoomSpeed,onChange:hn(r=>_e.store.zoomSpeed=r,100),renderValue:r=>`${r.toFixed(3)}x`})})))},ld=y({name:"ImageZoom",description:"Lets you zoom in to images and gifs. Use scroll wheel to zoom in and shift + scroll wheel to increase lens radius / size",authors:[p.Aria],tags:["ImageUtilities"],patches:[{find:"Messages.OPEN_IN_BROWSER",replacement:{match:/return.{1,200}\.wrapper.{1,200}src:\i,/g,replace:`$&id:'${Ss}',`}},{find:"handleImageLoad=",replacement:[{match:/showThumbhashPlaceholder:\i,/,replace:"...$self.makeProps(this),$&"},{match:/componentDidMount\(\){/,replace:"$&$self.renderMagnifier(this);"},{match:/componentWillUnmount\(\){/,replace:"$&$self.unMountMagnifier();"}]},{find:".carouselModal",replacement:{match:/(?<=\.carouselModal.{0,100}onClick:)\i,/,replace:"()=>{},"}}],settings:_e,currentMagnifierElement:null,element:null,Magnifier:id,root:null,makeProps(e){return{onMouseOver:()=>this.onMouseOver(e),onMouseOut:()=>this.onMouseOut(e),onMouseDown:t=>this.onMouseDown(t,e),onMouseUp:()=>this.onMouseUp(e),id:e.props.id}},renderMagnifier(e){e.props.id===Ss&&(this.currentMagnifierElement||(this.currentMagnifierElement=o(id,{size:_e.store.size,zoom:_e.store.zoom,instance:e}),this.root=ar.createRoot(this.element),this.root.render(this.currentMagnifierElement)))},unMountMagnifier(){this.root?.unmount(),this.currentMagnifierElement=null,this.root=null},onMouseOver(e){e.setState(t=>({...t,mouseOver:!0}))},onMouseOut(e){e.setState(t=>({...t,mouseOver:!1}))},onMouseDown(e,t){e.button===0&&t.setState(n=>({...n,mouseDown:!0}))},onMouseUp(e){e.setState(t=>({...t,mouseDown:!1}))},start(){vt(ad),ce("image-context",hS),this.element=document.createElement("div"),this.element.classList.add("MagnifierContainer"),document.body.appendChild(this.element)},stop(){Bt(ad),this.root&&this.root.unmount(),this.element?.remove(),de("image-context",hS)}})});function NI(e){let t=e?.message?.content,[n,r]=O.useState("password");return o(ze,{...e},o(at,null,o(S.FormTitle,{tag:"h4"},"Decrypt Message")),o(Ve,null,o(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Message with Encryption"),o(Qe,{defaultValue:t,disabled:!0}),o(S.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Password"),o(Qe,{style:{marginBottom:"20px"},onChange:r})),o(Ot,null,o(R,{color:R.Colors.GREEN,onClick:()=>{let i=cd(t,n,!0);!i||!e?.message||(Vencord.Plugins.plugins.InvisibleChat.buildEmbed(e?.m
`,classNames:{},dom:null});Pd="src/plugins/messageLogger/deleteStyleText.css"});function HS(){E.plugins.MessageLogger.deleteStyle==="text"?(vt(Pd),Bt(Md)):(Bt(Pd),vt(Md))}var tA,zS,jS,WS,Id,qS=g(()=>{"use strict";a();US();Mt();U();Je();le();M();Ze();w();j();I();$S();GS();tA=A("edited","communicationDisabled","isSystemMessage");zS="ml-remove-history",jS="ml-toggle-style",WS=(e,t)=>()=>{let{message:n}=t,{deleted:r,editHistory:i,id:s,channel_id:l}=n;if(!r&&!i?.length)return;e:{if(!r)break e;let c=document.getElementById(`chat-messages-${l}-${s}`);if(!c)break e;e.push(o(G.MenuItem,{id:jS,key:jS,label:"Toggle Deleted Highlight",action:()=>c.classList.toggle("messagelogger-deleted")}))}e.push(o(G.MenuItem,{id:zS,key:zS,label:"Remove Message History",color:"danger",action:()=>{r?F.dispatch({type:"MESSAGE_DELETE",channelId:l,id:s,mlDeleted:!0}):n.editHistory=[]}}))},Id=y({name:"MessageLogger",description:"Temporarily logs deleted and edited messages.",authors:[p.rushii,p.Ven,p.AutumnVN],start(){HS(),ce("message",WS)},stop(){de("message",WS)},renderEdit(e){return o(_,{noop:!0},o("div",{className:"messagelogger-edited"},Fe.parse(e.content),o($n,{timestamp:e.timestamp,isEdited:!0,isInline:!1},o("span",{className:tA.edited}," ","(",tt.Messages.MESSAGE_EDITED,")"))))},makeEdit(e,t){return{timestamp:dn?.call(e.edited_timestamp),content:t.content}},options:{deleteStyle:{type:4,description:"The style of deleted messages",default:"text",options:[{label:"Red text",value:"text",default:!0},{label:"Red overlay",value:"overlay"}],onChange:()=>HS()},ignoreBots:{type:3,description:"Whether to ignore messages by bots",default:!1},ignoreSelf:{type:3,description:"Whether to ignore messages by yourself",default:!1},ignoreUsers:{type:0,description:"Comma-separated list of user IDs to ignore",default:""},ignoreChannels:{type:0,description:"Comma-separated list of channel IDs to ignore",default:""},ignoreGuilds:{type:0,description:"Comma-separated list of guild IDs to ignore",default:""}},handleDelete(e,t,n){try{if(e==null||!n&&!e.has(t.id))return e;let r=i=>{let s=e.get(i);if(!s)return;let l=64;t.mlDeleted||(s.flags&l)===l||this.shouldIgnore(s)?e=e.remove(i):e=e.update(i,u=>u.set("deleted",!0).set("attachments",u.attachments.map(d=>(d.deleted=!0,d))))};n?t.ids.forEach(r):r(t.id)}catch(r){new ie("MessageLogger").error("Error during handleDelete",r)}return e},shouldIgnore(e){let{ignoreBots:t,ignoreSelf:n,ignoreUsers:r,ignoreChannels:i,ignoreGuilds:s}=E.plugins.MessageLogger,l=W.getCurrentUser().id;return t&&e.author?.bot||n&&e.author?.id===l||r.includes(e.author?.id)||i.includes(e.channel_id)||i.includes(Q.getChannel(e.channel_id)?.parent_id)||s.includes(Q.getChannel(e.channel_id)?.guild_id)},patches:[{find:'displayName="MessageStore"',replacement:[{match:/MESSAGE_DELETE:function\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?},/,replace:"MESSAGE_DELETE:function($1){ var cache = $2getOrCreate($1.channelId); cache = $self.handleDelete(cache, $1, false); $2commit(cache);},"},{match:/MESSAGE_DELETE_BULK:function\((\i)\){let.+?((?:\i\.){2})getOrCreate.+?},/,replace:"MESSAGE_DELETE_BULK:function($1){ var cache = $2getOrCreate($1.channelId); cache = $self.handleDelete(cache, $1, true); $2commit(cache);},"},{match:/(MESSAGE_UPDATE:function\((\i)\).+?)\.update\((\i)/,replace:"$1.update($3,m => (($2.message.flags & 64) === 64 || $self.shouldIgnore($2.message)) ? m : $2.message.content !== m.editHistory?.[0]?.content && $2.message.content !== m.content ? m.set('editHistory',[...(m.editHistory || []), $self.makeEdit($2.message, m)]) : m).update($3"},{match:/(?<=getLastEditableMessage\(\i\)\{.{0,200}\.find\((\i)=>)/,replace:"!$1.deleted &&"}]},{find:"}addReaction(",replacement:[{match:/this\.customRenderedContent=(\i)\.customRenderedContent,/,replace:"this.customRenderedContent = $1.customRenderedContent,this.deleted = $1.deleted || false,this.editHistory = $1.editHistory || [],"}]},{find:"THREAD_STARTER_MESSAGE?null===",replacement:[{match:/interactionData:(\i)\.interactionData/,replace:"interactionData:$1.interactionData,deleted:$1.delete
`)}):(ue(n.channel.id,{content:`${jo}Thetag**${e.name}**doesnotexistanymore!PleasereloadurDiscordtofix:)`}),{content:`/${e.name}`}),[nA]:!0},"CustomTags")}var jo,ll,nA,al,sl,oA,rA,Ad,YS=g(()=>{"use strict";a();Jt();jn();U();M();w();jo="<:luna:1035316192220553236>",ll="MessageTags_TAGS",nA=Symbol("MessageTags"),al=()=>Pt(ll).then(e=>e??[]),sl=e=>Pt(ll).then(t=>(t??[]).find(n=>n.name===e)??null),oA=async e=>{let t=await al();return t.push(e),Zt(ll,t),t},rA=async e=>{let t=await al();return t=await t.filter(n=>n.name!==e),Zt(ll,t),t};Ad=y({name:"MessageTags",description:"Allows you to save messages and to use them with a simple command.",authors:[p.Luna],options:{clyde:{name:"Clyde message on send",description:"If enabled, clyde will send you an ephemeral message when a tag was used.",type:3,default:!0}},dependencies:["CommandsAPI"],async start(){for(let e of await al())KS(e)},commands:[{name:"tags",description:"Manage all the tags for yourself",inputType:0,options:[{name:"create",description:"Create a new tag",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0},{name:"message",description:"The message that you will send when using this tag",type:3,required:!0}]},{name:"list",description:"List all tags from yourself",type:1,options:[]},{name:"delete",description:"Remove a tag from your yourself",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0}]},{name:"preview",description:"Preview a tag without sending it publicly",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0}]}],async execute(e,t){switch(e[0].name){case"create":{let n=ot(e[0].options,"tag-name",""),r=ot(e[0].options,"message","");if(await sl(n))return ue(t.channel.id,{content:`${jo}ATagwiththename**${n}**alreadyexists!`});let i={name:n,enabled:!0,message:r};KS(i),await oA(i),ue(t.channel.id,{content:`${jo}Successfullycreatedthetag**${n}**!`});break}case"delete":{let n=ot(e[0].options,"tag-name","");if(!await sl(n))return ue(t.channel.id,{content:`${jo}ATagwiththename**${n}**doesnotexist!`});os(n),await rA(n),ue(t.channel.id,{content:`${jo}Successfullydeletedthetag**${n}**!`});break}case"list":{ue(t.channel.id,{embeds:[{title:"All Tags:",description:(await al()).map(n=>`\`${n.name}\`: ${n.message.slice(0,72).replaceAll("\\n"," ")}${n.message.length>72?"...":""}`).join(`
`)||`${jo}Woops!Therearenotagsyet,use\`/tags create\` to create one!`,color:14122879,type:"rich"}]});break}case"preview":{letn=ot(e[0].options,"tag-name",""),r=awaitsl(n);if(!r)returnue(t.channel.id,{content:`${jo} A Tag with the name **${n}** does not exist!`});ue(t.channel.id,{content:r.message.replaceAll("\\n",`
`,classNames:{},dom:null});$d="src/plugins/noMosaic/styles.css"});var Gd,Hd,s0=g(()=>{"use strict";a();U();Je();M();w();i0();Gd=D({inlineVideo:{description:"Play videos without carousel modal",type:3,default:!0,restartNeeded:!0},mediaLayoutType:{description:"Choose media layout type",type:4,restartNeeded:!0,options:[{label:"STATIC, render loading image but image isn't resposive, no problem unless discord window width is too small",value:"STATIC",default:!0},{label:"RESPONSIVE, image is responsive but not render loading image, cause messages shift when loaded",value:"RESPONSIVE"}]}}),Hd=y({name:"NoMosaic",authors:[p.AutumnVN],description:"Removes Discord new image mosaic",tags:["image","mosaic","media"],settings:Gd,patches:[{find:".oneByTwoLayoutThreeGrid",replacement:[{match:/mediaLayoutType:\i\.\i\.MOSAIC/,replace:"mediaLayoutType:$self.mediaLayoutType()"},{match:/null!==\(\i=\i\.get\(\i\)\)&&void 0!==\i\?\i:"INVALID"/,replace:'"INVALID"'}]},{find:"renderAttachments(",predicate:()=>Gd.store.inlineVideo,replacement:{match:/url:(\i)\.url\}\);return /,replace:"$&$1.content_type?.startsWith('image/')&&"}},{find:"Messages.REMOVE_ATTACHMENT_TOOLTIP_TEXT",replacement:{match:/\i===\i\.\i\.MOSAIC/,replace:"true"}}],mediaLayoutType(){return Gd.store.mediaLayoutType},start(){vt($d)},stop(){Bt($d)}})});var bA,xs,zd,a0=g(()=>{"use strict";a();U();M();w();j();bA=A("getMessageRequestsCount"),xs=D({hideFriendRequestsCount:{type:3,description:"Hide incoming friend requests count",default:!0,restartNeeded:!0},hideMessageRequestsCount:{type:3,description:"Hide message requests count",default:!0,restartNeeded:!0},hidePremiumOffersCount:{type:3,description:"Hide nitro offers count",default:!0,restartNeeded:!0}}),zd=y({name:"NoPendingCount",description:"Removes the ping count of incoming friend requests, message requests, and nitro offers.",authors:[p.amia],settings:xs,patches:[{find:"getPendingCount(){",predicate:()=>xs.store.hideFriendRequestsCount,replacement:{match:/(?<=getPendingCount\(\)\{)/,replace:"return 0;"}},{find:"getMessageRequestsCount(){",predicate:()=>xs.store.hideMessageRequestsCount,replacement:{match:/(?<=getMessageRequestsCount\(\)\{)/,replace:"return 0;"}},{find:".getSpamChannelsCount(),",predicate:()=>xs.store.hideMessageRequestsCount,replacement:{match:/(?<=getSpamChannelsCount\(\),\i=)\i\.getMessageRequestsCount\(\)/,replace:"$self.getRealMessageRequestCount()"}},{find:"showProgressBadge:",predicate:()=>xs.store.hidePremiumOffersCount,replacement:{match:/(?<=\{unviewedTrialCount:(\i),unviewedDiscountCount:(\i)\}.{0,200}\i=)\1\+\2/,replace:"0"}}],getRealMessageRequestCount(){return bA.getMessageRequestChannelIds().size}})});var jd,l0=g(()=>{"use strict";a();M();w();jd=y({name:"NoProfileThemes",description:"Completely removes Nitro profile themes",authors:[p.TheKodeToad],patches:[{find:".NITRO_BANNER,",replacement:{match:/=(?=\i\.\i\.isPremiumAtLeast\(null==(\i))/,replace:"=(arguments[0]?.bannerSrc||$1?.banner)&&"}},{find:".avatarPositionPremiumNoBanner,default:",replacement:{match:/\.avatarPositionPremiumNoBanner(?=,default:\i\.(\i))/,replace:".$1"}},{find:"hasThemeColors(){",replacement:{match:/get canUsePremiumProfileCustomization\(\){return /,replace:"$&false &&"}}]})});var ul,Wd,c0=g(()=>{"use strict";a();U();M();w();ul=D({userList:{description:"List of users to allow or exempt pings for (separated by commas or spaces)",type:0,default:"1234567890123445,1234567890123445"},shouldPingListed:{description:"Behaviour",type:4,options:[{label:"Do not ping the listed users",value:!1},{label:"Only ping the listed users",value:!0,default:!0}]},inverseShiftReply:{description:"Invert Discord's shift replying behaviour (enable to make shift reply mention user)",type:3,default:!1}}),Wd=y({name:"NoReplyMention",description:"Disables reply pings by default",authors:[p.DustyAngel47,p.axyie,p.pylix,p.outfoxxed],settings:ul,shouldMention(e,t){let n=ul.store.userList.includes(e.author.id),r=ul.store.shouldPingListed?n:!n;return ul.store.inverseShiftReply?t!==r:!t&&r},patches:[{find:',"Message")}function',replacement:{match:/:(\i),shou
`,s),"Failed to fetch user. Check the console for more info."}}return null}var ui,D0,DA,OA,fl,_A,BA,um,_0=g(()=>{"use strict";a();Jt();M();rr();w();j();I();ui=qs(Bp()),D0=0,DA=20,OA=128,fl=10,_A=xo(()=>Promise.all(Array.from({length:fl},(e,t)=>O0(`https://raw.githubusercontent.com/VenPlugs/petpet/main/frames/pet${t}.gif`)))),BA=A("getUploads");um=y({name:"petpet",description:"Adds a /petpet slash command to create headpet gifs from any image",authors:[p.Ven],dependencies:["CommandsAPI"],commands:[{inputType:0,name:"petpet",description:"Create a petpet gif. You can only specify one of the image options",options:[{name:"delay",description:"The delay between each frame. Defaults to 20.",type:4},{name:"resolution",description:"Resolution for the gif. Defaults to 120. If you enter an insane number and it freezes Discord that's your fault.",type:4},{name:"image",description:"Image attachment to use",type:11},{name:"url",description:"URL to fetch image from",type:3},{name:"user",description:"User whose avatar to use as image",type:6},{name:"no-server-pfp",description:"Use the normal avatar instead of the server specific one when using the 'user' option",type:5}],execute:async(e,t)=>{let n=await _A(),r=ot(e,"no-server-pfp",!1);try{var i=await FA(e,t,r);if(!i)throw"No Image specified!"}catch(v){ue(t.channel.id,{content:String(v)});return}let s=await O0(i),l=ot(e,"delay",DA),c=ot(e,"resolution",OA),u=(0,ui.GIFEncoder)(),d=document.createElement("canvas");d.width=d.height=c;let f=d.getContext("2d");for(let v=0;v<fl;v++){f.clearRect(0,0,d.width,d.height);let T=v<fl/2?v:fl-v,P=.8+T*.02,b=.8-T*.05,x=(1-P)*.5+.1,C=1-b-.08;f.drawImage(s,x*c,C*c,P*c,b*c),f.drawImage(n[v],0,0,c,c);let{data:k}=f.getImageData(0,0,c,c),B=(0,ui.quantize)(k,256),$=(0,ui.applyPalette)(k,B);u.writeFrame($,c,c,{transparent:!0,palette:B,delay:l})}u.finish();let h=new File([u.bytesView()],"petpet.gif",{type:"image/gif"});setTimeout(()=>Ei.promptToUpload([h],t.channel,D0),10)}}]})});var B0=g(()=>{});var F0,pm,U0=g(()=>{"use strict";a();B0();U();le();M();w();I();F0=D({loop:{description:"Whether to make the PiP video loop or not",type:3,default:!0,restartNeeded:!1}}),pm=y({name:"PictureInPicture",description:"Adds picture in picture to videos (next to the Download button)",authors:[p.Lumap],settings:F0,patches:[{find:".nonMediaAttachment]",replacement:{match:/\.nonMediaAttachment\]:!(\i).{0,10}children:\[(\S)/,replace:"$&,$1&&$2&&$self.renderPiPButton(),"}}],renderPiPButton:_.wrap(()=>o(V,{text:"Toggle Picture in Picture"},e=>o("div",{...e,className:"vc-pip-button",role:"button",style:{cursor:"pointer",paddingTop:"4px",paddingLeft:"4px",paddingRight:"4px"},onClick:t=>{let n=t.currentTarget.parentNode.parentNode.querySelector("video"),r=document.body.appendChild(n.cloneNode(!0));r.loop=F0.store.loop,r.style.display="none",r.onleavepictureinpicture=()=>r.remove();function i(){r.currentTime=n.currentTime,r.requestPictureInPicture(),n.pause(),r.play()}r.readyState===4?i():r.onloadedmetadata=i}},o("svg",{width:"24px",height:"24px",viewBox:"0 0 24 24"},o("path",{fill:"currentColor",d:"M21 3a1 1 0 0 1 1 1v7h-2V5H4v14h6v2H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h18zm0 10a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1v-6a1 1 0 0 1 1-1h8zm-1 2h-6v4h6v-4z"})))),{noop:!0})})});function H0(){return lt(["plugins.PinDMs.pinnedDMs"]),gl()}function pi(e){return gl().has(e)}function z0(e){let t=gl();t.delete(e)||t.add(e),G0([...t])}function mm(){return gl(),As.store.pinOrder===0?UA.getPrivateChannelIds().filter(pi):Yn}function j0(e){return mm()[e]}function fm(e,t){let n=$0(),r=n.indexOf(e),i=r+t;[n[r],n[i]]=[n[i],n[r]],G0(n)}var As,UA,Yn,dm,$0,G0,$A,gl,gm=g(()=>{"use strict";a();U();w();j();As=D({pinOrder:{type:4,description:"Which order should pinned DMs be displayed in?",options:[{label:"Most recent message",value:0,default:!0},{label:"Custom (right click channels to reorder)",value:1}]}}),UA=Me("PrivateChannelSortStore"),$0=()=>(E.plugins.PinDMs.pinnedDMs||void 0)?.split(","),G0=e=>{dm=void 0,E.plugins.PinDMs.pinnedDMs=e.join(",")},$A=()=>(Yn=$0()??[],dm=new Set(Yn)),gl=()=>dm??$A()});funct
`,e))},stop(){Bm=void 0},decodeError(e,...t){let n=0;return Bm?.[e]?.replace(/%s/g,()=>{let r=t[n];return n++,r})}})});var $m={};Be($m,{ServerListRenderPosition:()=>Il,addServerListElement:()=>Cs,removeServerListElement:()=>Ns,renderAll:()=>gC});function Um(e){return e===0?mC:fC}function Cs(e,t){Um(e).add(t)}function Ns(e,t){Um(e).delete(t)}var dC,Il,mC,fC,gC,Al=g(()=>{"use strict";a();Ze();dC=new ie("ServerListAPI"),Il=(n=>(n[n.Above=0]="Above",n[n.In=1]="In",n))(Il||{}),mC=new Set,fC=new Set;gC=e=>{let t=[];for(let n of Um(e))try{t.unshift(n())}catch(r){dC.error("Failed to render server list element:",r)}return t}});function hC(){let e=[];Object.values(Te.getGuilds()).forEach(t=>{$r.getChannels(t.id).SELECTABLE.forEach(n=>{!lr.hasUnread(n.channel.id)||e.push({channelId:n.channel.id,messageId:lr.lastMessageId(n.channel.id),readStateType:0})})}),F.dispatch({type:"BULK_ACK",context:"APP",channels:e})}var yC,Gm,kb=g(()=>{"use strict";a();Al();M();w();I();yC=()=>o(R,{onClick:hC,size:R.Sizes.MIN,color:R.Colors.BRAND,style:{marginTop:"2px",marginBottom:"8px",marginLeft:"9px"}},"Read all"),Gm=y({name:"ReadAllNotificationsButton",description:"Read all server notifications with a single button click!",authors:[p.kemo],dependencies:["ServerListAPI"],renderReadAllButton:()=>o(yC,null),start(){Cs(0,this.renderReadAllButton)},stop(){Ns(0,this.renderReadAllButton)}})});var Vt,Cl=g(()=>{"use strict";a();U();w();Vt=D({notices:{type:3,description:"Also show a notice at the top of your screen when removed (use this if you don't want to miss any notifications).",default:!1},offlineRemovals:{type:3,description:"Notify you when starting discord if you were removed while offline.",default:!0},friends:{type:3,description:"Notify when a friend removes you",default:!0},friendRequestCancels:{type:3,description:"Notify when a friend request is cancelled",default:!0},servers:{type:3,description:"Notify when removed from a server",default:!0},groups:{type:3,description:"Notify when removed from a group chat",default:!0}})});var Hm=g(()=>{"use strict";a()});async function bC(){$t.delMany(["relationship-notifier-guilds","relationship-notifier-groups","relationship-notifier-friends"])}async function zm(){await bC();let[e,t,n]=await $t.getMany([Rb(),Lb(),Eb()]);if(await Promise.all([kl(),Rl(),ks()]),Vt.store.offlineRemovals){if(Vt.store.groups&&t?.size)for(let[r,i]of t)fi.has(r)||mo(`Youarenolongerinthegroup${i.name}.`,i.iconURL);if(Vt.store.servers&&e?.size)for(let[r,i]of e)mi.has(r)||mo(`Youarenolongerintheserver${i.name}.`,i.iconURL);if(Vt.store.friends&&n?.friends.length)for(let r of n.friends){if(Nr.friends.includes(r))continue;let i=await kt.getUser(r).catch(()=>{});i&&mo(`Youarenolongerfriendswith${ao(i)}.`,i.getAvatarURL(void 0,void 0,!1),()=>Dn(i.id))}if(Vt.store.friendRequestCancels&&n?.requests?.length)for(let r of n.requests){if(Nr.requests.includes(r)||[1,2,4].includes(et.getRelationshipType(r)))continue;let i=await kt.getUser(r).catch(()=>{});i&&mo(`Friendrequestfrom${ao(i)}hasbeenrevoked.`,i.getAvatarURL(void 0,void 0,!1),()=>Dn(i.id))}}}function mo(e,t,n){Vt.store.notices&&Nl.showNotice(e,"OK",()=>Nl.popNotice()),Ie({title:"Relationship Notifier",body:e,icon:t,onClick:n})}function Db(e){return mi.get(e)}function jm(e){mi.delete(e),kl()}async function kl(){mi.clear();let e=W.getCurrentUser().id;for(let[t,{name:n,icon:r}]of Object.entries(Te.getGuilds()))ke.isMember(t,e)&&mi.set(t,{id:t,name:n,iconURL:r&&`https://cdn.discordapp.com/icons/${t}/${r}.png`});await $t.set(Rb(),mi)}function Ob(e){return fi.get(e)}function Wm(e){fi.delete(e),Rl()}async function Rl(){fi.clear();for(let{type:e,id:t,name:n,rawRecipients:r,icon:i}of Q.getSortedPrivateChannels())e===3&&fi.set(t,{id:t,name:n||r.map(s=>s.username).join(", "),iconURL:i&&`https://cdn.discordapp.com/channel-icons/${t}/${i}.png`});await $t.set(Lb(),fi)}async function ks(){Nr.friends=[],Nr.requests=[];let e=et.getRelationships();for(let t in e)switch(e[t]){case 1:Nr.friends.push(t);break;case 3:Nr.requests.push(t);break}await $t.set(Eb(),Nr)}var mi,fi,Nr,Rb,Lb,Eb,
`,classNames:{},dom:null});Os="src/plugins/shikiCodeblocks.desktop/devicon.css"});var _s=g(()=>{"use strict";a()});var qC,Zo,Mf=g(()=>{"use strict";a();U();Je();Re();ro();w();Ds();Tf();wf();_s();qC=Object.keys(go),Zo=D({theme:{type:4,description:"Default themes",options:qC.map(e=>({label:oo(Su(e)),value:go[e],default:go[e]===go.DarkPlus})),onChange:he.setTheme},customTheme:{type:0,description:"A link to a custom vscode theme",placeholder:go.MaterialCandy,onChange:e=>{he.setTheme(e||Zo.store.theme)}},tryHljs:{type:4,description:"Use the more lightweight default Discord highlighter and theme.",options:[{label:"Never",value:"NEVER"},{label:"Prefer Shiki instead of Highlight.js",value:"SECONDARY",default:!0},{label:"Prefer Highlight.js instead of Shiki",value:"PRIMARY"},{label:"Always",value:"ALWAYS"}]},useDevIcon:{type:4,description:"How to show language icons on codeblocks",options:[{label:"Disabled",value:"DISABLED"},{label:"Colorless",value:"GREYSCALE",default:!0},{label:"Colored",value:"COLOR"}],onChange:e=>{e==="DISABLED"?Bt(Os):vt(Os)}},bgOpacity:{type:5,description:"Background opacity",markers:[0,20,40,60,80,100],default:100,componentProps:{stickToMarkers:!1,onValueRender:null}}},{theme:{disabled(){return!!this.store.customTheme}},customTheme:{isValid(e){if(!e)return!0;let t=yc(e);return t?t.pathname.endsWith(".json")?!0:"Must be a json file":"Must be a valid URL"}}})});function RT(e,t){let n=Zo.use(e),[r,i]=O.useState(!1),s={...n,...t},l=s.customTheme||s.theme;if(t){let c=he.currentThemeUrl&&l&&l!==he.currentThemeUrl,u=Object.keys(t).length===0;r&&(!c||u)&&i(!1),!r&&c&&(i(!0),he.setTheme(l))}return{...s,isThemeLoading:l!==he.currentThemeUrl}}var LT=g(()=>{"use strict";a();I();Ds();Mf()});function ET(e){return e=e.slice(1),e.length<6&&(e=e.split("").map(t=>t+t).join("")),e.length===6&&(e+="ff"),e.length>6&&(e=e.slice(0,6)),e.split(/(..)/).filter(Boolean).map(t=>parseInt(t,16))}var DT=g(()=>{"use strict";a()});var Bn,OT,Bs=g(()=>{"use strict";a();Je();I();Fl();_s();Bn=Ue("shiki-"),OT=({lang:e,tryHljs:t})=>{let n=e?cr?.getLanguage?.(e):null,i=(e?kr(e):null)?.name;switch(t){case"ALWAYS":return!0;case"PRIMARY":return!!n||e==="";case"SECONDARY":return!i&&!!n;case"NEVER":return!1;default:return!1}}});function _T(e){let[t,n]=O.useState(!1);function r(i){Yt.copy(i),n(!0),setTimeout(()=>{n(!1)},e)}return[t,r]}var BT=g(()=>{"use strict";a();I()});function FT({content:e,...t}){let[n,r]=_T(1e3);return o("button",{...t,style:{...t.style,cursor:n?"default":void 0},onClick:()=>r(e)},n?"Copied!":"Copy")}var UT=g(()=>{"use strict";a();BT()});function $T({content:e,theme:t}){let n=[];return Yt.SUPPORTS_COPY&&n.push(o(FT,{content:e,className:Bn("btn"),style:{backgroundColor:t.accentBgColor,color:t.accentFgColor}})),o("div",{className:Bn("btns")},n)}var GT=g(()=>{"use strict";a();I();Bs();UT()});var HT,zT=g(()=>{"use strict";a();I();Bs();HT=({theme:e,useHljs:t,lang:n,content:r,tokens:i})=>{let s;if(t)try{let{value:c}=cr.highlight(n,r,!0);s=c.split(`
`);return o(S.FormSection,{title:"Server Trace",tag:"h2"},o("code",null,o(ge,{flexDirection:"column",style:{color:"var(--header-primary)",gap:5,userSelect:"text"}},t.map(n=>o("span",null,n)))))}function EN(){if(!$s?.logs)return o("div",null,"Loading...");let e=$s.logGroups.find(t=>t.serverTrace)?.serverTrace;return o(O.Fragment,null,o(RN,{title:"Startup Timings",logs:$s.logs,traceEnd:$s.endTime_}),o("div",{style:{marginTop:5}},"\xA0"),e&&o(LN,{trace:e}))}var $s,DN,Cx=g(()=>{"use strict";a();le();Rt();j();I();$s=A("markWithDelta","markAndLog","markAt");DN=_.wrap(EN)});var Wf,Nx=g(()=>{"use strict";a();M();st();w();Wf=y({name:"StartupTimings",description:"Adds Startup Timings to the Settings menu",authors:[p.Megu],patches:[{find:"UserSettingsSections.PAYMENT_FLOW_MODAL_TEST_PAGE,",replacement:{match:/{section:\i\.UserSettingsSections\.PAYMENT_FLOW_MODAL_TEST_PAGE/,replace:'{section:"StartupTimings",label:"Startup Timings",element:$self.StartupTimingPage},$&'}}],StartupTimingPage:ht(()=>(Cx(),To(Ax)).default)})});var qf,Kf,kx=g(()=>{"use strict";a();U();M();w();qf=D({superReactByDefault:{type:3,description:"Reaction picker will default to Super Reactions",default:!0},unlimitedSuperReactionPlaying:{type:3,description:"Remove the limit on Super Reactions playing at once",default:!1},superReactionPlayingLimit:{description:"Max Super Reactions to play at once",type:5,default:20,markers:[5,10,20,40,60,80,100],stickToMarkers:!0}},{superReactionPlayingLimit:{disabled(){return this.store.unlimitedSuperReactionPlaying}}}),Kf=y({name:"SuperReactionTweaks",description:"Customize the limit of Super Reactions playing at once, and super react by default",authors:[p.FieryFlames,p.ant0n],patches:[{find:",BURST_REACTION_EFFECT_PLAY",replacement:{match:/(?<=BURST_REACTION_EFFECT_PLAY:\i=>{.{50,100})(\i\(\i,\i\))>=\d+/,replace:"!$self.shouldPlayBurstReaction($1)"}},{find:".hasAvailableBurstCurrency)",replacement:{match:/(?<=\.useBurstReactionsExperiment.{0,20})useState\(!1\)(?=.+?(\i===\i\.EmojiIntention.REACTION))/,replace:"useState($self.settings.store.superReactByDefault && $1)"}}],settings:qf,shouldPlayBurstReaction(e){return!!(qf.store.unlimitedSuperReactionPlaying||e<=qf.store.superReactionPlayingLimit)}})});function Ox(e){let t=e.match(/^(\/)?(.+?)(?:\/([gimsuy]*))?$/);return t?new RegExp(t[2],t[3]?.split("").filter((n,r,i)=>i.indexOf(n)===r).join("")??"g"):new RegExp(e)}function _N(e){try{return Ox(e),null}catch(t){return o("span",{style:{color:"var(--text-danger)"}},String(t))}}function Yf({initialValue:e,onChange:t,placeholder:n}){let[r,i]=J(e);return o(Qe,{placeholder:n,value:r,onChange:i,spellCheck:!1,onBlur:()=>r!==e&&t(r)})}function Rx({title:e,rulesArray:t,rulesKey:n,update:r}){let i=e==="Using Regex";async function s(c){c!==t.length-1&&(t.splice(c,1),await $t.set(n,t),r())}async function l(c,u,d){u===t.length-1&&t.push(Dx()),t[u][d]=c,t[u].find===""&&t[u].replace===""&&t[u].onlyIfIncludes===""&&u!==t.length-1&&t.splice(u,1),await $t.set(n,t),r()}return o(m,null,o(S.FormTitle,{tag:"h4"},e),o(ge,{flexDirection:"column",style:{gap:"0.5em"}},t.map((c,u)=>o(O.Fragment,{key:`${c.find}-${u}`},o(ge,{flexDirection:"row",style:{gap:0}},o(ge,{flexDirection:"row",style:{flexGrow:1,gap:"0.5em"}},o(Yf,{placeholder:"Find",initialValue:c.find,onChange:d=>l(d,u,"find")}),o(Yf,{placeholder:"Replace",initialValue:c.replace,onChange:d=>l(d,u,"replace")}),o(Yf,{placeholder:"Only if includes",initialValue:c.onlyIfIncludes,onChange:d=>l(d,u,"onlyIfIncludes")})),o(R,{size:R.Sizes.MIN,onClick:()=>s(u),style:{background:"none",color:"var(--status-danger)",...u===t.length-1?{visibility:"hidden",pointerEvents:"none"}:{}}},o(xy,null))),i&&_N(c.find)))))}function BN(){let[e,t]=J("");return o(m,null,o(S.FormTitle,{tag:"h4"},"Test Rules"),o(Qe,{placeholder:"Type a message",onChange:t}),o(Qe,{placeholder:"Message with rules applied",editable:!1,value:_x(e)}))}function _x(e){if(e.length===0)return e;if(Hl)for(let t of Hl)!t.find||!t.replace||t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)||(e=`${e}`.replaceAll(t.find,t.replace.replaceAll("\\n",`
`)).replace(/^\s|\s$/g,""));if(zl){for(let t of zl)if(!(!t.find||!t.replace)&&!(t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)))try{let n=Ox(t.find);e=e.replace(n,t.replace.replaceAll("\\n",`
`))}catch{new ie("TextReplace").error(`Invalidregex:${t.find}`)}}return e=e.trim(),e}var Lx,Ex,Dx,Gl,Hl,zl,ON,FN,Zf,Bx=g(()=>{"use strict";a();cs();Kn();U();Rt();Ut();M();Ze();st();w();I();Lx="TextReplace_rulesString",Ex="TextReplace_rulesRegex",Dx=()=>({find:"",replace:"",onlyIfIncludes:""}),Gl=()=>[Dx()],Hl=Gl(),zl=Gl(),ON=D({replace:{type:6,description:"",component:()=>{let e=Po();return o(m,null,o(Rx,{title:"Using String",rulesArray:Hl,rulesKey:Lx,update:e}),o(Rx,{title:"Using Regex",rulesArray:zl,rulesKey:Ex,update:e}),o(BN,null))}}});FN="1102784112584040479",Zf=y({name:"TextReplace",description:"Replace text in your messages. You can find pre-made rules in the #textreplace-rules channel in Vencord's Server",authors:[p.AutumnVN,p.TheKodeToad],dependencies:["MessageEventsAPI"],settings:ON,async start(){Hl=await $t.get(Lx)??Gl(),zl=await $t.get(Ex)??Gl(),this.preSend=Gt((e,t)=>{e!==FN&&(t.content=_x(t.content))})},stop(){Ht(this.preSend)}})});var Xf,Fx=g(()=>{"use strict";a();M();w();I();Xf=y({name:"ThemeAttributes",description:"Adds data attributes to various elements for theming purposes",authors:[p.Ven],patches:[{find:".tabBarRef",replacement:{match:/style:this\.getStyle\(\),role:"tab"/,replace:"$&,'data-tab-id':this.props.id"}},{find:".messageListItem",replacement:{match:/\.messageListItem(?=,"aria)/,replace:"$&,...$self.getMessageProps(arguments[0])"}}],getMessageProps(e){let t=e.message?.author?.id;return{"data-author-id":t,"data-is-self":t&&t===W.getCurrentUser()?.id}}})});var Jf,Ux=g(()=>{"use strict";a();M();w();Jf=y({name:"TimeBarAllActivities",description:"Adds the Spotify time bar to all activities if they have start and end timestamps",authors:[p.obscurity],patches:[{find:"}renderTimeBar(",replacement:{match:/renderTimeBar\((.{1,3})\){.{0,50}?let/,replace:"renderTimeBar($1){let"}}]})});var $x=g(()=>{});var Et,Gs=g(()=>{"use strict";a();U();w();Et=D({receivedInput:{type:0,description:"Input language for received messages",default:"auto",hidden:!0},receivedOutput:{type:0,description:"Output language for received messages",default:"en",hidden:!0},sentInput:{type:0,description:"Input language for sent messages",default:"auto",hidden:!0},sentOutput:{type:0,description:"Output language for sent messages",default:"en",hidden:!0},autoTranslate:{type:3,description:"Automatically translate your messages before sending. You can also shift/right click the translate button to toggle this",default:!1}})});var jl,Qf=g(()=>{"use strict";a();jl={auto:"Detect language",af:"Afrikaans",sq:"Albanian",am:"Amharic",ar:"Arabic",hy:"Armenian",as:"Assamese",ay:"Aymara",az:"Azerbaijani",bm:"Bambara",eu:"Basque",be:"Belarusian",bn:"Bengali",bho:"Bhojpuri",bs:"Bosnian",bg:"Bulgarian",ca:"Catalan",ceb:"Cebuano",ny:"Chichewa","zh-CN":"Chinese (Simplified)","zh-TW":"Chinese (Traditional)",co:"Corsican",hr:"Croatian",cs:"Czech",da:"Danish",dv:"Dhivehi",doi:"Dogri",nl:"Dutch",en:"English",eo:"Esperanto",et:"Estonian",ee:"Ewe",tl:"Filipino",fi:"Finnish",fr:"French",fy:"Frisian",gl:"Galician",ka:"Georgian",de:"German",el:"Greek",gn:"Guarani",gu:"Gujarati",ht:"Haitian Creole",ha:"Hausa",haw:"Hawaiian",iw:"Hebrew",hi:"Hindi",hmn:"Hmong",hu:"Hungarian",is:"Icelandic",ig:"Igbo",ilo:"Ilocano",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",jw:"Javanese",kn:"Kannada",kk:"Kazakh",km:"Khmer",rw:"Kinyarwanda",gom:"Konkani",ko:"Korean",kri:"Krio",ku:"Kurdish (Kurmanji)",ckb:"Kurdish (Sorani)",ky:"Kyrgyz",lo:"Lao",la:"Latin",lv:"Latvian",ln:"Lingala",lt:"Lithuanian",lg:"Luganda",lb:"Luxembourgish",mk:"Macedonian",mai:"Maithili",mg:"Malagasy",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi","mni-Mtei":"Meiteilon (Manipuri)",lus:"Mizo",mn:"Mongolian",my:"Myanmar (Burmese)",ne:"Nepali",no:"Norwegian",or:"Odia (Oriya)",om:"Oromo",ps:"Pashto",fa:"Persian",pl:"Polish",pt:"Portuguese",pa:"Punjabi",qu:"Quechua",ro:"Romanian",ru:"Russian",sm:"Samoan",sa:"Sanskrit",gd:"Scots Gaelic",nso:"Sepedi",sr:"Serbian",st:"Sesotho",sn:"Shona",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",so:"Somali",es:"Spanish",su:"Sundanese",sw:"Swahili",sv:
${r}`})},start(){this.preSend=Gt((e,t)=>this.unindentMsg(t)),this.preEdit=Tr((e,t,n)=>this.unindentMsg(n))},stop(){Ht(this.preSend),xr(this.preEdit)}})});var cg,Jx,ug,Qx=g(()=>{"use strict";a();Mt();Ut();M();w();I();cg=1<<2,Jx=(e,{channel:t,message:{author:n,embeds:r,flags:i,id:s}})=>()=>{let l=(i&cg)!==0;if(!l&&!r.length)return;let c=t.isPrivate()||!!(Ne.getChannelPermissions({id:t.id})&Se.EMBED_LINKS);if(n.id===W.getCurrentUser().id&&!c)return;let u=dt("delete",e),d=u?.findIndex(f=>f?.props?.id==="delete");!d||!u||u.splice(d-1,0,o(G.MenuItem,{id:"unsuppress-embeds",key:"unsuppress-embeds",label:l?"Unsuppress Embeds":"Suppress Embeds",color:l?void 0:"danger",icon:l?Na:ka,action:()=>wt.patch({url:`/channels/${t.id}/messages/${s}`,body:{flags:l?i&~cg:i|cg}})}))},ug=y({name:"UnsuppressEmbeds",authors:[p.rad,p.HypedDomi],description:"Allows you to unsuppress embeds in messages",start(){ce("message",Jx)},stop(){de("message",Jx)}})});var pg,Vx=g(()=>{"use strict";a();Jt();Ra();M();w();pg=y({name:"UrbanDictionary",description:"Search for a word on Urban Dictionary via /urban slash command",authors:[p.jewdev],dependencies:["CommandsAPI"],commands:[{name:"urban",description:"Returns the definition of a word from Urban Dictionary",inputType:0,options:[{type:3,name:"word",description:"The word to search for on Urban Dictionary",required:!0}],execute:async(e,t)=>{try{let n=encodeURIComponent(e[0].value),{list:[r]}=await(await fetch(`https://api.urbandictionary.com/v0/define?term=${n}`)).json();if(!r)return void ue(t.channel.id,{content:"No results found."});let i=s=>s.replaceAll(`\r
`).replace(/([*>_`~\\])/gsi,"\\$1").replace(/\[(.+?)\]/g,(l,c)=>`[${c}](https://www.urbandictionary.com/define.php?term=${encodeURIComponent(c)} "Define '${c}' on Urban Dictionary")`).trim();returnvoidue(t.channel.id,{embeds:[{type:"rich",author:{name:`Uploaded by "${r.author}"`,url:`https://www.urbandictionary.com/author.php?author=${encodeURIComponent(r.author)}`},title:r.word,url:`https://www.urbandictionary.com/define.php?term=${encodeURIComponent(r.word)}`,description:i(r.definition),fields:[{name:"Example",value:i(r.example)},{name:"Want more definitions?",value:`Check out [more definitions](https://www.urbandictionary.com/define.php?term=${n} "Define "${e[0].value}" on Urban Dictionary") on Urban Dictionary.`}],color:16750848,footer:{text:`\u{1F44D} ${r.thumbs_up.toString()} | \u{1F44E} ${r.thumbs_down.toString()}`,icon_url:"https://www.urbandictionary.com/favicon.ico"},timestamp:newDate(r.written_on).toISOString()}]})}catch(n){ue(t.channel.id,{content:`Something went wrong: \`${n}\``})}}}]})});vare2=g(()=>{});varKN,YN,ZN,t2,n2=g(()=>{"use strict";a();e2();j();I();KN=A("selectChannel","selectVoiceChannel"),YN=Ai(".lastSection","children:"),ZN=1n<<20n,t2=({channel:e,label:t,showHeader:n})=>o(YN,null,n&&o(S.FormTitle,{className:"vc-uvs-header"},"In a voice channel"),o(R,{className:"vc-uvs-button",color:R.Colors.TRANSPARENT,size:R.Sizes.SMALL,onClick:()=>{Ne.can(ZN,e)?KN.selectVoiceChannel(e.id):ee.show({message:"Insufficient permissions to enter the channel.",id:"user-voice-show-insufficient-permissions",type:ee.Type.FAILURE,options:{position:ee.Position.BOTTOM}})}},t))});varXN,dg,o2,mg,r2=g(()=>{"use strict";a();U();le();M();w();j();I();n2();XN=Me("VoiceStateStore"),dg=D({showInUserProfileModal:{type:3,description:"Show a user's voice channel in their profile modal",default:!0},showVoiceChannelSectionHeader:{type:3,description:'Whether to show "IN A VOICE CHANNEL" above the join button',default:!0}}),o2=_.wrap(({user:e})=>{let{channelId:t}=XN.getVoiceStateForUser(e.id)??{};if(!t)returnnull;letn=Q.getChannel(t);if(!n)returnnull;letr=Te.getGuild(n.guild_id);if(!r)returnnull;leti=`${r.name} | ${n.name}`;returno(t2,{channel:n,label:i,showHeader:dg.store.showVoiceChannelSectionHeader})}),mg=y({name:"UserVoiceShow",description:"Shows whether a User is currently in a voice channel somewhere in their profile",authors:[p.LordElias],settings:dg,patchModal({user:e}){returndg.store.showInUserProfileModal?o("div",{className:"vc-uvs-modal-margin"},o(o2,{user:e})):null},patchPopout:({user:e})=>{lett=e.id===W.getCurrentUser().id;returno("div",{className:t?"vc-uvs-popout-margin-self":""},o(o2,{user:e}))},patches:[{find:".lastEditedByContainer",replacement:{match:/\(0,\i\.jsx\)\(\i\.\i,{user:\i,setNote/,replace:"$self.patchPopout(arguments[0]),$&"}},{find:".USER_PROFILE_MODAL",replacement:{match:/\.body.+?displayProfile:\i}\),/,replace:"$&$self.patchModal(arguments[0]),"}}]})});vari2,s2=g(()=>{a();(window.VencordStyles??=newMap).set("src/plugins/usrbg/index.css",{name:"src/plugins/usrbg/index.css",source:`:is([class*="userProfile"], [class*="userPopout"]) [class*="bannerPremium"] {
`,classNames:{},dom:null});i2="src/plugins/usrbg/index.css"});var JN,vo,ql,fg,a2=g(()=>{"use strict";a();U();Je();lo();M();w();s2();JN="https://raw.githubusercontent.com/AutumnVN/usrbg/main/usrbg.json",vo={},ql=D({nitroFirst:{description:"Banner to use if both Nitro and USRBG banners are present",type:4,options:[{label:"Nitro banner",value:!0,default:!0},{label:"USRBG banner",value:!1}]},voiceBackground:{description:"Use USRBG banners as voice chat backgrounds",type:3,default:!0,restartNeeded:!0}}),fg=y({name:"USRBG",description:"Displays user banners from USRBG, allowing anyone to get a banner without Nitro",authors:[p.AutumnVN,p.pylix,p.TheKodeToad],settings:ql,patches:[{find:".NITRO_BANNER,",replacement:[{match:/(\i)\.premiumType/,replace:"$self.premiumHook($1)||$&"},{match:/(?<=function \i\((\i)\)\{)(?=var.{30,50},bannerSrc:)/,replace:"$1.bannerSrc=$self.useBannerHook($1);"},{match:/\?\(0,\i\.jsx\)\(\i,{type:\i,shown/,replace:"&&$self.shouldShowBadge(arguments[0])$&"}]},{find:'"data-selenium-video-tile":',predicate:()=>ql.store.voiceBackground,replacement:[{match:/(?<=function\((\i),\i\)\{)(?=let.{20,40},style:)/,replace:"$1.style=$self.voiceBackgroundHook($1);"}]}],data:vo,settingsAboutComponent:()=>o(rt,{href:"https://github.com/AutumnVN/usrbg#how-to-request-your-own-usrbg-banner"},"CLICK HERE TO GET YOUR OWN BANNER"),voiceBackgroundHook({className:e,participantUserId:t}){if(e.includes("tile_")&&vo[t])return{backgroundImage:`url(${vo[t]})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}},useBannerHook({displayProfile:e,user:t}){if(!(e?.banner&&ql.store.nitroFirst)&&vo[t.id])return vo[t.id]},premiumHook({userId:e}){if(vo[e])return 2},shouldShowBadge({displayProfile:e,user:t}){return e?.banner&&(!vo[t.id]||ql.store.nitroFirst)},async start(){vt(i2);let e=await fetch(JN);e.ok&&(vo=await e.json(),this.data=vo)}})});function QN({data:e,UserMention:t,RoleMention:n,parse:r,props:i}){let[s,l]=J(e.userId);if(s)return o(t,{className:"mention",userId:s,channelId:e.channelId,inlinePreview:i.noStyleAndInteraction,key:i.key});let c=r(e.content,i);return o(n,{...e,inlinePreview:i.formatInline},o("span",{onMouseEnter:()=>{let u=c?.[0]?.props?.children;if(typeof u!="string")return;let d=u.match(/<@!?(\d+)>/)?.[1];if(!d||Kl.has(d))return;if(W.getUser(d))return l(d);let f=()=>{Kl.add(d),l2.unshift(()=>kt.getUser(d).then(()=>{l(d),Kl.delete(d)}).catch(h=>{h?.status===429&&(l2.unshift(()=>Mo(1e3).then(f)),Kl.delete(d))}).finally(()=>Mo(300)))};f()}},c))}var Kl,l2,gg,c2=g(()=>{"use strict";a();le();M();Re();Wr();w();I();Kl=new Set,l2=new Cn(5);gg=y({name:"ValidUser",description:"Fix mentions for unknown users showing up as '<@343383572805058560>' (hover over a mention to fix it)",authors:[p.Ven],tags:["MentionCacheFix"],patches:[{find:'className:"mention"',replacement:{match:/react(?=\(\i,\i,\i\).{0,50}return null==\i\?\(0,\i\.jsx\)\((\i\.\i),.+?jsx\)\((\i\.\i),\{className:"mention")/,replace:"react:(...args)=>$self.renderMention($1,$2,...args),originalReact"}}],renderMention(e,t,n,r,i){return o(_,{noop:!0},o(QN,{RoleMention:e,UserMention:t,data:n,parse:r,props:i}))}})});var hg,yg,u2=g(()=>{"use strict";a();M();w();I();hg={},yg=y({name:"VoiceChatDoubleClick",description:"Join voice chats via double click instead of single click",authors:[p.Ven,p.D3SOX],patches:[...[".handleVoiceStatusClick",".handleClickChat"].map(e=>({find:e,replacement:[{match:/onClick:\(\)=>\{this.handleClick\(\)/g,replace:"onClick:()=>{$self.schedule(()=>{this.handleClick()},this)"}]})),{find:".shouldCloseDefaultModals",replacement:{match:/onClick:(\i)(?=,.{0,30}className:"channelMention".+?(\i)\.inContent)/,replace:(e,t,n)=>`onClick:(vcDoubleClickEvt)=>$self.shouldRunOnClick(vcDoubleClickEvt,${n})&&${t}()`}}],shouldRunOnClick(e,{channelId:t}){let n=Q.getChannel(t);return!n||![2,13].includes(n.type)?!0:e.detail>=2},schedule(e,t){let n=t.props.channel.id;if(Pe.getVoiceChannelId()===n){e();return}let r=hg[n]??={timeout:void 0,i:0};clearTimeout(r.timeout),++r.i>=2?(e(),delete hg[n]):r.timeout=setTimeout(()=>{delete hg[n]},500)}})});fun
`,""),c=s,u=new Set,d=e[i]=function(f,h,v){try{s(f,h,v)}catch(P){if(s===c)throw P;return Tn.error("Error in patched chunk",P),void c(f,h,v)}if(h=f.exports,!h)return;if(h===window){Object.defineProperty(v.c,i,{value:v.c[i],enumerable:!1,configurable:!0,writable:!0});return}let T=Number(i);for(let P of n)try{P(h,T)}catch(b){Tn.error("Error in webpack listener",b)}for(let[P,b]of t)try{P(h)?(t.delete(P),b(h,T)):h.default&&P(h.default)&&(t.delete(P),b(h.default,T))}catch(x){Tn.error("Error while firing callback for webpack chunk",x)}};d.toString=()=>s.toString(),d.original=c;for(let f=0;f<r.length;f++){let h=r[f],v=Un(`patchby${h.plugin}`,(T,P)=>l.replace(T,P));if(!(h.predicate&&!h.predicate())&&l.includes(h.find)){u.add(h.plugin);let T=s,P=l;for(let b of h.replacement){if(b.predicate&&!b.predicate())continue;let x=s,C=l;ds(b,h.plugin);try{let k=v(b.match,b.replace);if(k===l){if(h.noWarn||Tn.warn(`Patchby${h.plugin}hadnoeffect(Moduleidis${i}):${b.match}`),h.group){Tn.warn(`Undoingpatch${h.find}by${h.plugin}becausereplacement${b.match}hadnoeffect`),l=P,s=T,u.delete(h.plugin);break}}else l=k,s=(0,eval)(`// Webpack Module ${i} - Patched by ${[...u].join(", ")}
`,k),u.delete(h.plugin),h.group){Tn.warn(`Undoingpatch${h.find}by${h.plugin}becausereplacement${b.match}errored`),l=P,s=T;break}l=C,s=x}}h.all||r.splice(f--,1)}}}}w();jn();Ao();U();Ba();pa();Ro();qi();vr();I();async function $k(){if(E.cloud.authenticated&&await Pt("Vencord_cloudSecret")===null){Ie({title:"Cloud Integrations",body:"We've noticed you have cloud integrations enabled in another client! Due to limitations, you will need to re-authenticate to continue using them. Click here to go to the settings page to do so!",color:"var(--yellow-360)",onClick:()=>Qn.open("VencordCloud")});return}E.cloud.settingsSync&&E.cloud.authenticated&&(fr.Vencord_settingsDirty?(await Yr(),delete fr.Vencord_settingsDirty):await Ma(!1)&&Ie({title:"Cloud Settings",body:"Your settings have been updated! Click here to restart to fully apply changes!",color:"var(--green-360)",onClick:cn}))}async function Gk(){await oc,ss("WebpackReady"),$k();try{if(!await Xr())return;if(E.autoUpdate){await Jr(),E.autoUpdateNotification&&setTimeout(()=>Ie({title:"Vencord has been updated!",body:"Click here to restart",permanent:!0,noPersist:!0,onClick:cn}),1e4);return}E.notifyAboutUpdates&&setTimeout(()=>Ie({title:"A Vencord update is available!",body:"Click here to view the update",permanent:!0,noPersist:!0,onClick(){Qn.open("VencordUpdater")}}),1e4)}catch(e){yr.error("Failed to check for updates",e)}}ss("Init");Gk();document.addEventListener("DOMContentLoaded",()=>{ss("DOMContentLoaded")},{once:!0});return To(Hk);})();