@maka/maka-cli 5.96.0 → 5.99.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. package/bundle/typescript/package.json +1 -1
  2. package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.d.ts +9 -0
  3. package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.js +33 -1
  4. package/bundle/typescript/src/commands/game/sideQuest/commands/sheet.js.map +1 -1
  5. package/bundle/typescript/src/commands/game/sideQuest/factories/chargen-factory.d.ts +13 -0
  6. package/bundle/typescript/src/commands/game/sideQuest/factories/chargen-factory.js +29 -4
  7. package/bundle/typescript/src/commands/game/sideQuest/factories/chargen-factory.js.map +1 -1
  8. package/bundle/typescript/src/commands/game/sideQuest/game.js +11 -0
  9. package/bundle/typescript/src/commands/game/sideQuest/game.js.map +1 -1
  10. package/bundle/typescript/src/commands/game/sideQuest/types/save-file.d.ts +5 -1
  11. package/bundle/typescript/src/commands/game/sideQuest/utilities/web-character-generator.d.ts +12 -0
  12. package/bundle/typescript/src/commands/game/sideQuest/utilities/web-character-generator.js +16 -0
  13. package/bundle/typescript/src/commands/game/sideQuest/utilities/web-character-generator.js.map +1 -1
  14. package/bundle/typescript/src/commands/update.js +4 -2
  15. package/bundle/typescript/src/commands/update.js.map +1 -1
  16. package/bundle/typescript/src/tools/self-update/binary-install.d.ts +138 -36
  17. package/bundle/typescript/src/tools/self-update/binary-install.js +243 -43
  18. package/bundle/typescript/src/tools/self-update/binary-install.js.map +1 -1
  19. package/bundle/typescript/src/tools/self-update/update-maka.d.ts +1 -0
  20. package/bundle/typescript/src/tools/self-update/update-maka.js +289 -16
  21. package/bundle/typescript/src/tools/self-update/update-maka.js.map +1 -1
  22. package/package.json +1 -1
@@ -1,15 +1,24 @@
1
- // `maka update maka --binary`: an npm install opting INTO the binary
2
- // distribution self-update.ts already serves packaged executables from.
3
- // This file is the new entry condition, not a second copy of that
4
- // machinery -- fetchLatestRelease/assetNameFor/downloadAsset/sha256Hex/
5
- // digestMatches/extractArchive/swapPlanFor/executeSwapPlan all come from
6
- // self-update.ts unmodified; installBinaryOverNpmGlobal() below only
7
- // decides WHERE they run and what happens around them.
1
+ // The two shape switches of `maka update maka`: `--binary` (an npm install
2
+ // opting INTO the binary distribution self-update.ts already serves
3
+ // packaged executables from) and `--npm` (the same trip back). This file is
4
+ // the new entry condition for both, not a second copy of that machinery --
5
+ // fetchLatestRelease/assetNameFor/downloadAsset/sha256Hex/digestMatches/
6
+ // extractArchive/swapPlanFor/executeSwapPlan all come from self-update.ts
7
+ // unmodified; the two installers in update-maka.ts only decide WHERE they
8
+ // run and what happens around them.
9
+ //
10
+ // THE TWO DIRECTIONS ARE ONE SHAPE, MIRRORED. Both acquire the replacement
11
+ // first, both verify it resolves ahead of what it replaces, and both leave
12
+ // the destructive step for last -- so a failure or a "no" at any point up to
13
+ // that step stops with the install the user already had still working. The
14
+ // helpers below are written once and used from both directions rather than
15
+ // once per direction, which is why the PATH composition takes a
16
+ // prepend/remove pair instead of hard-coding which side is which.
8
17
  //
9
18
  // Everything decision-shaped here is a pure function on purpose, same
10
19
  // discipline as self-update.ts: the install-kind classification, the PATH
11
- // construction, and the POSIX profile guess are all testable without a
12
- // filesystem, npm, or a real shell.
20
+ // construction, the profile-line removal, and the POSIX profile guess are
21
+ // all testable without a filesystem, npm, or a real shell.
13
22
  import fs from 'fs';
