1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="24a79013-0002-48a9-831c-c917fa442749",e._sentryDebugIdIdentifier="sentry-dbid-24a79013-0002-48a9-831c-c917fa442749")}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4601],{94601:(e,t,n)=>{n.r(t),n.d(t,{deleteAgent5MinAggregations:()=>W,deleteAgentDayAggregations:()=>k,deleteAgentHourAggregations:()=>Y,deleteAgentMonthAggregations:()=>S,deleteAgentQuarterAggregations:()=>T,deleteAgentWeekAggregations:()=>E,deleteAllAgentAnalytics:()=>_,getAgent5MinAggregations:()=>M,getAgent5MinAggregations4Months:()=>Z,getAgentDayAggregations:()=>B,getAgentHourAggregations:()=>G,getAgentHourAggregations4Months:()=>C,getAgentMonthAggregations:()=>R,getAgentQuarterAggregations:()=>v,getAgentWeekAggregations:()=>J,getGroup5MinAggregations:()=>w,getGroup5MinAggregations4Months:()=>p,getGroupDayAggregations:()=>h,getGroupHourAggregations:()=>c,getGroupHourAggregations4Months:()=>y,getGroupMonthAggregations:()=>U,getGroupQuarterAggregations:()=>m,getGroupWeekAggregations:()=>K,upsertAgent5MinAggregation:()=>O,upsertAgentDayAggregation:()=>A,upsertAgentHourAggregation:()=>D,upsertAgentMonthAggregation:()=>b,upsertAgentQuarterAggregation:()=>q,upsertAgentWeekAggregation:()=>I,upsertGroup5MinAggregation:()=>f,upsertGroupDayAggregation:()=>d,upsertGroupHourAggregation:()=>i,upsertGroupMonthAggregation:()=>s,upsertGroupQuarterAggregation:()=>u,upsertGroupWeekAggregation:()=>l});var a=n(49003),r=n(7709),o=n(58877),g=n(55839);async function i(e){return(await o.db.insert(g.CU).values(e).onConflictDoUpdate({target:[g.CU.datetimeKey,g.CU.telegramGroupId],set:{...e,lastUpdated:new Date}}).returning())[0]}async function d(e){return(await o.db.insert(g.qW).values(e).onConflictDoUpdate({target:[g.qW.dateKey,g.qW.telegramGroupId],set:{...e,lastUpdated:new Date}}).returning())[0]}async function l(e){return(await o.db.insert(g.yZ).values(e).onConflictDoUpdate({target:[g.yZ.dateKey,g.yZ.telegramGroupId],set:{...e,lastUpdated:new Date}}).returning())[0]}async function s(e){return(await o.db.insert(g.SO).values(e).onConflictDoUpdate({target:[g.SO.dateKey,g.SO.telegramGroupId],set:{...e,lastUpdated:new Date}}).returning())[0]}async function u(e){return(await o.db.insert(g.iT).values(e).onConflictDoUpdate({target:[g.iT.dateKey,g.iT.telegramGroupId],set:{...e,lastUpdated:new Date}}).returning())[0]}async function c(e,t,n){let i=[(0,a.eq)(g.CU.telegramGroupId,e)];return t&&n&&i.push((0,a.RO)(g.CU.datetimeKey,new Date(t)),(0,a.wJ)(g.CU.datetimeKey,new Date(n))),await o.db.select().from(g.CU).where((0,a.Uo)(...i)).orderBy((0,r.i)(g.CU.datetimeKey))}async function y(e){let t=new Date,n=new Date(t.getFullYear(),t.getMonth()-4,t.getDate()),i=[(0,a.RO)(g.CU.datetimeKey,n),(0,a.wJ)(g.CU.datetimeKey,t)];e&&e.length;let d=await o.db.select().from(g.CU).where((0,a.Uo)(...i)).orderBy((0,r.i)(g.CU.datetimeKey));return e&&e.length>0?d.filter(t=>e.includes(t.telegramGroupId)):d}async function f(e){return(await o.db.insert(g.Zl).values(e).onConflictDoUpdate({target:[g.Zl.datetimeKey,g.Zl.telegramGroupId],set:{...e,lastUpdated:new Date}}).returning())[0]}async function w(e,t,n){let i=[(0,a.eq)(g.Zl.telegramGroupId,e)];return t&&n&&i.push((0,a.RO)(g.Zl.datetimeKey,new Date(t)),(0,a.wJ)(g.Zl.datetimeKey,new Date(n))),await o.db.select().from(g.Zl).where((0,a.Uo)(...i)).orderBy((0,r.i)(g.Zl.datetimeKey))}async function p(e){let t=new Date,n=new Date(t.getFullYear(),t.getMonth()-4,t.getDate()),i=[(0,a.RO)(g.Zl.datetimeKey,n),(0,a.wJ)(g.Zl.datetimeKey,t)],d=await o.db.select().from(g.Zl).where((0,a.Uo)(...i)).orderBy((0,r.i)(g.Zl.datetimeKey));return e&&e.length>0?d.filter(t=>e.includes(t.telegramGroupId)):d}async function h(e,t,n){let i=[(0,a.eq)(g.qW.telegramGroupId,e)];return t&&n&&i.push((0,a.RO)(g.qW.dateKey,t),(0,a.wJ)(g.qW.dateKey,n)),await o.db.select().from(g.qW).where((0,a.Uo)(...i)).orderBy((0,r.i)(g.qW.dateKey))}async function K(e,t,n){let i=[(0,a.eq)(g.yZ.telegramGroupId,e)];return t&&n&&i.push((0,a.RO)(g.yZ.dateKey,t),(0,a.wJ)(g.yZ.dateKey,n)),await o.db.select().from(g.yZ).where((0,a.Uo)(...i)).orderBy((0,r.i)(g.yZ.dateKey))}async function U(e,t,n){let i=[(0,a.eq)(g.SO.telegramGroupId,e)];return t&&n&&i.push((0,a.RO)(g.SO.dateKey,t),(0,a.wJ)(g.SO.dateKey,n)),await o.db.select().from(g.SO).where((0,a.Uo)(...i)).orderBy((0,r.i)(g.SO.dateKey))}async function m(e,t,n){let i=[(0,a.eq)(g.iT.telegramGroupId,e)];return t&&n&&i.push((0,a.RO)(g.iT.dateKey,t),(0,a.wJ)(g.iT.dateKey,n)),await o.db.select().from(g.iT).where((0,a.Uo)(...i)).orderBy((0,r.i)(g.iT.dateKey))}async function D(e){return(await o.db.insert(g.IU).values(e).onConflictDoUpdate({target:[g.IU.datetimeKey,g.IU.agentId],set:{...e,lastUpdated:new Date}}).returning())[0]}async function A(e){return(await o.db.insert(g.Y4).values(e).onConflictDoUpdate({target:[g.Y4.dateKey,g.Y4.agentId],set:{...e,lastUpdated:new Date}}).returning())[0]}async function I(e){return(await o.db.insert(g.yK).values(e).onConflictDoUpdate({target:[g.yK.dateKey,g.yK.agentId],set:{...e,lastUpdated:new Date}}).returning())[0]}async function b(e){return(await o.db.insert(g.a5).values(e).onConflictDoUpdate({target:[g.a5.dateKey,g.a5.agentId],set:{...e,lastUpdated:new Date}}).returning())[0]}async function q(e){return(await o.db.insert(g.es).values(e).onConflictDoUpdate({target:[g.es.dateKey,g.es.agentId],set:{...e,lastUpdated:new Date}}).returning())[0]}async function G(e,t,n){let i=[(0,a.eq)(g.IU.agentId,e)];return t&&n&&i.push((0,a.RO)(g.IU.datetimeKey,new Date(t)),(0,a.wJ)(g.IU.datetimeKey,new Date(n))),await o.db.select().from(g.IU).where((0,a.Uo)(...i)).orderBy((0,r.i)(g.IU.datetimeKey))}async function C(e){let t=new Date,n=new Date(t.getFullYear(),t.getMonth()-4,t.getDate()),i=[(0,a.RO)(g.IU.datetimeKey,n),(0,a.wJ)(g.IU.datetimeKey,t)],d=await o.db.select().from(g.IU).where((0,a.Uo)(...i)).orderBy((0,r.i)(g.IU.datetimeKey));return e&&e.length>0?d.filter(t=>e.includes(t.agentId)):d}async function O(e){return(await o.db.insert(g.fd).values(e).onConflictDoUpdate({target:[g.fd.datetimeKey,g.fd.agentId],set:{...e,lastUpdated:new Date}}).returning())[0]}async function M(e,t,n){let i=[(0,a.eq)(g.fd.agentId,e)];return t&&n&&i.push((0,a.RO)(g.fd.datetimeKey,new Date(t)),(0,a.wJ)(g.fd.datetimeKey,new Date(n))),await o.db.select().from(g.fd).where((0,a.Uo)(...i)).orderBy((0,r.i)(g.fd.datetimeKey))}async function Z(e){let t=new Date,n=new Date(t.getFullYear(),t.getMonth()-4,t.getDate()),i=[(0,a.RO)(g.fd.datetimeKey,n),(0,a.wJ)(g.fd.datetimeKey,t)],d=await o.db.select().from(g.fd).where((0,a.Uo)(...i)).orderBy((0,r.i)(g.fd.datetimeKey));return e&&e.length>0?d.filter(t=>e.includes(t.agentId)):d}async function B(e,t,n){let i=[(0,a.eq)(g.Y4.agentId,e)];return t&&n&&i.push((0,a.RO)(g.Y4.dateKey,t),(0,a.wJ)(g.Y4.dateKey,n)),await o.db.select().from(g.Y4).where((0,a.Uo)(...i)).orderBy((0,r.i)(g.Y4.dateKey))}async function J(e,t,n){let i=[(0,a.eq)(g.yK.agentId,e)];return t&&n&&i.push((0,a.RO)(g.yK.dateKey,t),(0,a.wJ)(g.yK.dateKey,n)),await o.db.select().from(g.yK).where((0,a.Uo)(...i)).orderBy((0,r.i)(g.yK.dateKey))}async function R(e,t,n){let i=[(0,a.eq)(g.a5.agentId,e)];return t&&n&&i.push((0,a.RO)(g.a5.dateKey,t),(0,a.wJ)(g.a5.dateKey,n)),await o.db.select().from(g.a5).where((0,a.Uo)(...i)).orderBy((0,r.i)(g.a5.dateKey))}async function v(e,t,n){let i=[(0,a.eq)(g.es.agentId,e)];return t&&n&&i.push((0,a.RO)(g.es.dateKey,t),(0,a.wJ)(g.es.dateKey,n)),await o.db.select().from(g.es).where((0,a.Uo)(...i)).orderBy((0,r.i)(g.es.dateKey))}async function Y(e){try{let t=await o.db.delete(g.IU).where((0,a.eq)(g.IU.agentId,e)).returning();return console.log("â
Deleted ".concat(t.length," hourly aggregations for agent ").concat(e)),!0}catch(e){return console.error("â Error deleting hourly aggregations for agent:",e),!1}}async function W(e){try{let t=await o.db.delete(g.fd).where((0,a.eq)(g.fd.agentId,e)).returning();return console.log("â
Deleted ".concat(t.length," 5-minute aggregations for agent ").concat(e)),!0}catch(e){return console.error("â Error deleting 5-minute aggregations for agent:",e),!1}}async function k(e){try{let t=await o.db.delete(g.Y4).where((0,a.eq)(g.Y4.agentId,e)).returning();return console.log("â
Deleted ".concat(t.length," daily aggregations for agent ").concat(e)),!0}catch(e){return console.error("â Error deleting daily aggregations for agent:",e),!1}}async function E(e){try{let t=await o.db.delete(g.yK).where((0,a.eq)(g.yK.agentId,e)).returning();return console.log("â
Deleted ".concat(t.length," weekly aggregations for agent ").concat(e)),!0}catch(e){return console.error("â Error deleting weekly aggregations for agent:",e),!1}}async function S(e){try{let t=await o.db.delete(g.a5).where((0,a.eq)(g.a5.agentId,e)).returning();return console.log("â
Deleted ".concat(t.length," monthly aggregations for agent ").concat(e)),!0}catch(e){return console.error("â Error deleting monthly aggregations for agent:",e),!1}}async function T(e){try{let t=await o.db.delete(g.es).where((0,a.eq)(g.es.agentId,e)).returning();return console.log("â
Deleted ".concat(t.length," quarterly aggregations for agent ").concat(e)),!0}catch(e){return console.error("â Error deleting quarterly aggregations for agent:",e),!1}}async function _(e){try{let t=(await Promise.all([W(e),Y(e),k(e),E(e),S(e),T(e)])).every(e=>!0===e);return t?console.log("â
Successfully deleted all analytics records for agent ".concat(e)):console.warn("â ï¸ Some analytics deletions failed for agent ".concat(e)),t}catch(e){return console.error("â Error deleting all analytics for agent:",e),!1}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.