const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./deep-link-iZSqc4mn.js","./index-CQwKdOGl.js","./PrefsViewStore-Cx4TYLp6.js","./sentry-common-rTXItwGA.js","./main-process-state-jW3BbbTQ.js","./index-jPDAJ20a.js","./load-stores-BOBPV-Fl.js","./App-B8XlOBJo.js","./report-dialog-DVH6bOL-.js","./App-CeciLEoL.css","./load-stores-wM6DJ3da.css","./react-DKZtFMAJ.js","./report-web-vitals-gam_I9LD.js"])))=>i.map(i=>d[i]);
import{_ as l}from"./index-CQwKdOGl.js";import{a as E,I as c,u as y,b as T,p as S,o as u,M as P,c as I,d as a,U as R,B as L}from"./sentry-common-rTXItwGA.js";import{serverEnv as A}from"./main-process-state-jW3BbbTQ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"4.2.860"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="ad636db3-e43c-432e-9b20-e3c70aad08d7",e._sentryDebugIdIdentifier="sentry-dbid-ad636db3-e43c-432e-9b20-e3c70aad08d7")})()}catch{}const D={info:console.info,error:console.error,warn:console.warn,debug:console.debug,log:console.log,trace:console.trace,buddyOriginOverride:null,silently:{info:console.info,error:console.error,warn:console.warn,debug:console.debug,log:console.log,trace:console.trace}};globalThis.logger=D;window.setImmediate||=(e,...t)=>window.setTimeout(e,0,...t);function N(){window.requestIdleCallback||=(e,t)=>{const o=t||{},n=1,w=o.timeout||n,f=performance.now();return setTimeout(()=>{e({get didTimeout(){return o.timeout?!1:performance.now()-f-n>w},timeRemaining(){return Math.max(0,n+(performance.now()-f))}})},n)},Array.prototype.at||=function(t){return this.slice(t,t+1)[0]}}N();E.posix.sep;var k={};const O=!0,M=typeof S<"u"&&k.BEEPER_BENCH_SUMMARY_ONLY==="true",r=M?!1:globalThis.LOG_LEVEL==="dev"||c||y.log_level==="dev"||T||O,x=u.platform(),B=u.release(),V={os:{name:x,version:B},appVersion:a.version,arch:"x64",isWKWV:!0},s=[];let i=null;const p=async()=>{if(s.length===0)return;const e=s.splice(0,s.length);i&&clearTimeout(i),i=null;try{logger.info("skipped sending events to legacy /metrics endpoint",e)}catch(t){logger.error("Error recording events",t,e)}},b=({type:e,data:t},o={})=>{s.push({deviceId:P,type:e,eventData:t,metadata:{...V,...o}}),s.length>=20?p():i||(i=setTimeout(p,5e3))},K=(e,t,o)=>{r&&logger.debug("Time:",e,"—",t,"—",o),b({type:"timing",data:{category:e,value:t,time:o.toFixed(0)}})};function h(e,t){r&&logger.debug("Event:",e,"—",t),b({type:e,data:t},{})}const j=e=>h("platform-event",e);function X(e,t,o=""){const n=I(o?t.replace(o,"<scrubbed>"):t);return h("unpleasant-message",{origin:e,text:n})}function C(){const e={IS_DEV:c,isLoggingEnabled:r,log:r?(...t)=>logger.log(...t):()=>{},error:r?(...t)=>logger.error(...t):()=>{},constants:{USER_AGENT:R,APP_VERSION:a.version},Sentry:globalThis.Sentry,trackPlatformEvent:j,getBinariesDirPath(t){return E.join(L,"platform-"+t)}};globalThis.texts=e}globalThis.IS_WKWV=!!window.webkit;C();function Y(){return"Settings/Preferences"}function Q(e){const t=e.getHours();return t>=5&&t<12?"Good morning":t>=12&&t<18?"Good afternoon":t>=18&&t<22?"Good evening":"Good night"}const G=Object.freeze({BRAND_NAME:"Beeper",APP_NAME:"Beeper",BROWSER_EXTENSION_NAME:"Beeper browser extension",SYSTEM_PREFS_LABEL:Y(),TRAY_NAME:"Tray",SHOW_IN_FOLDER_LABEL:"Show in folder"}),d={};function J(){return{...d}}function g(e,t=Date.now()){const o=d[e];o!==void 0&&o<=t||(d[e]=t)}const Z=(...e)=>globalThis.rt.callObjProxyMethod({objName:"ipcMainShim",methodName:"send",args:e}),ee=async(...e)=>globalThis.rt.callObjProxyMethod({objName:"ipcMainShim",methodName:"invoke",args:e}),H=(e,t)=>globalThis.rt.registerIPCHandler(e,t);async function v(e){const{default:t}=await l(async()=>{const{default:o}=await import("./deep-link-iZSqc4mn.js");return{default:o}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url);await t(e)}function $(){H("deep-link",v)}globalThis.handleDeepLink=v;const U=A??"production",m=window.desktopAPI?.getPreloadBootstrapReturnedAt?.();m!=null&&g("preload bootstrap returned",m);g("renderer index import started",window.RENDERER_INDEX_IMPORT_STARTED);logger.log(`You're running ${G.APP_NAME} v${a.version} on linux ${u.release()} x64 (server env: ${U})`);const _=new URLSearchParams(window.location.search).get("appVersion");a.version!==_&&logger.warn(`The runtime appVersion (${_}) from URL does not match the build version (${a.version})`);g("renderer entry");$();const W=l(async()=>{const{loadStoresPromise:e}=await import("./load-stores-BOBPV-Fl.js").then(t=>t.l);return{loadStoresPromise:e}},__vite__mapDeps([6,2,3,4,5,7,1,8,9,10]),import.meta.url).then(({loadStoresPromise:e})=>e);l(async()=>{const{default:e}=await import("./react-DKZtFMAJ.js");return{default:e}},__vite__mapDeps([11,7,3,2,4,5,1,8,9]),import.meta.url).then(({default:e})=>{e(W)});c&&l(async()=>{const{default:e}=await import("./report-web-vitals-gam_I9LD.js");return{default:e}},__vite__mapDeps([12,1]),import.meta.url).then(({default:e})=>{e(t=>logger.log(t))});const te=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));export{Z as a,H as b,X as c,K as d,G as e,ee as f,J as g,v as h,r as i,Q as j,te as k,g as m,p as s,h as t};
//# sourceMappingURL=index-D2Vj8hEx.js.map
