@overlayed/app 0.3.0 → 0.4.1
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.
- package/dist/index.d.ts +217 -2229
- package/dist/index.js +958 -1108
- package/dist/native-interface/build/overlayed_native_interface_x64.node +0 -0
- package/dist/native-interface/main.js +10 -1
- package/dist/render-interface/build/overlayed_render_hook_x64.dll +0 -0
- package/dist/render-interface/build/overlayed_render_interface_x64.node +0 -0
- package/dist/siege.d.ts +2131 -0
- package/dist/siege.js +326 -0
- package/package.json +18 -10
package/dist/index.js
CHANGED
|
@@ -1,56 +1,57 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var c = (
|
|
4
|
-
import
|
|
5
|
-
import { createRequire as
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { createHash as
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
var He = Object.defineProperty;
|
|
2
|
+
var ze = (n, e, t) => e in n ? He(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var c = (n, e, t) => ze(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { type as K } from "arktype";
|
|
5
|
+
import { createRequire as Y } from "node:module";
|
|
6
|
+
import k, { existsSync as qe, mkdirSync as We, readFileSync as _e, writeFileSync as Qe, copyFileSync as Xe } from "node:fs";
|
|
7
|
+
import m, { resolve as Je } from "node:path";
|
|
8
|
+
import v from "node:fs/promises";
|
|
9
|
+
import ke from "jszip";
|
|
10
|
+
import { createHash as Ye } from "node:crypto";
|
|
11
|
+
import Ze, { app as Pe } from "electron";
|
|
12
|
+
var et = Object.defineProperty, tt = (n, e, t) => e in n ? et(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, R = (n, e, t) => tt(n, typeof e != "symbol" ? e + "" : e, t);
|
|
13
|
+
function nt(n) {
|
|
14
|
+
return { all: n = n || /* @__PURE__ */ new Map(), on: function(e, t) {
|
|
15
|
+
var r = n.get(e);
|
|
16
|
+
r ? r.push(t) : n.set(e, [t]);
|
|
17
|
+
}, off: function(e, t) {
|
|
18
|
+
var r = n.get(e);
|
|
19
|
+
r && (t ? r.splice(r.indexOf(t) >>> 0, 1) : n.set(e, []));
|
|
20
|
+
}, emit: function(e, t) {
|
|
21
|
+
var r = n.get(e);
|
|
22
|
+
r && r.slice().map(function(s) {
|
|
23
|
+
s(t);
|
|
24
|
+
}), (r = n.get("*")) && r.slice().map(function(s) {
|
|
25
|
+
s(e, t);
|
|
25
26
|
});
|
|
26
27
|
} };
|
|
27
28
|
}
|
|
28
|
-
let
|
|
29
|
+
let Ce = class {
|
|
29
30
|
constructor() {
|
|
30
|
-
|
|
31
|
+
R(this, "emitter"), this.emitter = nt();
|
|
31
32
|
}
|
|
32
|
-
on(
|
|
33
|
-
this.emitter.on(
|
|
33
|
+
on(e, t) {
|
|
34
|
+
this.emitter.on(e, t);
|
|
34
35
|
}
|
|
35
|
-
off(
|
|
36
|
-
this.emitter.off(
|
|
36
|
+
off(e, t) {
|
|
37
|
+
this.emitter.off(e, t);
|
|
37
38
|
}
|
|
38
|
-
emit(
|
|
39
|
-
this.emitter.emit(
|
|
39
|
+
emit(e, t) {
|
|
40
|
+
this.emitter.emit(e, t);
|
|
40
41
|
}
|
|
41
42
|
removeAllListeners() {
|
|
42
43
|
this.emitter.off("*", () => {
|
|
43
44
|
});
|
|
44
45
|
}
|
|
45
46
|
};
|
|
46
|
-
function
|
|
47
|
-
var
|
|
48
|
-
return
|
|
47
|
+
function Ke(n, ...e) {
|
|
48
|
+
var t;
|
|
49
|
+
return t = class extends n {
|
|
49
50
|
/**
|
|
50
51
|
* Lazy get the static instance
|
|
51
52
|
*/
|
|
52
53
|
static getInstance() {
|
|
53
|
-
return this._instance || (this._instance = new
|
|
54
|
+
return this._instance || (this._instance = new n(...e)), this._instance;
|
|
54
55
|
}
|
|
55
56
|
/**
|
|
56
57
|
* Release the instance (most of the time you won't need this)
|
|
@@ -58,29 +59,68 @@ function bt(r, ...t) {
|
|
|
58
59
|
static clearInstance() {
|
|
59
60
|
this._instance = void 0;
|
|
60
61
|
}
|
|
61
|
-
},
|
|
62
|
+
}, R(t, "_instance"), t;
|
|
62
63
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
class rt extends Ce {
|
|
65
|
+
destroy() {
|
|
66
|
+
this.removeAllListeners();
|
|
67
|
+
}
|
|
68
|
+
fatal(e, t, r) {
|
|
69
|
+
this.emit("fatal", {
|
|
70
|
+
code: t,
|
|
71
|
+
message: e,
|
|
72
|
+
data: r,
|
|
73
|
+
timestamp: Date.now()
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
error(e, t, r) {
|
|
77
|
+
this.emit("error", {
|
|
78
|
+
code: t,
|
|
79
|
+
message: e,
|
|
80
|
+
data: r,
|
|
81
|
+
timestamp: Date.now()
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
warn(e, t, r) {
|
|
85
|
+
this.emit("warning", {
|
|
86
|
+
code: t,
|
|
87
|
+
message: e,
|
|
88
|
+
data: r,
|
|
89
|
+
timestamp: Date.now()
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
Ke(rt);
|
|
94
|
+
const st = Y(import.meta.url), {
|
|
95
|
+
PipeEventServer: it,
|
|
96
|
+
PipeEventClient: xn,
|
|
97
|
+
PipeEventBase: $n,
|
|
98
|
+
ProcessMonitor: Dn,
|
|
99
|
+
Process: Tn,
|
|
100
|
+
InjectionMethod: Bn,
|
|
101
|
+
AccessLevel: Gn,
|
|
102
|
+
HardwareInterface: jn
|
|
103
|
+
} = st("./build/overlayed_native_interface_x64.node");
|
|
104
|
+
let at = class extends Ce {
|
|
105
|
+
constructor(e) {
|
|
106
|
+
super(), R(this, "server", null), R(this, "_hasConnection", !1), R(this, "pipeId"), this.pipeId = e, this.init();
|
|
69
107
|
}
|
|
70
108
|
get hasConnection() {
|
|
71
109
|
return this._hasConnection;
|
|
72
110
|
}
|
|
73
111
|
destroy() {
|
|
74
|
-
var
|
|
75
|
-
this.server && (this._hasConnection = !1, (
|
|
112
|
+
var e;
|
|
113
|
+
this.server && (this._hasConnection = !1, (e = this.server) == null || e.removeAllListeners(), this.server = null);
|
|
76
114
|
}
|
|
115
|
+
// TODO make sure that new events and new event keys do not stop the app from working
|
|
116
|
+
// this is because we may have new events/event keys from a DLL but the types/validations might not be up to date
|
|
77
117
|
init() {
|
|
78
|
-
this.server = new
|
|
118
|
+
this.server = new it(this.pipeId, { clientCount: 1, access: 1 }), this.server.on("event", (e) => {
|
|
79
119
|
try {
|
|
80
|
-
const
|
|
81
|
-
this.emit("data",
|
|
82
|
-
} catch (
|
|
83
|
-
this.emit("error",
|
|
120
|
+
const t = JSON.parse(e);
|
|
121
|
+
this.emit("data", [t]);
|
|
122
|
+
} catch (t) {
|
|
123
|
+
this.emit("error", t);
|
|
84
124
|
}
|
|
85
125
|
}), this.server.on("connected", () => {
|
|
86
126
|
this._hasConnection = !0;
|
|
@@ -89,54 +129,50 @@ let kt = class extends _t {
|
|
|
89
129
|
});
|
|
90
130
|
}
|
|
91
131
|
};
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
function
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
n && n.slice().map(function(s) {
|
|
107
|
-
s(e);
|
|
108
|
-
}), (n = r.get("*")) && n.slice().map(function(s) {
|
|
109
|
-
s(t, e);
|
|
132
|
+
const oe = Ke(at, "stats-cc");
|
|
133
|
+
function ot(n) {
|
|
134
|
+
return { all: n = n || /* @__PURE__ */ new Map(), on: function(e, t) {
|
|
135
|
+
var r = n.get(e);
|
|
136
|
+
r ? r.push(t) : n.set(e, [t]);
|
|
137
|
+
}, off: function(e, t) {
|
|
138
|
+
var r = n.get(e);
|
|
139
|
+
r && (t ? r.splice(r.indexOf(t) >>> 0, 1) : n.set(e, []));
|
|
140
|
+
}, emit: function(e, t) {
|
|
141
|
+
var r = n.get(e);
|
|
142
|
+
r && r.slice().map(function(s) {
|
|
143
|
+
s(t);
|
|
144
|
+
}), (r = n.get("*")) && r.slice().map(function(s) {
|
|
145
|
+
s(e, t);
|
|
110
146
|
});
|
|
111
147
|
} };
|
|
112
148
|
}
|
|
113
|
-
class
|
|
149
|
+
class Se {
|
|
114
150
|
constructor() {
|
|
115
151
|
c(this, "emitter");
|
|
116
|
-
this.emitter =
|
|
152
|
+
this.emitter = ot();
|
|
117
153
|
}
|
|
118
|
-
on(
|
|
119
|
-
this.emitter.on(
|
|
154
|
+
on(e, t) {
|
|
155
|
+
this.emitter.on(e, t);
|
|
120
156
|
}
|
|
121
|
-
off(
|
|
122
|
-
this.emitter.off(
|
|
157
|
+
off(e, t) {
|
|
158
|
+
this.emitter.off(e, t);
|
|
123
159
|
}
|
|
124
|
-
emit(
|
|
125
|
-
this.emitter.emit(
|
|
160
|
+
emit(e, t) {
|
|
161
|
+
this.emitter.emit(e, t);
|
|
126
162
|
}
|
|
127
163
|
removeAllListeners() {
|
|
128
164
|
this.emitter.off("*", () => {
|
|
129
165
|
});
|
|
130
166
|
}
|
|
131
167
|
}
|
|
132
|
-
function
|
|
133
|
-
var
|
|
134
|
-
return
|
|
168
|
+
function _(n, ...e) {
|
|
169
|
+
var r;
|
|
170
|
+
return r = class extends n {
|
|
135
171
|
/**
|
|
136
172
|
* Lazy get the static instance
|
|
137
173
|
*/
|
|
138
174
|
static getInstance() {
|
|
139
|
-
return this._instance || (this._instance = new
|
|
175
|
+
return this._instance || (this._instance = new n(...e)), this._instance;
|
|
140
176
|
}
|
|
141
177
|
/**
|
|
142
178
|
* Release the instance (most of the time you won't need this)
|
|
@@ -144,163 +180,206 @@ function I(r, ...t) {
|
|
|
144
180
|
static clearInstance() {
|
|
145
181
|
this._instance = void 0;
|
|
146
182
|
}
|
|
147
|
-
}, c(
|
|
183
|
+
}, c(r, "_instance"), r;
|
|
148
184
|
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
} catch (t) {
|
|
153
|
-
return [null, t];
|
|
185
|
+
class lt extends Se {
|
|
186
|
+
destroy() {
|
|
187
|
+
this.removeAllListeners();
|
|
154
188
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
return e;
|
|
163
|
-
}
|
|
164
|
-
class St {
|
|
165
|
-
constructor(t) {
|
|
166
|
-
c(this, "options");
|
|
167
|
-
c(this, "_data");
|
|
168
|
-
this.options = t, this._data = this.load();
|
|
189
|
+
fatal(e, t, r) {
|
|
190
|
+
this.emit("fatal", {
|
|
191
|
+
code: t,
|
|
192
|
+
message: e,
|
|
193
|
+
data: r,
|
|
194
|
+
timestamp: Date.now()
|
|
195
|
+
});
|
|
169
196
|
}
|
|
170
|
-
|
|
171
|
-
|
|
197
|
+
error(e, t, r) {
|
|
198
|
+
this.emit("error", {
|
|
199
|
+
code: t,
|
|
200
|
+
message: e,
|
|
201
|
+
data: r,
|
|
202
|
+
timestamp: Date.now()
|
|
203
|
+
});
|
|
172
204
|
}
|
|
173
|
-
|
|
174
|
-
this.
|
|
205
|
+
warn(e, t, r) {
|
|
206
|
+
this.emit("warning", {
|
|
207
|
+
code: t,
|
|
208
|
+
message: e,
|
|
209
|
+
data: r,
|
|
210
|
+
timestamp: Date.now()
|
|
211
|
+
});
|
|
175
212
|
}
|
|
176
|
-
|
|
177
|
-
|
|
213
|
+
}
|
|
214
|
+
const I = _(lt);
|
|
215
|
+
class ct {
|
|
216
|
+
constructor(e) {
|
|
217
|
+
c(this, "data");
|
|
218
|
+
c(this, "_schema");
|
|
219
|
+
c(this, "_defaultValue");
|
|
220
|
+
c(this, "_path");
|
|
221
|
+
const { schema: t, default: r, path: s } = e;
|
|
222
|
+
this._schema = t, this._defaultValue = r, this._path = s;
|
|
223
|
+
}
|
|
224
|
+
set(e) {
|
|
225
|
+
const t = this._schema["~standard"].validate(e);
|
|
226
|
+
if (t instanceof Promise)
|
|
227
|
+
throw new Error("StructuredConfigFile does not support async validation");
|
|
228
|
+
if (t.issues) {
|
|
229
|
+
this.reportInvalidConfigFile(t.issues);
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
this.data = this.onBeforeSave(e), this.save(e);
|
|
178
233
|
}
|
|
179
|
-
|
|
180
|
-
return
|
|
234
|
+
get() {
|
|
235
|
+
return this.data ? this.data : this.load();
|
|
181
236
|
}
|
|
182
|
-
|
|
237
|
+
getKey(e) {
|
|
238
|
+
return this.get()[e];
|
|
239
|
+
}
|
|
240
|
+
save(e) {
|
|
241
|
+
const t = this.onBeforeSave(e);
|
|
183
242
|
try {
|
|
184
|
-
|
|
185
|
-
C.writeFileSync(this.options.path, JSON.stringify(t, null, 2));
|
|
243
|
+
k.writeFileSync(this.getFilePath(), JSON.stringify(t, void 0, 2));
|
|
186
244
|
} catch {
|
|
245
|
+
return;
|
|
187
246
|
}
|
|
247
|
+
return this.data = t;
|
|
188
248
|
}
|
|
189
249
|
load() {
|
|
190
|
-
if (!this.fileExists(this.
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
return this.
|
|
194
|
-
|
|
195
|
-
return n ? this.setupDefaultData(!0) : this.onAfterLoad(e);
|
|
196
|
-
}
|
|
197
|
-
canReadWriteFile(t) {
|
|
250
|
+
if (!this.fileExists(this.getFilePath()) || !this.canReadWriteFile(this.getFilePath())) {
|
|
251
|
+
this.save(this._defaultValue);
|
|
252
|
+
const e = this.onAfterLoad(this._defaultValue);
|
|
253
|
+
return this.data = e, e;
|
|
254
|
+
}
|
|
198
255
|
try {
|
|
199
|
-
|
|
256
|
+
const e = k.readFileSync(this.getFilePath(), "utf8"), t = this.onAfterLoad(this.parseStoredData(e));
|
|
257
|
+
return this.data = t, t;
|
|
200
258
|
} catch {
|
|
201
|
-
return
|
|
259
|
+
return this.data = this._defaultValue;
|
|
202
260
|
}
|
|
203
261
|
}
|
|
204
|
-
|
|
262
|
+
onBeforeSave(e) {
|
|
263
|
+
return e;
|
|
264
|
+
}
|
|
265
|
+
onAfterLoad(e) {
|
|
266
|
+
return e;
|
|
267
|
+
}
|
|
268
|
+
getFilePath() {
|
|
269
|
+
return this._path;
|
|
270
|
+
}
|
|
271
|
+
parseStoredData(e) {
|
|
205
272
|
try {
|
|
206
|
-
|
|
273
|
+
const r = K("string.json.parse").to("object")(e);
|
|
274
|
+
if (r instanceof K.errors)
|
|
275
|
+
return this._defaultValue;
|
|
276
|
+
const s = this._schema["~standard"].validate(r);
|
|
277
|
+
if (s instanceof Promise)
|
|
278
|
+
throw new Error("StructuredConfigFile does not support async validation");
|
|
279
|
+
return s.issues ? this.migrate(r, this._defaultValue) : this.migrate(s.value, this._defaultValue);
|
|
207
280
|
} catch {
|
|
208
|
-
return
|
|
281
|
+
return this._defaultValue;
|
|
209
282
|
}
|
|
210
283
|
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
super(e);
|
|
218
|
-
c(this, "options");
|
|
219
|
-
this.options = e;
|
|
220
|
-
}
|
|
221
|
-
get data() {
|
|
222
|
-
const e = this.options.schema["~standard"].validate(super.data);
|
|
223
|
-
if (e instanceof Promise)
|
|
224
|
-
throw new Error("StructuredConfigFile does not support async validation");
|
|
225
|
-
return e.issues ? this.options.default : e.value;
|
|
284
|
+
canReadWriteFile(e) {
|
|
285
|
+
try {
|
|
286
|
+
return k.accessSync(e, k.constants.R_OK | k.constants.W_OK), !0;
|
|
287
|
+
} catch {
|
|
288
|
+
return !1;
|
|
289
|
+
}
|
|
226
290
|
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
291
|
+
fileExists(e) {
|
|
292
|
+
try {
|
|
293
|
+
return k.accessSync(e, k.constants.F_OK), !0;
|
|
294
|
+
} catch {
|
|
295
|
+
return !1;
|
|
296
|
+
}
|
|
232
297
|
}
|
|
233
|
-
|
|
234
|
-
const
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
return
|
|
298
|
+
migrate(e, t) {
|
|
299
|
+
const r = { ...e };
|
|
300
|
+
for (const s in t)
|
|
301
|
+
Object.prototype.hasOwnProperty.call(t, s) && (s in e ? e[s] !== null && t[s] !== null && typeof e[s] == "object" && typeof t[s] == "object" && !Array.isArray(e[s]) && !Array.isArray(t[s]) ? r[s] = this.migrate(e[s], t[s]) : Array.isArray(t[s]) && (r[s] = e[s]) : r[s] = t[s]);
|
|
302
|
+
return r;
|
|
303
|
+
}
|
|
304
|
+
reportInvalidConfigFile(e) {
|
|
305
|
+
I.getInstance().error("Invalid config file", "INVALID_CONFIG_FILE", {
|
|
306
|
+
issues: e.map((t) => t.message),
|
|
307
|
+
filePath: this._path,
|
|
308
|
+
data: this.data
|
|
309
|
+
});
|
|
238
310
|
}
|
|
239
311
|
}
|
|
240
|
-
const
|
|
241
|
-
scope: (
|
|
242
|
-
log: (...
|
|
243
|
-
console.log(
|
|
312
|
+
const Me = {
|
|
313
|
+
scope: (n) => ({
|
|
314
|
+
log: (...e) => {
|
|
315
|
+
console.log(n, ...e);
|
|
244
316
|
},
|
|
245
|
-
error: (...
|
|
246
|
-
console.error(
|
|
317
|
+
error: (...e) => {
|
|
318
|
+
console.error(n, ...e);
|
|
247
319
|
},
|
|
248
|
-
warn: (...
|
|
249
|
-
console.warn(
|
|
320
|
+
warn: (...e) => {
|
|
321
|
+
console.warn(n, ...e);
|
|
250
322
|
},
|
|
251
|
-
info: (...
|
|
252
|
-
console.info(
|
|
323
|
+
info: (...e) => {
|
|
324
|
+
console.info(n, ...e);
|
|
253
325
|
},
|
|
254
|
-
debug: (...
|
|
255
|
-
console.debug(
|
|
326
|
+
debug: (...e) => {
|
|
327
|
+
console.debug(n, ...e);
|
|
256
328
|
},
|
|
257
|
-
captureSentryException: (...
|
|
258
|
-
console.error(
|
|
329
|
+
captureSentryException: (...e) => {
|
|
330
|
+
console.error(n, ...e);
|
|
259
331
|
},
|
|
260
|
-
sentryError: (...
|
|
261
|
-
console.error(
|
|
332
|
+
sentryError: (...e) => {
|
|
333
|
+
console.error(n, ...e);
|
|
262
334
|
},
|
|
263
|
-
sentryLog: (...
|
|
264
|
-
console.log(
|
|
335
|
+
sentryLog: (...e) => {
|
|
336
|
+
console.log(n, ...e);
|
|
265
337
|
},
|
|
266
|
-
sentryWarn: (...
|
|
267
|
-
console.warn(
|
|
338
|
+
sentryWarn: (...e) => {
|
|
339
|
+
console.warn(n, ...e);
|
|
268
340
|
}
|
|
269
341
|
}),
|
|
270
|
-
error: (...
|
|
271
|
-
console.error(name, ...
|
|
342
|
+
error: (...n) => {
|
|
343
|
+
console.error(name, ...n);
|
|
272
344
|
},
|
|
273
|
-
warn: (...
|
|
274
|
-
console.warn(name, ...
|
|
345
|
+
warn: (...n) => {
|
|
346
|
+
console.warn(name, ...n);
|
|
275
347
|
},
|
|
276
|
-
info: (...
|
|
277
|
-
console.info(name, ...
|
|
348
|
+
info: (...n) => {
|
|
349
|
+
console.info(name, ...n);
|
|
278
350
|
},
|
|
279
|
-
debug: (...
|
|
280
|
-
console.debug(name, ...
|
|
351
|
+
debug: (...n) => {
|
|
352
|
+
console.debug(name, ...n);
|
|
281
353
|
},
|
|
282
|
-
captureSentryException: (...
|
|
283
|
-
console.error(name, ...
|
|
354
|
+
captureSentryException: (...n) => {
|
|
355
|
+
console.error(name, ...n);
|
|
284
356
|
},
|
|
285
|
-
sentryError: (...
|
|
286
|
-
console.error(name, ...
|
|
357
|
+
sentryError: (...n) => {
|
|
358
|
+
console.error(name, ...n);
|
|
287
359
|
},
|
|
288
|
-
sentryLog: (...
|
|
289
|
-
console.log(name, ...
|
|
360
|
+
sentryLog: (...n) => {
|
|
361
|
+
console.log(name, ...n);
|
|
290
362
|
},
|
|
291
|
-
sentryWarn: (...
|
|
292
|
-
console.warn(name, ...
|
|
363
|
+
sentryWarn: (...n) => {
|
|
364
|
+
console.warn(name, ...n);
|
|
293
365
|
},
|
|
294
|
-
sentryInfo: (...
|
|
295
|
-
console.info(name, ...
|
|
366
|
+
sentryInfo: (...n) => {
|
|
367
|
+
console.info(name, ...n);
|
|
296
368
|
}
|
|
297
|
-
},
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
369
|
+
}, le = () => m.join(process.env.APPDATA ?? "", "overlayed");
|
|
370
|
+
function ut(n = []) {
|
|
371
|
+
return m.normalize(m.join(le(), global.OVERLAYED.APP_NAME, ...n));
|
|
372
|
+
}
|
|
373
|
+
const dt = K({
|
|
374
|
+
game: "string",
|
|
375
|
+
type: "string",
|
|
376
|
+
creation_time: "number"
|
|
377
|
+
});
|
|
378
|
+
class Ae {
|
|
379
|
+
constructor(e) {
|
|
301
380
|
c(this, "logger");
|
|
302
381
|
c(this, "initialized", !1);
|
|
303
|
-
this.logger =
|
|
382
|
+
this.logger = Me.scope(e);
|
|
304
383
|
}
|
|
305
384
|
init() {
|
|
306
385
|
this.logger.log("Initializing"), this.initialized = !0;
|
|
@@ -309,12 +388,12 @@ class Ke {
|
|
|
309
388
|
this.logger.log("Destroying"), this.initialized = !1;
|
|
310
389
|
}
|
|
311
390
|
}
|
|
312
|
-
class
|
|
313
|
-
constructor(
|
|
391
|
+
class G extends Se {
|
|
392
|
+
constructor(t) {
|
|
314
393
|
super();
|
|
315
394
|
c(this, "logger");
|
|
316
395
|
c(this, "initialized", !1);
|
|
317
|
-
this.logger =
|
|
396
|
+
this.logger = Me.scope(t);
|
|
318
397
|
}
|
|
319
398
|
init() {
|
|
320
399
|
this.logger.log("Initializing"), this.initialized = !0;
|
|
@@ -323,399 +402,371 @@ class x extends Ct {
|
|
|
323
402
|
this.logger.log("Destroying"), this.initialized = !1, this.removeAllListeners();
|
|
324
403
|
}
|
|
325
404
|
}
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
this.emit("error", {
|
|
332
|
-
code: e,
|
|
333
|
-
message: t,
|
|
334
|
-
data: n,
|
|
335
|
-
timestamp: Date.now()
|
|
336
|
-
});
|
|
337
|
-
}
|
|
338
|
-
warn(t, e, n) {
|
|
339
|
-
this.emit("warning", {
|
|
340
|
-
code: e,
|
|
341
|
-
message: t,
|
|
342
|
-
data: n,
|
|
343
|
-
timestamp: Date.now()
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
const q = I($t);
|
|
348
|
-
function At() {
|
|
349
|
-
return _.normalize(B);
|
|
350
|
-
}
|
|
351
|
-
function Rt(r = []) {
|
|
352
|
-
return _.normalize(_.join(B, global.OVERLAYED.APP_NAME, ...r));
|
|
353
|
-
}
|
|
354
|
-
var R = "object", xe = "function", Te = "prototype", re = "text", he = "json", ve = "abort", oe = "paramsSerializer", Ee = "addEventListener", N = "status", k = "headers", ee = Object, P = void 0, W = null, ie = ee[Te], X = ee.keys, D = Array.isArray, we = "method", De = "HEAD", le = "GET", Oe = "OPTIONS", Kt = "POST", xt = "PUT", Tt = "PATCH", Dt = "DELETE";
|
|
355
|
-
function Ot(r, t) {
|
|
356
|
-
let e = new AbortController();
|
|
357
|
-
function n(i) {
|
|
358
|
-
e.abort(i), o();
|
|
405
|
+
var L = "object", Le = "function", Oe = "prototype", ee = "text", ce = "json", ye = "abort", ne = "paramsSerializer", me = "addEventListener", V = "status", w = "headers", Z = Object, S = void 0, W = null, re = Z[Oe], Q = Z.keys, x = Array.isArray, be = "method", Fe = "HEAD", se = "GET", Re = "OPTIONS", ht = "POST", gt = "PUT", ft = "PATCH", pt = "DELETE";
|
|
406
|
+
function yt(n, e) {
|
|
407
|
+
let t = new AbortController();
|
|
408
|
+
function r(o) {
|
|
409
|
+
t.abort(o), a();
|
|
359
410
|
}
|
|
360
411
|
let s = [];
|
|
361
|
-
for (let
|
|
362
|
-
if ((
|
|
363
|
-
|
|
412
|
+
for (let o of n) {
|
|
413
|
+
if ((o == null ? void 0 : o.aborted) === !0) {
|
|
414
|
+
r(o.reason);
|
|
364
415
|
break;
|
|
365
416
|
}
|
|
366
|
-
if (
|
|
417
|
+
if (o != null && o[me]) {
|
|
367
418
|
let l = () => {
|
|
368
|
-
|
|
419
|
+
r(o.reason);
|
|
369
420
|
};
|
|
370
421
|
s.push(() => {
|
|
371
|
-
var
|
|
372
|
-
(
|
|
373
|
-
}),
|
|
422
|
+
var d;
|
|
423
|
+
(d = o.removeEventListener) == null || d.call(o, ye, l);
|
|
424
|
+
}), o[me](ye, l);
|
|
374
425
|
}
|
|
375
426
|
}
|
|
376
|
-
function
|
|
377
|
-
s.forEach((
|
|
427
|
+
function a() {
|
|
428
|
+
s.forEach((o) => o()), e == null || e();
|
|
378
429
|
}
|
|
379
|
-
let
|
|
380
|
-
return
|
|
430
|
+
let i = t.signal;
|
|
431
|
+
return i.clear = a, i;
|
|
381
432
|
}
|
|
382
|
-
var
|
|
383
|
-
if (
|
|
384
|
-
if (typeof
|
|
385
|
-
let
|
|
386
|
-
return
|
|
433
|
+
var ve = Z.getPrototypeOf, Ie = (n) => {
|
|
434
|
+
if (n !== W && typeof n === L) {
|
|
435
|
+
if (typeof ve === Le) {
|
|
436
|
+
let e = ve(n);
|
|
437
|
+
return e === re || e === W;
|
|
387
438
|
}
|
|
388
|
-
return
|
|
439
|
+
return re.toString.call(n) === `[${L} Object]`;
|
|
389
440
|
}
|
|
390
441
|
return !1;
|
|
391
|
-
},
|
|
392
|
-
if (
|
|
393
|
-
return
|
|
394
|
-
["__proto__", "constructor",
|
|
395
|
-
}),
|
|
442
|
+
}, ue = (...n) => n.reduce((e, t) => {
|
|
443
|
+
if (x(t)) throw new TypeError(`Arguments must be ${L}s, not arrays.`);
|
|
444
|
+
return Q(t).forEach((r) => {
|
|
445
|
+
["__proto__", "constructor", Oe].includes(r) || (x(e[r]) && x(t[r]) ? e[r] = Array.from(new Set(e[r].concat(t[r]))) : Ie(e[r]) && Ie(t[r]) ? e[r] = ue(e[r], t[r]) : e[r] = t[r]);
|
|
446
|
+
}), e;
|
|
396
447
|
}, {});
|
|
397
|
-
function
|
|
398
|
-
if (
|
|
399
|
-
let s = [],
|
|
400
|
-
if (l && !
|
|
401
|
-
if (
|
|
402
|
-
if (
|
|
403
|
-
if (
|
|
448
|
+
function de(n, e = !0, t = W, r) {
|
|
449
|
+
if (n === S || n === W) return "";
|
|
450
|
+
let s = [], a = e ? encodeURIComponent : (g) => g, i = x(n), { arrayFormat: o, allowDots: l, serializeDate: d } = r || {}, h = (g) => {
|
|
451
|
+
if (l && !i) return `.${g}`;
|
|
452
|
+
if (i) {
|
|
453
|
+
if (o === "brackets") return "[]";
|
|
454
|
+
if (o === "repeat") return "";
|
|
404
455
|
}
|
|
405
|
-
return `[${
|
|
456
|
+
return `[${g}]`;
|
|
406
457
|
};
|
|
407
|
-
for (let
|
|
408
|
-
let
|
|
409
|
-
if (
|
|
410
|
-
let
|
|
411
|
-
if (!isNaN(
|
|
412
|
-
let f =
|
|
458
|
+
for (let g in n) if (re.hasOwnProperty.call(n, g)) {
|
|
459
|
+
let u = n[g];
|
|
460
|
+
if (u !== S) {
|
|
461
|
+
let p = t ? `${t}${h(g)}` : a(g);
|
|
462
|
+
if (!isNaN(u) && u instanceof Date && (u = d ? d(u) : u.toISOString()), typeof u === L) {
|
|
463
|
+
let f = de(u, e, p, r);
|
|
413
464
|
f !== "" && s.push(f);
|
|
414
|
-
} else s.push(`${
|
|
465
|
+
} else s.push(`${a(p)}=${a(u)}`);
|
|
415
466
|
}
|
|
416
467
|
}
|
|
417
468
|
return s.join("&");
|
|
418
469
|
}
|
|
419
|
-
function
|
|
420
|
-
return
|
|
421
|
-
let
|
|
422
|
-
|
|
423
|
-
}),
|
|
470
|
+
function ie(n) {
|
|
471
|
+
return x(n) ? n.map(ie) : (n && typeof n === L && Q(n).forEach((e) => {
|
|
472
|
+
let t = n[e];
|
|
473
|
+
t === S ? delete n[e] : ie(t);
|
|
474
|
+
}), n);
|
|
424
475
|
}
|
|
425
|
-
function
|
|
426
|
-
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(
|
|
476
|
+
function mt(n) {
|
|
477
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(n);
|
|
427
478
|
}
|
|
428
|
-
function
|
|
429
|
-
return
|
|
479
|
+
function bt(n, e) {
|
|
480
|
+
return n ? e ? (n.endsWith("/") ? n : n + "/") + (e[0] === "/" ? e.slice(1) : e) : n : e || "";
|
|
430
481
|
}
|
|
431
|
-
var
|
|
432
|
-
constructor(
|
|
433
|
-
super(
|
|
434
|
-
}
|
|
435
|
-
},
|
|
436
|
-
constructor(
|
|
437
|
-
super(
|
|
438
|
-
}
|
|
439
|
-
},
|
|
440
|
-
for (var
|
|
441
|
-
if (
|
|
442
|
-
return
|
|
443
|
-
}, z = (
|
|
444
|
-
var
|
|
445
|
-
for (var
|
|
446
|
-
if (
|
|
447
|
-
return
|
|
448
|
-
},
|
|
449
|
-
var
|
|
482
|
+
var vt = "XiorError", It = "XiorTimeoutError", xe = class extends Error {
|
|
483
|
+
constructor(n, e, t) {
|
|
484
|
+
super(n), this.name = vt, this.request = e, this.config = e, this.response = t;
|
|
485
|
+
}
|
|
486
|
+
}, Et = class extends xe {
|
|
487
|
+
constructor(e, t, r) {
|
|
488
|
+
super(e, t, r), this.name = It;
|
|
489
|
+
}
|
|
490
|
+
}, wt = Object.defineProperty, _t = Object.defineProperties, kt = Object.getOwnPropertyDescriptors, X = Object.getOwnPropertySymbols, $e = Object.prototype.hasOwnProperty, De = Object.prototype.propertyIsEnumerable, Ee = (n, e, t) => e in n ? wt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, $ = (n, e) => {
|
|
491
|
+
for (var t in e || (e = {})) $e.call(e, t) && Ee(n, t, e[t]);
|
|
492
|
+
if (X) for (var t of X(e)) De.call(e, t) && Ee(n, t, e[t]);
|
|
493
|
+
return n;
|
|
494
|
+
}, z = (n, e) => _t(n, kt(e)), Pt = (n, e) => {
|
|
495
|
+
var t = {};
|
|
496
|
+
for (var r in n) $e.call(n, r) && e.indexOf(r) < 0 && (t[r] = n[r]);
|
|
497
|
+
if (n != null && X) for (var r of X(n)) e.indexOf(r) < 0 && De.call(n, r) && (t[r] = n[r]);
|
|
498
|
+
return t;
|
|
499
|
+
}, D = (n, e, t) => new Promise((r, s) => {
|
|
500
|
+
var a = (l) => {
|
|
450
501
|
try {
|
|
451
|
-
|
|
452
|
-
} catch (
|
|
453
|
-
s(
|
|
502
|
+
o(t.next(l));
|
|
503
|
+
} catch (d) {
|
|
504
|
+
s(d);
|
|
454
505
|
}
|
|
455
|
-
},
|
|
506
|
+
}, i = (l) => {
|
|
456
507
|
try {
|
|
457
|
-
|
|
458
|
-
} catch (
|
|
459
|
-
s(
|
|
508
|
+
o(t.throw(l));
|
|
509
|
+
} catch (d) {
|
|
510
|
+
s(d);
|
|
460
511
|
}
|
|
461
|
-
},
|
|
462
|
-
|
|
463
|
-
}),
|
|
464
|
-
function
|
|
465
|
-
return [
|
|
512
|
+
}, o = (l) => l.done ? r(l.value) : Promise.resolve(l.value).then(a, i);
|
|
513
|
+
o((t = t.apply(n, e)).next());
|
|
514
|
+
}), he = "application/", Te = `${he}x-www-form-urlencoded`, Be = RegExp, Ct = new Be(`^${Te}`, "i"), Kt = `${he}${ce}`, St = new Be(`^${he}.*${ce}.*`, "i");
|
|
515
|
+
function Mt(n = se) {
|
|
516
|
+
return [Fe, se, Re].includes(n);
|
|
466
517
|
}
|
|
467
|
-
var
|
|
468
|
-
function
|
|
469
|
-
return
|
|
470
|
-
let
|
|
471
|
-
if (
|
|
472
|
-
let
|
|
473
|
-
if (
|
|
474
|
-
let f =
|
|
475
|
-
f && (
|
|
518
|
+
var At = typeof URLSearchParams != `${S}`;
|
|
519
|
+
function Lt(n) {
|
|
520
|
+
return D(this, null, function* () {
|
|
521
|
+
let e = n[ne] || de, t = n.encodeURI !== !1, r = n[be] && n[be].toUpperCase(), s = n.url, a = s, i = At && n.data instanceof URLSearchParams, o = i ? Z.fromEntries(n.data.entries()) : n.data, l = o, d = n != null && n[w] ? $({}, n[w]) : {}, h = n.params, g = Mt(r);
|
|
522
|
+
if (o && typeof o.append !== Le) {
|
|
523
|
+
let u = "", p = "content-type";
|
|
524
|
+
if (n != null && n[w]) {
|
|
525
|
+
let f = Q(n[w]).find((E) => E.toLowerCase() === p);
|
|
526
|
+
f && (p = f, u = n[w][f]);
|
|
476
527
|
}
|
|
477
|
-
(!
|
|
528
|
+
(!u || i) && (u = g || i ? Te : Kt, d[p] = u), typeof o === L && (g && h && (h = ue(o, h)), St.test(u) ? l = JSON.stringify(ie(o)) : !g && Ct.test(u) && (l = e(o)));
|
|
478
529
|
}
|
|
479
|
-
if (
|
|
480
|
-
let
|
|
481
|
-
s += s.includes("?") ? `&${
|
|
530
|
+
if (h && Q(h).length > 0) {
|
|
531
|
+
let u = e(h, t);
|
|
532
|
+
s += s.includes("?") ? `&${u}` : `?${u}`;
|
|
482
533
|
}
|
|
483
|
-
return z(
|
|
534
|
+
return z($({}, n), { _data: l, _url: s, data: o, url: a, method: r, [w]: d, isGet: g });
|
|
484
535
|
});
|
|
485
536
|
}
|
|
486
|
-
var
|
|
487
|
-
function
|
|
488
|
-
return
|
|
489
|
-
let
|
|
490
|
-
if (!
|
|
491
|
-
if (
|
|
492
|
-
|
|
537
|
+
var Ot = typeof AbortController != `${S}`;
|
|
538
|
+
function Ft(n, e) {
|
|
539
|
+
return D(this, null, function* () {
|
|
540
|
+
let t;
|
|
541
|
+
if (!e || !n.ok || [ee, ce].includes(e)) {
|
|
542
|
+
if (t = yield n[ee](), t && e !== ee) try {
|
|
543
|
+
t = JSON.parse(t);
|
|
493
544
|
} catch {
|
|
494
545
|
}
|
|
495
546
|
} else {
|
|
496
|
-
if (
|
|
497
|
-
if (
|
|
547
|
+
if (e === "blob") return n.blob();
|
|
548
|
+
if (e === "arraybuffer") return n.arrayBuffer();
|
|
498
549
|
}
|
|
499
|
-
return
|
|
550
|
+
return t;
|
|
500
551
|
});
|
|
501
552
|
}
|
|
502
|
-
var
|
|
503
|
-
constructor(
|
|
504
|
-
this.REQI = [], this.RESI = [], this.P = [], this.config =
|
|
553
|
+
var Rt = (n) => new A(n), A = class {
|
|
554
|
+
constructor(e) {
|
|
555
|
+
this.REQI = [], this.RESI = [], this.P = [], this.config = e, this.defaults = { params: {}, [w]: {} };
|
|
505
556
|
}
|
|
506
557
|
get interceptors() {
|
|
507
|
-
return { request: { use: (
|
|
508
|
-
this.REQI = this.REQI.filter((
|
|
558
|
+
return { request: { use: (e, t, r) => (this.REQI.push(e), e), eject: (e) => {
|
|
559
|
+
this.REQI = this.REQI.filter((t) => t !== e);
|
|
509
560
|
}, clear: () => {
|
|
510
561
|
this.REQI = [];
|
|
511
|
-
} }, response: { use: (
|
|
512
|
-
this.RESI = this.RESI.filter((
|
|
562
|
+
} }, response: { use: (e, t) => (this.RESI.push({ fn: e, onRejected: t }), e), eject: (e) => {
|
|
563
|
+
this.RESI = this.RESI.filter((t) => t.fn !== e);
|
|
513
564
|
}, clear: () => {
|
|
514
565
|
this.RESI = [];
|
|
515
566
|
} } };
|
|
516
567
|
}
|
|
517
568
|
get plugins() {
|
|
518
|
-
return { use: (
|
|
519
|
-
this.P = this.P.filter((
|
|
569
|
+
return { use: (e) => (this.P.push(e), e), eject: (e) => {
|
|
570
|
+
this.P = this.P.filter((t) => t !== e);
|
|
520
571
|
}, clear: () => {
|
|
521
572
|
this.P = [];
|
|
522
573
|
} };
|
|
523
574
|
}
|
|
524
|
-
request(
|
|
525
|
-
return
|
|
526
|
-
let
|
|
527
|
-
|
|
528
|
-
for (let
|
|
575
|
+
request(e) {
|
|
576
|
+
return D(this, null, function* () {
|
|
577
|
+
let t = ue(this.config || {}, this.defaults, typeof e == "string" ? { url: e } : e), r = "credentials";
|
|
578
|
+
t.withCredentials && !t[r] && (t[r] = "include"), t[ne] || (t[ne] = de);
|
|
579
|
+
for (let i of this.REQI) t = yield i(t);
|
|
529
580
|
let s = this._.bind(this);
|
|
530
|
-
this.P.forEach((
|
|
531
|
-
s =
|
|
581
|
+
this.P.forEach((i) => {
|
|
582
|
+
s = i(s, this);
|
|
532
583
|
});
|
|
533
|
-
let
|
|
534
|
-
if (!
|
|
535
|
-
let
|
|
584
|
+
let a = s(t);
|
|
585
|
+
if (!t._did) {
|
|
586
|
+
let i = 0, o = [];
|
|
536
587
|
for (this.RESI.forEach(function(l) {
|
|
537
|
-
|
|
538
|
-
});
|
|
588
|
+
o.push(l.fn, l.onRejected);
|
|
589
|
+
}); o.length > i; ) a = a.then(o[i++], o[i++]);
|
|
539
590
|
}
|
|
540
|
-
return
|
|
591
|
+
return a;
|
|
541
592
|
});
|
|
542
593
|
}
|
|
543
|
-
_(
|
|
544
|
-
return
|
|
545
|
-
let
|
|
546
|
-
|
|
547
|
-
let f,
|
|
548
|
-
if (
|
|
549
|
-
let
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
},
|
|
594
|
+
_(e) {
|
|
595
|
+
return D(this, null, function* () {
|
|
596
|
+
let t = yield Lt(e), { url: r, method: s, headers: a, timeout: i, signal: o, data: l, _data: d, _url: h, isGet: g, fetch: u } = t, p = Pt(t, ["url", "method", "headers", "timeout", "signal", "data", "_data", "_url", "isGet", "fetch"]);
|
|
597
|
+
e._url = h;
|
|
598
|
+
let f, E = [], j = S;
|
|
599
|
+
if (i && Ot) {
|
|
600
|
+
let b = new AbortController();
|
|
601
|
+
j = setTimeout(() => {
|
|
602
|
+
b.abort(new Et(`timeout of ${i}ms exceeded`, e));
|
|
603
|
+
}, i), E.push(b.signal);
|
|
553
604
|
}
|
|
554
|
-
|
|
555
|
-
clearTimeout(
|
|
605
|
+
o && E.push(o), f = E[0], E.length > 1 && (f = yt(E, () => {
|
|
606
|
+
clearTimeout(j);
|
|
556
607
|
}));
|
|
557
|
-
let
|
|
558
|
-
return
|
|
559
|
-
let { responseType:
|
|
560
|
-
if (!
|
|
561
|
-
let
|
|
562
|
-
return Promise.reject(
|
|
608
|
+
let N = h || r, fe = "baseURL";
|
|
609
|
+
return e[fe] && !mt(N) && (N = bt(e[fe], N)), (u || fetch)(N, z($({ body: g ? S : d }, p), { signal: f, method: s, headers: a })).then((b) => D(this, null, function* () {
|
|
610
|
+
let { responseType: Ve } = e, pe = { data: yield Ft(b, Ve), response: b, config: e, request: e, [V]: b[V], statusText: b.statusText, [w]: b[w] };
|
|
611
|
+
if (!b.ok) {
|
|
612
|
+
let Ue = new xe(b[V] ? `Request failed with status code ${b[V]}` : "Network error", e, pe);
|
|
613
|
+
return Promise.reject(Ue);
|
|
563
614
|
}
|
|
564
|
-
return
|
|
615
|
+
return pe;
|
|
565
616
|
})).finally(() => {
|
|
566
|
-
var
|
|
567
|
-
|
|
617
|
+
var b;
|
|
618
|
+
j && clearTimeout(j), (b = f == null ? void 0 : f.clear) == null || b.call(f);
|
|
568
619
|
});
|
|
569
620
|
});
|
|
570
621
|
}
|
|
571
|
-
cG(
|
|
572
|
-
return (
|
|
622
|
+
cG(e) {
|
|
623
|
+
return (t, r) => this.request(r ? z($({}, r), { method: e, url: t }) : { method: e, url: t });
|
|
573
624
|
}
|
|
574
|
-
cP(
|
|
575
|
-
return (
|
|
625
|
+
cP(e) {
|
|
626
|
+
return (t, r, s) => this.request(s ? z($({}, s), { method: e, url: t, data: r }) : { method: e, url: t, data: r });
|
|
576
627
|
}
|
|
577
|
-
get(
|
|
578
|
-
return this.cG(
|
|
628
|
+
get(e, t) {
|
|
629
|
+
return this.cG(se)(e, t);
|
|
579
630
|
}
|
|
580
|
-
head(
|
|
581
|
-
return this.cG(
|
|
631
|
+
head(e, t) {
|
|
632
|
+
return this.cG(Fe)(e, t);
|
|
582
633
|
}
|
|
583
|
-
post(
|
|
584
|
-
return this.cP(
|
|
634
|
+
post(e, t, r) {
|
|
635
|
+
return this.cP(ht)(e, t, r);
|
|
585
636
|
}
|
|
586
|
-
put(
|
|
587
|
-
return this.cP(
|
|
637
|
+
put(e, t, r) {
|
|
638
|
+
return this.cP(gt)(e, t, r);
|
|
588
639
|
}
|
|
589
|
-
patch(
|
|
590
|
-
return this.cP(
|
|
640
|
+
patch(e, t, r) {
|
|
641
|
+
return this.cP(ft)(e, t, r);
|
|
591
642
|
}
|
|
592
|
-
delete(
|
|
593
|
-
return this.cG(
|
|
643
|
+
delete(e, t) {
|
|
644
|
+
return this.cG(pt)(e, t);
|
|
594
645
|
}
|
|
595
|
-
options(
|
|
596
|
-
return this.cG(
|
|
646
|
+
options(e, t) {
|
|
647
|
+
return this.cG(Re)(e, t);
|
|
597
648
|
}
|
|
598
649
|
};
|
|
599
|
-
A.create =
|
|
600
|
-
var
|
|
601
|
-
const je =
|
|
650
|
+
A.create = Rt, A.VERSION = "0.7.7";
|
|
651
|
+
var xt = Object.assign(A.create(), { create: A.create, VERSION: A.VERSION }), Ge = xt;
|
|
652
|
+
const je = Ge.create({
|
|
602
653
|
baseURL: "https://updater.stats.cc",
|
|
603
654
|
headers: {
|
|
604
655
|
Accept: "application/json",
|
|
605
656
|
"Accept-Encoding": "gzip, deflate, br"
|
|
606
657
|
}
|
|
607
|
-
}),
|
|
658
|
+
}), ge = Ge.create({
|
|
608
659
|
baseURL: "https://api.stats.cc",
|
|
609
660
|
headers: {
|
|
610
661
|
Accept: "application/json",
|
|
611
662
|
"Accept-Encoding": "gzip, deflate, br"
|
|
612
663
|
}
|
|
613
664
|
});
|
|
614
|
-
function
|
|
615
|
-
return je.get(`/v1/native/${
|
|
616
|
-
params: { channel:
|
|
665
|
+
function $t(n, e) {
|
|
666
|
+
return je.get(`/v1/native/${n}/version.txt`, {
|
|
667
|
+
params: { channel: e },
|
|
617
668
|
responseType: "text"
|
|
618
669
|
});
|
|
619
670
|
}
|
|
620
|
-
function
|
|
621
|
-
return je.get(`/v1/native/${
|
|
622
|
-
params: { channel:
|
|
671
|
+
function Dt(n, e) {
|
|
672
|
+
return je.get(`/v1/native/${n}/files`, {
|
|
673
|
+
params: { channel: e },
|
|
623
674
|
responseType: "arraybuffer"
|
|
624
675
|
});
|
|
625
676
|
}
|
|
626
|
-
function
|
|
627
|
-
return
|
|
677
|
+
function Tt() {
|
|
678
|
+
return ge.get("/v1/raven/config");
|
|
628
679
|
}
|
|
629
|
-
function
|
|
630
|
-
return
|
|
680
|
+
function Bt(n, e) {
|
|
681
|
+
return ge.get(`/v1/raven/games/${n}/builds/${e}/check`);
|
|
631
682
|
}
|
|
632
|
-
function
|
|
633
|
-
const
|
|
634
|
-
return
|
|
683
|
+
function Gt(n, e) {
|
|
684
|
+
const t = new FormData();
|
|
685
|
+
return t.append("file", e), ge.post(`/v1/raven/games/${n}/builds/upload`, t, {});
|
|
635
686
|
}
|
|
636
|
-
function
|
|
637
|
-
return
|
|
687
|
+
function jt(n) {
|
|
688
|
+
return n instanceof Error && (n.name === "XiorError" || n.name === "XiorTimeoutError");
|
|
638
689
|
}
|
|
639
|
-
function
|
|
640
|
-
return !!(
|
|
690
|
+
function Nt(n) {
|
|
691
|
+
return !!(n && "kind" in n.data && "message" in n.data);
|
|
641
692
|
}
|
|
642
|
-
const
|
|
693
|
+
const Vt = {
|
|
643
694
|
buildChannel: "alpha"
|
|
644
695
|
};
|
|
645
|
-
class
|
|
696
|
+
class Ut extends G {
|
|
646
697
|
constructor() {
|
|
647
698
|
super("NativeDllManager");
|
|
648
699
|
c(this, "UPDATE_CHECK_INTERVAL_MS", 1e3 * 60 * 5);
|
|
649
700
|
// 5 minutes
|
|
650
701
|
c(this, "targetDir");
|
|
651
702
|
c(this, "updateInterval");
|
|
652
|
-
this.targetDir =
|
|
703
|
+
this.targetDir = m.join(le(), "resources"), this.logger.log("Target directory", this.targetDir);
|
|
653
704
|
}
|
|
654
|
-
async initWithDlls(
|
|
655
|
-
super.init(), await
|
|
705
|
+
async initWithDlls(t) {
|
|
706
|
+
super.init(), await v.mkdir(this.targetDir, { recursive: !0 }), await this.checkForUpdates(t), clearInterval(this.updateInterval), this.updateInterval = setInterval(() => this.checkForUpdates(t), this.UPDATE_CHECK_INTERVAL_MS);
|
|
656
707
|
}
|
|
657
708
|
destroy() {
|
|
658
709
|
this.updateInterval && (clearInterval(this.updateInterval), this.updateInterval = void 0), super.destroy();
|
|
659
710
|
}
|
|
660
|
-
async getCurrentVersion(
|
|
711
|
+
async getCurrentVersion(t) {
|
|
661
712
|
try {
|
|
662
|
-
const
|
|
663
|
-
return await
|
|
713
|
+
const r = m.join(this.targetDir, t, "version.txt");
|
|
714
|
+
return await v.readFile(r, "utf-8");
|
|
664
715
|
} catch {
|
|
665
716
|
return null;
|
|
666
717
|
}
|
|
667
718
|
}
|
|
668
|
-
getTargetPath(
|
|
669
|
-
return
|
|
719
|
+
getTargetPath(t) {
|
|
720
|
+
return m.join(this.targetDir, t);
|
|
670
721
|
}
|
|
671
|
-
getTargetVersionPath(
|
|
672
|
-
return
|
|
722
|
+
getTargetVersionPath(t, r) {
|
|
723
|
+
return m.join(this.getTargetPath(t), r);
|
|
673
724
|
}
|
|
674
|
-
async checkForUpdates(
|
|
675
|
-
const
|
|
725
|
+
async checkForUpdates(t) {
|
|
726
|
+
const r = Vt.buildChannel;
|
|
676
727
|
this.logger.log("Checking for updates");
|
|
677
|
-
for (const s of
|
|
728
|
+
for (const s of t)
|
|
678
729
|
try {
|
|
679
|
-
const { data:
|
|
680
|
-
this.logger.log(`${s} > Update Check. current: ${
|
|
681
|
-
const
|
|
682
|
-
this.logger.log(`${s} > Update found: ${
|
|
683
|
-
} catch (
|
|
684
|
-
this.logger.captureSentryException(`${s} > Error checking/updating`,
|
|
730
|
+
const { data: a } = await $t(s, r), i = await this.getCurrentVersion(s);
|
|
731
|
+
this.logger.log(`${s} > Update Check. current: ${i}, latest: ${a}`);
|
|
732
|
+
const o = a !== i;
|
|
733
|
+
this.logger.log(`${s} > Update found: ${i} -> ${a}`), await this.downloadAndExtractDll(s, a, r, o), this.logger.log(`${s} > Downloaded and extracted`), o && (this.logger.log(`${s} > Cleaning up versions older than ${a}`), await this.cleanupOldVersions(s, a)), this.emit("dllUpdated", { identifier: s, version: a });
|
|
734
|
+
} catch (a) {
|
|
735
|
+
this.logger.captureSentryException(`${s} > Error checking/updating`, a);
|
|
685
736
|
}
|
|
686
737
|
}
|
|
687
|
-
async downloadAndExtractDll(
|
|
688
|
-
const { data:
|
|
689
|
-
await
|
|
690
|
-
const
|
|
691
|
-
await
|
|
692
|
-
const
|
|
693
|
-
const
|
|
694
|
-
if (
|
|
695
|
-
const f =
|
|
696
|
-
if (!
|
|
738
|
+
async downloadAndExtractDll(t, r, s, a) {
|
|
739
|
+
const { data: i } = await Dt(t, s), o = this.getTargetPath(t), l = this.getTargetVersionPath(t, r);
|
|
740
|
+
await v.mkdir(l, { recursive: !0 });
|
|
741
|
+
const d = new ke();
|
|
742
|
+
await d.loadAsync(i);
|
|
743
|
+
const h = Object.keys(d.files).map(async (u) => {
|
|
744
|
+
const p = d.files[u];
|
|
745
|
+
if (p && !p.dir) {
|
|
746
|
+
const f = m.join(l, u);
|
|
747
|
+
if (!a)
|
|
697
748
|
try {
|
|
698
|
-
await
|
|
749
|
+
await v.access(f, v.constants.F_OK);
|
|
699
750
|
return;
|
|
700
751
|
} catch {
|
|
701
|
-
this.logger.warn(`${
|
|
752
|
+
this.logger.warn(`${t} > File missing, re-downloading: ${f}`);
|
|
702
753
|
}
|
|
703
|
-
const
|
|
704
|
-
await
|
|
754
|
+
const E = await p.async("nodebuffer");
|
|
755
|
+
await v.writeFile(f, E);
|
|
705
756
|
}
|
|
706
757
|
});
|
|
707
|
-
await Promise.all(
|
|
708
|
-
const
|
|
709
|
-
this.logger.log("Saving version file",
|
|
758
|
+
await Promise.all(h);
|
|
759
|
+
const g = m.join(o, "version.txt");
|
|
760
|
+
this.logger.log("Saving version file", g), await v.writeFile(g, r);
|
|
710
761
|
}
|
|
711
|
-
async cleanupOldVersions(
|
|
712
|
-
const s =
|
|
713
|
-
for (const
|
|
714
|
-
|
|
762
|
+
async cleanupOldVersions(t, r) {
|
|
763
|
+
const s = m.join(this.targetDir, t), a = await v.readdir(s, { withFileTypes: !0 });
|
|
764
|
+
for (const i of a)
|
|
765
|
+
i.isDirectory() && i.name !== r && await v.rm(m.join(s, i.name), { recursive: !0, force: !0 });
|
|
715
766
|
}
|
|
716
767
|
}
|
|
717
|
-
const J =
|
|
718
|
-
class
|
|
768
|
+
const J = _(Ut);
|
|
769
|
+
class Ht extends G {
|
|
719
770
|
constructor() {
|
|
720
771
|
super("RavenManager");
|
|
721
772
|
c(this, "REFETCH_INTERVAL", 1e3 * 60 * 5);
|
|
@@ -731,8 +782,8 @@ class hn extends x {
|
|
|
731
782
|
this._failedRefetchTimeoutHandler && (clearTimeout(this._failedRefetchTimeoutHandler), this._failedRefetchTimeoutHandler = null), this.fetchRavenConfig();
|
|
732
783
|
}, this.REFETCH_INTERVAL);
|
|
733
784
|
}
|
|
734
|
-
getExecutableData(
|
|
735
|
-
return this._executableToGameMap.get(
|
|
785
|
+
getExecutableData(t) {
|
|
786
|
+
return this._executableToGameMap.get(t.toLowerCase()) ?? null;
|
|
736
787
|
}
|
|
737
788
|
get executables() {
|
|
738
789
|
return this._executablesArray;
|
|
@@ -745,81 +796,90 @@ class hn extends x {
|
|
|
745
796
|
}
|
|
746
797
|
async fetchRavenConfig() {
|
|
747
798
|
try {
|
|
748
|
-
const
|
|
749
|
-
this._ravenConfig =
|
|
750
|
-
const
|
|
799
|
+
const t = await Tt();
|
|
800
|
+
this._ravenConfig = t.data, this.resetState();
|
|
801
|
+
const r = /* @__PURE__ */ new Set();
|
|
751
802
|
for (const s of this._ravenConfig.games) {
|
|
752
|
-
for (const
|
|
753
|
-
const
|
|
754
|
-
this._executableToGameMap.set(
|
|
803
|
+
for (const a of s.executables) {
|
|
804
|
+
const i = a.toLowerCase();
|
|
805
|
+
this._executableToGameMap.set(i, s), this._executablesArray.push(i);
|
|
755
806
|
}
|
|
756
|
-
s.dlls_to_inject.forEach((
|
|
807
|
+
s.dlls_to_inject.forEach((a) => r.add(a));
|
|
757
808
|
}
|
|
758
|
-
await J.getInstance().initWithDlls(Array.from(
|
|
759
|
-
} catch (
|
|
760
|
-
this.logger.captureSentryException("Failed to fetch Raven config",
|
|
809
|
+
await J.getInstance().initWithDlls(Array.from(r)), this.logger.log("Raven updated", this._ravenConfig), this.emit("executablesUpdated", { executables: this.executables, map: this._executableToGameMap });
|
|
810
|
+
} catch (t) {
|
|
811
|
+
this.logger.captureSentryException("Failed to fetch Raven config", t), this._failedRefetchTimeoutHandler = setTimeout(() => this.fetchRavenConfig(), this.FAILED_REFETCH_INTERVAL);
|
|
761
812
|
}
|
|
762
813
|
}
|
|
763
814
|
resetState() {
|
|
764
815
|
this._executableToGameMap.clear(), this._executablesArray = [];
|
|
765
816
|
}
|
|
766
817
|
}
|
|
767
|
-
const
|
|
768
|
-
|
|
818
|
+
const T = _(Ht), zt = Y(import.meta.url), {
|
|
819
|
+
PipeEventServer: Hn,
|
|
820
|
+
PipeEventClient: zn,
|
|
821
|
+
PipeEventBase: qn,
|
|
822
|
+
ProcessMonitor: qt,
|
|
823
|
+
Process: U,
|
|
824
|
+
InjectionMethod: Wn,
|
|
825
|
+
AccessLevel: Qn,
|
|
826
|
+
HardwareInterface: Wt
|
|
827
|
+
} = zt("./build/overlayed_native_interface_x64.node");
|
|
828
|
+
class Qt extends G {
|
|
769
829
|
constructor() {
|
|
770
830
|
super("ProcessManager");
|
|
771
831
|
c(this, "_processMonitor");
|
|
772
832
|
c(this, "_processes", /* @__PURE__ */ new Map());
|
|
773
833
|
c(this, "boundOnRavenManagerExecutablesUpdated", this.onRavenManagerExecutablesUpdated.bind(this));
|
|
774
|
-
this._processMonitor = new
|
|
834
|
+
this._processMonitor = new qt();
|
|
775
835
|
}
|
|
776
836
|
get hasAnyActiveProcesses() {
|
|
777
837
|
return this.activeProcesses.length > 0;
|
|
778
838
|
}
|
|
779
839
|
get activeProcesses() {
|
|
780
|
-
return Array.from(this._processes.values()).flat().filter((
|
|
840
|
+
return Array.from(this._processes.values()).flat().filter((t) => !t.destroyedAt);
|
|
781
841
|
}
|
|
782
842
|
init() {
|
|
783
|
-
super.init(),
|
|
784
|
-
this.logger.log("Process created",
|
|
785
|
-
}), this._processMonitor.on("destroy", (
|
|
786
|
-
this.logger.log("Process destroyed",
|
|
843
|
+
super.init(), T.getInstance().on("executablesUpdated", this.boundOnRavenManagerExecutablesUpdated), this._processMonitor.on("create", (t) => {
|
|
844
|
+
this.logger.log("Process created", t), this.addProcess(t), this.logger.log(`Active Process Count: ${this._processes.size}`), this.emit("create", { process: t });
|
|
845
|
+
}), this._processMonitor.on("destroy", (t) => {
|
|
846
|
+
this.logger.log("Process destroyed", t), this.deleteProcess(t), this.logger.log(`Active Process Count: ${this._processes.size}`), this.emit("destroy", { process: t });
|
|
787
847
|
});
|
|
788
848
|
}
|
|
789
849
|
destroy() {
|
|
790
|
-
|
|
850
|
+
T.getInstance().off("executablesUpdated", this.boundOnRavenManagerExecutablesUpdated), this._processes.clear(), this._processMonitor.removeAllListeners(), super.destroy();
|
|
791
851
|
}
|
|
792
|
-
isProcessRunning(
|
|
793
|
-
const
|
|
794
|
-
return (
|
|
852
|
+
isProcessRunning(t) {
|
|
853
|
+
const r = this._processes.get(t);
|
|
854
|
+
return (r == null ? void 0 : r.some((s) => !s.destroyedAt)) ?? !1;
|
|
795
855
|
}
|
|
796
|
-
onRavenManagerExecutablesUpdated(
|
|
797
|
-
|
|
798
|
-
this.logger.log("Monitoring process",
|
|
856
|
+
onRavenManagerExecutablesUpdated(t) {
|
|
857
|
+
t.executables.forEach((r) => {
|
|
858
|
+
this.logger.log("Monitoring process", r), this._processMonitor.registerProcess(r);
|
|
799
859
|
});
|
|
800
860
|
}
|
|
801
|
-
addProcess(
|
|
802
|
-
if (!
|
|
861
|
+
addProcess(t) {
|
|
862
|
+
if (!t.name)
|
|
803
863
|
return;
|
|
804
|
-
const
|
|
805
|
-
if (!
|
|
806
|
-
this._processes.set(
|
|
864
|
+
const r = this._processes.get(t.name);
|
|
865
|
+
if (!r) {
|
|
866
|
+
this._processes.set(t.name, [t]);
|
|
807
867
|
return;
|
|
808
868
|
}
|
|
809
|
-
this._processes.set(
|
|
869
|
+
this._processes.set(t.name, r.concat(t));
|
|
810
870
|
}
|
|
811
|
-
deleteProcess(
|
|
812
|
-
if (!
|
|
871
|
+
deleteProcess(t) {
|
|
872
|
+
if (!t.name)
|
|
813
873
|
return;
|
|
814
|
-
const
|
|
815
|
-
s.length === 0 ? this._processes.delete(
|
|
874
|
+
const r = this._processes.get(t.name), s = (r == null ? void 0 : r.filter((a) => a.id !== t.id)) ?? [];
|
|
875
|
+
s.length === 0 ? this._processes.delete(t.name) : this._processes.set(t.name, s);
|
|
816
876
|
}
|
|
817
877
|
}
|
|
818
|
-
const
|
|
819
|
-
var
|
|
820
|
-
|
|
821
|
-
constructor(
|
|
822
|
-
|
|
878
|
+
const C = _(Qt), Xt = Y(import.meta.url), { RenderInterface: Jt, renderHookPath: Xn } = Xt("./build/overlayed_render_interface_x64.node");
|
|
879
|
+
var Yt = Object.defineProperty, Zt = (n, e, t) => e in n ? Yt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, q = (n, e, t) => Zt(n, typeof e != "symbol" ? e + "" : e, t);
|
|
880
|
+
class en {
|
|
881
|
+
constructor(e) {
|
|
882
|
+
q(this, "_instance"), q(this, "_resolution"), q(this, "boundOnResolutionChanged", this.onResolutionChanged.bind(this)), this._instance = e, this._resolution = { width: 0, height: 0 }, this._instance.on("resolution", this.boundOnResolutionChanged);
|
|
823
883
|
}
|
|
824
884
|
destroy() {
|
|
825
885
|
this._instance.off("resolution", this.boundOnResolutionChanged);
|
|
@@ -830,139 +890,188 @@ let vn = class {
|
|
|
830
890
|
get resolution() {
|
|
831
891
|
return this._resolution;
|
|
832
892
|
}
|
|
833
|
-
onResolutionChanged(
|
|
834
|
-
this._resolution = { width:
|
|
893
|
+
onResolutionChanged(e, t) {
|
|
894
|
+
this._resolution = { width: e, height: t };
|
|
835
895
|
}
|
|
836
|
-
}
|
|
896
|
+
}
|
|
897
|
+
let tn = class {
|
|
837
898
|
constructor() {
|
|
838
|
-
|
|
899
|
+
q(this, "interfaces", {});
|
|
839
900
|
}
|
|
840
|
-
createInterface(
|
|
841
|
-
return this.interfaces[
|
|
901
|
+
createInterface(e) {
|
|
902
|
+
return this.interfaces[e] ? this.interfaces[e] : (this.interfaces[e] = new en(new Jt(e, { access: 1 })), this.interfaces[e]);
|
|
842
903
|
}
|
|
843
|
-
getInterface(
|
|
844
|
-
return this.interfaces[
|
|
904
|
+
getInterface(e) {
|
|
905
|
+
return this.interfaces[e] ? this.interfaces[e] : this.createInterface(e);
|
|
845
906
|
}
|
|
846
907
|
};
|
|
847
|
-
const
|
|
848
|
-
|
|
908
|
+
const O = _(tn);
|
|
909
|
+
var nn = Object.defineProperty, rn = (n, e, t) => e in n ? nn(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, F = (n, e, t) => rn(n, typeof e != "symbol" ? e + "" : e, t);
|
|
910
|
+
class sn {
|
|
911
|
+
constructor() {
|
|
912
|
+
F(this, "data", []);
|
|
913
|
+
}
|
|
914
|
+
get size() {
|
|
915
|
+
return this.data.length;
|
|
916
|
+
}
|
|
917
|
+
add(e) {
|
|
918
|
+
this.data.push(e);
|
|
919
|
+
}
|
|
920
|
+
next() {
|
|
921
|
+
return this.data.shift();
|
|
922
|
+
}
|
|
923
|
+
clear() {
|
|
924
|
+
this.data.length = 0;
|
|
925
|
+
}
|
|
926
|
+
*flush() {
|
|
927
|
+
for (; this.size > 0; ) {
|
|
928
|
+
const e = this.next();
|
|
929
|
+
e && (yield e);
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
class an {
|
|
934
|
+
constructor(e) {
|
|
935
|
+
F(this, "_clientId", null), F(this, "_userId", null), F(this, "options"), F(this, "eventQueue"), this.options = this.resolveOptions(e), this.eventQueue = new sn(), this.setupFlushInterval();
|
|
936
|
+
}
|
|
937
|
+
set clientId(e) {
|
|
938
|
+
this._clientId = e;
|
|
939
|
+
}
|
|
940
|
+
set userId(e) {
|
|
941
|
+
this._userId = e;
|
|
942
|
+
}
|
|
943
|
+
track(e, t) {
|
|
944
|
+
this.eventQueue.add({ name: e, data: t, createdAt: (/* @__PURE__ */ new Date()).toISOString() });
|
|
945
|
+
}
|
|
946
|
+
flush() {
|
|
947
|
+
return Array.from(this.eventQueue.flush());
|
|
948
|
+
}
|
|
949
|
+
setupFlushInterval() {
|
|
950
|
+
setInterval(() => {
|
|
951
|
+
this.flush();
|
|
952
|
+
}, this.options.batchIntervalSeconds * 1e3);
|
|
953
|
+
}
|
|
954
|
+
resolveOptions(e) {
|
|
955
|
+
return {
|
|
956
|
+
batchIntervalSeconds: (e == null ? void 0 : e.batchIntervalSeconds) ?? 15
|
|
957
|
+
};
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
const P = _(an), on = Y(import.meta.url), ln = on.resolve("@overlayed/app/dist/render-interface/build/overlayed_render_hook_x64.dll");
|
|
961
|
+
class cn extends G {
|
|
849
962
|
constructor() {
|
|
850
963
|
super("GameLaunchManager");
|
|
851
|
-
c(this, "RENDER_INTERFACE_PATH", "node_modules/@overlayed/app/dist/render-interface/build/overlayed_render_hook_x64.dll");
|
|
852
964
|
c(this, "boundOnProcessCreate", this.onProcessCreate.bind(this));
|
|
853
965
|
c(this, "boundOnProcessDestroy", this.onProcessDestroy.bind(this));
|
|
854
966
|
}
|
|
855
967
|
init() {
|
|
856
|
-
super.init(),
|
|
968
|
+
super.init(), O.getInstance().createInterface("OGG_SIEGE"), C.getInstance().on("create", this.boundOnProcessCreate), C.getInstance().on("destroy", this.boundOnProcessDestroy);
|
|
857
969
|
}
|
|
858
970
|
destroy() {
|
|
859
|
-
|
|
971
|
+
C.getInstance().off("create", this.boundOnProcessCreate), C.getInstance().off("destroy", this.boundOnProcessDestroy), super.destroy();
|
|
860
972
|
}
|
|
861
|
-
async onProcessCreate({ process:
|
|
862
|
-
const
|
|
863
|
-
if (!
|
|
973
|
+
async onProcessCreate({ process: t }) {
|
|
974
|
+
const r = this.getRavenGame(t);
|
|
975
|
+
if (!r)
|
|
864
976
|
return;
|
|
865
|
-
if (this.logger.log("Game Launched",
|
|
866
|
-
|
|
867
|
-
appElevated:
|
|
868
|
-
gameElevated:
|
|
977
|
+
if (this.logger.log("Game Launched", r), this.logger.log("Process is elevated: ", t.isElevated), this.logger.log("Current process is elevated: ", U.currentProcess.isElevated), t.isElevated && !U.currentProcess.isElevated) {
|
|
978
|
+
I.getInstance().fatal("Game is elevated but the App is not", "ELEVATION_MISMATCH", {
|
|
979
|
+
appElevated: !!U.currentProcess.isElevated,
|
|
980
|
+
gameElevated: !!t.isElevated
|
|
869
981
|
}), this.logger.sentryLog("Game elevated but App is not", {
|
|
870
|
-
appElevated:
|
|
871
|
-
gameElevated:
|
|
982
|
+
appElevated: U.currentProcess.isElevated,
|
|
983
|
+
gameElevated: t.isElevated
|
|
872
984
|
});
|
|
873
985
|
return;
|
|
874
986
|
}
|
|
875
|
-
const s = this.copyDll(
|
|
987
|
+
const s = this.copyDll(ln);
|
|
876
988
|
if (s)
|
|
877
989
|
try {
|
|
878
|
-
await
|
|
879
|
-
} catch (
|
|
880
|
-
this.logger.captureSentryException("Render Interface Injection Failed",
|
|
990
|
+
await t.injectDll(s), this.logger.log("Render Interface Injection Successful", s);
|
|
991
|
+
} catch (i) {
|
|
992
|
+
this.logger.captureSentryException("Render Interface Injection Failed", i), this.logger.sentryError("Render Interface Injection Failed", {
|
|
881
993
|
renderInterfacePath: s
|
|
882
994
|
});
|
|
883
995
|
}
|
|
884
|
-
const
|
|
885
|
-
const
|
|
886
|
-
if (!
|
|
887
|
-
return this.logger.sentryError("No version found for DLL", { identifier:
|
|
888
|
-
const l = J.getInstance().getTargetVersionPath(
|
|
996
|
+
const a = r == null ? void 0 : r.dlls_to_inject.map(async (i) => {
|
|
997
|
+
const o = await J.getInstance().getCurrentVersion(i);
|
|
998
|
+
if (!o)
|
|
999
|
+
return this.logger.sentryError("No version found for DLL", { identifier: i }), Promise.resolve();
|
|
1000
|
+
const l = J.getInstance().getTargetVersionPath(i, o);
|
|
889
1001
|
this.logger.log("DLL Path", l);
|
|
890
|
-
const
|
|
891
|
-
return this.logger.log("DLL Files",
|
|
892
|
-
|
|
893
|
-
const
|
|
894
|
-
if (!
|
|
1002
|
+
const d = await this.getDllFiles(l);
|
|
1003
|
+
return this.logger.log("DLL Files", d), Promise.all(
|
|
1004
|
+
d.map(async (h) => {
|
|
1005
|
+
const g = m.basename(h), u = m.join(l, g);
|
|
1006
|
+
if (!u)
|
|
895
1007
|
return Promise.resolve();
|
|
896
|
-
this.logger.log("Injecting: ",
|
|
1008
|
+
this.logger.log("Injecting: ", u);
|
|
897
1009
|
try {
|
|
898
|
-
return
|
|
899
|
-
this.logger.log("Injection Successful",
|
|
900
|
-
}).catch((
|
|
901
|
-
this.logger.sentryError("Injection Failed [1]", { targetPath:
|
|
1010
|
+
return t.injectDll(u).then(() => {
|
|
1011
|
+
this.logger.log("Injection Successful", u);
|
|
1012
|
+
}).catch((p) => {
|
|
1013
|
+
this.logger.sentryError("Injection Failed [1]", { targetPath: u }, p);
|
|
902
1014
|
});
|
|
903
|
-
} catch (
|
|
904
|
-
return this.logger.sentryError("Injection Failed [2]", { targetPath:
|
|
1015
|
+
} catch (p) {
|
|
1016
|
+
return this.logger.sentryError("Injection Failed [2]", { targetPath: u }, p), Promise.reject(p);
|
|
905
1017
|
}
|
|
906
1018
|
})
|
|
907
1019
|
);
|
|
908
1020
|
});
|
|
909
|
-
await Promise.allSettled(
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
const s = n.at(-1);
|
|
917
|
-
if (!s)
|
|
918
|
-
return this.logger.sentryError("Dll name is invalid", { dllPath: e }), !1;
|
|
919
|
-
const o = lt(e), a = _.join(B, "resources"), i = _.join(a, s);
|
|
920
|
-
this.logger.debug("Copying", o, "to", i);
|
|
1021
|
+
await Promise.allSettled(a), this.emit("gameLaunchInternal", { ravenGame: r, process: t }), this.emit("gameLaunch", { game: r.identifier }), P.getInstance().track("game_launch", {
|
|
1022
|
+
game: r.identifier
|
|
1023
|
+
});
|
|
1024
|
+
}
|
|
1025
|
+
copyDll(t) {
|
|
1026
|
+
const r = m.basename(t), s = Je(t), a = m.join(le(), "resources"), i = m.join(a, r);
|
|
1027
|
+
this.logger.debug("Copying", s, "to", i);
|
|
921
1028
|
try {
|
|
922
|
-
|
|
923
|
-
const
|
|
924
|
-
|
|
925
|
-
} catch (
|
|
926
|
-
return
|
|
1029
|
+
qe(a) || We(a, { recursive: !0 });
|
|
1030
|
+
const o = _e(s);
|
|
1031
|
+
Qe(i, o), Xe(s, i);
|
|
1032
|
+
} catch (o) {
|
|
1033
|
+
return o.code === "EBUSY" ? i : (this.logger.captureSentryException("Failed to copy", o), this.logger.sentryError("Failed to copy", { originalPath: s, targetPath: i }), !1);
|
|
927
1034
|
}
|
|
928
1035
|
return i;
|
|
929
1036
|
}
|
|
930
|
-
async getDllFiles(
|
|
1037
|
+
async getDllFiles(t) {
|
|
931
1038
|
try {
|
|
932
|
-
return (await
|
|
933
|
-
} catch (
|
|
934
|
-
return this.logger.captureSentryException("Failed to read DLL directory",
|
|
1039
|
+
return (await v.readdir(t)).filter((s) => s.endsWith(".dll")).map((s) => m.join(t, s));
|
|
1040
|
+
} catch (r) {
|
|
1041
|
+
return this.logger.captureSentryException("Failed to read DLL directory", r), this.logger.sentryError("Failed to read DLL directory", { dllPath: t }), [];
|
|
935
1042
|
}
|
|
936
1043
|
}
|
|
937
|
-
onProcessDestroy({ process:
|
|
938
|
-
const
|
|
939
|
-
|
|
1044
|
+
onProcessDestroy({ process: t }) {
|
|
1045
|
+
const r = this.getRavenGame(t);
|
|
1046
|
+
r && (this.emit("gameCloseInternal", { ravenGame: r, process: t }), this.emit("gameClose", { game: r.identifier }), P.getInstance().track("game_close", {
|
|
1047
|
+
game: r.identifier
|
|
1048
|
+
}));
|
|
940
1049
|
}
|
|
941
|
-
getRavenGame(
|
|
942
|
-
if (!
|
|
1050
|
+
getRavenGame(t) {
|
|
1051
|
+
if (!t.name)
|
|
943
1052
|
return;
|
|
944
|
-
const
|
|
945
|
-
if (!
|
|
946
|
-
this.logger.sentryError("No raven game found for process", { process:
|
|
1053
|
+
const r = T.getInstance().getExecutableData(t.name);
|
|
1054
|
+
if (!r) {
|
|
1055
|
+
this.logger.sentryError("No raven game found for process", { process: t });
|
|
947
1056
|
return;
|
|
948
1057
|
}
|
|
949
|
-
return
|
|
1058
|
+
return r;
|
|
950
1059
|
}
|
|
951
1060
|
}
|
|
952
|
-
const
|
|
953
|
-
class
|
|
1061
|
+
const B = _(cn);
|
|
1062
|
+
class un extends Ae {
|
|
954
1063
|
constructor() {
|
|
955
1064
|
super("GameBuildManager");
|
|
956
1065
|
c(this, "boundOnGameLaunch", this.onGameLaunch.bind(this));
|
|
957
1066
|
}
|
|
958
1067
|
init() {
|
|
959
|
-
super.init(),
|
|
1068
|
+
super.init(), B.getInstance().on("gameLaunchInternal", this.boundOnGameLaunch);
|
|
960
1069
|
}
|
|
961
1070
|
destroy() {
|
|
962
|
-
|
|
1071
|
+
B.getInstance().off("gameLaunchInternal", this.boundOnGameLaunch), super.destroy();
|
|
963
1072
|
}
|
|
964
|
-
async onGameLaunch(
|
|
965
|
-
const { ravenGame:
|
|
1073
|
+
async onGameLaunch(t) {
|
|
1074
|
+
const { ravenGame: r, process: s } = t;
|
|
966
1075
|
if (!s.path || !s.name) {
|
|
967
1076
|
this.logger.sentryError(
|
|
968
1077
|
"Process path or name not found, could not check for build hash",
|
|
@@ -971,30 +1080,30 @@ class kn extends Ke {
|
|
|
971
1080
|
);
|
|
972
1081
|
return;
|
|
973
1082
|
}
|
|
974
|
-
const
|
|
975
|
-
this.logger.log("Process Path", s.path), this.logger.log("Process Name", s.name), this.logger.log("Build Hash",
|
|
976
|
-
let
|
|
1083
|
+
const a = _e(s.path), i = Ye("sha256").update(a).digest("hex");
|
|
1084
|
+
this.logger.log("Process Path", s.path), this.logger.log("Process Name", s.name), this.logger.log("Build Hash", i);
|
|
1085
|
+
let o = !1;
|
|
977
1086
|
try {
|
|
978
|
-
|
|
979
|
-
} catch (
|
|
980
|
-
this.logger.captureSentryException("Error checking game build hash",
|
|
1087
|
+
o = (await Bt(r.identifier, i)).data.upload;
|
|
1088
|
+
} catch (h) {
|
|
1089
|
+
this.logger.captureSentryException("Error checking game build hash", h);
|
|
981
1090
|
return;
|
|
982
1091
|
}
|
|
983
|
-
if (!
|
|
1092
|
+
if (!o) {
|
|
984
1093
|
this.logger.log("Build hash already exists, skipping upload");
|
|
985
1094
|
return;
|
|
986
1095
|
}
|
|
987
|
-
const l = new
|
|
988
|
-
l.file(s.name,
|
|
989
|
-
const
|
|
1096
|
+
const l = new ke();
|
|
1097
|
+
l.file(s.name, a);
|
|
1098
|
+
const d = await l.generateAsync({ type: "blob" });
|
|
990
1099
|
try {
|
|
991
|
-
this.logger.log("Uploading build (size: ",
|
|
992
|
-
} catch (
|
|
993
|
-
|
|
1100
|
+
this.logger.log("Uploading build (size: ", d.size, " bytes)"), await Gt(r.identifier, d), this.logger.log("Build uploaded successfully");
|
|
1101
|
+
} catch (h) {
|
|
1102
|
+
jt(h) ? Nt(h.response) ? this.logger.captureSentryException("Error uploading build hash, api error", h) : this.logger.captureSentryException("Error uploading build hash, request error", h) : this.logger.captureSentryException("Error uploading build hash, unknown error", h);
|
|
994
1103
|
}
|
|
995
1104
|
}
|
|
996
1105
|
}
|
|
997
|
-
const
|
|
1106
|
+
const Ne = _(un), ae = /* @__PURE__ */ new Map([
|
|
998
1107
|
[1, "LeftButton"],
|
|
999
1108
|
[2, "RightButton"],
|
|
1000
1109
|
[3, "Cancel"],
|
|
@@ -1187,14 +1296,14 @@ const In = I(kn), de = /* @__PURE__ */ new Map([
|
|
|
1187
1296
|
[252, "Noname"],
|
|
1188
1297
|
[253, "PA1"],
|
|
1189
1298
|
[254, "OEM_Clear"]
|
|
1190
|
-
]),
|
|
1299
|
+
]), we = new Map(ae.entries().map(([n, e]) => [e, n])), dn = K({
|
|
1191
1300
|
"[string]": {
|
|
1192
1301
|
keys: "string[]",
|
|
1193
|
-
mode:
|
|
1302
|
+
mode: K("'toggle' | 'hold'").pipe((n) => n ?? "toggle")
|
|
1194
1303
|
}
|
|
1195
1304
|
});
|
|
1196
|
-
class
|
|
1197
|
-
constructor(
|
|
1305
|
+
class hn extends G {
|
|
1306
|
+
constructor(t) {
|
|
1198
1307
|
super("KeybindManager");
|
|
1199
1308
|
c(this, "preferencesKeybindToCallbacks", /* @__PURE__ */ new Map());
|
|
1200
1309
|
c(this, "pressedKeys", /* @__PURE__ */ new Set());
|
|
@@ -1205,159 +1314,176 @@ class Pn extends x {
|
|
|
1205
1314
|
c(this, "boundHandleKeyUp", this.handleKeyUp.bind(this));
|
|
1206
1315
|
c(this, "keybindsFile");
|
|
1207
1316
|
// TODO try to figure out a better way to handle this
|
|
1208
|
-
c(this, "
|
|
1209
|
-
this.keybindsFile = new
|
|
1210
|
-
path:
|
|
1211
|
-
schema:
|
|
1212
|
-
default:
|
|
1317
|
+
c(this, "keybindListeningPaused", !1);
|
|
1318
|
+
this.keybindsFile = new ct({
|
|
1319
|
+
path: ut(["keybinds.json"]),
|
|
1320
|
+
schema: dn,
|
|
1321
|
+
default: t
|
|
1213
1322
|
});
|
|
1214
1323
|
}
|
|
1215
1324
|
init() {
|
|
1216
1325
|
super.init();
|
|
1217
|
-
const
|
|
1218
|
-
|
|
1326
|
+
const t = O.getInstance().getInterface("OGG_SIEGE");
|
|
1327
|
+
t.instance.on("keyboardFocus", this.boundHandleKeyboardFocus), t.instance.on("keyDown", this.boundHandleKeyDown), t.instance.on("keyUp", this.boundHandleKeyUp);
|
|
1219
1328
|
}
|
|
1220
1329
|
// TODO support multiple callbacks
|
|
1221
|
-
async
|
|
1222
|
-
const s = this.preferencesKeybindToCallbacks.get(
|
|
1223
|
-
s.toggle =
|
|
1330
|
+
async onKeybindToggled(t, r) {
|
|
1331
|
+
const s = this.preferencesKeybindToCallbacks.get(t) || {};
|
|
1332
|
+
s.toggle = r, this.preferencesKeybindToCallbacks.set(t, s);
|
|
1224
1333
|
}
|
|
1225
|
-
async
|
|
1226
|
-
const s = this.preferencesKeybindToCallbacks.get(
|
|
1227
|
-
s.down =
|
|
1334
|
+
async onKeybindDown(t, r) {
|
|
1335
|
+
const s = this.preferencesKeybindToCallbacks.get(t) || {};
|
|
1336
|
+
s.down = r, this.preferencesKeybindToCallbacks.set(t, s);
|
|
1228
1337
|
}
|
|
1229
|
-
async
|
|
1230
|
-
const s = this.preferencesKeybindToCallbacks.get(
|
|
1231
|
-
s.up =
|
|
1338
|
+
async onKeybindUp(t, r) {
|
|
1339
|
+
const s = this.preferencesKeybindToCallbacks.get(t) || {};
|
|
1340
|
+
s.up = r, this.preferencesKeybindToCallbacks.set(t, s);
|
|
1341
|
+
}
|
|
1342
|
+
async updateKeybind(t, r) {
|
|
1343
|
+
this.keybindsFile.set({
|
|
1344
|
+
[t]: r
|
|
1345
|
+
});
|
|
1346
|
+
}
|
|
1347
|
+
async updateKeybinds(t) {
|
|
1348
|
+
const r = Object.fromEntries(
|
|
1349
|
+
Object.entries(t).filter(([s, a]) => a !== void 0)
|
|
1350
|
+
);
|
|
1351
|
+
this.keybindsFile.set({
|
|
1352
|
+
...this.keybindsFile.get(),
|
|
1353
|
+
...r
|
|
1354
|
+
});
|
|
1355
|
+
}
|
|
1356
|
+
getConfig() {
|
|
1357
|
+
return this.keybindsFile.get();
|
|
1232
1358
|
}
|
|
1233
1359
|
destroy() {
|
|
1234
|
-
const
|
|
1235
|
-
|
|
1360
|
+
const t = O.getInstance().getInterface("OGG_SIEGE");
|
|
1361
|
+
t.instance.off("keyboardFocus", this.boundHandleKeyboardFocus), t.instance.off("keyDown", this.boundHandleKeyDown), t.instance.off("keyUp", this.boundHandleKeyUp), super.destroy();
|
|
1236
1362
|
}
|
|
1237
|
-
handleKeyDown(
|
|
1238
|
-
if (this.
|
|
1363
|
+
handleKeyDown(t) {
|
|
1364
|
+
if (this.keybindListeningPaused)
|
|
1239
1365
|
return;
|
|
1240
|
-
const
|
|
1241
|
-
if (!
|
|
1242
|
-
this.logger.error("Unknown key down",
|
|
1366
|
+
const r = ae.get(t.key);
|
|
1367
|
+
if (!r) {
|
|
1368
|
+
this.logger.error("Unknown key down", t);
|
|
1243
1369
|
return;
|
|
1244
1370
|
}
|
|
1245
|
-
this.pressedKeys.add(
|
|
1371
|
+
this.pressedKeys.add(r), this.checkKeybindings();
|
|
1246
1372
|
}
|
|
1247
1373
|
handleKeyboardFocus() {
|
|
1248
1374
|
this.pressedKeys.clear(), this.activeKeybinds.clear(), this.triggeredToggleKeybinds.clear();
|
|
1249
1375
|
}
|
|
1250
|
-
async handleKeyUp(
|
|
1251
|
-
if (this.
|
|
1376
|
+
async handleKeyUp(t) {
|
|
1377
|
+
if (this.keybindListeningPaused)
|
|
1252
1378
|
return;
|
|
1253
|
-
const
|
|
1254
|
-
if (!
|
|
1379
|
+
const r = ae.get(t.key);
|
|
1380
|
+
if (!r)
|
|
1255
1381
|
return;
|
|
1256
|
-
this.pressedKeys.delete(
|
|
1257
|
-
const s = this.keybindsFile.
|
|
1258
|
-
for (const [
|
|
1259
|
-
s[
|
|
1260
|
-
this.
|
|
1261
|
-
}
|
|
1262
|
-
async
|
|
1263
|
-
const
|
|
1264
|
-
for (const [
|
|
1382
|
+
this.pressedKeys.delete(r);
|
|
1383
|
+
const s = this.keybindsFile.get();
|
|
1384
|
+
for (const [a] of this.preferencesKeybindToCallbacks.entries())
|
|
1385
|
+
s[a].keys.includes(r) && this.triggeredToggleKeybinds.delete(a);
|
|
1386
|
+
this.checkKeybindUps();
|
|
1387
|
+
}
|
|
1388
|
+
async checkKeybindUps() {
|
|
1389
|
+
const t = this.keybindsFile.get();
|
|
1390
|
+
for (const [r, s] of this.preferencesKeybindToCallbacks.entries()) {
|
|
1265
1391
|
if (!s.up) continue;
|
|
1266
|
-
const
|
|
1267
|
-
this.activeKeybinds.has(
|
|
1392
|
+
const a = t[r];
|
|
1393
|
+
this.activeKeybinds.has(r) && a.keys.some((i) => !this.pressedKeys.has(i)) && (this.activeKeybinds.delete(r), s.up(), this.logger.log("Keybind up triggered", this.getKeybindToString(a)));
|
|
1268
1394
|
}
|
|
1269
1395
|
}
|
|
1270
1396
|
async checkKeybindings() {
|
|
1271
|
-
const
|
|
1272
|
-
for (const [
|
|
1273
|
-
const
|
|
1274
|
-
if (
|
|
1275
|
-
this.
|
|
1397
|
+
const t = this.keybindsFile.get();
|
|
1398
|
+
for (const [r, s] of this.preferencesKeybindToCallbacks.entries()) {
|
|
1399
|
+
const a = t[r];
|
|
1400
|
+
if (a.keys.length === this.pressedKeys.size && a.keys.every((o) => we.has(o) ? this.pressedKeys.has(o) : !1)) {
|
|
1401
|
+
this.triggerKeybind(a, s, r);
|
|
1276
1402
|
return;
|
|
1277
1403
|
}
|
|
1278
1404
|
}
|
|
1279
|
-
for (const [
|
|
1280
|
-
const
|
|
1281
|
-
|
|
1405
|
+
for (const [r, s] of this.preferencesKeybindToCallbacks.entries()) {
|
|
1406
|
+
const a = t[r];
|
|
1407
|
+
a.keys.every((o) => we.has(o) ? this.pressedKeys.has(o) : (this.logger.error("Unknown key", o, a), !1)) && this.triggerKeybind(a, s, r);
|
|
1282
1408
|
}
|
|
1283
1409
|
}
|
|
1284
|
-
|
|
1285
|
-
const
|
|
1286
|
-
if (
|
|
1287
|
-
const
|
|
1410
|
+
triggerKeybind(t, r, s) {
|
|
1411
|
+
const a = t.mode;
|
|
1412
|
+
if (a === "toggle" && r.toggle && !this.triggeredToggleKeybinds.has(s)) {
|
|
1413
|
+
const i = r.toggle();
|
|
1288
1414
|
this.triggeredToggleKeybinds.add(s), this.logger.log(
|
|
1289
|
-
|
|
1290
|
-
this.
|
|
1415
|
+
i ? `Keybind pressed rejected: ${i}` : "Keybind pressed accepted",
|
|
1416
|
+
this.getKeybindToString(t)
|
|
1291
1417
|
);
|
|
1292
1418
|
}
|
|
1293
|
-
if (
|
|
1294
|
-
const
|
|
1295
|
-
|
|
1419
|
+
if (a === "hold" && r.down && !this.activeKeybinds.has(s)) {
|
|
1420
|
+
const i = r.down();
|
|
1421
|
+
i ? this.logger.log(`Keybind down rejected: ${i}`, this.getKeybindToString(t)) : (this.activeKeybinds.add(s), this.logger.log("Keybind down accepted", this.getKeybindToString(t)));
|
|
1296
1422
|
}
|
|
1297
1423
|
}
|
|
1298
|
-
|
|
1299
|
-
return `(${
|
|
1424
|
+
getKeybindToString(t) {
|
|
1425
|
+
return `(${t.keys.join("+")}${t.mode ? ` ${t.mode}` : ""})`;
|
|
1300
1426
|
}
|
|
1301
1427
|
}
|
|
1302
|
-
class
|
|
1303
|
-
constructor(
|
|
1428
|
+
class gn extends Ae {
|
|
1429
|
+
constructor(t) {
|
|
1304
1430
|
super("OverridesManager");
|
|
1305
1431
|
c(this, "renderInterface");
|
|
1306
1432
|
c(this, "globalCursorOverrideCount", /* @__PURE__ */ new Set());
|
|
1307
1433
|
c(this, "globalMouseBlockCount", /* @__PURE__ */ new Set());
|
|
1308
1434
|
c(this, "globalKeyboardBlockCount", /* @__PURE__ */ new Set());
|
|
1309
1435
|
c(this, "keyInputBlocks", {});
|
|
1310
|
-
this.renderInterface =
|
|
1436
|
+
this.renderInterface = O.getInstance().getInterface(t);
|
|
1311
1437
|
}
|
|
1312
|
-
scope(
|
|
1438
|
+
scope(t) {
|
|
1313
1439
|
return {
|
|
1314
|
-
setGlobalCursorOverride: (
|
|
1315
|
-
setGlobalMouseBlock: (
|
|
1316
|
-
setGlobalKeyboardBlock: (
|
|
1317
|
-
setKeyInputBlock: (
|
|
1440
|
+
setGlobalCursorOverride: (r) => this.setGlobalCursorOverride(t, r),
|
|
1441
|
+
setGlobalMouseBlock: (r) => this.setGlobalMouseBlock(t, r),
|
|
1442
|
+
setGlobalKeyboardBlock: (r) => this.setGlobalKeyboardBlock(t, r),
|
|
1443
|
+
setKeyInputBlock: (r, s) => this.setKeyInputBlock(t, r, s)
|
|
1318
1444
|
};
|
|
1319
1445
|
}
|
|
1320
|
-
setGlobalCursorOverride(
|
|
1321
|
-
|
|
1446
|
+
setGlobalCursorOverride(t, r) {
|
|
1447
|
+
r ? this.globalCursorOverrideCount.add(t) : this.globalCursorOverrideCount.delete(t), r && this.globalCursorOverrideCount.size === 1 ? this.renderInterface.instance.setGlobalCursorOverride(!0) : !r && this.globalCursorOverrideCount.size === 0 && this.renderInterface.instance.setGlobalCursorOverride(!1);
|
|
1322
1448
|
}
|
|
1323
|
-
setGlobalMouseBlock(
|
|
1324
|
-
|
|
1449
|
+
setGlobalMouseBlock(t, r) {
|
|
1450
|
+
r ? this.globalMouseBlockCount.add(t) : this.globalMouseBlockCount.delete(t), r && this.globalMouseBlockCount.size === 1 ? this.renderInterface.instance.setGlobalMouseBlock(!0) : !r && this.globalMouseBlockCount.size === 0 && this.renderInterface.instance.setGlobalMouseBlock(!1);
|
|
1325
1451
|
}
|
|
1326
|
-
setGlobalKeyboardBlock(
|
|
1327
|
-
|
|
1452
|
+
setGlobalKeyboardBlock(t, r) {
|
|
1453
|
+
r ? this.globalKeyboardBlockCount.add(t) : this.globalKeyboardBlockCount.delete(t), r && this.globalKeyboardBlockCount.size === 1 ? this.renderInterface.instance.setGlobalKeyboardBlock(!0) : !r && this.globalKeyboardBlockCount.size === 0 && this.renderInterface.instance.setGlobalKeyboardBlock(!1);
|
|
1328
1454
|
}
|
|
1329
|
-
setKeyInputBlock(
|
|
1330
|
-
this.keyInputBlocks[
|
|
1455
|
+
setKeyInputBlock(t, r, s) {
|
|
1456
|
+
this.keyInputBlocks[r] || (this.keyInputBlocks[r] = /* @__PURE__ */ new Set()), s ? this.keyInputBlocks[r].add(t) : this.keyInputBlocks[r].delete(t), s && this.keyInputBlocks[r].size === 1 ? this.renderInterface.instance.setKeyInputBlock(r, !0) : !s && this.keyInputBlocks[r].size === 0 && this.renderInterface.instance.setKeyInputBlock(r, !1);
|
|
1331
1457
|
}
|
|
1332
1458
|
}
|
|
1333
|
-
const
|
|
1334
|
-
let
|
|
1335
|
-
function
|
|
1336
|
-
const { init:
|
|
1337
|
-
if (
|
|
1338
|
-
return
|
|
1339
|
-
function
|
|
1340
|
-
|
|
1341
|
-
|
|
1459
|
+
const fn = _(gn, "OGG_SIEGE");
|
|
1460
|
+
let te = !1, H;
|
|
1461
|
+
function Yn(n) {
|
|
1462
|
+
const { init: e = !0 } = n;
|
|
1463
|
+
if (pn(n), te)
|
|
1464
|
+
return H;
|
|
1465
|
+
function t() {
|
|
1466
|
+
kn(n);
|
|
1467
|
+
const r = /* @__PURE__ */ new Map(), s = bn(n.modules, r), a = vn(), i = En(n.keybinds), o = wn(), l = _n();
|
|
1468
|
+
yn(), In(n, r), te = !0, H = {
|
|
1342
1469
|
...s,
|
|
1343
|
-
...
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
windows: i,
|
|
1470
|
+
...a,
|
|
1471
|
+
keybinds: i,
|
|
1472
|
+
windows: o,
|
|
1347
1473
|
input: l,
|
|
1348
|
-
hasAnyActiveProcesses: () =>
|
|
1349
|
-
init:
|
|
1474
|
+
hasAnyActiveProcesses: () => C.getInstance().hasAnyActiveProcesses,
|
|
1475
|
+
init: t
|
|
1350
1476
|
};
|
|
1351
1477
|
}
|
|
1352
|
-
return
|
|
1478
|
+
return e ? (t(), H) : new Proxy(
|
|
1353
1479
|
{
|
|
1354
|
-
init:
|
|
1480
|
+
init: t
|
|
1355
1481
|
},
|
|
1356
1482
|
{
|
|
1357
|
-
get: (
|
|
1358
|
-
if (s !== "init" && !
|
|
1483
|
+
get: (r, s) => {
|
|
1484
|
+
if (s !== "init" && !te)
|
|
1359
1485
|
throw new Error("overlayed was called before initialized");
|
|
1360
|
-
return s === "init" ?
|
|
1486
|
+
return s === "init" ? r[s] : H[s];
|
|
1361
1487
|
}
|
|
1362
1488
|
}
|
|
1363
1489
|
);
|
|
@@ -1367,501 +1493,225 @@ global.OVERLAYED = new Proxy({}, {
|
|
|
1367
1493
|
throw new Error("function overlayed was not called");
|
|
1368
1494
|
}
|
|
1369
1495
|
});
|
|
1370
|
-
function
|
|
1496
|
+
function pn(n) {
|
|
1371
1497
|
global.OVERLAYED = {
|
|
1372
|
-
APP_NAME:
|
|
1498
|
+
APP_NAME: n.appName
|
|
1373
1499
|
};
|
|
1374
1500
|
}
|
|
1375
|
-
function
|
|
1376
|
-
|
|
1501
|
+
function yn() {
|
|
1502
|
+
Ne.getInstance().init(), B.getInstance().init(), C.getInstance().init(), T.getInstance().init(), Pe.on("quit", () => {
|
|
1503
|
+
mn();
|
|
1504
|
+
});
|
|
1505
|
+
}
|
|
1506
|
+
function mn() {
|
|
1507
|
+
T.getInstance().destroy(), B.getInstance().destroy(), Ne.getInstance().destroy(), C.getInstance().destroy(), O.getInstance().getInterface("OGG_SIEGE").destroy(), oe.getInstance().destroy(), I.getInstance().destroy();
|
|
1377
1508
|
}
|
|
1378
|
-
function
|
|
1379
|
-
return
|
|
1380
|
-
const s =
|
|
1381
|
-
return
|
|
1509
|
+
function bn(n, e) {
|
|
1510
|
+
return n.reduce((t, r) => {
|
|
1511
|
+
const s = r.key;
|
|
1512
|
+
return t[s] = {
|
|
1382
1513
|
// prettier-ignore
|
|
1383
|
-
on(
|
|
1384
|
-
const
|
|
1385
|
-
l.add(
|
|
1514
|
+
on(a, i) {
|
|
1515
|
+
const o = M(s, a), l = e.get(o) ?? /* @__PURE__ */ new Set();
|
|
1516
|
+
l.add(i), e.set(o, l);
|
|
1386
1517
|
},
|
|
1387
|
-
onAny(
|
|
1388
|
-
const
|
|
1389
|
-
|
|
1518
|
+
onAny(a) {
|
|
1519
|
+
const i = M(s, "*"), o = e.get(i) ?? /* @__PURE__ */ new Set();
|
|
1520
|
+
o.add(a), e.set(i, o);
|
|
1390
1521
|
},
|
|
1391
1522
|
// prettier-ignore
|
|
1392
|
-
off(
|
|
1393
|
-
const
|
|
1394
|
-
l.delete(
|
|
1523
|
+
off(a, i) {
|
|
1524
|
+
const o = M(s, a), l = e.get(o) ?? /* @__PURE__ */ new Set();
|
|
1525
|
+
l.delete(i), e.set(o, l);
|
|
1395
1526
|
},
|
|
1396
1527
|
// prettier-ignore
|
|
1397
|
-
offAny(
|
|
1398
|
-
const
|
|
1399
|
-
|
|
1528
|
+
offAny(a) {
|
|
1529
|
+
const i = M(s, "*"), o = e.get(i) ?? /* @__PURE__ */ new Set();
|
|
1530
|
+
o.delete(a), e.set(i, o);
|
|
1400
1531
|
}
|
|
1401
|
-
},
|
|
1532
|
+
}, t;
|
|
1402
1533
|
}, {});
|
|
1403
1534
|
}
|
|
1404
|
-
function
|
|
1405
|
-
const
|
|
1535
|
+
function vn() {
|
|
1536
|
+
const n = I.getInstance(), e = B.getInstance();
|
|
1406
1537
|
return {
|
|
1407
|
-
on: (
|
|
1408
|
-
switch (
|
|
1538
|
+
on: (t, r) => {
|
|
1539
|
+
switch (t) {
|
|
1540
|
+
case "fatal":
|
|
1541
|
+
n.on("fatal", r);
|
|
1542
|
+
break;
|
|
1409
1543
|
case "error":
|
|
1410
|
-
|
|
1544
|
+
n.on("error", r);
|
|
1411
1545
|
break;
|
|
1412
1546
|
case "warning":
|
|
1413
|
-
|
|
1547
|
+
n.on("warning", r);
|
|
1414
1548
|
break;
|
|
1415
1549
|
case "gameLaunch":
|
|
1416
|
-
|
|
1550
|
+
e.on("gameLaunch", r);
|
|
1417
1551
|
break;
|
|
1418
1552
|
case "gameClose":
|
|
1419
|
-
|
|
1553
|
+
e.on("gameClose", r);
|
|
1420
1554
|
break;
|
|
1421
1555
|
default:
|
|
1422
|
-
throw new Error(
|
|
1556
|
+
throw new Error(`Event type not implemented ${t}`, { cause: [t, r] });
|
|
1423
1557
|
}
|
|
1424
1558
|
},
|
|
1425
|
-
off: (
|
|
1426
|
-
switch (
|
|
1559
|
+
off: (t, r) => {
|
|
1560
|
+
switch (t) {
|
|
1561
|
+
case "fatal":
|
|
1562
|
+
n.off("fatal", r);
|
|
1563
|
+
break;
|
|
1427
1564
|
case "error":
|
|
1428
|
-
|
|
1565
|
+
n.off("error", r);
|
|
1429
1566
|
break;
|
|
1430
1567
|
case "warning":
|
|
1431
|
-
|
|
1568
|
+
n.off("warning", r);
|
|
1432
1569
|
break;
|
|
1433
1570
|
case "gameLaunch":
|
|
1434
|
-
|
|
1571
|
+
e.off("gameLaunch", r);
|
|
1435
1572
|
break;
|
|
1436
1573
|
case "gameClose":
|
|
1437
|
-
|
|
1574
|
+
e.off("gameClose", r);
|
|
1438
1575
|
break;
|
|
1439
1576
|
default:
|
|
1440
|
-
throw new Error(
|
|
1577
|
+
throw new Error(`Event type not implemented ${t}`, { cause: [t, r] });
|
|
1441
1578
|
}
|
|
1442
1579
|
}
|
|
1443
1580
|
};
|
|
1444
1581
|
}
|
|
1445
|
-
function
|
|
1446
|
-
return `${
|
|
1582
|
+
function M(n, e) {
|
|
1583
|
+
return `${n}:${e}`;
|
|
1447
1584
|
}
|
|
1448
|
-
function
|
|
1449
|
-
const
|
|
1450
|
-
function
|
|
1451
|
-
const
|
|
1452
|
-
if (
|
|
1453
|
-
|
|
1454
|
-
|
|
1585
|
+
function In(n, e) {
|
|
1586
|
+
const t = oe.getInstance();
|
|
1587
|
+
function r(s) {
|
|
1588
|
+
const a = dt(s);
|
|
1589
|
+
if (a instanceof K.errors) {
|
|
1590
|
+
I.getInstance().warn("Invalid event", "INVALID_EVENT", {
|
|
1591
|
+
summary: a.summary
|
|
1455
1592
|
});
|
|
1456
1593
|
return;
|
|
1457
1594
|
}
|
|
1458
|
-
const
|
|
1459
|
-
if (!
|
|
1595
|
+
const i = n.modules.find((f) => f.key === a.game), o = i == null ? void 0 : i.events.event;
|
|
1596
|
+
if (!o)
|
|
1460
1597
|
return;
|
|
1461
|
-
const l =
|
|
1462
|
-
if (l instanceof
|
|
1463
|
-
|
|
1464
|
-
|
|
1598
|
+
const l = o(s);
|
|
1599
|
+
if (l instanceof K.errors) {
|
|
1600
|
+
I.getInstance().warn("Invalid event", "INVALID_EVENT", {
|
|
1601
|
+
summary: l.summary
|
|
1465
1602
|
});
|
|
1466
1603
|
return;
|
|
1467
1604
|
}
|
|
1468
|
-
const
|
|
1469
|
-
|
|
1605
|
+
const d = M(i.key, l.type), h = M(i.key, "*"), g = e.get(d), u = e.get(h), p = [...Array.from(g ?? []), ...Array.from(u ?? [])];
|
|
1606
|
+
p.length !== 0 && p.forEach((f) => {
|
|
1470
1607
|
f(l);
|
|
1471
1608
|
});
|
|
1472
1609
|
}
|
|
1473
|
-
return
|
|
1610
|
+
return t.on("data", (s) => s.forEach(r)), t.on("error", (s) => {
|
|
1611
|
+
I.getInstance().error("Pipe server error", "PIPE_SERVER_ERROR", {
|
|
1612
|
+
error: s
|
|
1613
|
+
});
|
|
1614
|
+
}), t;
|
|
1474
1615
|
}
|
|
1475
|
-
function
|
|
1476
|
-
const
|
|
1477
|
-
for (const s in
|
|
1478
|
-
|
|
1479
|
-
on: (
|
|
1480
|
-
switch (
|
|
1616
|
+
function En(n) {
|
|
1617
|
+
const e = new hn(n), t = {};
|
|
1618
|
+
for (const s in n)
|
|
1619
|
+
t[s] = {
|
|
1620
|
+
on: (a, i) => {
|
|
1621
|
+
switch (a) {
|
|
1481
1622
|
case "down":
|
|
1482
|
-
|
|
1623
|
+
e.onKeybindDown(s, i);
|
|
1483
1624
|
break;
|
|
1484
1625
|
case "up":
|
|
1485
|
-
|
|
1626
|
+
e.onKeybindUp(s, i);
|
|
1486
1627
|
break;
|
|
1487
1628
|
case "toggle":
|
|
1488
|
-
|
|
1629
|
+
e.onKeybindToggled(s, i);
|
|
1489
1630
|
break;
|
|
1490
1631
|
default:
|
|
1491
|
-
throw new Error(
|
|
1632
|
+
throw new Error(`Event type not implemented ${a}`, { cause: [a, i] });
|
|
1492
1633
|
}
|
|
1493
1634
|
}
|
|
1494
1635
|
};
|
|
1495
|
-
|
|
1496
|
-
...
|
|
1497
|
-
|
|
1498
|
-
|
|
1636
|
+
const r = {
|
|
1637
|
+
...t,
|
|
1638
|
+
getConfig: () => e.getConfig(),
|
|
1639
|
+
pauseKeybindListening: () => {
|
|
1640
|
+
e.keybindListeningPaused = !0;
|
|
1641
|
+
},
|
|
1642
|
+
resumeKeybindListening: () => {
|
|
1643
|
+
e.keybindListeningPaused = !1;
|
|
1644
|
+
},
|
|
1645
|
+
updateKeybind: (s, a) => {
|
|
1646
|
+
e.updateKeybind(s, a);
|
|
1647
|
+
},
|
|
1648
|
+
updateKeybinds: (s) => {
|
|
1649
|
+
e.updateKeybinds(s);
|
|
1499
1650
|
}
|
|
1500
1651
|
};
|
|
1652
|
+
return e.init(), Pe.on("quit", () => {
|
|
1653
|
+
e.destroy();
|
|
1654
|
+
}), r;
|
|
1501
1655
|
}
|
|
1502
|
-
function
|
|
1656
|
+
function wn() {
|
|
1503
1657
|
return {
|
|
1504
|
-
createWindow:
|
|
1505
|
-
on:
|
|
1506
|
-
off:
|
|
1507
|
-
once:
|
|
1508
|
-
addListener:
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1658
|
+
createWindow: (n) => y().instance.newWindowInternal(Ze.BrowserWindow, n),
|
|
1659
|
+
on: (n, e) => y().instance.on(n, e),
|
|
1660
|
+
off: (n, e) => y().instance.off(n, e),
|
|
1661
|
+
once: (n, e) => y().instance.once(n, e),
|
|
1662
|
+
addListener: (n, e) => y().instance.addListener(n, e),
|
|
1663
|
+
removeListener: (n, e) => y().instance.removeListener(n, e),
|
|
1664
|
+
removeAllListeners: () => y().instance.removeAllListeners(),
|
|
1665
|
+
prependListener: (n, e) => y().instance.prependListener(n, e),
|
|
1666
|
+
prependOnceListener: (n, e) => y().instance.prependOnceListener(n, e),
|
|
1513
1667
|
getActiveGameInfo: () => {
|
|
1514
|
-
const
|
|
1668
|
+
const n = y(), e = oe.getInstance();
|
|
1515
1669
|
return {
|
|
1516
|
-
resolution:
|
|
1517
|
-
isConnected:
|
|
1670
|
+
resolution: n.resolution,
|
|
1671
|
+
isConnected: e.hasConnection
|
|
1518
1672
|
};
|
|
1519
1673
|
}
|
|
1520
1674
|
};
|
|
1521
1675
|
}
|
|
1522
|
-
function
|
|
1676
|
+
function _n() {
|
|
1523
1677
|
return {
|
|
1524
|
-
scope: (
|
|
1678
|
+
scope: (n) => fn.getInstance().scope(n),
|
|
1525
1679
|
raw: {
|
|
1526
|
-
setGlobalMouseBlock:
|
|
1527
|
-
setGlobalKeyboardBlock:
|
|
1528
|
-
setGlobalCursorOverride:
|
|
1529
|
-
setKeyInputBlock:
|
|
1530
|
-
getGlobalMouseBlock:
|
|
1531
|
-
getGlobalKeyboardBlock:
|
|
1532
|
-
getGlobalCursorOverride:
|
|
1533
|
-
getKeyInputBlock:
|
|
1680
|
+
setGlobalMouseBlock: (n) => y().instance.setGlobalMouseBlock(n),
|
|
1681
|
+
setGlobalKeyboardBlock: (n) => y().instance.setGlobalKeyboardBlock(n),
|
|
1682
|
+
setGlobalCursorOverride: (n) => y().instance.setGlobalCursorOverride(n),
|
|
1683
|
+
setKeyInputBlock: (n, e) => y().instance.setKeyInputBlock(n, e),
|
|
1684
|
+
getGlobalMouseBlock: () => y().instance.getGlobalMouseBlock(),
|
|
1685
|
+
getGlobalKeyboardBlock: () => y().instance.getGlobalKeyboardBlock(),
|
|
1686
|
+
getGlobalCursorOverride: () => y().instance.getGlobalCursorOverride(),
|
|
1687
|
+
getKeyInputBlock: (n) => y().instance.getKeyInputBlock(n)
|
|
1534
1688
|
}
|
|
1535
1689
|
};
|
|
1536
1690
|
}
|
|
1537
|
-
function
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
}
|
|
1691
|
+
function kn(n) {
|
|
1692
|
+
P.getInstance().clientId = n.appName, P.getInstance().userId = Wt.generateUniqueIdentifier(), I.getInstance().on("fatal", (e) => {
|
|
1693
|
+
P.getInstance().track("fatal", {
|
|
1694
|
+
message: e.message,
|
|
1695
|
+
code: e.code,
|
|
1696
|
+
data: e.data
|
|
1697
|
+
});
|
|
1698
|
+
}), I.getInstance().on("error", (e) => {
|
|
1699
|
+
P.getInstance().track("error", {
|
|
1700
|
+
message: e.message,
|
|
1701
|
+
code: e.code,
|
|
1702
|
+
data: e.data
|
|
1703
|
+
});
|
|
1704
|
+
}), I.getInstance().on("warning", (e) => {
|
|
1705
|
+
P.getInstance().track("warning", {
|
|
1706
|
+
message: e.message,
|
|
1707
|
+
code: e.code,
|
|
1708
|
+
data: e.data
|
|
1709
|
+
});
|
|
1710
|
+
});
|
|
1545
1711
|
}
|
|
1546
|
-
|
|
1547
|
-
"
|
|
1548
|
-
"melee",
|
|
1549
|
-
"explosive",
|
|
1550
|
-
"falling",
|
|
1551
|
-
"regeneration",
|
|
1552
|
-
"unknown",
|
|
1553
|
-
"debris",
|
|
1554
|
-
"projectile",
|
|
1555
|
-
"downed",
|
|
1556
|
-
"gas",
|
|
1557
|
-
"thermal_explosion",
|
|
1558
|
-
"melee_gadget",
|
|
1559
|
-
"barbed_wire",
|
|
1560
|
-
"electric",
|
|
1561
|
-
"reinforcement",
|
|
1562
|
-
"frag",
|
|
1563
|
-
"paralyzed",
|
|
1564
|
-
"emp",
|
|
1565
|
-
"break",
|
|
1566
|
-
"cleanup",
|
|
1567
|
-
"interrogation",
|
|
1568
|
-
"melee-finisher",
|
|
1569
|
-
"toxic",
|
|
1570
|
-
"toxic-explosion",
|
|
1571
|
-
"pneumatic",
|
|
1572
|
-
"body-contact",
|
|
1573
|
-
"contact-explosion",
|
|
1574
|
-
"flash",
|
|
1575
|
-
"parasite-spike",
|
|
1576
|
-
"laser",
|
|
1577
|
-
"concussion",
|
|
1578
|
-
"blowtorch",
|
|
1579
|
-
"taser-shield",
|
|
1580
|
-
"reverse-friendly-fire",
|
|
1581
|
-
"self-destroyed",
|
|
1582
|
-
"area-control",
|
|
1583
|
-
"fire",
|
|
1584
|
-
"breach-kick",
|
|
1585
|
-
"break-wall",
|
|
1586
|
-
"blade-mine",
|
|
1587
|
-
"invalid"
|
|
1588
|
-
], Qe = y("===", ...Je), Ze = ["unknown", "enemy", "friendly", "invalid"], et = y("===", ...Ze), u = Ae.and({
|
|
1589
|
-
game: "'siege'"
|
|
1590
|
-
}), Ln = u.and({
|
|
1591
|
-
type: "'local_player'",
|
|
1592
|
-
content: {
|
|
1593
|
-
profile_id: me
|
|
1594
|
-
}
|
|
1595
|
-
}), S = y({
|
|
1596
|
-
id: "number",
|
|
1597
|
-
value: "string"
|
|
1598
|
-
}), tt = y({
|
|
1599
|
-
kills: "number",
|
|
1600
|
-
deaths: "number",
|
|
1601
|
-
assists: "number",
|
|
1602
|
-
plants: "number",
|
|
1603
|
-
score: "number"
|
|
1604
|
-
}), Fn = y({
|
|
1605
|
-
instigator_player_id: "number",
|
|
1606
|
-
receiver_player_id: "number",
|
|
1607
|
-
damage_amount: "number",
|
|
1608
|
-
remaining_health: "number",
|
|
1609
|
-
pre_damage_health: "number",
|
|
1610
|
-
max_health: "number",
|
|
1611
|
-
damage_type: Qe,
|
|
1612
|
-
damage_team_type: et,
|
|
1613
|
-
damage_item_id: "number | null",
|
|
1614
|
-
damage_time: "number"
|
|
1615
|
-
}), nt = y({
|
|
1616
|
-
index: "number",
|
|
1617
|
-
rounds_until_next_segment: "number",
|
|
1618
|
-
segment_size: "number",
|
|
1619
|
-
segment_index: "number",
|
|
1620
|
-
team_0: {
|
|
1621
|
-
role: K,
|
|
1622
|
-
state: "number"
|
|
1623
|
-
},
|
|
1624
|
-
team_1: {
|
|
1625
|
-
role: K,
|
|
1626
|
-
state: "number"
|
|
1627
|
-
}
|
|
1628
|
-
}), rt = y({
|
|
1629
|
-
id: "number",
|
|
1630
|
-
name: S,
|
|
1631
|
-
time_of_day: S
|
|
1632
|
-
}), Bn = y({
|
|
1633
|
-
player_id: "number",
|
|
1634
|
-
final_health: "number",
|
|
1635
|
-
final_life_state: ne,
|
|
1636
|
-
operator_name: S.or(y.null)
|
|
1637
|
-
}), Gn = y({
|
|
1638
|
-
round_data: nt,
|
|
1639
|
-
damage_events: Fn.array(),
|
|
1640
|
-
players: Bn.array()
|
|
1641
|
-
}), Hn = u.and({
|
|
1642
|
-
type: "'match_started'",
|
|
1643
|
-
content: {
|
|
1644
|
-
game_mode: "string",
|
|
1645
|
-
game_type: S,
|
|
1646
|
-
match_type: "string",
|
|
1647
|
-
match_id: "string",
|
|
1648
|
-
map: rt,
|
|
1649
|
-
is_round_based: "boolean",
|
|
1650
|
-
current_round_index: "number",
|
|
1651
|
-
rounds: nt.array()
|
|
1652
|
-
}
|
|
1653
|
-
}), Nn = u.and({
|
|
1654
|
-
type: "'module_loaded'"
|
|
1655
|
-
}), jn = u.and({
|
|
1656
|
-
type: "'module_unloaded'"
|
|
1657
|
-
}), Un = u.and({
|
|
1658
|
-
type: "'started_queuing'",
|
|
1659
|
-
content: {
|
|
1660
|
-
game_mode: "string",
|
|
1661
|
-
game_type: S,
|
|
1662
|
-
match_type: "string"
|
|
1663
|
-
}
|
|
1664
|
-
}), zn = u.and({
|
|
1665
|
-
type: "'stopped_queuing'"
|
|
1666
|
-
}), Vn = u.and({
|
|
1667
|
-
type: "'unsupported_game_version'",
|
|
1668
|
-
content: {
|
|
1669
|
-
hash: "string | null",
|
|
1670
|
-
version: "string | null"
|
|
1671
|
-
}
|
|
1672
|
-
}), qn = u.and({
|
|
1673
|
-
type: "'match_ended'"
|
|
1674
|
-
}), Wn = u.and({
|
|
1675
|
-
type: "'map_changed'",
|
|
1676
|
-
content: {
|
|
1677
|
-
map: rt
|
|
1678
|
-
}
|
|
1679
|
-
}), Xn = u.and({
|
|
1680
|
-
type: "'operator_banned'",
|
|
1681
|
-
content: {
|
|
1682
|
-
index: "number",
|
|
1683
|
-
team: te,
|
|
1684
|
-
side: K,
|
|
1685
|
-
operator_name: S.or("null")
|
|
1686
|
-
}
|
|
1687
|
-
}), Yn = u.and({
|
|
1688
|
-
type: "'round_ended'",
|
|
1689
|
-
content: Gn
|
|
1690
|
-
}), Jn = u.and({
|
|
1691
|
-
type: "'phase_changed'",
|
|
1692
|
-
content: {
|
|
1693
|
-
phase: qe
|
|
1694
|
-
}
|
|
1695
|
-
}), Qn = u.and({
|
|
1696
|
-
type: "'player_joined'",
|
|
1697
|
-
content: {
|
|
1698
|
-
player_id: "number",
|
|
1699
|
-
profile_id: me,
|
|
1700
|
-
is_bot: "boolean",
|
|
1701
|
-
is_enemy: "boolean",
|
|
1702
|
-
is_squad_member: "boolean",
|
|
1703
|
-
is_local_player: "boolean",
|
|
1704
|
-
username: "string",
|
|
1705
|
-
side: K,
|
|
1706
|
-
team: te,
|
|
1707
|
-
is_privacy_username: "boolean",
|
|
1708
|
-
has_avatar_hidden: "boolean",
|
|
1709
|
-
has_commend_streak: "boolean",
|
|
1710
|
-
ping_id: "number",
|
|
1711
|
-
match_stats: tt,
|
|
1712
|
-
life_state: ne,
|
|
1713
|
-
ping: "number"
|
|
1714
|
-
}
|
|
1715
|
-
}).pipe((r) => ({
|
|
1716
|
-
...r,
|
|
1717
|
-
content: {
|
|
1718
|
-
...r.content,
|
|
1719
|
-
starting_side: r.content.side
|
|
1720
|
-
}
|
|
1721
|
-
})), Zn = u.and({
|
|
1722
|
-
type: "'player_left'",
|
|
1723
|
-
content: {
|
|
1724
|
-
player_id: "number"
|
|
1725
|
-
}
|
|
1726
|
-
}), er = u.and({
|
|
1727
|
-
type: "'player_operator_changed'",
|
|
1728
|
-
content: {
|
|
1729
|
-
player_id: "number",
|
|
1730
|
-
operator_name: S.or(y.null)
|
|
1731
|
-
}
|
|
1732
|
-
}), tr = u.and({
|
|
1733
|
-
type: "'player_location_changed'",
|
|
1734
|
-
content: {
|
|
1735
|
-
player_id: "number",
|
|
1736
|
-
location_name: "string"
|
|
1737
|
-
}
|
|
1738
|
-
}), nr = u.and({
|
|
1739
|
-
type: "'player_side_changed'",
|
|
1740
|
-
content: {
|
|
1741
|
-
player_id: "number",
|
|
1742
|
-
side: K
|
|
1743
|
-
}
|
|
1744
|
-
}), rr = u.and({
|
|
1745
|
-
type: "'player_stats_changed'",
|
|
1746
|
-
content: {
|
|
1747
|
-
player_id: "number",
|
|
1748
|
-
match_stats: tt
|
|
1749
|
-
}
|
|
1750
|
-
}), sr = u.and({
|
|
1751
|
-
type: "'player_ping_updated'",
|
|
1752
|
-
content: {
|
|
1753
|
-
player_id: "number",
|
|
1754
|
-
ping: "number"
|
|
1755
|
-
}
|
|
1756
|
-
}), ar = u.and({
|
|
1757
|
-
type: "'defuser_planted'",
|
|
1758
|
-
content: {
|
|
1759
|
-
player_id: "number"
|
|
1760
|
-
}
|
|
1761
|
-
}), or = u.and({
|
|
1762
|
-
type: "'defuser_sabotaged'",
|
|
1763
|
-
content: {
|
|
1764
|
-
player_id: "number"
|
|
1765
|
-
}
|
|
1766
|
-
}), ir = u.and({
|
|
1767
|
-
type: "'defuser_picked_up'",
|
|
1768
|
-
content: {
|
|
1769
|
-
player_id: "number",
|
|
1770
|
-
initial: "boolean"
|
|
1771
|
-
}
|
|
1772
|
-
}), lr = u.and({
|
|
1773
|
-
type: "'defuser_dropped'",
|
|
1774
|
-
content: {
|
|
1775
|
-
player_id: "number"
|
|
1776
|
-
}
|
|
1777
|
-
}), cr = u.and({
|
|
1778
|
-
type: "'player_life_state_changed'",
|
|
1779
|
-
content: {
|
|
1780
|
-
player_id: "number",
|
|
1781
|
-
life_state: ne
|
|
1782
|
-
}
|
|
1783
|
-
}), dr = u.and({
|
|
1784
|
-
type: "'player_died'",
|
|
1785
|
-
content: {
|
|
1786
|
-
player_id: "number",
|
|
1787
|
-
instigator_player_id: "number"
|
|
1788
|
-
}
|
|
1789
|
-
}), ur = u.and({
|
|
1790
|
-
type: "'player_downed'",
|
|
1791
|
-
content: {
|
|
1792
|
-
player_id: "number",
|
|
1793
|
-
instigator_player_id: "number"
|
|
1794
|
-
}
|
|
1795
|
-
}), hr = u.and({
|
|
1796
|
-
type: "'player_ping_id_changed'",
|
|
1797
|
-
content: {
|
|
1798
|
-
player_id: "number",
|
|
1799
|
-
ping_id: "number"
|
|
1800
|
-
}
|
|
1801
|
-
}), gr = u.and({
|
|
1802
|
-
type: "'player_team_changed'",
|
|
1803
|
-
content: {
|
|
1804
|
-
player_id: "number",
|
|
1805
|
-
team: te
|
|
1806
|
-
}
|
|
1807
|
-
}), pr = ct({
|
|
1808
|
-
"#event1": "module_loaded | module_unloaded | unsupported_game_version | local_player | started_queuing | stopped_queuing | match_started | match_ended | map_changed | operator_banned | round_ended | phase_changed | player_joined | player_left | player_operator_changed | player_location_changed | player_side_changed | player_stats_changed",
|
|
1809
|
-
"#event2": "player_life_state_changed | player_died | player_downed | player_ping_id_changed | player_team_changed | defuser_planted | defuser_sabotaged | defuser_picked_up | defuser_dropped | player_ping_updated",
|
|
1810
|
-
event: "event1 | event2",
|
|
1811
|
-
module_loaded: Nn,
|
|
1812
|
-
module_unloaded: jn,
|
|
1813
|
-
unsupported_game_version: Vn,
|
|
1814
|
-
local_player: Ln,
|
|
1815
|
-
started_queuing: Un,
|
|
1816
|
-
stopped_queuing: zn,
|
|
1817
|
-
match_started: Hn,
|
|
1818
|
-
match_ended: qn,
|
|
1819
|
-
map_changed: Wn,
|
|
1820
|
-
operator_banned: Xn,
|
|
1821
|
-
round_ended: Yn,
|
|
1822
|
-
phase_changed: Jn,
|
|
1823
|
-
player_joined: Qn,
|
|
1824
|
-
player_left: Zn,
|
|
1825
|
-
player_operator_changed: er,
|
|
1826
|
-
player_location_changed: tr,
|
|
1827
|
-
player_side_changed: nr,
|
|
1828
|
-
player_stats_changed: rr,
|
|
1829
|
-
defuser_planted: ar,
|
|
1830
|
-
defuser_sabotaged: or,
|
|
1831
|
-
defuser_picked_up: ir,
|
|
1832
|
-
defuser_dropped: lr,
|
|
1833
|
-
player_ping_updated: sr,
|
|
1834
|
-
player_life_state_changed: cr,
|
|
1835
|
-
player_died: dr,
|
|
1836
|
-
player_downed: ur,
|
|
1837
|
-
player_ping_id_changed: hr,
|
|
1838
|
-
player_team_changed: gr
|
|
1839
|
-
}).export();
|
|
1840
|
-
function fr() {
|
|
1841
|
-
return {
|
|
1842
|
-
key: "siege",
|
|
1843
|
-
events: pr
|
|
1844
|
-
};
|
|
1712
|
+
function y() {
|
|
1713
|
+
return O.getInstance().getInterface("OGG_SIEGE");
|
|
1845
1714
|
}
|
|
1846
|
-
const Ur = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1847
|
-
__proto__: null,
|
|
1848
|
-
BOT_ID: ze,
|
|
1849
|
-
DAMAGE_TEAM_TYPES: Ze,
|
|
1850
|
-
DAMAGE_TYPES: Je,
|
|
1851
|
-
DamageTeamTypeSchema: et,
|
|
1852
|
-
DamageTypeSchema: Qe,
|
|
1853
|
-
GAME_MODE_PHASES: Ve,
|
|
1854
|
-
GameModePhaseSchema: qe,
|
|
1855
|
-
PLAYER_LIFE_STATES: Ye,
|
|
1856
|
-
PlayerLifeStateSchema: ne,
|
|
1857
|
-
ProfileId: me,
|
|
1858
|
-
SIDES: Xe,
|
|
1859
|
-
SideSchema: K,
|
|
1860
|
-
TEAMS: We,
|
|
1861
|
-
TeamSchema: te,
|
|
1862
|
-
module: fr
|
|
1863
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
1864
1715
|
export {
|
|
1865
|
-
|
|
1866
|
-
jr as overlayed
|
|
1716
|
+
Yn as overlayed
|
|
1867
1717
|
};
|