@axiapps/bridge-metrics 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/dist/aggregationTypes.cjs +18 -0
  2. package/dist/aggregationTypes.d.cts +21 -0
  3. package/dist/aggregationTypes.d.ts +21 -0
  4. package/dist/aggregationTypes.js +1 -0
  5. package/dist/boonGeneration.cjs +308 -0
  6. package/dist/boonGeneration.d.cts +65 -0
  7. package/dist/boonGeneration.d.ts +65 -0
  8. package/dist/boonGeneration.js +16 -0
  9. package/dist/chunk-42DVJJLC.js +106 -0
  10. package/dist/chunk-4F55Q6K2.js +0 -0
  11. package/dist/chunk-ELKDB763.js +349 -0
  12. package/dist/chunk-FU74LJEM.js +77 -0
  13. package/dist/chunk-J3YCFY3C.js +37 -0
  14. package/dist/chunk-JP2ZL44R.js +18 -0
  15. package/dist/chunk-K2SRAMGC.js +0 -0
  16. package/dist/chunk-KRHODGVU.js +48 -0
  17. package/dist/chunk-LIGIXSSA.js +1383 -0
  18. package/dist/chunk-M2WR3JBQ.js +0 -0
  19. package/dist/chunk-PMVLNDZZ.js +279 -0
  20. package/dist/chunk-R5EJF5AW.js +147 -0
  21. package/dist/chunk-RGXSI3AI.js +298 -0
  22. package/dist/chunk-UFJJ6WLD.js +197 -0
  23. package/dist/chunk-WW5XFXGC.js +234 -0
  24. package/dist/chunk-ZFZS7JFU.js +10 -0
  25. package/dist/combatMetrics.cjs +251 -0
  26. package/dist/combatMetrics.d.cts +26 -0
  27. package/dist/combatMetrics.d.ts +26 -0
  28. package/dist/combatMetrics.js +21 -0
  29. package/dist/computePlayerAggregation.cjs +2042 -0
  30. package/dist/computePlayerAggregation.d.cts +249 -0
  31. package/dist/computePlayerAggregation.d.ts +249 -0
  32. package/dist/computePlayerAggregation.js +30 -0
  33. package/dist/conditionsMetrics.cjs +328 -0
  34. package/dist/conditionsMetrics.d.cts +67 -0
  35. package/dist/conditionsMetrics.d.ts +67 -0
  36. package/dist/conditionsMetrics.js +18 -0
  37. package/dist/constants.cjs +36 -0
  38. package/dist/constants.d.cts +18 -0
  39. package/dist/constants.d.ts +18 -0
  40. package/dist/constants.js +10 -0
  41. package/dist/dashboardMetrics.cjs +226 -0
  42. package/dist/dashboardMetrics.d.cts +29 -0
  43. package/dist/dashboardMetrics.d.ts +29 -0
  44. package/dist/dashboardMetrics.js +42 -0
  45. package/dist/dpsReportTypes.cjs +18 -0
  46. package/dist/dpsReportTypes.d.cts +294 -0
  47. package/dist/dpsReportTypes.d.ts +294 -0
  48. package/dist/dpsReportTypes.js +1 -0
  49. package/dist/index.cjs +2902 -0
  50. package/dist/index.d.cts +13 -0
  51. package/dist/index.d.ts +13 -0
  52. package/dist/index.js +152 -0
  53. package/dist/metrics-methods.json +38 -0
  54. package/dist/metricsSettings.cjs +75 -0
  55. package/dist/metricsSettings.d.cts +23 -0
  56. package/dist/metricsSettings.d.ts +23 -0
  57. package/dist/metricsSettings.js +8 -0
  58. package/dist/professionUtils.cjs +265 -0
  59. package/dist/professionUtils.d.cts +10 -0
  60. package/dist/professionUtils.d.ts +10 -0
  61. package/dist/professionUtils.js +20 -0
  62. package/dist/reportMetrics.cjs +224 -0
  63. package/dist/reportMetrics.d.cts +85 -0
  64. package/dist/reportMetrics.d.ts +85 -0
  65. package/dist/reportMetrics.js +12 -0
  66. package/dist/resUtility.cjs +52 -0
  67. package/dist/resUtility.d.cts +5 -0
  68. package/dist/resUtility.d.ts +5 -0
  69. package/dist/resUtility.js +8 -0
  70. package/dist/roles.cjs +18 -0
  71. package/dist/roles.d.cts +17 -0
  72. package/dist/roles.d.ts +17 -0
  73. package/dist/roles.js +1 -0
  74. package/dist/rollup.cjs +378 -0
  75. package/dist/rollup.d.cts +103 -0
  76. package/dist/rollup.d.ts +103 -0
  77. package/dist/rollup.js +16 -0
  78. package/dist/statsMetrics.cjs +153 -0
  79. package/dist/statsMetrics.d.cts +39 -0
  80. package/dist/statsMetrics.d.ts +39 -0
  81. package/dist/statsMetrics.js +22 -0
  82. package/dist/timestampUtils.cjs +63 -0
  83. package/dist/timestampUtils.d.cts +12 -0
  84. package/dist/timestampUtils.d.ts +12 -0
  85. package/dist/timestampUtils.js +9 -0
  86. package/package.json +44 -0
