-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.js
3 lines (3 loc) · 41 KB
/
build.js
1
2
3
(()=>{var on=Object.create;var Ce=Object.defineProperty;var nn=Object.getOwnPropertyDescriptor;var rn=Object.getOwnPropertyNames;var sn=Object.getPrototypeOf,an=Object.prototype.hasOwnProperty;var Bt=e=>Ce(e,"__esModule",{value:!0});var w=(e,t)=>()=>(e&&(t=e(e=0)),t);var q=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),J=(e,t)=>{Bt(e);for(var o in t)Ce(e,o,{get:t[o],enumerable:!0})},ln=(e,t,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of rn(t))!an.call(e,n)&&n!=="default"&&Ce(e,n,{get:()=>t[n],enumerable:!(o=nn(t,n))||o.enumerable});return e},Ut=e=>ln(Bt(Ce(e!=null?on(sn(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var qe=w(()=>{i()});var xe,Je=w(()=>{i();xe=e=>{if(e??=Object.keys(window).find(o=>o.startsWith("webpackChunk")),!window[e])return;let t;return window[e].push([[Symbol()],{},o=>{t=o}]),window[e].pop(),[t.c??Object.fromEntries(Object.entries(t.m).map(([o])=>[o,{id:o,loaded:!0,exports:t(o)}])),t]}});var Ze=w(()=>{i()});var Rt=w(()=>{i();qe();Je();Ze()});var We=w(()=>{i();Rt();qe();Je();Ze()});var ee,te,oe,ne,re,zt,ie,Ft,Ye=w(()=>{i();ee=e=>t=>e.every(o=>t[o]!==void 0),te=e=>t=>t.prototype&&e.every(o=>t.prototype[o]!==void 0),oe=(e,t=!0)=>o=>(t?o.displayName:o.default?.displayName)===e,ne=e=>t=>e.every(o=>Object.keys(t).some(n=>n.toLowerCase().includes(o.toLowerCase()))),re=e=>t=>{let o=new RegExp(`(${e}$)|((\\w+\\()+${e}\\))`);if(o.test(t.displayName))return!0;if(typeof t.$$typeof=="symbol"&&t.Consumer===void 0&&(t.type||t.render)){for(;typeof t.type=="object"||typeof t.render=="object";)t=t.type??t.render;if(o.test(t.type?.displayName)||o.test(t.render?.displayName))return!0}},zt=e=>typeof e=="object"||typeof e=="function",ie=e=>t=>zt(t)&&Object.values(t).some(o=>zt(o)&&e.some(n=>o?.[n]!==void 0)),Ft=(e,t)=>o=>Object.entries(t).filter(([,n])=>n.toString().match(o)).map(([n])=>e[n]?.exports).filter(n=>n)});var fn,pn,Ht,Gt=w(()=>{i();Ye();fn=(e,t)=>{let o=[],n=a=>t.forEach(([s,c],l)=>{c&&!o[l]&&(o[l]=[]),s(a)&&(c?o[l].push(a):o[l]||(o[l]=a))});for(let a in e){let s=e[a].exports;!s||s===window||(s.default&&s.__esModule&&n(s.default),n(s))}return o},pn=e=>({find:t=>e.push([t,!1]),findAll:t=>e.push([t,!0]),findByProps:(...t)=>e.push([ee(t),!1]),findByPropsAll:(...t)=>e.push([ee(t),!0]),findByPrototypes:(...t)=>e.push([te(t),!1]),findByPrototypesAll:(...t)=>e.push([te(t),!0]),findByNestedProps:(...t)=>e.push([ie(t),!1]),findByNestedPropsAll:(...t)=>e.push([ie(t),!0]),findByDisplayName:(t,o)=>e.push([oe(t,o),!1]),findByDisplayNameAll:(t,o)=>e.push([oe(t,o),!0]),findByDispNameDeep:t=>e.push([re(t),!1]),findByDispNameDeepAll:t=>e.push([re(t),!0]),findByKeyword:(...t)=>e.push([ne(t),!1]),findByKeywordAll:(...t)=>e.push([ne(t),!0])}),Ht=e=>t=>{let o=[],n=pn(o);return t(n),fn(e,o)}});var $t,ve,Qe=w(()=>{i();Ye();Gt();$t=(e,t=!0)=>o=>{let n=[];for(let a in e){let s=e[a].exports;if(!(!s||s===window)){if(s.default&&s.__esModule&&o(s.default)){if(t)return s.default;n.push(s.default)}if(o(s)){if(t)return s;n.push(s)}}}if(!t)return n},ve=([,e,t])=>{let o=$t(e),n=$t(e,!1),a=t?Ft(e,t.m):()=>{throw new Error("findByCode does not work with this bundler")};return{batchFind:Ht(e),find:o,findAll:n,findByProps:(...s)=>o(ee(s)),findByPropsAll:(...s)=>n(ee(s)),findByPrototypes:(...s)=>o(te(s)),findByPrototypesAll:(...s)=>n(te(s)),findByNestedProps:(...s)=>o(ie(s)),findByNestedPropsAll:(...s)=>n(ie(s)),findByDisplayName:(s,c)=>o(oe(s,c)),findByDisplayNameAll:(s,c)=>n(oe(s,c)),findByDispNameDeep:s=>o(re(s)),findByDispNameDeepAll:s=>n(re(s)),findByKeyword:(...s)=>o(ne(s)),findByKeywordAll:(...s)=>n(ne(s)),findByCodeAll:a,findByCode:s=>a(s)[0]}}});var Xe=w(()=>{i();We();Qe();We();Qe()});var Z,et=w(()=>{i();Xe();Z=xe("webpackChunkdiscord_app")[1]});var R,Kt=w(()=>{i();C();R=(e,t)=>{let o=!1,n,[a,s]=T(e,!1);return a.then(c=>{o||(n=t(c))}),()=>{o=!0,s?.(),n?.()}}});var tt,k,Ee=w(()=>{i();tt=["a","b","i"],k=new Map});function Vt(e,t,o,n,a){let s=k.get(t)?.[e];if(!s)return a?Reflect.construct(t[e],o,n):t[e].apply(n,o);for(let l of s.b.values()){let d=l.call(n,o);Array.isArray(d)&&(o=d)}let c=[...s.i.values()].reduce((l,d)=>(...m)=>d.call(n,m,l),(...l)=>a?Reflect.construct(s.o,l,n):s.o.apply(n,l))(...o);for(let l of s.a.values())c=l.call(n,o,c)??c;return c}var qt=w(()=>{i();Ee()});function ot(e,t,o,n){let a=k.get(e),s=a?.[t];return s?.[n].has(o)?(s[n].delete(o),tt.every(c=>s[c].size===0)&&(Reflect.defineProperty(e,t,{value:s.o,writable:!0,configurable:!0})||(e[t]=s.o),delete a[t]),Object.keys(a).length==0&&k.delete(e),!0):!1}function Pe(){for(let[e,t]of k.entries())for(let o in t)for(let n of tt)for(let a of t[o]?.[n].keys()??[])ot(e,o,a,n)}var nt=w(()=>{i();Ee()});var _e,Jt=w(()=>{i();qt();Ee();nt();_e=e=>(t,o,n,a=!1)=>{if(typeof o[t]!="function")throw new Error(`${t} is not a function in ${o.constructor.name}`);k.has(o)||k.set(o,{});let s=k.get(o);if(!s[t]){let d=o[t];s[t]={o:d,b:new Map,i:new Map,a:new Map};let m=(P,_,N)=>{let de=Vt(t,o,_,P,N);return a&&l(),de},u=new Proxy(d,{apply:(P,_,N)=>m(_,N,!1),construct:(P,_)=>m(d,_,!0),get:(P,_,N)=>_=="toString"?d.toString.bind(d):Reflect.get(P,_,N)});Reflect.defineProperty(o,t,{value:u,configurable:!0,writable:!0})||(o[t]=u)}let c=Symbol(),l=()=>ot(o,t,c,e);return s[t][e].set(c,n),l}});var ue,W,S,Zt=w(()=>{i();Jt();nt();ue=_e("b"),W=_e("i"),S=_e("a")});function O(e){let t=document.createElement("style");return t.className="CUMCORD_INJECTED_CSS",t.textContent=e,document.head.appendChild(t),o=>{o===void 0?t.remove():t.textContent=o}}function Wt(){for(let e of document.getElementsByClassName("CUMCORD_INJECTED_CSS"))e.remove()}var L=w(()=>{i();Kt();Zt()});function T(e,t=!0){let o=e();if(o!==void 0)return o=Promise.resolve(o),t?o:[o,()=>{}];let n=[];function a(){for(let c of n)c()}let s=new Promise(c=>{n.push(ue("push",window.webpackChunkdiscord_app,([[,l]])=>{for(let d in l)n.push(S(d,l,()=>{o===void 0&&(o=e(),o!==void 0&&(a(),c(o)))},!0))}))});return t?s:[s,a]}var Yt=w(()=>{i();L()});var it={};J(it,{batchFind:()=>fe,find:()=>D,findAll:()=>hn,findAsync:()=>T,findByCode:()=>M,findByCodeAll:()=>gn,findByDispNameDeep:()=>bn,findByDispNameDeepAll:()=>Cn,findByDisplayName:()=>yn,findByDisplayNameAll:()=>wn,findByKeyword:()=>xn,findByKeywordAll:()=>vn,findByNestedProps:()=>En,findByNestedPropsAll:()=>Pn,findByProps:()=>h,findByPropsAll:()=>_n,findByPrototypes:()=>Nn,findByPrototypesAll:()=>Sn,getModule:()=>mn,modules:()=>rt,wpRequire:()=>Z});var rt,mn,D,hn,M,gn,yn,wn,bn,Cn,xn,vn,En,Pn,h,_n,Nn,Sn,fe,C=w(()=>{i();et();Xe();Yt();rt=Z.c,mn=e=>{for(let t in rt){let o=rt[t];if(o?.exports===e)return o;if(o?.exports?.__esModule&&o?.exports?.default===e)return o?.exports}},{find:D,findAll:hn,findByCode:M,findByCodeAll:gn,findByDisplayName:yn,findByDisplayNameAll:wn,findByDispNameDeep:bn,findByDispNameDeepAll:Cn,findByKeyword:xn,findByKeywordAll:vn,findByNestedProps:En,findByNestedPropsAll:Pn,findByProps:h,findByPropsAll:_n,findByPrototypes:Nn,findByPrototypesAll:Sn,batchFind:fe}=ve([void 0,Z.c,Z])});var lt={};J(lt,{Flux:()=>Dn,FluxDispatcher:()=>Se,React:()=>r,ReactDOM:()=>Me,Redux:()=>Mn,channels:()=>st,constants:()=>Ne,highlightjs:()=>Ln,i18n:()=>De,uuid:()=>at,zustand:()=>An});var Ne,st,Dn,Se,De,r,Me,Mn,An,Ln,at,z=w(()=>{i();C();[Ne,st,Dn,Se,[,De],r,Me,Mn,An,Ln,at]=fe(({findByProps:e,findByPropsAll:t,find:o})=>{e("API_HOST"),e("getVoiceChannelId"),e("connectStores"),e("_currentDispatchActionType"),t("_requestedLocale"),e("createElement"),e("hydrate"),e("createStore"),o(n=>typeof n=="function"&&n.toString().includes("[useStore, api] = create() is deprecated and will be removed in v4")),e("initHighlighting"),e("v4")})});var i=w(()=>{z()});var Ae=q(ct=>{i();"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.default=Object.freeze({GET:"GET",SET:"SET",DELETE:"DELETE",UPDATE:"UPDATE"})});var eo=q(pe=>{i();"use strict";var In=pe&&pe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pe,"__esModule",{value:!0});var Qt=In(Ae()),Xt=class{constructor(){this.listeners=Object.values(Qt.default).reduce((t,o)=>(t[o]=new Set,t),{}),this.on=function(t,o){if(this.listeners[t].has(o))throw Error(`This listener on ${t} already exists.`);this.listeners[t].add(o)},this.once=function(t,o){let n=(a,s)=>{this.off(a,n),o(a,s)};this.on(t,n)},this.off=function(t,o){this.listeners[t].delete(o)},this.emit=function(t,o){for(let n of this.listeners[t])n(t,o)};for(let t of Object.values(Qt.default))this[t.toLowerCase()]=o=>{this.emit(t,o)}}};pe.default=Xt});var to=q(me=>{i();"use strict";var Tn=me&&me.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(me,"__esModule",{value:!0});var kn=Tn(eo());function On(e={},{nestArrays:t=!0}={}){let o=new kn.default;function n(a,s,c){return new Proxy(a,{get(l,d){let m=[...c,d],u=l[d];return u!=null?(o.get({path:m,value:u}),!t&&Array.isArray(u)?u:typeof u=="object"?n(u,s,m):u):n(l[d]={},s,m)},set(l,d,m){return l[d]=m,o.set({path:[...c,d],value:m}),!0},deleteProperty(l,d){return delete l[d]?(o.delete({path:[...c,d]}),!0):!1},has(l,d){return typeof l[d]=="object"&&Object.keys(l[d]).length===0?!1:d in l}})}return Object.assign({store:n(e,e,[]),ghost:e},o)}me.default=On});var no=q(G=>{i();"use strict";var oo=G&&G.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(G,"__esModule",{value:!0});G.make=G.Events=void 0;var jn=Ae();Object.defineProperty(G,"Events",{enumerable:!0,get:function(){return oo(jn).default}});var Bn=to();Object.defineProperty(G,"make",{enumerable:!0,get:function(){return oo(Bn).default}})});var mo=q((js,po)=>{i();et();po.exports=Object.values(Z.c).find(e=>e.exports?.useState).exports});var ho=q(ge=>{i();"use strict";var Br=ge&&ge.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ge,"__esModule",{value:!0});var wt=mo(),ae=Br(Ae());function Ur(e,t=!1,o=()=>!0){let n=(0,wt.useRef)(e.ghost),[,a]=(0,wt.useReducer)(s=>~s,0);return(0,wt.useEffect)(()=>{function s(c,l){o(c,l)&&a()}return e.on(ae.default.UPDATE,s),t||(e.on(ae.default.SET,s),e.on(ae.default.DELETE,s)),()=>{e.off(ae.default.UPDATE,s),t||(e.off(ae.default.SET,s),e.off(ae.default.DELETE,s))}},[]),e.ghost}ge.default=Ur});var go=q(le=>{i();"use strict";var Rr=le&&le.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(le,"__esModule",{value:!0});le.useNest=void 0;var zr=ho();Object.defineProperty(le,"useNest",{enumerable:!0,get:function(){return Rr(zr).default}})});i();i();i();C();z();var ft={};J(ft,{idbKeyval:()=>$,nests:()=>v.default});i();var v=Ut(no());var $={};J($,{clear:()=>Kn,createStore:()=>io,del:()=>$n,entries:()=>Jn,get:()=>Rn,getMany:()=>Hn,keys:()=>Vn,promisifyRequest:()=>j,set:()=>zn,setMany:()=>Fn,update:()=>Gn,values:()=>qn});i();i();function Un(){if(!(!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent))||!indexedDB.databases)return Promise.resolve();let t;return new Promise(o=>{let n=()=>indexedDB.databases().finally(o);t=setInterval(n,100),n()}).finally(()=>clearInterval(t))}var ro=Un;function j(e){return new Promise((t,o)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>o(e.error)})}function io(e,t){let o=ro().then(()=>{let n=indexedDB.open(e);return n.onupgradeneeded=()=>n.result.createObjectStore(t),j(n)});return(n,a)=>o.then(s=>a(s.transaction(t,n).objectStore(t)))}var dt;function B(){return dt||(dt=io("keyval-store","keyval")),dt}function Rn(e,t=B()){return t("readonly",o=>j(o.get(e)))}function zn(e,t,o=B()){return o("readwrite",n=>(n.put(t,e),j(n.transaction)))}function Fn(e,t=B()){return t("readwrite",o=>(e.forEach(n=>o.put(n[1],n[0])),j(o.transaction)))}function Hn(e,t=B()){return t("readonly",o=>Promise.all(e.map(n=>j(o.get(n)))))}function Gn(e,t,o=B()){return o("readwrite",n=>new Promise((a,s)=>{n.get(e).onsuccess=function(){try{n.put(t(this.result),e),a(j(n.transaction))}catch(c){s(c)}}}))}function $n(e,t=B()){return t("readwrite",o=>(o.delete(e),j(o.transaction)))}function Kn(e=B()){return e("readwrite",t=>(t.clear(),j(t.transaction)))}function ut(e,t){return e("readonly",o=>(o.openCursor().onsuccess=function(){!this.result||(t(this.result),this.result.continue())},j(o.transaction)))}function Vn(e=B()){let t=[];return ut(e,o=>t.push(o.key)).then(()=>t)}function qn(e=B()){let t=[];return ut(e,o=>t.push(o.value)).then(()=>t)}function Jn(e=B()){let t=[];return ut(e,o=>t.push([o.key,o.value])).then(()=>t)}L();i();i();async function pt(e){let t=await $.get(`${e}_CUMCORD_STORE`),o=v.default.make(t??{}),n=()=>$.set(`${e}_CUMCORD_STORE`,{...o.ghost});return o.on(v.default.Events.SET,n),o.on(v.default.Events.DELETE,n),o}i();C();var gt={};J(gt,{ErrorBoundary:()=>A});i();i();z();i();z();var Zn="Plugins",Wn="Search...",Yn="Delete",Qn="Copied!",Xn="Invalid",er="Installed",tr="Install",or="Cancel",nr="Confirm",rr="{0} by {1}",ir="Copy Link",sr="What is this?",ar="Are you sure?",lr="Add Plugin",cr="Open settings",dr="Toggle updates",ur="Failed to import plugin",fr="https://example.com/plugin",pr="Copied plugin URL to clipboard.",mr="Oops, we had a fucky wucky. (Cumcord)",hr="Are you sure you want to do that?",gr="Do you want to remove this plugin?",yr="All of {}'s data will be deleted and cannot be recovered.",wr=`This is a Cumcord feature. It allows you to install plugins straight from chat.
Simply hit the install button on the embed.`,br="Plugin {} not found",Cr="Plugin {} already loaded",xr="Plugin {} isn't loaded",vr="Plugin manifest not returning 200",Er="Plugin not returning 200",Pr="Plugin manifest cannot be parsed: {}",_r="Do you want to install this plugin?",Nr="Cumcord plugins can run code on your computer and can be potentially dangerous. Only click confirm if you trust the plugin from `{}`.",Sr="Plugin `{0}` will be disabled because it errored on eval: {1}",Dr="Plugin `{0}` errored on load: {1}",Mr="Plugin `{0}` errored on unload: {1}",mt={PLUGINS:Zn,SEARCH:Wn,DELETE:Yn,COPIED:Qn,INVALID:Xn,INSTALLED:er,INSTALL:tr,CANCEL:or,CONFIRM:nr,BY:rr,COPY_LINK:ir,WHAT_IS_THIS:sr,ARE_YOU_SURE:ar,ADD_PLUGIN:lr,OPEN_SETTINGS:cr,TOGGLE_UPDATES:dr,FAILED_PLUGIN_IMPORT:ur,PLUGIN_URL_PLACEHOLDER:fr,COPIED_URL:pr,ERR_HEADER:mr,MODAL_DEFAULT:hr,REMOVE_PROMPT:gr,DELETE_DISCLAIMER:yr,EMBEDS_WHATIS:wr,PLUGIN_NOT_FOUND:br,PLUGIN_LOADED:Cr,PLUGIN_NOT_LOADED:xr,NO_MAN_200:vr,NO_200:Er,NO_PARSE:Pr,INSTALL_PROMPT:_r,CAN_BE_DANGEROUS:Nr,PLUGIN_EVAL_ERR:Sr,PLUGIN_LOAD_ERR:Dr,PLUGIN_UNLOAD_ERR:Mr};var Ar="https://raw.githubusercontent.com/Cumcord/builds/main/i18n/",Lr=["ar","de","el","es","en-GB","fr","he","hl","hu","it","nl","pl","pt-BR","ru","tr","vi"],Ir={"pt-BR":"pt_BR"},ht={},so=()=>{let e=De._requestedLocale;ht[e]||!Lr.includes(e)||fetch(`${Ar}${Ir[e]??e}.json`).then(async t=>ht[e]=await t.json())};so();var Le=new Proxy(mt,{get:(e,t)=>(so(),ht[De._requestedLocale]?.[t]??mt[t])}),p=Le,x=(e,...t)=>{let o=-1;return Le[e].replaceAll(/{(\d+)?}/g,(n,a)=>(o++,t[a??o]))},ao=(e,...t)=>{let o=[],n="",a=0;for(let s=0;s<Le[e].length;s++){n+=Le[e][s];let c=n.match(/{(\d+)?}/);if(c){c.index!==0&&o.push([-1,n.slice(0,c.index)]);let l=parseInt(c[1]??a);o.push([l,t[l]]),a++,n=""}}return o.push([-1,n]),o};var lo;fetch("https://legacy.reactjs.org/page-data/docs/error-decoder.html/page-data.json").then(async e=>{lo=JSON.parse((await e.json()).result.data.errorCodesJson.internal.contentDigest)});var A=class extends r.Component{constructor(t){super(t);this.state={hasErr:!1}}static getDerivedStateFromError(t){return{hasErr:!0,errTxt:A.decodeError(t)??t.message??t.toString()}}static decodeError(t){if(t instanceof Error)return lo[t.message.match(/Minified React error #(\d+)/)?.[1]]}render(){return this.state.hasErr?r.createElement("div",{className:"cumcord-error-handler"},r.createElement("h1",{className:"cumcord-error-handler-title"},p.ERR_HEADER),r.createElement("code",{className:"cumcord-error-handler-code"},this.state.errTxt),r.createElement("button",{className:"cumcord-error-handler-btn",onClick:()=>this.setState({errTxt:null,hasErr:!1})},"Retry")):this.props.children}};var Ie=h("ModalCloseButton"),co=M(".uppercase]").default,uo=D(e=>e?.default?.Justify).default,{openModal:Tr}=h("openModal","openModalLazy"),se=(e,t)=>Tr(o=>r.createElement(Ie.ModalRoot,{transitionState:o.transitionState,size:"large",className:"cumcord-settings-modal"},r.createElement(A,null,r.createElement(Ie.ModalHeader,{separator:!1},r.createElement(uo.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},r.createElement(co,{tag:"h2",size:co.Sizes.SIZE_20},e)),r.createElement(uo.Child,{basis:"auto",grow:0,shrink:1,wrap:!1},r.createElement(Ie.ModalCloseButton,{onClick:o.onClose}))),r.createElement(Ie.ModalContent,null,typeof t=="function"?r.createElement(t):t))));var bt={};J(bt,{copyText:()=>Y,findByDomNode:()=>Co,findInReactTree:()=>fo,findInTree:()=>he,getOwnerInstance:()=>yo,getReactInstance:()=>Te,logger:()=>y,sleep:()=>wo,useFetchModule:()=>Oe,useNest:()=>I.useNest});i();i();function he(e,t,{walkable:o=null,ignore:n=[],limit:a=100}={}){let s=0;function c(l,d,{walkable:m=null,ignore:u=[]}={}){if(s+=1,!(s>a)){if(typeof d=="string"){if(l.hasOwnProperty(d))return l[d]}else if(d(l))return l;if(!!l){if(Array.isArray(l))for(let b of l){let P=c(b,d,{walkable:m,ignore:u});if(P)return P}else if(typeof l=="object"){for(let b of Object.keys(l))if(!(m!=null&&!m.includes(b))&&!u.includes(b))try{let P=c(l[b],d,{walkable:m,ignore:u});if(P)return P}catch{}}}}}return c(e,t,{walkable:o,ignore:n})}i();var fo=(e,t)=>he(e,t,{walkable:["props","children","child","sibling"]});var y={};J(y,{error:()=>jr,log:()=>kr,warn:()=>Or});i();var yt=(e,t)=>(...o)=>console[e]("%cCumcord%c",`background-color: ${t}; color: white; border-radius: 4px; padding: 0px 6px 0px 6px; font-weight: bold`,"",...o),kr=yt("log","#7289da"),Or=yt("warn","#debf18"),jr=yt("error","red");i();var I=Ut(go());i();function Y(e){if(window.DiscordNative){DiscordNative.clipboard.copy(e);return}navigator.clipboard.writeText(e).catch(()=>{let t=document.createElement("textarea");t.style.visibility="hidden",t.style.position="fixed",t.style.top="0",t.style.left="0",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy")}catch(o){console.error(o)}document.body.removeChild(t)})}i();var Te=e=>e.__reactFiber$;i();var yo=e=>{for(let t=Te(e);t;t=t.return)if(t.stateNode?.forceUpdate)return t.stateNode};i();var wo=e=>new Promise(t=>setTimeout(t,e));i();z();var ke={},bo={name:"Invalid module.",description:"This module does not exist.",author:"Unknown",invalid:!0},Oe=e=>{let[t,o]=r.useState(ke[e]);return r.useEffect(()=>{ke[e]||fetch(e).then(n=>n.json()).then(n=>{ke[e]=n,o(n)},()=>{ke[e]=bo,o(bo)})},[e]),t??{name:"Loading...",description:"This module is still loading.",author:"Loading..."}};i();var Fr=["Clickable","Tooltip"],Co=(e,{parent:t=!1,displayName:o=!0,blockList:n=Fr}={})=>{let a=d=>!d?.type?.displayName||n.includes(d?.type?.displayName),s=d=>typeof d?.type!="string"&&(o?!a(d):!0),c=d=>s(d)?d?.type:c(d.return),l=c(cumcord.utils.getReactInstance(e));return t?find(d=>d?.default===l):l};var Ct={cache:"no-store"},E=v.default.make({}),g={},xo,Hr=window.eval;function xt(e,t){let o=Object.assign({pluginData:t},xo),n=new URL(t.id),a=`(cumcord)=>{return ${e}}`+atob("Ci8v")+`# sourceURL=${n.hostname}${n.pathname}`,s=Hr(a)(o);return typeof s=="function"?s(t):s}async function vt(e){let t=g.ghost[e];if(!t)throw new Error(x("PLUGIN_NOT_FOUND",e));if(E.ghost[e])throw new Error(x("PLUGIN_LOADED",e));let o,n=!1;try{o=xt(t.js,{persist:await pt(e),id:e,manifest:t.manifest,showSettings:()=>se(t.manifest.name,E.ghost[e].settings)})}catch(a){y.error(x("PLUGIN_EVAL_ERR",t.manifest.name,a)),n=!0}try{o.onLoad?.()}catch(a){y.error(x("PLUGIN_LOAD_ERR",t.manifest.name,a))}E.store[e]=o,n&&setTimeout(()=>{try{t.onUnload()}catch(a){y.error(x("PLUGIN_UNLOAD_ERR",t.manifest.name,a))}t.enabled=!1})}function Et(e){let t=E.ghost[e];if(!t)throw new Error(x("PLUGIN_NOT_FOUND",e));if(!E.ghost[e])throw new Error(x("PLUGIN_NOT_LOADED",e));try{t.onUnload()}catch(o){y.error(`plugin ${t.manifest.name} errored on unload:`,o)}delete E.store[e]}async function je(e){let t=g.store[e];if(!g.ghost[e])throw new Error(x("PLUGIN_NOT_FOUND",e));t.enabled?(await Et(e),t.enabled=!1):(await vt(e),t.enabled=!0)}async function F(e){let t=e.replace(/\/?$/,"/"),o=new URL("plugin.json",t).href,n=new URL("plugin.js",t).href,a=g.ghost[t],s=a?g.store[t]:void 0,c=a?.enabled??!0,l=a?.update??!0;a?.update===void 0&&a&&(s.update=!0,l=!0);let d;try{let b=await fetch(o,Ct);if(d=await b.json(),b.status!==200&&!a)throw p.NO_MAN_200}catch(b){if(!a)throw new Error(x("NO_PARSE",b))}if(a){if(d&&l){if(s.manifest.hash!==d.hash){let b=await fetch(n,Ct);if(b.status!==200)throw new Error(p.NO_200);s.js=await b.text()}s.manifest!==d&&(s.manifest=d)}c&&await vt(t);return}let m=await fetch(n,Ct);if(m.status!==200)throw new Error(p.NO_200);let u=await m.text();g.store[t]={manifest:d,js:u,enabled:c,update:l},c&&await vt(t)}function Be(e){try{Et(e)}catch{}delete g.store[e]}async function vo(){g=await pt("PLUGIN_CACHE")}async function Eo(e){xo=e,await Promise.allSettled(Object.keys(g.ghost).map(F))}function Po(){for(let e of Object.keys(g.ghost))try{Et(e)}catch{}}i();var K=!1,U,Pt=v.default.make({});function _t(){if(!K)return y.error("Dev mode is off!");if(!U)return y.error("No plugin loaded!");if(!U.settings)return y.warn("No settings for this plugin.");se("Fake Dev Plugin",U.settings)}var Nt=!1;async function _o(){if(!(Nt||!K)){if(U){y.log("Unloading previous plugin version...");try{U.onUnload()}catch(e){y.error("Failed to unload:",e)}}y.log("Loading new plugin version..."),Nt=!0;try{let e=await fetch("http://127.0.0.1:42069").then(t=>t.text());U=xt(e,{persist:Pt,id:"https://FAKE_PLUGIN_ID",manifest:{name:"Fake Dev Plugin",description:"A fake plugin for development purposes.",author:"You",hash:"FAKE_PLUGIN_HASH",license:"Unlicensed"},showSettings:_t}),U.onLoad?.()}catch(e){y.error("Failed to load:",e)}finally{Nt=!1}}}function No(){K=!K,K||(U.onUnload(),U=void 0,Pt=v.default.make({})),y.log(`Dev mode is now ${K?"on":"off"}.`)}function So(){return K?U?Pt:y.error("No plugin loaded!"):y.error("Dev mode is off!")}var Ue=()=>K;i();C();z();L();var Do=h("useSearchManager"),{sendMessage:Mo}=h("sendMessage"),{createBotMessage:Gr}=h("createBotMessage"),{receiveMessage:$r}=h("receiveMessage"),Re="917806991081099275",Kr="2d179b0c17f137125df3f01949cb0e5f",Ao="f76f807bfc5692f3f14d1935f063d64b",Q={id:Re,icon:Kr,name:"Cumcord",type:1,bot:{id:Re,username:"Cumcord",avatar:Ao}},V=[],Vr={string:3,int:4,bool:5,user:6,channel:7,role:8},qr=e=>([t],o)=>{if(t!==Q.id)return o(t);Se.dirtyDispatch({type:Ne.ActionTypes.APPLICATION_COMMAND_SEARCH_MANAGER_UPDATE,channelId:e,commandType:1,state:{filteredSectionId:Q.id}}),Se.dirtyDispatch({type:Ne.ActionTypes.APPLICATION_COMMAND_SEARCH_MANAGER_UPDATE,channelId:e,commandType:1,state:{applicationCommands:V}})};function Lo(){let e;S("useSearchManager",Do,([t],o)=>{if(e?.(),e=W("filterSection",o,qr(t.id)),o.sectionDescriptors.some(l=>l.id===Q.id)||V.length===0||(o.sectionDescriptors.splice(o.sectionDescriptors.length-1,0,Q),o.filteredSectionId&&o.filteredSectionId!==Q.id))return;let n=o.activeSections.findIndex(l=>l.id==="-1"),a=n!==-1?n:o.activeSections.length;o.activeSections.splice(a,0,Q);let s=o.commandsByActiveSection.findIndex(l=>l.section.id==="-1"),c=s!==-1?s:o.commandsByActiveSection.length;o.commandsByActiveSection.splice(c,0,{section:Q,data:V}),o.commands.push(...V)}),S("getQueryCommands",Do.default,([,,t],o)=>{if(!(!t||t.startsWith("/")))return[...o??[],...V.filter(n=>n.name.startsWith(t))]})}function Io({name:e,description:t,args:o,handler:n}){let a={applicationId:Re,type:3,target:1,description:t,displayDescription:t,name:e,displayName:e,id:"CUMCORD_COMMAND"};return o&&(a.options=o.map(s=>{s.type||(s.type="string");let c={...s,displayName:s.name,displayDescription:s.description};return c.type=Vr[s.type],c.required=c.required===void 0?!0:c.required,c})),a.execute=(s,c)=>{if(!n)return;let l={};if(o)for(let d of s)l[d.name]=d.value;(async()=>{try{let d=await n({args:l,...c},m=>{let u=Gr(c.channel.id);u.author.username="Cumcord",u.author.avatar=Ao,u.author.id=Re,u.channel_id=c.channel.id,typeof m=="string"?u.content=m:u={...u,...m},$r(st.getChannelId(),u)});if(d)switch(typeof d){case"string":Mo(c.channel.id,{content:d,validNonShortcutEmojis:[]});break;case"undefined":break;default:Mo(c.channel.id,d)}}catch(d){y.error(d)}})()},V.push(a),()=>{let s=V.indexOf(a);s>-1&&V.splice(s,1)}}i();C();i();z();var ye={},To=(e,t)=>o=>{o.name="CUMCORD_WEBSOCKET",o.uuid=t.uuid??at.v4(),e(JSON.stringify(o))},St=(e,t,o)=>n=>To(e,t)({status:o,message:n}),Dt=e=>t=>{let o;try{o=JSON.parse(t)}catch{return St(e,{},"ERROR")("Did not receive valid JSON")}let n={raw:To(e,o),ok:St(e,o,"OK"),error:St(e,o,"ERROR")};if(typeof o.action!="string")return n.error("No action provided.");let a=ye[o.action.toLowerCase()];if(!a)return n.error(`Unknown action: ${o.action}`);a(o,n)};function ze(e,t){if(e=e.toLowerCase(),ye[e])throw new Error(`Command ${e} already registered.`);return ye[e]=t,()=>delete ye[e]}function ko(){ye={}}L();i();i();i();C();var[{openModal:Jr},Mt,{ConfirmModal:Zr},Wr]=fe(({find:e,findByProps:t})=>{t("openModalLazy"),t("button","colorRed"),t("ConfirmModal"),e(o=>o?.defaultProps?.parser)}),X=async({header:e=p.ARE_YOU_SURE,confirmText:t=p.CONFIRM,cancelText:o=p.CANCEL,content:n=p.MODAL_DEFAULT,type:a="neutral"}={},s=()=>{})=>new Promise(c=>{let l=!1,d={danger:Mt.colorRed,confirm:Mt.colorGreen}[a.toLowerCase()]??Mt.colorBrandNew;function m(u){l||(l=!0,s(u),c(u))}Jr(u=>(u.transitionState===3&&m(!1),r.createElement(Zr,{...{header:e,confirmText:t,cancelText:o},transitionState:u.transitionState,confirmButtonColor:d,onClose:()=>m(!1),onCancel:()=>{m(!1),u.onClose()},onConfirm:()=>{m(!0),u.onClose()}},r.createElement(Wr,{editable:!1},n))))});var Oo={get_info:(e,{ok:t})=>t(),update_plugin_dev:(e,{ok:t,error:o})=>{if(!Ue())return o("Dev mode is not enabled.");_o(),t()},install_plugin:(e,{ok:t,error:o})=>{if(!e.url)return o("No URL provided.");if(!e.url.match(/^(http|https):\/\/[^ "]+$/))return o("Invalid URL.");window.DiscordNative?.window.focus(),X({header:p.INSTALL_PROMPT,content:x("CAN_BE_DANGEROUS",e.url),confirmText:p.INSTALL,type:"danger"},n=>{if(!n)return o("Plugin installation cancelled.");F(e.url).then(t,o)})}};var Fe=new Set;function jo(){for(let[e,t]of Object.entries(Oo))ze(e,t);!window.DiscordNative||R(()=>M("RPCServer:WSS"),({default:e})=>W("handleConnection",e,(t,o)=>{let n=t[0];if(n.upgradeReq().url!=="/cumcord")return o(...t);Fe.add(n),n.on("message",Dt(n.send)),n.on("close",()=>Fe.delete(n))}))}function Bo(){if(window.DiscordNative){for(let e of Fe)e.close();Fe.clear(),ko()}}var Uo=(e,t)=>Dt(t)(e);i();z();L();i();C();var Yr=M(".uppercase]").default,Ro=D(e=>e?.default?.Colors?.STANDARD).default,zo=e=>r.createElement("div",{onClick:e.onClick,className:"cumcord-toast "+(e.className??"")},e.title&&r.createElement(Yr,{className:"cumcord-toast-title"},e.title),e.content&&r.createElement("div",{className:"cumcord-toast-content"},r.createElement(Ro,{size:Ro.Sizes.SIZE_16},e.content)));i();i();var H=v.default.make({toasts:[]});var Fo=()=>((0,I.useNest)(H),r.createElement(r.Fragment,null,H.ghost.toasts.map(e=>e())));var we=document.createElement("div");we.className="cumcord-toast-container";function Ho(){O("@keyframes cumcord-fadeIn{0%{opacity:0}100%{opacity:1}}.cumcord-toast-container{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:none;display:flex;flex-direction:column-reverse;align-items:flex-end;z-index:999999}.cumcord-toast{background-color:var(--background-floating);padding:18px;margin-right:10px;margin-bottom:10px;display:flex;flex-direction:column;justify-content:center;gap:14px;align-content:center;pointer-events:all;border-radius:5px;box-shadow:var(--elevation-high);animation:cumcord-fadeIn .3s;max-width:400px;overflow-wrap:anywhere}.cumcord-toast-title{font-size:22px;line-height:1}"),document.getElementById("app-mount").prepend(we),Me.render(r.createElement(Fo,null),we)}function Go(){Me.unmountComponentAtNode(we),we.remove()}function ce({title:e,content:t,onClick:o=()=>{},className:n,duration:a=3e3}){let s=()=>r.createElement(zo,{...{onClick:o,className:n,title:e,content:t}});H.ghost.toasts.push(s),H.update();function c(){let l=H.ghost.toasts.indexOf(s);l>-1&&(H.ghost.toasts.splice(l,1),H.update())}return a!==1/0&&setTimeout(c,a),c}i();L();C();var He=[];function Ge(e,t,o){let n={section:e,label:t,element:o};return He.push(n),()=>{let a=He.indexOf(n);a!==-1&&He.splice(a,1)}}var $o=()=>R(()=>h("SHAKE_INTENSITY_DEFAULT").default.prototype,e=>S("getPredicateSections",e,(t,o)=>{let n=o.findIndex(a=>a.section==="changelog")-1;if(!(n<0))return o.splice(n,0,{section:"DIVIDER"},{section:"HEADER",label:"Cumcord"},...He),o}));var Ko=(e,t)=>{let o={uninject:e,cum:t,modules:{webpack:{...it},common:{...lt},internal:{...ft}},plugins:{importPlugin:F,removePlugin:Be,togglePlugin:je},patcher:{before:ue,after:S,instead:W,findAndPatch:R,injectCSS:O},ui:{toasts:{showToast:ce},modals:{showConfirmationModal:X},components:{...gt},userSettings:{registerSection:Ge}},utils:{...bt},commands:{addCommand:Io},websocket:{addHandler:ze,triggerHandler:Uo}};return window.DiscordNative&&(o.dev={toggleDevMode:No,showSettings:_t},Object.defineProperties(o.dev,{storage:{configurable:!0,enumerable:!0,get:So},isEnabled:{configurable:!0,enumerable:!0,get:Ue}})),o};L();L();var $e=[],Vo=async(e,t,o)=>{let n=Ko(()=>(Po(),Bo(),Pe(),Go(),Wt(),t?.(),!0),(a=2,s=6)=>{let c=`8${"=".repeat(a)}D ${"~".repeat(s)}`;return Array.isArray($e)?new Promise(l=>$e.push(()=>l(c))):c});o?.(n),O(".cumcord-error-handler{font-family:var(--font-display);color:var(--text-normal);padding:16px}.cumcord-error-handler-title{margin-bottom:7px;font-weight:700;font-size:24px}.cumcord-error-handler-code{background-color:var(--background-secondary);font-family:var(--font-code);user-select:text}.cumcord-error-handler-btn{color:var(--text-danger);background:0 0;border:1px solid var(--text-danger);border-radius:3px;transition-property:color,background-color,border-color;transition-duration:.17s;transition-timing-function:ease;display:block;padding:.1rem .5rem}.cumcord-error-handler-btn:hover{color:var(--button-outline-danger-text-hover);background:var(--text-danger)}"),Ho(),jo(),$o(),await vo(),n.plugins.installed=g,n.plugins.loaded=E;try{Lo()}catch{}return await e?.(),await Eo(n),$e.forEach(a=>a()),$e=void 0,n};i();C();L();i();C();i();C();async function At(){let{svgContentRight:e,svgContentLines:t,svgContentLeft:o,svgDots:n,svgTag:a}=await T(()=>h("svgContentRight"));return function({className:c}){return r.createElement("svg",{width:"57",height:"40",viewBox:"0 0 57 40",fill:"none",className:c},r.createElement("path",{d:"M49.4949 36H3.9596C1.78182 36 0 34.2486 0 32.1081V3.89189C0 1.75135 1.78182 0 3.9596 0H49.4949C51.6727 0 53.4545 1.75135 53.4545 3.89189V32.1081C53.4545 34.2486 51.6727 36 49.4949 36Z",className:e}),r.createElement("path",{d:"M44.5456 10.8889H25.7375C24.6486 10.8889 23.7577 9.99798 23.7577 8.90909C23.7577 7.8202 24.6486 6.92929 25.7375 6.92929H44.5456C45.6345 6.92929 46.5254 7.8202 46.5254 8.90909C46.5254 9.99798 45.6345 10.8889 44.5456 10.8889ZM19.7981 10.8889C18.7092 10.8889 17.8183 9.99798 17.8183 8.90909C17.8183 7.8202 18.7092 6.92929 19.7981 6.92929C20.887 6.92929 21.7779 7.8202 21.7779 8.90909C21.7779 9.99798 20.887 10.8889 19.7981 10.8889ZM44.5456 19.798H25.7375C24.6486 19.798 23.7577 18.9071 23.7577 17.8182C23.7577 16.7293 24.6486 15.8384 25.7375 15.8384H44.5456C45.6345 15.8384 46.5254 16.7293 46.5254 17.8182C46.5254 18.9071 45.6345 19.798 44.5456 19.798ZM19.7981 19.798C18.7092 19.798 17.8183 18.9071 17.8183 17.8182C17.8183 16.7293 18.7092 15.8384 19.7981 15.8384C20.887 15.8384 21.7779 16.7293 21.7779 17.8182C21.7779 18.9071 20.887 19.798 19.7981 19.798ZM31.6365 28.7071H25.7375C24.6486 28.7071 23.7577 27.8162 23.7577 26.7273C23.7577 25.6384 24.6486 24.7475 25.7375 24.7475H31.6365C32.7254 24.7475 33.6163 25.6384 33.6163 26.7273C33.6163 27.8162 32.7254 28.7071 31.6365 28.7071ZM19.7981 28.7071C18.7092 28.7071 17.8183 27.8162 17.8183 26.7273C17.8183 25.6384 18.7092 24.7475 19.7981 24.7475C20.887 24.7475 21.7779 25.6384 21.7779 26.7273C21.7779 27.8162 20.887 28.7071 19.7981 28.7071Z",className:t}),r.createElement("path",{d:"M3.9596 36H13.8586V0H3.9596C1.78182 0 0 1.78182 0 3.9596V32.0404C0 34.2182 1.78182 36 3.9596 36Z",className:o}),r.createElement("path",{d:"M6.9293 10.8889C5.24647 10.8889 3.9596 9.60202 3.9596 7.91919C3.9596 6.23636 5.24647 4.94949 6.9293 4.94949C8.61212 4.94949 9.89899 6.23636 9.89899 7.91919C9.89899 9.60202 8.61212 10.8889 6.9293 10.8889ZM6.9293 20.7879C5.24647 20.7879 3.9596 19.501 3.9596 17.8182C3.9596 16.1354 5.24647 14.8485 6.9293 14.8485C8.61212 14.8485 9.89899 16.1354 9.89899 17.8182C9.89899 19.501 8.61212 20.7879 6.9293 20.7879ZM6.9293 30.6869C5.24647 30.6869 3.9596 29.4 3.9596 27.7172C3.9596 26.0343 5.24647 24.7475 6.9293 24.7475C8.61212 24.7475 9.89899 26.0343 9.89899 27.7172C9.89899 29.4 8.61212 30.6869 6.9293 30.6869Z",className:n}),r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M41.4328 33L46 37.7129L43.7836 40L37 32.9999L39.2164 30.7128L39.2165 30.7129L43.7836 26L46 28.2871L41.4328 33Z",className:a}),r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M54.7821 35.2871L54.7841 35.2892L57 33.0021L50.2159 26L48 28.2871L52.5662 33L48 37.7129L50.2159 40L54.7821 35.2871Z",className:a}))}}i();C();var{Clickable:Qr}=h("Clickable"),{Link:Xr}=h("Link");async function Lt(){let{copyLink:e,copyLinkIcon:t,copied:o}=await T(()=>h("titleRegion"));return({url:n})=>{let[a,s]=r.useState(!1),c=r.useRef();r.useEffect(()=>()=>clearTimeout(c.current));function l(){a||(Y(n),s(!0),c.current=setTimeout(()=>s(!1),2e3))}return r.createElement(Qr,{className:`${e}${a?" "+o:""}`,onClick:l},r.createElement(Xr,{className:t,href:n,target:"_blank"}),a?p.COPIED_URL:p.COPY_LINK)}}var Ke=D(e=>e?.default?.Colors?.STANDARD).default,be=h("Sizes","Colors","Looks","DropdownSizes"),Ll=M(".minorContainer").default,{Tooltip:ei}=h("Tooltip"),Il=h("openModal","useModalsStore"),Tl=M("M6 1C3.243 1 1 3.244 1 6c0 2.758 2.243 5 5 5s5-2.242 5-5c0-2.756-2.243-5-5-5zm0 2.376a.625.625 0 110 1.25.625.625 0 010-1.25zM7.5 8.5h-3v-1h1V6H5V5h1a.5.5 0 01.5.5v2h1v1z").default;async function It(){let{wrapper:e,content:t,title:o,titleRegion:n,icon:a,infoLink:s,infoIcon:c,buildInfo:l,buildDetails:d,subHead:m}=await T(()=>h("titleRegion")),u=await Lt(),b=await At();return function({url:_}){(0,I.useNest)(g);let N=Oe(_+"/plugin.json"),de=g.ghost[_];return r.createElement("div",{className:e},r.createElement("div",{className:t},r.createElement(b,{className:a}),r.createElement("div",{className:l},r.createElement(Ke,{size:Ke.Sizes.SIZE_14,className:m},N.name),r.createElement(ei,{position:"top",text:N.description},tn=>r.createElement(Ke,{...tn,size:Ke.Sizes.SIZE_16,className:d,style:{maxWidth:"215px"}},N.description))),r.createElement(be,{size:be.Sizes.MEDIUM,color:N.invalid?be.Colors.GREY:de?be.Colors.BLUE:be.Colors.GREEN,disabled:N.invalid||de,onClick:()=>F(_)},N.invalid?p.INVALID:de?p.INSTALLED:p.INSTALL)))}}var ti=/^https:\/\/cumcordplugins\.github\.io\/Condom\/(.+?)\/(.+?)+$/i,qo=async()=>{let e=await It();O(".cumcord-plugembeds-alerttext{margin:0;}"),R(()=>h("defaultRules","astParserFor"),t=>S("react",t.defaultRules.link,o=>{if(!!ti.test(o[0].target))return o[0].target.endsWith("/")||(o[0].target+="/"),r.createElement(A,null,r.createElement(e,{url:o[0].target}))}))};i();L();i();i();C();var{Card:oi,FormText:ni,Switch:ri,Tooltip:Ve}=h("FormTitle"),Tt=h("card","cardBrand","cardDanger"),ii=M(".uppercase]").default,kt=D(e=>e?.default?.Justify).default,si=D(e=>e?.defaultProps?.parser),Jo=e=>{let t=g.ghost[e.pluginId];if(!t?.manifest)return null;(0,I.useNest)(E,!1,(n,a)=>a.path[0]===e.pluginId);let o=E.ghost[e.pluginId]&&E.ghost[e.pluginId].settings?r.createElement(Ve,{position:"top",text:p.OPEN_SETTINGS},n=>r.createElement("svg",{...n,onClick:()=>se(t.manifest.name,E.ghost[e.pluginId].settings),className:"cumcord-card-settings",viewBox:"0 0 24 24"},r.createElement("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"}))):null;return r.createElement(oi,{className:`cumcord-plugin-card ${Tt.card} ${Tt.cardPrimary} ${Tt.outline}`,type:"cardPrimary",outline:!1,editable:!1},r.createElement(kt,{justify:kt.Justify.BETWEEN,align:kt.Align.CENTER},r.createElement("div",{className:"cumcord-card-header"},r.createElement(ni,{className:"cumcord-card-author",tag:"h5"},ao("BY",t.manifest.name,t.manifest.author).map(([n,a])=>n===-1?a:n===0?r.createElement(ii,{className:"cumcord-card-title"},a):r.createElement("strong",null,a)))),r.createElement("div",{className:"cumcord-card-right"},r.createElement("div",{className:"cumcord-card-buttons"},o,r.createElement(Ve,{position:"top",text:p.COPY_LINK},n=>r.createElement("svg",{...n,onClick:()=>{ce({content:p.COPIED_URL,duration:1300}),Y(e.pluginId)},className:"cumcord-card-copy",viewBox:"0 0 24 24"},r.createElement("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"}))),r.createElement(Ve,{position:"top",text:p.TOGGLE_UPDATES},n=>r.createElement("svg",{...n,onClick:()=>{g.store[e.pluginId].update=!g.store[e.pluginId].update},viewBox:"0 0 24 24"},r.createElement("path",{d:t.update?"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3v7.12zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8h1.5z":"M8.67 5.84 7.22 4.39C8.6 3.51 10.24 3 12 3c2.74 0 5.19 1.23 6.84 3.16L21 4v6h-6l2.41-2.41C16.12 6.02 14.18 5 12 5c-1.2 0-2.34.31-3.33.84zM13 7h-2v1.17l2 2V7zm6.78 15.61-3-3C15.39 20.48 13.76 21 12 21c-4.97 0-9-4.03-9-9 0-1.76.51-3.4 1.39-4.78l-3-3L2.8 2.81l18.38 18.38-1.4 1.42zm-4.46-4.46L5.84 8.67C5.31 9.66 5 10.8 5 12c0 3.86 3.14 7 7 7 1.2 0 2.34-.31 3.32-.85zM20.94 13h-2.02c-.12.83-.39 1.61-.77 2.32l1.47 1.47c.7-1.12 1.17-2.41 1.32-3.79z"}))),r.createElement(Ve,{position:"top",text:p.DELETE},n=>r.createElement("svg",{...n,onClick:()=>X({header:p.REMOVE_PROMPT,content:x("DELETE_DISCLAIMER",t.manifest.name),type:"danger",confirmText:p.DELETE},a=>{!a||(Be(e.pluginId),$.del(`${e.pluginId}_CUMCORD_STORE`))}),className:"cumcord-card-delete",viewBox:"0 0 24 24"},r.createElement("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12 1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"})))),r.createElement(ri,{checked:t.enabled,onChange:()=>{try{je(e.pluginId)}catch{}}}))),r.createElement(si,{className:"cumcord-card-description"},t.manifest.description))};C();var{FormTitle:ai,FormSection:li,TextInput:ci,FormDivider:di}=h("FormTitle"),ui=D(e=>e?.default?.Justify).default,Ot=h("Sizes","Colors","Looks","DropdownSizes"),Zo=h("SearchBarIcon").default,Wo=(e,t)=>e.toLowerCase().split(t.toLowerCase()).length-1,Yo=()=>{let[e,t]=r.useState(""),[o,n]=r.useState("");(0,I.useNest)(g);let a=()=>F(o).then(()=>n(""),l=>ce({title:p.FAILED_PLUGIN_IMPORT,content:l.message,duration:3e3})),s=Object.keys(g.ghost),c=e?s.sort((l,d)=>{let m=Object.values(g.ghost[l].manifest).join(""),u=Object.values(g.ghost[d].manifest).join("");return Wo(u,e)-Wo(m,e)}):s;return r.createElement(A,null,r.createElement(li,null,r.createElement(ai,{tag:"h1"},"Plugins"),r.createElement(ui,{basis:"auto",grow:1,shrink:1},r.createElement(ci,{className:"cumcord-plugin-import",placeholder:p.PLUGIN_URL_PLACEHOLDER,type:"text",value:o,onChange:n,onKeyDown:l=>{l.key==="Enter"&&a()}}),r.createElement(Ot,{color:Ot.Colors.BRAND,size:Ot.Sizes.MEDIUM,onClick:a},p.ADD_PLUGIN)),r.createElement(Zo,{className:"cumcord-plugin-search",query:e,onQueryChange:t,placeholder:p.SEARCH,size:Zo.Sizes.MEDIUM}),r.createElement(di,{className:"cumcord-plugin-divider"}),c.map(l=>r.createElement(Jo,{pluginId:l}))))};var Qo=()=>{O(".cumcord-plugin-card{padding:16px;margin-bottom:10px}.cumcord-plugin-import{flex-grow:1;margin-right:20px}.cumcord-plugin-divider{margin-top:10px;margin-bottom:10px}.cumcord-plugin-search{margin-top:10px}.cumcord-card-header{display:inline-block}.cumcord-card-author,.cumcord-card-title{display:inline}.cumcord-card-right{display:flex}.cumcord-card-buttons{display:flex;margin-right:4px}.cumcord-card-buttons>*{fill:var(--interactive-normal);cursor:pointer;width:24px}.cumcord-card-buttons>*:hover{fill:var(--interactive-hover)}.cumcord-card-description{padding-top:3px;overflow-wrap:break-word}.cumcord-card-copy{width:20px}"),Ge("CUMCORD_PLUGINS",p.PLUGINS,Yo)};i();var fi="https://raw.githubusercontent.com/Cumcord/Lamivudine/master/src/index.js",pi=eval;function Xo(e){!e.shiftKey||!e.altKey&&!e.metaKey||e.key!=="Q"||(fetch(fi).then(t=>t.text()).then(pi,console.error),jt())}var en=()=>document.addEventListener("keydown",Xo);function jt(){document.removeEventListener("keydown",Xo)}if(window.cumcord)throw new Error("Cumcord is already injected");Vo(()=>{try{en(),qo(),Qo()}catch{}y.log("Cumcord is injected!")},()=>{jt(),delete window.cumcord},e=>window.cumcord=e);})();
//# sourceURL=Cumcord