@beatbax/engine 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/audio/playback.d.ts.map +1 -1
- package/dist/audio/playback.js +23 -21
- package/dist/audio/playback.js.map +1 -1
- package/dist/export/jsonExport.d.ts.map +1 -1
- package/dist/export/jsonExport.js +11 -9
- package/dist/export/jsonExport.js.map +1 -1
- package/dist/export/midiExport.d.ts.map +1 -1
- package/dist/export/midiExport.js +13 -11
- package/dist/export/midiExport.js.map +1 -1
- package/dist/export/ugeWriter.d.ts.map +1 -1
- package/dist/export/ugeWriter.js +40 -38
- package/dist/export/ugeWriter.js.map +1 -1
- package/dist/export/wavWriter.d.ts.map +1 -1
- package/dist/export/wavWriter.js +8 -6
- package/dist/export/wavWriter.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -30
- package/dist/index.js.map +1 -1
- package/dist/parser/peggy/index.d.ts.map +1 -1
- package/dist/parser/peggy/index.js +13 -0
- package/dist/parser/peggy/index.js.map +1 -1
- package/dist/song/resolver.d.ts.map +1 -1
- package/dist/song/resolver.js +18 -0
- package/dist/song/resolver.js.map +1 -1
- package/dist/util/diag.d.ts.map +1 -1
- package/dist/util/diag.js +4 -2
- package/dist/util/diag.js.map +1 -1
- package/dist/util/index.d.ts +6 -0
- package/dist/util/index.d.ts.map +1 -0
- package/dist/util/index.js +8 -0
- package/dist/util/index.js.map +1 -0
- package/dist/util/logger.d.ts +115 -0
- package/dist/util/logger.d.ts.map +1 -0
- package/dist/util/logger.js +392 -0
- package/dist/util/logger.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BeatBax Engine Logger
|
|
3
|
+
*
|
|
4
|
+
* Centralized logging utility for BeatBax engine and apps.
|
|
5
|
+
*
|
|
6
|
+
* Features:
|
|
7
|
+
* - Runtime configurable log levels
|
|
8
|
+
* - Module namespaces (webaudio, ui, network, player, sequencer, etc.)
|
|
9
|
+
* - Colorized console output (browser)
|
|
10
|
+
* - Structured logging support
|
|
11
|
+
* - WebAudio tracing helpers
|
|
12
|
+
* - Safe production defaults (error-only)
|
|
13
|
+
* - Works in Node.js and browser environments
|
|
14
|
+
*
|
|
15
|
+
* Usage:
|
|
16
|
+
* ```typescript
|
|
17
|
+
* import { createLogger } from '@beatbax/engine/util/logger';
|
|
18
|
+
*
|
|
19
|
+
* const log = createLogger('player');
|
|
20
|
+
*
|
|
21
|
+
* log.debug('Starting playback');
|
|
22
|
+
* log.info({ event: 'started', duration: 120 });
|
|
23
|
+
* log.warn('Buffer underrun detected');
|
|
24
|
+
* log.error('Failed to initialize audio context', error);
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
// ---------- State ----------
|
|
28
|
+
let config = {
|
|
29
|
+
level: 'error', // Safe production default
|
|
30
|
+
modules: undefined,
|
|
31
|
+
timestamps: true,
|
|
32
|
+
webaudioTrace: false,
|
|
33
|
+
colorize: typeof window !== 'undefined', // Auto-detect browser
|
|
34
|
+
};
|
|
35
|
+
const moduleSet = new Set();
|
|
36
|
+
const levelOrder = ['none', 'error', 'warn', 'info', 'debug'];
|
|
37
|
+
const validLevels = new Set(levelOrder);
|
|
38
|
+
// ---------- Configuration ----------
|
|
39
|
+
/**
|
|
40
|
+
* Validate and return a log level, or return undefined if invalid.
|
|
41
|
+
*/
|
|
42
|
+
function parseLogLevel(value) {
|
|
43
|
+
if (!value)
|
|
44
|
+
return undefined;
|
|
45
|
+
if (validLevels.has(value))
|
|
46
|
+
return value;
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Configure global logging settings.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```typescript
|
|
54
|
+
* configureLogging({
|
|
55
|
+
* level: 'debug',
|
|
56
|
+
* modules: ['player', 'sequencer'],
|
|
57
|
+
* timestamps: true,
|
|
58
|
+
* webaudioTrace: true
|
|
59
|
+
* });
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
export function configureLogging(opts) {
|
|
63
|
+
config = { ...config, ...opts };
|
|
64
|
+
// If modules key is present (even if undefined/[]), rebuild moduleSet from merged config
|
|
65
|
+
// This allows explicit clearing: configureLogging({ modules: [] }) or { modules: undefined }
|
|
66
|
+
if ('modules' in opts) {
|
|
67
|
+
moduleSet.clear();
|
|
68
|
+
if (config.modules && config.modules.length > 0) {
|
|
69
|
+
config.modules.forEach(m => moduleSet.add(m));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
// Only log configuration message if at info level or higher
|
|
73
|
+
if (shouldLog('info')) {
|
|
74
|
+
const method = config.colorize ? console.info : console.log;
|
|
75
|
+
method('[BeatBax] Logging configured:', config);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Load logging configuration from localStorage (browser only).
|
|
80
|
+
* Looks for keys: beatbax:loglevel, beatbax:debug, beatbax:logcolor
|
|
81
|
+
*/
|
|
82
|
+
export function loadLoggingFromStorage() {
|
|
83
|
+
if (typeof localStorage === 'undefined')
|
|
84
|
+
return;
|
|
85
|
+
try {
|
|
86
|
+
const levelStr = localStorage.getItem('beatbax:loglevel');
|
|
87
|
+
const level = parseLogLevel(levelStr);
|
|
88
|
+
const modulesStr = localStorage.getItem('beatbax:debug');
|
|
89
|
+
const modules = modulesStr ? modulesStr.split(',').map(m => m.trim()) : undefined;
|
|
90
|
+
const colorStr = localStorage.getItem('beatbax:logcolor');
|
|
91
|
+
const colorize = colorStr === 'true' ? true : colorStr === 'false' ? false : undefined;
|
|
92
|
+
const webaudioStr = localStorage.getItem('beatbax:webaudio');
|
|
93
|
+
const webaudioTrace = webaudioStr === 'true' ? true : webaudioStr === 'false' ? false : undefined;
|
|
94
|
+
if (level || modules || colorize !== undefined || webaudioTrace !== undefined) {
|
|
95
|
+
configureLogging({
|
|
96
|
+
level: level ?? config.level,
|
|
97
|
+
modules,
|
|
98
|
+
colorize: colorize ?? config.colorize,
|
|
99
|
+
webaudioTrace: webaudioTrace ?? config.webaudioTrace
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
catch (e) {
|
|
104
|
+
// Silently fail if localStorage is unavailable
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Save current logging configuration to localStorage (browser only).
|
|
109
|
+
*/
|
|
110
|
+
export function saveLoggingToStorage() {
|
|
111
|
+
if (typeof localStorage === 'undefined')
|
|
112
|
+
return;
|
|
113
|
+
try {
|
|
114
|
+
localStorage.setItem('beatbax:loglevel', config.level);
|
|
115
|
+
if (config.modules && config.modules.length > 0) {
|
|
116
|
+
localStorage.setItem('beatbax:debug', config.modules.join(','));
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
localStorage.removeItem('beatbax:debug');
|
|
120
|
+
}
|
|
121
|
+
localStorage.setItem('beatbax:logcolor', String(config.colorize));
|
|
122
|
+
localStorage.setItem('beatbax:webaudio', String(config.webaudioTrace));
|
|
123
|
+
}
|
|
124
|
+
catch (e) {
|
|
125
|
+
// Silently fail if localStorage is unavailable
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Load logging configuration from URL query parameters (browser only).
|
|
130
|
+
* Supports: ?loglevel=debug&debug=player,sequencer&logcolor=true
|
|
131
|
+
*/
|
|
132
|
+
export function loadLoggingFromURL() {
|
|
133
|
+
if (typeof window === 'undefined' || typeof URLSearchParams === 'undefined')
|
|
134
|
+
return;
|
|
135
|
+
try {
|
|
136
|
+
const params = new URLSearchParams(window.location.search);
|
|
137
|
+
const levelStr = params.get('loglevel');
|
|
138
|
+
const level = parseLogLevel(levelStr);
|
|
139
|
+
const modulesStr = params.get('debug');
|
|
140
|
+
const modules = modulesStr ? modulesStr.split(',').map(m => m.trim()) : undefined;
|
|
141
|
+
const colorStr = params.get('logcolor');
|
|
142
|
+
const colorize = colorStr === 'true' ? true : colorStr === 'false' ? false : undefined;
|
|
143
|
+
const webaudioStr = params.get('webaudio');
|
|
144
|
+
const webaudioTrace = webaudioStr === 'true' || webaudioStr === '1' ? true : webaudioStr === 'false' || webaudioStr === '0' ? false : undefined;
|
|
145
|
+
if (level || modules || colorize !== undefined || webaudioTrace !== undefined) {
|
|
146
|
+
configureLogging({
|
|
147
|
+
level: level ?? config.level,
|
|
148
|
+
modules,
|
|
149
|
+
colorize: colorize ?? config.colorize,
|
|
150
|
+
webaudioTrace: webaudioTrace ?? config.webaudioTrace
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
catch (e) {
|
|
155
|
+
// Silently fail if URL parsing fails
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Get current logging configuration.
|
|
160
|
+
*/
|
|
161
|
+
export function getLoggingConfig() {
|
|
162
|
+
return { ...config };
|
|
163
|
+
}
|
|
164
|
+
// ---------- Helpers ----------
|
|
165
|
+
function shouldLog(level, module) {
|
|
166
|
+
const levelIndex = levelOrder.indexOf(level);
|
|
167
|
+
const configIndex = levelOrder.indexOf(config.level);
|
|
168
|
+
if (levelIndex > configIndex)
|
|
169
|
+
return false;
|
|
170
|
+
if (module && moduleSet.size > 0 && !moduleSet.has(module))
|
|
171
|
+
return false;
|
|
172
|
+
return true;
|
|
173
|
+
}
|
|
174
|
+
function formatTimestamp() {
|
|
175
|
+
if (!config.timestamps)
|
|
176
|
+
return '';
|
|
177
|
+
const now = new Date();
|
|
178
|
+
const iso = now.toISOString();
|
|
179
|
+
return `${iso} `;
|
|
180
|
+
}
|
|
181
|
+
const colors = {
|
|
182
|
+
default: 'color:#ccc',
|
|
183
|
+
error: 'color:#ff6b6b',
|
|
184
|
+
warn: 'color:#feca57',
|
|
185
|
+
info: 'color:#48dbfb',
|
|
186
|
+
debug: 'color:#1dd1a1',
|
|
187
|
+
};
|
|
188
|
+
function formatArgs(args) {
|
|
189
|
+
return args.map(arg => {
|
|
190
|
+
// If it's a plain object with only data properties, format it nicely
|
|
191
|
+
if (arg && typeof arg === 'object' && arg.constructor === Object) {
|
|
192
|
+
// For structured logging, keep the object intact
|
|
193
|
+
return arg;
|
|
194
|
+
}
|
|
195
|
+
return arg;
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
function output(level, module, args) {
|
|
199
|
+
const prefix = `${formatTimestamp()}[${module ?? 'BeatBax'}]`;
|
|
200
|
+
const formattedArgs = formatArgs(args);
|
|
201
|
+
if (config.colorize) {
|
|
202
|
+
const style = colors[level] ?? colors.default;
|
|
203
|
+
const method = level === 'debug' ? 'log' : level;
|
|
204
|
+
console[method](`%c${prefix}`, style, ...formattedArgs);
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
// Plain text output for Node.js or when colorization is disabled
|
|
208
|
+
const method = level === 'debug' ? 'log' : level;
|
|
209
|
+
console[method](prefix, ...formattedArgs);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
// ---------- Public Logger Factory ----------
|
|
213
|
+
/**
|
|
214
|
+
* Create a namespaced logger for a specific module.
|
|
215
|
+
*
|
|
216
|
+
* @param module - Module name (e.g., 'player', 'sequencer', 'webaudio', 'ui')
|
|
217
|
+
*
|
|
218
|
+
* @example
|
|
219
|
+
* ```typescript
|
|
220
|
+
* const log = createLogger('player');
|
|
221
|
+
*
|
|
222
|
+
* log.debug('Initializing player');
|
|
223
|
+
* log.info({ state: 'playing', position: 0 });
|
|
224
|
+
* log.warn('Buffer underrun', { bufferSize: 2048 });
|
|
225
|
+
* log.error('Audio context error', error);
|
|
226
|
+
* ```
|
|
227
|
+
*/
|
|
228
|
+
export function createLogger(module) {
|
|
229
|
+
return {
|
|
230
|
+
error: (...args) => {
|
|
231
|
+
if (shouldLog('error', module)) {
|
|
232
|
+
output('error', module, args);
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
warn: (...args) => {
|
|
236
|
+
if (shouldLog('warn', module)) {
|
|
237
|
+
output('warn', module, args);
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
info: (...args) => {
|
|
241
|
+
if (shouldLog('info', module)) {
|
|
242
|
+
output('info', module, args);
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
debug: (...args) => {
|
|
246
|
+
if (shouldLog('debug', module)) {
|
|
247
|
+
output('debug', module, args);
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
// ---------- WebAudio Tracing Helpers ----------
|
|
253
|
+
/**
|
|
254
|
+
* Trace AudioNode creation (only when webaudioTrace is enabled).
|
|
255
|
+
*/
|
|
256
|
+
export function traceNodeCreation(node, name) {
|
|
257
|
+
if (!config.webaudioTrace)
|
|
258
|
+
return;
|
|
259
|
+
if (config.colorize) {
|
|
260
|
+
console.log('%c[WebAudio] Node created:', 'color:#9b59b6', name ?? node.constructor.name, node);
|
|
261
|
+
}
|
|
262
|
+
else {
|
|
263
|
+
console.log('[WebAudio] Node created:', name ?? node.constructor.name, node);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Trace AudioNode connections (only when webaudioTrace is enabled).
|
|
268
|
+
*/
|
|
269
|
+
export function traceConnection(src, dest) {
|
|
270
|
+
if (!config.webaudioTrace)
|
|
271
|
+
return;
|
|
272
|
+
const destName = dest.constructor?.name ?? 'AudioParam';
|
|
273
|
+
if (config.colorize) {
|
|
274
|
+
console.log('%c[WebAudio] Connect:', 'color:#9b59b6', src.constructor.name, '->', destName);
|
|
275
|
+
}
|
|
276
|
+
else {
|
|
277
|
+
console.log('[WebAudio] Connect:', src.constructor.name, '->', destName);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Trace AudioNode disconnection (only when webaudioTrace is enabled).
|
|
282
|
+
*/
|
|
283
|
+
export function traceDisconnect(node) {
|
|
284
|
+
if (!config.webaudioTrace)
|
|
285
|
+
return;
|
|
286
|
+
if (config.colorize) {
|
|
287
|
+
console.log('%c[WebAudio] Disconnect:', 'color:#9b59b6', node.constructor.name);
|
|
288
|
+
}
|
|
289
|
+
else {
|
|
290
|
+
console.log('[WebAudio] Disconnect:', node.constructor.name);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
if (typeof window !== 'undefined') {
|
|
294
|
+
window.beatbaxDebug = {
|
|
295
|
+
/**
|
|
296
|
+
* Set global log level (applies immediately, no reload).
|
|
297
|
+
* @example window.beatbaxDebug.setLevel('debug')
|
|
298
|
+
*/
|
|
299
|
+
setLevel(level) {
|
|
300
|
+
if (!validLevels.has(level)) {
|
|
301
|
+
console.warn(`[BeatBax] Invalid log level: "${level}". Valid levels: ${levelOrder.join(', ')}`);
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
configureLogging({ level });
|
|
305
|
+
saveLoggingToStorage();
|
|
306
|
+
},
|
|
307
|
+
/**
|
|
308
|
+
* Enable debug logging for specific modules (applies immediately, no reload).
|
|
309
|
+
* If no modules specified, enables all modules.
|
|
310
|
+
* @example window.beatbaxDebug.enable('player', 'ui', 'sequencer')
|
|
311
|
+
*/
|
|
312
|
+
enable(...modules) {
|
|
313
|
+
if (modules.length === 0) {
|
|
314
|
+
// Enable all modules
|
|
315
|
+
configureLogging({ modules: undefined });
|
|
316
|
+
}
|
|
317
|
+
else {
|
|
318
|
+
// Merge with existing modules
|
|
319
|
+
const currentModules = config.modules ? [...config.modules] : [];
|
|
320
|
+
const allModules = [...new Set([...currentModules, ...modules])];
|
|
321
|
+
configureLogging({ modules: allModules });
|
|
322
|
+
}
|
|
323
|
+
saveLoggingToStorage();
|
|
324
|
+
},
|
|
325
|
+
/**
|
|
326
|
+
* Disable specific modules or all if none specified (applies immediately, no reload).
|
|
327
|
+
* @example window.beatbaxDebug.disable('parser')
|
|
328
|
+
* @example window.beatbaxDebug.disable() // Disable all module filtering
|
|
329
|
+
*/
|
|
330
|
+
disable(...modules) {
|
|
331
|
+
if (modules.length === 0) {
|
|
332
|
+
// Disable all module filtering
|
|
333
|
+
configureLogging({ modules: undefined });
|
|
334
|
+
}
|
|
335
|
+
else {
|
|
336
|
+
// Remove specified modules from current list
|
|
337
|
+
const currentModules = config.modules ? [...config.modules] : [];
|
|
338
|
+
const remainingModules = currentModules.filter(m => !modules.includes(m));
|
|
339
|
+
configureLogging({ modules: remainingModules.length > 0 ? remainingModules : undefined });
|
|
340
|
+
}
|
|
341
|
+
saveLoggingToStorage();
|
|
342
|
+
},
|
|
343
|
+
/**
|
|
344
|
+
* Reset to default configuration (applies immediately, no reload).
|
|
345
|
+
* @example window.beatbaxDebug.reset()
|
|
346
|
+
*/
|
|
347
|
+
reset() {
|
|
348
|
+
configureLogging({
|
|
349
|
+
level: 'error',
|
|
350
|
+
modules: undefined,
|
|
351
|
+
timestamps: true,
|
|
352
|
+
webaudioTrace: false,
|
|
353
|
+
colorize: typeof window !== 'undefined',
|
|
354
|
+
});
|
|
355
|
+
if (typeof localStorage !== 'undefined') {
|
|
356
|
+
localStorage.removeItem('beatbax:loglevel');
|
|
357
|
+
localStorage.removeItem('beatbax:debug');
|
|
358
|
+
localStorage.removeItem('beatbax:logcolor');
|
|
359
|
+
localStorage.removeItem('beatbax:webaudio');
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
/**
|
|
363
|
+
* Enable/disable WebAudio tracing (applies immediately, no reload).
|
|
364
|
+
* @example window.beatbaxDebug.webaudio(true)
|
|
365
|
+
*/
|
|
366
|
+
webaudio(enabled) {
|
|
367
|
+
configureLogging({ webaudioTrace: enabled });
|
|
368
|
+
saveLoggingToStorage();
|
|
369
|
+
},
|
|
370
|
+
/**
|
|
371
|
+
* Enable/disable colorization (applies immediately, no reload).
|
|
372
|
+
* @example window.beatbaxDebug.colorize(true)
|
|
373
|
+
*/
|
|
374
|
+
colorize(enabled) {
|
|
375
|
+
configureLogging({ colorize: enabled });
|
|
376
|
+
saveLoggingToStorage();
|
|
377
|
+
},
|
|
378
|
+
/**
|
|
379
|
+
* Get current logging configuration.
|
|
380
|
+
* @example window.beatbaxDebug.config()
|
|
381
|
+
*/
|
|
382
|
+
config() {
|
|
383
|
+
return getLoggingConfig();
|
|
384
|
+
},
|
|
385
|
+
};
|
|
386
|
+
// Auto-initialize from storage and URL
|
|
387
|
+
loadLoggingFromStorage();
|
|
388
|
+
loadLoggingFromURL();
|
|
389
|
+
}
|
|
390
|
+
// ---------- Export everything ----------
|
|
391
|
+
export default createLogger;
|
|
392
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/util/logger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAmBH,8BAA8B;AAC9B,IAAI,MAAM,GAAiB;IACzB,KAAK,EAAE,OAAO,EAAE,0BAA0B;IAC1C,OAAO,EAAE,SAAS;IAClB,UAAU,EAAE,IAAI;IAChB,aAAa,EAAE,KAAK;IACpB,QAAQ,EAAE,OAAO,MAAM,KAAK,WAAW,EAAE,sBAAsB;CAChE,CAAC;AAEF,MAAM,SAAS,GAAG,IAAI,GAAG,EAAU,CAAC;AAEpC,MAAM,UAAU,GAAe,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAC1E,MAAM,WAAW,GAAG,IAAI,GAAG,CAAS,UAAU,CAAC,CAAC;AAEhD,sCAAsC;AAEtC;;GAEG;AACH,SAAS,aAAa,CAAC,KAAgC;IACrD,IAAI,CAAC,KAAK;QAAE,OAAO,SAAS,CAAC;IAC7B,IAAI,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC;QAAE,OAAO,KAAiB,CAAC;IACrD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAA2B;IAC1D,MAAM,GAAG,E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