@yaks/esbuild 0.0.0-stage → 0.2.36
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/LICENSE +202 -0
- package/README.md +450 -2
- package/_dist/bundle.d.ts +6 -0
- package/_dist/bundle.d.ts.map +1 -0
- package/_dist/compile.d.ts +72 -0
- package/_dist/compile.d.ts.map +1 -0
- package/_dist/dependencies.d.ts +15 -0
- package/_dist/dependencies.d.ts.map +1 -0
- package/_dist/file.d.ts +185 -0
- package/_dist/file.d.ts.map +1 -0
- package/_dist/graph.d.ts +104 -0
- package/_dist/graph.d.ts.map +1 -0
- package/_dist/home.d.ts +15 -0
- package/_dist/home.d.ts.map +1 -0
- package/_dist/link.d.ts +192 -0
- package/_dist/link.d.ts.map +1 -0
- package/_dist/lock.d.ts +30 -0
- package/_dist/lock.d.ts.map +1 -0
- package/_dist/mod.d.ts +6 -0
- package/_dist/mod.d.ts.map +1 -0
- package/_dist/pack.d.ts +42 -0
- package/_dist/pack.d.ts.map +1 -0
- package/_dist/package.d.ts +11 -0
- package/_dist/package.d.ts.map +1 -0
- package/_dist/plan.d.ts +135 -0
- package/_dist/plan.d.ts.map +1 -0
- package/_dist/platform.d.ts +27 -0
- package/_dist/platform.d.ts.map +1 -0
- package/_dist/resolve.d.ts +42 -0
- package/_dist/resolve.d.ts.map +1 -0
- package/_dist/shelf.d.ts +11 -0
- package/_dist/shelf.d.ts.map +1 -0
- package/_dist/strip.d.ts +51 -0
- package/_dist/strip.d.ts.map +1 -0
- package/_dist/timing.d.ts +6 -0
- package/_dist/timing.d.ts.map +1 -0
- package/_dist/unpack.d.ts +14 -0
- package/_dist/unpack.d.ts.map +1 -0
- package/analysis.js +72 -0
- package/analysis.js.map +1 -0
- package/analysis.ts +82 -0
- package/bundle.js +320 -0
- package/bundle.js.map +1 -0
- package/bundle.ts +415 -0
- package/common.js +129 -0
- package/common.js.map +1 -0
- package/common.ts +138 -0
- package/compile.js +500 -0
- package/compile.js.map +1 -0
- package/compile.ts +622 -0
- package/container.js +142 -0
- package/container.js.map +1 -0
- package/container.ts +183 -0
- package/deno.json +1 -0
- package/dependencies.js +31 -0
- package/dependencies.js.map +1 -0
- package/dependencies.ts +40 -0
- package/file.js +303 -0
- package/file.js.map +1 -0
- package/file.ts +443 -0
- package/forward.ts +49 -0
- package/graph.js +297 -0
- package/graph.js.map +1 -0
- package/graph.ts +360 -0
- package/home.js +40 -0
- package/home.js.map +1 -0
- package/home.ts +52 -0
- package/link.js +455 -0
- package/link.js.map +1 -0
- package/link.ts +596 -0
- package/lock.js +129 -0
- package/lock.js.map +1 -0
- package/lock.ts +161 -0
- package/mod.js +14 -0
- package/mod.js.map +1 -0
- package/mod.ts +43 -0
- package/npm.js +362 -0
- package/npm.js.map +1 -0
- package/npm.ts +429 -0
- package/pack.js +188 -0
- package/pack.js.map +1 -0
- package/pack.ts +225 -0
- package/package.js +199 -0
- package/package.js.map +1 -0
- package/package.json +60 -4
- package/package.ts +255 -0
- package/plan.js +273 -0
- package/plan.js.map +1 -0
- package/plan.ts +395 -0
- package/platform.js +160 -0
- package/platform.js.map +1 -0
- package/platform.ts +238 -0
- package/resolve.js +86 -0
- package/resolve.js.map +1 -0
- package/resolve.ts +144 -0
- package/said.js +44 -0
- package/said.js.map +1 -0
- package/said.ts +61 -0
- package/serve.ts +37 -0
- package/sha256.js +7 -0
- package/sha256.js.map +1 -0
- package/sha256.ts +10 -0
- package/shared.js +646 -0
- package/shared.js.map +1 -0
- package/shared.ts +813 -0
- package/shelf.js +73 -0
- package/shelf.js.map +1 -0
- package/shelf.ts +110 -0
- package/strip.js +114 -0
- package/strip.js.map +1 -0
- package/strip.ts +117 -0
- package/tar.js +87 -0
- package/tar.js.map +1 -0
- package/tar.ts +99 -0
- package/timing.js +37 -0
- package/timing.js.map +1 -0
- package/timing.ts +71 -0
- package/unpack.js +40 -0
- package/unpack.js.map +1 -0
- package/unpack.ts +60 -0
- package/used.js +91 -0
- package/used.js.map +1 -0
- package/used.ts +116 -0
package/bundle.js
ADDED
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
// One esbuild build over a compile's files (./npm.ts `Files`), the way
|
|
2
|
+
// @cloudflare/worker-bundler 0.2.4 ran it, so an app compiles to the bytes it
|
|
3
|
+
// compiled to when yak-esbuild ran worker-bundler in workerd: the same esbuild
|
|
4
|
+
// release (0.28.1), options, namespace and resolution. esbuild here is native,
|
|
5
|
+
// a process of its own beside this one, where worker-bundler ran it as
|
|
6
|
+
// WebAssembly inside the isolate.
|
|
7
|
+
//
|
|
8
|
+
// Every file a build reads comes out of the files, in the `virtual` namespace
|
|
9
|
+
// (an error names `virtual:main.ts`, and ./said.ts strips it). A relative
|
|
10
|
+
// import tries the path, then each extension, then an index file. A package
|
|
11
|
+
// import reads the package's package.json: its `exports` for the target
|
|
12
|
+
// environment and import kind, then `module` and `main`, then an index file. An
|
|
13
|
+
// import that resolves to nothing, or a `cloudflare:` one, is left an import,
|
|
14
|
+
// for ./compile.ts to judge.
|
|
15
|
+
import * as esbuild from "esbuild";
|
|
16
|
+
import { legacy, resolve } from "resolve.exports";
|
|
17
|
+
import { owner } from "./common.js";
|
|
18
|
+
import { packageOf, TRIES } from "./graph.js";
|
|
19
|
+
import { moved as rewrite } from "./platform.js";
|
|
20
|
+
/** esbuild's process ended under a build. That is the compiler's room, not
|
|
21
|
+
* the app's code: a process killed for memory ends this way, and so does one
|
|
22
|
+
* stopped with the container it runs in. */ export class Stopped extends Error {
|
|
23
|
+
name = 'Stopped';
|
|
24
|
+
}
|
|
25
|
+
let PACKAGE_TRIES = [
|
|
26
|
+
...TRIES,
|
|
27
|
+
'.json'
|
|
28
|
+
];
|
|
29
|
+
// A path, else the path with each extension, else its index file.
|
|
30
|
+
let tried = (files, path, tries)=>{
|
|
31
|
+
path = path.replace(/^\.\//, '').replace(/\/+/g, '/').replace(/\/$/, '');
|
|
32
|
+
return [
|
|
33
|
+
path,
|
|
34
|
+
...tries.map((ext)=>path + ext),
|
|
35
|
+
...tries.map((ext)=>`${path}/index${ext}`)
|
|
36
|
+
].find((p)=>files.read(p) != null);
|
|
37
|
+
};
|
|
38
|
+
// `dir` joined to a relative path, `..` popping a segment.
|
|
39
|
+
let joined = (dir, path)=>{
|
|
40
|
+
let parts = dir ? dir.split('/') : [];
|
|
41
|
+
for (let part of path.split('/')){
|
|
42
|
+
if (part == '..') parts.pop();
|
|
43
|
+
else if (part != '.') parts.push(part);
|
|
44
|
+
}
|
|
45
|
+
return parts.join('/');
|
|
46
|
+
};
|
|
47
|
+
let inside = (name, path)=>`node_modules/${name}/${path.replace(/^\.?\//, '')}`;
|
|
48
|
+
/** The file a package import names, or undefined when the package is not
|
|
49
|
+
* installed or names no file. Throws for a package.json that is not JSON. */ export let packaged = (files, spec, { node = false, require = false } = {})=>{
|
|
50
|
+
let name = packageOf(spec);
|
|
51
|
+
if (!name) return;
|
|
52
|
+
let manifest = files.read(`node_modules/${name}/package.json`);
|
|
53
|
+
if (manifest == null) return;
|
|
54
|
+
let pkg = JSON.parse(manifest);
|
|
55
|
+
let subpath = spec.slice(name.length + 1);
|
|
56
|
+
try {
|
|
57
|
+
let [hit] = resolve(pkg, subpath ? `./${subpath}` : '.', {
|
|
58
|
+
browser: !node,
|
|
59
|
+
require
|
|
60
|
+
}) ?? [];
|
|
61
|
+
if (hit && files.read(inside(name, hit)) != null) return inside(name, hit);
|
|
62
|
+
} catch {
|
|
63
|
+
// An exports map hides paths it does not declare.
|
|
64
|
+
}
|
|
65
|
+
if (pkg.exports != null) return;
|
|
66
|
+
let main = subpath ? undefined : legacy(pkg, {
|
|
67
|
+
fields: [
|
|
68
|
+
'module',
|
|
69
|
+
'main'
|
|
70
|
+
]
|
|
71
|
+
});
|
|
72
|
+
if (typeof main == 'string' && files.read(inside(name, main)) != null) {
|
|
73
|
+
return inside(name, main);
|
|
74
|
+
}
|
|
75
|
+
return tried(files, `node_modules/${name}${subpath ? `/${subpath}` : ''}`, PACKAGE_TRIES);
|
|
76
|
+
};
|
|
77
|
+
// esbuild types a `.js`, `.jsx`, `.ts` or `.tsx` file by the `type` of the
|
|
78
|
+
// package.json above it only when its own resolver found the file; a file a
|
|
79
|
+
// plugin found it types by its extension alone. The type decides what an ES
|
|
80
|
+
// module's default import of CommonJS reads: `module.exports` from a module
|
|
81
|
+
// Node types as an ES module, as Node reads it, and otherwise the
|
|
82
|
+
// `exports.default` that CommonJS transpiled from an ES module claims with
|
|
83
|
+
// `__esModule`, often nothing. tslib's ES module entry, `modules/index.js`
|
|
84
|
+
// under `"type": "module"`, imports `../tslib.js` by default and destructures
|
|
85
|
+
// it. So a package file Node types as an ES module is named to esbuild with
|
|
86
|
+
// `.mjs` after its path, and every path esbuild hands back is its own again.
|
|
87
|
+
// An app's own files keep the reading they were written for.
|
|
88
|
+
let TYPED = /\.(?:js|jsx|ts|tsx)$/;
|
|
89
|
+
let MJS = '.mjs';
|
|
90
|
+
/** The name esbuild reads a package's file by: its path, with `.mjs` after it
|
|
91
|
+
* when the nearest package.json within the package says `"type": "module"`.
|
|
92
|
+
*
|
|
93
|
+
* ```ts
|
|
94
|
+
* import { assertEquals } from '@std/assert'
|
|
95
|
+
* let files = {
|
|
96
|
+
* 'package.json': '{"type":"module"}',
|
|
97
|
+
* 'node_modules/tslib/package.json': '{}',
|
|
98
|
+
* 'node_modules/tslib/modules/package.json': '{"type":"module"}',
|
|
99
|
+
* 'node_modules/@yaks/kit/package.json': '{"type":"module"}',
|
|
100
|
+
* }
|
|
101
|
+
* let fs = { read: (path: string) => files[path as keyof typeof files] ?? null }
|
|
102
|
+
* let names = (paths: string[]) => paths.map((path) => typedName(fs, path))
|
|
103
|
+
* assertEquals(
|
|
104
|
+
* names([
|
|
105
|
+
* 'node_modules/tslib/modules/index.js',
|
|
106
|
+
* 'node_modules/tslib/tslib.js',
|
|
107
|
+
* 'node_modules/@yaks/kit/a/mod.ts',
|
|
108
|
+
* 'node_modules/@yaks/kit/style.css',
|
|
109
|
+
* 'node_modules/@yaks/kit/b.cjs',
|
|
110
|
+
* 'main.js',
|
|
111
|
+
* ]),
|
|
112
|
+
* [
|
|
113
|
+
* 'node_modules/tslib/modules/index.js.mjs',
|
|
114
|
+
* 'node_modules/tslib/tslib.js',
|
|
115
|
+
* 'node_modules/@yaks/kit/a/mod.ts.mjs',
|
|
116
|
+
* 'node_modules/@yaks/kit/style.css',
|
|
117
|
+
* 'node_modules/@yaks/kit/b.cjs',
|
|
118
|
+
* 'main.js',
|
|
119
|
+
* ],
|
|
120
|
+
* )
|
|
121
|
+
* assertEquals(
|
|
122
|
+
* plain(fs, 'node_modules/tslib/modules/index.js.mjs'),
|
|
123
|
+
* 'node_modules/tslib/modules/index.js',
|
|
124
|
+
* )
|
|
125
|
+
* assertEquals(plain(fs, 'node_modules/tslib/x.mjs'), 'node_modules/tslib/x.mjs')
|
|
126
|
+
* ```
|
|
127
|
+
*/ export let typedName = (files, path)=>{
|
|
128
|
+
let name = owner(path);
|
|
129
|
+
if (!name || !TYPED.test(path)) return path;
|
|
130
|
+
let top = `node_modules/${name}`;
|
|
131
|
+
for(let dir = path.slice(0, path.lastIndexOf('/')); dir.startsWith(top); dir = dir.slice(0, dir.lastIndexOf('/'))){
|
|
132
|
+
let manifest = files.read(`${dir}/package.json`);
|
|
133
|
+
if (manifest == null) continue;
|
|
134
|
+
try {
|
|
135
|
+
return JSON.parse(manifest).type == 'module' ? path + MJS : path;
|
|
136
|
+
} catch {
|
|
137
|
+
return path;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return path;
|
|
141
|
+
};
|
|
142
|
+
/** The path a name esbuild reads by stands for ({@link typedName}). */ export let plain = (files, name)=>{
|
|
143
|
+
let path = name.slice(0, -MJS.length);
|
|
144
|
+
return name.endsWith(MJS) && typedName(files, path) == name ? path : name;
|
|
145
|
+
};
|
|
146
|
+
let loader = (path)=>/\.[mc]?ts$/.test(path) ? 'ts' : path.endsWith('.tsx') ? 'tsx' : path.endsWith('.jsx') ? 'jsx' : path.endsWith('.json') ? 'json' : path.endsWith('.css') ? 'css' : 'js';
|
|
147
|
+
let virtual = (files, { external, alias, packages, moved, node = false, loader: every })=>({
|
|
148
|
+
name: 'virtual-fs',
|
|
149
|
+
setup (build) {
|
|
150
|
+
let found = (path)=>({
|
|
151
|
+
path: typedName(files, path),
|
|
152
|
+
namespace: 'virtual'
|
|
153
|
+
});
|
|
154
|
+
let left = (path)=>({
|
|
155
|
+
path,
|
|
156
|
+
external: true
|
|
157
|
+
});
|
|
158
|
+
build.onResolve({
|
|
159
|
+
filter: /.*/
|
|
160
|
+
}, ({ kind, path, resolveDir, importer: name, with: attributes })=>{
|
|
161
|
+
let importer = plain(files, name);
|
|
162
|
+
if (kind == 'entry-point') return found(path);
|
|
163
|
+
path = packages?.[path] ?? path;
|
|
164
|
+
let other = alias?.(path, importer, kind);
|
|
165
|
+
if (other) return found(other);
|
|
166
|
+
let url = external?.(path, importer, attributes);
|
|
167
|
+
if (url) return left(url);
|
|
168
|
+
if (path.startsWith('.')) {
|
|
169
|
+
let hit = tried(files, joined(resolveDir.replace(/^\//, ''), path), TRIES);
|
|
170
|
+
return hit ? found(hit) : left(path);
|
|
171
|
+
}
|
|
172
|
+
if (path.startsWith('/')) {
|
|
173
|
+
return files.read(path.slice(1)) != null ? found(path.slice(1)) : left(path);
|
|
174
|
+
}
|
|
175
|
+
if (path.startsWith('cloudflare:')) return left(path);
|
|
176
|
+
try {
|
|
177
|
+
let hit = packaged(files, path, {
|
|
178
|
+
node,
|
|
179
|
+
require: kind == 'require-call' || kind == 'require-resolve'
|
|
180
|
+
});
|
|
181
|
+
if (hit) return found(hit);
|
|
182
|
+
} catch {
|
|
183
|
+
// A package.json that is not JSON resolves nothing.
|
|
184
|
+
}
|
|
185
|
+
return left(path);
|
|
186
|
+
});
|
|
187
|
+
build.onLoad({
|
|
188
|
+
filter: /.*/,
|
|
189
|
+
namespace: 'virtual'
|
|
190
|
+
}, (args)=>{
|
|
191
|
+
let path = plain(files, args.path);
|
|
192
|
+
let contents = files.read(path);
|
|
193
|
+
if (contents == null) {
|
|
194
|
+
return {
|
|
195
|
+
errors: [
|
|
196
|
+
{
|
|
197
|
+
text: `File not found: ${path}`
|
|
198
|
+
}
|
|
199
|
+
]
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
if (moved && path.startsWith('node_modules/') && /\.[mc]?[jt]sx?$/.test(path)) {
|
|
203
|
+
try {
|
|
204
|
+
contents = rewrite(contents, ()=>moved(path));
|
|
205
|
+
} catch {
|
|
206
|
+
// esbuild names the syntax error.
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
return {
|
|
210
|
+
contents,
|
|
211
|
+
loader: args.with.type == 'text' ? 'text' : every ?? loader(path),
|
|
212
|
+
resolveDir: path.slice(0, Math.max(0, path.lastIndexOf('/')))
|
|
213
|
+
};
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
// What esbuild's JS API rejects with once its process is gone: "was stopped"
|
|
218
|
+
// for the builds it was running, "is no longer running" for any after.
|
|
219
|
+
let GONE = /^The service (?:was stopped|is no longer running)/;
|
|
220
|
+
/** Build one entry into an ES module, or named entries with shared chunks.
|
|
221
|
+
* Throws esbuild's
|
|
222
|
+
* failure, whose `errors` ./said.ts reads, or {@link Stopped}, after which
|
|
223
|
+
* the next build starts esbuild afresh. */ export let bundle = async (files, entry, options = {})=>{
|
|
224
|
+
for (let path of typeof entry == 'string' ? [
|
|
225
|
+
entry
|
|
226
|
+
] : Object.values(entry)){
|
|
227
|
+
if (files.read(path) == null) throw new Error(`${path}: no such file`);
|
|
228
|
+
}
|
|
229
|
+
try {
|
|
230
|
+
return await built(files, entry, options);
|
|
231
|
+
} catch (e) {
|
|
232
|
+
if (!GONE.test(e?.message)) throw e;
|
|
233
|
+
await esbuild.stop();
|
|
234
|
+
throw new Stopped(`esbuild's process ended while building ${entry}`);
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
// An emitted file's name, as `Built.files` keys it.
|
|
238
|
+
let named = (path)=>path.slice(path.lastIndexOf('/') + 1);
|
|
239
|
+
let built = async (files, entry, options)=>{
|
|
240
|
+
let { node = false, minify = false, define, graph = false } = options;
|
|
241
|
+
let out = await esbuild.build({
|
|
242
|
+
entryPoints: typeof entry == 'string' ? [
|
|
243
|
+
entry
|
|
244
|
+
] : entry,
|
|
245
|
+
bundle: true,
|
|
246
|
+
write: false,
|
|
247
|
+
format: 'esm',
|
|
248
|
+
platform: node ? 'node' : 'browser',
|
|
249
|
+
target: 'es2022',
|
|
250
|
+
...options.jsxImportSource ? {
|
|
251
|
+
jsx: 'automatic',
|
|
252
|
+
jsxImportSource: options.jsxImportSource
|
|
253
|
+
} : {},
|
|
254
|
+
minify,
|
|
255
|
+
plugins: [
|
|
256
|
+
virtual(files, options)
|
|
257
|
+
],
|
|
258
|
+
...typeof entry == 'string' ? {
|
|
259
|
+
outfile: 'bundle.js'
|
|
260
|
+
} : {
|
|
261
|
+
outdir: '/output',
|
|
262
|
+
splitting: true,
|
|
263
|
+
chunkNames: 'chunk-[hash]'
|
|
264
|
+
},
|
|
265
|
+
// A plugin's relative resolveDir is taken from here, as esbuild-wasm took
|
|
266
|
+
// it from its own root: `node_modules/x/dist` is `/node_modules/x/dist`.
|
|
267
|
+
absWorkingDir: '/',
|
|
268
|
+
// Errors and warnings come back in the answer; nothing is printed.
|
|
269
|
+
logLevel: 'silent',
|
|
270
|
+
metafile: graph,
|
|
271
|
+
...define ? {
|
|
272
|
+
define
|
|
273
|
+
} : {}
|
|
274
|
+
}).catch((e)=>{
|
|
275
|
+
for (let m of [
|
|
276
|
+
...e?.errors ?? [],
|
|
277
|
+
...e?.warnings ?? []
|
|
278
|
+
])placed(files, m);
|
|
279
|
+
throw e;
|
|
280
|
+
});
|
|
281
|
+
out.warnings.forEach((w)=>placed(files, w));
|
|
282
|
+
return {
|
|
283
|
+
code: out.outputFiles[0].text,
|
|
284
|
+
files: Object.fromEntries(out.outputFiles.map((file)=>[
|
|
285
|
+
named(file.path),
|
|
286
|
+
file.text
|
|
287
|
+
])),
|
|
288
|
+
warnings: out.warnings.map((w)=>w.text),
|
|
289
|
+
...out.metafile ? {
|
|
290
|
+
inputs: inputs(files, out.metafile),
|
|
291
|
+
exports: Object.fromEntries(Object.entries(out.metafile.outputs).map(([path, { exports }])=>[
|
|
292
|
+
named(path),
|
|
293
|
+
exports
|
|
294
|
+
]))
|
|
295
|
+
} : {}
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
// A path esbuild names, in the `virtual:` namespace every file is read in,
|
|
299
|
+
// as the path it stands for.
|
|
300
|
+
let bare = (files, path)=>plain(files, path.replace(/^virtual:/, ''));
|
|
301
|
+
// A message's file as the path it stands for, keeping its namespace for
|
|
302
|
+
// ./said.ts.
|
|
303
|
+
let placed = (files, message)=>{
|
|
304
|
+
let at = message.location;
|
|
305
|
+
if (at?.file.startsWith('virtual:')) {
|
|
306
|
+
at.file = `virtual:${bare(files, at.file)}`;
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
let inputs = (files, meta)=>Object.fromEntries(Object.entries(meta.inputs).map(([path, input])=>[
|
|
310
|
+
bare(files, path),
|
|
311
|
+
{
|
|
312
|
+
format: input.format,
|
|
313
|
+
imports: input.imports.map((i)=>({
|
|
314
|
+
...i,
|
|
315
|
+
path: bare(files, i.path)
|
|
316
|
+
}))
|
|
317
|
+
}
|
|
318
|
+
]));
|
|
319
|
+
/** Stop esbuild's process, which otherwise outlives the last build. */ export let stop = ()=>esbuild.stop();
|
|
320
|
+
//# sourceMappingURL=bundle.js.map
|
package/bundle.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle.js","sources":["./bundle.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,8EAA8E;AAC9E,+EAA+E;AAC/E,+EAA+E;AAC/E,uEAAuE;AACvE,kCAAkC;AAClC,EAAE;AACF,8EAA8E;AAC9E,0EAA0E;AAC1E,4EAA4E;AAC5E,wE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