@payloadcms/db-postgres 3.0.0-alpha.18 → 3.0.0-alpha.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. package/dist/connect.js +17 -32
  2. package/dist/create.js +6 -21
  3. package/dist/createGlobal.js +6 -21
  4. package/dist/createGlobalVersion.js +10 -25
  5. package/dist/createMigration.js +11 -26
  6. package/dist/createVersion.js +10 -25
  7. package/dist/deleteMany.js +8 -23
  8. package/dist/deleteOne.js +10 -25
  9. package/dist/deleteVersions.js +10 -25
  10. package/dist/destroy.js +2 -12
  11. package/dist/find/buildFindManyArgs.js +6 -14
  12. package/dist/find/chainMethods.js +2 -11
  13. package/dist/find/findMany.js +14 -29
  14. package/dist/find/traverseFields.js +8 -23
  15. package/dist/find.js +6 -21
  16. package/dist/findGlobal.js +6 -21
  17. package/dist/findGlobalVersions.js +8 -23
  18. package/dist/findOne.js +6 -21
  19. package/dist/findVersions.js +8 -23
  20. package/dist/index.js +72 -87
  21. package/dist/init.js +17 -32
  22. package/dist/migrate.js +15 -30
  23. package/dist/migrateDown.js +12 -22
  24. package/dist/migrateFresh.js +15 -28
  25. package/dist/migrateRefresh.js +18 -26
  26. package/dist/migrateReset.js +13 -21
  27. package/dist/migrateStatus.js +9 -19
  28. package/dist/queries/buildAndOrConditions.js +4 -14
  29. package/dist/queries/buildQuery.js +10 -20
  30. package/dist/queries/createJSONQuery/convertPathToJSONTraversal.js +4 -14
  31. package/dist/queries/createJSONQuery/formatJSONPathSegment.js +2 -12
  32. package/dist/queries/createJSONQuery/index.js +6 -16
  33. package/dist/queries/getTableColumnFromPath.js +38 -49
  34. package/dist/queries/operatorMap.js +17 -27
  35. package/dist/queries/parseParams.js +32 -42
  36. package/dist/queries/sanitizeQueryValue.js +8 -18
  37. package/dist/queryDrafts.js +10 -25
  38. package/dist/schema/build.js +49 -64
  39. package/dist/schema/createIndex.js +5 -15
  40. package/dist/schema/idToUUID.js +2 -12
  41. package/dist/schema/parentIDColumnMap.js +7 -17
  42. package/dist/schema/setColumnID.js +10 -20
  43. package/dist/schema/traverseFields.js +62 -77
  44. package/dist/schema/validateExistingBlockIsIdentical.js +9 -19
  45. package/dist/transactions/beginTransaction.js +4 -14
  46. package/dist/transactions/commitTransaction.js +2 -12
  47. package/dist/transactions/rollbackTransaction.js +2 -12
  48. package/dist/transform/read/hasManyNumber.js +2 -12
  49. package/dist/transform/read/hasManyText.js +2 -12
  50. package/dist/transform/read/index.js +12 -20
  51. package/dist/transform/read/relationship.js +2 -12
  52. package/dist/transform/read/traverseFields.js +15 -23
  53. package/dist/transform/write/array.js +6 -16
  54. package/dist/transform/write/blocks.js +6 -21
  55. package/dist/transform/write/index.js +4 -14
  56. package/dist/transform/write/numbers.js +2 -12
  57. package/dist/transform/write/relationships.js +4 -14
  58. package/dist/transform/write/selects.js +4 -14
  59. package/dist/transform/write/texts.js +2 -12
  60. package/dist/transform/write/traverseFields.js +30 -45
  61. package/dist/transform/write/types.js +2 -5
  62. package/dist/types.js +2 -5
  63. package/dist/update.js +11 -26
  64. package/dist/updateGlobal.js +6 -21
  65. package/dist/updateGlobalVersion.js +10 -25
  66. package/dist/updateVersion.js +10 -25
  67. package/dist/upsertRow/deleteExistingArrayRows.js +5 -15
  68. package/dist/upsertRow/deleteExistingRowsByPath.js +9 -19
  69. package/dist/upsertRow/index.js +24 -34
  70. package/dist/upsertRow/insertArrays.js +2 -12
  71. package/dist/upsertRow/types.js +2 -5
  72. package/dist/utilities/appendPrefixToKeys.js +2 -12
  73. package/dist/utilities/createBlocksMap.js +2 -12
  74. package/dist/utilities/createMigrationTable.js +4 -14
  75. package/dist/utilities/createRelationshipMap.js +2 -12
  76. package/dist/utilities/hasLocalesTable.js +5 -15
  77. package/dist/utilities/isArrayOfRows.js +2 -12
  78. package/dist/utilities/migrationTableExists.js +4 -14
  79. package/dist/utilities/parseError.js +6 -14
  80. package/package.json +4 -4
