var g=Object.create;var s=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var f=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty;var b=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of w(t))!u.call(e,n)&&n!==o&&s(e,n,{get:()=>t[n],enumerable:!(r=c(t,n))||r.enumerable});return e};var h=(e,t,o)=>(o=e!=null?g(f(e)):{},b(t||!e||!e.__esModule?s(o,"default",{value:e,enumerable:!0}):o,e));var a=require("electron/renderer"),i=require("electron/common"),d=require("../modules/api"),l=require("../../common/global"),m=require("../../common/modules/client"),p=h(require("../../common/modules/l10n"));if(window.location.protocol==="file:")window.addEventListener("load",()=>{const e=document.getElementById("logo");e&&e.tagName==="IMG"&&(e.src=m.appInfo.icons.app.toDataURL())}),a.contextBridge.exposeInMainWorld("webcord",{l10n:new p.default().web});else{const e=(0,d.generateSafeKey)();a.ipcRenderer.send("api-exposed",e),window.addEventListener("load",()=>window.localStorage.setItem("hideNag","true"));{let t=!0;document.addEventListener("paste",o=>{const r=i.clipboard.availableFormats();if(r.length===2&&r[0].startsWith("image/")&&r[1]==="text/html"&&t){console.debug("[WebCord] Applying clipboard workaround to the image\u2026"),t=!1,i.clipboard.write({image:i.clipboard.readImage(),html:i.clipboard.readHTML()}),o.stopImmediatePropagation(),a.ipcRenderer.send("paste-workaround",e);return}t=!0},!0)}a.ipcRenderer.on("navigate",(t,o)=>{(0,d.navigate)(o)})}(0,l.wLog)("Everything has been preloaded successfully!");