14
23
  import os from 'os';
15
24
  import path from 'path';
@@ -31,13 +40,28 @@ export function binaryInstallPath(platform = process.platform) {
31
40
  * gathered facts instead of gathering them (see gatherInstallFacts()),
32
41
  * so the decision itself needs no filesystem or npm to test.
33
42
  *
34
- * REALPATH COMPARISON IS THE ONLY RELIABLE CHECK HERE. A Windows npm-link
35
- * junction does NOT report as a symlink via fs.lstatSync().isSymbolicLink()
36
- * -- verified directly against this machine's own global maka, a real
37
- * example of exactly this shape: isSymbolicLink() false, realpathSync()
38
- * resolving somewhere else entirely. Comparing realpathSync() against the
39
- * raw path is what actually catches it, on every platform, so that is the
40
- * only signal this function looks at.
43
+ * REALPATH COMPARISON IS THE ONLY THING THAT CATCHES AN npm link. A Windows
44
+ * npm-link junction does NOT report as a symlink via
45
+ * fs.lstatSync().isSymbolicLink() -- verified directly on this project's dev
46
+ * machine: isSymbolicLink() false, realpathSync() resolving elsewhere. So a
47
+ * realpath comparison it is.
48
+ *
49
+ * BUT THE COMPARISON HAS TO BE MADE RELATIVE TO THE NPM ROOT, and the first
50
+ * cut of this function was not. It compared the package's raw path against
51
+ * its own realpath and called any difference a dev link -- which is wrong
52
+ * for every version manager that reaches node through a symlinked prefix.
53
+ * nvm-for-windows makes `C:\Program Files\nodejs` itself a junction to the
54
+ * active version, so on that machine EVERY global package "resolves
55
+ * elsewhere" and --binary refused to run for an install that was as plain
56
+ * as they come. Homebrew, fnm, volta, asdf and n all have the same shape on
57
+ * POSIX. Measured, not theorised: it is why the switch this file exists for
58
+ * silently never worked on the machine it was written on.
59
+ *
60
+ * The distinction that actually separates the two: an ancestor-only link
61
+ * PRESERVES the package's position under the root, so the realpath is
62
+ * exactly <real root>/@maka/maka-cli. A real `npm link` points off to a
63
+ * working tree somewhere else entirely. Comparing against the resolved root
64
+ * asks that question directly.
41
65
  */
42
66
  export function classifyGlobalInstall(facts) {
43
67
  if (!facts.globalPackagePath) {
@@ -54,49 +78,121 @@ export function classifyGlobalInstall(facts) {
54
78
  }
55
79
  const raw = path.normalize(facts.globalPackagePath);
56
80
  const real = path.normalize(facts.globalPackageRealPath);
57
- if (raw !== real) {
58
- return {
59
- kind: 'linked',
60
- reason: `${facts.globalPackagePath} resolves to ${facts.globalPackageRealPath} -- that is a symlink or junction (npm link, or a manual dev link), not a release install. Replacing it with a downloaded binary would silently disconnect you from that working tree. Run this from a plain \`npm install -g @maka/maka-cli\` instead if you want the binary distribution.`,
61
- };
81
+ if (raw === real) {
82
+ return { kind: 'global-npm', reason: '' };
62
83
  }
63
- return { kind: 'global-npm', reason: '' };
84
+ // The package moved when resolved -- but if it landed exactly where the
85
+ // RESOLVED root puts it, nothing about the package is linked; the prefix
86
+ // above it is.
87
+ if (facts.globalNpmRootRealPath) {
88
+ const underRealRoot = path.normalize(path.join(facts.globalNpmRootRealPath, '@maka', 'maka-cli'));
89
+ if (underRealRoot === real) {
90
+ return { kind: 'global-npm', reason: '' };
91
+ }
92
+ }
93
+ return {
94
+ kind: 'linked',
95
+ reason: `${facts.globalPackagePath} resolves to ${facts.globalPackageRealPath} -- that is a symlink or junction (npm link, or a manual dev link) pointing at a working tree, not a release install.`,
96
+ };
97
+ }
98
+ /** The question --binary asks before it unlinks a dev link. Kept next to
99
+ * the classification that produces the case, and pure, so the promise it
100
+ * makes about the working tree is asserted rather than assumed.
101
+ *
102
+ * IT IS A QUESTION AND NOT A REFUSAL, which it used to be. Refusing sent
103
+ * the user off to run npm by hand for a step this flow can do correctly
104
+ * itself -- and it is safe to do, because removing a global link removes
105
+ * the LINK: the tree it points at is not npm's to delete and npm does not
106
+ * touch it. What the refusal was really protecting against is the switch
107
+ * happening without the user knowing, so that is what survives -- the
108
+ * disclosure, asked up front, before a single byte is downloaded. */
109
+ export function unlinkPrompt(linkPath, workingTreePath) {
110
+ return `Unlink ${linkPath} and install the release binary instead? The working tree at ${workingTreePath} is left alone -- only the global link to it goes, and \`npm link\` from that directory puts it back.`;
64
111
  }
65
112
  /** Gathers the facts classifyGlobalInstall() needs. The one impure half of
66
113
  * the classification -- kept separate so the decision above stays pure. */
67
114
  export function gatherInstallFacts(globalNpmRoot) {
115
+ const rootReal = realPathOrUndefined(globalNpmRoot);
68
116
  const candidate = path.join(globalNpmRoot, '@maka', 'maka-cli');
69
117
  if (!fs.existsSync(candidate)) {
70
- return { globalPackagePath: undefined, globalPackageRealPath: undefined };
118
+ return {
119
+ globalPackagePath: undefined,
120
+ globalPackageRealPath: undefined,
121
+ globalNpmRootRealPath: rootReal,
122
+ };
71
123
  }
72
- let real;
124
+ return {
125
+ globalPackagePath: candidate,
126
+ globalPackageRealPath: realPathOrUndefined(candidate),
127
+ globalNpmRootRealPath: rootReal,
128
+ };
129
+ }
130
+ function realPathOrUndefined(target) {
73
131
  try {
74
- real = fs.realpathSync(candidate);
132
+ return fs.realpathSync(target);
75
133
  }
76
134
  catch {
77
- real = undefined;
135
+ return undefined;
78
136
  }
79
- return { globalPackagePath: candidate, globalPackageRealPath: real };
137
+ }
138
+ /** Where npm puts the command shims for a global install: the prefix
139
+ * itself on Windows, <prefix>/bin everywhere else. Both switch directions
140
+ * need it -- one to take that directory OFF the verification PATH, the
141
+ * other to put it back. */
142
+ export function npmShimDirFor(npmPrefix, platform) {
143
+ return platform === 'win32' ? npmPrefix : path.join(npmPrefix, 'bin');
80
144
  }
81
145
  /**
82
- * The PATH a freshly opened shell will see once the disclosed PATH edit
83
- * has actually taken effect -- NOT what the currently-running process
146
+ * The PATH a freshly opened shell will see once a disclosed PATH edit has
147
+ * actually taken effect -- NOT what the currently-running process
84
148
  * inherits. A registry/profile edit never reaches an already-running
85
149
  * process, so verifying against process.env.PATH as-is would silently
86
- * check the OLD path (finding the npm shim pre-uninstall, or nothing
87
- * post-uninstall) and pass for the wrong reason. Pure: given the pieces,
88
- * constructs the string; the caller decides what to spawn with it.
150
+ * check the OLD path (finding the shim that is about to go, or nothing at
151
+ * all) and pass for the wrong reason. Pure: given the pieces, constructs
152
+ * the string; the caller decides what to spawn with it.
89
153
  *
90
- * npmShimDir is removed from the old PATH (not just left alongside the
91
- * new entry) so the constructed env matches the END STATE this flow
92
- * commits to -- binary replaces, never coexists on PATH either.
154
+ * ONE FUNCTION FOR BOTH DIRECTIONS, because they are the same edit with
155
+ * the arguments swapped: the incoming shape's directory goes on the front,
156
+ * the outgoing shape's directory comes off entirely. Removing rather than
157
+ * merely out-ranking it is the point -- the constructed env has to match
158
+ * the END STATE these flows commit to, where the two never coexist on
159
+ * PATH. `prepend` is also removed from the tail first, so a directory that
160
+ * was already on PATH is promoted rather than duplicated.
93
161
  */
94
- export function buildVerificationPath(input) {
162
+ function composeVerificationPath(input) {
163
+ const drop = [input.remove, input.prepend]
164
+ .filter((d) => Boolean(d))
165
+ .map((d) => path.normalize(d));
95
166
  const entries = input.currentPath
96
167
  .split(input.pathSeparator)
97
168
  .filter(Boolean)
98
- .filter((entry) => !input.npmShimDir || path.normalize(entry) !== path.normalize(input.npmShimDir));
99
- return [input.newBinDir, ...entries].join(input.pathSeparator);
169
+ .filter((entry) => !drop.includes(path.normalize(entry)));
170
+ return [...(input.prepend ? [input.prepend] : []), ...entries].join(input.pathSeparator);
171
+ }
172
+ /** The `--binary` direction: the downloaded binary's directory takes the
173
+ * front, npm's shim directory goes. */
174
+ export function buildVerificationPath(input) {
175
+ return composeVerificationPath({
176
+ currentPath: input.currentPath,
177
+ prepend: input.newBinDir,
178
+ remove: input.npmShimDir,
179
+ pathSeparator: input.pathSeparator,
180
+ });
181
+ }
182
+ /** The `--npm` direction: the same edit run backwards. npm's shim
183
+ * directory takes the front (it is usually already on PATH, which is why
184
+ * composeVerificationPath promotes rather than duplicates it), and the
185
+ * binary's directory comes off. The directory removed is always
186
+ * binaryInstallDir() -- somewhere maka owns outright and nothing else
187
+ * lives -- never whatever directory a hand-placed binary happens to sit
188
+ * in, which could be /usr/local/bin. */
189
+ export function buildRevertVerificationPath(input) {
190
+ return composeVerificationPath({
191
+ currentPath: input.currentPath,
192
+ prepend: input.npmShimDir,
193
+ remove: input.binaryBinDir,
194
+ pathSeparator: input.pathSeparator,
195
+ });
100
196
  }
101
197
  /**
102
198
  * Which shell profile a POSIX PATH edit should target, or undefined when
@@ -128,18 +224,74 @@ export function pathExportLine(shell, binDir) {
128
224
  return `fish_add_path ${binDir}`;
129
225
  return `export PATH="${binDir}:$PATH"`;
130
226
  }
227
+ /** The comment `--binary` writes above the line it adds. Exported and used
228
+ * by BOTH the write and the removal, so the two cannot drift into a state
229
+ * where `--npm` leaves an orphaned comment behind. */
230
+ export const PATH_EDIT_MARKER = '# added by `maka update maka --binary`';
231
+ /**
232
+ * A shell profile with the PATH line `--binary` added taken back out,
233
+ * ready for `--npm` to write. Pure: string in, string out, so what it
234
+ * promises to leave alone is asserted rather than hoped for.
235
+ *
236
+ * MATCHES ON THE LINE, NOT ON THE MARKER, and removes the marker
237
+ * separately. Anchoring to the comment would strand the export whenever a
238
+ * user has tidied their profile, and stranding the export is the failure
239
+ * that matters: it silently keeps a deleted directory on PATH. Both shell
240
+ * dialects are checked because the profile that gets read here is not
241
+ * necessarily the one that was written -- $SHELL can change between the
242
+ * two runs.
243
+ */
244
+ export function withoutPathExport(profileContents, binDir) {
245
+ const ours = new Set([pathExportLine('bash', binDir), pathExportLine('fish', binDir)]);
246
+ const kept = [];
247
+ let dropping = false;
248
+ for (const line of profileContents.split('\n')) {
249
+ const trimmed = line.trim();
250
+ if (ours.has(trimmed) || trimmed === PATH_EDIT_MARKER) {
251
+ // The append led with a blank line to separate its block from
252
+ // whatever was there before. Taking the block out has to take that
253
+ // separator with it, or switching back and forth leaves the profile
254
+ // growing a blank line per round trip. Only the FIRST line of a run
255
+ // reaches back, so a two-line block eats one blank, not two.
256
+ if (!dropping && kept.length && kept[kept.length - 1].trim() === '')
257
+ kept.pop();
258
+ dropping = true;
259
+ continue;
260
+ }
261
+ dropping = false;
262
+ kept.push(line);
263
+ }
264
+ return kept.join('\n');
265
+ }
266
+ /** True when the profile still carries a PATH line for this directory --
267
+ * asked before prompting, so `--npm` does not offer to edit a file it has
268
+ * nothing to change in. */
269
+ export function hasPathExport(profileContents, binDir) {
270
+ return withoutPathExport(profileContents, binDir) !== profileContents;
271
+ }
131
272
  /** Resolves a bare command name against a PATH string by hand, the same
132
273
  * way a shell would -- used to PROVE the constructed verification PATH
133
- * actually finds our binary first, rather than trusting that spawning
134
- * "maka" and getting SOME successful output means it found the right
135
- * one. Extension order matches Windows' own PATHEXT precedence
274
+ * actually finds the incoming shape first, rather than trusting that
275
+ * spawning "maka" and getting SOME successful output means it found the
276
+ * right one. Extension order matches Windows' own PATHEXT precedence
136
277
  * (.exe before .cmd/.bat); POSIX has no such notion, so the bare name
137
- * is the only candidate there. */
138
- export function resolveOnPath(name, pathValue, platform, pathSeparator) {
278
+ * is the only candidate there.
279
+ *
280
+ * `ignore` is how the `--npm` direction models its own end state. That
281
+ * flow verifies BEFORE it removes the binaries -- deliberately, so a
282
+ * failed verification can stop with the binary still working -- which
283
+ * means the files it is about to retire are still sitting on disk, still
284
+ * first, and would answer the question with the very thing being
285
+ * replaced. Skipping them asks what a shell will find AFTERWARDS, which
286
+ * is the question worth answering. */
287
+ export function resolveOnPath(name, pathValue, platform, pathSeparator, ignore = []) {
139
288
  const extensions = platform === 'win32' ? ['.exe', '.cmd', '.bat', ''] : [''];
289
+ const skip = ignore.map((p) => path.normalize(p));
140
290
  for (const dir of pathValue.split(pathSeparator).filter(Boolean)) {
141
291
  for (const ext of extensions) {
142
292
  const candidate = path.join(dir, name + ext);
293
+ if (skip.includes(path.normalize(candidate)))
294
+ continue;
143
295
  if (fs.existsSync(candidate))
144
296
  return candidate;
145
297
  }
@@ -166,6 +318,54 @@ export async function installStagedBinary(stagedPath, targetPath, platform) {
166
318
  fs.renameSync(stagedPath, targetPath);
167
319
  }
168
320
  }
321
+ /**
322
+ * Takes the binary distribution back out of service -- the last and only
323
+ * destructive step of `--npm`, the mirror of the npm uninstall that ends
324
+ * `--binary`.
325
+ *
326
+ * ON WINDOWS THIS FILE IS THE RUNNING PROCESS and cannot be deleted, so it
327
+ * is renamed aside to `.old` instead, exactly the trick swapPlanFor() uses
328
+ * to update a binary in place. Renaming is enough for the purpose: the
329
+ * name `maka.exe` stops resolving, which is the whole requirement. POSIX
330
+ * unlinks a running executable happily, so there it simply goes.
331
+ */
332
+ export function retireBinaryInstall(binaryPath, platform) {
333
+ if (!fs.existsSync(binaryPath))
334
+ return { removed: false };
335
+ if (platform !== 'win32') {
336
+ fs.rmSync(binaryPath, { force: true });
337
+ return { removed: true };
338
+ }
339
+ const aside = `${binaryPath}.old`;
340
+ try {
341
+ fs.unlinkSync(aside);
342
+ }
343
+ catch { /* stale-or-absent either way */ }
344
+ fs.renameSync(binaryPath, aside);
345
+ return { removed: true, renamedTo: aside };
346
+ }
347
+ /**
348
+ * What to run to make a maka -- packaged or npm-installed -- print its
349
+ * version, used by BOTH switch directions to prove the incoming install
350
+ * actually runs before the outgoing one is taken away.
351
+ *
352
+ * IT IS THE `version` COMMAND AND NOT `--version`, and the difference is
353
+ * not cosmetic. maka's argument parser wants a command; a bare flag with
354
+ * no command reaches it as no command at all and it exits 1 with "Too few
355
+ * arguments". Both directions of this switch verify by looking for the
356
+ * version string in successful output, so `--version` fails that check
357
+ * every single time -- which is how --binary came to be a flow that could
358
+ * download, verify, stage and PATH-install a binary and then refuse to
359
+ * finish, every time, on every machine. Measured, not reasoned: `maka
360
+ * version` prints "Maka <x.y.z>" and exits 0, `maka --version` prints the
361
+ * usage banner and exits 1.
362
+ *
363
+ * A constant rather than a literal at each site because there are two
364
+ * sites now, and the failure mode of getting this wrong is silent: a
365
+ * verification that can never pass looks exactly like a careful one until
366
+ * somebody runs it.
367
+ */
368
+ export const VERSION_PROBE_ARGV = ['version'];
169
369
  /** Compares two spawnSync-style results the way check-bundle-parity.mjs
170
370
  * compares builds: same exit status, same combined stdout+stderr. No
171
371
  * path-scrubbing normalization here -- both invocations run the exact
@@ -1 +1 @@
1
- {"version":3,"file":"binary-install.js","sourceRoot":"","sources":["../../../../../src/tools/self-update/binary-install.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,wEAAwE;AACxE,kEAAkE;AAClE,wEAAwE;AACxE,yEAAyE;AACzE,qEAAqE;AACrE,uDAAuD;AACvD,EAAE;AACF,sEAAsE;AACtE,0EAA0E;AAC1E,uEAAuE;AACvE,oCAAoC;AACpC,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB;;;;;;sDAMsD;AACtD,MAAM,UAAU,gBAAgB;IAC9B,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AAE,UAAkB,EAAE,QAAyB;IACzG,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;QACzB,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IAClC,CAAC;IACD,MAAM,EAAE,WAAW,EAAE,eAAe,EAAE,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAC;IAC1E,IAAI,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC9B,eAAe,CAAC,WAAW,CAAC,QAAQ,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC;IACjE,CAAC;SAAM,CAAC;QACN,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IACxC,CAAC;AACH,CAAC;AAED;;;;;0BAK0B;AAC1B,MAAM,UAAU,WAAW,CACzB,CAA4D,EAC5D,CAA4D;IAE5D,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC;AAClF,CAAC"}
1
+ {"version":3,"file":"binary-install.js","sourceRoot":"","sources":["../../../../../src/tools/self-update/binary-install.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,oEAAoE;AACpE,4EAA4E;AAC5E,2EAA2E;AAC3E,yEAAyE;AACzE,0EAA0E;AAC1E,0EAA0E;AAC1E,oCAAoC;AACpC,EAAE;AACF,2EAA2E;AAC3E,2EAA2E;AAC3E,6EAA6E;AAC7E,2EAA2E;AAC3E,2EAA2E;AAC3E,gEAAgE;AAChE,kEAAkE;AAClE,EAAE;AACF,sEAAsE;AACtE,0EAA0E;AAC1E,0EAA0E;AAC1E,2DAA2D;AAC3D,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,M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