@@ -1,15 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "validateExistingBlockIsIdentical", {
6
- enumerable: true,
7
- get: function() {
8
- return validateExistingBlockIsIdentical;
9
- }
10
- });
11
- const _errors = require("payload/errors");
12
- const _types = require("payload/types");
1
+ import { InvalidConfiguration } from 'payload/errors';
2
+ import { fieldAffectsData, fieldHasSubFields, tabHasName } from 'payload/types';
13
3
  const getFlattenedFieldNames = (fields, prefix = '')=>{
14
4
  return fields.reduce((fieldsToUse, field)=>{
15
5
  let fieldPrefix = prefix;
@@ -21,7 +11,7 @@ const getFlattenedFieldNames = (fields, prefix = '')=>{
21
11
  ].includes(field.type) || 'hasMany' in field && field.hasMany === true) {
22
12
  return fieldsToUse;
23
13
  }
24
- if ((0, _types.fieldHasSubFields)(field)) {
14
+ if (fieldHasSubFields(field)) {
25
15
  fieldPrefix = 'name' in field ? `${prefix}${field.name}.` : prefix;
26
16
  return [
27
17
  ...fieldsToUse,
@@ -35,7 +25,7 @@ const getFlattenedFieldNames = (fields, prefix = '')=>{
35
25
  fieldPrefix = 'name' in tab ? `${prefix}.${tab.name}` : prefix;
36
26
  return [
37
27
  ...tabFields,
38
- ...(0, _types.tabHasName)(tab) ? [
28
+ ...tabHasName(tab) ? [
39
29
  {
40
30
  ...tab,
41
31
  type: 'tab'
@@ -45,7 +35,7 @@ const getFlattenedFieldNames = (fields, prefix = '')=>{
45
35
  }, [])
46
36
  ];
47
37
  }
48
- if ((0, _types.fieldAffectsData)(field)) {
38
+ if (fieldAffectsData(field)) {
49
39
  return [
50
40
  ...fieldsToUse,
51
41
  `${fieldPrefix?.replace('.', '_') || ''}${field.name}`
@@ -54,7 +44,7 @@ const getFlattenedFieldNames = (fields, prefix = '')=>{
54
44
  return fieldsToUse;
55
45
  }, []);
56
46
  };
57
- const validateExistingBlockIsIdentical = ({ block, localized, rootTableName, table })=>{
47
+ export const validateExistingBlockIsIdentical = ({ block, localized, rootTableName, table })=>{
58
48
  const fieldNames = getFlattenedFieldNames(block.fields);
59
49
  const missingField = // ensure every field from the config is in the matching table
60
50
  fieldNames.find((name)=>Object.keys(table).indexOf(name) === -1) || // ensure every table column is matched for every field from the config
@@ -70,11 +60,11 @@ const validateExistingBlockIsIdentical = ({ block, localized, rootTableName, tab
70
60
  }
71
61
  });
72
62
  if (missingField) {
73
- throw new _errors.InvalidConfiguration(`The table ${rootTableName} has multiple blocks with slug ${block.slug}, but the schemas do not match. One block includes the field ${missingField}, while the other block does not.`);
63
+ throw new InvalidConfiguration(`The table ${rootTableName} has multiple blocks with slug ${block.slug}, but the schemas do not match. One block includes the field ${missingField}, while the other block does not.`);
74
64
  }
75
65
  if (Boolean(localized) !== Boolean(table._locale)) {
76
- throw new _errors.InvalidConfiguration(`The table ${rootTableName} has multiple blocks with slug ${block.slug}, but the schemas do not match. One is localized, but another is not. Block schemas of the same name must match exactly.`);
66
+ throw new InvalidConfiguration(`The table ${rootTableName} has multiple blocks with slug ${block.slug}, but the schemas do not match. One is localized, but another is not. Block schemas of the same name must match exactly.`);
77
67
  }
78
68
  };
79
69
 
80
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zY2hlbWEvdmFsaWRhdGVFeGlzdGluZ0Jsb2NrSXNJZGVudGljYWwudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBCbG9jaywgRmllbGQgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgeyBJbnZhbGlkQ29uZmlndXJhdGlvbiB9IGZyb20gJ3BheWxvYWQvZXJyb3JzJ1xuaW1wb3J0IHsgZmllbGRBZmZlY3RzRGF0YSwgZmllbGRIYXNTdWJGaWVsZHMsIHRhYkhhc05hbWUgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgdHlwZSB7IEdlbmVyaWNUYWJsZSB9IGZyb20gJy4uL3R5cGVzJ1xuXG50eXBlIEFyZ3MgPSB7XG4gIGJsb2NrOiBCbG9ja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FXRSxJQUFJLENBQUMsQ0FBQ1osT0FBU2EsT0FBT0MsSUFBSSxDQUFDTCxPQUFPTSxPQUFPLENBQUNmLFVBQVUsQ0FBQyxNQUNoRSx1RUFBdUU7SUFDdkVhLE9BQU9DLElBQUksQ0FBQ0wsT0FBT0csSUFBSSxDQUFDLENBQUNJO1FBQ3ZCLElBQUksQ0FBQztZQUFDO1lBQVc7WUFBVTtZQUFhO1lBQVM7U0FBUSxDQUFDbkIsUUFBUSxDQUFDbUIsWUFBWTtZQUM3RSxPQUFPTixXQUFXSyxPQUFPLENBQUNDLGVBQWUsQ0FBQztRQUM1QztJQUNGO0lBRUYsSUFBSUwsY0FBYztRQUNoQixNQUFNLElBQUl6QixxQkFDUixDQUFDLFVBQVUsRUFBRXNCLGNBQWMsK0JBQStCLEVBQUVGLE1BQU1XLElBQUksQ0FBQyw2REFBNkQsRUFBRU4sYUFBYSxpQ0FBaUMsQ0FBQztJQUV6TDtJQUVBLElBQUlPLFFBQVFYLGVBQWVXLFFBQVFULE1BQU1VLE9BQU8sR0FBRztRQUNqRCxNQUFNLElBQUlqQyxxQkFDUixDQUFDLFVBQVUsRUFBRXNCLGNBQWMsK0JBQStCLEVBQUVGLE1BQU1XLElBQUksQ0FBQyx3SEFBd0gsQ0FBQztJQUVwTTtBQUNGLEVBQUMifQ==
@@ -1,18 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "beginTransaction", {
6
- enumerable: true,
7
- get: function() {
8
- return beginTransaction;
9
- }
10
- });
11
- const _uuid = require("uuid");
12
- const beginTransaction = async function beginTransaction() {
1
+ import { v4 as uuid } from 'uuid';
2
+ export const beginTransaction = async function beginTransaction() {
13
3
  let id;
14
4
  try {
15
- id = (0, _uuid.v4)();
5
+ id = uuid();
16
6
  let reject;
17
7
  let resolve;
18
8
  let transaction;
@@ -54,4 +44,4 @@ const beginTransaction = async function beginTransaction() {
54
44
  return id;
55
45
  };
56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VBQUVILElBQUlJLE9BQU8sQ0FBQyxDQUFDLEVBQUVKO1FBQzdFSyxRQUFRQyxJQUFJLENBQUM7SUFDZjtJQUVBLE9BQU9wQjtBQUNULEVBQUMifQ==
@@ -1,14 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "commitTransaction", {
6
- enumerable: true,
7
- get: function() {
8
- return commitTransaction;
9
- }
10
- });
11
- const commitTransaction = async function commitTransaction(id) {
1
+ export const commitTransaction = async function commitTransaction(id) {
12
2
  // if the session was deleted it has already been aborted
13
3
  if (!this.sessions[id]) {
14
4
  return;
@@ -21,4 +11,4 @@ const commitTransaction = async function commitTransaction(id) {
21
11
  delete this.sessions[id];
22
12
  };
23
13
 
24
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90cmFuc2FjdGlvbnMvY29tbWl0VHJhbnNhY3Rpb24udHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBDb21taXRUcmFuc2FjdGlvbiB9IGZyb20gJ3BheWxvYWQvZGF0YWJhc2UnXG5cbmV4cG9ydCBjb25zdCBjb21taXRUcmFuc2FjdGlvbjogQ29tbWl0VHJhbnNhY3Rpb24gPSBhc3luYyBmdW5jdGlvbiBjb21taXRUcmFuc2FjdGlvbihpZCkge1xuICAvLyBpZiB0aGUgc2Vzc2lvbiB3YXMgZGVsZXRlZCBpdCBoYXMgYWxyZWFkeSBiZWVuIGFib3J0ZWRcbiAgaWYgKCF0aGlzLnNlc3Npb25zW2lkXSkge1xuICAgIHJldHVyblxuICB9XG5cbiAgdHJ5IHtcbiAgICBhd2FpdCB0aGlzLnNlc3Npb25zW2lkXS5yZXNvbHZlKClcbiAgfSBjYXRjaCAoZXJyOiB1bmtub3duKSB7XG4gICAgYXdhaXQgdGhpcy5zZXNzaW9uc1tpZF0ucmVqZWN0KClcbiAgfVxu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VyblxuICB9XG5cbiAgdHJ5IHtcbiAgICBhd2FpdCB0aGlzLnNlc3Npb25zW2lkXS5yZXNvbHZlKClcbiAgfSBjYXRjaCAoZXJyOiB1bmtub3duKSB7XG4gICAgYXdhaXQgdGhpcy5zZXNzaW9uc1tpZF0ucmVqZWN0KClcbiAgfVxuXG4gIGRlbGV0ZSB0aGlzLnNlc3Npb25zW2lkXVxufVxuIl0sIm5hbWVzIjpbImNvbW1pdFRyYW5zYWN0aW9uIiwiaWQiLCJzZXNzaW9ucyIsInJlc29sdmUiLCJlcnIiLCJyZWplY3QiXSwibWFwcGluZ3MiOiJBQUVBLE9BQU8sTUFBTUEsb0JBQXVDLGVBQWVBLGtCQUFrQkMsRUFBRTtJQUNyRix5REFBeUQ7SUFDekQsSUFBSSxDQUFDLElBQUksQ0FBQ0MsUUFBUSxDQUFDRCxHQUFHLEVBQUU7UUFDdEI7SUFDRjtJQUVBLElBQUk7UUFDRixNQUFNLElBQUksQ0FBQ0MsUUFBUSxDQUFDRCxHQUFHLENBQUNFLE9BQU87SUFDakMsRUFBRSxPQUFPQyxLQUFjO1FBQ3JCLE1BQU0sSUFBSSxDQUFDRixRQUFRLENBQUNELEdBQUcsQ0FBQ0ksTUFBTTtJQUNoQztJQUVBLE9BQU8sSUFBSSxDQUFDSCxRQUFRLENBQUNELEdBQUc7QUFDMUIsRUFBQyJ9
@@ -1,14 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "rollbackTransaction", {
6
- enumerable: true,
7
- get: function() {
8
- return rollbackTransaction;
9
- }
10
- });
11
- const rollbackTransaction = async function rollbackTransaction(id = '') {
1
+ export const rollbackTransaction = async function rollbackTransaction(id = '') {
12
2
  // if multiple operations are using the same transaction, the first will flow through and delete the session.
13
3
  // subsequent calls should be ignored.
14
4
  if (!this.sessions[id]) {
@@ -20,4 +10,4 @@ const rollbackTransaction = async function rollbackTransaction(id = '') {
20
10
  delete this.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c3Npb24gcHJvbWlzZSBpbiBmYWlsdXJlIGJ5IGNhbGxpbmcgcmVqZWN0XG4gIGF3YWl0IHRoaXMuc2Vzc2lvbnNbaWRdLnJlamVjdCgpXG5cbiAgLy8gZGVsZXRlIHRoZSBzZXNzaW9uIGNhdXNpbmcgYW55IG90aGVyIG9wZXJhdGlvbnMgd2l0aCB0aGUgc2FtZSB0cmFuc2FjdGlvbiB0byBmYWlsXG4gIGRlbGV0ZSB0aGlzLnNlc3Npb25zW2lkXVxufVxuIl0sIm5hbWVzIjpbInJvbGxiYWNrVHJhbnNhY3Rpb24iLCJpZCIsInNlc3Npb25zIiwicmVqZWN0Il0sIm1hcHBpbmdzIjoiQUFFQSxPQUFPLE1BQU1BLHNCQUEyQyxlQUFlQSxvQkFDckVDLEtBQUssRUFBRTtJQUVQLDZHQUE2RztJQUM3RyxzQ0FBc0M7SUFDdEMsSUFBSSxDQUFDLElBQUksQ0FBQ0MsUUFBUSxDQUFDRCxHQUFHLEVBQUU7UUFDdEI7SUFDRjtJQUVBLHVEQUF1RDtJQUN2RCxNQUFNLElBQUksQ0FBQ0MsUUFBUSxDQUFDRCxHQUFHLENBQUNFLE1BQU07SUFFOUIsb0ZBQW9GO0lBQ3BGLE9BQU8sSUFBSSxDQUFDRCxRQUFRLENBQUNELEdBQUc7QUFDMUIsRUFBQyJ9
@@ -1,14 +1,4 @@
1
- /* eslint-disable no-param-reassign */ "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "transformHasManyNumber", {
6
- enumerable: true,
7
- get: function() {
8
- return transformHasManyNumber;
9
- }
10
- });
11
- const transformHasManyNumber = ({ field, locale, numberRows, ref })=>{
1
+ /* eslint-disable no-param-reassign */ export const transformHasManyNumber = ({ field, locale, numberRows, ref })=>{
12
2
  const result = numberRows.map(({ number })=>number);
13
3
  if (locale) {
14
4
  ref[field.name][locale] = result;
@@ -17,4 +7,4 @@ const transformHasManyNumber = ({ field, locale, numberR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lcyI6WyJ0cmFuc2Zvcm1IYXNNYW55TnVtYmVyIiwiZmllbGQiLCJsb2NhbGUiLCJudW1iZXJSb3dzIiwicmVmIiwicmVzdWx0IiwibWFwIiwibnVtYmVyIiwibmFtZSJdLCJtYXBwaW5ncyI6IkFBQUEsb0NBQW9DLEdBVXBDLE9BQU8sTUFBTUEseUJBQXlCLENBQUMsRUFBRUMsS0FBSyxFQUFFQyxNQUFNLEVBQUVDLFVBQVUsRUFBRUMsR0FBRyxFQUFRO0lBQzdFLE1BQU1DLFNBQVNGLFdBQVdHLEdBQUcsQ0FBQyxDQUFDLEVBQUVDLE1BQU0sRUFBRSxHQUFLQTtJQUU5QyxJQUFJTCxRQUFRO1FBQ1ZFLEdBQUcsQ0FBQ0gsTUFBTU8sSUFBSSxDQUFDLENBQUNOLE9BQU8sR0FBR0c7SUFDNUIsT0FBTztRQUNMRCxHQUFHLENBQUNILE1BQU1PLElBQUksQ0FBQyxHQUFHSDtJQUNwQjtBQUNGLEVBQUMifQ==
@@ -1,14 +1,4 @@
1
- /* eslint-disable no-param-reassign */ "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "transformHasManyText", {
6
- enumerable: true,
7
- get: function() {
8
- return transformHasManyText;
9
- }
10
- });
11
- const transformHasManyText = ({ field, locale, textRows, ref })=>{
1
+ /* eslint-disable no-param-reassign */ export const transformHasManyText = ({ field, locale, textRows, ref })=>{
12
2
  const result = textRows.map(({ text })=>text);
13
3
  if (locale) {
14
4
  ref[field.name][locale] = result;
@@ -17,4 +7,4 @@ const transformHasManyText = ({ field, locale, textRows, ref })=>{
17
7
  }
18
8
  };
19
9
 
20
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vcmVhZC9oYXNNYW55VGV4dC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyIvKiBlc2xpbnQtZGlzYW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UFBRUMsS0FBSyxFQUFFQyxNQUFNLEVBQUVDLFFBQVEsRUFBRUMsR0FBRyxFQUFRO0lBQ3pFLE1BQU1DLFNBQVNGLFNBQVNHLEdBQUcsQ0FBQyxDQUFDLEVBQUVDLElBQUksRUFBRSxHQUFLQTtJQUUxQyxJQUFJTCxRQUFRO1FBQ1ZFLEdBQUcsQ0FBQ0gsTUFBTU8sSUFBSSxDQUFDLENBQUNOLE9BQU8sR0FBR0c7SUFDNUIsT0FBTztRQUNMRCxHQUFHLENBQUNILE1BQU1PLElBQUksQ0FBQyxHQUFHSDtJQUNwQjtBQUNGLEVBQUMifQ==
@@ -1,35 +1,27 @@
1
- /* eslint-disable no-param-reassign */ "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "transform", {
6
- enumerable: true,
7
- get: function() {
8
- return transform;
9
- }
10
- });
11
- const _createBlocksMap = require("../../utilities/createBlocksMap");
12
- const _createRelationshipMap = require("../../utilities/createRelationshipMap");
13
- const _traverseFields = require("./traverseFields");
14
- const transform = ({ config, data, fields })=>{
1
+ /* eslint-disable no-param-reassign */ import { createBlocksMap } from '../../utilities/createBlocksMap';
2
+ import { createPathMap } from '../../utilities/createRelationshipMap';
3
+ import { traverseFields } from './traverseFields';
4
+ // This is the entry point to transform Drizzle output data
5
+ // into the shape Payload expects based on field schema
6
+ export const transform = ({ config, data, fields })=>{
15
7
  let relationships = {};
16
8
  let texts = {};
17
9
  let numbers = {};
18
10
  if ('_rels' in data) {
19
- relationships = (0, _createRelationshipMap.createPathMap)(data._rels);
11
+ relationships = createPathMap(data._rels);
20
12
  delete data._rels;
21
13
  }
22
14
  if ('_texts' in data) {
23
- texts = (0, _createRelationshipMap.createPathMap)(data._texts);
15
+ texts = createPathMap(data._texts);
24
16
  delete data._texts;
25
17
  }
26
18
  if ('_numbers' in data) {
27
- numbers = (0, _createRelationshipMap.createPathMap)(data._numbers);
19
+ numbers = createPathMap(data._numbers);
28
20
  delete data._numbers;
29
21
  }
30
- const blocks = (0, _createBlocksMap.createBlocksMap)(data);
22
+ const blocks = createBlocksMap(data);
31
23
  const deletions = [];
32
- const result = (0, _traverseFields.traverseFields)({
24
+ const result = traverseFields({
33
25
  blocks,
34
26
  config,
35
27
  dataRef: {
@@ -48,4 +40,4 @@ const transform = ({ config, data, fields })=>{
48
40
  return result;
49
41
  };
50
42
 
51
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vcmVhZC9pbmRleC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyIvKiBlc2xpbnQtZGlzYWJsZSBuby1wYXJhbS1yZWFzc2lnbiAqL1xuaW1wb3J0IHR5cGUgeyBTYW5pdGl6ZWRDb25maWcgfSBmcm9tICdwYXlsb2FkL2NvbmZpZydcbmltcG9ydCB0eXBlIHsgRmllbGQsIFR5cGVXaXRoSUQgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgeyBjcmVhdGVCbG9ja3NNYXAgfSBmcm9tICcuLi8uLi91dGlsaXRpZXMvY3JlYXRlQmxvY2tzTWFwJ1xuaW1wb3J0IHsgY3JlYXRlUGF0aE1hcCB9IGZyb20gJy4uLy4uL3V0aWxpdGllcy9jcmVhdGVSZWxhdGlvbnNoaXBNYXAnXG5pbXBvcnQgeyB0cmF2ZXJzZUZpZWxkcyB9IGZyb20gJy4vdHJhdmVyc2VGaWVsZHMnXG5cbnR5cGUgVHJhbnNmb3JtQXJncyA9IHtcbiAgY29uZmlnOiBTYW5pdGl6ZWRDb25maWdcbiAgZGF0YTogUmVjb3JkPHN0cmluZywgdW5rbm93bj5cbiAgZmFsbGJhY2tMb2NhbGU/OiBmYWxzZSB8IHN0cmluZ1xuICBmaWVsZHM6IEZpZWxkW11cbiAgbG9jYWxlPzogc3RyaW5nXG59XG5cbi8vIFRoaXMgaXMgdGhlIGVudHJ5IHBvaW50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UNDLFdBQWFBO0lBRWhDLE9BQU9QO0FBQ1QsRUFBQyJ9
@@ -1,14 +1,4 @@
1
- /* eslint-disable no-param-reassign */ "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "transformRelationship", {
6
- enumerable: true,
7
- get: function() {
8
- return transformRelationship;
9
- }
10
- });
11
- const transformRelationship = ({ field, locale, ref, relations })=>{
1
+ /* eslint-disable no-param-reassign */ export const transformRelationship = ({ field, locale, ref, relations })=>{
12
2
  let result;
13
3
  if (!('hasMany' in field) || field.hasMany === false) {
14
4
  const relation = relations[0];
@@ -71,4 +61,4 @@ const transformRelationship = ({ field, locale, ref, relations })=>{
71
61
  }
72
62
  };
73
63
 
74
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vcmVhZC9yZWxhdGlvbnNoaXAudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcGFyYW0tcmVhc3NpZ24gKi9cbmltcG9ydCB0eXBlIHsgUmVsYXRpb25zaGlwRmllbGQsIFVwbG9hZEZpZWxkIH0gZnJvbSAncGF5bG9hZC90eXBlcydcblxudHlwZSBBcmdzID0ge1xuICBmaWVsZDogUmVsYXRpb25zaGlwRmllbGQgfCBVcGxvYWRGaWVsZFxuICBsb2NhbGU/OiBzdHJpbmdcbiAgcmVmOiBSZWNvcmQ8c3RyaW5nLCB1bmtub3duPlxuICByZWxhdGlvbnM6IFJlY29yZDxzdHJpbmcsIHVua25vd24+W11cbn1cblxuZXhwb3J0IGNvbnN0IHRyYW5zZm9ybVJlbGF0aW9uc2hpcCA9ICh7IGZpZWxkLCBsb2NhbGUsIHJlZiwgcmVsYXRpb25zIH06IEFyZ3MpID0+IHtcbiAgbGV0IHJlc3VsdDogdW5rbm93blxuXG4gIGlmICghKCdoYXNNYW55JyBpbiBmaWVsZCkg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kLnJlbGF0aW9uVG8pKSB7XG4gICAgICAgIGNvbnN0IG1hdGNoZWRSZWxhdGlvbiA9IE9iamVjdC5lbnRyaWVzKHJlbGF0aW9uKS5maW5kKFxuICAgICAgICAgIChba2V5LCB2YWxdKSA9PlxuICAgICAgICAgICAgdmFsICE9PSBudWxsICYmICFbJ2lkJywgJ2xvY2FsZScsICdvcmRlcicsICdwYXJlbnQnLCAncGF0aCddLmluY2x1ZGVzKGtleSksXG4gICAgICAgIClcblxuICAgICAgICBpZiAobWF0Y2hlZFJlbGF0aW9uKSB7XG4gICAgICAgICAgY29uc3QgcmVsYXRpb25UbyA9IG1hdGNoZWRSZWxhdGlvblswXS5yZXBsYWNlKCdJRCcsICcnKVxuXG4gICAgICAgICAgcmVzdWx0ID0ge1xuICAgICAgICAgICAgcmVsYXRpb25UbyxcbiAgICAgICAgICAgIHZhbHVlOiBtYXRjaGVkUmVsYXRpb25bMV0sXG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICAvLyBIYW5kbGUgaGFzT25lXG4gICAgICAgIGNvbnN0IHJlbGF0ZWREYXRhID0gcmVsYXRpb25bYCR7ZmllbGQucmVsYXRpb25Ub31JRGBdXG4gICAgICAgIHJlc3VsdCA9IHJlbGF0ZWREYXRhXG4gICAgICB9XG4gICAgfVxuICB9IGVsc2Uge1xuICAgIGNvbnN0IHRyYW5zZm9ybWVkUmVsYXRpb25zID0gW11cblxuICAgIHJlbGF0aW9ucy5mb3JFYWNoKChyZWxhdGlvbikgPT4ge1xuICAgICAgLy8gSGFuZGxlIGhhc01hbnlcbiAgICAgIGlmICghQXJyYXkuaXNBcnJheShmaWVsZC5yZWxhdGlvblRvKSkge1xuICAgICAgICBjb25zdCByZWxhdGVkRGF0YSA9IHJlbGF0aW9uW2Ake2ZpZWxkLnJlbGF0aW9uVG99SURgXVxuXG4gICAgICAgIGlmIChyZWxhdGVkRGF0YSkge1xuICAgICAgICAgIHRyYW5zZm9yb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yJ9
@@ -1,18 +1,10 @@
1
- /* eslint-disable no-param-reassign */ "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "traverseFields", {
6
- enumerable: true,
7
- get: function() {
8
- return traverseFields;
9
- }
10
- });
11
- const _types = require("payload/types");
12
- const _hasManyNumber = require("./hasManyNumber");
13
- const _hasManyText = require("./hasManyText");
14
- const _relationship = require("./relationship");
15
- const traverseFields = ({ blocks, config, dataRef, deletions, fieldPrefix, fields, numbers, path, relationships, table, texts })=>{
1
+ /* eslint-disable no-param-reassign */ import { fieldAffectsData } from 'payload/types';
2
+ import { transformHasManyNumber } from './hasManyNumber';
3
+ import { transformHasManyText } from './hasManyText';
4
+ import { transformRelationship } from './relationship';
5
+ // Traverse fields recursively, transforming data
6
+ // for each field type into required Payload shape
7
+ export const traverseFields = ({ blocks, config, dataRef, deletions, fieldPrefix, fields, numbers, path, relationships, table, texts })=>{
16
8
  const sanitizedPath = path ? `${path}.` : path;
17
9
  const formatted = fields.reduce((result, field)=>{
18
10
  if (field.type === 'tabs') {
@@ -48,7 +40,7 @@ const traverseFields = ({ blocks, config, dataRef, deletions, fieldPrefix, field
48
40
  texts
49
41
  });
50
42
  }
51
- if ((0, _types.fieldAffectsData)(field)) {
43
+ if (fieldAffectsData(field)) {
52
44
  const fieldName = `${fieldPrefix || ''}${field.name}`;
53
45
  const fieldData = table[fieldName];
54
46
  if (fieldPrefix) {
@@ -206,7 +198,7 @@ const traverseFields = ({ blocks, config, dataRef, deletions, fieldPrefix, field
206
198
  }
207
199
  });
208
200
  Object.entries(relationsByLocale).forEach(([locale, relations])=>{
209
- (0, _relationship.transformRelationship)({
201
+ transformRelationship({
210
202
  field,
211
203
  locale,
212
204
  ref: result,
@@ -214,7 +206,7 @@ const traverseFields = ({ blocks, config, dataRef, deletions, fieldPrefix, field
214
206
  });
215
207
  });
216
208
  } else {
217
- (0, _relationship.transformRelationship)({
209
+ transformRelationship({
218
210
  field,
219
211
  ref: result,
220
212
  relations: relationPathMatch
@@ -235,7 +227,7 @@ const traverseFields = ({ blocks, config, dataRef, deletions, fieldPrefix, field
235
227
  }
236
228
  });
237
229
  Object.entries(textsByLocale).forEach(([locale, texts])=>{
238
- (0, _hasManyText.transformHasManyText)({
230
+ transformHasManyText({
239
231
  field,
240
232
  locale,
241
233
  ref: result,
@@ -243,7 +235,7 @@ const traverseFields = ({ blocks, config, dataRef, deletions, fieldPrefix, field
243
235
  });
244
236
  });
245
237
  } else {
246
- (0, _hasManyText.transformHasManyText)({
238
+ transformHasManyText({
247
239
  field,
248
240
  ref: result,
249
241
  textRows: textPathMatch
@@ -264,7 +256,7 @@ const traverseFields = ({ blocks, config, dataRef, deletions, fieldPrefix, field
264
256
  }
265
257
  });
266
258
  Object.entries(numbersByLocale).forEach(([locale, numbers])=>{
267
- (0, _hasManyNumber.transformHasManyNumber)({
259
+ transformHasManyNumber({
268
260
  field,
269
261
  locale,
270
262
  numberRows: numbers,
@@ -272,7 +264,7 @@ const traverseFields = ({ blocks, config, dataRef, deletions, fieldPrefix, field
272
264
  });
273
265
  });
274
266
  } else {
275
- (0, _hasManyNumber.transformHasManyNumber)({
267
+ transformHasManyNumber({
276
268
  field,
277
269
  numberRows: numberPathMatch,
278
270
  ref: result
@@ -426,4 +418,4 @@ const traverseFields = ({ blocks, config, dataRef, deletions, fieldPrefix, field
426
418
  return formatted;
427
419
  };
428
420
 
429
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vcmVhZC90cmF2ZXJzZUZpZWxkcy50cyJdLCJzb3VyY2VzQ29udGVudCI6WyIvKiBlc2xpbnQtZGlzYWJsZSBuby1wYXJhbS1yZWFzc2lnbiAqL1xuaW1wb3J0IHR5cGUgeyBTYW5pdGl6ZWRDb25maWcgfSBmcm9tICdwYXlsb2FkL2NvbmZpZydcbmltcG9ydCB0eXBlIHsgRmllbGQ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b2xsYXBzaWJsZScgfHxcbiAgICAgIGZpZWxkLnR5cGUgPT09ICdyb3cnIHx8XG4gICAgICAoZmllbGQudHlwZSA9PT0gJ3RhYicgJiYgISgnbmFtZScgaW4gZmllbGQpKVxuICAgICkge1xuICAgICAgdHJhdmVyc2VGaWVsZHMoe1xuICAgICAgICBibG9ja3MsXG4gICAgICAgIGNvbmZpZyxcbiAgICAgICAgZGF0YVJlZixcbiAgICAgICAgZGVsZXRpb25zLFxuICAgICAgICBmaWVsZFByZWZpeCxcbiAgICAgICAgZmllbGRzOiBmaWVsZC5maWVsZHMsXG4gICAgICAgIG51bWJlcnMsXG4gICAgICAgIHBhdGgsXG4gICAgICAgIHJlbGF0aW9uc2hpcHMsXG4gICAgICAgIHRhYmxlLFxuICAgICAgICB0ZXh0cyxcbiAgICAgIH0pXG4gICAgfVxuXG4gICAgaWYgKGZpZWxkQWZmZWN0c0RhdGEoZmllbGQpKSB7XG4gICAgICBjb25zdCBmaWVsZE5hbWUgPSBgJHtmaWVsZFByZWZpeCB8fCAnJ30ke2ZpZWxkLm5hbWV9YFxuICAgICAgY29uc3QgZmllbGREYXRhID0gdGFibGVbZmllbGROYW1lXVxuXG4gICAgICBpZiAoZmllbGRQcmVmaXgpIHtcbiAgICAgICAgZGVsZXRpb25zLnB1c2goKCkgPT4gZGVsZXRlIHRhYmxlW2ZpZWxkTmFtZV0pXG4gICAgICB9XG5cbiAgICAgIGlmIChmaWVsZC50eXBlID09PSAnYXJyYXknKSB7XG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KGZpZWxkRGF0YSkpIHtcbiAgICAgICAgICBpZiAoZmllbGQubG9jYWxpemVkKSB7XG4gICAgICAgICAgICByZXN1bHRbZmllbGQubmFtZV0gPSBmaWVsZERhdGEucmVkdWNlKChhcnJheVJlc3VsdCwgcm93KSA9PiB7XG4gICAgICAgICAgICAgIGlmICh0eXBlb2Ygcm93Ll9sb2NhbGUgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFhcnJheVJlc3VsdFtyb3cuX2xvY2FsZV0pIGFycmF5UmVzdWx0W3Jvdy5fbG9jYWxlXSA9IFtdXG4gICAgICAgICAgICAgICAgY29uc3QgbG9jYWxlID0gcm93Ll9sb2NhbGVcbiAgICAgICAgICAgICAgICBjb25zdCBkYXRhID0ge31cbiAgICAgICAgICAgICAgICBkZWxldGUgcm93Ll9sb2NhbGVcbiAgICAgICAgICAgICAgICBpZiAocm93Ll91dWlkKSB7XG4gICAgICAgICAgICAgICAgICByb3cuaWQgPSByb3cuX3V1aWRcbiAgICAgICAgICAgICAgICAgIGRlbGV0ZSByb3cuX3V1aWRcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBjb25zdCByb3dSZXN1bHQgPSB0cmF2ZXJzZUZpZWxkczxUPih7XG4gICAgICAgICAgICAgICAgICBibG9ja3MsXG4gICAgICAgICAgICAgICAgICBjb25maWcsXG4gICAgICAgICAgICAgICAgICBkYXRhUmVmOiBkYXRhLFxuICAgICAgICAgICAgICAgICAgZGVsZXRpb25zLFxuICAgICAgICAgICAgICAgICAgZmllbGRQcmVmaXg6ICcnLFxuICAgICAgICAgICAgICAgICAgZmllbGRzOiBmaWVsZC5maWVsZHMsXG4gICAgICAgICAgICAgICAgICBudW1iZXJzLFxuICAgICAgICAgICAgICAgICAgcGF0aDogYCR7c2FuaXRpemVkUGF0aH0ke2ZpZWxkLm5hbWV9LiR7cm93Ll9vcmRlciAtIDF9YCxcbiAgICAgICAgICAgICAgICAgIHJlbGF0aW9uc2hpcHMsXG4gICAgICAgICAgICAgICAgICB0YWJsZTogcm93LFxuICAgICAgICAgICAgICAgICAgdGV4dHMsXG4gICAgICAgICAgICAgICAgfSlcblxuICAgICAgICAgICAgICAgIGlmICgnX29yZGVyJyBpbiByb3dSZXN1bHQpIHtcbiAgICAgICAgICAgICAgICAgIGRlbGV0ZSByb3dSZXN1bHQuX29yZGVyXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgYXJyYXlSZXN1bHRbbG9jYWxlXS5wdXNoKHJvd1Jlc3VsdClcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIHJldHVybiBhcnJheVJlc3VsdFxuICAgICAgICAgICAgfSwge30pXG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJlc3VsdFtmaWVsZC5uYW1lXSA9IGZpZWxkRGF0YS5tYXAoKHJvdywgaSkgPT4ge1xuICAgICAgICAgICAgICBpZiAocm93Ll91dWlkKSB7XG4gICAgICAgICAgICAgICAgcm93LmlkID0gcm93Ll91dWlkXG4gICAgICAgICAgICAgICAgZGVsZXRlIHJvdy5fdXVpZFxuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgaWYgKCdfb3JkZXInIGluIHJvdykge1xuICAgICAgICAgICAgICAgIGRlbGV0ZSByb3cuX29yZGVyXG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICByZXR1cm4gdHJhdmVyc2VGaWVsZHM8VD4oe1xuICAgICAgICAgICAgICAgIGJsb2NrcyxcbiAgICAgICAgICAgICAgICBjb25maWcsXG4gICAgICAgICAgICAgICAgZGF0YVJlZjogcm93LFxuICAgICAgICAgICAgICAgIGRlbGV0aW9ucyxcbiAgICAgICAgICAgICAgICBmaWVsZFByZWZpeDogJycsXG4gICAgICAgICAgICAgICAgZmllbGRzOiBmaWVsZC5maWVsZHMsXG4gICAgICAgICAgICAgICAgbnVtYmVycyxcbiAgICAgICAgICAgICAgICBwYXRoOiBgJHtzYW5pdGl6ZWRQYXRofSR7ZmllbGQubmFtZX0uJHtpfWAsXG4gICAgICAgICAgICAgICAgcmVsYXRpb25zaGlwcyxcbiAgICAgICAgICAgICAgICB0YWJsZTogcm93LFxuICAgICAgICAgICAgICAgIHRleHRzLFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcm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2Nrcy5tYXAoKHJvdykgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IGJsb2NrID0gZmllbGQuYmxvY2tzLmZpbmQoKHsgc2x1ZyB9KSA9PiBzbHVnID09PSByb3cuYmxvY2tUeXBlKVxuXG4gICAgICAgICAgICAgICAgaWYgKGJsb2NrKSB7XG4gICAgICAgICAgICAgICAgICBjb25zdCBibG9ja1Jlc3VsdCA9IHRyYXZlcnNlRmllbGRzPFQ+KHtcbiAgICAgICAgICAgICAgICAgICAgYmxvY2tzLFxuICAgICAgICAgICAgICAgICAgICBjb25maWcsXG4gICAgICAgICAgICAgICAgICAgIGRhdGFSZWY6IHJvdyxcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRpb25zLFxuICAgICAgICAgICAgICAgICAgICBmaWVsZFByZWZpeDogJycsXG4gICAgICAgICAgICAgICAgICAgIGZpZWxkczogYmxvY2suZmllbGRzLFxuICAgICAgICAgICAgICAgICAgICBudW1iZXJzLFxuICAgICAgICAgICAgICAgICAgICBwYXRoOiBgJHtibG9ja0ZpZWxkUGF0aH0uJHtyb3cuX29yZGVyIC0gMX1gLFxuICAgICAgICAgICAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgICAgICAgICB0YWJsZTogcm93LFxuICAgICAgICAgICAgICAgICAgICB0ZXh0cyxcbiAgICAgICAgICAgICAgICAgIH0pXG5cbiAgICAgICAgICAgICAgICAgIGRlbGV0ZSBibG9ja1Jlc3VsdC5fb3JkZXJcbiAgICAgICAgICAgICAgICAgIHJldHVybiBibG9ja1Jlc3VsdFxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHJldHVybiB7fVxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0gYmxvY2tzW2Jsb2NrRmllbGRQYXRoXS5tYXAoKHJvdywgaSkgPT4ge1xuICAgICAgICAgICAgICBkZWxldGUgcm93Ll9vcmRlclxuICAgICAgICAgICAgICBpZiAocm93Ll91dWlkKSB7XG4gICAgICAgICAgICAgICAgcm93LmlkID0gcm93Ll91dWlkXG4gICAgICAgICAgICAgICAgZGVsZXRlIHJvdy5fdXVpZFxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGNvbnN0IGJsb2NrID0gZmllbGQuYmxvY2tzLmZpbmQoKHsgc2x1ZyB9KSA9PiBzbHVnID09PSByb3cuYmxvY2tUeXBlKVxuXG4gICAgICAgICAgICAgIGlmIChibG9jaykge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cmF2ZXJzZUZpZWxkczxUPih7XG4gICAgICAgICAgICAgICAgICBibG9ja3MsXG4gICAgICAgICAgICAgICAgICBjb25maWcsXG4gICAgICAgICAgICAgICAgICBkYXRhUmVmOiByb3csXG4gICAgICAgICAgICAgICAgICBkZWxldGlvbnMsXG4gICAgICAgICAgICAgICAgICBmaWVsZFByZWZpeDogJycsXG4gICAgICAgICAgICAgICAgICBmaWVsZHM6IGJsb2NrLmZpZWxkcyxcbiAgICAgICAgICAgICAgICAgIG51bWJlcnMsXG4gICAgICAgICAgICAgICAgICBwYXRoOiBgJHtibG9ja0ZpZWxkUGF0aH0uJHtpfWAsXG4gICAgICAgICAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgICAgICAgdGFibGU6IHJvdyxcbiAgICAgICAgICAgICAgICAgIHRleHRzLFxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICByZXR1cm4ge31cbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHJlc3VsdFxuICAgICAgfVxuXG4gICAgICBpZiAoZmllbGQudHlwZSA9PT0gJ3JlbGF0aW9uc2hpcCcgfHwgZmllbGQudHlwZSA9PT0gJ3VwbG9hZCcpIHtcbiAgICAgICAgY29uc3QgcmVsYXRpb25QYXRoTWF0Y2ggPSByZWxhdGlvbnNoaXBzW2Ake3Nhbml0aXplZFBhdGh9JHtmaWVsZC5uYW1lfWBdXG4gICAgICAgIGlmICghcmVsYXRpb25QYXRoTWF0Y2gpIHtcbiAgICAgICAgICBpZiAoJ2hhc01hbnknIGluIGZpZWxkICYmIGZpZWxkLmhhc01hbnkpIHtcbiAgICAgICAgICAgIGlmIChmaWVsZC5sb2NhbGl6ZWQgJiYgY29uZmlnLmxvY2FsaXphdGlvbiAmJiBjb25maWcubG9jYWxpemF0aW9uLmxvY2FsZXMpIHtcbiAgICAgICAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0ge1xuICAgICAgICAgICAgICAgIFtjb25maWcubG9jYWxpemF0aW9uLmRlZmF1bHRMb2NhbGVdOiBbXSxcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0gW11cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4gcmVzdWx0XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZmllbGQubG9jYWxpemVkKSB7XG4gICAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0ge31cbiAgICAgICAgICBjb25zdCByZWxhdGlvbnNCeUxvY2FsZTogUmVjb3JkPHN0cmluZywgUmVjb3JkPHN0cmluZywgdW5rbm93bj5bXT4gPSB7fVxuXG4gICAgICAgICAgcmVsYXRpb25QYXRoTWF0Y2guZm9yRWFjaCgocm93KSA9PiB7XG4gICAgICAgICAgICBpZiAodHlwZW9mIHJvdy5sb2NhbGUgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgIGlmICghcmVsYXRpb25zQnlMb2NhbGVbcm93LmxvY2FsZV0pIHJlbGF0aW9uc0J5TG9jYWxlW3Jvdy5sb2NhbGVdID0gW11cbiAgICAgICAgICAgICAgcmVsYXRpb25zQnlMb2NhbGVbcm93LmxvY2FsZV0ucHVzaChyb3cpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSlcblxuICAgICAgICAgIE9iamVjdC5lbnRyaWVzKHJlbGF0aW9uc0J5TG9jYWxlKS5mb3JFYWNoKChbbG9jYWxlLCByZWxhdGlvbnNdKSA9PiB7XG4gICAgICAgICAgICB0cmFuc2Zvcm1SZWxhdGlvbnNoaXAoe1xuICAgICAgICAgICAgICBmaWVsZCxcbiAgICAgICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgICAgICByZWY6IHJlc3VsdCxcbiAgICAgICAgICAgICAgcmVsYXRpb25zLFxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9KVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHRyYW5zZm9ybVJlbGF0aW9uc2hpcCh7XG4gICAgICAgICAgICBmaWVsZCxcbiAgICAgICAgICAgIHJlZjogcmVzdWx0LFxuICAgICAgICAgICAgcmVsYXRpb25zOiByZWxhdGlvblBhdGhNYXRjaCxcbiAgICAgICAgICB9KVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHJlc3VsdFxuICAgICAgfVxuXG4gICAgICBpZiAoZmllbGQudHlwZSA9PT0gJ3RleHQnICYmIGZpZWxkPy5oYXNNYW55KSB7XG4gICAgICAgIGNvbnN0IHRleHRQYXRoTWF0Y2ggPSB0ZXh0c1tgJHtzYW5pdGl6ZWRQYXRofSR7ZmllbGQubmFtZX1gXVxuICAgICAgICBpZiAoIXRleHRQYXRoTWF0Y2gpIHJldHVybiByZXN1bHRcblxuICAgICAgICBpZiAoZmllbGQubG9jYWxpemVkKSB7XG4gICAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0ge31cbiAgICAgICAgICBjb25zdCB0ZXh0c0J5TG9jYWxlOiBSZWNvcmQ8c3RyaW5nLCBSZWNvcmQ8c3RyaW5nLCB1bmtub3duPltdPiA9IHt9XG5cbiAgICAgICAgICB0ZXh0UGF0aE1hdGNoLmZvckVhY2goKHJvdykgPT4ge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiByb3cubG9jYWxlID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICBpZiAoIXRleHRzQnlMb2NhbGVbcm93LmxvY2FsZV0pIHRleHRzQnlMb2NhbGVbcm93LmxvY2FsZV0gPSBbXVxuICAgICAgICAgICAgICB0ZXh0c0J5TG9jYWxlW3Jvdy5sb2NhbGVdLnB1c2gocm93KVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pXG5cbiAgICAgICAgICBPYmplY3QuZW50cmllcyh0ZXh0c0J5TG9jYWxlKS5mb3JFYWNoKChbbG9jYWxlLCB0ZXh0c10pID0+IHtcbiAgICAgICAgICAgIHRyYW5zZm9ybUhhc01hbnlUZXh0KHtcbiAgICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICAgICAgcmVmOiByZXN1bHQsXG4gICAgICAgICAgICAgIHRleHRSb3dzOiB0ZXh0cyxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfSlcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB0cmFuc2Zvcm1IYXNNYW55VGV4dCh7XG4gICAgICAgICAgICBmaWVsZCxcbiAgICAgICAgICAgIHJlZjogcmVzdWx0LFxuICAgICAgICAgICAgdGV4dFJvd3M6IHRleHRQYXRoTWF0Y2gsXG4gICAgICAgICAgfSlcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiByZXN1bHRcbiAgICAgIH1cblxuICAgICAgaWYgKGZpZWxkLnR5cGUgPT09ICdudW1iZXInICYmIGZpZWxkLmhhc01hbnkpIHtcbiAgICAgICAgY29uc3QgbnVtYmVyUGF0aE1hdGNoID0gbnVtYmVyc1tgJHtzYW5pdGl6ZWRQYXRofSR7ZmllbGQubmFtZX1gXVxuICAgICAgICBpZiAoIW51bWJlclBhdGhNYXRjaCkgcmV0dXJuIHJlc3VsdFxuXG4gICAgICAgIGlmIChmaWVsZC5sb2NhbGl6ZWQpIHtcbiAgICAgICAgICByZXN1bHRbZmllbGQubmFtZV0gPSB7fVxuICAgICAgICAgIGNvbnN0IG51bWJlcnNCeUxvY2FsZTogUmVjb3JkPHN0cmluZywgUmVjb3JkPHN0cmluZywgdW5rbm93bj5bXT4gPSB7fVxuXG4gICAgICAgICAgbnVtYmVyUGF0aE1hdGNoLmZvckVhY2goKHJvdykgPT4ge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiByb3cubG9jYWxlID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICBpZiAoIW51bWJlcnNCeUxvY2FsZVtyb3cubG9jYWxlXSkgbnVtYmVyc0J5TG9jYWxlW3Jvdy5sb2NhbGVdID0gW11cbiAgICAgICAgICAgICAgbnVtYmVyc0J5TG9jYWxlW3Jvdy5sb2NhbGVdLnB1c2gocm93KVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pXG5cbiAgICAgICAgICBPYmplY3QuZW50cmllcyhudW1iZXJzQnlMb2NhbGUpLmZvckVhY2goKFtsb2NhbGUsIG51bWJlcnNdKSA9PiB7XG4gICAgICAgICAgICB0cmFuc2Zvcm1IYXNNYW55TnVtYmVyKHtcbiAgICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICAgICAgbnVtYmVyUm93czogbnVtYmVycyxcbiAgICAgICAgICAgICAgcmVmOiByZXN1bHQsXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH0pXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdHJhbnNmb3JtSGFzTWFueU51bWJlcih7XG4gICAgICAgICAgICBmaWVsZCxcbiAgICAgICAgICAgIG51bWJlclJvd3M6IG51bWJlclBhdGhNYXRjaCxcbiAgICAgICAgICAgIHJlZjogcmVzdWx0LFxuICAgICAgICAgIH0pXG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcmVzdWx0XG4gICAgICB9XG5cbiAgICAgIGlmIChmaWVsZC50eXBlID09PSAnc2VsZWN0JyAmJiBmaWVsZC5oYXNNYW55KSB7XG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KGZpZWxkRGF0YSkpIHtcbiAgICAgICAgICBpZiAoZmllbGQubG9jYWxpemVkKSB7XG4gICAgICAgICAgICByZXN1bHRbZmllbGQubmFtZV0gPSBmaWVsZERhdGEucmVkdWNlKChzZWxlY3RSZXN1bHQsIHJvdykgPT4ge1xuICAgICAgICAgICAgICBpZiAodHlwZW9mIHJvdy5sb2NhbGUgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFzZWxlY3RSZXN1bHRbcm93LmxvY2FsZV0pIHNlbGVjdFJlc3VsdFtyb3cubG9jYWxlXSA9IFtdXG4gICAgICAgICAgICAgICAgc2VsZWN0UmVzdWx0W3Jvdy5sb2NhbGVdLnB1c2gocm93LnZhbHVlKVxuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgcmV0dXJuIHNlbGVjdFJlc3VsdFxuICAgICAgICAgICAgfSwge30pXG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJlc3VsdFtmaWVsZC5uYW1lXSA9IGZpZWxkRGF0YS5tYXAoKHsgdmFsdWUgfSkgPT4gdmFsdWUpXG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiByZXN1bHRcbiAgICAgIH1cblxuICAgICAgY29uc3QgbG9jYWxpemVkRmllbGREYXRhID0ge31cbiAgICAgIGNvbnN0IHZhbHVlc1RvVHJhbnNmb3JtOiB7XG4gICAgICAgIHJlZjogUmVjb3JkPHN0cmluZywgdW5rbm93bj5cbiAgICAgICAgdGFibGU6IFJlY29yZDxzdHJpbmcsIHVua25vd24+XG4gICAgICB9W10gPSBbXVxuXG4gICAgICBpZiAoZmllbGQubG9jYWxpemVkICYmIEFycmF5LmlzQXJyYXkodGFibGUuX2xvY2FsZXMpKSB7XG4gICAgICAgIH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VwTG9jYWxlXSA9IHRyYXZlcnNlRmllbGRzPFJlY29yZDxzdHJpbmcsIHVua25vd24+Pih7XG4gICAgICAgICAgICAgICAgICBibG9ja3MsXG4gICAgICAgICAgICAgICAgICBjb25maWcsXG4gICAgICAgICAgICAgICAgICBkYXRhUmVmOiBncm91cExvY2FsZURhdGEgYXMgUmVjb3JkPHN0cmluZywgdW5rbm93bj4sXG4gICAgICAgICAgICAgICAgICBkZWxldGlvbnMsXG4gICAgICAgICAgICAgICAgICBmaWVsZFByZWZpeDogZ3JvdXBGaWVsZFByZWZpeCxcbiAgICAgICAgICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgICAgICAgICAgbnVtYmVycyxcbiAgICAgICAgICAgICAgICAgIHBhdGg6IGAke3Nhbml0aXplZFBhdGh9JHtmaWVsZC5uYW1lfWAsXG4gICAgICAgICAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgICAgICAgdGFibGUsXG4gICAgICAgICAgICAgICAgICB0ZXh0cyxcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICBpZiAoJ19vcmRlcicgaW4gcmVmKSB7XG4gICAgICAgICAgICAgICAgZGVsZXRlIHJlZi5fb3JkZXJcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgY29uc3QgZ3JvdXBEYXRhID0ge31cblxuICAgICAgICAgICAgICByZWZbZmllbGQubmFtZV0gPSB0cmF2ZXJzZUZpZWxkczxSZWNvcmQ8c3RyaW5nLCB1bmtub3duPj4oe1xuICAgICAgICAgICAgICAgIGJsb2NrcyxcbiAgICAgICAgICAgICAgICBjb25maWcsXG4gICAgICAgICAgICAgICAgZGF0YVJlZjogZ3JvdXBEYXRhIGFzIFJlY29yZDxzdHJpbmcsIHVua25vd24+LFxuICAgICAgICAgICAgICAgIGRlbGV0aW9ucyxcbiAgICAgICAgICAgICAgICBmaWVsZFByZWZpeDogZ3JvdXBGaWVsZFByZWZpeCxcbiAgICAgICAgICAgICAgICBmaWVsZHM6IGZpZWxkLmZpZWxkcyxcbiAgICAgICAgICAgICAgICBudW1iZXJzLFxuICAgICAgICAgICAgICAgIHBhdGg6IGAke3Nhbml0aXplZFBhdGh9JHtmaWVsZC5uYW1lfWAsXG4gICAgICAgICAgICAgICAgcmVsYXRpb25zaGlwcyxcbiAgICAgICAgICAgICAgICB0YWJsZSxcbiAgICAgICAgICAgICAgICB0ZXh0cyxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgaWYgKCdfb3JkZXInIGluIHJlZikge1xuICAgICAgICAgICAgICAgIGRlbGV0ZSByZWYuX29yZGVyXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBjYXNlICd0ZXh0Jzoge1xuICAgICAgICAgICAgbGV0IHZhbCA9IGZpZWxkRGF0YVxuICAgICAgICAgICAgaWYgKHR5cGVvZiBmaWVsZERhdGEgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgIHZhbCA9IFN0cmluZyhmaWVsZERhdGEpXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh0eXBlb2YgbG9jYWxlID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICByZWZbbG9jYWxlXSA9IHZhbFxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0gdmFsXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY2FzZSAnbnVtYmVyJzoge1xuICAgICAgICAgICAgbGV0IHZhbCA9IGZpZWxkRGF0YVxuICAgICAgICAgICAgaWYgKHR5cGVvZiBmaWVsZERhdGEgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgIHZhbCA9IE51bWJlci5wYXJzZUZsb2F0KGZpZWxkRGF0YSlcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHR5cGVvZiBsb2NhbGUgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgIHJlZltsb2NhbGVdID0gdmFsXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICByZXN1bHRbZmllbGQubmFtZV0gPSB2YWxcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBjYXNlICdkYXRlJzoge1xuICAgICAgICAgICAgbGV0IHZhbCA9IGZpZWxkRGF0YVxuXG4gICAgICAgICAgICBpZiAodHlwZW9mIGZpZWxkRGF0YSA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgdmFsID0gbmV3IERhdGUoZmllbGREYXRhKS50b0lTT1N0cmluZygpXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh0eXBlb2YgbG9jYWxlID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICByZWZbbG9jYWxlXSA9IHZhbFxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0gdmFsXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgZGVmYXVsdDoge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBsb2NhbGUgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgIHJlZltsb2NhbGVdID0gZmllbGREYXRhXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICByZXN1bHRbZmllbGQubmFtZV0gPSBmaWVsZERhdGFcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0pXG5cbiAgICAg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m5hbWV9YFxuICAgICAgY29uc3QgZmllbGREYXRhID0gdGFibGVbZmllbGROYW1lXVxuXG4gICAgICBpZiAoZmllbGRQcmVmaXgpIHtcbiAgICAgICAgZGVsZXRpb25zLnB1c2goKCkgPT4gZGVsZXRlIHRhYmxlW2ZpZWxkTmFtZV0pXG4gICAgICB9XG5cbiAgICAgIGlmIChmaWVsZC50eXBlID09PSAnYXJyYXknKSB7XG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KGZpZWxkRGF0YSkpIHtcbiAgICAgICAgICBpZiAoZmllbGQubG9jYWxpemVkKSB7XG4gICAgICAgICAgICByZXN1bHRbZmllbGQubmFtZV0gPSBmaWVsZERhdGEucmVkdWNlKChhcnJheVJlc3VsdCwgcm93KSA9PiB7XG4gICAgICAgICAgICAgIGlmICh0eXBlb2Ygcm93Ll9sb2NhbGUgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFhcnJheVJlc3VsdFtyb3cuX2xvY2FsZV0pIGFycmF5UmVzdWx0W3Jvdy5fbG9jYWxlXSA9IFtdXG4gICAgICAgICAgICAgICAgY29uc3QgbG9jYWxlID0gcm93Ll9sb2NhbGVcbiAgICAgICAgICAgICAgICBjb25zdCBkYXRhID0ge31cbiAgICAgICAgICAgICAgICBkZWxldGUgcm93Ll9sb2NhbGVcbiAgICAgICAgICAgICAgICBpZiAocm93Ll91dWlkKSB7XG4gICAgICAgICAgICAgICAgICByb3cuaWQgPSByb3cuX3V1aWRcbiAgICAgICAgICAgICAgICAgIGRlbGV0ZSByb3cuX3V1aWRcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBjb25zdCByb3dSZXN1bHQgPSB0cmF2ZXJzZUZpZWxkczxUPih7XG4gICAgICAgICAgICAgICAgICBibG9ja3MsXG4gICAgICAgICAgICAgICAgICBjb25maWcsXG4gICAgICAgICAgICAgICAgICBkYXRhUmVmOiBkYXRhLFxuICAgICAgICAgICAgICAgICAgZGVsZXRpb25zLFxuICAgICAgICAgICAgICAgICAgZmllbGRQcmVmaXg6ICcnLFxuICAgICAgICAgICAgICAgICAgZmllbGRzOiBmaWVsZC5maWVsZHMsXG4gICAgICAgICAgICAgICAgICBudW1iZXJzLFxuICAgICAgICAgICAgICAgICAgcGF0aDogYCR7c2FuaXRpemVkUGF0aH0ke2ZpZWxkLm5hbWV9LiR7cm93Ll9vcmRlciAtIDF9YCxcbiAgICAgICAgICAgICAgICAgIHJlbGF0aW9uc2hpcHMsXG4gICAgICAgICAgICAgICAgICB0YWJsZTogcm93LFxuICAgICAgICAgICAgICAgICAgdGV4dHMsXG4gICAgICAgICAgICAgICAgfSlcblxuICAgICAgICAgICAgICAgIGlmICgnX29yZGVyJyBpbiByb3dSZXN1bHQpIHtcbiAgICAgICAgICAgICAgICAgIGRlbGV0ZSByb3dSZXN1bHQuX29yZGVyXG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgYXJyYXlSZXN1bHRbbG9jYWxlXS5wdXNoKHJvd1Jlc3VsdClcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIHJldHVybiBhcnJheVJlc3VsdFxuICAgICAgICAgICAgfSwge30pXG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJlc3VsdFtmaWVsZC5uYW1lXSA9IGZpZWxkRGF0YS5tYXAoKHJvdywgaSkgPT4ge1xuICAgICAgICAgICAgICBpZiAocm93Ll91dWlkKSB7XG4gICAgICAgICAgICAgICAgcm93LmlkID0gcm93Ll91dWlkXG4gICAgICAgICAgICAgICAgZGVsZXRlIHJvdy5fdXVpZFxuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgaWYgKCdfb3JkZXInIGluIHJvdykge1xuICAgICAgICAgICAgICAgIGRlbGV0ZSByb3cuX29yZGVyXG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICByZXR1cm4gdHJhdmVyc2VGaWVsZHM8VD4oe1xuICAgICAgICAgICAgICAgIGJsb2NrcyxcbiAgICAgICAgICAgICAgICBjb25maWcsXG4gICAgICAgICAgICAgICAgZGF0YVJlZjogcm93LFxuICAgICAgICAgICAgICAgIGRlbGV0aW9ucyxcbiAgICAgICAgICAgICAgICBmaWVsZFByZWZpeDogJycsXG4gICAgICAgICAgICAgICAgZmllbGRzOiBmaWVsZC5maWVsZHMsXG4gICAgICAgICAgICAgICAgbnVtYmVycyxcbiAgICAgICAgICAgICAgICBwYXRoOiBgJHtzYW5pdGl6ZWRQYXRofSR7ZmllbGQubmFtZX0uJHtpfWAsXG4gICAgICAgICAgICAgICAgcmVsYXRpb25zaGlwcyxcbiAgICAgICAgICAgICAgICB0YWJsZTogcm93LFxuICAgICAgICAgICAgICAgIHRleHRzLFxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcmVzdWx0XG4gICAgICB9XG5cbiAgICAgIGlmIChmaWVsZC50eXBlID09PSAnYmxvY2tzJykge1xuICAgICAgICBjb25zdCBibG9ja0ZpZWxkUGF0aCA9IGAke3Nhbml0aXplZFBhdGh9JHtmaWVsZC5uYW1lfWBcblxuICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShibG9ja3NbYmxvY2tGaWVsZFBhdGhdKSkge1xuICAgICAgICAgIGlmIChmaWVsZC5sb2NhbGl6ZWQpIHtcbiAgICAgICAgICAgIHJlc3VsdFtmaWVsZC5uYW1lXSA9IHt9XG5cbiAgICAgICAgICAgIGJsb2Nrc1tibG9ja0ZpZWxkUGF0aF0uZm9yRWFjaCgocm93KSA9PiB7XG4gICAgICAgICAgICAgIGlmIChyb3cuX3V1aWQpIHtcbiAgICAgICAgICAgICAgICByb3cuaWQgPSByb3cuX3V1aWRcbiAgICAgICAgICAgICAgICBkZWxldGUgcm93Ll91dWlkXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgaWYgKHR5cGVvZiByb3cuX2xvY2FsZSA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgICBpZiAoIXJlc3VsdFtmaWVsZC5uYW1lXVtyb3cuX2xvY2FsZV0pIHJlc3VsdFtmaWVsZC5uYW1lXVtyb3cuX2xvY2FsZV0gPSBbXVxuICAgICAgICAgICAgICAgIHJlc3VsdFtmaWVsZC5uYW1lXVtyb3cuX2xvY2FsZV0ucHVzaChyb3cpXG4gICAgICAgICAgICAgICAgZGVsZXRlIHJvdy5fbG9jYWxlXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pXG5cbiAgICAgICAgICAgIE9iamVjdC5lbnRyaWVzKHJlc3VsdFtmaWVsZC5uYW1lXSkuZm9yRWFjaCgoW2xvY2FsZSwgbG9jYWxpemVkQmxvY2tzXSkgPT4ge1xuICAgICAgICAgICAgICByZXN1bHRbZmllbGQubmFtZV1bbG9jYWxlXSA9IGxvY2FsaXplZEJsb2Nrcy5tYXAoKHJvdykgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IGJsb2NrID0gZmllbGQuYmxvY2tzLmZpbmQoKHsgc2x1ZyB9KSA9PiBzbHVnID09PSByb3cuYmxvY2tUeXBlKVxuXG4gICAgICAgICAgICAgICAgaWYgKGJsb2NrKSB7XG4gICAgICAgICAgICAgICAgICBjb25zdCBibG9ja1Jlc3VsdCA9IHRyYXZlcnNlRmllbGRzPFQ+KHtcbiAgICAgICAgICAgICAgICAgICAgYmxvY2tzLFxuICAgICAgICAgICAgICAgICAgICBjb25maWcsXG4gICAgICAgICAgICAgICAgICAgIGRhdGFSZWY6IHJvdyxcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRpb25zLFxuICAgICAgICAgICAgICAgICAgICBmaWVsZFByZWZpeDogJycsXG4gICAgICAgICAgICAgICAgICAgIGZpZWxkczogYmxvY2suZmllbGRzLFxuICAgICAgICAgICAgICAgICAgICBudW1iZXJzLFxuICAgICAgICAgICAgICAgICAgICBwYXRoOiBgJHtibG9ja0ZpZWxkUGF0aH0uJHtyb3cuX29yZGVyIC0gMX1gLFxuICAgICAgICAgICAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgICAgICAgICB0YWJsZTogcm93LFxuICAgICAgICAgICAgICAgICAgICB0ZXh0cyxcbiAgICAgICAgICAgICAgICAgIH0pXG5cbiAgICAgICAgICAgICAgICAgIGRlbGV0ZSBibG9ja1Jlc3VsdC5fb3JkZXJcbiAgICAgICAgICAgICAgICAgIHJldHVybiBibG9ja1Jlc3VsdFxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHJldHVybiB7fVxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0gYmxvY2tzW2Jsb2NrRmllbGRQYXRoXS5tYXAoKHJvdywgaSkgPT4ge1xuICAgICAgICAgICAgICBkZWxldGUgcm93Ll9vcmRlclxuICAgICAgICAgICAgICBpZiAocm93Ll91dWlkKSB7XG4gICAgICAgICAgICAgICAgcm93LmlkID0gcm93Ll91dWlkXG4gICAgICAgICAgICAgICAgZGVsZXRlIHJvdy5fdXVpZFxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGNvbnN0IGJsb2NrID0gZmllbGQuYmxvY2tzLmZpbmQoKHsgc2x1ZyB9KSA9PiBzbHVnID09PSByb3cuYmxvY2tUeXBlKVxuXG4gICAgICAgICAgICAgIGlmIChibG9jaykge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cmF2ZXJzZUZpZWxkczxUPih7XG4gICAgICAgICAgICAgICAgICBibG9ja3MsXG4gICAgICAgICAgICAgICAgICBjb25maWcsXG4gICAgICAgICAgICAgICAgICBkYXRhUmVmOiByb3csXG4gICAgICAgICAgICAgICAgICBkZWxldGlvbnMsXG4gICAgICAgICAgICAgICAgICBmaWVsZFByZWZpeDogJycsXG4gICAgICAgICAgICAgICAgICBmaWVsZHM6IGJsb2NrLmZpZWxkcyxcbiAgICAgICAgICAgICAgICAgIG51bWJlcnMsXG4gICAgICAgICAgICAgICAgICBwYXRoOiBgJHtibG9ja0ZpZWxkUGF0aH0uJHtpfWAsXG4gICAgICAgICAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgICAgICAgdGFibGU6IHJvdyxcbiAgICAgICAgICAgICAgICAgIHRleHRzLFxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICByZXR1cm4ge31cbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHJlc3VsdFxuICAgICAgfVxuXG4gICAgICBpZiAoZmllbGQudHlwZSA9PT0gJ3JlbGF0aW9uc2hpcCcgfHwgZmllbGQudHlwZSA9PT0gJ3VwbG9hZCcpIHtcbiAgICAgICAgY29uc3QgcmVsYXRpb25QYXRoTWF0Y2ggPSByZWxhdGlvbnNoaXBzW2Ake3Nhbml0aXplZFBhdGh9JHtmaWVsZC5uYW1lfWBdXG4gICAgICAgIGlmICghcmVsYXRpb25QYXRoTWF0Y2gpIHtcbiAgICAgICAgICBpZiAoJ2hhc01hbnknIGluIGZpZWxkICYmIGZpZWxkLmhhc01hbnkpIHtcbiAgICAgICAgICAgIGlmIChmaWVsZC5sb2NhbGl6ZWQgJiYgY29uZmlnLmxvY2FsaXphdGlvbiAmJiBjb25maWcubG9jYWxpemF0aW9uLmxvY2FsZXMpIHtcbiAgICAgICAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0ge1xuICAgICAgICAgICAgICAgIFtjb25maWcubG9jYWxpemF0aW9uLmRlZmF1bHRMb2NhbGVdOiBbXSxcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0gW11cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4gcmVzdWx0XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZmllbGQubG9jYWxpemVkKSB7XG4gICAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0ge31cbiAgICAgICAgICBjb25zdCByZWxhdGlvbnNCeUxvY2FsZTogUmVjb3JkPHN0cmluZywgUmVjb3JkPHN0cmluZywgdW5rbm93bj5bXT4gPSB7fVxuXG4gICAgICAgICAgcmVsYXRpb25QYXRoTWF0Y2guZm9yRWFjaCgocm93KSA9PiB7XG4gICAgICAgICAgICBpZiAodHlwZW9mIHJvdy5sb2NhbGUgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgIGlmICghcmVsYXRpb25zQnlMb2NhbGVbcm93LmxvY2FsZV0pIHJlbGF0aW9uc0J5TG9jYWxlW3Jvdy5sb2NhbGVdID0gW11cbiAgICAgICAgICAgICAgcmVsYXRpb25zQnlMb2NhbGVbcm93LmxvY2FsZV0ucHVzaChyb3cpXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSlcblxuICAgICAgICAgIE9iamVjdC5lbnRyaWVzKHJlbGF0aW9uc0J5TG9jYWxlKS5mb3JFYWNoKChbbG9jYWxlLCByZWxhdGlvbnNdKSA9PiB7XG4gICAgICAgICAgICB0cmFuc2Zvcm1SZWxhdGlvbnNoaXAoe1xuICAgICAgICAgICAgICBmaWVsZCxcbiAgICAgICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgICAgICByZWY6IHJlc3VsdCxcbiAgICAgICAgICAgICAgcmVsYXRpb25zLFxuICAgICAgICAgICAgfSlcbiAgICAgICAgICB9KVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHRyYW5zZm9ybVJlbGF0aW9uc2hpcCh7XG4gICAgICAgICAgICBmaWVsZCxcbiAgICAgICAgICAgIHJlZjogcmVzdWx0LFxuICAgICAgICAgICAgcmVsYXRpb25zOiByZWxhdGlvblBhdGhNYXRjaCxcbiAgICAgICAgICB9KVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHJlc3VsdFxuICAgICAgfVxuXG4gICAgICBpZiAoZmllbGQudHlwZSA9PT0gJ3RleHQnICYmIGZpZWxkPy5oYXNNYW55KSB7XG4gICAgICAgIGNvbnN0IHRleHRQYXRoTWF0Y2ggPSB0ZXh0c1tgJHtzYW5pdGl6ZWRQYXRofSR7ZmllbGQubmFtZX1gXVxuICAgICAgICBpZiAoIXRleHRQYXRoTWF0Y2gpIHJldHVybiByZXN1bHRcblxuICAgICAgICBpZiAoZmllbGQubG9jYWxpemVkKSB7XG4gICAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0ge31cbiAgICAgICAgICBjb25zdCB0ZXh0c0J5TG9jYWxlOiBSZWNvcmQ8c3RyaW5nLCBSZWNvcmQ8c3RyaW5nLCB1bmtub3duPltdPiA9IHt9XG5cbiAgICAgICAgICB0ZXh0UGF0aE1hdGNoLmZvckVhY2goKHJvdykgPT4ge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiByb3cubG9jYWxlID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICBpZiAoIXRleHRzQnlMb2NhbGVbcm93LmxvY2FsZV0pIHRleHRzQnlMb2NhbGVbcm93LmxvY2FsZV0gPSBbXVxuICAgICAgICAgICAgICB0ZXh0c0J5TG9jYWxlW3Jvdy5sb2NhbGVdLnB1c2gocm93KVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pXG5cbiAgICAgICAgICBPYmplY3QuZW50cmllcyh0ZXh0c0J5TG9jYWxlKS5mb3JFYWNoKChbbG9jYWxlLCB0ZXh0c10pID0+IHtcbiAgICAgICAgICAgIHRyYW5zZm9ybUhhc01hbnlUZXh0KHtcbiAgICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICAgICAgcmVmOiByZXN1bHQsXG4gICAgICAgICAgICAgIHRleHRSb3dzOiB0ZXh0cyxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfSlcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB0cmFuc2Zvcm1IYXNNYW55VGV4dCh7XG4gICAgICAgICAgICBmaWVsZCxcbiAgICAgICAgICAgIHJlZjogcmVzdWx0LFxuICAgICAgICAgICAgdGV4dFJvd3M6IHRleHRQYXRoTWF0Y2gsXG4gICAgICAgICAgfSlcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiByZXN1bHRcbiAgICAgIH1cblxuICAgICAgaWYgKGZpZWxkLnR5cGUgPT09ICdudW1iZXInICYmIGZpZWxkLmhhc01hbnkpIHtcbiAgICAgICAgY29uc3QgbnVtYmVyUGF0aE1hdGNoID0gbnVtYmVyc1tgJHtzYW5pdGl6ZWRQYXRofSR7ZmllbGQubmFtZX1gXVxuICAgICAgICBpZiAoIW51bWJlclBhdGhNYXRjaCkgcmV0dXJuIHJlc3VsdFxuXG4gICAgICAgIGlmIChmaWVsZC5sb2NhbGl6ZWQpIHtcbiAgICAgICAgICByZXN1bHRbZmllbGQubmFtZV0gPSB7fVxuICAgICAgICAgIGNvbnN0IG51bWJlcnNCeUxvY2FsZTogUmVjb3JkPHN0cmluZywgUmVjb3JkPHN0cmluZywgdW5rbm93bj5bXT4gPSB7fVxuXG4gICAgICAgICAgbnVtYmVyUGF0aE1hdGNoLmZvckVhY2goKHJvdykgPT4ge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiByb3cubG9jYWxlID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICBpZiAoIW51bWJlcnNCeUxvY2FsZVtyb3cubG9jYWxlXSkgbnVtYmVyc0J5TG9jYWxlW3Jvdy5sb2NhbGVdID0gW11cbiAgICAgICAgICAgICAgbnVtYmVyc0J5TG9jYWxlW3Jvdy5sb2NhbGVdLnB1c2gocm93KVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pXG5cbiAgICAgICAgICBPYmplY3QuZW50cmllcyhudW1iZXJzQnlMb2NhbGUpLmZvckVhY2goKFtsb2NhbGUsIG51bWJlcnNdKSA9PiB7XG4gICAgICAgICAgICB0cmFuc2Zvcm1IYXNNYW55TnVtYmVyKHtcbiAgICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICAgICAgbnVtYmVyUm93czogbnVtYmVycyxcbiAgICAgICAgICAgICAgcmVmOiByZXN1bHQsXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH0pXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdHJhbnNmb3JtSGFzTWFueU51bWJlcih7XG4gICAgICAgICAgICBmaWVsZCxcbiAgICAgICAgICAgIG51bWJlclJvd3M6IG51bWJlclBhdGhNYXRjaCxcbiAgICAgICAgICAgIHJlZjogcmVzdWx0LFxuICAgICAgICAgIH0pXG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcmVzdWx0XG4gICAgICB9XG5cbiAgICAgIGlmIChmaWVsZC50eXBlID09PSAnc2VsZWN0JyAmJiBmaWVsZC5oYXNNYW55KSB7XG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KGZpZWxkRGF0YSkpIHtcbiAgICAgICAgICBpZiAoZmllbGQubG9jYWxpemVkKSB7XG4gICAgICAgICAgICByZXN1bHRbZmllbGQubmFtZV0gPSBmaWVsZERhdGEucmVkdWNlKChzZWxlY3RSZXN1bHQsIHJvdykgPT4ge1xuICAgICAgICAgICAgICBpZiAodHlwZW9mIHJvdy5sb2NhbGUgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFzZWxlY3RSZXN1bHRbcm93LmxvY2FsZV0pIHNlbGVjdFJlc3VsdFtyb3cubG9jYWxlXSA9IFtdXG4gICAgICAgICAgICAgICAgc2VsZWN0UmVzdWx0W3Jvdy5sb2NhbGVdLnB1c2gocm93LnZhbHVlKVxuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgcmV0dXJuIHNlbGVjdFJlc3VsdFxuICAgICAgICAg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gIGNhc2UgJ2dyb3VwJzoge1xuICAgICAgICAgICAgY29uc3QgZ3JvdXBGaWVsZFByZWZpeCA9IGAke2ZpZWxkUHJlZml4IHx8ICcnfSR7ZmllbGQubmFtZX1fYFxuXG4gICAgICAgICAgICBpZiAoZmllbGQubG9jYWxpemVkKSB7XG4gICAgICAgICAgICAgIGlmICh0eXBlb2YgbG9jYWxlID09PSAnc3RyaW5nJyAmJiAhcmVmW2xvY2FsZV0pIHtcbiAgICAgICAgICAgICAgICByZWZbbG9jYWxlXSA9IHt9XG4gICAgICAgICAgICAgICAgZGVsZXRlIHRhYmxlLl9sb2NhbGVcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIE9iamVjdC5lbnRyaWVzKHJlZikuZm9yRWFjaCgoW2dyb3VwTG9jYWxlLCBncm91cExvY2FsZURhdGFdKSA9PiB7XG4gICAgICAgICAgICAgICAgcmVmW2dyb3VwTG9jYWxlXSA9IHRyYXZlcnNlRmllbGRzPFJlY29yZDxzdHJpbmcsIHVua25vd24+Pih7XG4gICAgICAgICAgICAgICAgICBibG9ja3MsXG4gICAgICAgICAgICAgICAgICBjb25maWcsXG4gICAgICAgICAgICAgICAgICBkYXRhUmVmOiBncm91cExvY2FsZURhdGEgYXMgUmVjb3JkPHN0cmluZywgdW5rbm93bj4sXG4gICAgICAgICAgICAgICAgICBkZWxldGlvbnMsXG4gICAgICAgICAgICAgICAgICBmaWVsZFByZWZpeDogZ3JvdXBGaWVsZFByZWZpeCxcbiAgICAgICAgICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgICAgICAgICAgbnVtYmVycyxcbiAgICAgICAgICAgICAgICAgIHBhdGg6IGAke3Nhbml0aXplZFBhdGh9JHtmaWVsZC5uYW1lfWAsXG4gICAgICAgICAgICAgICAgICByZWxhdGlvbnNoaXBzLFxuICAgICAgICAgICAgICAgICAgdGFibGUsXG4gICAgICAgICAgICAgICAgICB0ZXh0cyxcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICBpZiAoJ19vcmRlcicgaW4gcmVmKSB7XG4gICAgICAgICAgICAgICAgZGVsZXRlIHJlZi5fb3JkZXJcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgY29uc3QgZ3JvdXBEYXRhID0ge31cblxuICAgICAgICAgICAgICByZWZbZmllbGQubmFtZV0gPSB0cmF2ZXJzZUZpZWxkczxSZWNvcmQ8c3RyaW5nLCB1bmtub3duPj4oe1xuICAgICAgICAgICAgICAgIGJsb2NrcyxcbiAgICAgICAgICAgICAgICBjb25maWcsXG4gICAgICAgICAgICAgICAgZGF0YVJlZjogZ3JvdXBEYXRhIGFzIFJlY29yZDxzdHJpbmcsIHVua25vd24+LFxuICAgICAgICAgICAgICAgIGRlbGV0aW9ucyxcbiAgICAgICAgICAgICAgICBmaWVsZFByZWZpeDogZ3JvdXBGaWVsZFByZWZpeCxcbiAgICAgICAgICAgICAgICBmaWVsZHM6IGZpZWxkLmZpZWxkcyxcbiAgICAgICAgICAgICAgICBudW1iZXJzLFxuICAgICAgICAgICAgICAgIHBhdGg6IGAke3Nhbml0aXplZFBhdGh9JHtmaWVsZC5uYW1lfWAsXG4gICAgICAgICAgICAgICAgcmVsYXRpb25zaGlwcyxcbiAgICAgICAgICAgICAgICB0YWJsZSxcbiAgICAgICAgICAgICAgICB0ZXh0cyxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgaWYgKCdfb3JkZXInIGluIHJlZikge1xuICAgICAgICAgICAgICAgIGRlbGV0ZSByZWYuX29yZGVyXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBjYXNlICd0ZXh0Jzoge1xuICAgICAgICAgICAgbGV0IHZhbCA9IGZpZWxkRGF0YVxuICAgICAgICAgICAgaWYgKHR5cGVvZiBmaWVsZERhdGEgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgIHZhbCA9IFN0cmluZyhmaWVsZERhdGEpXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh0eXBlb2YgbG9jYWxlID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICByZWZbbG9jYWxlXSA9IHZhbFxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0gdmFsXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY2FzZSAnbnVtYmVyJzoge1xuICAgICAgICAgICAgbGV0IHZhbCA9IGZpZWxkRGF0YVxuICAgICAgICAgICAgaWYgKHR5cGVvZiBmaWVsZERhdGEgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgIHZhbCA9IE51bWJlci5wYXJzZUZsb2F0KGZpZWxkRGF0YSlcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHR5cGVvZiBsb2NhbGUgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgIHJlZltsb2NhbGVdID0gdmFsXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICByZXN1bHRbZmllbGQubmFtZV0gPSB2YWxcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBjYXNlICdkYXRlJzoge1xuICAgICAgICAgICAgbGV0IHZhbCA9IGZpZWxkRGF0YVxuXG4gICAgICAgICAgICBpZiAodHlwZW9mIGZpZWxkRGF0YSA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgdmFsID0gbmV3IERhdGUoZmllbGREYXRhKS50b0lTT1N0cmluZygpXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh0eXBlb2YgbG9jYWxlID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICByZWZbbG9jYWxlXSA9IHZhbFxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0gdmFsXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgZGVmYXVsdDoge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBsb2NhbGUgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgIHJlZltsb2NhbGVdID0gZmllbGREYXRhXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICByZXN1bHRbZmllbGQubmFtZV0gPSBmaWVsZERhdGFcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0pXG5cbiAgICAgIGlmIChPYmplY3Qua2V5cyhsb2NhbGl6ZWRGaWVsZERhdGEpLmxlbmd0aCA+IDApIHtcbiAgICAgICAgcmVzdWx0W2ZpZWxkLm5hbWVdID0gbG9jYWxpemVkRmllbGREYXRhXG4gICAgICB9XG5cbiAgICAgIHJldHVybiByZXN1bHRcbiAgICB9XG5cbiAgICByZXR1cm4gcmVzdWx0XG4gIH0sIGRhdGFSZWYpXG5cbiAgaWYgKEFycmF5LmlzQXJyYXkodGFibGUuX2xvY2FsZXMpKSB7XG4gICAgZGVsZXRpb25zLnB1c2goKCkgPT4gZGVsZXRlIHRhYmxlLl9sb2NhbGVzKVxuICB9XG5cbiAgcmV0dXJuIGZvcm1hdHRlZCBhcyBUXG59XG4iXSwibmFtZXMiOlsiZmllbGRBZmZlY3RzRGF0YSIsInRyYW5zZm9ybUhhc01hbnlOdW1iZXIiLCJ0cmFuc2Zvcm1IYXNNYW55VGV4dCIsInRyYW5zZm9ybVJlbGF0aW9uc2hpcCIsInRyYXZlcnNlRmllbGRzIiwiYmxvY2tzIiwiY29uZmln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