discord-awesomeaudio/assets/vencord/vencord.js

269 lines
395 KiB
JavaScript
Raw Normal View History

2023-07-11 23:21:30 -04:00
// Vencord bea7a17
2023-07-11 23:04:56 -04:00
// Standalone: false
// Platform: linux
2023-07-11 23:21:30 -04:00
"use strict";var Vencord=(()=>{var zT=Object.create;var Yi=Object.defineProperty;var jT=Object.getOwnPropertyDescriptor;var WT=Object.getOwnPropertyNames;var qT=Object.getPrototypeOf,KT=Object.prototype.hasOwnProperty;var Of=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var m=(e,t)=>()=>(e&&(t=e(e=0)),t);var Lr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ge=(e,t)=>{for(var n in t)Yi(e,n,{get:t[n],enumerable:!0})},_f=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of WT(t))!KT.call(e,i)&&i!==n&&Yi(e,i,{get:()=>t[i],enumerable:!(r=jT(t,i))||r.enumerable});return e};var al=(e,t,n)=>(n=e!=null?zT(qT(e)):{},_f(t||!e||!e.__esModule?Yi(n,"default",{value:e,enumerable:!0}):n,e)),Lo=e=>_f(Yi({},"__esModule",{value:!0}),e);var d,o,a=m(()=>{"use strict";d=Symbol.for("react.fragment"),o=(...e)=>(o=Vencord.Webpack.Common.React.createElement)(...e)});var In={};ge(In,{clear:()=>QT,createStore:()=>Ff,del:()=>XT,delMany:()=>JT,entries:()=>tx,get:()=>Qe,getMany:()=>ZT,keys:()=>VT,promisifyRequest:()=>vt,set:()=>Ve,setMany:()=>YT,update:()=>Eo,values:()=>ex});function vt(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Ff(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=vt(n);return(i,s)=>r.then(l=>s(l.transaction(t,i).objectStore(t)))}function on(){return ll||(ll=Ff("VencordData","VencordStore")),ll}function Qe(e,t=on()){return t("readonly",n=>vt(n.get(e)))}function Ve(e,t,n=on()){return n("readwrite",r=>(r.put(t,e),vt(r.transaction)))}function YT(e,t=on()){return t("readwrite",n=>(e.forEach(r=>n.put(r[1],r[0])),vt(n.transaction)))}function ZT(e,t=on()){return t("readonly",n=>Promise.all(e.map(r=>vt(n.get(r)))))}function Eo(e,t,n=on()){return n("readwrite",r=>new Promise((i,s)=>{r.get(e).onsuccess=function(){try{r.put(t(this.result),e),i(vt(r.transaction))}catch(l){s(l)}}}))}function XT(e,t=on()){return t("readwrite",n=>(n.delete(e),vt(n.transaction)))}function JT(e,t=on()){return t("readwrite",n=>(e.forEach(r=>n.delete(r)),vt(n.transaction)))}function QT(e=on()){return e("readwrite",t=>(t.clear(),vt(t.transaction)))}function cl(e,t){return e.openCursor().onsuccess=function(){!this.result||(t(this.result),this.result.continue())},vt(e.transaction)}function VT(e=on()){return e("readonly",t=>{if(t.getAllKeys)return vt(t.getAllKeys());let n=[];return cl(t,r=>n.push(r.key)).then(()=>n)})}function ex(e=on()){return e("readonly",t=>{if(t.getAll)return vt(t.getAll());let n=[];return cl(t,r=>n.push(r.value)).then(()=>n)})}function tx(e=on()){return e("readonly",t=>{if(t.getAll&&t.getAllKeys)return Promise.all([vt(t.getAllKeys()),vt(t.getAll())]).then(([r,i])=>r.map((s,l)=>[s,i[l]]));let n=[];return e("readonly",r=>cl(r,i=>n.push([i.key,i.value])).then(()=>n))})}var ll,Cn=m(()=>{"use strict";a();});var Er,ul=m(()=>{"use strict";a();Er=class{set=new Set;get changeCount(){return this.set.size}get hasChanges(){return this.changeCount>0}handleChange(t){this.set.delete(t)||this.set.add(t)}add(t){return this.set.add(t)}remove(t){return this.set.delete(t)}getChanges(){return this.set.values()}map(t){return[...this.getChanges()].map(t)}}});var rn,Dr=m(()=>{a();rn="bea7a17"});var Zi,$f=m(()=>{a();Zi="Vendicated/Vencord"});var qt,nx,pl,Xi,p,dl,w=m(()=>{"use strict";a();Dr();$f();qt="webpackChunkdiscord_app",nx="Vencord.Webpack.Common.React",pl=`Vencord/${rn}${Zi?` (https://github.com/${Zi})`:""}`,Xi="1026515880080842772",p=Object.freeze({Ven:{name:"Vendicated",id:343383572805058560n},Arjix:{name:"ArjixWasTaken",id:674710789138939916n},Cyn:{name:"Cynosphere",id:150745989836308480n},Megu:{name:"Megumin",id:545581357812678656n},botato:{name:"botato",id:440990343899643943n},obscurity:{name:"obscurity",id:336678828233588736n},rushii:{name:"rushii",id:295190422244950017n},Glitch:{name:"Glitchy",id:269567451199569920n},Samu:{name
2023-07-11 23:04:56 -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-07-11 23:21:30 -04:00
`;return(0,eval)(n)}var ml,ts,fl,Gt,Un,K,Gf,gl,Ht,Or,os,Hf,O=m(()=>{"use strict";a();sn();be();es();ml=new Y("Webpack"),fl=new Promise(e=>ts=e),K={byProps:(...e)=>e.length===1?t=>t[e[0]]!==void 0:t=>e.every(n=>t[n]!==void 0),byCode:(...e)=>t=>{if(typeof t!="function")return!1;let n=Function.prototype.toString.call(t);for(let r of e)if(!n.includes(r))return!1;return!0},byStoreName:e=>t=>t.constructor?.displayName===e},Gf=new Map,gl=new Set;Ht=an("find",function(t,n=!0,r=!1){if(typeof t!="function")throw new Error("Invalid filter. Expected a function got "+typeof t);for(let i in Un){let s=Un[i];if(!!s?.exports){if(t(s.exports))return r?[s.exports,Number(i)]:s.exports;if(typeof s.exports=="object"){if(s.exports.default&&t(s.exports.default)){let l=n?s.exports.default:s.exports;return r?[l,Number(i)]:l}for(let l in s.exports)if(l.length<=3){let c=s.exports[l];if(c&&t(c))return r?[c,Number(i)]:c}}}}if(!r){let i=new Error("Didn't find module matching this filter");ml.warn(i)}return r?[null,null]:null});Or=an("findBulk",function(...t){if(!Array.isArray(t))throw new Error("Invalid filters. Expected function[] got "+typeof t);let{length:n}=t;if(n===0)throw new Error("Expected at least two filters.");if(n===1)return Ht(t[0]);let r=t,i=0,s=Array(n);e:for(let l in Un){let c=Un[l];if(!!c?.exports)for(let u=0;u<n;u++){let h=r[u];if(h!==void 0){if(h(c.exports)){if(s[u]=c.exports,r[u]=void 0,++i===n)break e;break}if(typeof c.exports=="object"){if(c.exports.default&&h(c.exports.default)){if(s[u]=c.exports.default,r[u]=void 0,++i===n)break e;break}for(let f in c.exports)if(f.length<=3){let y=c.exports[f];if(y&&h(y)){if(s[u]=y,r[u]=void 0,++i===n)break e;continue e}}}}}}if(i!==n){let l=new Error(`Got ${n} filters, but only found ${i} modules!`);ml.warn(l)}return s}),os=an("findModuleId",function(t){for(let r in Gt.m)if(Gt.m[r].toString().includes(t))return Number(r);let n=new Error(`Didn't find module with code:
`+t);return ml.warn(n),null}),Hf=an("mapMangledModule",function(t,n){let r={},i=os(t);if(i===null)return r;let s=Gt(i);e:for(let l in s){let c=s[l];for(let u in n)if(n[u](c)){r[u]=c;continue e}}return r})});var rs,mt,zf=m(()=>{"use strict";a();O();rs=P("image","modal"),mt=P("buttonWrapper","buttonContent")});function Do(e,t){for(let n in t){let r=t[n];typeof r=="object"&&!Array.isArray(r)?(e[n]??={},Do(e[n],r)):e[n]??=r}return e}function J(...e){return e.filter(Boolean).join(" ")}function so(e){return new Promise(t=>setTimeout(t,e))}function Yt(e,t="Copied to clipboard!"){Kt.SUPPORTS_COPY?Kt.copy(e):t="Your browser does not support copying to clipboard",X.show({message:t,id:X.genId(),type:X.Type.SUCCESS})}function lx(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function vl(e){try{return new URL(e)}catch{return null}}function is(e){return e}var Sl,cx,_r,fe=m(()=>{"use strict";a();T();w();Sl=e=>{let t=e.getBoundingClientRect(),n=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(t.bottom<0||t.top-n>=0)};cx=navigator.userAgent.includes("Mobi"),_r=e=>Object.hasOwn(dl,e)});function ot(e,t){let n=Object.assign({fallbackValue:null,deps:[],onError:null},t),[r,i]=V({value:n.fallbackValue,error:null,pending:!0});return rt(()=>{let s=!0;return r.pending||i({...r,pending:!0}),e().then(l=>{!s||(i({value:l,error:null,pending:!1}),n.onSuccess?.(l))}).catch(l=>{!s||(i({value:null,error:l,pending:!1}),n.onError?.(l))}),()=>void(s=!1)},n.deps),[r.value,r.error,r.pending]}function Lt(e){let t=rr(n=>n+1,0);return e?t:t[1]}function re(e){let t=$n(e);return n=>{let r=t();return o(r,{...n})}}var bl,ve=m(()=>{"use strict";a();T();sn();fe();bl=(e=!1)=>{let t=I.useRef(null),[n,r]=V(!1);return[s=>{t.current?.disconnect(),t.current=null,s&&(Sl(s)&&(r(!0),e)||(t.current=new IntersectionObserver(l=>{for(let c of l)c.target===s&&(c.isIntersecting&&e?(r(!0),t.current?.disconnect(),t.current=null):r(c.isIntersecting))}),t.current.observe(s)))},n]}});function ss(e,t){let n=function(){throw new Error(`Vencord could not find the ${e} Component`)},r=re(()=>n);return Ye(t,i=>{n=i,Object.assign(r,i)}),r}function St(e,t){Ye(K.byStoreName(e),t)}var Tl=m(()=>{"use strict";a();ve();O()});var v,Et,N,ft,W,Re,as,Q,ln,ls,Oo,Zt,Br,jf,Wf,cs,us,ps,ds,Fr,xl,kn,ux,qf=m(()=>{"use strict";a();O();Tl();v={},xl=ss("MaskedLink",e=>e?.type?.toString().includes("MASKED_LINK)")),kn=ss("Timestamp",K.byCode(".Messages.MESSAGE_EDITED_TIMESTAMP_A11Y_LABEL.format")),ux=ss("Flex",["Justify","Align","Wrap"]);Ye("FormItem",e=>{({useToken:Fr,Card:Et,Button:N,FormSwitch:ft,Tooltip:W,TextInput:Re,TextArea:as,Text:Q,Select:ln,SearchableSelect:ls,Slider:Oo,ButtonLooks:Zt,TabBar:Wf,Popout:Br,Dialog:jf,Paginator:cs,ScrollerThin:us,Clickable:ps,Avatar:ds}=e),v=e})});var L,cn,Kf=m(()=>{"use strict";a();O();L={};Ye("MenuItem",e=>L=e);cn=Ke('type:"CONTEXT_MENU_OPEN"',{open:K.byCode("stopPropagation"),openLazy:e=>e.toString().length<50,close:K.byCode("CONTEXT_MENU_CLOSE")})});var I,V,rt,zt,Xt,rr,Yf,_o,Zf=m(()=>{"use strict";a();O();_o=P("createPortal","render");Ye("useState",e=>{I=e,{useEffect:rt,useState:V,useMemo:zt,useRef:Xt,useReducer:rr,useCallback:Yf}=I})});var wl,un,Pl,je,ms,$r,ao,px,ue,F,Pe,lo,Z,Ae,et,pn,Ur,Ml,Fe,Xf=m(()=>{"use strict";a();O();Tl();wl=P("connectStores"),Pl=P("openPrivateChannel"),Ml=Ke('"MaskedLinkStore"',{openUntrustedLink:K.byCode(".apply(this,arguments)")}),Fe=ce("useStateFromStores");St("UserStore",e=>F=e);St("ChannelStore",e=>Z=e);St("SelectedChannelStore",e=>Pe=e);St("SelectedGuildStore",e=>lo=e);St("GuildStore",e=>ue=e);St("GuildMemberStore",e=>Ae=e);St("RelationshipStore",e=>et=e);St("PermissionStore",e=>je=e);St("PresenceStore",e=>ao=e);St("ReadStateStore",e=>$r=e);St("GuildChannelStore",e=>ms=e);St("MessageStore",e=>un=e);St("WindowStore",e=>Ur=e);St("EmojiStore",e=>pn=e)});var Jf={};var Qf=m(()=>{"use strict";a()});var Vf={};var eg=m(()=>{"use strict";a()});var tg={};var ng=m(()=>{"use strict";a()});function fs(e,t=og.MESSAGE){X.show({id:X.genId(),message:e,type:t})}var E,Il,Dt,Jt,Bo,it,ir,Ie,bt,og,dx,X,Rn,Kt,Gr,gs,An,rg=m(()=
2023-07-11 23:04:56 -04:00
${e.replaceAll("```","\\`\\`\\`")}
2023-07-11 23:21:30 -04:00
${n}`}var Ol,Sx,bx,_l,Tx,xx,wx,Px,Mx,jn,Ix,Wn=m(()=>{"use strict";a();T();Ol=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),Sx=e=>e.toLowerCase().split("_"),bx=e=>e.toLowerCase().split("-"),_l=e=>e.split(/(?=[A-Z])/).map(t=>t.toLowerCase()),Tx=e=>e.toLowerCase().split(" "),xx=e=>e.map((t,n)=>n?t[0].toUpperCase()+t.slice(1):t).join(""),wx=e=>e.join("_").toUpperCase(),Px=e=>e.join("-").toLowerCase(),Mx=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(""),jn=e=>e.map(t=>t[0].toUpperCase()+t.slice(1)).join(" "),Ix=["years","months","weeks","days","hours","minutes","seconds"]});var Bl={};ge(Bl,{ChangeList:()=>Er,Devs:()=>p,DevsById:()=>dl,ImageModal:()=>Nl,LazyComponent:()=>re,Logger:()=>Y,Margins:()=>G,ModalCloseButton:()=>xt,ModalContent:()=>Ue,ModalFooter:()=>Tt,ModalHeader:()=>$e,ModalRoot:()=>Le,ModalSize:()=>co,Modals:()=>dn,Queue:()=>fn,REACT_GLOBAL:()=>nx,SUPPORT_CHANNEL_ID:()=>Xi,Theme:()=>ys,VENCORD_USER_AGENT:()=>pl,WEBPACK_CHUNK:()=>qt,canonicalizeDescriptor:()=>Dl,canonicalizeMatch:()=>Uo,canonicalizeReplace:()=>Ts,canonicalizeReplacement:()=>jr,checkIntersecting:()=>Sl,classes:()=>J,closeAllModals:()=>kl,closeModal:()=>Gn,copyWithToast:()=>Yt,debounce:()=>At,formatDuration:()=>qr,getCurrentChannel:()=>sr,getCurrentGuild:()=>Rl,getTheme:()=>zr,getUniqueUsername:()=>zn,gitHash:()=>rn,gitRemote:()=>Zi,humanFriendlyJoin:()=>Cx,identity:()=>is,insertTextIntoChatInputBox:()=>Hn,isMobile:()=>cx,isNonNullish:()=>Al,isObject:()=>lx,isPluginDev:()=>_r,isTruthy:()=>vs,localStorage:()=>$o,makeCodeblock:()=>Kr,makeLazy:()=>$n,mergeDefaults:()=>Do,onceDefined:()=>vx,onlyOnce:()=>Ll,openImageModal:()=>Fo,openModal:()=>Ce,openModalLazy:()=>Hr,openPrivateChannel:()=>gx,openUserProfile:()=>mn,parseUrl:()=>vl,proxyLazy:()=>dt,sendMessage:()=>hx,sleep:()=>so,useAwaiter:()=>ot,useForceUpdater:()=>Lt,useIntersection:()=>bl,wordsFromCamel:()=>Ol,wordsFromKebab:()=>bx,wordsFromPascal:()=>_l,wordsFromSnake:()=>Sx,wordsFromTitle:()=>Tx,wordsToCamel:()=>xx,wordsToKebab:()=>Px,wordsToPascal:()=>Mx,wordsToSnake:()=>wx,wordsToTitle:()=>jn});var Fl=m(()=>{"use strict";a();ul();w();nr();tt();Ss();sn();bs();be();Xe();fe();Ze();sg();El();Wr();ar();ve();Wn();});var ug=m(()=>{});function qn(e){return o("div",{...e,className:J(e.className,"vc-error-card")},e.children)}var Yr=m(()=>{"use strict";a();ug();fe()});var Rx,pg,dg,$l,A,ie=m(()=>{"use strict";a();be();Xe();ve();T();Yr();Rx="#e78284",pg=new Y("React ErrorBoundary",Rx),dg={},$l=re(()=>class extends I.PureComponent{state={error:dg,stack:"",message:""};static getDerivedStateFromError(t){let n=t?.stack??"",r=t?.message||String(t);if(t instanceof Error&&n){let i=n.indexOf(`
`);i!==-1&&(r=n.slice(0,i),n=n.slice(i+1).replace(/https:\/\/\S+\/assets\//g,""))}return{error:t,stack:n,message:r}}componentDidCatch(t,n){this.props.onError?.({error:t,errorInfo:n,props:this.props.wrappedProps}),pg.error(`A component threw an Error
`,t),pg.error("Component Stack",n.componentStack)}render(){if(this.state.error===dg)return this.props.children;if(this.props.noop)return null;if(this.props.fallback)return o(this.props.fallback,{children:this.props.children,...this.state});let t=this.props.message||"An error occurred while rendering this Component. More info can be found below and in your console.";return o(qn,{style:{overflow:"hidden"}},o("h1",null,"Oh no!"),o("p",null,t),o("code",null,this.state.message,!!this.state.stack&&o("pre",{className:G.top8},this.state.stack)))}});$l.wrap=(e,t)=>n=>o($l,{...t,wrappedProps:n},o(e,{...n}));A=$l});function xs(){return o("svg",{"aria-hidden":"true",height:"16",viewBox:"0 0 16 16",width:"16",style:{marginRight:"0.5em",transform:"translateY(2px)"}},o("path",{fill:"#db61a2","fill-rule":"evenodd",d:"M4.25 2.5c-1.336 0-2.75 1.164-2.75 3 0 2.15 1.58 4.144 3.365 5.682A20.565 20.565 0 008 13.393a20.561 20.561 0 003.135-2.211C12.92 9.644 14.5 7.65 14.5 5.5c0-1.836-1.414-3-2.75-3-1.373 0-2.609.986-3.029 2.456a.75.75 0 01-1.442 0C6.859 3.486 5.623 2.5 4.25 2.5zM8 14.25l-.345.666-.002-.001-.006-.003-.018-.01a7.643 7.643 0 01-.31-.17 22.075 22.075 0 01-3.434-2.414C2.045 10.731 0 8.35 0 5.5 0 2.836 2.086 1 4.25 1 5.797 1 7.153 1.802 8 3.02 8.847 1.802 10.203 1 11.75 1 13.914 1 16 2.836 16 5.5c0 2.85-2.045 5.231-3.885 6.818a22.08 22.08 0 01-3.744 2.584l-.018.01-.006.003h-.002L8 14.25zm0 0l.345.666a.752.752 0 01-.69 0L8 14.25z"}))}var Ul=m(()=>{"use strict";a()});function Zr(e){return o(N,{...e,look:N.Looks.LINK,color:N.Colors.TRANSPARENT,onClick:()=>VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")},o(xs,null),"Donate")}var Gl=m(()=>{"use strict";a();T();Ul()});function le(e){return e.style??={},e.style.display="flex",e.style.gap??="1em",e.style.flexDirection||=e.flexDirection,delete e.flexDirection,o("div",{...e},e.children)}var wt=m(()=>{"use strict";a()});function g(e){return e}var b=m(()=>{"use strict";a()});async function mg(e=!1){Hl={};let t={};e&&(t.cache="no-cache");let r=(await fetch("https://gist.githubusercontent.com/Vendicated/51a3dd775f6920429ec6e9b735ca7f01/raw/badges.csv",t).then(i=>i.text())).trim().split(`
`);if(r.shift()!=="id,tooltip,image"){new Y("BadgeAPI").error("Invalid badges.csv file!");return}for(let i of r){let[s,l,c]=i.split(",");(Hl[s]??=[]).push({image:c,description:l})}}var Ax,Lx,Hl,zl,fg=m(()=>{"use strict";a();Ps();Gl();ie();wt();Ul();w();be();Xe();fe();Ze();b();T();Ax="https://cdn.discordapp.com/attachments/1033680203433660458/1092089947126780035/favicon.png",Lx={description:"Vencord Contributor",image:Ax,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},shouldShow:({user:e})=>_r(e.id),link:"https://github.com/Vendicated/Vencord"},Hl={};zl=g({name:"BadgeAPI",description:"API to add badges to users.",authors:[p.Megu,p.Ven,p.TheSun],required:!0,patches:[{find:"Messages.PROFILE_USER_BADGES,role:",replacement:[{match:/&&(\i)\.push\(\{id:"premium".+?\}\);/,replace:"$&$1.unshift(...Vencord.Api.Badges._getBadges(arguments[0]));"},{match:/alt:" ","aria-hidden":!0,src:(?=(\i)\.src)/g,replace:"...$1.props,$& $1.image??"},{match:/children:function(?<=(\i)\.(?:tooltip|description),spacing:\d.+?)/g,replace:"children:$1.component ? () => $self.renderBadgeComponent($1) : function"},{match:/onClick:function(?=.{0,200}href:(\i)\.link)/,replace:"onClick:$1.onClick??function"}]}],toolboxActions:{async"Refetch Badges"(){await mg(!0),X.show({id:X.genId(),message:"Successfully refetched badges!",type:X.Type.SUCCESS})}},async start(){Vencord.Api.Badges.addBadge(Lx),await mg()},renderBadgeComponent:A.wrap(e=>{let t=e.component;return o(t,{...e})},{noop:!0}),getDonorBadges(e){return Hl[e]?.map(t=>({...t,position:0,props:{style:{borderRadius:"50%",transform:"scale(0.9)"}},onClick(){let n=Ce(r=>o(A,{noop:!0,onError:()=>{Gn(n),VencordNative.native.openExternal("https://github.com/sponsors/Vendicated")}},o(dn.ModalRoot,{...r},o(dn.ModalHeader,null,o(le,{style:{width:"100%",justifyContent:"center"}},o(v.FormTitle,{tag:"h2",style:{width:"100%",textAlign:"center",margin:0}},o(xs,null),"Vencord Donor"))),o(dn.ModalContent,null,o(le,null,o("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533070955872337.png",alt:"",style:{margin:"auto"}}),o("img",{role:"presentation",src:"https://cdn.discordapp.com/emojis/1026533090627174460.png",alt:"",style:{margin:"auto"}})),o("div",{style:{padding:"1em"}},o(v.FormText,null,"This Badge is a special perk for Vencord Donors"),o(v.FormText,{className:G.top20},"Please consider supporting the development of Vencord by becoming a donor. It would mean a lot!!"))),o(dn.ModalFooter,null,o(le,{style:{width:"100%",justifyContent:"center"}},o(Zr,null))))))}}))}})});var jl,gg=m(()=>{"use strict";a();w();b();jl=g({name:"CommandsAPI",authors:[p.Arjix],description:"Api required by anything that uses commands",patches:[{find:'"giphy","tenor"',replacement:[{match:/(?<=\w=)(\w)(\.filter\(.{0,30}giphy)/,replace:"Vencord.Api.Commands._init($1)$2"}]},{find:"Unexpected value for option",replacement:{match:/,(.{1,2})\.execute\((.{1,2}),(.{1,2})\)]/,replace:(e,t,n,r)=>`,Vencord.Api.Commands._handleCommand(${t}, ${n}, ${r})]`}},{find:".source,children",replacement:{match:/(?<=:(.{1,3})\.displayDescription\}.{0,200}\.source,children:)[^}]+/,replace:"$1.plugin||($&)"}}]})});var Wl,hg=m(()=>{"use strict";a();w();b();Wl=g({name:"ContextMenuAPI",description:"API for adding/removing items to/from context menus.",authors:[p.Nuckyz,p.Ven],required:!0,patches:[{find:"\u266B (\u3064\uFF61\u25D5\u203F\u203F\u25D5\uFF61)\u3064 \u266A",replacement:{match:/(?<=function \i\((\i)\){)(?=var \i,\i=\i\.navId)/,replace:(e,t)=>`Vencord.Api.ContextMenu._patchContextMenu(${t});`}},{find:".Menu,{",all:!0,replacement:{match:/Menu,{(?<=\.jsxs?\)\(\i\.Menu,{)/g,replace:"$&contextMenuApiArguments:typeof arguments!=='undefined'?arguments:[],"}}]})});var ql,yg=m(()=>{"use strict";a();w();b();ql=g({name:"MemberListDecoratorsAPI",description:"API to add decorators to member list (both in servers and DMs)",authors:[p.TheSun],patches:[{find:"lostPermissionTooltipText,",replacement:{match:/Fragment,{children:\[(.{30,80})\]/,replace:"Fragment,{children:Vencord.Api.MemberListDecorators.__addDecoratorsToList(this.props).conca
`,e)}cw=At(async()=>{M.cloud.settingsSync&&M.cloud.authenticated&&(await ur(),delete $o.Vencord_settingsDirty)},6e4),_s=new Set,nh={};En=go,M=wc(go)});function Fs(){window.VencordDesktopNative.app.relaunch()}var ri=m(()=>{"use strict";a()});var rh=m(()=>{});var Ic={};ge(Ic,{UpdateLogger:()=>ih,changes:()=>$s,checkForUpdates:()=>ah,getRepo:()=>pw,isNewer:()=>Mc,isOutdated:()=>ho,maybePromptToUpdate:()=>ii,update:()=>lh,updateError:()=>sh});async function Us(e){let t=await e;if(t.ok)return t.value;throw sh=t.error,t.error}async function ah(){return $s=await Us(VencordNative.updater.getUpdates()),$s.some(e=>e.hash===rn)?(Mc=!0,ho=!1):ho=$s.length>0}async function lh(){if(!ho)return!0;let e=await Us(VencordNative.updater.update());if(e&&(ho=!1,!await Us(VencordNative.updater.rebuild())))throw new Error("The Build failed. Please try manually building the new update");return e}async function ii(e,t=!1){return;try{if(await ah()){let r=confirm(e);if(r&&Mc)return alert("Your local copy has more recent commits. Please stash or reset them.");r&&(await lh(),Fs())}}catch(n){ih.error(n),alert("That also failed :( Try updating or re-installing with the installer!")}}var ih,ho,Mc,sh,$s,pw,dr=m(()=>{"use strict";a();Dr();be();ri();ih=new Y("Updater","white"),ho=!1,Mc=!1;pw=()=>Us(VencordNative.updater.getRepo())});function ch(){ii("Uh Oh! Failed to render this Page. However, there is an update available that might fix it. Would you like to update and restart now?")}var uh=m(()=>{"use strict";a();dr()});function Dn({title:e,children:t}){return o(v.FormSection,null,o(Q,{variant:"heading-lg/semibold",tag:"h2",className:G.bottom16},e),t)}function On(e,t){return A.wrap(e,{message:`Failed to render the ${t} tab. If this issue persists, try using the installer to reinstall!`,onError:dw})}var dw,Go=m(()=>{"use strict";a();rh();ie();uh();Xe();El();T();dw=Ll(ch)});var mh={};ge(mh,{default:()=>yw});function fw(){let[e,,t]=ot(VencordNative.settings.getSettingsDir,{fallbackValue:"Loading..."}),n=st(),r=I.useMemo(()=>Math.random()>.5?dh:mw,[]),i=navigator.platform.toLowerCase().startsWith("win"),s=navigator.platform.toLowerCase().startsWith("mac"),l=[{key:"useQuickCss",title:"Enable Custom CSS",note:"Loads your Custom CSS"},!1,!1,!1,!1,!1,!1];return o(Dn,{title:"Vencord Settings"},o(hw,{image:r}),o(v.FormSection,{title:"Quick Actions"},o(Et,{className:ph("quick-actions-card")},o(I.Fragment,null,!1,o(N,{onClick:()=>VencordNative.quickCss.openEditor(),size:N.Sizes.SMALL,disabled:e==="Loading..."},"Open QuickCSS File"),!1,o(N,{onClick:()=>VencordNative.native.openExternal("https://github.com/Vendicated/Vencord"),size:N.Sizes.SMALL,disabled:t},"Open in GitHub")))),o(v.FormDivider,null),o(v.FormSection,{className:G.top16,title:"Settings",tag:"h5"},o(v.FormText,{className:G.bottom20},'Hint: You can change the position of this settings section in the settings of the "Settings" plugin!'),l.map(c=>c&&o(ft,{key:c.key,value:n[c.key],onChange:u=>n[c.key]=u,note:c.note},c.title))),typeof Notification<"u"&&o(gw,{settings:n.notifications}))}function gw({settings:e}){return o(d,null,o(v.FormTitle,{tag:"h5"},"Notification Style"),e.useNative!=="never"&&Notification?.permission==="denied"&&o(qn,{style:{padding:"1em"},className:G.bottom8},o(v.FormTitle,{tag:"h5"},"Desktop Notification Permission denied"),o(v.FormText,null,"You have denied Notification Permissions. Thus, Desktop notifications will not work!")),o(v.FormText,{className:G.bottom8},"Some plugins may show you notifications. These come in two styles:",o("ul",null,o("li",null,o("strong",null,"Vencord Notifications"),": These are in-app notifications"),o("li",null,o("strong",null,"Desktop Notifications"),": Native Desktop notifications (like when you get a ping)"))),o(ln,{placeholder:"Notification Style",options:[{label:"Only use Desktop notifications when Discord is not focused",value:"not-focused",default:!0},{label:"Always use Desktop notifications",value:"always"},{label:"Always use Vencord notifications",value:"never"}],closeOnSelect:!0,select:t=>e.useNative=t,isSelected:t=>t===e.useNative,serialize:is}),o
${Kr(l)}`,author:{username:"Vencord"}})};try{let i=e.execute(t,n);return i instanceof Promise?i.catch(r):i}catch(i){return r(i)}}});var $c,Ah=m(()=>{a();(window.VencordStyles??=new Map).set("src/components/PluginSettings/userPopoutHideBotTag.css",{name:"src/components/PluginSettings/userPopoutHideBotTag.css",source:`[class|="userPopoutOuter"] [class*="botTag"] {
display: none;
}
`,classNames:{},dom:null});$c="src/components/PluginSettings/userPopoutHideBotTag.css"});function Uc(e){let t=new Iw({username:e.username,id:e.id??Ec(),avatar:e.avatar,bot:!0});return E.dispatch({type:"USER_UPDATE",user:t}),t}function Gc({plugin:e,onRestartNeeded:t,onClose:n,transitionState:r}){let[i,s]=I.useState([]),l=st().plugins[e.name],[c,u]=I.useState({}),[h,f]=I.useState({}),[y,S]=I.useState(null),x=()=>Object.values(h).every(B=>!B),R=Boolean(l&&e.options);I.useEffect(()=>{Je($c);let B;return(async()=>{for(let q of e.authors.slice(0,6)){let ee=q.id?await Rn.fetchUser(`${q.id}`).then(j=>(B=j,Uc(j))).catch(()=>Uc({username:q.name})):Uc({username:q.name});s(j=>[...j,ee])}})(),()=>{Mt($c),B&&E.dispatch({type:"USER_UPDATE",user:B})}},[]);async function C(){if(!e.options){n();return}if(e.beforeSave){let q=await Promise.resolve(e.beforeSave(c));if(q!==!0){S(q);return}}let B=!1;for(let[q,ee]of Object.entries(c)){let j=e.options[q];l[q]=ee,j?.onChange?.(ee),j?.restartNeeded&&(B=!0)}B&&t(),n()}function _(){if(!R||!e.options)return o(v.FormText,null,"There are no settings for this plugin.");{let B=Object.entries(e.options).map(([q,ee])=>{if(ee.hidden)return null;function j(U){u(Ne=>({...Ne,[q]:U}))}function z(U){f(Ne=>({...Ne,[q]:U}))}let te=Cw[ee.type];return o(te,{id:q,key:q,option:ee,onChange:j,onError:z,pluginSettings:l,definedSettings:e.settings})});return o(le,{flexDirection:"column",style:{gap:12,marginBottom:16}},B)}}function $(B,q){let ee=e.authors.length-q,j=e.authors.length-ee,z=j+e.authors.length-q;return o(W,{text:e.authors.slice(j,z).map(te=>te.name).join(", ")},({onMouseEnter:te,onMouseLeave:U})=>o("div",{className:Mw.moreUsers,onMouseEnter:te,onMouseLeave:U},"+",ee))}return o(Le,{transitionState:r,size:"medium",className:"vc-text-selectable"},o($e,{separator:!1},o(Q,{variant:"heading-lg/semibold",style:{flexGrow:1}},e.name),o(xt,{onClick:n})),o(Ue,null,o(v.FormSection,null,o(v.FormTitle,{tag:"h3"},"About ",e.name),o(v.FormText,null,e.description),o(v.FormTitle,{tag:"h3",style:{marginTop:8,marginBottom:0}},"Authors"),o("div",{style:{width:"fit-content",marginBottom:8}},o(Pw,{users:i,count:e.authors.length,guildId:void 0,renderIcon:!1,max:6,showDefaultAvatarsForNullUsers:!0,showUserPopout:!0,renderMoreUsers:$}))),!!e.settingsAboutComponent&&o("div",{className:J(G.bottom8,"vc-text-selectable")},o(v.FormSection,null,o(A,{message:"An error occurred while rendering this plugin's custom InfoComponent"},o(e.settingsAboutComponent,{tempSettings:c})))),o(v.FormSection,null,o(v.FormTitle,{tag:"h3"},"Settings"),_())),R&&o(Tt,null,o(le,{flexDirection:"column",style:{width:"100%"}},o(le,{style:{marginLeft:"auto"}},o(N,{onClick:n,size:N.Sizes.SMALL,color:N.Colors.WHITE,look:N.Looks.LINK},"Cancel"),o(W,{text:"You must fix all errors before saving",shouldShow:!x()},({onMouseEnter:B,onMouseLeave:q})=>o(N,{size:N.Sizes.SMALL,color:N.Colors.BRAND,onClick:C,onMouseEnter:B,onMouseLeave:q,disabled:!x()},"Save & Close"))),y&&o(Q,{variant:"text-md/semibold",style:{color:"var(--text-danger)"}},"Error while saving: ",y))))}var Pw,Mw,Iw,Cw,Lh=m(()=>{"use strict";a();_t();D();Ge();ie();wt();sn();Xe();fe();Ze();ve();b();O();T();Hs();Ah();Pw=re(()=>ze("defaultRenderUser","showDefaultAvatarsForNullUsers")),Mw=P("moreUsers","emptyUser","avatarContainer","clickableAvatar"),Iw=dt(()=>F.getCurrentUser().constructor);Cw={[0]:Ch,[1]:Ac,[2]:Ac,[3]:Sh,[4]:Ph,[5]:Ih,[6]:Th}});var Eh=m(()=>{});function Dh({checked:e,onChange:t,disabled:n}){return o("div",null,o("div",{className:J(js.container,"default-colors",e?js.checked:void 0),style:{backgroundColor:e?Hc:zc,opacity:n?.3:1}},o("svg",{className:js.slider+" vc-switch-slider",viewBox:"0 0 28 20",preserveAspectRatio:"xMinYMid meet","aria-hidden":"true",style:{transform:e?"translateX(12px)":"translateX(-3px)"}},o("rect",{fill:"white",x:"4",y:"0",height:"20",width:"20",rx:"10"}),o("svg",{viewBox:"0 0 20 20",fill:"none"},e?o(d,null,o("path",{fill:Hc,d:"M7.89561 14.8538L6.30462 13.2629L14.3099 5.25755L15.9009 6.84854L7.89561 14.8538Z"}),o("path",{fill:Hc,d:"M4.08643 11.0903L5.67742 9.49929L9.4485 13.2704L
`,s),!1}}if(r?.length){jt.info("Registering commands of plugin",n);for(let s of r)try{fr(s,n)}catch(l){return jt.error(`Failed to register command ${s.name}
`,l),!1}}if(i)for(let s in i)E.subscribe(s,i[s]);return!0},e=>`startPlugin ${e.name}`),Kc=an("stopPlugin",function(t){let{name:n,commands:r,flux:i}=t;if(t.stop){if(jt.info("Stopping plugin",n),!t.started)return jt.warn(`${n} already stopped`),!1;try{t.stop(),t.started=!1}catch(s){return jt.error(`Failed to stop ${n}
`,s),!1}}if(r?.length){jt.info("Unregistering commands of plugin",n);for(let s of r)try{li(s.name)}catch(l){return jt.error(`Failed to unregister command ${s.name}
`,l),!1}}if(i)for(let s in i)E.unsubscribe(s,i[s]);return!0},e=>`stopPlugin ${e.name}`)});function Ew(e){X.show({message:e,type:X.Type.FAILURE,id:X.genId(),options:{position:X.Position.BOTTOM}})}function Dw({required:e}){return o(Et,{className:vn("info-card",{"restart-card":e})},e?o(d,null,o(v.FormTitle,{tag:"h5"},"Restart required!"),o(v.FormText,{className:vn("dep-text")},"Restart now to apply new plugins and their settings"),o(N,{color:N.Colors.YELLOW,onClick:()=>location.reload()},"Restart")):o(d,null,o(v.FormTitle,{tag:"h5"},"Plugin Management"),o(v.FormText,null,"Press the cog wheel or info icon to get more info on a plugin"),o(v.FormText,null,"Plugins with a cog wheel have settings you can modify!")))}function Uh({plugin:e,disabled:t,onRestartNeeded:n,onMouseEnter:r,onMouseLeave:i,isNew:s}){let l=M.plugins[e.name],c=()=>l.enabled??!1;function u(){Hr(async()=>f=>o(Gc,{...f,plugin:e,onRestartNeeded:()=>n(e.name)}))}function h(){let f=c();if(!f){let{restartNeeded:S,failures:x}=Ws(e);if(x.length){Fh.error(`Failed to start dependencies for ${e.name}: ${x.join(", ")}`),ai("Failed to start dependencies: "+x.join(", "),"Close",()=>null);return}else if(S){l.enabled=!0,n(e.name);return}}if(e.patches?.length){l.enabled=!f,n(e.name);return}if(f&&!e.started){l.enabled=!f;return}if(!(f?Kc(e):ci(e))){l.enabled=!1;let S=`Error while ${f?"stopping":"starting"} plugin ${e.name}`;Fh.error(S),Ew(S);return}l.enabled=!f}return o(le,{className:vn("card",{"card-disabled":t}),flexDirection:"column",onMouseEnter:r,onMouseLeave:i},o("div",{className:vn("card-header")},o(Q,{variant:"text-md/bold",className:vn("name")},e.name,s&&o(yh,{text:"NEW",color:"#ED4245"})),o("button",{role:"switch",onClick:()=>u(),className:J(Rw.button,vn("info-button"))},e.options?o(Aw,null):o(Lw,{width:"24",height:"24"})),o(Dh,{checked:c(),onChange:h,disabled:t})),o(Q,{className:vn("note"),variant:"text-sm/normal"},e.description))}function Zc(){let e=st(),t=I.useMemo(()=>new Er,[]);I.useEffect(()=>()=>void(t.hasChanges&&bt.show({title:"Restart required",body:o(d,null,o("p",null,"The following plugins require a restart:"),o("div",null,t.map((S,x)=>o(d,null,x>0&&", ",Ie.parse("`"+S+"`"))))),confirmText:"Restart now",cancelText:"Later!",onConfirm:()=>location.reload()})),[]);let n=I.useMemo(()=>{let S={};for(let x in Te){let R=Te[x].dependencies;if(R)for(let C of R)S[C]??=[],S[C].push(x)}return S},[]),r=I.useMemo(()=>Object.values(Te).sort((S,x)=>S.name.localeCompare(x.name)),[]),[i,s]=I.useState({value:"",status:0}),l=S=>s(x=>({...x,value:S})),c=S=>s(x=>({...x,status:S})),u=S=>{let x=e.plugins[S.name]?.enabled;if(x&&i.status===2||!x&&i.status===1)return!1;if(!i.value.length)return!0;let R=i.value.toLowerCase();return S.name.toLowerCase().includes(R)||S.description.toLowerCase().includes(R)||S.tags?.some(C=>C.toLowerCase().includes(R))},[h]=ot(()=>Qe("Vencord_existingPlugins").then(S=>{let x=Date.now()/1e3,R={},C=Object.values(r).map($=>$.name),_=[];for(let{name:$}of r)(R[$]=S?.[$]??x)+60*60*24*2>x&&_.push($);return Ve("Vencord_existingPlugins",R),window._.isEqual(_,C)?[]:_})),f,y;if(r?.length){f=[],y=[];for(let S of r){if(!S.options&&S.name.endsWith("API")&&i.value!=="API"||!u(S))continue;if(S.required||n[S.name]?.some(R=>e.plugins[R].enabled)){let R=S.required?"This plugin is required for Vencord to function.":Ow(n[S.name]?.filter(C=>e.plugins[C].enabled));y.push(o(W,{text:R,key:S.name},({onMouseLeave:C,onMouseEnter:_})=>o(Uh,{onMouseLeave:C,onMouseEnter:_,onRestartNeeded:$=>t.handleChange($),disabled:!0,plugin:S})))}else f.push(o(Uh,{onRestartNeeded:R=>t.handleChange(R),disabled:!1,plugin:S,isNew:h?.includes(S.name),key:S.name}))}}else f=y=o(Q,{variant:"text-md/normal"},"No plugins meet search criteria.");return o(Dn,{title:"Plugins"},o(Dw,{required:t.hasChanges}),o(v.FormTitle,{tag:"h5",className:J(G.top20,G.bottom8)},"Filters"),o("div",{className:vn("filter-controls")},o(Re,{autoFocus:!0,value:i.value,placeholder:"Search for a plugin...",onChange:l,className:G.bottom20}),o("div",{className:$h.inputWrapper},o(ln,{className:$h.inputDefault,options:[{label:"Show All
`));function r(){e.themeLinks=[...new Set(t.trim().split(/\n+/).map(i=>i.trim()).filter(Boolean))]}return o(Dn,{title:"Themes"},o(Et,{className:"vc-settings-card vc-text-selectable"},o(v.FormTitle,{tag:"h5"},"Paste links to .theme.css files here"),o(v.FormText,null,"One link per line"),o(v.FormText,null,o("strong",null,"Make sure to use the raw links or github.io links!")),o(v.FormDivider,{className:G.top8+" "+G.bottom8}),o(v.FormTitle,{tag:"h5"},"Find Themes:"),o("div",{style:{marginBottom:".5em"}},o(at,{style:{marginRight:".5em"},href:"https://betterdiscord.app/themes"},"BetterDiscord Themes"),o(at,{href:"https://github.com/search?q=discord+theme"},"GitHub")),o(v.FormText,null,'If using the BD site, click on "Source" somewhere below the Download button'),o(v.FormText,null,'In the GitHub repository of your theme, find X.theme.css, click on it, then click the "Raw" button'),o(v.FormText,null,"If the theme has configuration that requires you to edit the file:",o("ul",null,o("li",null,"\u2022 Make a ",o(at,{href:"https://github.com/signup"},"GitHub")," account"),o("li",null,"\u2022 Click the fork button on the top right"),o("li",null,"\u2022 Edit the file"),o("li",null,"\u2022 Use the link to your own repository instead")))),o(v.FormTitle,{tag:"h5"},"Themes"),o(as,{value:t,onChange:n,className:`${Bw.textarea} vc-settings-theme-links`,placeholder:"Theme Links",spellCheck:!1,onBlur:r}),o($w,{themeLinks:e.themeLinks}))}var Bw,Gw,Wh=m(()=>{"use strict";a();D();bo();Xe();ve();O();T();Go();Bw=ke(e=>typeof e.textarea=="string");Gw=On(Uw,"Themes")});function Ks({value:e,onChange:t,validate:n}){let[r,i]=I.useState(e),[s,l]=I.useState();function c(u){i(u);let h=n(u);h===!0?(l(void 0),t(u)):l(h)}return o(d,null,o(Re,{type:"text",value:r,onChange:c,error:s}))}var Xc=m(()=>{"use strict";a();T()});var qh={};ge(qh,{default:()=>qw});function Hw(e){try{return new URL(e),!0}catch{return"Invalid URL"}}async function zw(){let e=await fetch(new URL("/v1/",fo()),{method:"DELETE",headers:new Headers({Authorization:await cr()})});if(!e.ok){Es.error(`Failed to erase data, API returned ${e.status}`),he({title:"Cloud Integrations",body:`Could not erase all data (API returned ${e.status}), please contact support.`,color:"var(--red-360)"});return}M.cloud.authenticated=!1,await bc(),he({title:"Cloud Integrations",body:"Successfully erased all data.",color:"var(--green-360)"})}function jw(){let{cloud:e}=st(["cloud.authenticated","cloud.settingsSync"]),t=e.authenticated&&e.settingsSync;return o(v.FormSection,{title:"Settings Sync",className:G.top16},o(v.FormText,{variant:"text-md/normal",className:G.bottom20},"Synchronize your settings to the cloud. This allows easy synchronization across multiple devices with minimal effort."),o(ft,{key:"cloud-sync",disabled:!e.authenticated,value:e.settingsSync,onChange:n=>{e.settingsSync=n}},"Settings Sync"),o("div",{className:"vc-cloud-settings-sync-grid"},o(N,{size:N.Sizes.SMALL,disabled:!t,onClick:()=>ur(!0)},"Sync to Cloud"),o(W,{text:"This will overwrite your local settings with the ones on the cloud. Use wisely!"},({onMouseLeave:n,onMouseEnter:r})=>o(N,{onMouseLeave:n,onMouseEnter:r,size:N.Sizes.SMALL,color:N.Colors.RED,disabled:!t,onClick:()=>Os(!0,!0)},"Sync from Cloud")),o(N,{size:N.Sizes.SMALL,color:N.Colors.RED,disabled:!t,onClick:()=>eh()},"Delete Cloud Settings")))}function Ww(){let e=st(["cloud.authenticated","cloud.url"]);return o(Dn,{title:"Vencord Cloud"},o(v.FormSection,{title:"Cloud Settings",className:G.top16},o(v.FormText,{variant:"text-md/normal",className:G.bottom20},"Vencord comes with a cloud integration that adds goodies like settings sync across devices. It ",o(at,{href:"https://vencord.dev/cloud/privacy"},"respects your privacy"),", and the ",o(at,{href:"https://github.com/Vencord/Backend"},"source code")," is AGPL 3.0 licensed so you can host it yourself."),o(ft,{key:"backend",value:e.cloud.authenticated,onChange:t=>{t&&Yg(),t||(e.cloud.authenticated=t)},note:"This will request authorization if you have not yet set up cloud integrations."},"Enable Cloud Integrations"),o(v.FormTitle,{tag:"
2023-07-11 23:04:56 -04:00
.vc-nsfw-img [class^=imageWrapper] img,
.vc-nsfw-img [class^=wrapperPaused] video {
2023-07-11 23:21:30 -04:00
filter: blur(${M.plugins.BlurNSFW.blurAmount}px);
2023-07-11 23:04:56 -04:00
transition: filter 0.2s;
}
.vc-nsfw-img [class^=imageWrapper]:hover img,
.vc-nsfw-img [class^=wrapperPaused]:hover video {
filter: unset;
}
2023-07-11 23:21:30 -04:00
`}var pi,pu,Ny=m(()=>{"use strict";a();D();w();b();pu=g({name:"BlurNSFW",description:"Blur attachments in NSFW channels until hovered",authors:[p.Ven],patches:[{find:".embedWrapper,embed",replacement:[{match:/(\.renderEmbed=.+?(.)=.\.props)(.+?\.embedWrapper)/g,replace:"$1,vcProps=$2$3+(vcProps.channel.nsfw?' vc-nsfw-img':'')"},{match:/(\.renderAttachments=.+?(.)=this\.props)(.+?\.embedWrapper)/g,replace:"$1,vcProps=$2$3+(vcProps.channel.nsfw?' vc-nsfw-img':'')"}]}],options:{blurAmount:{type:1,description:"Blur Amount",default:10,onChange:Cy}},start(){pi=document.createElement("style"),pi.id="VcBlurNsfw",document.head.appendChild(pi),Cy()},stop(){pi?.remove()}})});function o2(e){let t=M.plugins.CallTimer.format==="human",n=f=>t?f:f.toString().padStart(2,"0"),r=f=>t?f:"",i=t?" ":":",s=Math.floor(e/864e5),l=Math.floor(e%864e5/36e5),c=Math.floor(e%864e5%36e5/6e4),u=Math.floor(e%864e5%36e5%6e4/1e3),h="";return s&&(h+=`${s}d `),(l||h)&&(h+=`${n(l)}${r("h")}${i}`),(c||h||!t)&&(h+=`${n(c)}${r("m")}${i}`),h+=`${n(u)}${r("s")}`,h}var du,ky=m(()=>{"use strict";a();D();ie();w();b();T();du=g({name:"CallTimer",description:"Adds a timer to vcs",authors:[p.Ven],startTime:0,interval:void 0,options:{format:{type:4,description:"The timer format. This can be any valid moment.js format",options:[{label:"30d 23:00:42",value:"stopwatch",default:!0},{label:"30d 23h 00m 42s",value:"human"}]}},patches:[{find:".renderConnectionStatus=",replacement:{match:/(?<=renderConnectionStatus=.+\.channel,children:)\w/,replace:"[$&, $self.renderTimer(this.props.channel.id)]"}}],renderTimer(e){return o(A,{noop:!0},o(this.Timer,{channelId:e}))},Timer({channelId:e}){let[t,n]=I.useState(0),r=I.useMemo(()=>Date.now(),[e]);return I.useEffect(()=>{let i=setInterval(()=>n(Date.now()-r),1e3);return()=>{clearInterval(i),n(0)}},[e]),o("p",{style:{margin:0}},"Connected for ",o2(t))}})});var Su={};ge(Su,{_handleClick:()=>s2,_handlePreEdit:()=>i2,_handlePreSend:()=>r2,addClickListener:()=>yu,addPreEditListener:()=>Jn,addPreSendListener:()=>lt,removeClickListener:()=>vu,removePreEditListener:()=>Qn,removePreSendListener:()=>ct});async function r2(e,t,n,r){n.replyOptions=r;for(let i of fu)try{let s=await i(e,t,n);if(s&&s.cancel===!0)return!0}catch(s){mu.error(`MessageSendHandler: Listener encountered an unknown error
`,s)}return!1}async function i2(e,t,n){for(let r of gu)try{await r(e,t,n)}catch(i){mu.error(`MessageEditHandler: Listener encountered an unknown error
`,i)}}function lt(e){return fu.add(e),e}function Jn(e){return gu.add(e),e}function ct(e){return fu.delete(e)}function Qn(e){return gu.delete(e)}function s2(e,t,n){e=un.getMessage(t.id,e.id)??e;for(let r of hu)try{r(e,t,n)}catch(i){mu.error(`MessageClickHandler: Listener encountered an unknown error
`,i)}}function yu(e){return hu.add(e),e}function vu(e){return hu.delete(e)}var mu,fu,gu,hu,Sn=m(()=>{"use strict";a();be();T();mu=new Y("MessageEvents","#e5c890"),fu=new Set,gu=new Set;hu=new Set});var Ry,Ay=m(()=>{"use strict";a();Ry=["action_object_map","action_type_map","action_ref_map","spm@*.aliexpress.com","scm@*.aliexpress.com","aff_platform","aff_trace_key","algo_expid@*.aliexpress.*","algo_pvid@*.aliexpress.*","btsid","ws_ab_test","pd_rd_*@amazon.*","_encoding@amazon.*","psc@amazon.*","tag@amazon.*","ref_@amazon.*","pf_rd_*@amazon.*","pf@amazon.*","crid@amazon.*","keywords@amazon.*","sprefix@amazon.*","sr@amazon.*","ie@amazon.*","node@amazon.*","qid@amazon.*","callback@bilibili.com","cvid@bing.com","form@bing.com","sk@bing.com","sp@bing.com","sc@bing.com","qs@bing.com","pq@bing.com","sc_cid","mkt_tok","trk","trkCampaign","ga_*","gclid","gclsrc","hmb_campaign","hmb_medium","hmb_source","spReportId","spJobID","spUserID","spMailingID","itm_*","s_cid","elqTrackId","elqTrack","assetType","assetId","recipientId","campaignId","siteId","mc_cid","mc_eid","pk_*","sc_campaign","sc_channel","sc_content","sc_medium","sc_outcome","sc_geo","sc_country","nr_email_referer","vero_conv","vero_id","yclid","_openstat","mbid","cmpid","cid","c_id","campaign_id","Campaign","hash@ebay.*","fb_action_ids","fb_action_types","fb_ref","fb_source","fbclid","refsrc@facebook.com","hrc@facebook.com","gs_l","gs_lcp@google.*","ved@google.*","ei@google.*","sei@google.*","gws_rd@google.*","gs_gbg@google.*","gs_mss@google.*","gs_rn@google.*","_hsenc","_hsmi","__hssc","__hstc","hsCtaTracking","source@sourceforge.net","position@sourceforge.net","t@*.twitter.com","s@*.twitter.com","ref_*@*.twitter.com","tt_medium","tt_content","lr@yandex.*","redircnt@yandex.*","feature@youtube.com","kw@youtube.com","wt_zmc","utm_source","utm_content","utm_medium","utm_campaign","utm_term","si@open.spotify.com","igshid"]});var Ly,a2,bu,Ey=m(()=>{"use strict";a();Sn();w();b();Ay();Ly=/[\\^$.*+?()[\]{}|]/g,a2=RegExp(Ly.source),bu=g({name:"ClearURLs",description:"Removes tracking garbage from URLs",authors:[p.adryd],dependencies:["MessageEventsAPI"],escapeRegExp(e){return e&&a2.test(e)?e.replace(Ly,"\\$&"):e||""},createRules(){let e=Ry;this.universalRules=new Set,this.rulesByHost=new Map,this.hostRules=new Map;for(let t of e){let n=t.split("@"),r=new RegExp("^"+this.escapeRegExp(n[0]).replace(/\\\*/,".+?")+"$");if(!n[1]){this.universalRules.add(r);continue}let i=new RegExp("^(www\\.)?"+this.escapeRegExp(n[1]).replace(/\\\./,"\\.").replace(/^\\\*\\\./,"(.+?\\.)?").replace(/\\\*/,".+?")+"$"),s=i.toString();this.hostRules.set(s,i),this.rulesByHost.get(s)==null&&this.rulesByHost.set(s,new Set),this.rulesByHost.get(s).add(r)}},removeParam(e,t,n){(t===e||e instanceof RegExp&&e.test(t))&&n.delete(t)},replacer(e){try{var t=new URL(e)}catch{return e}return t.searchParams.entries().next().done?e:(this.universalRules.forEach(n=>{t.searchParams.forEach((r,i,s)=>{this.removeParam(n,i,s)})}),this.hostRules.forEach((n,r)=>{!n.test(t.hostname)||this.rulesByHost.get(r).forEach(i=>{t.searchParams.forEach((s,l,c)=>{this.removeParam(i,l,c)})})}),t.toString())},onSend(e){e.content.match(/http(s)?:\/\//)&&(e.content=e.content.replace(/(https?:\/\/[^\s<]+[^<.,:;"'>)|\]\s])/g,t=>this.replacer(t)))},start(){this.createRules(),this.preSend=lt((e,t)=>this.onSend(t)),this.preEdit=Jn((e,t,n)=>this.onSend(n))},stop(){ct(this.preSend),Qn(this.preEdit)}})});var Tu,Dy=m(()=>{"use strict";a();w();b();Tu=g({name:"ColorSighted",description:"Removes the colorblind-friendly icons from statuses, just like 2015-2017 Discord",authors:[p.lewisakura],patches:[{find:"Masks.STATUS_ONLINE",replacement:{match:/Masks\.STATUS_(?:IDLE|DND|STREAMING|OFFLINE)/g,replace:"Masks.STATUS_ONLINE"}},{find:".AVATAR_STATUS_MOBILE_16;",replacement:{match:/(\.fromIsMobile,.+?)\i.status/,replace:(e,t)=>`${t}"online"`}}]})});var l2,xu,Oy=m(()=>{"use strict";a();w();ri();Wr();b();O();O();T();l2=e=>()=>{throw new Error(`'${e}' is Discord Desktop only.`)},xu=g({name:"ConsoleShortcuts",description:"Adds shorter Aliases for many things on th
`,u),l[0]}})();return c&&s&&r.set(s,c),c}}let t;return{wp:Vencord.Webpack,wpc:Gt.c,wreq:Gt,wpsearch:hl,wpex:yl,wpexs:n=>Vencord.Webpack.extract(Vencord.Webpack.findModuleId(n)),find:e(n=>n),findAll:or,findByProps:e(K.byProps),findAllByProps:(...n)=>or(K.byProps(...n)),findByCode:e(K.byCode),findAllByCode:n=>or(K.byCode(n)),findStore:e(K.byStoreName),PluginsApi:Vencord.Plugins,plugins:Vencord.Plugins.plugins,React:I,Settings:Vencord.Settings,Api:Vencord.Api,reload:()=>location.reload(),restart:l2("restart"),canonicalizeMatch:Uo,canonicalizeReplace:Ts,canonicalizeReplacement:jr,fakeRender:(n,r)=>{let i=t?.deref(),s=i?.closed===!1?i:window.open("about:blank","Fake Render","popup,width=500,height=500");t=new WeakRef(s),s.focus(),_o.render(I.createElement(n,r),s.document.body)}}},start(){let e=this.getShortcuts();window.shortcutList=e;for(let[t,n]of Object.entries(e))window[t]=n},stop(){delete window.shortcutList;for(let e in this.getShortcuts())delete window[e]}})});var To,wu,Pu,Js,Mu,Iu,_y=m(()=>{"use strict";a();uo();D();w();be();Ze();b();dr();T();To=new Y("CrashHandler"),wu=k({attemptToPreventCrashes:{type:3,description:"Whether to attempt to prevent Discord crashes.",default:!0},attemptToNavigateToHome:{type:3,description:"Whether to attempt to navigate to the home when preventing Discord crashes.",default:!1}}),Pu=0,Js=0,Mu=!1,Iu=g({name:"CrashHandler",description:"Utility plugin for handling and possibly recovering from Crashes without a restart",authors:[p.Nuckyz],enabledByDefault:!0,popAllModals:void 0,settings:wu,patches:[{find:".Messages.ERRORS_UNEXPECTED_CRASH",replacement:{match:/(?=this\.setState\()/,replace:"$self.handleCrash(this)||"}},{find:'dispatch({type:"MODAL_POP_ALL"})',replacement:{match:/"MODAL_POP_ALL".+?};(?<=(\i)=function.+?)/,replace:(e,t)=>`${e}$self.popAllModals=${t};`}}],handleCrash(e){if(Date.now()-Js<=1e3&&!Mu)return!0;if(Mu=!1,++Pu>5){try{he({color:"#eed202",title:"Discord has crashed!",body:"Awn :( Discord has crashed more than five times, not attempting to recover.",noPersist:!0})}catch{}return Js=Date.now(),!1}setTimeout(()=>Pu--,6e4);try{return Pu===1&&ii("Uh oh, Discord has just crashed... but good news, there is a Vencord update available that might fix this issue! Would you like to update now?",!0),wu.store.attemptToPreventCrashes?(this.handlePreventCrash(e),!0):!1}catch(t){return To.error("Failed to handle crash",t),!1}finally{Js=Date.now()}},handlePreventCrash(e){if(Date.now()-Js>=1e3)try{he({color:"#eed202",title:"Discord has crashed!",body:"Attempting to recover...",noPersist:!0})}catch{}try{E.dispatch({type:"CONTEXT_MENU_CLOSE"})}catch(t){To.debug("Failed to close open context menu.",t)}try{this.popAllModals?.()}catch(t){To.debug("Failed to close old modals.",t)}try{kl()}catch(t){To.debug("Failed to close all open modals.",t)}try{E.dispatch({type:"USER_PROFILE_MODAL_CLOSE"})}catch(t){To.debug("Failed to close user popout.",t)}try{E.dispatch({type:"LAYER_POP_ALL"})}catch(t){To.debug("Failed to pop all layers.",t)}if(wu.store.attemptToNavigateToHome)try{Gr.transitionTo("/channels/@me")}catch(t){To.debug("Failed to navigate to home",t)}try{Mu=!0,e.forceUpdate()}catch(t){To.debug("Failed to update crash handler component.",t)}}})});async function By(e){return(await d2.getAsset(Vs.store.appID,[e,void 0]))[0]}async function $y(){let{appID:e,appName:t,details:n,state:r,type:i,startTime:s,endTime:l,imageBig:c,imageBigTooltip:u,imageSmall:h,imageSmallTooltip:f,buttonOneText:y,buttonOneURL:S,buttonTwoText:x,buttonTwoURL:R}=Vs.store;if(!t)return;let C={application_id:e||"0",name:t,state:r,details:n,type:i,flags:1<<0};s&&(C.timestamps={start:s},l&&(C.timestamps.end=l)),y&&(C.buttons=[y,x].filter(vs),C.metadata={button_urls:[S,R].filter(vs)}),c&&(C.assets={large_image:await By(c),large_text:u}),h&&(C.assets={...C.assets,small_image:await By(h),small_text:f});for(let _ in C){if(_==="type")continue;let $=C[_];(!$||$.length===0)&&delete C[_]}return C}async function di(e){let t=await $y();E.dispatch({type:"LOCAL_ACTIVITY_UPDATE",activity:e?null:t,socketId:"CustomRPC"})}var c2,u2,p2,d2,Qt,Fy,Qs,m2
discord.gg/${r.code} \xB7
Expires: <t:${new Date(r.expires_at).getTime()/1e3}:R> \xB7
2023-07-11 23:04:56 -04:00
Max uses: \`${r.max_uses}\`
2023-07-11 23:21:30 -04:00
`.trim().replace(/\s+/g," ")})}},{name:"view friend invites",description:"View a list of all generated friend invites.",inputType:3,execute:async(e,t)=>{let r=(await zu.getAllFriendInvites()).map(i=>`
_discord.gg/${i.code}_ \xB7
Expires: <t:${new Date(i.expires_at).getTime()/1e3}:R> \xB7
Times used: \`${i.uses}/${i.max_uses}\`
`.trim().replace(/\s+/g," "));oe(t.channel.id,{content:r.join(`
`)||"You have no active friend invites!"})}},{name:"revoke friend invites",description:"Revokes all generated friend invites.",inputType:3,execute:async(e,t)=>(await zu.revokeFriendInvites(),void oe(t.channel.id,{content:"All friend invites have been revoked."}))}]})});var qu={};ge(qu,{getSettingStore:()=>mv,getSettingStoreLazy:()=>Wu});function mv(e,t){if(!M.plugins.SettingsStoreAPI.enabled)throw new Error("Cannot use SettingsStoreAPI without setting as dependency.");return L2?.find(n=>n?.settingsStoreApiGroup===e&&n?.settingsStoreApiName===t)}function Wu(e,t){return dt(()=>mv(e,t))}var L2,Ku=m(()=>{"use strict";a();sn();be();O();D();L2=dt(()=>{let e=os('"textAndImages","renderSpoilers"');if(e==null)return new Y("SettingsStoreAPI").error("Didn't find stores module.");let t=Gt(e);if(t!=null)return Object.values(t).filter(n=>n?.settingsStoreApiGroup)})});var Yu,fv=m(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/gameActivityToggle/style.css",{name:"src/plugins/gameActivityToggle/style.css",source:`[class*="withTagAsButton"] {
min-width: 88px;
}
`,classNames:{},dom:null});Yu="src/plugins/gameActivityToggle/style.css"});function D2(e){return function(){return o("svg",{width:"24",height:"24",viewBox:"0 96 960 960"},o("path",{fill:"currentColor",d:"M182 856q-51 0-79-35.5T82 734l42-300q9-60 53.5-99T282 296h396q60 0 104.5 39t53.5 99l42 300q7 51-21 86.5T778 856q-21 0-39-7.5T706 826l-90-90H344l-90 90q-15 15-33 22.5t-39 7.5Zm498-240q17 0 28.5-11.5T720 576q0-17-11.5-28.5T680 536q-17 0-28.5 11.5T640 576q0 17 11.5 28.5T680 616Zm-80-120q17 0 28.5-11.5T640 456q0-17-11.5-28.5T600 416q-17 0-28.5 11.5T560 456q0 17 11.5 28.5T600 496ZM310 616h60v-70h70v-60h-70v-70h-60v70h-70v60h70v70Z"}),!e&&o("line",{x1:"920",y1:"280",x2:"40",y2:"880",stroke:"var(--status-danger)","stroke-width":"80"}))}}function O2(){let e=gv?.useSetting();return o(E2,{tooltipText:e?"Disable Game Activity":"Enable Game Activity",icon:D2(e),role:"switch","aria-checked":!e,onClick:()=>gv?.updateSetting(t=>!t)})}var gv,E2,Zu,hv=m(()=>{"use strict";a();Ku();Ge();ie();w();b();O();fv();gv=Wu("status","showCurrentGame"),E2=ce("Button.Sizes.NONE,disabled:");Zu=g({name:"GameActivityToggle",description:"Adds a button next to the mic and deafen button to toggle game activity.",authors:[p.Nuckyz],dependencies:["SettingsStoreAPI"],patches:[{find:".Messages.ACCOUNT_SPEAKING_WHILE_MUTED",replacement:{match:/this\.renderNameZone\(\).+?children:\[/,replace:"$&$self.GameActivityToggleButton(),"}}],GameActivityToggleButton:A.wrap(O2,{noop:!0}),start(){Je(Yu)},stop(){Mt(Yu)}})});var _2,Xu,yv=m(()=>{"use strict";a();w();tt();b();O();_2=Ke('name:"expression-picker-last-active-view"',{close:K.byCode("activeView:null","setState")}),Xu=g({name:"GifPaste",description:"Makes picking a gif in the gif picker insert a link into the chatbox instead of instantly sending it",authors:[p.Ven],patches:[{find:".handleSelectGIF=",replacement:{match:/\.handleSelectGIF=function.+?\{/,replace:".handleSelectGIF=function(gif){return $self.handleSelect(gif);"}}],handleSelect(e){e&&(Hn(e.url+" "),_2.close())}})});var Ju={};ge(Ju,{_buildPopoverElements:()=>F2,addButton:()=>bn,buttons:()=>ra,removeButton:()=>Tn});function bn(e,t){ra.set(e,t)}function Tn(e){ra.delete(e)}function F2(e,t){let n=[];for(let[r,i]of ra.entries())try{let s=i(e);s&&(s.key??=r,n.push(t(s)))}catch(s){B2.error(`[${r}]`,s)}return n}var B2,ra,Ko=m(()=>{"use strict";a();be();B2=new Y("MessagePopover"),ra=new Map});var gi,Sv,hi,vv,$2,Qu,bv=m(()=>{"use strict";a();Cn();Ko();_n();w();b();T();Sv="HideAttachments_HiddenIds",hi=new Set,vv=()=>Qe(Sv).then(e=>(hi=e??new Set,hi)),$2=e=>Ve(Sv,e),Qu=g({name:"HideAttachments",description:"Hide attachments and Embeds for individual messages via hover button",authors:[p.Ven],dependencies:["MessagePopoverAPI"],async start(){gi=document.createElement("style"),gi.id="VencordHideAttachments",document.head.appendChild(gi),await vv(),await this.buildCss(),bn("HideAttachments",e=>{if(!e.attachments.length&&!e.embeds.length)return null;let t=hi.has(e.id);return{label:t?"Show Attachments":"Hide Attachments",icon:t?Zs:Xs,message:e,channel:Z.getChannel(e.channel_id),onClick:()=>this.toggleHide(e.id)}})},stop(){gi.remove(),hi.clear(),Tn("HideAttachments")},async buildCss(){let e=[...hi].map(t=>`#message-accessories-${t}`).join(",");gi.textContent=`
2023-07-11 23:04:56 -04:00
: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%;
}
2023-07-11 23:21:30 -04:00
`},async toggleHide(e){let t=await vv();t.delete(e)||t.add(e),await $2(t),await this.buildCss()}})});var Vu,Tv=m(()=>{"use strict";a();w();b();Vu=g({name:"iLoveSpam",description:"Do not hide messages from 'likely spammers'",authors:[p.botato,p.Animal],patches:[{find:"),{hasFlag:",replacement:{match:/(if\((.{1,2})<=1<<30\)return)/,replace:"if($2===(1<<20)){return false};$1"}}]})});function H2(){return o("svg",{className:hr.overlayToggleIconOff,height:"24",width:"24",viewBox:"0 2.2 32 26","aria-hidden":!0,role:"img"},o("g",{fill:"none",fillRule:"evenodd"},o("path",{className:hr.fill,fill:"currentColor",d:"M 16 8 C 7.664063 8 1.25 15.34375 1.25 15.34375 L 0.65625 16 L 1.25 16.65625 C 1.25 16.65625 7.097656 23.324219 14.875 23.9375 C 15.246094 23.984375 15.617188 24 16 24 C 16.382813 24 16.753906 23.984375 17.125 23.9375 C 24.902344 23.324219 30.75 16.65625 30.75 16.65625 L 31.34375 16 L 30.75 15.34375 C 30.75 15.34375 24.335938 8 16 8 Z M 16 10 C 18.203125 10 20.234375 10.601563 22 11.40625 C 22.636719 12.460938 23 13.675781 23 15 C 23 18.613281 20.289063 21.582031 16.78125 21.96875 C 16.761719 21.972656 16.738281 21.964844 16.71875 21.96875 C 16.480469 21.980469 16.242188 22 16 22 C 15.734375 22 15.476563 21.984375 15.21875 21.96875 C 11.710938 21.582031 9 18.613281 9 15 C 9 13.695313 9.351563 12.480469 9.96875 11.4375 L 9.9375 11.4375 C 11.71875 10.617188 13.773438 10 16 10 Z M 16 12 C 14.34375 12 13 13.34375 13 15 C 13 16.65625 14.34375 18 16 18 C 17.65625 18 19 16.65625 19 15 C 19 13.34375 17.65625 12 16 12 Z M 7.25 12.9375 C 7.09375 13.609375 7 14.285156 7 15 C 7 16.753906 7.5 18.394531 8.375 19.78125 C 5.855469 18.324219 4.105469 16.585938 3.53125 16 C 4.011719 15.507813 5.351563 14.203125 7.25 12.9375 Z M 24.75 12.9375 C 26.648438 14.203125 27.988281 15.507813 28.46875 16 C 27.894531 16.585938 26.144531 18.324219 23.625 19.78125 C 24.5 18.394531 25 16.753906 25 15 C 25 14.285156 24.90625 13.601563 24.75 12.9375 Z"}),o("rect",{className:hr.fill,x:"3",y:"26",width:"26",height:"2",transform:"rotate(-45 2 20)"})))}function z2({forceWhite:e}){return o("svg",{className:hr.overlayToggleIconOn,height:"24",width:"24",viewBox:"0 2.2 32 26"},o("path",{className:e?"":hr.fill,fill:e?"var(--white-500)":"",d:"M 16 8 C 7.664063 8 1.25 15.34375 1.25 15.34375 L 0.65625 16 L 1.25 16.65625 C 1.25 16.65625 7.097656 23.324219 14.875 23.9375 C 15.246094 23.984375 15.617188 24 16 24 C 16.382813 24 16.753906 23.984375 17.125 23.9375 C 24.902344 23.324219 30.75 16.65625 30.75 16.65625 L 31.34375 16 L 30.75 15.34375 C 30.75 15.34375 24.335938 8 16 8 Z M 16 10 C 18.203125 10 20.234375 10.601563 22 11.40625 C 22.636719 12.460938 23 13.675781 23 15 C 23 18.613281 20.289063 21.582031 16.78125 21.96875 C 16.761719 21.972656 16.738281 21.964844 16.71875 21.96875 C 16.480469 21.980469 16.242188 22 16 22 C 15.734375 22 15.476563 21.984375 15.21875 21.96875 C 11.710938 21.582031 9 18.613281 9 15 C 9 13.695313 9.351563 12.480469 9.96875 11.4375 L 9.9375 11.4375 C 11.71875 10.617188 13.773438 10 16 10 Z M 16 12 C 14.34375 12 13 13.34375 13 15 C 13 16.65625 14.34375 18 16 18 C 17.65625 18 19 16.65625 19 15 C 19 13.34375 17.65625 12 16 12 Z M 7.25 12.9375 C 7.09375 13.609375 7 14.285156 7 15 C 7 16.753906 7.5 18.394531 8.375 19.78125 C 5.855469 18.324219 4.105469 16.585938 3.53125 16 C 4.011719 15.507813 5.351563 14.203125 7.25 12.9375 Z M 24.75 12.9375 C 26.648438 14.203125 27.988281 15.507813 28.46875 16 C 27.894531 16.585938 26.144531 18.324219 23.625 19.78125 C 24.5 18.394531 25 16.753906 25 15 C 25 14.285156 24.90625 13.601563 24.75 12.9375 Z"}))}function wv({activity:e,forceWhite:t,forceLeftMargin:n}){let r=Lt();return o(W,{text:"Toggle activity"},({onMouseLeave:i,onMouseEnter:s})=>o("div",{onMouseLeave:i,onMouseEnter:s,className:hr.overlayToggleIcon,role:"button","aria-label":"Toggle activity",tabIndex:0,style:n?{marginLeft:"2px"}:void 0,onClick:l=>W2(l,e,r)},Vt.has(e.id)?o(H2,null):o(z2,{forceWhite:t})))}function j2({activity:e}){return o("div",{className:`${U2.tryItOutBadge} ${G2.baseShapeRound}`,style:{padding:"0px 2px",height:28}},o(wv,
2023-07-11 23:04:56 -04:00
position: absolute;
2023-07-11 23:21:30 -04:00
inset: 0;
z-index: 9999;
border: 2px solid grey;
border-radius: 50%;
overflow: hidden;
cursor: none;
box-shadow: inset 0 0 10px 2px grey;
filter: drop-shadow(0 0 2px grey);
pointer-events: none;
2023-07-11 23:04:56 -04:00
}
2023-07-11 23:21:30 -04:00
.vc-imgzoom-square {
border-radius: 0;
2023-07-11 23:04:56 -04:00
}
2023-07-11 23:21:30 -04:00
.vc-imgzoom-nearest-neighbor > img {
image-rendering: pixelated; /* https://googlechrome.github.io/samples/image-rendering-pixelated/index.html */
2023-07-11 23:04:56 -04:00
}
2023-07-11 23:21:30 -04:00
/* make the carousel take up less space so we can click the backdrop and exit out of it */
[class|="carouselModal"] {
height: fit-content;
box-shadow: none;
2023-07-11 23:04:56 -04:00
}
2023-07-11 23:21:30 -04:00
[class*="modalCarouselWrapper"] {
height: fit-content;
top: 50%;
transform: translateY(-50%);
2023-07-11 23:04:56 -04:00
}
2023-07-11 23:21:30 -04:00
[class|="wrapper"]:has(> #vc-imgzoom-magnify-modal) {
2023-07-11 23:04:56 -04:00
position: absolute;
left: 50%;
2023-07-11 23:21:30 -04:00
top: 50%;
2023-07-11 23:04:56 -04:00
transform: translate(-50%, -50%);
}
2023-07-11 23:21:30 -04:00
`,classNames:{},dom:null});sp="src/plugins/imageZoom/styles.css"});var xe,Nv,ap,ip=m(()=>{"use strict";a();Pt();D();Ge();Hs();w();nr();b();T();Iv();np();Cv();xe=k({saveZoomValues:{type:3,description:"Whether to save zoom and lens size values",default:!0},preventCarouselFromClosingOnClick:{type:3,description:"Allow the image modal in the image slideshow thing / carousel to remain open when clicking on the image",default:!0},invertScroll:{type:3,description:"Invert scroll",default:!0},nearestNeighbour:{type:3,description:"Use Nearest Neighbour Interpolation when scaling images",default:!1},square:{type:3,description:"Make the lens square",default:!1},zoom:{description:"Zoom of the lens",type:5,markers:mr(1,50,4),default:2,stickToMarkers:!1},size:{description:"Radius / Size of the lens",type:5,markers:mr(50,1e3,50),default:100,stickToMarkers:!1},zoomSpeed:{description:"How fast the zoom / lens size changes",type:5,markers:mr(.1,5,.2),default:.5,stickToMarkers:!1}}),Nv=e=>()=>{e.push(o(L.MenuGroup,{id:"image-zoom"},o(L.MenuCheckboxItem,{id:"vc-square",label:"Square Lens",checked:xe.store.square,action:()=>{xe.store.square=!xe.store.square,cn.close()}}),o(L.MenuControlItem,{id:"vc-zoom",label:"Zoom",control:(t,n)=>o(L.MenuSliderControl,{ref:n,...t,minValue:1,maxValue:50,value:xe.store.zoom,onChange:At(r=>xe.store.zoom=r,100)})}),o(L.MenuControlItem,{id:"vc-size",label:"Lens Size",control:(t,n)=>o(L.MenuSliderControl,{ref:n,...t,minValue:50,maxValue:1e3,value:xe.store.size,onChange:At(r=>xe.store.size=r,100)})}),o(L.MenuControlItem,{id:"vc-zoom-speed",label:"Zoom Speed",control:(t,n)=>o(L.MenuSliderControl,{ref:n,...t,minValue:.1,maxValue:5,value:xe.store.zoomSpeed,onChange:At(r=>xe.store.zoomSpeed=r,100),renderValue:r=>`${r.toFixed(3)}x`})})))},ap=g({name:"ImageZoom",description:"Lets you zoom in to images and gifs. Use scroll wheel to zoom in and shift + scroll wheel to increase lens radius / size",authors:[p.Aria],tags:["ImageUtilities"],patches:[{find:'"renderLinkComponent","maxWidth"',replacement:{match:/(return\(.{1,100}\(\)\.wrapper.{1,100})(src)/,replace:`$1id: '${yi}',$2`}},{find:"handleImageLoad=",replacement:[{match:/(render=function\(\){.{1,500}limitResponsiveWidth.{1,600})onMouseEnter:/,replace:"$1...$self.makeProps(this),onMouseEnter:"},{match:/componentDidMount=function\(\){/,replace:"$&$self.renderMagnifier(this);"},{match:/componentWillUnmount=function\(\){/,replace:"$&$self.unMountMagnifier();"}]},{find:".carouselModal,",replacement:{match:/onClick:(\i),/,replace:"onClick:$self.settings.store.preventCarouselFromClosingOnClick ? () => {} : $1,"}}],settings:xe,currentMagnifierElement:null,element:null,Magnifier:rp,root:null,makeProps(e){return{onMouseOver:()=>this.onMouseOver(e),onMouseOut:()=>this.onMouseOut(e),onMouseDown:t=>this.onMouseDown(t,e),onMouseUp:()=>this.onMouseUp(e),id:e.props.id}},renderMagnifier(e){e.props.id===yi&&(this.currentMagnifierElement||(this.currentMagnifierElement=o(rp,{size:xe.store.size,zoom:xe.store.zoom,instance:e}),this.root=_o.createRoot(this.element),this.root.render(this.currentMagnifierElement)))},unMountMagnifier(){this.root?.unmount(),this.currentMagnifierElement=null,this.root=null},onMouseOver(e){e.setState(t=>({...t,mouseOver:!0}))},onMouseOut(e){e.setState(t=>({...t,mouseOver:!1}))},onMouseDown(e,t){e.button===0&&t.setState(n=>({...n,mouseDown:!0}))},onMouseUp(e){e.setState(t=>({...t,mouseDown:!1}))},start(){Je(sp),pe("image-context",Nv),this.element=document.createElement("div"),this.element.classList.add("MagnifierContainer"),document.body.appendChild(this.element)},stop(){Mt(sp),this.root&&this.root.unmount(),this.element?.remove(),de("image-context",Nv)}})});function K2(e){let t=e?.message?.content,[n,r]=I.useState("password");return o(Le,{...e},o($e,null,o(v.FormTitle,{tag:"h4"},"Decrypt Message")),o(Ue,null,o(v.FormTitle,{tag:"h5",style:{marginTop:"10px"}},"Secret"),o(Re,{defaultValue:t,disabled:!0}),o(v.FormTitle,{tag:"h5"},"Password"),o(Re,{style:{marginBottom:"20px"},onChange:r})),o(Tt,null,o(N,{color:N.Colors.GREEN,onClick:()=>{let i=lp(t,n,!0);!i||!e?.messag
background-color: rgba(240 71 71 / 15%) !important;
2023-07-11 23:04:56 -04:00
}
2023-07-11 23:21:30 -04:00
`,classNames:{},dom:null});Pp="src/plugins/messageLogger/deleteStyleOverlay.css"});var Mp,Vv=m(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/messageLogger/deleteStyleText.css",{name:"src/plugins/messageLogger/deleteStyleText.css",source:`/* Message content highlighting */
.messagelogger-deleted [class*="contents-"] > :is(div, h1, h2, h3, p) {
color: #f04747 !important;
2023-07-11 23:04:56 -04:00
}
2023-07-11 23:21:30 -04:00
/* Embed highlighting */
.messagelogger-deleted article :is(div, span, h1, h2, h3, p) {
color: #f04747 !important;
2023-07-11 23:04:56 -04:00
}
2023-07-11 23:21:30 -04:00
.messagelogger-deleted a {
color: #be3535 !important;
2023-07-11 23:04:56 -04:00
text-decoration: underline;
}
2023-07-11 23:21:30 -04:00
`,classNames:{},dom:null});Mp="src/plugins/messageLogger/deleteStyleText.css"});function e1(){M.plugins.MessageLogger.deleteStyle==="text"?(Je(Mp),Mt(Pp)):(Mt(Mp),Je(Pp))}var SP,t1,n1,o1,Ip,r1=m(()=>{"use strict";a();Jv();Pt();D();Ge();ie();w();be();b();O();T();Qv();Vv();SP=P("edited","communicationDisabled","isSystemMessage");t1="ml-remove-history",n1="ml-toggle-style",o1=(e,t)=>()=>{let{message:n}=t,{deleted:r,editHistory:i,id:s,channel_id:l}=n;if(!r&&!i?.length)return;e:{if(!r)break e;let c=document.getElementById(`chat-messages-${l}-${s}`);if(!c)break e;e.push(o(L.MenuItem,{id:n1,key:n1,label:"Toggle Deleted Highlight",action:()=>c.classList.toggle("messagelogger-deleted")}))}e.push(o(L.MenuItem,{id:t1,key:t1,label:"Remove Message History",color:"danger",action:()=>{r?E.dispatch({type:"MESSAGE_DELETE",channelId:l,id:s,mlDeleted:!0}):n.editHistory=[]}}))},Ip=g({name:"MessageLogger",description:"Temporarily logs deleted and edited messages.",authors:[p.rushii,p.Ven],start(){e1(),pe("message",o1)},stop(){de("message",o1)},renderEdit(e){return o(A,{noop:!0},o("div",{className:"messagelogger-edited"},Ie.parse(e.content),o(kn,{timestamp:e.timestamp,isEdited:!0,isInline:!1},o("span",{className:SP.edited}," ","(",it.Messages.MESSAGE_EDITED,")"))))},makeEdit(e,t){return{timestamp:Jt?.call(e.edited_timestamp),content:t.content}},options:{deleteStyle:{type:4,description:"The style of deleted messages",default:"text",options:[{label:"Red text",value:"text",default:!0},{label:"Red overlay",value:"overlay"}],onChange:()=>e1()},ignoreBots:{type:3,description:"Whether to ignore messages by bots",default:!1},ignoreSelf:{type:3,description:"Whether to ignore messages by yourself",default:!1},ignoreUsers:{type:0,description:"Comma-separated list of user IDs to ignore",default:""}},handleDelete(e,t,n){try{let u=function(h){let f=e.get(h);if(!f)return;let y=64;t.mlDeleted||(f.flags&y)===y||i&&f.author?.bot||s&&f.author?.id===c||l.includes(f.author?.id)?e=e.remove(h):e=e.update(h,x=>x.set("deleted",!0).set("attachments",x.attachments.map(R=>(R.deleted=!0,R))))};var r=u;if(e==null||!n&&!e.has(t.id))return e;let{ignoreBots:i,ignoreSelf:s,ignoreUsers:l}=M.plugins.MessageLogger,c=F.getCurrentUser().id;n?t.ids.forEach(u):u(t.id)}catch(i){new Y("MessageLogger").error("Error during handleDelete",i)}return e},patches:[{find:'displayName="MessageStore"',replacement:[{match:/MESSAGE_DELETE:function\((\w)\){var .+?((?:\w{1,2}\.){2})getOrCreate.+?},/,replace:"MESSAGE_DELETE:function($1){ var cache = $2getOrCreate($1.channelId); cache = $self.handleDelete(cache, $1, false); $2commit(cache);},"},{match:/MESSAGE_DELETE_BULK:function\((\w)\){var .+?((?:\w{1,2}\.){2})getOrCreate.+?},/,replace:"MESSAGE_DELETE_BULK:function($1){ var cache = $2getOrCreate($1.channelId); cache = $self.handleDelete(cache, $1, true); $2commit(cache);},"},{match:/(MESSAGE_UPDATE:function\((\w)\).+?)\.update\((\w)/,replace:"$1.update($3,m => (($2.message.flags & 64) === 64 || (Vencord.Settings.plugins.MessageLogger.ignoreBots && $2.message.author?.bot) || (Vencord.Settings.plugins.MessageLogger.ignoreSelf && $2.message.author?.id === Vencord.Webpack.Common.UserStore.getCurrentUser().id)) ? m : $2.message.content !== m.editHistory?.[0]?.content && $2.message.content !== m.content ? m.set('editHistory',[...(m.editHistory || []), $self.makeEdit($2.message, m)]) : m).update($3"},{match:/(?<=getLastEditableMessage=.{0,200}\.find\(\(function\((\i)\)\{)return/,replace:"return !$1.deleted &&"}]},{find:"isFirstMessageInForumPost=function",replacement:[{match:/(\w)\.customRenderedContent=(\w)\.customRenderedContent;/,replace:"$1.customRenderedContent = $2.customRenderedContent;$1.deleted = $2.deleted || false;$1.editHistory = $2.editHistory || [];"}]},{find:"THREAD_STARTER_MESSAGE?null===",replacement:[{match:/interactionData:(\w)\.interactionData/,replace:"interactionData:$1.interactionData,deleted:$1.deleted,editHistory:$1.editHistory,attachments:$1.attachments"},{match:/attachments:(\w{1,2})\((\w)\)/,replace:"attachments: $1((() => { let old = arguments[1]
`)}):(oe(n.channel.id,{author:Bn,content:`${xo} The tag **${e.name}** does not exist anymore! Please reload ur Discord to fix :)`}),{content:`/${e.name}`}),[bP]:!0},"CustomTags")}var xo,pa,bP,Bn,ua,ca,TP,xP,Cp,s1=m(()=>{"use strict";a();_t();Cn();D();w();b();xo="<:luna:1035316192220553236>",pa="MessageTags_TAGS",bP=Symbol("MessageTags"),Bn={id:"821472922140803112",bot:!1},ua=()=>Qe(pa).then(e=>e??[]),ca=e=>Qe(pa).then(t=>(t??[]).find(n=>n.name===e)??null),TP=async e=>{let t=await ua();return t.push(e),Ve(pa,t),t},xP=async e=>{let t=await ua();return t=await t.filter(n=>n.name!==e),Ve(pa,t),t};Cp=g({name:"MessageTags",description:"Allows you to save messages and to use them with a simple command.",authors:[p.Luna],options:{clyde:{name:"Clyde message on send",description:"If enabled, clyde will send you an ephemeral message when a tag was used.",type:3,default:!0}},dependencies:["CommandsAPI"],async start(){for(let e of await ua())i1(e)},commands:[{name:"tags",description:"Manage all the tags for yourself",inputType:0,options:[{name:"create",description:"Create a new tag",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0},{name:"message",description:"The message that you will send when using this tag",type:3,required:!0}]},{name:"list",description:"List all tags from yourself",type:1,options:[]},{name:"delete",description:"Remove a tag from your yourself",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0}]},{name:"preview",description:"Preview a tag without sending it publicly",type:1,options:[{name:"tag-name",description:"The name of the tag to trigger the response",type:3,required:!0}]}],async execute(e,t){switch(e[0].name){case"create":{let n=Oe(e[0].options,"tag-name",""),r=Oe(e[0].options,"message","");if(await ca(n))return oe(t.channel.id,{author:Bn,content:`${xo} A Tag with the name **${n}** already exists!`});let i={name:n,enabled:!0,message:r};i1(i),await TP(i),oe(t.channel.id,{author:Bn,content:`${xo} Successfully created the tag **${n}**!`});break}case"delete":{let n=Oe(e[0].options,"tag-name","");if(!await ca(n))return oe(t.channel.id,{author:Bn,content:`${xo} A Tag with the name **${n}** does not exist!`});li(n),await xP(n),oe(t.channel.id,{author:Bn,content:`${xo} Successfully deleted the tag **${n}**!`});break}case"list":{oe(t.channel.id,{author:Bn,embeds:[{title:"All Tags:",description:(await ua()).map(n=>`\`${n.name}\`: ${n.message.slice(0,72).replaceAll("\\n"," ")}${n.message.length>72?"...":""}`).join(`
`)||`${xo} Woops! There are no tags yet, use \`/tags create\` to create one!`,color:14122879,type:"rich"}]});break}case"preview":{let n=Oe(e[0].options,"tag-name",""),r=await ca(n);if(!r)return oe(t.channel.id,{author:Bn,content:`${xo} A Tag with the name **${n}** does not exist!`});oe(t.channel.id,{author:Bn,content:r.message.replaceAll("\\n",`
`)});break}default:{oe(t.channel.id,{author:Bn,content:"Invalid sub-command"});break}}}}]})});function wP(e){let t="";for(let n=0;n<e.length;n++)t+=n%2?e[n].toUpperCase():e[n].toLowerCase();return t}var Np,a1=m(()=>{"use strict";a();_t();w();b();Np=g({name:"MoreCommands",description:"echo, lenny, mock",authors:[p.Arjix,p.echo,p.Samu],dependencies:["CommandsAPI"],commands:[{name:"echo",description:"Sends a message as Clyde (locally)",options:[So],inputType:3,execute:(e,t)=>{let n=Oe(e,"message","");oe(t.channel.id,{content:n})}},{name:"lenny",description:"Sends a lenny face",options:[So],execute:e=>({content:Oe(e,"message","")+" ( \u0361\xB0 \u035C\u0296 \u0361\xB0)"})},{name:"mock",description:"mOcK PeOpLe",options:[Ho],execute:e=>({content:wP(Oe(e,"message",""))})}]})});var kp,l1=m(()=>{"use strict";a();_t();w();b();kp=g({name:"MoreKaomoji",description:"Adds more Kaomoji to discord. \u30FD(\xB4\u25BD`)/",authors:[p.JacobTm],dependencies:["CommandsAPI"],commands:[{name:"dissatisfaction",description:" \uFF1E\uFE4F\uFF1C"},{name:"smug",description:" \u0CA0_\u0CA0"},{name:"happy",description:" \u30FD(\xB4\u25BD`)/"},{name:"crying",description:" \u0CA5_\u0CA5"},{name:"angry",description:" \u30FD(\uFF40\u0414\xB4)\uFF89"},{name:"anger",description:" \u30FD(\uFF4F`\u76BF\u2032\uFF4F)\uFF89"},{name:"joy",description:" <(\uFFE3\uFE36\uFFE3)>"},{name:"blush",description:"\u0AEE \u02F6\u1D54 \u1D55 \u1D54\u02F6 \u10D0"},{name:"confused",description:"(\u2022\u0E34_\u2022\u0E34)?"},{name:"sleeping",description:"(\u1D17_\u1D17)"},{name:"laughing",description:"o(\u2267\u25BD\u2266)o"}].map(e=>({...e,options:[So],execute:t=>({content:Oe(t,"message","")+e.description})}))})});function CP(e){wo.store.tagSettings??=Rp;let[t,n]=V(wo.store.tagSettings),r=i=>{n(i),e.setValue(i)};return o(le,{flexDirection:"column"},vr.map(i=>o(Et,{style:{padding:"1em 1em 0"}},o(v.FormTitle,{style:{width:"fit-content"}},o(W,{text:i.description},({onMouseEnter:s,onMouseLeave:l})=>o("div",{onMouseEnter:s,onMouseLeave:l},i.displayName," Tag ",o(Vn,{type:Vn.Types[i.name]})))),o(Re,{type:"text",value:t[i.name]?.text??i.displayName,placeholder:`Text on tag (default: ${i.displayName})`,onChange:s=>{t[i.name].text=s,r(t)},className:G.bottom16}),o(ft,{value:t[i.name]?.showInChat??!0,onChange:s=>{t[i.name].showInChat=s,r(t)},hideBorder:!0},"Show in messages"),o(ft,{value:t[i.name]?.showInNotChat??!0,onChange:s=>{t[i.name].showInNotChat=s,r(t)},hideBorder:!0},"Show in member list and profiles"))))}var PP,MP,IP,Vn,c1,vr,Rp,wo,Ap,u1=m(()=>{"use strict";a();D();wt();w();Xe();b();O();T();PP="1081004946872352958",MP=P("computePermissions","canEveryoneRole"),IP=P("SEND_MESSAGES","VIEW_CREATOR_MONETIZATION_ANALYTICS"),Vn=ke(e=>e.Types?.[0]==="BOT"),c1=(e,t)=>!!e?.webhookId&&t.isNonUserBot(),vr=[{name:"WEBHOOK",displayName:"Webhook",description:"Messages sent by webhooks",condition:c1},{name:"OWNER",displayName:"Owner",description:"Owns the server",condition:(e,t,n)=>ue.getGuild(n?.guild_id)?.ownerId===t.id},{name:"ADMINISTRATOR",displayName:"Admin",description:"Has the administrator permission",permissions:["ADMINISTRATOR"]},{name:"MODERATOR_STAFF",displayName:"Staff",description:"Can manage the server, channels or roles",permissions:["MANAGE_GUILD","MANAGE_CHANNELS","MANAGE_ROLES"]},{name:"MODERATOR",displayName:"Mod",description:"Can manage messages or kick/ban people",permissions:["MANAGE_MESSAGES","KICK_MEMBERS","BAN_MEMBERS"]},{name:"VOICE_MODERATOR",displayName:"VC Mod",description:"Can manage voice chats",permissions:["MOVE_MEMBERS","MUTE_MEMBERS","DEAFEN_MEMBERS"]}],Rp=Object.fromEntries(vr.map(({name:e,displayName:t})=>[e,{text:t,showInChat:!0,showInNotChat:!0}]));wo=k({dontShowForBots:{description:"Don't show extra tags for bots (excluding webhooks)",type:3},dontShowBotTag:{description:"Only show extra tags for bots / Hide [BOT] text",type:3},tagSettings:{type:6,component:CP,description:"fill me"}}),Ap=g({name:"MoreUserTags",description:"Adds tags for webhooks and moderative roles (owner, admin, etc.)",authors:[p.Cyn,p.TheSun,p.RyanCaoDev,p.LordElias],settings:wo,pa
`,s),"Failed to fetch user. Check the console for more info."}}return null}var U1,JP,QP,ya,VP,eM,tM,nM,nd,H1=m(()=>{"use strict";a();_t();w();mi();sn();b();O();U1=0,JP=20,QP=128,ya=10,VP=$n(()=>Promise.all(Array.from({length:ya},(e,t)=>G1(`https://raw.githubusercontent.com/VenPlugs/petpet/main/frames/pet${t}.gif`)))),eM=ce(".USER("),tM=ce("UPLOAD_FILE_LIMIT_ERROR"),nM=P("getUploads");nd=g({name:"petpet",description:"Adds a /petpet slash command to create headpet gifs from any image",authors:[p.Ven],dependencies:["CommandsAPI"],commands:[{inputType:0,name:"petpet",description:"Create a petpet gif. You can only specify one of the image options",options:[{name:"delay",description:"The delay between each frame. Defaults to 20.",type:4},{name:"resolution",description:"Resolution for the gif. Defaults to 120. If you enter an insane number and it freezes Discord that's your fault.",type:4},{name:"image",description:"Image attachment to use",type:11},{name:"url",description:"URL to fetch image from",type:3},{name:"user",description:"User whose avatar to use as image",type:6},{name:"no-server-pfp",description:"Use the normal avatar instead of the server specific one when using the 'user' option",type:5}],execute:async(e,t)=>{let{GIFEncoder:n,quantize:r,applyPalette:i}=await ta(),s=await VP(),l=Oe(e,"no-server-pfp",!1);try{var c=await oM(e,t,l);if(!c)throw"No Image specified!"}catch(C){oe(t.channel.id,{content:String(C)});return}let u=await G1(c),h=Oe(e,"delay",JP),f=Oe(e,"resolution",QP),y=new n,S=document.createElement("canvas");S.width=S.height=f;let x=S.getContext("2d");for(let C=0;C<ya;C++){x.clearRect(0,0,S.width,S.height);let _=C<ya/2?C:ya-C,$=.8+_*.02,B=.8-_*.05,q=(1-$)*.5+.1,ee=1-B-.08;x.drawImage(u,q*f,ee*f,$*f,B*f),x.drawImage(s[C],0,0,f,f);let{data:j}=x.getImageData(0,0,f,f),z=r(j,256),te=i(j,z);y.writeFrame(te,f,f,{transparent:!0,palette:z,delay:h})}y.finish();let R=new File([y.bytesView()],"petpet.gif",{type:"image/gif"});setTimeout(()=>tM([R],t.channel,U1),10)}}]})});function W1(){return st(["plugins.PinDMs.pinnedDMs"]),va()}function br(e){return va().has(e)}function q1(e){let t=va();t.delete(e)||t.add(e),j1([...t])}function rd(){return va(),Mi.store.pinOrder===0?rM.getPrivateChannelIds().filter(br):Fn}function K1(e){return rd()[e]}function id(e,t){let n=z1(),r=n.indexOf(e),i=r+t;[n[r],n[i]]=[n[i],n[r]],j1(n)}var Mi,rM,Fn,od,z1,j1,iM,va,sd=m(()=>{"use strict";a();D();b();O();Mi=k({pinOrder:{type:4,description:"Which order should pinned DMs be displayed in?",options:[{label:"Most recent message",value:0,default:!0},{label:"Custom (right click channels to reorder)",value:1}]}}),rM=ae("PrivateChannelSortStore"),z1=()=>(M.plugins.PinDMs.pinnedDMs||void 0)?.split(","),j1=e=>{od=void 0,M.plugins.PinDMs.pinnedDMs=e.join(",")},iM=()=>(Fn=z1()??[],od=new Set(Fn)),va=()=>od??iM()});function Y1(e){let t=br(e),n=t&&Mi.store.pinOrder===1;return o(d,null,o(L.MenuItem,{id:"pin-dm",label:t?"Unpin DM":"Pin DM",action:()=>q1(e)}),n&&Fn[0]!==e&&o(L.MenuItem,{id:"move-pin-up",label:"Move Pin Up",action:()=>id(e,-1)}),n&&Fn[Fn.length-1]!==e&&o(L.MenuItem,{id:"move-pin-down",label:"Move Pin Down",action:()=>id(e,1)}))}function J1(){pe("gdm-context",Z1),pe("user-context",X1)}function Q1(){de("gdm-context",Z1),de("user-context",X1)}var Z1,X1,V1=m(()=>{"use strict";a();Pt();T();sd();Z1=(e,t)=>()=>{let n=nt("leave-channel",e);n&&n.unshift(Y1(t.channel.id))},X1=(e,t)=>()=>{let n=nt("close-dm",e);if(n){let r=n.findIndex(i=>i?.props?.id==="close-dm");n.splice(r,0,Y1(t.channel.id))}}});var ad,eS=m(()=>{"use strict";a();w();b();V1();sd();ad=g({name:"PinDMs",description:"Allows you to pin private channels to the top of your DM list. To pin/unpin or reorder pins, right click DMs",authors:[p.Ven,p.Strencher],settings:Mi,start:J1,stop:Q1,usePinCount(e){let t=W1();return e.length?[t.size]:[]},getChannel(e,t){return e[K1(t)]},isPinned:br,getSnapshot:rd,getScrollOffset(e,t,n,r,i){return br(e)?t*(Fn.indexOf(e)+r)+n:(t+n)*2+t*Fn.length+i},patches:[{find:".privateChannelsHeaderContainer,",replacement:[{match:/privateChannelIds:(\i),/,replace:"privateChann
`,e))},stop(){Cd=void 0},decodeError(e,...t){let n=0;return Cd?.[e]?.replace(/%s/g,()=>{let r=t[n];return n++,r})}})});var Rd={};ge(Rd,{ServerListRenderPosition:()=>ka,addServerListElement:()=>Ii,removeServerListElement:()=>Ci,renderAll:()=>AM});function kd(e){return e===0?kM:RM}function Ii(e,t){kd(e).add(t)}function Ci(e,t){kd(e).delete(t)}var NM,ka,kM,RM,AM,Ra=m(()=>{"use strict";a();be();NM=new Y("ServerListAPI"),ka=(n=>(n[n.Above=0]="Above",n[n.In=1]="In",n))(ka||{}),kM=new Set,RM=new Set;AM=e=>{let t=[];for(let n of kd(e))try{t.unshift(n())}catch(r){NM.error("Failed to render server list element:",r)}return t}});function LM(){let e=[];Object.values(ue.getGuilds()).forEach(t=>{ms.getChannels(t.id).SELECTABLE.forEach(n=>{!$r.hasUnread(n.channel.id)||e.push({channelId:n.channel.id,messageId:$r.lastMessageId(n.channel.id),readStateType:0})})}),E.dispatch({type:"BULK_ACK",context:"APP",channels:e})}var EM,Ad,AS=m(()=>{"use strict";a();Ra();w();b();T();EM=()=>o(N,{onClick:LM,size:N.Sizes.MIN,color:N.Colors.BRAND,style:{marginTop:"2px",marginBottom:"8px",marginLeft:"9px"}},"Read all"),Ad=g({name:"ReadAllNotificationsButton",description:"Read all server notifications with a single button click!",authors:[p.kemo],dependencies:["ServerListAPI"],renderReadAllButton:()=>o(EM,null),start(){Ii(0,this.renderReadAllButton)},stop(){Ci(0,this.renderReadAllButton)}})});var Bt,Aa=m(()=>{"use strict";a();D();b();Bt=k({notices:{type:3,description:"Also show a notice at the top of your screen when removed (use this if you don't want to miss any notifications).",default:!1},offlineRemovals:{type:3,description:"Notify you when starting discord if you were removed while offline.",default:!0},friends:{type:3,description:"Notify when a friend removes you",default:!0},friendRequestCancels:{type:3,description:"Notify when a friend request is cancelled",default:!0},servers:{type:3,description:"Notify when removed from a server",default:!0},groups:{type:3,description:"Notify when removed from a group chat",default:!0}})});var Ld=m(()=>{"use strict";a()});async function _M(){Nt.delMany(["relationship-notifier-guilds","relationship-notifier-groups","relationship-notifier-friends"])}async function Ed(){await _M();let[e,t,n]=await Nt.getMany([LS(),ES(),DS()]);if(await Promise.all([Ea(),Da(),Ni()]),Bt.store.offlineRemovals){if(Bt.store.groups&&t?.size)for(let[r,i]of t)wr.has(r)||to(`You are no longer in the group ${i.name}.`,i.iconURL);if(Bt.store.servers&&e?.size)for(let[r,i]of e)xr.has(r)||to(`You are no longer in the server ${i.name}.`,i.iconURL);if(Bt.store.friends&&n?.friends.length)for(let r of n.friends){if(Xo.friends.includes(r))continue;let i=await Rn.fetchUser(r).catch(()=>{});i&&to(`You are no longer friends with ${zn(i)}.`,i.getAvatarURL(void 0,void 0,!1),()=>mn(i.id))}if(Bt.store.friendRequestCancels&&n?.requests?.length)for(let r of n.requests){if(Xo.requests.includes(r)||[1,2,4].includes(et.getRelationshipType(r)))continue;let i=await Rn.fetchUser(r).catch(()=>{});i&&to(`Friend request from ${zn(i)} has been revoked.`,i.getAvatarURL(void 0,void 0,!1),()=>mn(i.id))}}}function to(e,t,n){Bt.store.notices&&La.showNotice(e,"OK",()=>La.popNotice()),he({title:"Relationship Notifier",body:e,icon:t,onClick:n})}function OS(e){return xr.get(e)}function Dd(e){xr.delete(e),Ea()}async function Ea(){xr.clear();let e=F.getCurrentUser().id;for(let[t,{name:n,icon:r}]of Object.entries(ue.getGuilds()))Ae.isMember(t,e)&&xr.set(t,{id:t,name:n,iconURL:r&&`https://cdn.discordapp.com/icons/${t}/${r}.png`});await Nt.set(LS(),xr)}function _S(e){return wr.get(e)}function Od(e){wr.delete(e),Da()}async function Da(){wr.clear();for(let{type:e,id:t,name:n,rawRecipients:r,icon:i}of Z.getSortedPrivateChannels())e===3&&wr.set(t,{id:t,name:n||r.map(s=>s.username).join(", "),iconURL:i&&`https://cdn.discordapp.com/channel-icons/${t}/${i}.png`});await Nt.set(ES(),wr)}async function Ni(){Xo.friends=[],Xo.requests=[];let e=et.getRelationships();for(let t in e)switch(e[t]){case 1:Xo.friends.push(t);break;case 3:Xo.requests.push(t);break}await Nt.set(DS(),Xo)}var xr,wr,Xo,LS,ES,
import React from "react";
const handleClick = async () =>
console.log((await import("@webpack/common")).Clipboard.copy("\\u200b"));
export const Example: React.FC<{
real: boolean,
shigged?: number,
}> = ({ real, shigged }) => <>
<p>{\`Shigg\${real ? \`ies\${shigged === 0x1B ? "t" : ""}\` : "y"}\`}</p>
<button onClick={handleClick}>Click Me</button>
</>;
`});var I0=Lr((aW,nm)=>{"use strict";a();var YM=Object.prototype.hasOwnProperty,kt="~";function Oi(){}Object.create&&(Oi.prototype=Object.create(null),new Oi().__proto__||(kt=!1));function ZM(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function M0(e,t,n,r,i){if(typeof n!="function")throw new TypeError("The listener must be a function");var s=new ZM(n,r||e,i),l=kt?kt+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function $a(e,t){--e._eventsCount===0?e._events=new Oi:delete e._events[t]}function gt(){this._events=new Oi,this._eventsCount=0}gt.prototype.eventNames=function(){var t=[],n,r;if(this._eventsCount===0)return t;for(r in n=this._events)YM.call(n,r)&&t.push(kt?r.slice(1):r);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(n)):t};gt.prototype.listeners=function(t){var n=kt?kt+t:t,r=this._events[n];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,s=r.length,l=new Array(s);i<s;i++)l[i]=r[i].fn;return l};gt.prototype.listenerCount=function(t){var n=kt?kt+t:t,r=this._events[n];return r?r.fn?1:r.length:0};gt.prototype.emit=function(t,n,r,i,s,l){var c=kt?kt+t:t;if(!this._events[c])return!1;var u=this._events[c],h=arguments.length,f,y;if(u.fn){switch(u.once&&this.removeListener(t,u.fn,void 0,!0),h){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,n),!0;case 3:return u.fn.call(u.context,n,r),!0;case 4:return u.fn.call(u.context,n,r,i),!0;case 5:return u.fn.call(u.context,n,r,i,s),!0;case 6:return u.fn.call(u.context,n,r,i,s,l),!0}for(y=1,f=new Array(h-1);y<h;y++)f[y-1]=arguments[y];u.fn.apply(u.context,f)}else{var S=u.length,x;for(y=0;y<S;y++)switch(u[y].once&&this.removeListener(t,u[y].fn,void 0,!0),h){case 1:u[y].fn.call(u[y].context);break;case 2:u[y].fn.call(u[y].context,n);break;case 3:u[y].fn.call(u[y].context,n,r);break;case 4:u[y].fn.call(u[y].context,n,r,i);break;default:if(!f)for(x=1,f=new Array(h-1);x<h;x++)f[x-1]=arguments[x];u[y].fn.apply(u[y].context,f)}}return!0};gt.prototype.on=function(t,n,r){return M0(this,t,n,r,!1)};gt.prototype.once=function(t,n,r){return M0(this,t,n,r,!0)};gt.prototype.removeListener=function(t,n,r,i){var s=kt?kt+t:t;if(!this._events[s])return this;if(!n)return $a(this,s),this;var l=this._events[s];if(l.fn)l.fn===n&&(!i||l.once)&&(!r||l.context===r)&&$a(this,s);else{for(var c=0,u=[],h=l.length;c<h;c++)(l[c].fn!==n||i&&!l[c].once||r&&l[c].context!==r)&&u.push(l[c]);u.length?this._events[s]=u.length===1?u[0]:u:$a(this,s)}return this};gt.prototype.removeAllListeners=function(t){var n;return t?(n=kt?kt+t:t,this._events[n]&&$a(this,n)):(this._events=new Oi,this._eventsCount=0),this};gt.prototype.off=gt.prototype.removeListener;gt.prototype.addListener=gt.prototype.on;gt.prefixed=kt;gt.EventEmitter=gt;typeof nm<"u"&&(nm.exports=gt)});var sm=Lr(Mr=>{"use strict";a();Object.defineProperty(Mr,"__esModule",{value:!0});Mr.Channel=Mr.ChannelPort=void 0;var XM=I0(),Ua="vapIpc",om=Symbol.for("vapIpc.edgeCreate"),rm=class{_pipes=new Map;_listeners=new Map;_createListenerMap(){return new Map}_emit(t,n,...r){for(let[i,s]of this._listeners.entries()){if(i===t)continue;let l=s.get(n);l&&l(...r)}}createPipe(t){let n=this.getPipe(t);if(n)return n;let r=this._createListenerMap();this._listeners.set(t,r);let i={emit:this._emit.bind(this,t),listen:(s,l)=>void r.set(s,l)};return this._pipes.set(t,i),i}getPipe(t){return this._pipes.get(t)??null}};Mr.ChannelPort=rm;var im=class{id;_edges=new Map;_callbacks=new Map;_callers=new Map;_edgePipes=new Map;_pipes=[];_emitter=new XM.EventEmitter;_logger;_destroyed=!1;constructor(t){this.id=t}addPipe(t){t.listen(`${Ua}:handshake`,n=>{this._handleHandshake(t,n)}),t.listen(`${Ua}:message`,n=>{this._handleMessage(t,n)}),this._pipes.push(t),this._logger?.log(`Adding pipe to channel "${this.id}"`)}setLogger(t){this._logger=t}_handleHandshake(t,n){if(this.id===n.id)return;this._logger?.log(`\u{1F91D} "${n.id}" -> "${this.id}" (edges: [${n.channelIds.join(", ")}])`);let r=this._edges.get(n.id);if(r){let i=n.channelIds.filter(s=>!r?.channelIds.includ
`,classNames:{},dom:null});Bi="src/plugins/shikiCodeblocks/devicon.css"});var Fi=m(()=>{"use strict";a()});var aI,Co,vm=m(()=>{"use strict";a();D();Ge();fe();Wn();b();_i();gm();ym();Fi();aI=Object.keys(oo),Co=k({theme:{type:4,description:"Default themes",options:aI.map(e=>({label:jn(_l(e)),value:oo[e],default:oo[e]===oo.DarkPlus})),onChange:se.setTheme},customTheme:{type:0,description:"A link to a custom vscode theme",placeholder:oo.MaterialCandy,onChange:e=>{se.setTheme(e||Co.store.theme)}},tryHljs:{type:4,description:"Use the more lightweight default Discord highlighter and theme.",options:[{label:"Never",value:"NEVER"},{label:"Prefer Shiki instead of Highlight.js",value:"SECONDARY",default:!0},{label:"Prefer Highlight.js instead of Shiki",value:"PRIMARY"},{label:"Always",value:"ALWAYS"}]},useDevIcon:{type:4,description:"How to show language icons on codeblocks",options:[{label:"Disabled",value:"DISABLED"},{label:"Colorless",value:"GREYSCALE",default:!0},{label:"Colored",value:"COLOR"}],onChange:e=>{e==="DISABLED"?Mt(Bi):Je(Bi)}},bgOpacity:{type:5,description:"Background opacity",markers:[0,20,40,60,80,100],default:100,componentProps:{stickToMarkers:!1,onValueRender:null}}},{theme:{disabled(){return!!this.store.customTheme}},customTheme:{isValid(e){if(!e)return!0;let t=vl(e);return t?t.pathname.endsWith(".json")?!0:"Must be a json file":"Must be a valid URL"}}})});function F0(e,t){let n=Co.use(e),[r,i]=I.useState(!1),s={...n,...t},l=s.customTheme||s.theme;if(t){let c=se.currentThemeUrl&&l&&l!==se.currentThemeUrl,u=Object.keys(t).length===0;r&&(!c||u)&&i(!1),!r&&c&&(i(!0),se.setTheme(l))}return{...s,isThemeLoading:l!==se.currentThemeUrl}}var $0=m(()=>{"use strict";a();T();_i();vm()});function U0(e){return e=e.slice(1),e.length<6&&(e=e.split("").map(t=>t+t).join("")),e.length===6&&(e+="ff"),e.length>6&&(e=e.slice(0,6)),e.split(/(..)/).filter(Boolean).map(t=>parseInt(t,16))}var G0=m(()=>{"use strict";a()});var wn,H0,$i=m(()=>{"use strict";a();Ge();T();Ha();Fi();wn=Ee("shiki-"),H0=({lang:e,tryHljs:t})=>{let n=e?Bo?.getLanguage?.(e):null,i=(e?Qo(e):null)?.name;switch(t){case"ALWAYS":return!0;case"PRIMARY":return!!n||e==="";case"SECONDARY":return!i&&!!n;case"NEVER":return!1;default:return!1}}});function z0(e){let[t,n]=I.useState(!1);function r(i){Kt.copy(i),n(!0),setTimeout(()=>{n(!1)},e)}return[t,r]}var j0=m(()=>{"use strict";a();T()});function W0({content:e,...t}){let[n,r]=z0(1e3);return o("button",{...t,style:{...t.style,cursor:n?"default":void 0},onClick:()=>r(e)},n?"Copied!":"Copy")}var q0=m(()=>{"use strict";a();j0()});function K0({content:e,theme:t}){let n=[];return Kt.SUPPORTS_COPY&&n.push(o(W0,{content:e,className:wn("btn"),style:{backgroundColor:t.accentBgColor,color:t.accentFgColor}})),o("div",{className:wn("btns")},n)}var Y0=m(()=>{"use strict";a();T();$i();q0()});var Z0,X0=m(()=>{"use strict";a();T();$i();Z0=({theme:e,useHljs:t,lang:n,content:r,tokens:i})=>{let s;if(t)try{let{value:c}=Bo.highlight(n,r,!0);s=c.split(`
`).map((u,h)=>o("span",{key:h,dangerouslySetInnerHTML:{__html:u}}))}catch{s=r.split(`
`).map(c=>o("span",null,c))}else s=(i??r.split(`
`).map(u=>[{color:e.plainColor,content:u}])).map(u=>u.length===0?o("span",null,`
`):o(d,null,u.map(({content:h,color:f,fontStyle:y},S)=>o("span",{key:S,style:{color:f,fontStyle:(y??0)&1?"italic":void 0,fontWeight:(y??0)&2?"bold":void 0,textDecoration:(y??0)&4?"underline":void 0}},h))));let l=s.map((c,u)=>o("tr",{key:u},o("td",{style:{color:e.plainColor}},u+1),o("td",null,c)));return o("table",{className:wn("table")},...l)}});function J0({langName:e,useDevIcon:t,shikiLang:n}){return e?o("div",{className:wn("lang")},t!=="DISABLED"&&n?.devicon&&o("i",{className:`${wn("devicon")} devicon-${n.devicon}${t==="COLOR"?" colored":""}`}),e):o(d,null)}var Q0=m(()=>{"use strict";a();Fi();$i()});var za,lI,V0=m(()=>{"use strict";a();ie();ve();T();Ha();_i();$0();fm();G0();$i();Y0();X0();Q0();za=e=>o("pre",{className:wn("container")},o(A,null,o(lI,{...e}))),lI=({lang:e,content:t,isPreview:n,tempSettings:r})=>{let{tryHljs:i,useDevIcon:s,bgOpacity:l}=F0(["tryHljs","useDevIcon","bgOpacity"],r),{id:c,theme:u}=A0(),h=e?Qo(e):null,f=H0({lang:e,tryHljs:i}),[y,S]=bl(!0),[x]=ot(async()=>!h||f||!S?null:await se.tokenizeCode(t,e),{fallbackValue:null,deps:[e,t,c,S]}),R={plainColor:u?.fg||"var(--text-normal)",accentBgColor:u?.colors?.["statusBar.background"]||(f?"#7289da":"#007BC8"),accentFgColor:u?.colors?.["statusBar.foreground"]||"#FFF",backgroundColor:u?.colors?.["editor.background"]||"var(--background-secondary)"},C;return e&&(C=f?Bo?.getLanguage?.(e)?.name:h?.name),o("div",{ref:y,className:wn("root",{plain:!C,preview:n}),style:{backgroundColor:f?R.backgroundColor:`rgba(${U0(R.backgroundColor).concat(l/100).join(", ")})`,color:R.plainColor}},o("code",null,o(J0,{langName:C,useDevIcon:s,shikiLang:h}),o(Z0,{theme:R,useHljs:f,lang:e,content:t,tokens:x}),!n&&o(K0,{content:t,theme:R})))}});var eb,tb,nb=m(()=>{"use strict";a();eb=new Map,tb=()=>{eb.forEach(e=>e.remove()),eb.clear()}});var Sm,ob=m(()=>{"use strict";a();x0();Ge();w();b();P0();_i();V0();ym();vm();Fi();nb();Sm=g({name:"ShikiCodeblocks",description:"Brings vscode-style codeblocks into Discord, powered by Shiki",authors:[p.Vap],patches:[{find:"codeBlock:{react:function",replacement:{match:/codeBlock:\{react:function\((\i),(\i),(\i)\)\{/,replace:"$&return $self.renderHighlighter($1,$2,$3);"}}],start:async()=>{Co.store.useDevIcon!=="DISABLED"&&Je(Bi),await se.init(Co.store.customTheme||Co.store.theme)},stop:()=>{se.destroy(),tb()},settingsAboutComponent:({tempSettings:e})=>za({lang:"tsx",content:w0,isPreview:!0,tempSettings:e}),settings:Co,shiki:se,createHighlighter:za,renderHighlighter:({lang:e,content:t})=>za({lang:e,content:t,isPreview:!1})})});var bm,rb=m(()=>{"use strict";a();w();b();bm=g({name:"ShowAllMessageButtons",description:"Always show all message buttons no matter if you are holding the shift key or not.",authors:[p.Nuckyz],patches:[{find:".Messages.MESSAGE_UTILITIES_A11Y_LABEL",replacement:{match:/isExpanded:(\i),(?<=,\1=\i&&(?=(!.+?)[,;]).+?)/,replace:"isExpanded:$2,"}}]})});var ib=m(()=>{});function ab(){let e=Fr(sb.colors.INTERACTIVE_MUTED).hex(),t=Fr(sb.colors.INTERACTIVE_ACTIVE).hex();return o(cI,{color:e,forcedIconColor:t,size:16,tooltipText:it.Messages.CONNECTION_VERIFIED})}var sb,cI,lb=m(()=>{"use strict";a();ve();O();T();sb=ke(e=>e.colors?.INTERACTIVE_MUTED?.css),cI=re(()=>ze(".CONNECTIONS_ROLE_OFFICIAL_ICON_TOOLTIP"))});function cb({id:e,theme:t}){let n=pI.getUserProfile(e);if(!n)return null;let r=n.connectedAccounts;return r?.length?o(uI,null,o(Q,{tag:"h2",variant:"eyebrow",style:{color:"var(--header-primary)"}},"Connections"),o(le,{style:{marginTop:"8px",gap:gI(ja.store.iconSpacing),flexWrap:"wrap"}},r.map(i=>o(vI,{connection:i,theme:t})))):null}function vI({connection:e,theme:t}){let n=mI.get(e.type),r=n.getPlatformUserUrl?.(e),i=o("img",{"aria-label":e.name,src:t==="light"?n.icon.lightSVG:n.icon.darkSVG,style:{width:ja.store.iconSize,height:ja.store.iconSize}}),s=r?Ys:hy;return o(W,{text:o("span",{className:"vc-sc-tooltip"},e.name,e.verified&&o(ab,null),o(s,{height:16,width:16})),key:e.id},l=>r?o("a",{...l,className:"vc-user-connection",href:r,target:"_blank",onClick:c=>{Vencord.Plugins.isPluginEnabled("OpenInApp")&&Vencord.Plugins.plugins.Open
return ${t}.type === 3 || ${t}.type === 4
? -Vencord.Plugins.plugins.SortFriendRequests.getSince(${t}.user)
: ${t}.comparator
}))`},{predicate:()=>M.plugins.SortFriendRequests.showDates,match:/(user:(\w{1,3}),.{10,30}),subText:(\w{1,3}),(.{10,30}userInfo}\))/,replace:(e,t,n,r,i)=>`${t},
subText: Vencord.Plugins.plugins.SortFriendRequests.makeSubtext(${r}, ${n}),
${i}`}]}],getSince(e){return new Date(et.getSince(e.id))},makeSubtext(e,t){let n=this.getSince(t);return o(le,{flexDirection:"row",style:{gap:0,flexWrap:"wrap",lineHeight:"0.9rem"}},o("span",null,e),!isNaN(n.getTime())&&o("span",null,"Received \u2014 ",n.toDateString()))},options:{showDates:{type:3,description:"Show dates on friend requests",default:!1,restartNeeded:!0}}})});var wb,Pb=m(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/spotifyControls/hoverOnly.css",{name:"src/plugins/spotifyControls/hoverOnly.css",source:`.vc-spotify-button-row {
height: 0;
opacity: 0;
pointer-events: none;
transition: 0.2s;
transition-property: height;
2023-07-11 23:04:56 -04:00
}
2023-07-11 23:21:30 -04:00
#vc-spotify-player:hover .vc-spotify-button-row {
opacity: 1;
height: 32px;
pointer-events: auto;
2023-07-11 23:04:56 -04:00
2023-07-11 23:21:30 -04:00
/* only transition opacity on show to prevent clipping */
transition-property: height, opacity;
2023-07-11 23:04:56 -04:00
}
2023-07-11 23:21:30 -04:00
`,classNames:{},dom:null});wb="src/plugins/spotifyControls/hoverOnly.css"});var Mb=m(()=>{});var ye,Ib=m(()=>{"use strict";a();D();sn();O();T();ye=dt(()=>{let{Store:e}=wl,t=P("getActiveSocketAndDevice"),n=P("SpotifyAPIMarker"),r="https://api.spotify.com/v1/me/player";class i extends e{mPosition=0;start=0;track=null;device=null;isPlaying=!1;repeat="off";shuffle=!1;volume=0;isSettingPosition=!1;openExternal(c){let u=M.plugins.SpotifyControls.useSpotifyUris||Vencord.Plugins.isPluginEnabled("OpenInApp")?"spotify:"+c.replaceAll("/",(h,f)=>f===0?"":":"):"https://open.spotify.com"+c;VencordNative.native.openExternal(u)}get position(){let c=this.mPosition;return this.isPlaying&&(c+=Date.now()-this.start),c}set position(c){this.mPosition=c,this.start=Date.now()}prev(){this.req("post","/previous")}next(){this.req("post","/next")}setVolume(c){this.req("put","/volume",{query:{volume_percent:Math.round(c)}}).then(()=>{this.volume=c,this.emitChange()})}setPlaying(c){this.req("put",c?"/play":"/pause")}setRepeat(c){this.req("put","/repeat",{query:{state:c}})}setShuffle(c){this.req("put","/shuffle",{query:{state:c}}).then(()=>{this.shuffle=c,this.emitChange()})}seek(c){return this.isSettingPosition?Promise.resolve():(this.isSettingPosition=!0,this.req("put","/seek",{query:{position_ms:Math.round(c)}}).catch(u=>{console.error("[VencordSpotifyControls] Failed to seek",u),this.isSettingPosition=!1}))}req(c,u,h={}){this.device?.is_active&&((h.query??={}).device_id=this.device.id);let{socket:f}=t.getActiveSocketAndDevice();return n[c](f.accountId,f.accessToken,{url:r+u,...h})}}let s=new i(E,{SPOTIFY_PLAYER_STATE(l){s.track=l.track,s.device=l.device??null,s.isPlaying=l.isPlaying??!1,s.volume=l.volumePercent??0,s.repeat=l.actual_repeat||"off",s.position=l.position??0,s.isSettingPosition=!1,s.emitChange()},SPOTIFY_SET_DEVICES({devices:l}){s.device=l.find(c=>c.is_active)??l[0]??null,s.emitChange()}});return s})});function Em(e){let t=e/1e3/60,n=Math.floor(t),r=Math.floor((t-n)*60);return`${n.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`}function kr(e,t){return()=>o("svg",{className:J(we("button-icon"),we(t)),height:"24",width:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":t,focusable:!1},o("path",{d:e}))}function Ui(e){return o("button",{className:we("button"),...e},e.children)}function BI({name:e,path:t}){let n=`spotify-copy-${e}`,r=`spotify-open-${e}`;return o(L.Menu,{navId:`spotify-${e}-menu`,onClose:()=>E.dispatch({type:"CONTEXT_MENU_CLOSE"}),"aria-label":`Spotify ${e} Menu`},o(L.MenuItem,{key:n,id:n,label:`Copy ${e} Link`,action:()=>Yt("https://open.spotify.com"+t),icon:Ys}),o(L.MenuItem,{key:r,id:r,label:`Open ${e} in Spotify`,action:()=>ye.openExternal(t),icon:zo}))}function FI(e,t){return n=>cn.open(n,()=>o(BI,{name:e,path:t}))}function $I(){let[e,t,n]=Fe([ye],()=>[ye.isPlaying,ye.shuffle,ye.repeat]),[r,i]=(()=>{switch(n){case"off":return["context","repeat-off"];case"context":return["track","repeat-context"];case"track":return["off","repeat-track"];default:throw new Error(`Invalid repeat state ${n}`)}})();return o(le,{className:we("button-row"),style:{gap:0}},o(Ui,{className:J(we("button"),we(t?"shuffle-on":"shuffle-off")),onClick:()=>ye.setShuffle(!t)},o(_I,null)),o(Ui,{onClick:()=>ye.prev()},o(EI,null)),o(Ui,{onClick:()=>ye.setPlaying(!e)},e?o(LI,null):o(AI,null)),o(Ui,{onClick:()=>ye.next()},o(DI,null)),o(Ui,{className:J(we("button"),we(i)),onClick:()=>ye.setRepeat(r),style:{position:"relative"}},n==="track"&&o("span",{className:we("repeat-1")},"1"),o(OI,null)))}function GI(){let{duration:e}=ye.track,[t,n,r]=Fe([ye],()=>[ye.mPosition,ye.isSettingPosition,ye.isPlaying]),[i,s]=V(t);return rt(()=>{if(r&&!n){s(ye.position);let l=setInterval(()=>{s(c=>c+1e3)},1e3);return()=>clearInterval(l)}},[t,n,r]),o("div",{id:we("progress-bar")},o(v.FormText,{variant:"text-xs/medium",className:we("progress-time")+" "+we("time-left"),"aria-label":"Progress"},Em(i)),o(L.MenuSliderControl,{minValue:0,maxValue:e,value:i,onChange:l=>{n||(s(l),UI(l))},renderValue:Em}),o(v.FormText,{variant:"text-xs/medium",className:we("progress-tim
`);return o(v.FormSection,{title:"Server Trace",tag:"h2"},o("code",null,o(le,{flexDirection:"column",style:{color:"var(--header-primary)",gap:5,userSelect:"text"}},t.map(n=>o("span",null,n)))))}function YI(){if(!Gi?.logs)return o("div",null,"Loading...");let e=Gi.logGroups.find(t=>t.serverTrace)?.serverTrace;return o(I.Fragment,null,o(qI,{title:"Startup Timings",logs:Gi.logs,traceEnd:Gi.endTime_}),o("div",{style:{marginTop:5}},"\xA0"),e&&o(KI,{trace:e}))}var Gi,ZI,Ob=m(()=>{"use strict";a();ie();wt();O();T();Gi=P("markWithDelta","markAndLog","markAt");ZI=A.wrap(YI)});var Gm,_b=m(()=>{"use strict";a();w();ve();b();Gm=g({name:"StartupTimings",description:"Adds Startup Timings to the Settings menu",authors:[p.Megu],patches:[{find:"PAYMENT_FLOW_MODAL_TEST_PAGE,",replacement:{match:/{section:.{1,2}\..{1,3}\.PAYMENT_FLOW_MODAL_TEST_PAGE/,replace:'{section:"StartupTimings",label:"Startup Timings",element:$self.StartupTimingPage},$&'}}],StartupTimingPage:re(()=>(Ob(),Lo(Db)).default)})});var Bb,XI,Hm,Fb=m(()=>{"use strict";a();ki();w();fe();Wn();b();dr();T();Dr();pr();Jc();Bb="Vencord-SupportHelper-Dismiss",XI=[Xi,"1024286218801926184","1033680203433660458"],Hm=g({name:"SupportHelper",required:!0,description:"Helps us provide support to you",authors:[p.Ven],dependencies:["CommandsAPI"],commands:[{name:"vencord-debug",description:"Send Vencord Debug info",predicate:e=>XI.includes(e.channel.id),execute(){let{RELEASE_CHANNEL:e}=window.GLOBAL_ENV,t=(()=>"armcord"in window?`ArmCord v${window.armcord.version}`:`${typeof unsafeWindow<"u"?"UserScript":"Web"} (${navigator.userAgent})`)(),n=c=>c.endsWith("API")||Te[c].required,r=Object.keys(Te).filter(c=>Vencord.Plugins.isPluginEnabled(c)&&!n(c)),i=Object.keys(Te).filter(c=>Vencord.Plugins.isPluginEnabled(c)&&n(c)),s={Vencord:`v1.3.4 \u2022 ${rn}${ui.additionalInfo} - ${Intl.DateTimeFormat("en-GB",{dateStyle:"medium"}).format(1689131711949)}`,"Discord Branch":e,Client:t,Platform:window.navigator.platform,Outdated:ho,OpenAsar:"openasar"in window};return{content:`
**Vencord Debug Info**
>>> ${Object.entries(s).map(([c,u])=>`${c}: ${u}`).join(`
`)}
2023-07-11 23:04:56 -04:00
2023-07-11 23:21:30 -04:00
Enabled Plugins (${r.length+i.length}):
${Kr(r.join(", ")+`
2023-07-11 23:04:56 -04:00
2023-07-11 23:21:30 -04:00
`+i.join(", "))}
`.trim().replaceAll("```\n","```")}}}],flux:{async CHANNEL_SELECT({channelId:e}){if(e===Xi&&!_r(F.getCurrentUser().id)&&ho&&rn!==await Nt.get(Bb)){let t=()=>Nt.set(Bb,rn);bt.show({title:"Hold on!",body:o("div",null,o(v.FormText,null,"You are using an outdated version of Vencord! Chances are, your issue is already fixed."),o(v.FormText,null,"Please first update using the Updater Page in Settings, or use the VencordInstaller (Update Vencord Button) to do so, in case you can't access the Updater page.")),onCancel:t,onConfirm:t})}}}})});function zb(e){let t=e.match(/^(\/)?(.+?)(?:\/([gimsuy]*))?$/);return t?new RegExp(t[2],t[3]?.split("").filter((n,r,i)=>i.indexOf(n)===r).join("")??"g"):new RegExp(e)}function QI(e){try{return zb(e),null}catch(t){return o("span",{style:{color:"var(--text-danger)"}},String(t))}}function zm({initialValue:e,onChange:t,placeholder:n}){let[r,i]=V(e);return o(Re,{placeholder:n,value:r,onChange:i,spellCheck:!1,onBlur:()=>r!==e&&t(r)})}function $b({title:e,rulesArray:t,rulesKey:n,update:r}){let i=e==="Using Regex";async function s(c){t.splice(c,1),await Nt.set(n,t),r()}async function l(c,u,h){u===t.length-1&&t.push(Hb()),t[u][h]=c,t[u].find===""&&t[u].replace===""&&t[u].onlyIfIncludes===""&&u!==t.length-1&&t.splice(u,1),await Nt.set(n,t),r()}return o(d,null,o(v.FormTitle,{tag:"h4"},e),o(le,{flexDirection:"column",style:{gap:"0.5em"}},t.map((c,u)=>o(I.Fragment,{key:`${c.find}-${u}`},o(le,{flexDirection:"row",style:{gap:0}},o(le,{flexDirection:"row",style:{flexGrow:1,gap:"0.5em"}},o(zm,{placeholder:"Find",initialValue:c.find,onChange:h=>l(h,u,"find")}),o(zm,{placeholder:"Replace",initialValue:c.replace,onChange:h=>l(h,u,"replace")}),o(zm,{placeholder:"Only if includes",initialValue:c.onlyIfIncludes,onChange:h=>l(h,u,"onlyIfIncludes")})),o(N,{size:N.Sizes.MIN,onClick:()=>s(u),style:{background:"none",...u===t.length-1?{visibility:"hidden",pointerEvents:"none"}:{}}},o("svg",{width:"24",height:"24",viewBox:"0 0 24 24"},o("title",null,"Delete Rule"),o("path",{fill:"var(--status-danger)",d:"M15 3.999V2H9V3.999H3V5.999H21V3.999H15Z"}),o("path",{fill:"var(--status-danger)",d:"M5 6.99902V18.999C5 20.101 5.897 20.999 7 20.999H17C18.103 20.999 19 20.101 19 18.999V6.99902H5ZM11 17H9V11H11V17ZM15 17H13V11H15V17Z"})))),i&&QI(c.find)))))}function VI(){let[e,t]=V("");return o(d,null,o(v.FormTitle,{tag:"h4"},"Test Rules"),o(Re,{placeholder:"Type a message",onChange:t}),o(Re,{placeholder:"Message with rules applied",editable:!1,value:jb(e)}))}function jb(e){if(e.length===0)return e;if(e=" "+e+" ",Ka)for(let t of Ka)!t.find||!t.replace||t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)||(e=e.replaceAll(t.find,t.replace.replaceAll("\\n",`
`)));if(Ya){for(let t of Ya)if(!(!t.find||!t.replace)&&!(t.onlyIfIncludes&&!e.includes(t.onlyIfIncludes)))try{let n=zb(t.find);e=e.replace(n,t.replace.replaceAll("\\n",`
`))}catch{new Y("TextReplace").error(`Invalid regex: ${t.find}`)}}return e=e.trim(),e}var Ub,Gb,Hb,qa,Ka,Ya,JI,eC,jm,Wb=m(()=>{"use strict";a();ki();Sn();D();wt();w();be();ve();b();T();Ub="TextReplace_rulesString",Gb="TextReplace_rulesRegex",Hb=()=>({find:"",replace:"",onlyIfIncludes:""}),qa=()=>[Hb()],Ka=qa(),Ya=qa(),JI=k({replace:{type:6,description:"",component:()=>{let e=Lt();return o(d,null,o($b,{title:"Using String",rulesArray:Ka,rulesKey:Ub,update:e}),o($b,{title:"Using Regex",rulesArray:Ya,rulesKey:Gb,update:e}),o(VI,null))}}});eC="1102784112584040479",jm=g({name:"TextReplace",description:"Replace text in your messages. You can find pre-made rules in the #textreplace-rules channel in Vencord's Server",authors:[p.AutumnVN,p.TheKodeToad],dependencies:["MessageEventsAPI"],settings:JI,async start(){Ka=await Nt.get(Ub)??qa(),Ya=await Nt.get(Gb)??qa(),this.preSend=lt((e,t)=>{e!==eC&&(t.content=jb(t.content))})},stop(){ct(this.preSend)}})});var Wm,qb=m(()=>{"use strict";a();w();b();Wm=g({name:"TimeBarAllActivities",description:"Adds the Spotify time bar to all activities if they have start and end timestamps",authors:[p.obscurity],patches:[{find:"renderTimeBar=function",replacement:{match:/renderTimeBar=function\((.{1,3})\){.{0,50}?var/,replace:"renderTimeBar=function($1){var"}}]})});var Kb=m(()=>{});var ht,Hi=m(()=>{"use strict";a();D();b();ht=k({receivedInput:{type:0,description:"Input language for received messages",default:"auto",hidden:!0},receivedOutput:{type:0,description:"Output language for received messages",default:"en",hidden:!0},sentInput:{type:0,description:"Input language for sent messages",default:"auto",hidden:!0},sentOutput:{type:0,description:"Output language for sent messages",default:"en",hidden:!0},autoTranslate:{type:3,description:"Automatically translate your messages before sending. You can also shift/right click the translate button to toggle this",default:!1}})});var Za,qm=m(()=>{"use strict";a();Za={auto:"Detect language",af:"Afrikaans",sq:"Albanian",am:"Amharic",ar:"Arabic",hy:"Armenian",as:"Assamese",ay:"Aymara",az:"Azerbaijani",bm:"Bambara",eu:"Basque",be:"Belarusian",bn:"Bengali",bho:"Bhojpuri",bs:"Bosnian",bg:"Bulgarian",ca:"Catalan",ceb:"Cebuano",ny:"Chichewa","zh-CN":"Chinese (Simplified)","zh-TW":"Chinese (Traditional)",co:"Corsican",hr:"Croatian",cs:"Czech",da:"Danish",dv:"Dhivehi",doi:"Dogri",nl:"Dutch",en:"English",eo:"Esperanto",et:"Estonian",ee:"Ewe",tl:"Filipino",fi:"Finnish",fr:"French",fy:"Frisian",gl:"Galician",ka:"Georgian",de:"German",el:"Greek",gn:"Guarani",gu:"Gujarati",ht:"Haitian Creole",ha:"Hausa",haw:"Hawaiian",iw:"Hebrew",hi:"Hindi",hmn:"Hmong",hu:"Hungarian",is:"Icelandic",ig:"Igbo",ilo:"Ilocano",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",jw:"Javanese",kn:"Kannada",kk:"Kazakh",km:"Khmer",rw:"Kinyarwanda",gom:"Konkani",ko:"Korean",kri:"Krio",ku:"Kurdish (Kurmanji)",ckb:"Kurdish (Sorani)",ky:"Kyrgyz",lo:"Lao",la:"Latin",lv:"Latvian",ln:"Lingala",lt:"Lithuanian",lg:"Luganda",lb:"Luxembourgish",mk:"Macedonian",mai:"Maithili",mg:"Malagasy",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi","mni-Mtei":"Meiteilon (Manipuri)",lus:"Mizo",mn:"Mongolian",my:"Myanmar (Burmese)",ne:"Nepali",no:"Norwegian",or:"Odia (Oriya)",om:"Oromo",ps:"Pashto",fa:"Persian",pl:"Polish",pt:"Portuguese",pa:"Punjabi",qu:"Quechua",ro:"Romanian",ru:"Russian",sm:"Samoan",sa:"Sanskrit",gd:"Scots Gaelic",nso:"Sepedi",sr:"Serbian",st:"Sesotho",sn:"Shona",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",so:"Somali",es:"Spanish",su:"Sundanese",sw:"Swahili",sv:"Swedish",tg:"Tajik",ta:"Tamil",tt:"Tatar",te:"Telugu",th:"Thai",ti:"Tigrinya",ts:"Tsonga",tr:"Turkish",tk:"Turkmen",ak:"Twi",uk:"Ukrainian",ur:"Urdu",ug:"Uyghur",uz:"Uzbek",vi:"Vietnamese",cy:"Welsh",xh:"Xhosa",yi:"Yiddish",yo:"Yoruba",zu:"Zulu"}});async function zi(e,t){let n=ht.store[e+"Input"],r=ht.store[e+"Output"],i="https://translate.googleapis.com/translate_a/single?"+new URLSearchParams({client:"gtx",sl:n,tl:r,dt:"t",dj:"1",source:"input",q:t}),s=await fetch(i);if(!s.ok)throw new Error(`Failed to translate "${t}" (
${s.status} ${s.statusText}`);let{src:l,sentences:c}=await s.json();return{src:l,text:c.map(u=>u?.trans).filter(Boolean).join("")}}var io,ji=m(()=>{"use strict";a();Ge();Hi();io=Ee("vc-trans-")});function nC({settingsKey:e,includeAuto:t}){let n=ht.use([e])[e],r=zt(()=>{let i=Object.entries(Za).map(([s,l])=>({value:s,label:l}));return t||i.shift(),i},[]);return o("section",{className:G.bottom16},o(v.FormTitle,{tag:"h3"},ht.def[e].description),o(ls,{options:r,value:r.find(i=>i.value===n),placeholder:"Select a language",maxVisibleItems:5,closeOnSelect:!0,onChange:i=>ht.store[e]=i}))}function oC(){let e=ht.use(["autoTranslate"]).autoTranslate;return o(ft,{value:e,onChange:t=>ht.store.autoTranslate=t,note:ht.def.autoTranslate.description,hideBorder:!0},"Auto Translate")}function Yb({rootProps:e}){return o(Le,{...e},o($e,{className:io("modal-header")},o(v.FormTitle,{tag:"h2"},"Translate"),o(xt,{onClick:e.onClose})),o(Ue,{className:io("modal-content")},tC.map(t=>o(nC,{key:t,settingsKey:t,includeAuto:t.endsWith("Input")})),o(v.FormDivider,{className:G.bottom16}),o(oC,null)))}var tC,Zb=m(()=>{"use strict";a();Xe();Ze();T();qm();Hi();ji();tC=["receivedInput","receivedOutput","sentInput","sentOutput"]});function Rr({height:e=24,width:t=24,className:n}){return o("svg",{viewBox:"0 96 960 960",height:e,width:t,className:J(io("icon"),n)},o("path",{fill:"currentColor",d:"m475 976 181-480h82l186 480h-87l-41-126H604l-47 126h-82Zm151-196h142l-70-194h-2l-70 194Zm-466 76-55-55 204-204q-38-44-67.5-88.5T190 416h87q17 33 37.5 62.5T361 539q45-47 75-97.5T487 336H40v-80h280v-80h80v80h280v80H567q-22 69-58.5 135.5T419 598l98 99-30 81-127-122-200 200Z"}))}function Xb({slateProps:e}){let{autoTranslate:t}=ht.use(["autoTranslate"]);if(e.type.analyticsName!=="normal")return null;let n=()=>ht.store.autoTranslate=!t;return o(W,{text:"Open Translate Modal"},({onMouseEnter:r,onMouseLeave:i})=>o("div",{style:{display:"flex"}},o(N,{"aria-haspopup":"dialog","aria-label":"",size:"",look:Zt.BLANK,onMouseEnter:r,onMouseLeave:i,innerClassName:mt.button,onClick:s=>{if(s.shiftKey)return n();Ce(l=>o(Yb,{rootProps:l}))},onContextMenu:()=>n(),style:{padding:"0 4px"}},o("div",{className:mt.buttonWrapper},o(Rr,{className:io({"auto-translate":t})})))))}var Km=m(()=>{"use strict";a();fe();Ze();T();Hi();Zb();ji()});function Zm(e,t){Ym.get(e)(t)}function rC({onDismiss:e}){return o("button",{onClick:e,className:io("dismiss")},"Dismiss")}function Jb({message:e}){let[t,n]=V();return rt(()=>{if(!e.vencordEmbeddedBy)return Ym.set(e.id,n),()=>void Ym.delete(e.id)},[]),t?o("span",{className:io("accessory")},o(Rr,{width:16,height:16}),Ie.parse(t.text)," ","(translated from ",Za[t.src]??t.src," - ",o(rC,{onDismiss:()=>n(void 0)}),")"):null}var Ym,Qb=m(()=>{"use strict";a();T();qm();Km();ji();Ym=new Map});var Vb,Xm,eT=m(()=>{"use strict";a();Kb();Pt();la();Sn();Ko();ie();w();b();T();Hi();Km();Qb();ji();Vb=(e,{message:t})=>()=>{if(!t.content)return;let n=nt("copy-text",e);!n||n.splice(n.findIndex(r=>r?.props?.id==="copy-text")+1,0,o(L.MenuItem,{id:"vc-trans",label:"Translate",icon:Rr,action:async()=>{let r=await zi("received",t.content);Zm(t.id,r)}}))},Xm=g({name:"Translate",description:"Translate messages with Google Translate",authors:[p.Ven],dependencies:["MessageAccessoriesAPI","MessagePopoverAPI","MessageEventsAPI"],settings:ht,translate:zi,patches:[{find:".activeCommandOption",replacement:{match:/(.)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,replace:"$&;try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}"}}],start(){Si("vc-translation",e=>o(Jb,{message:e.message})),pe("message",Vb),bn("vc-translate",e=>e.content?{label:"Translate",icon:Rr,message:e,channel:Z.getChannel(e.channel_id),onClick:async()=>{let t=await zi("received",e.content);Zm(e.id,t)}}:null),this.preSend=lt(async(e,t)=>{!ht.store.autoTranslate||!t.content||(t.content=(await zi("sent",t.content)).text)})},stop(){ct(this.preSend),de("message",Vb),Tn("vc-translate"),Sp("vc-translation")},chatBarIcon:e=>o(A,{noop:!0},o(Xb,{slateProps:e}))})});function Jm({a:e,b:t,c:n}){return[o("strong",{key:"0"},e),", ",o("s
2023-07-11 23:04:56 -04:00
`);if(n.length<2)return t;let r="";return n[n.length-1]==="```"&&(r=n.pop()),`${n[0]}
${this.unindent(n.slice(1).join(`
`))}
2023-07-11 23:21:30 -04:00
${r}`})},start(){this.preSend=lt((e,t)=>this.unindentMsg(t)),this.preEdit=Jn((e,t,n)=>this.unindentMsg(n))},stop(){ct(this.preSend),Qn(this.preEdit)}})});var of,rT,rf,iT=m(()=>{"use strict";a();Pt();_n();w();b();T();of=1<<2,rT=(e,{channel:t,message:{author:n,embeds:r,flags:i,id:s}})=>()=>{let l=(i&of)!==0;if(!l&&!r.length)return;let c=t.isPrivate()||!!(je.getChannelPermissions({id:t.id})&An.EMBED_LINKS);if(n.id===F.getCurrentUser().id&&!c)return;let u=nt("delete",e),h=u?.findIndex(f=>f?.props?.id==="delete");!h||!u||u.splice(h-1,0,o(L.MenuItem,{id:"unsuppress-embeds",key:"unsuppress-embeds",label:l?"Unsuppress Embeds":"Suppress Embeds",color:l?void 0:"danger",icon:l?Zs:Xs,action:()=>Dt.patch({url:`/channels/${t.id}/messages/${s}`,body:{flags:l?i&~of:i|of}})}))},rf=g({name:"UnsuppressEmbeds",authors:[p.rad,p.HypedDomi],description:"Allows you to unsuppress embeds in messages",start(){pe("message",rT)},stop(){de("message",rT)}})});var sf,sT=m(()=>{"use strict";a();_t();zs();w();b();sf=g({name:"UrbanDictionary",description:"Search for a word on Urban Dictionary via /urban slash command",authors:[p.jewdev],dependencies:["CommandsAPI"],commands:[{name:"urban",description:"Returns the definition of a word from Urban Dictionary",inputType:0,options:[{type:3,name:"word",description:"The word to search for on Urban Dictionary",required:!0}],execute:async(e,t)=>{try{let n=encodeURIComponent(e[0].value),{list:[r]}=await(await fetch(`https://api.urbandictionary.com/v0/define?term=${n}`)).json();if(!r)return void oe(t.channel.id,{content:"No results found."});let i=s=>s.replaceAll(`\r
`,`
`).replace(/([*>_`~\\])/gsi,"\\$1").replace(/\[(.+?)\]/g,(l,c)=>`[${c}](https://www.urbandictionary.com/define.php?term=${encodeURIComponent(c)} "Define '${c}' on Urban Dictionary")`).trim();return void oe(t.channel.id,{embeds:[{type:"rich",author:{name:`Uploaded by "${r.author}"`,url:`https://www.urbandictionary.com/author.php?author=${encodeURIComponent(r.author)}`},title:r.word,url:`https://www.urbandictionary.com/define.php?term=${encodeURIComponent(r.word)}`,description:i(r.definition),fields:[{name:"Example",value:i(r.example)},{name:"Want more definitions?",value:`Check out [more definitions](https://www.urbandictionary.com/define.php?term=${n} "Define "${e[0].value}" on Urban Dictionary") on Urban Dictionary.`}],color:16750848,footer:{text:`\u{1F44D} ${r.thumbs_up.toString()} | \u{1F44E} ${r.thumbs_down.toString()}`,icon_url:"https://www.urbandictionary.com/favicon.ico"},timestamp:new Date(r.written_on).toISOString()}]})}catch(n){oe(t.channel.id,{content:`Something went wrong: \`${n}\``})}}}]})});var aT=m(()=>{});var uC,pC,dC,lT,cT=m(()=>{"use strict";a();aT();O();T();uC=P("selectChannel","selectVoiceChannel"),pC=ce(".lastSection",".children"),dC=1n<<20n,lT=({channel:e,label:t,showHeader:n})=>o(pC,null,n&&o(v.FormTitle,{className:"vc-uvs-header"},"In a voice channel"),o(N,{className:"vc-uvs-button",color:N.Colors.TRANSPARENT,size:N.Sizes.SMALL,onClick:()=>{je.can(dC,e)?uC.selectVoiceChannel(e.id):X.show({message:"Insufficient permissions to enter the channel.",id:"user-voice-show-insufficient-permissions",type:X.Type.FAILURE,options:{position:X.Position.BOTTOM}})}},t))});var mC,fC,af,uT,lf,pT=m(()=>{"use strict";a();D();ie();w();b();O();T();cT();mC=ae("VoiceStateStore"),fC=P("section","lastSection"),af=k({showInUserProfileModal:{type:3,description:"Show a user's voice channel in their profile modal",default:!0},showVoiceChannelSectionHeader:{type:3,description:'Whether to show "IN A VOICE CHANNEL" above the join button',default:!0}}),uT=A.wrap(({user:e})=>{let{channelId:t}=mC.getVoiceStateForUser(e.id)??{};if(!t)return null;let n=Z.getChannel(t),r=ue.getGuild(n.guild_id);if(!r)return null;let i=`${r.name} | ${n.name}`;return o(lT,{channel:n,label:i,showHeader:af.store.showVoiceChannelSectionHeader})}),lf=g({name:"UserVoiceShow",description:"Shows whether a User is currently in a voice channel somewhere in their profile",authors:[p.LordElias],settings:af,patchModal({user:e}){return af.store.showInUserProfileModal?o("div",{className:"vc-uvs-modal-margin"},o(uT,{user:e})):null},patchPopout:({user:e})=>{let t=e.id===F.getCurrentUser().id;return o("div",{className:t?`vc-uvs-popout-margin ${fC.lastSection}`:""},o(uT,{user:e}))},patches:[{find:".showCopiableUsername",replacement:{match:/\(0,\w\.jsx\)\(\w{2},{user:\w,setNote/,replace:"$self.patchPopout(arguments[0]),$&"}},{find:".USER_PROFILE_MODAL",replacement:{match:/\(\)\.body.+?displayProfile:\i}\),/,replace:"$&$self.patchModal(arguments[0]),"}}]})});var dT,mT=m(()=>{a();(window.VencordStyles??=new Map).set("src/plugins/usrbg/index.css",{name:"src/plugins/usrbg/index.css",source:`:is([class*="userProfile"], [class*="userPopout"]) [class*="bannerPremium"] {
background: center / cover no-repeat;
}
[class*="NonPremium"]:has([class*="bannerPremium"]) [class*="avatarPositionNormal"],
[class*="PremiumWithoutBanner"]:has([class*="bannerPremium"]) [class*="avatarPositionPremiumNoBanner"] {
top: 76px;
}
[style*="background-image"] [class*="background-"] {
background-color: transparent !important;
}
`,classNames:{},dom:null});dT="src/plugins/usrbg/index.css"});var gC,Vo,Qa,cf,fT=m(()=>{"use strict";a();D();Ge();bo();w();b();mT();gC="https://raw.githubusercontent.com/AutumnVN/usrbg/main/usrbg.json",Vo={},Qa=k({nitroFirst:{description:"Banner to use if both Nitro and USRBG banners are present",type:4,options:[{label:"Nitro banner",value:!0,default:!0},{label:"USRBG banner",value:!1}]},voiceBackground:{description:"Use USRBG banners as voice chat backgrounds",type:3,default:!0,restartNeeded:!0}}),cf=g({name:"USRBG",description:"Displays user banners from USRBG, allowing anyone to get a banner without Nitro",authors:[p.AutumnVN,p.pylix,p.TheKodeToad],settings:Qa,patches:[{find:".NITRO_BANNER,",replacement:[{match:/(\i)\.premiumType/,replace:"$self.premiumHook($1)||$&"},{match:/(\i)\.bannerSrc,/,replace:"$self.useBannerHook($1),"},{match:/\?\(0,\i\.jsx\)\(\i,{type:\i,shown/,replace:"&&$self.shouldShowBadge(arguments[0])$&"}]},{find:'"data-selenium-video-tile":',predicate:()=>Qa.store.voiceBackground,replacement:[{match:/(\i)\.style,/,replace:"$self.voiceBackgroundHook($1),"}]}],settingsAboutComponent:()=>o(at,{href:"https://github.com/AutumnVN/usrbg#how-to-request-your-own-usrbg-banner"},"CLICK HERE TO GET YOUR OWN BANNER"),voiceBackgroundHook({className:e,participantUserId:t}){if(e.includes("tile-")&&Vo[t])return{backgroundImage:`url(${Vo[t]})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}},useBannerHook({displayProfile:e,user:t}){if(!(e?.banner&&Qa.store.nitroFirst)&&Vo[t.id])return Vo[t.id]},premiumHook({userId:e}){if(Vo[e])return 2},shouldShowBadge({displayProfile:e,user:t}){return e?.banner&&(!Vo[t.id]||Qa.store.nitroFirst)},async start(){Je(dT);let e=await fetch(gC);e.ok&&(Vo=await e.json())}})});function vC(e){let t=Math.floor(Math.random()*e.length);return e[t]}function hT(e){e=e.toLowerCase();for(let t of yC)e=e.replaceAll(t[0],t[1]);return e=e.replaceAll(/([ \t\n])n/g,"$1ny").replaceAll(/[lr]/g,"w").replaceAll(/([ \t\n])([a-z])/g,(t,n,r)=>Math.random()<.5?`${n}${r}-${r}`:`${n}${r}`).replaceAll(/([^.,!][.,!])([ \t\n])/g,(t,n,r)=>`${n} ${vC(hC)}${r}`),e}var hC,yC,gT,uf,yT=m(()=>{"use strict";a();_t();Sn();D();w();b();hC=["rawr x3","OwO","UwU","o.O","-.-",">w<","(\u2445\u02D8\uA4B3\u02D8)","(\uA20D\u1D17\uA20D)","(\u02D8\u03C9\u02D8)","(U \u1D55 U\u2741)","\u03C3\u03C9\u03C3","\xF2\u03C9\xF3","(///\u02EC///\u273F)","(U \uFE4F U)","( \u0361o \u03C9 \u0361o )","\u0298w\u0298",":3",":3","XD","nyaa~~","mya",">_<","\u{1F633}","\u{1F97A}","\u{1F633}\u{1F633}\u{1F633}","rawr","^^","^^;;","(\u02C6 \uFECC \u02C6)\u2661","^\u2022\uFECC\u2022^","/(^\u2022\u03C9\u2022^)","(\u273Fo\u03C9o)"],yC=[["small","smol"],["cute","kawaii~"],["fluff","floof"],["love","luv"],["stupid","baka"],["what","nani"],["meow","nya~"],["hello","hewwo"]],gT=k({uwuEveryMessage:{description:"Make every single message uwuified",type:3,default:!1,restartNeeded:!1}});uf=g({name:"UwUifier",description:"Simply uwuify commands",authors:[p.echo,p.skyevg,p.PandaNinjas],dependencies:["CommandsAPI","MessageEventsAPI"],settings:gT,commands:[{name:"uwuify",description:"uwuifies your messages",options:[Ho],execute:e=>({content:hT(Oe(e,"message",""))})}],onSend(e){gT.store.uwuEveryMessage&&(e.content=hT(e.content))},start(){this.preSend=lt((e,t)=>this.onSend(t)),this.preEdit=Jn((e,t,n)=>this.onSend(n))},stop(){ct(this.preSend),Qn(this.preEdit)}})});function bC({data:e,UserMention:t,RoleMention:n,parse:r,props:i}){let[s,l]=V(e.userId);if(s)return o(t,{className:"mention",userId:s,channelId:e.channelId,inlinePreview:i.noStyleAndInteraction,key:i.key});let c=r(e.content,i);return o(n,{...e,inlinePreview:i.formatInline},o("span",{onMouseEnter:()=>{let u=c?.[0]?.props?.children;if(typeof u!="string")return;let h=u.match(/<@!?(\d+)>/)?.[1];if(!h||Va.has(h))return;if(F.getUser(h))return l(h);let f=()=>{Va.add(h),vT.unshift(()=>SC(h).then(()=>{l(h),Va.delete(h)}).catch(y=>{y?.status===429&&(vT.unshift(()=>so(1e3).then(f)),Va.delete(h))}).finally(()=>so(300)))};f()}},c))}var Va,vT,SC,pf,ST=m(()=>{"use strict";a();ie();w();fe();ar();b();O()
`);qi.textContent=t}var Ro,qi,Rf=m(()=>{"use strict";a();D();document.addEventListener("DOMContentLoaded",()=>{Nf(M.useQuickCss),Bs("useQuickCss",Nf),FT(),Bs("themeLinks",FT)})});var Af={};ge(Af,{Common:()=>Cl,_initWebpack:()=>ns,_resolveReady:()=>ts,addListener:()=>ix,cache:()=>Un,extract:()=>yl,filters:()=>K,find:()=>Ht,findAll:()=>or,findBulk:()=>Or,findByCode:()=>ze,findByCodeLazy:()=>ce,findByProps:()=>Nn,findByPropsLazy:()=>P,findLazy:()=>ke,findModuleId:()=>os,findStore:()=>rx,findStoreLazy:()=>ae,listeners:()=>gl,mapMangledModule:()=>Hf,mapMangledModuleLazy:()=>Ke,onceReady:()=>fl,removeListener:()=>sx,search:()=>hl,subscriptions:()=>Gf,waitFor:()=>Ye,wreq:()=>Gt});var il=m(()=>{"use strict";a();T();O()});function UT(){function e(t){try{let n=t[1],{subscriptions:r,listeners:i}=Vencord.Webpack,{patches:s}=Vencord.Plugins;for(let l in n){let c=n[l],u=c.toString().replaceAll(`
`,"");u.startsWith("function(")&&(u="0,"+u);let h=c,f=new Set,y=n[l]=function(S,x,R){try{c(S,x,R)}catch(_){if(c===h)throw _;return Ao.error("Error in patched chunk",_),void h(S,x,R)}if(S.exports===window){Object.defineProperty(R.c,l,{value:R.c[l],enumerable:!1,configurable:!0,writable:!0});return}let C=Number(l);for(let _ of i)try{_(x,C)}catch($){Ao.error("Error in webpack listener",$)}for(let[_,$]of r)try{if(_(x))r.delete(_),$(x,C);else if(typeof x=="object"){x.default&&_(x.default)&&(r.delete(_),$(x.default,C));for(let B in x)B.length<=3&&x[B]&&_(x[B])&&(r.delete(_),$(x[B],C))}}catch(B){Ao.error("Error while firing callback for webpack chunk",B)}};try{y.toString=()=>c.toString(),y.original=h}catch{}for(let S=0;S<s.length;S++){let x=s[S],R=an(`patch by ${x.plugin}`,(C,_)=>u.replace(C,_));if(!(x.predicate&&!x.predicate())&&u.includes(x.find)){f.add(x.plugin);for(let C of x.replacement){if(C.predicate&&!C.predicate())continue;let _=c,$=u;jr(C,x.plugin);try{let B=R(C.match,C.replace);B===u&&!x.noWarn?Ao.warn(`Patch by ${x.plugin} had no effect (Module id is ${l}): ${C.match}`):(u=B,c=(0,eval)(`// Webpack Module ${l} - Patched by ${[...f].join(", ")}
${B}
//# sourceURL=WebpackModule${l}`))}catch(B){Ao.error(`Patch by ${x.plugin} errored (Module id is ${l}): ${C.match}
`,B),u=$,c=_,f.delete(x.plugin)}}x.all||s.splice(S--,1)}}}}catch(n){Ao.error("Error in handlePush",n)}return e.original.call(window[qt],t)}e.original=window[qt].push,Object.defineProperty(window[qt],"push",{get:()=>e,set:t=>e.original=t,configurable:!0})}var $T,Ao,GT=m(()=>{"use strict";a();w();be();Wr();es();il();Ao=new Y("WebpackInterceptor","#8caaee");window[qt]?(Ao.info(`Patching ${qt}.push (was already existant, likely from cache!)`),ns(window[qt]),UT()):Object.defineProperty(window,qt,{get:()=>$T,set:e=>{e?.push!==Array.prototype.push&&(Ao.info(`Patching ${qt}.push`),ns(e),UT(),delete window[qt],window[qt]=e),$T=e},configurable:!0})});async function nN(){M.cloud.settingsSync&&M.cloud.authenticated&&($o.Vencord_settingsDirty?(await ur(),delete $o.Vencord_settingsDirty):await Os(!1)&&he({title:"Cloud Settings",body:"Your settings have been updated! Click here to restart to fully apply changes!",color:"var(--green-360)",onClick:Fs}))}async function oN(){if(await fl,qc(),nN(),!1)try{}catch(e){}}var Lm=m(()=>{"use strict";a();ki();qs();Fl();Rf();dr();il();Rf();GT();uo();D();qs();bs();ri();oi();dr();il();T();oN()});var rN={};ge(rN,{Api:()=>Cf,PlainSettings:()=>En,Plugins:()=>Yc,QuickCss:()=>kf,Settings:()=>M,Updater:()=>Ic,Util:()=>Bl,Webpack:()=>Af});a();a();a();var Bf=`<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Vencord QuickCSS Editor</title>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.37.1/min/vs/editor/editor.main.min.css"
integrity="sha512-wB3xfL98hWg1bpkVYSyL0js/Jx9s7FsDg9aYO6nOMSJTgPuk/PFqxXQJKKSUjteZjeYrfgo9NFBOA1r9HwDuZw=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
<style>
html,
body,
#container {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
}
</style>
</head>
<body>
<div id="container"></div>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.37.1/min/vs/loader.min.js"
integrity="sha512-A+6SvPGkIN9Rf0mUXmW4xh7rDvALXf/f0VtOUiHlDUSPknu2kcfz1KzLpOJyL2pO+nZS13hhIjLqVgiQExLJrw=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
><\/script>
<script>
require.config({
paths: {
vs: "https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.37.1/min/vs",
},
});
require(["vs/editor/editor.main"], () => {
getCurrentCss().then((css) => {
var editor = monaco.editor.create(
document.getElementById("container"),
{
value: css,
language: "css",
theme: getTheme(),
}
);
editor.onDidChangeModelContent(() =>
setCss(editor.getValue())
);
window.addEventListener("resize", () => {
// make monaco re-layout
editor.layout();
});
});
});
<\/script>
</body>
</html>
`;Cn();Fl();tt();var{localStorage:lg}=window,cg=new Set;var Nx=async()=>{},kx=At(e=>VencordNative.quickCss.set(e));window.VencordNative={native:{getVersions:()=>({}),openExternal:async e=>void open(e,"_blank")},updater:{getRepo:async()=>({ok:!0,value:"https://github.com/Vendicated/Vencord"}),getUpdates:async()=>({ok:!0,value:[]}),update:async()=>({ok:!0,value:!1}),rebuild:async()=>({ok:!0,value:!0})},quickCss:{get:()=>Qe("VencordQuickCss").then(e=>e??""),set:async e=>{await Ve("VencordQuickCss",e),cg.forEach(t=>t(e))},addChangeListener(e){cg.add(e)},openFile:Nx,async openEditor(){let e=`popup,width=${Math.min(window.innerWidth,1e3)},height=${Math.min(window.innerHeight,1e3)}`,t=open("about:blank","VencordQuickCss",e);if(!t){alert("Failed to open QuickCSS popup. Make sure to allow popups!");return}t.setCss=kx,t.getCurrentCss=()=>VencordNative.quickCss.get(),t.getTheme=()=>zr()===2?"vs-light":"vs-dark",t.document.write(Bf)}},settings:{get:()=>lg.getItem("VencordSettings")||"{}",set:async e=>lg.setItem("VencordSettings",e),getSettingsDir:async()=>"LocalStorage"}};Lm();return Lo(rN);})();
2023-07-11 23:04:56 -04:00
//# sourceURL=VencordWeb
/*! For license information please see browser.js.LEGAL.txt */