@@ -0,0 +1,328 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/conditionsMetrics.ts
21
+ var conditionsMetrics_exports = {};
22
+ __export(conditionsMetrics_exports, {
23
+ NON_DAMAGING_CONDITIONS: () => NON_DAMAGING_CONDITIONS,
24
+ buildConditionIconMap: () => buildConditionIconMap,
25
+ computeOutgoingConditions: () => computeOutgoingConditions,
26
+ getDefaultConditionIcon: () => getDefaultConditionIcon,
27
+ normalizeConditionLabel: () => normalizeConditionLabel,
28
+ resolveBuffMetaById: () => resolveBuffMetaById,
29
+ resolveConditionNameFromEntry: () => resolveConditionNameFromEntry
30
+ });
31
+ module.exports = __toCommonJS(conditionsMetrics_exports);
32
+ var NON_DAMAGING_CONDITIONS = /* @__PURE__ */ new Set([
33
+ "Vulnerability",
34
+ "Weakness",
35
+ "Blind",
36
+ "Cripple",
37
+ "Chill",
38
+ "Immobilize",
39
+ "Slow",
40
+ "Fear",
41
+ "Taunt"
42
+ ]);
43
+ var CONDITION_NAME_MAP = /* @__PURE__ */ new Map([
44
+ ["bleeding", "Bleeding"],
45
+ ["burning", "Burning"],
46
+ ["confusion", "Confusion"],
47
+ ["poison", "Poison"],
48
+ ["torment", "Torment"],
49
+ ["vulnerability", "Vulnerability"],
50
+ ["weakness", "Weakness"],
51
+ ["weakened", "Weakness"],
52
+ ["blind", "Blind"],
53
+ ["blinded", "Blind"],
54
+ ["blinding", "Blind"],
55
+ ["cripple", "Cripple"],
56
+ ["crippled", "Cripple"],
57
+ ["chill", "Chill"],
58
+ ["chilled", "Chill"],
59
+ ["immob", "Immobilize"],
60
+ ["immobile", "Immobilize"],
61
+ ["immobilized", "Immobilize"],
62
+ ["slow", "Slow"],
63
+ ["slowed", "Slow"],
64
+ ["fear", "Fear"],
65
+ ["feared", "Fear"],
66
+ ["taunt", "Taunt"],
67
+ ["taunted", "Taunt"]
68
+ ]);
69
+ var DEFAULT_CONDITION_ICONS = {
70
+ Blind: "https://render.guildwars2.com/file/09770136BB76FD0DBE1CC4267DEED54774CB20F6/102837.png",
71
+ Chill: "https://render.guildwars2.com/file/28C4EC547A3516AF0242E826772DA43A5EAC3DF3/102839.png",
72
+ Cripple: "https://render.guildwars2.com/file/070325E519C178D502A8160523766070D30C0C19/102838.png",
73
+ Fear: "https://render.guildwars2.com/file/30307A6E766D74B6EB09EDA12A4A2DE50E4D76F4/102869.png",
74
+ Immobilize: "https://render.guildwars2.com/file/397A613651BFCA2832B6469CE34735580A2C120E/102844.png",
75
+ Slow: "https://render.guildwars2.com/file/F60D1EF5271D7B9319610855676D320CD25F01C6/961397.png",
76
+ Taunt: "https://render.guildwars2.com/file/02EED459AD65FAF7DF32A260E479C625070841B9/1228472.png",
77
+ Vulnerability: "https://render.guildwars2.com/file/3A394C1A0A3257EB27A44842DDEEF0DF000E1241/102850.png",
78
+ Weakness: "https://render.guildwars2.com/file/6CB0E64AF9AA292E332A38C1770CE577E2CDE0E8/102853.png"
79
+ };
80
+ var getDefaultConditionIcon = (name) => {
81
+ if (!name) return void 0;
82
+ return DEFAULT_CONDITION_ICONS[name];
83
+ };
84
+ var resolveBuffMetaById = (buffMap, id) => {
85
+ if (!buffMap || id === void 0 || id === null) return void 0;
86
+ const numericId = Number(id);
87
+ if (Number.isFinite(numericId)) {
88
+ return buffMap[`b${numericId}`] || buffMap[String(numericId)];
89
+ }
90
+ return buffMap[String(id)];
91
+ };
92
+ var getConditionName = (name) => {
93
+ if (!name) return null;
94
+ const cleaned = name.trim().toLowerCase();
95
+ const directMatch = CONDITION_NAME_MAP.get(cleaned);
96
+ if (directMatch) return directMatch;
97
+ const tokens = cleaned.split(/[^a-z]+/).filter(Boolean);
98
+ for (const token of tokens) {
99
+ const match = CONDITION_NAME_MAP.get(token);
100
+ if (match) return match;
101
+ }
102
+ return null;
103
+ };
104
+ var normalizeConditionLabel = (name) => getConditionName(name);
105
+ var buildConditionIconMap = (buffMap) => {
106
+ const map = /* @__PURE__ */ new Map();
107
+ if (!buffMap) return map;
108
+ Object.values(buffMap).forEach((meta) => {
109
+ if (!meta?.icon || !meta?.name) return;
110
+ const normalized = getConditionName(meta.name);
111
+ if (!normalized) return;
112
+ if (!map.has(normalized)) map.set(normalized, meta.icon);
113
+ });
114
+ Object.entries(DEFAULT_CONDITION_ICONS).forEach(([name, icon]) => {
115
+ if (!map.has(name)) map.set(name, icon);
116
+ });
117
+ return map;
118
+ };
119
+ var resolveConditionNameFromEntry = (skillName, id, buffMap) => {
120
+ if (id && buffMap) {
121
+ const buffName = resolveBuffMetaById(buffMap, id)?.name;
122
+ const resolved = getConditionName(buffName);
123
+ if (resolved) return resolved;
124
+ }
125
+ if (!skillName) return null;
126
+ return getConditionName(skillName);
127
+ };
128
+ var defaultGetPlayerKey = (player) => {
129
+ const account = player?.account || "Unknown";
130
+ if (account && account !== "Unknown") return account;
131
+ const name = player?.name || "Unknown";
132
+ return name || null;
133
+ };
134
+ var countAppliedFromStates = (states) => {
135
+ if (!states || states.length === 0) return 0;
136
+ let applied = 0;
137
+ let prev = null;
138
+ states.forEach((entry) => {
139
+ const value = Number(entry[1] ?? 0);
140
+ if (!Number.isFinite(value)) return;
141
+ if (prev === null) {
142
+ prev = value;
143
+ return;
144
+ }
145
+ if (value > prev) {
146
+ applied += value - prev;
147
+ }
148
+ prev = value;
149
+ });
150
+ return applied;
151
+ };
152
+ var computeUptimeFromStates = (states) => {
153
+ if (!states || states.length === 0) return 0;
154
+ let uptimeMs = 0;
155
+ let buffOn = 0;
156
+ let firstTime = 0;
157
+ for (const [time, value] of states) {
158
+ if (time === 0) continue;
159
+ if (value >= 1 && buffOn === 0) {
160
+ buffOn = value;
161
+ firstTime = time;
162
+ } else if (value === 0 && buffOn > 0) {
163
+ uptimeMs += time - firstTime;
164
+ buffOn = 0;
165
+ }
166
+ }
167
+ return uptimeMs;
168
+ };
169
+ var countActiveStateEntries = (states) => {
170
+ if (!states || states.length === 0) return 0;
171
+ let count = 0;
172
+ states.forEach((entry) => {
173
+ const time = Number(entry[0] ?? 0);
174
+ const value = Number(entry[1] ?? 0);
175
+ if (!Number.isFinite(value)) return;
176
+ if (time === 0) return;
177
+ if (value > 0) count += 1;
178
+ });
179
+ return count;
180
+ };
181
+ var computeOutgoingConditions = (payload) => {
182
+ const { players, targets, skillMap, buffMap } = payload;
183
+ const getPlayerKey = payload.getPlayerKey || defaultGetPlayerKey;
184
+ const conditionIconMap = buildConditionIconMap(buffMap);
185
+ const playerConditions = {};
186
+ const summary = {};
187
+ players.forEach((player) => {
188
+ if (player?.notInSquad) return;
189
+ const key = getPlayerKey(player);
190
+ if (!key) return;
191
+ if (!playerConditions[key]) {
192
+ playerConditions[key] = {};
193
+ }
194
+ if (!player?.totalDamageDist) return;
195
+ player.totalDamageDist.forEach((distList) => {
196
+ if (!distList) return;
197
+ distList.forEach((entry) => {
198
+ if (!entry.id) return;
199
+ let skillName = `Skill ${entry.id}`;
200
+ let skillIcon;
201
+ if (skillMap) {
202
+ if (skillMap[`s${entry.id}`]) {
203
+ skillName = skillMap[`s${entry.id}`].name || skillName;
204
+ skillIcon = skillMap[`s${entry.id}`].icon || skillIcon;
205
+ } else if (skillMap[`${entry.id}`]) {
206
+ skillName = skillMap[`${entry.id}`].name || skillName;
207
+ skillIcon = skillMap[`${entry.id}`].icon || skillIcon;
208
+ }
209
+ }
210
+ const buffMeta = resolveBuffMetaById(buffMap, entry.id);
211
+ if (skillName.startsWith("Skill ") && buffMeta?.name) {
212
+ skillName = buffMeta.name;
213
+ skillIcon = buffMeta.icon || skillIcon;
214
+ }
215
+ const conditionName = resolveConditionNameFromEntry(skillName, entry.id, buffMap);
216
+ if (!conditionName) return;
217
+ const buffName = buffMeta?.name;
218
+ const conditionIcon = conditionIconMap.get(conditionName) || buffMeta?.icon;
219
+ const skillLabel = skillName.startsWith("Skill ") ? buffName || conditionName : skillName;
220
+ const skillLabelIcon = skillIcon || buffMeta?.icon;
221
+ const connectedHits = Number(entry.connectedHits ?? 0);
222
+ const rawHits = Number(entry.hits ?? 0);
223
+ const hits = connectedHits > 0 ? connectedHits : rawHits;
224
+ const damage = Number(entry.totalDamage ?? 0);
225
+ if (!Number.isFinite(hits) && !Number.isFinite(damage)) return;
226
+ const existing = summary[conditionName] || {
227
+ name: conditionName,
228
+ icon: conditionIcon,
229
+ applications: 0,
230
+ damage: 0
231
+ };
232
+ existing.applications += Number.isFinite(hits) ? hits : 0;
233
+ existing.damage += Number.isFinite(damage) ? damage : 0;
234
+ if (!existing.icon && conditionIcon) existing.icon = conditionIcon;
235
+ summary[conditionName] = existing;
236
+ const playerConditionTotals = playerConditions[key][conditionName] || {
237
+ icon: conditionIcon,
238
+ applications: 0,
239
+ damage: 0,
240
+ skills: {}
241
+ };
242
+ playerConditionTotals.applications += Number.isFinite(hits) ? hits : 0;
243
+ playerConditionTotals.damage += Number.isFinite(damage) ? damage : 0;
244
+ const skillEntry = playerConditionTotals.skills[skillLabel] || { name: skillLabel, hits: 0, damage: 0, icon: skillLabelIcon };
245
+ skillEntry.hits += Number.isFinite(hits) ? hits : 0;
246
+ skillEntry.damage += Number.isFinite(damage) ? damage : 0;
247
+ if (!skillEntry.icon && skillLabelIcon) skillEntry.icon = skillLabelIcon;
248
+ playerConditionTotals.skills[skillLabel] = skillEntry;
249
+ if (!playerConditionTotals.icon && conditionIcon) playerConditionTotals.icon = conditionIcon;
250
+ playerConditions[key][conditionName] = playerConditionTotals;
251
+ });
252
+ });
253
+ });
254
+ const nameToKey = /* @__PURE__ */ new Map();
255
+ players.forEach((player) => {
256
+ if (player?.notInSquad) return;
257
+ const key = getPlayerKey(player);
258
+ if (!key) return;
259
+ if (player?.name) {
260
+ nameToKey.set(player.name, key);
261
+ }
262
+ });
263
+ let buffStateApplicationsTotal = 0;
264
+ let buffStateSourcesSeen = 0;
265
+ let targetBuffEntriesSeen = 0;
266
+ targets.forEach((target) => {
267
+ if (!target?.buffs) return;
268
+ target.buffs.forEach((buff) => {
269
+ const buffId = Number(buff?.id);
270
+ if (!Number.isFinite(buffId)) return;
271
+ const buffMeta = resolveBuffMetaById(buffMap, buffId);
272
+ const normalizedName = getConditionName(buffMeta?.name);
273
+ if (!normalizedName) return;
274
+ if (buffMeta?.classification && buffMeta.classification !== "Condition") return;
275
+ const conditionName = normalizedName;
276
+ if (!conditionName) return;
277
+ const statesPerSource = buff.statesPerSource || {};
278
+ targetBuffEntriesSeen += 1;
279
+ Object.entries(statesPerSource).forEach(([sourceName, states]) => {
280
+ const key = nameToKey.get(sourceName);
281
+ if (!key) return;
282
+ buffStateSourcesSeen += 1;
283
+ const appliedCounts = countAppliedFromStates(states);
284
+ const activeCounts = countActiveStateEntries(states);
285
+ const uptimeMs = computeUptimeFromStates(states);
286
+ buffStateApplicationsTotal += appliedCounts;
287
+ const playerConditionTotals = playerConditions[key]?.[conditionName] || {
288
+ applications: 0,
289
+ damage: 0,
290
+ skills: {}
291
+ };
292
+ playerConditionTotals.applicationsFromBuffs = (playerConditionTotals.applicationsFromBuffs || 0) + appliedCounts;
293
+ playerConditionTotals.applicationsFromBuffsActive = (playerConditionTotals.applicationsFromBuffsActive || 0) + activeCounts;
294
+ playerConditionTotals.uptimeMs = (playerConditionTotals.uptimeMs || 0) + uptimeMs;
295
+ playerConditions[key] = playerConditions[key] || {};
296
+ playerConditions[key][conditionName] = playerConditionTotals;
297
+ const overallTotals = summary[conditionName] || {
298
+ name: conditionName,
299
+ applications: 0,
300
+ damage: 0
301
+ };
302
+ overallTotals.applicationsFromBuffs = (overallTotals.applicationsFromBuffs || 0) + appliedCounts;
303
+ overallTotals.applicationsFromBuffsActive = (overallTotals.applicationsFromBuffsActive || 0) + activeCounts;
304
+ overallTotals.uptimeMs = (overallTotals.uptimeMs || 0) + uptimeMs;
305
+ summary[conditionName] = overallTotals;
306
+ });
307
+ });
308
+ });
309
+ return {
310
+ playerConditions,
311
+ summary,
312
+ meta: {
313
+ buffStateApplicationsTotal,
314
+ targetBuffEntriesSeen,
315
+ buffStateSourcesSeen
316
+ }
317
+ };
318
+ };
319
+ // Annotate the CommonJS export names for ESM import in node:
320
+ 0 && (module.exports = {
321
+ NON_DAMAGING_CONDITIONS,
322
+ buildConditionIconMap,
323
+ computeOutgoingConditions,
324
+ getDefaultConditionIcon,
325
+ normalizeConditionLabel,
326
+ resolveBuffMetaById,
327
+ resolveConditionNameFromEntry
328
+ });
@@ -0,0 +1,67 @@
1
+ declare const NON_DAMAGING_CONDITIONS: Set<string>;
2
+ declare const getDefaultConditionIcon: (name?: string | null) => string | undefined;
3
+ type BuffMeta = {
4
+ name?: string;
5
+ icon?: string;
6
+ classification?: string;
7
+ };
8
+ declare const resolveBuffMetaById: (buffMap: Record<string, BuffMeta> | undefined, id: number | string | undefined) => BuffMeta | undefined;
9
+ declare const normalizeConditionLabel: (name?: string | null) => string | null;
10
+ declare const buildConditionIconMap: (buffMap?: Record<string, {
11
+ name?: string;
12
+ classification?: string;
13
+ icon?: string;
14
+ }>) => Map<string, string>;
15
+ declare const resolveConditionNameFromEntry: (skillName: string, id?: number, buffMap?: Record<string, {
16
+ name?: string;
17
+ }>) => string | null;
18
+ type ConditionSkillEntry = {
19
+ name: string;
20
+ hits: number;
21
+ damage: number;
22
+ icon?: string;
23
+ };
24
+ type PlayerConditionTotals = Record<string, {
25
+ icon?: string;
26
+ applications: number;
27
+ damage: number;
28
+ skills: Record<string, ConditionSkillEntry>;
29
+ applicationsFromBuffs?: number;
30
+ applicationsFromBuffsActive?: number;
31
+ uptimeMs?: number;
32
+ }>;
33
+ type OutgoingConditionSummaryEntry = {
34
+ name: string;
35
+ icon?: string;
36
+ applications: number;
37
+ damage: number;
38
+ applicationsFromBuffs?: number;
39
+ applicationsFromBuffsActive?: number;
40
+ uptimeMs?: number;
41
+ };
42
+ type OutgoingConditionsResult = {
43
+ playerConditions: Record<string, PlayerConditionTotals>;
44
+ summary: Record<string, OutgoingConditionSummaryEntry>;
45
+ meta: {
46
+ buffStateApplicationsTotal: number;
47
+ targetBuffEntriesSeen: number;
48
+ buffStateSourcesSeen: number;
49
+ };
50
+ };
51
+ type GetPlayerKey = (player: any) => string | null;
52
+ declare const computeOutgoingConditions: (payload: {
53
+ players: any[];
54
+ targets: any[];
55
+ skillMap?: Record<string, {
56
+ name?: string;
57
+ icon?: string;
58
+ }>;
59
+ buffMap?: Record<string, {
60
+ name?: string;
61
+ classification?: string;
62
+ icon?: string;
63
+ }>;
64
+ getPlayerKey?: GetPlayerKey;
65
+ }) => OutgoingConditionsResult;
66
+
67
+ export { type ConditionSkillEntry, NON_DAMAGING_CONDITIONS, type OutgoingConditionSummaryEntry, type OutgoingConditionsResult, type PlayerConditionTotals, buildConditionIconMap, computeOutgoingConditions, getDefaultConditionIcon, normalizeConditionLabel, resolveBuffMetaById, resolveConditionNameFromEntry };
@@ -0,0 +1,67 @@
1
+ declare const NON_DAMAGING_CONDITIONS: Set<string>;
2
+ declare const getDefaultConditionIcon: (name?: string | null) => string | undefined;
3
+ type BuffMeta = {
4
+ name?: string;
5
+ icon?: string;
6
+ classification?: string;
7
+ };
8
+ declare const resolveBuffMetaById: (buffMap: Record<string, BuffMeta> | undefined, id: number | string | undefined) => BuffMeta | undefined;
9
+ declare const normalizeConditionLabel: (name?: string | null) => string | null;
10
+ declare const buildConditionIconMap: (buffMap?: Record<string, {
11
+ name?: string;
12
+ classification?: string;
13
+ icon?: string;
14
+ }>) => Map<string, string>;
15
+ declare const resolveConditionNameFromEntry: (skillName: string, id?: number, buffMap?: Record<string, {
16
+ name?: string;
17
+ }>) => string | null;
18
+ type ConditionSkillEntry = {
19
+ name: string;
20
+ hits: number;
21
+ damage: number;
22
+ icon?: string;
23
+ };
24
+ type PlayerConditionTotals = Record<string, {
25
+ icon?: string;
26
+ applications: number;
27
+ damage: number;
28
+ skills: Record<string, ConditionSkillEntry>;
29
+ applicationsFromBuffs?: number;
30
+ applicationsFromBuffsActive?: number;
31
+ uptimeMs?: number;
32
+ }>;
33
+ type OutgoingConditionSummaryEntry = {
34
+ name: string;
35
+ icon?: string;
36
+ applications: number;
37
+ damage: number;
38
+ applicationsFromBuffs?: number;
39
+ applicationsFromBuffsActive?: number;
40
+ uptimeMs?: number;
41
+ };
42
+ type OutgoingConditionsResult = {
43
+ playerConditions: Record<string, PlayerConditionTotals>;
44
+ summary: Record<string, OutgoingConditionSummaryEntry>;
45
+ meta: {
46
+ buffStateApplicationsTotal: number;
47
+ targetBuffEntriesSeen: number;
48
+ buffStateSourcesSeen: number;
49
+ };
50
+ };
51
+ type GetPlayerKey = (player: any) => string | null;
52
+ declare const computeOutgoingConditions: (payload: {
53
+ players: any[];
54
+ targets: any[];
55
+ skillMap?: Record<string, {
56
+ name?: string;
57
+ icon?: string;
58
+ }>;
59
+ buffMap?: Record<string, {
60
+ name?: string;
61
+ classification?: string;
62
+ icon?: string;
63
+ }>;
64
+ getPlayerKey?: GetPlayerKey;
65
+ }) => OutgoingConditionsResult;
66
+
67
+ export { type ConditionSkillEntry, NON_DAMAGING_CONDITIONS, type OutgoingConditionSummaryEntry, type OutgoingConditionsResult, type PlayerConditionTotals, buildConditionIconMap, computeOutgoingConditions, getDefaultConditionIcon, normalizeConditionLabel, resolveBuffMetaById, resolveConditionNameFromEntry };
@@ -0,0 +1,18 @@
1
+ import {
2
+ NON_DAMAGING_CONDITIONS,
3
+ buildConditionIconMap,
4
+ computeOutgoingConditions,
5
+ getDefaultConditionIcon,
6
+ normalizeConditionLabel,
7
+ resolveBuffMetaById,
8
+ resolveConditionNameFromEntry
9
+ } from "./chunk-RGXSI3AI.js";
10
+ export {
11
+ NON_DAMAGING_CONDITIONS,
12
+ buildConditionIconMap,
13
+ computeOutgoingConditions,
14
+ getDefaultConditionIcon,
15
+ normalizeConditionLabel,
16
+ resolveBuffMetaById,
17
+ resolveConditionNameFromEntry
18
+ };
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/constants.ts
21
+ var constants_exports = {};
22
+ __export(constants_exports, {
23
+ BULK_PROCESS_CONCURRENCY: () => BULK_PROCESS_CONCURRENCY,
24
+ STABILITY_BOON_ID: () => STABILITY_BOON_ID,
25
+ TIMESTAMP_MS_THRESHOLD: () => TIMESTAMP_MS_THRESHOLD
26
+ });
27
+ module.exports = __toCommonJS(constants_exports);
28
+ var TIMESTAMP_MS_THRESHOLD = 1e12;
29
+ var STABILITY_BOON_ID = 1122;
30
+ var BULK_PROCESS_CONCURRENCY = 3;
31
+ // Annotate the CommonJS export names for ESM import in node:
32
+ 0 && (module.exports = {
33
+ BULK_PROCESS_CONCURRENCY,
34
+ STABILITY_BOON_ID,
35
+ TIMESTAMP_MS_THRESHOLD
36
+ });
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Shared constants used across the main process, renderer, and shared modules.
3
+ */
4
+ /**
5
+ * Numeric threshold for distinguishing millisecond timestamps from second timestamps.
6
+ * Values >= this are Unix timestamps in milliseconds; values < this are in seconds.
7
+ */
8
+ declare const TIMESTAMP_MS_THRESHOLD = 1000000000000;
9
+ /**
10
+ * Guild Wars 2 boon ID for Stability.
11
+ */
12
+ declare const STABILITY_BOON_ID = 1122;
13
+ /**
14
+ * Maximum number of logs processed concurrently during bulk upload.
15
+ */
16
+ declare const BULK_PROCESS_CONCURRENCY = 3;
17
+
18
+ export { BULK_PROCESS_CONCURRENCY, STABILITY_BOON_ID, TIMESTAMP_MS_THRESHOLD };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Shared constants used across the main process, renderer, and shared modules.
3
+ */
4
+ /**
5
+ * Numeric threshold for distinguishing millisecond timestamps from second timestamps.
6
+ * Values >= this are Unix timestamps in milliseconds; values < this are in seconds.
7
+ */
8
+ declare const TIMESTAMP_MS_THRESHOLD = 1000000000000;
9
+ /**
10
+ * Guild Wars 2 boon ID for Stability.
11
+ */
12
+ declare const STABILITY_BOON_ID = 1122;
13
+ /**
14
+ * Maximum number of logs processed concurrently during bulk upload.
15
+ */
16
+ declare const BULK_PROCESS_CONCURRENCY = 3;
17
+
18
+ export { BULK_PROCESS_CONCURRENCY, STABILITY_BOON_ID, TIMESTAMP_MS_THRESHOLD };
@@ -0,0 +1,10 @@
1
+ import {
2
+ BULK_PROCESS_CONCURRENCY,
3
+ STABILITY_BOON_ID,
4
+ TIMESTAMP_MS_THRESHOLD
5
+ } from "./chunk-ZFZS7JFU.js";
6
+ export {
7
+ BULK_PROCESS_CONCURRENCY,
8
+ STABILITY_BOON_ID,
9
+ TIMESTAMP_MS_THRESHOLD
10
+ };