@jayree/sfdx-plugin-manifest 3.3.28 → 3.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +3 -3
  3. package/lib/SDR-extra/collections/componentSetExtra.js +1 -1
  4. package/lib/SDR-extra/collections/componentSetExtra.js.map +1 -1
  5. package/lib/SDR-extra/resolve/gitDiffResolver.d.ts +4 -5
  6. package/lib/SDR-extra/resolve/gitDiffResolver.js +45 -160
  7. package/lib/SDR-extra/resolve/gitDiffResolver.js.map +1 -1
  8. package/lib/SDR-extra/resolve/treeContainersExtra.d.ts +1 -2
  9. package/lib/SDR-extra/resolve/treeContainersExtra.js +28 -15
  10. package/lib/SDR-extra/resolve/treeContainersExtra.js.map +1 -1
  11. package/lib/SDR-extra/utils/gitComponentSetArray.d.ts +25 -0
  12. package/lib/SDR-extra/utils/gitComponentSetArray.js +142 -0
  13. package/lib/SDR-extra/utils/gitComponentSetArray.js.map +1 -0
  14. package/lib/SDR-extra/utils/index.d.ts +1 -0
  15. package/lib/SDR-extra/utils/index.js +1 -0
  16. package/lib/SDR-extra/utils/index.js.map +1 -1
  17. package/lib/SDR-extra/utils/localGitRepo.d.ts +19 -23
  18. package/lib/SDR-extra/utils/localGitRepo.js +129 -129
  19. package/lib/SDR-extra/utils/localGitRepo.js.map +1 -1
  20. package/lib/SDR-extra/utils/moveDetection.d.ts +16 -0
  21. package/lib/SDR-extra/utils/moveDetection.js +137 -0
  22. package/lib/SDR-extra/utils/moveDetection.js.map +1 -0
  23. package/lib/SDR-extra/utils/statusMatrix.d.ts +10 -0
  24. package/lib/SDR-extra/utils/statusMatrix.js +78 -0
  25. package/lib/SDR-extra/utils/statusMatrix.js.map +1 -0
  26. package/lib/SDR-extra/utils/worthWalking.d.ts +1 -0
  27. package/lib/SDR-extra/utils/worthWalking.js +19 -0
  28. package/lib/SDR-extra/utils/worthWalking.js.map +1 -0
  29. package/lib/commands/jayree/manifest/git/diff.js +4 -1
  30. package/lib/commands/jayree/manifest/git/diff.js.map +1 -1
  31. package/lib/tsconfig.tsbuildinfo +1 -1
  32. package/npm-shrinkwrap.json +867 -416
  33. package/oclif.lock +335 -249
  34. package/oclif.manifest.json +1 -1
  35. package/package.json +6 -3
