typeferry 0.13.0 → 0.13.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.
|
@@ -26,37 +26,48 @@ export declare class VisibilityManager {
|
|
|
26
26
|
* Guards against duplicate reconnects when both the heartbeat and
|
|
27
27
|
* visibilitychange fire in quick succession after wake.
|
|
28
28
|
*/
|
|
29
|
-
private
|
|
29
|
+
private recovery;
|
|
30
|
+
private missedHeartbeat;
|
|
31
|
+
private destroyed;
|
|
32
|
+
private initializedSocket;
|
|
33
|
+
private readonly rememberInitialization;
|
|
30
34
|
constructor(client: Client, idleTimer: IdleTimer | null);
|
|
31
35
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* do a full cleanup before reconnecting.
|
|
36
|
+
* Explicit recovery replaces the socket immediately. Automatic wake recovery
|
|
37
|
+
* first checks for traffic so timer throttling does not cancel live requests.
|
|
35
38
|
*/
|
|
36
39
|
reconnect(): void;
|
|
37
|
-
/** Removes
|
|
40
|
+
/** Removes listeners, timers and pending recovery work. */
|
|
38
41
|
destroy(): void;
|
|
42
|
+
private finishRecovery;
|
|
43
|
+
private waitForInitialization;
|
|
44
|
+
private replaceConnection;
|
|
45
|
+
private waitForTraffic;
|
|
39
46
|
private setup;
|
|
40
47
|
private startHeartbeat;
|
|
41
48
|
private stopHeartbeat;
|
|
42
49
|
private handlePageHide;
|
|
43
50
|
/**
|
|
44
51
|
* Unified entry point for sleep detection from both the heartbeat
|
|
45
|
-
* timer and `visibilitychange`.
|
|
52
|
+
* timer and `visibilitychange`. One recovery owns the full lifecycle to prevent
|
|
46
53
|
* duplicate reconnects when both fire after wake.
|
|
47
54
|
*/
|
|
48
55
|
private handleSleepDetected;
|
|
49
56
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
57
|
+
* A token change still needs a new handshake. Otherwise delivered traffic
|
|
58
|
+
* allows the existing socket to survive a timer gap without replaying RPCs.
|
|
59
|
+
* Socket identity prevents a late hook/probe from retiring a newer connection.
|
|
53
60
|
*/
|
|
54
61
|
private runHookAndReconnect;
|
|
62
|
+
/**
|
|
63
|
+
* A competing reconnect may already have adopted the refreshed token. Keep
|
|
64
|
+
* that successor, but never mistake a newer socket for a newer handshake.
|
|
65
|
+
*/
|
|
66
|
+
private needsTokenHandshake;
|
|
67
|
+
private runBeforeReconnect;
|
|
55
68
|
/**
|
|
56
69
|
* Determines whether reconnection is needed and triggers it. Routes
|
|
57
70
|
* through `handleSleepDetected` for deduplication with the heartbeat.
|
|
58
71
|
*/
|
|
59
72
|
private handlePageVisible;
|
|
60
|
-
/** Promisified delay for hook retry backoff. */
|
|
61
|
-
private delay;
|
|
62
73
|
}
|
|
@@ -1,14 +1,76 @@
|
|
|
1
|
-
import { ClientEvents } from '../utils/index.js';
|
|
1
|
+
import { ClientEvents, MessageType, Presentation, WebSocketState } from '../utils/index.js';
|
|
2
|
+
import { LogLevel } from './logger.js';
|
|
2
3
|
/**
|
|
3
4
|
* Time threshold below which we trust the socket connection is healthy.
|
|
4
|
-
*
|
|
5
|
-
* disconnected.
|
|
5
|
+
* Longer hides check delivered traffic before trusting an open socket.
|
|
6
6
|
*/
|
|
7
7
|
const FORCE_RECONNECT_THRESHOLD = 60 * 60 * 1000; // 1 hour
|
|
8
8
|
/** Heartbeat fires every 30s to detect OS sleep gaps. */
|
|
9
9
|
const HEARTBEAT_INTERVAL_MS = 30_000;
|
|
10
|
-
/**
|
|
10
|
+
/** A timer gap is wake evidence; background throttling can also cause it. */
|
|
11
11
|
const HEARTBEAT_THRESHOLD_MS = 60_000;
|
|
12
|
+
/** The existing server heartbeat sends traffic every 25 seconds. */
|
|
13
|
+
const RECOVERY_TIMEOUT_MS = 30_000;
|
|
14
|
+
/**
|
|
15
|
+
* Only delivered server envelopes satisfy the grace. This is activity evidence,
|
|
16
|
+
* not a new round-trip protocol or a replacement for ordinary RPC timeouts.
|
|
17
|
+
*/
|
|
18
|
+
function isServerTraffic(value) {
|
|
19
|
+
if (typeof value !== 'object' || value === null || !('t' in value))
|
|
20
|
+
return false;
|
|
21
|
+
switch (value.t) {
|
|
22
|
+
case MessageType.PING:
|
|
23
|
+
return true;
|
|
24
|
+
case MessageType.AUTH:
|
|
25
|
+
return 'authenticated' in value && typeof value.authenticated === 'boolean';
|
|
26
|
+
case MessageType.RPC_RESPONSE:
|
|
27
|
+
return 'id' in value && typeof value.id === 'string';
|
|
28
|
+
case MessageType.EVENT:
|
|
29
|
+
return 'event' in value && typeof value.event === 'string' &&
|
|
30
|
+
'channel' in value && typeof value.channel === 'string';
|
|
31
|
+
default:
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Owns one bounded recovery wait and releases every timer/listener when it
|
|
37
|
+
* settles. Abort also settles the promise so close cannot strand async work.
|
|
38
|
+
*/
|
|
39
|
+
function waitForRecovery(signal, timeoutMs, subscribe) {
|
|
40
|
+
if (signal.aborted)
|
|
41
|
+
return Promise.resolve(false);
|
|
42
|
+
return new Promise((resolve, reject) => {
|
|
43
|
+
let unsubscribe;
|
|
44
|
+
let settled = false;
|
|
45
|
+
const cleanup = () => {
|
|
46
|
+
clearTimeout(timer);
|
|
47
|
+
signal.removeEventListener('abort', onAbort);
|
|
48
|
+
unsubscribe?.();
|
|
49
|
+
unsubscribe = undefined;
|
|
50
|
+
};
|
|
51
|
+
const finish = (success) => {
|
|
52
|
+
if (settled)
|
|
53
|
+
return;
|
|
54
|
+
settled = true;
|
|
55
|
+
cleanup();
|
|
56
|
+
resolve(success);
|
|
57
|
+
};
|
|
58
|
+
const onAbort = () => finish(false);
|
|
59
|
+
const timer = setTimeout(() => finish(false), timeoutMs);
|
|
60
|
+
signal.addEventListener('abort', onAbort, { once: true });
|
|
61
|
+
try {
|
|
62
|
+
unsubscribe = subscribe?.(finish);
|
|
63
|
+
// A subscriber can settle synchronously before returning its cleanup.
|
|
64
|
+
if (settled)
|
|
65
|
+
cleanup();
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
settled = true;
|
|
69
|
+
cleanup();
|
|
70
|
+
reject(error);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
12
74
|
/** Max retry attempts for the pre-reconnect hook (network may not be ready on wake). */
|
|
13
75
|
const HOOK_RETRY_ATTEMPTS = 3;
|
|
14
76
|
/** Delay between hook retry attempts in ms. */
|
|
@@ -39,36 +101,115 @@ export class VisibilityManager {
|
|
|
39
101
|
* Guards against duplicate reconnects when both the heartbeat and
|
|
40
102
|
* visibilitychange fire in quick succession after wake.
|
|
41
103
|
*/
|
|
42
|
-
|
|
104
|
+
recovery = null;
|
|
105
|
+
missedHeartbeat = false;
|
|
106
|
+
destroyed = false;
|
|
107
|
+
initializedSocket;
|
|
108
|
+
rememberInitialization = () => {
|
|
109
|
+
this.initializedSocket = this.client.clientSocket.socket;
|
|
110
|
+
};
|
|
43
111
|
constructor(client, idleTimer) {
|
|
44
112
|
this.client = client;
|
|
45
113
|
this.idleTimer = idleTimer;
|
|
114
|
+
this.initializedSocket = client.initialized ? client.clientSocket.socket : undefined;
|
|
115
|
+
this.client.on(ClientEvents.INITIALIZED, this.rememberInitialization);
|
|
46
116
|
this.setup();
|
|
47
117
|
}
|
|
48
118
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* do a full cleanup before reconnecting.
|
|
119
|
+
* Explicit recovery replaces the socket immediately. Automatic wake recovery
|
|
120
|
+
* first checks for traffic so timer throttling does not cancel live requests.
|
|
52
121
|
*/
|
|
53
122
|
reconnect() {
|
|
123
|
+
// Explicit reconnect remains usable after close; cancelled automatic work
|
|
124
|
+
// still cannot restart the client or reattach browser recovery listeners.
|
|
125
|
+
this.recovery?.abort();
|
|
126
|
+
const recovery = new AbortController();
|
|
127
|
+
this.recovery = recovery;
|
|
128
|
+
this.finishRecovery(recovery, this.replaceConnection(recovery));
|
|
129
|
+
}
|
|
130
|
+
/** Removes listeners, timers and pending recovery work. */
|
|
131
|
+
destroy() {
|
|
132
|
+
this.destroyed = true;
|
|
133
|
+
this.client.off(ClientEvents.INITIALIZED, this.rememberInitialization);
|
|
134
|
+
this.recovery?.abort();
|
|
135
|
+
this.recovery = null;
|
|
136
|
+
this.missedHeartbeat = false;
|
|
137
|
+
if (typeof document !== 'undefined' && this.visibilityHandler) {
|
|
138
|
+
document.removeEventListener('visibilitychange', this.visibilityHandler);
|
|
139
|
+
}
|
|
140
|
+
this.visibilityHandler = null;
|
|
141
|
+
this.stopHeartbeat();
|
|
142
|
+
}
|
|
143
|
+
finishRecovery(recovery, operation) {
|
|
144
|
+
void operation.catch(error => {
|
|
145
|
+
if (!recovery.signal.aborted) {
|
|
146
|
+
this.client.logger.connection(LogLevel.WARN, 'Wake recovery failed', {}, error);
|
|
147
|
+
}
|
|
148
|
+
}).finally(() => {
|
|
149
|
+
recovery.abort();
|
|
150
|
+
if (this.recovery === recovery)
|
|
151
|
+
this.recovery = null;
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
waitForInitialization(signal) {
|
|
155
|
+
return waitForRecovery(signal, RECOVERY_TIMEOUT_MS, finish => {
|
|
156
|
+
const initialized = () => finish(true);
|
|
157
|
+
const failed = () => finish(false);
|
|
158
|
+
this.client.on(ClientEvents.INITIALIZED, initialized);
|
|
159
|
+
this.client.on(ClientEvents.INITIALIZATION_FAILED, failed);
|
|
160
|
+
return () => {
|
|
161
|
+
this.client.off(ClientEvents.INITIALIZED, initialized);
|
|
162
|
+
this.client.off(ClientEvents.INITIALIZATION_FAILED, failed);
|
|
163
|
+
};
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
async replaceConnection(recovery) {
|
|
54
167
|
const wasInitialized = this.client.initialized;
|
|
168
|
+
// Subscribe before replacing: even synchronous initialization is observable.
|
|
169
|
+
const initialized = this.waitForInitialization(recovery.signal);
|
|
55
170
|
this.client.initialized = false;
|
|
56
171
|
this.client.initializing = false;
|
|
57
172
|
this.client.clientSocket.retireConnection();
|
|
173
|
+
if (recovery.signal.aborted)
|
|
174
|
+
return initialized;
|
|
58
175
|
this.client.clientSocket.connect();
|
|
59
176
|
this.lastHeartbeat = Date.now();
|
|
60
|
-
this.reconnecting = false;
|
|
61
177
|
if (wasInitialized) {
|
|
62
178
|
this.client.emit(ClientEvents.WEBSOCKET_RECONNECTING);
|
|
63
179
|
}
|
|
180
|
+
return initialized;
|
|
64
181
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
182
|
+
waitForTraffic(socket, signal) {
|
|
183
|
+
return waitForRecovery(signal, RECOVERY_TIMEOUT_MS, finish => {
|
|
184
|
+
const token = this.client.context.token;
|
|
185
|
+
const contextChanged = () => {
|
|
186
|
+
if (token !== this.client.context.token)
|
|
187
|
+
finish(false);
|
|
188
|
+
};
|
|
189
|
+
const message = (event) => {
|
|
190
|
+
if (typeof event.data !== 'string')
|
|
191
|
+
return;
|
|
192
|
+
try {
|
|
193
|
+
const envelope = Presentation.decode(event.data);
|
|
194
|
+
if (isServerTraffic(envelope))
|
|
195
|
+
finish(true);
|
|
196
|
+
}
|
|
197
|
+
catch {
|
|
198
|
+
// Malformed frames are not evidence of a working TypeFerry peer.
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
const closed = () => finish(false);
|
|
202
|
+
this.client.on(ClientEvents.CONTEXT_CHANGED, contextChanged);
|
|
203
|
+
socket.addEventListener('message', message);
|
|
204
|
+
socket.addEventListener('close', closed);
|
|
205
|
+
socket.addEventListener('error', closed);
|
|
206
|
+
return () => {
|
|
207
|
+
this.client.off(ClientEvents.CONTEXT_CHANGED, contextChanged);
|
|
208
|
+
socket.removeEventListener('message', message);
|
|
209
|
+
socket.removeEventListener('close', closed);
|
|
210
|
+
socket.removeEventListener('error', closed);
|
|
211
|
+
};
|
|
212
|
+
});
|
|
72
213
|
}
|
|
73
214
|
setup() {
|
|
74
215
|
if (typeof window === 'undefined')
|
|
@@ -92,7 +233,12 @@ export class VisibilityManager {
|
|
|
92
233
|
const gap = now - this.lastHeartbeat;
|
|
93
234
|
this.lastHeartbeat = now;
|
|
94
235
|
if (gap > HEARTBEAT_THRESHOLD_MS) {
|
|
95
|
-
|
|
236
|
+
if (document.visibilityState === 'hidden') {
|
|
237
|
+
this.missedHeartbeat = true;
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
this.handleSleepDetected('heartbeat', gap);
|
|
241
|
+
}
|
|
96
242
|
}
|
|
97
243
|
}, HEARTBEAT_INTERVAL_MS);
|
|
98
244
|
}
|
|
@@ -112,39 +258,110 @@ export class VisibilityManager {
|
|
|
112
258
|
}
|
|
113
259
|
/**
|
|
114
260
|
* Unified entry point for sleep detection from both the heartbeat
|
|
115
|
-
* timer and `visibilitychange`.
|
|
261
|
+
* timer and `visibilitychange`. One recovery owns the full lifecycle to prevent
|
|
116
262
|
* duplicate reconnects when both fire after wake.
|
|
117
263
|
*/
|
|
118
264
|
handleSleepDetected(source, durationMs) {
|
|
119
|
-
if (this.
|
|
265
|
+
if (this.destroyed || this.recovery)
|
|
120
266
|
return;
|
|
121
|
-
|
|
267
|
+
const recovery = new AbortController();
|
|
268
|
+
this.recovery = recovery;
|
|
269
|
+
this.missedHeartbeat = false;
|
|
122
270
|
if (this.client.options?.debug) {
|
|
123
271
|
console.log(`TypeFerry: Sleep detected via ${source} (${Math.round(durationMs / 1000)}s gap), reconnecting`);
|
|
124
272
|
}
|
|
125
|
-
this.runHookAndReconnect();
|
|
273
|
+
this.finishRecovery(recovery, this.runHookAndReconnect(recovery));
|
|
126
274
|
}
|
|
127
275
|
/**
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
276
|
+
* A token change still needs a new handshake. Otherwise delivered traffic
|
|
277
|
+
* allows the existing socket to survive a timer gap without replaying RPCs.
|
|
278
|
+
* Socket identity prevents a late hook/probe from retiring a newer connection.
|
|
131
279
|
*/
|
|
132
|
-
async runHookAndReconnect() {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
280
|
+
async runHookAndReconnect(recovery) {
|
|
281
|
+
const { signal } = recovery;
|
|
282
|
+
const socket = this.client.clientSocket.socket;
|
|
283
|
+
const token = this.client.context.token;
|
|
284
|
+
const hookSucceeded = this.onBeforeReconnect
|
|
285
|
+
? await this.runBeforeReconnect(signal)
|
|
286
|
+
: true;
|
|
287
|
+
if (signal.aborted)
|
|
288
|
+
return;
|
|
289
|
+
const currentSocket = this.client.clientSocket.socket;
|
|
290
|
+
if (!hookSucceeded || this.needsTokenHandshake(socket, token)) {
|
|
291
|
+
await this.replaceConnection(recovery);
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
if (currentSocket !== socket) {
|
|
295
|
+
if (this.initializedSocket !== this.client.clientSocket.socket) {
|
|
296
|
+
await this.waitForInitialization(signal);
|
|
297
|
+
}
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
if (this.client.clientSocket.ready &&
|
|
301
|
+
this.client.initialized &&
|
|
302
|
+
this.initializedSocket === socket &&
|
|
303
|
+
socket) {
|
|
304
|
+
const receivedTraffic = await this.waitForTraffic(socket, signal);
|
|
305
|
+
if (signal.aborted)
|
|
306
|
+
return;
|
|
307
|
+
if (this.needsTokenHandshake(socket, token)) {
|
|
308
|
+
await this.replaceConnection(recovery);
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
if (this.client.clientSocket.socket !== socket) {
|
|
312
|
+
if (this.initializedSocket !== this.client.clientSocket.socket) {
|
|
313
|
+
await this.waitForInitialization(signal);
|
|
144
314
|
}
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
if (receivedTraffic && this.client.clientSocket.ready)
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
// Join transport-owned backoff, handshake or subscription initialization.
|
|
321
|
+
if (this.client.clientSocket.connecting ||
|
|
322
|
+
this.client.clientSocket.socket?.readyState === WebSocketState.CONNECTING ||
|
|
323
|
+
this.client.initializing ||
|
|
324
|
+
(this.client.clientSocket.ready && this.initializedSocket !== currentSocket)) {
|
|
325
|
+
await this.waitForInitialization(signal);
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
await this.replaceConnection(recovery);
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* A competing reconnect may already have adopted the refreshed token. Keep
|
|
332
|
+
* that successor, but never mistake a newer socket for a newer handshake.
|
|
333
|
+
*/
|
|
334
|
+
needsTokenHandshake(previousSocket, previousToken) {
|
|
335
|
+
const token = this.client.context.token;
|
|
336
|
+
if (token === previousToken)
|
|
337
|
+
return false;
|
|
338
|
+
const socket = this.client.clientSocket.socket;
|
|
339
|
+
if (!socket || socket === previousSocket)
|
|
340
|
+
return true;
|
|
341
|
+
return new URL(socket.url).searchParams.get('token') !== (token ?? null);
|
|
342
|
+
}
|
|
343
|
+
async runBeforeReconnect(signal) {
|
|
344
|
+
const hook = this.onBeforeReconnect;
|
|
345
|
+
if (!hook)
|
|
346
|
+
return true;
|
|
347
|
+
for (let attempt = 0; attempt < HOOK_RETRY_ATTEMPTS; attempt++) {
|
|
348
|
+
if (signal.aborted)
|
|
349
|
+
return false;
|
|
350
|
+
try {
|
|
351
|
+
const succeeded = await waitForRecovery(signal, RECOVERY_TIMEOUT_MS, finish => {
|
|
352
|
+
void hook().then(() => finish(true), () => finish(false));
|
|
353
|
+
});
|
|
354
|
+
if (succeeded)
|
|
355
|
+
return true;
|
|
356
|
+
}
|
|
357
|
+
catch {
|
|
358
|
+
// Synchronous hook failures use the same bounded retry as rejections.
|
|
359
|
+
}
|
|
360
|
+
if (attempt < HOOK_RETRY_ATTEMPTS - 1) {
|
|
361
|
+
await waitForRecovery(signal, HOOK_RETRY_DELAY_MS);
|
|
145
362
|
}
|
|
146
363
|
}
|
|
147
|
-
|
|
364
|
+
return false;
|
|
148
365
|
}
|
|
149
366
|
/**
|
|
150
367
|
* Determines whether reconnection is needed and triggers it. Routes
|
|
@@ -155,7 +372,10 @@ export class VisibilityManager {
|
|
|
155
372
|
this.hiddenAt = null;
|
|
156
373
|
const socket = this.client.clientSocket.socket;
|
|
157
374
|
const isConnected = socket?.readyState === WebSocket.OPEN && this.client.initialized;
|
|
158
|
-
const needsReconnect = !isConnected ||
|
|
375
|
+
const needsReconnect = !isConnected ||
|
|
376
|
+
this.missedHeartbeat ||
|
|
377
|
+
Date.now() - this.lastHeartbeat > HEARTBEAT_THRESHOLD_MS ||
|
|
378
|
+
hiddenDuration > FORCE_RECONNECT_THRESHOLD;
|
|
159
379
|
if (needsReconnect) {
|
|
160
380
|
this.handleSleepDetected('visibility', hiddenDuration);
|
|
161
381
|
return;
|
|
@@ -165,9 +385,5 @@ export class VisibilityManager {
|
|
|
165
385
|
this.idleTimer.start();
|
|
166
386
|
}
|
|
167
387
|
}
|
|
168
|
-
/** Promisified delay for hook retry backoff. */
|
|
169
|
-
delay(ms) {
|
|
170
|
-
return new Promise(resolve => setTimeout(resolve, ms));
|
|
171
|
-
}
|
|
172
388
|
}
|
|
173
389
|
//# sourceMappingURL=visibility-manager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visibility-manager.js","sourceRoot":"","sources":["../../src/client/visibility-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAIvC;;;;GAIG;AACH,MAAM,yBAAyB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA,CAAC,SAAS;AAE1D,yDAAyD;AACzD,MAAM,qBAAqB,GAAG,MAAM,CAAA;AAEpC,+EAA+E;AAC/E,MAAM,sBAAsB,GAAG,MAAM,CAAA;AAErC,wFAAwF;AACxF,MAAM,mBAAmB,GAAG,CAAC,CAAA;AAE7B,+CAA+C;AAC/C,MAAM,mBAAmB,GA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