@@ -0,0 +1,137 @@
1
+ /*
2
+ * Copyright (c) 2023, jayree
3
+ * All rights reserved.
4
+ * Licensed under the BSD 3-Clause license.
5
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ */
7
+ // https://github.com/forcedotcom/source-tracking/blob/main/src/shared/local/moveDetection.ts
8
+ import path from 'node:path';
9
+ import { isUtf8 } from 'node:buffer';
10
+ import { Lifecycle } from '@salesforce/core';
11
+ import { MetadataResolver, VirtualTreeContainer, } from '@salesforce/source-deploy-retrieve';
12
+ import git from 'isomorphic-git';
13
+ import fs from 'graceful-fs';
14
+ import { isDefined } from '@salesforce/source-tracking/lib/shared/guards.js';
15
+ import { uniqueArrayConcat } from '@salesforce/source-tracking/lib/shared/functions.js';
16
+ import { IS_WINDOWS, ensurePosix, ensureWindows } from '@salesforce/source-tracking/lib/shared/local/functions.js';
17
+ import { buildMap } from '@salesforce/source-tracking/lib/shared/local/moveDetection.js';
18
+ const JOIN_CHAR = '#__#'; // the __ makes it unlikely to be used in metadata names
19
+ /** composed functions to simplified use by the shadowRepo class */
20
+ export const filenameMatchesToMap = (registry) => (projectPath) => (gitDir) => async ({ added, deleted }) => {
21
+ const resolver = new MetadataResolver(registry, VirtualTreeContainer.fromFilePaths(uniqueArrayConcat(added, deleted)));
22
+ return compareHashes(await buildMaps(addTypes(resolver)(await toFileInfo({
23
+ projectPath,
24
+ gitDir,
25
+ added,
26
+ deleted,
27
+ }))));
28
+ };
29
+ export const getLogMessage = (matches) => [
30
+ ...[...matches.fullMatches.entries()].map(([add, del]) => `The file ${IS_WINDOWS ? ensureWindows(del) : del} moved to ${IS_WINDOWS ? ensureWindows(add) : add} was ignored.`),
31
+ ...[...matches.deleteOnly.entries()].map(([add, del]) => `The file ${IS_WINDOWS ? ensureWindows(del) : del} moved to ${IS_WINDOWS ? ensureWindows(add) : add} and modified was processed.`),
32
+ ];
33
+ /** build maps of the add/deletes with filenames, returning the matches Logs if we can't make a match because buildMap puts them in the ignored bucket */
34
+ const buildMaps = async ({ addedInfo, deletedInfo }) => {
35
+ const [addedMap, addedIgnoredMap] = buildMap(addedInfo);
36
+ const [deletedMap, deletedIgnoredMap] = buildMap(deletedInfo);
37
+ // If we detected any files that have the same basename and hash, emit a warning and send telemetry
38
+ // These files will still show up as expected in the `sf project deploy preview` output
39
+ // We could add more logic to determine and display filepaths that we ignored...
40
+ // but this is likely rare enough to not warrant the added complexity
41
+ // Telemetry will help us determine how often this occurs
42
+ if (addedIgnoredMap.size || deletedIgnoredMap.size) {
43
+ const message = 'Files were found that have the same basename, hash, metadata type, and parent.';
44
+ const lifecycle = Lifecycle.getInstance();
45
+ await Promise.all([lifecycle.emitWarning(message)]);
46
+ }
47
+ return { addedMap, deletedMap };
48
+ };
49
+ /**
50
+ * builds a map of the values from both maps
51
+ * side effect: mutates the passed-in maps!
52
+ */
53
+ const compareHashes = ({ addedMap, deletedMap }) => {
54
+ const matches = new Map([...addedMap.entries()]
55
+ .map(([addedKey, addedValue]) => {
56
+ const deletedValue = deletedMap.get(addedKey);
57
+ if (deletedValue) {
58
+ // these are an exact basename + hash match + parent + type
59
+ deletedMap.delete(addedKey);
60
+ addedMap.delete(addedKey);
61
+ return [addedValue, deletedValue];
62
+ }
63
+ })
64
+ .filter(isDefined));
65
+ if (addedMap.size && deletedMap.size) {
66
+ // the remaining deletes didn't match the basename+hash of an add, and vice versa.
67
+ // They *might* match the basename,type,parent of an add, in which case we *could* have the "move, then edit" case.
68
+ const addedMapNoHash = new Map([...addedMap.entries()].map(removeHashFromEntry));
69
+ const deletedMapNoHash = new Map([...deletedMap.entries()].map(removeHashFromEntry));
70
+ const deleteOnly = new Map(Array.from(deletedMapNoHash.entries())
71
+ .filter(([k]) => addedMapNoHash.has(k))
72
+ .map(([k, v]) => [addedMapNoHash.get(k), v]));
73
+ return { fullMatches: matches, deleteOnly };
74
+ }
75
+ return { fullMatches: matches, deleteOnly: new Map() };
76
+ };
77
+ /** enrich the filenames with basename and oid (hash) */
78
+ const toFileInfo = async ({ projectPath, gitDir, added, deleted, }) => {
79
+ const headRef = await git.resolveRef({ fs, dir: projectPath, gitdir: gitDir, ref: 'HEAD' });
80
+ const [addedInfo, deletedInfo] = await Promise.all([
81
+ await Promise.all(Array.from(added).map(getHashForAddedFile(projectPath))),
82
+ await Promise.all(Array.from(deleted).map(getHashFromActualFileContents(gitDir)(projectPath)(headRef))),
83
+ ]);
84
+ return { addedInfo, deletedInfo };
85
+ };
86
+ const getHashForAddedFile = (projectPath) => async (filepath) => {
87
+ const autocrlf = (await git.getConfig({
88
+ fs,
89
+ dir: projectPath,
90
+ path: 'core.autocrlf',
91
+ }));
92
+ let object = await fs.promises.readFile(path.join(projectPath, filepath));
93
+ if (autocrlf === 'true' && isUtf8(object)) {
94
+ object = Buffer.from(object.toString('utf8').replace(/\r\n/g, '\n'));
95
+ }
96
+ return {
97
+ filename: filepath,
98
+ basename: path.basename(filepath),
99
+ hash: (await git.hashBlob({ object })).oid,
100
+ };
101
+ };
102
+ const resolveType = (resolver) => (filenames) => filenames
103
+ .flatMap((filename) => {
104
+ try {
105
+ return resolver.getComponentsFromPath(filename);
106
+ }
107
+ catch (e) {
108
+ return undefined;
109
+ }
110
+ })
111
+ .filter(isDefined);
112
+ /** where we don't have git objects to use, read the file contents to generate the hash */
113
+ const getHashFromActualFileContents = (gitdir) => (projectPath) => (oid) => async (filepath) => ({
114
+ filename: filepath,
115
+ basename: path.basename(filepath),
116
+ hash: (await git.readBlob({ fs, dir: projectPath, gitdir, filepath: IS_WINDOWS ? ensurePosix(filepath) : filepath, oid })).oid,
117
+ });
118
+ const removeHashFromEntry = ([k, v]) => [removeHashFromKey(k), v];
119
+ const removeHashFromKey = (hash) => hash.split(JOIN_CHAR).splice(1).join(JOIN_CHAR);
120
+ /** resolve the metadata types (and possibly parent components) */
121
+ const addTypes = (resolver) => (info) => {
122
+ // quick passthrough if we don't have adds and deletes
123
+ if (!info.addedInfo.length || !info.deletedInfo.length)
124
+ return { addedInfo: [], deletedInfo: [] };
125
+ const applied = getTypesForFileInfo(resolveType(resolver));
126
+ return {
127
+ addedInfo: info.addedInfo.flatMap(applied),
128
+ deletedInfo: info.deletedInfo.flatMap(applied),
129
+ };
130
+ };
131
+ const getTypesForFileInfo = (appliedResolver) => (fileInfo) => appliedResolver([fileInfo.filename]).map((c) => ({
132
+ ...fileInfo,
133
+ type: c.type.name,
134
+ parentType: c.parent?.type.name ?? '',
135
+ parentFullName: c.parent?.fullName ?? '',
136
+ }));
137
+ //# sourceMappingURL=moveDetection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"moveDetection.js","sourceRoot":"","sources":["../../../src/SDR-extra/utils/moveDetection.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,6FAA6F;AAC7F,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EACL,gBAAgB,EAGhB,oBAAoB,GACrB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,GAAG,MAAM,gBAAgB,CAAC;AACjC,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,kDAAkD,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,qDAAqD,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,2DAA2D,CAAC;AACnH,OAAO,EAAE,QAAQ,EAAE,MAAM,+DAA+D,CAAC;AAQzF,MAAM,SAAS,GAAG,MAAM,CAAC,CAAC,wDAAwD;AAclF,mEAAmE;AACnE,MAAM,CAAC,MAAM,o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CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM;QAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC;IAClG,MAAM,OAAO,GAAG,mBAAmB,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC3D,OAAO;QACL,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC;QAC1C,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC;KAC/C,CAAC;AACJ,CAAC,CAAC;AAEJ,MAAM,mBAAmB,GACvB,CAAC,eAA2D,EAAE,EAAE,CAChE,CAAC,QAA2B,EAA+B,EAAE,CAC3D,eAAe,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC/C,GAAG,QAAQ;IACX,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI;IACjB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,IAAI,EAAE;IACrC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,QAAQ,IAAI,EAAE;CACzC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { StatusRow } from 'isomorphic-git';
2
+ export declare function statusMatrix({ dir, gitdir, ref1, ref2, filepaths, filter, ignored: shouldIgnore, }: {
3
+ dir: string;
4
+ gitdir?: string;
5
+ ref1: string;
6
+ ref2?: string;
7
+ filepaths?: string[];
8
+ filter?: ((arg0: string) => boolean) | undefined;
9
+ ignored?: boolean;
10
+ }): Promise<StatusRow[]>;
@@ -0,0 +1,78 @@
1
+ /*
2
+ * Copyright (c) 2023, jayree
3
+ * All rights reserved.
4
+ * Licensed under the BSD 3-Clause license.
5
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ */
7
+ // https://github.com/isomorphic-git/isomorphic-git/blob/main/src/api/statusMatrix.js
8
+ import fs from 'node:fs/promises';
9
+ import { join } from 'node:path';
10
+ import { STAGE } from 'isomorphic-git';
11
+ import { TREE } from 'isomorphic-git';
12
+ import { WORKDIR } from 'isomorphic-git';
13
+ import { walk as _walk } from 'isomorphic-git';
14
+ import { isIgnored as _isIgnored } from 'isomorphic-git';
15
+ import { worthWalking } from './worthWalking.js';
16
+ export async function statusMatrix({ dir, gitdir = join(dir, '.git'), ref1 = 'HEAD', ref2, filepaths = ['.'], filter, ignored: shouldIgnore = false, }) {
17
+ return _walk({
18
+ fs,
19
+ dir,
20
+ gitdir,
21
+ trees: [TREE({ ref: ref1 }), ref2 ? TREE({ ref: ref2 }) : WORKDIR(), ref2 ? TREE({ ref: ref2 }) : STAGE()],
22
+ // eslint-disable-next-line complexity
23
+ async map(filepath, [head, workdir, stage]) {
24
+ // Ignore ignored files, but only if they are not already tracked.
25
+ if (!head && !stage && workdir) {
26
+ if (!shouldIgnore) {
27
+ const isIgnored = await _isIgnored({
28
+ fs,
29
+ dir,
30
+ filepath,
31
+ });
32
+ if (isIgnored) {
33
+ return null;
34
+ }
35
+ }
36
+ }
37
+ // match against base paths
38
+ if (!filepaths.some((base) => worthWalking(filepath, base))) {
39
+ return null;
40
+ }
41
+ // Late filter against file names
42
+ if (filter) {
43
+ if (!filter(filepath))
44
+ return;
45
+ }
46
+ const [headType, workdirType, stageType] = await Promise.all([head?.type(), workdir?.type(), stage?.type()]);
47
+ const isBlob = [headType, workdirType, stageType].includes('blob');
48
+ // For now, bail on directories unless the file is also a blob in another tree
49
+ if ((headType === 'tree' || headType === 'special') && !isBlob)
50
+ return;
51
+ if (headType === 'commit')
52
+ return null;
53
+ if ((workdirType === 'tree' || workdirType === 'special') && !isBlob)
54
+ return;
55
+ if (stageType === 'commit')
56
+ return null;
57
+ if ((stageType === 'tree' || stageType === 'special') && !isBlob)
58
+ return;
59
+ // Figure out the oids for files, using the staged oid for the working dir oid if the stats match.
60
+ const headOid = headType === 'blob' ? await head?.oid() : undefined;
61
+ const stageOid = stageType === 'blob' ? await stage?.oid() : undefined;
62
+ let workdirOid;
63
+ if (headType !== 'blob' && workdirType === 'blob' && stageType !== 'blob') {
64
+ // We don't actually NEED the sha. Any sha will do
65
+ // TODO: update this logic to handle N trees instead of just 3.
66
+ workdirOid = '42';
67
+ }
68
+ else if (workdirType === 'blob') {
69
+ workdirOid = await workdir?.oid();
70
+ }
71
+ const entry = [undefined, headOid, workdirOid, stageOid];
72
+ const result = entry.map((value) => entry.indexOf(value));
73
+ result.shift(); // remove leading undefined entry
74
+ return [filepath, ...result];
75
+ },
76
+ });
77
+ }
78
+ //# sourceMappingURL=statusMatrix.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statusMatrix.js","sourceRoot":"","sources":["../../../src/SDR-extra/utils/statusMatrix.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,qFAAqF;AACrF,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,IAAI,IAAI,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,SAAS,IAAI,UAAU,EAAa,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,EACjC,GAAG,EACH,MAAM,GAAG,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,EAC1B,IAAI,GAAG,MAAM,EACb,IAAI,EACJ,SAAS,GAAG,CAAC,GAAG,CAAC,EACjB,MAAM,EACN,OAAO,EAAE,YAAY,GAAG,KAAK,GA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AC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;YAC1D,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,iCAAiC;YACjD,OAAO,CAAC,QAAQ,EAAE,GAAG,MAAM,CAAC,CAAC;QAC/B,CAAC;KACF,CAAyB,CAAC;AAC7B,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const worthWalking: (filepath: string, root: string) => boolean;
@@ -0,0 +1,19 @@
1
+ /*
2
+ * Copyright (c) 2023, jayree
3
+ * All rights reserved.
4
+ * Licensed under the BSD 3-Clause license.
5
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ */
7
+ // https://github.com/isomorphic-git/isomorphic-git/blob/main/src/utils/worthWalking.js
8
+ export const worthWalking = (filepath, root) => {
9
+ if (filepath === '.' || root == null || root.length === 0 || root === '.') {
10
+ return true;
11
+ }
12
+ if (root.length >= filepath.length) {
13
+ return root.startsWith(filepath);
14
+ }
15
+ else {
16
+ return filepath.startsWith(root);
17
+ }
18
+ };
19
+ //# sourceMappingURL=worthWalking.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worthWalking.js","sourceRoot":"","sources":["../../../src/SDR-extra/utils/worthWalking.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,uFAAuF;AACvF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,QAAgB,EAAE,IAAY,EAAW,EAAE;IACtE,IAAI,QAAQ,KAAK,GAAG,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;QAC1E,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,IAAI,CAAC,MAAM,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;QACnC,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;SAAM,CAAC;QACN,OAAO,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;AACH,CAAC,CAAC"}
@@ -78,7 +78,10 @@ export default class GitDiffCommand extends SfCommand {
78
78
  ref: [args.ref1, args.ref2],
79
79
  fsPaths: flags['source-dir'],
80
80
  });
81
- this.componentSet.sourceApiVersion = flags['api-version'] ?? (await this.getSourceApiVersion());
81
+ if (flags['api-version']) {
82
+ this.componentSet.apiVersion = flags['api-version'];
83
+ this.componentSet.sourceApiVersion = flags['api-version'];
84
+ }
82
85
  if (this.outputDir) {
83
86
  await fs.ensureDir(this.outputDir);
84
87
  this.outputPath = join(this.outputDir, this.manifestName);
@@ -1 +1 @@
1
- {"version":3,"file":"diff.js","sourceRoot":"","sources":["../../../../../src/commands/jayree/manifest/git/diff.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,iCAAiC,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACxH,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,SAAS,EAAY,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,SAAS,CAAC,CAAC;AAOlF,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,SAA+B;IAClE,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UA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