@payloadcms/db-postgres 0.1.12 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,7 +19,8 @@ function _interop_require_default(obj) {
19
19
  default: obj
20
20
  };
21
21
  }
22
- const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildRelationships, disableNotNull, disableUnique = false, fields, rootRelationsToBuild, rootRelationships, rootTableIDColType, rootTableName, tableName, timestamps })=>{
22
+ const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildNumbers, buildRelationships, disableNotNull, disableUnique = false, fields, rootRelationsToBuild, rootRelationships, rootTableIDColType, rootTableName: incomingRootTableName, tableName, timestamps })=>{
23
+ const rootTableName = incomingRootTableName || tableName;
23
24
  const columns = baseColumns;
24
25
  const indexes = {};
25
26
  let hasLocalizedField = false;
@@ -51,6 +52,7 @@ const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildRela
51
52
  }
52
53
  ({ hasLocalizedField, hasLocalizedManyNumberField, hasLocalizedRelationshipField, hasManyNumberField } = (0, _traverseFields.traverseFields)({
53
54
  adapter,
55
+ buildNumbers,
54
56
  buildRelationships,
55
57
  columns,
56
58
  disableNotNull,
@@ -65,7 +67,7 @@ const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildRela
65
67
  relationships,
66
68
  rootRelationsToBuild: rootRelationsToBuild || relationsToBuild,
67
69
  rootTableIDColType: rootTableIDColType || idColType,
68
- rootTableName: rootTableName || tableName
70
+ rootTableName
69
71
  }));
70
72
  if (timestamps) {
71
73
  columns.createdAt = (0, _pgcore.timestamp)('created_at', {
@@ -118,8 +120,8 @@ const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildRela
118
120
  }));
119
121
  adapter.relations[`relations_${localeTableName}`] = localesTableRelations;
120
122
  }
121
- if (hasManyNumberField) {
122
- const numbersTableName = `${tableName}_numbers`;
123
+ if (hasManyNumberField && buildNumbers) {
124
+ const numbersTableName = `${rootTableName}_numbers`;
123
125
  const columns = {
124
126
  id: (0, _pgcore.serial)('id').primaryKey(),
125
127
  number: (0, _pgcore.numeric)('number'),
@@ -242,8 +244,9 @@ const buildTable = ({ adapter, baseColumns = {}, baseExtraConfig = {}, buildRela
242
244
  });
243
245
  adapter.relations[`relations_${tableName}`] = tableRelations;
244
246
  return {
247
+ hasManyNumberField,
245
248
  relationsToBuild
246
249
  };
247
250
  };
248
251
 
249
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zY2hlbWEvYnVpbGQudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcGFyYW0tcmVhc3NpZ24gKi9cbmltcG9ydCB0eXBlIHsgUmVsYXRpb24gfSBmcm9tICdkcml6emxlLW9ybSdcbmltcG9ydCB0eXBlIHsgSW5kZXhCdWlsZGVyLCBQZ0NvbHVtbkJ1aWxkZXIsIFVuaXF1ZUNvbnN0cmFpbnRCdWlsZGVyIH0gZnJvbSAnZHJpenpsZS1vcm0vcGctY29yZSdcbmltcG9ydCB0eXBlIHsgRmllbGQgfSBmcm9tICdwYXlsb2FkL3R5cGVzJ1xuXG5pbXBvcnQgeyByZWxhdGlvbnMgfSBmcm9tICdkcml6emxlLW9ybSdcbmltcG9ydCB7XG4gIGluZGV4LFxuICBpbnRlZ2VyLFxuICBudW1lcmljLFxuICBwZ1RhYmxlLFxuICBzZXJpYWwsXG4gIHRpbWVzdGFtcCxcbiAgdW5pcXVlLFxuICB2YXJjaGFyLFxufSBmcm9tICdkcml6emxlLW9ybS9wZy1jb3JlJ1xuaW1wb3J0IHsgZmllbGRBZmZlY3RzRGF0YSB9IGZyb20gJ3BheWxvYWQvdHlwZXMnXG5pbXBvcnQgdG9TbmFrZUNhc2UgZnJvbSAndG8tc25ha2UtY2FzZSdcblxuaW1wb3J0IHR5cGUgeyBHZW5lcmljQ29sdW1ucywgR2VuZXJpY1RhYmxlLCBQb3N0Z3Jlc0FkY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24+ID0ge1xuICAgICAgICAgIG9yZGVyOiBpbmRleCgnb3JkZXJfaWR4Jykub24oY29scy5vcmRlciksXG4gICAgICAgICAgcGFyZW50SWR4OiBpbmRleCgncGFyZW50X2lkeCcpLm9uKGNvbHMucGFyZW50KSxcbiAgICAgICAgICBwYXRoSWR4OiBpbmRleCgncGF0aF9pZHgnKS5vbihjb2xzLnBhdGgpLFxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGhhc0xvY2FsaXplZFJlbGF0aW9uc2hpcEZpZWxkKSB7XG4gICAgICAgICAgcmVzdWx0LmxvY2FsZUlkeCA9IGluZGV4KCdsb2NhbGVfaWR4Jykub24oY29scy5sb2NhbGUpXG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcmVzdWx0XG4gICAgICB9KVxuXG4gICAgICBhZGFwdGVyLnRhYmxlc1tyZWxhdGlvbnNoaXBzVGFibGVOYW1lXSA9IHJlbGF0aW9uc2hpcHNUYWJsZVxuXG4gICAgICBjb25zdCByZWxhdGlvbnNoaXBzVGFibGVSZWxhdGlvbnMgPSByZWxhdGlvbnMocmVsYXRpb25zaGlwc1RhYmxlLCAoeyBvbmUgfSkgPT4ge1xuICAgICAgICBjb25zdCByZXN1bHQ6IFJlY29yZDxzdHJpbmcsIFJlbGF0aW9uPHN0cmluZz4+ID0ge1xuICAgICAgICAgIHBhcmVudDogb25lKHRhYmxlLCB7XG4gICAgICAgICAgICBmaWVsZHM6IFtyZWxhdGlvbnNoaXBzVGFibGUucGFyZW50XSxcbiAgICAgICAgICAgIHJlZmVyZW5jZXM6IFt0YWJsZS5pZF0sXG4gICAgICAgICAgICByZWxhdGlvbk5hbWU6ICdfcmVscycsXG4gICAgICAgICAgfSksXG4gICAgICAgIH1cblxuICAgICAgICByZWxhdGlvbnNoaXBzLmZvckVhY2goKHJlbGF0aW9uVG8pID0+IHtcbiAgICAgICAgICBjb25zdCByZWxhdGVkVGFibGVOYW1lID0gdG9TbmFrZUNhc2UocmVsYXRpb25Ub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RQUM3RDtJQUNGO0lBRUEsTUFBTUksaUJBQWlCakMsSUFBQUEscUJBQVMsRUFBQ3pCLE9BQU8sQ0FBQyxFQUFFMkQsSUFBSSxFQUFFO1FBQy9DLE1BQU1ULFNBQTJDLENBQUM7UUFFbEQzRSxpQkFBaUJrRSxPQUFPLENBQUMsQ0FBQ21CLEtBQUtwRDtZQUM3QjBDLE1BQU0sQ0FBQzFDLElBQUksR0FBR21ELEtBQUtoSCxRQUFRaUUsTUFBTSxDQUFDZ0QsSUFBSTtRQUN4QztRQUVBLElBQUloRyxtQkFBbUI7WUFDckJzRixPQUFPVyxRQUFRLEdBQUdGLEtBQUt6RjtRQUN6QjtRQUVBLElBQUlKLG9CQUFvQjtZQUN0Qm9GLE9BQU9ZLFFBQVEsR0FBR0gsS0FBS3hGO1FBQ3pCO1FBRUEsSUFBSUMsY0FBY21FLElBQUksSUFBSWpFLG9CQUFvQjtZQUM1QzRFLE9BQU9hLEtBQUssR0FBR0osS0FBS3JGLG9CQUFvQjtnQkFDdENpRixjQUFjO1lBQ2hCO1FBQ0Y7UUFFQSxPQUFPTDtJQUNUO0lBRUF2RyxRQUFROEUsU0FBUyxDQUFDLENBQUMsVUFBVSxFQUFFakUsVUFBVSxDQUFDLENBQUMsR0FBR2tHO0lBRTlDLE9BQU87UUFBRTVGO1FBQW9CUztJQUFpQjtBQUNoRCJ9
@@ -3,6 +3,7 @@ import type { Field, TabAsField } from 'payload/types';
3
3
  import type { GenericColumns, PostgresAdapter } from '../types';
4
4
  type Args = {
5
5
  adapter: PostgresAdapter;
6
+ buildNumbers: boolean;
6
7
  buildRelationships: boolean;
7
8
  columnPrefix?: string;
8
9
  columns: Record<string, PgColumnBuilder>;
@@ -28,6 +29,6 @@ type Result = {
28
29
  hasLocalizedRelationshipField: boolean;
29
30
  hasManyNumberField: 'index' | boolean;
30
31
  };
31
- export declare const traverseFields: ({ adapter, buildRelationships, columnPrefix, columns, disableNotNull, disableUnique, fieldPrefix, fields, forceLocalized, indexes, localesColumns, localesIndexes, newTableName, parentTableName, relationsToBuild, relationships, rootRelationsToBuild, rootTableIDColType, rootTableName, }: Args) => Result;
32
+ export declare const traverseFields: ({ adapter, buildNumbers, buildRelationships, columnPrefix, columns, disableNotNull, disableUnique, fieldPrefix, fields, forceLocalized, indexes, localesColumns, localesIndexes, newTableName, parentTableName, relationsToBuild, relationships, rootRelationsToBuild, rootTableIDColType, rootTableName, }: Args) => Result;
32
33
  export {};
33
34
  //# sourceMappingURL=traverseFields.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"traverseFields.d.ts","sourceRoot":"","sources":["../../src/schema/traverseFields.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAA2B,MAAM,qBAAqB,CAAA;AAcjG,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAKtD,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAS/D,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,eAAe,CAAA;IACxB,kBAAkB,EAAE,OAAO,CAAA;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;IACxC,cAAc,EAAE,OAAO,CAAA;IACvB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,CAAC,KAAK,GAAG,UAAU,CAAC,EAAE,CAAA;IAC9B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,YAAY,CAAC,CAAA;IAC/D,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;IAC/C,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,YAAY,C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B,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,YAAY,CAAC,CAAA;IAC/D,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;IAC/C,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,YAAY,CAAC,CAAA;IACtE,YAAY,EAAE,MAAM,CAAA;IACpB,eAAe,EAAE,MAAM,CAAA;IACvB,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACrC,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC1B,oBAAoB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC1C,kBAAkB,EAAE,MAAM,CAAA;IAC1B,aAAa,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,KAAK,MAAM,GAAG;IACZ,iBAAiB,EAAE,OAAO,CAAA;IAC1B,2BAA2B,EAAE,OAAO,CAAA;IACpC,6BAA6B,EAAE,OAAO,CAAA;IACtC,kBAAkB,EAAE,OAAO,GAAG,OAAO,CAAA;CACtC,CAAA;AAED,eAAO,MAAM,cAAc,gTAqBxB,IAAI,KAAG,MA+gBT,CAAA"}
@@ -10,8 +10,8 @@ Object.defineProperty(exports, "traverseFields", {
10
10
  });
11
11
  const _drizzleorm = require("drizzle-orm");
12
12
  const _pgcore = require("drizzle-orm/pg-core");
13
- const _types = require("payload/types");
14
13
  const _errors = require("payload/errors");
14
+ const _types = require("payload/types");
15
15
  const _tosnakecase = /*#__PURE__*/ _interop_require_default(require("to-snake-case"));
16
16
  const _hasLocalesTable = require("../utilities/hasLocalesTable");
17
17
  const _build = require("./build");
@@ -24,7 +24,7 @@ function _interop_require_default(obj) {
24
24
  default: obj
25
25
  };
26
26
  }
27
- const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, disableNotNull, disableUnique = false, fieldPrefix, fields, forceLocalized, indexes, localesColumns, localesIndexes, newTableName, parentTableName, relationsToBuild, relationships, rootRelationsToBuild, rootTableIDColType, rootTableName })=>{
27
+ const traverseFields = ({ adapter, buildNumbers, buildRelationships, columnPrefix, columns, disableNotNull, disableUnique = false, fieldPrefix, fields, forceLocalized, indexes, localesColumns, localesIndexes, newTableName, parentTableName, relationsToBuild, relationships, rootRelationsToBuild, rootTableIDColType, rootTableName })=>{
28
28
  let hasLocalizedField = false;
29
29
  let hasLocalizedRelationshipField = false;
30
30
  let hasManyNumberField = false;
@@ -200,7 +200,7 @@ const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, di
200
200
  baseColumns._locale = adapter.enums.enum__locales('_locale').notNull();
201
201
  baseExtraConfig._localeIdx = (cols)=>(0, _pgcore.index)('_locale_idx').on(cols._locale);
202
202
  }
203
- const { relationsToBuild: subRelationsToBuild } = (0, _build.buildTable)({
203
+ const { hasManyNumberField: subHasManyNumberField, relationsToBuild: subRelationsToBuild } = (0, _build.buildTable)({
204
204
  adapter,
205
205
  baseColumns,
206
206
  baseExtraConfig,
@@ -213,6 +213,9 @@ const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, di
213
213
  rootTableName,
214
214
  tableName: arrayTableName
215
215
  });
216
+ if (subHasManyNumberField) {
217
+ if (!hasManyNumberField || subHasManyNumberField === 'index') hasManyNumberField = subHasManyNumberField;
218
+ }
216
219
  relationsToBuild.set(fieldName, arrayTableName);
217
220
  const arrayTableRelations = (0, _drizzleorm.relations)(adapter.tables[arrayTableName], ({ many, one })=>{
218
221
  const result = {
@@ -258,7 +261,7 @@ const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, di
258
261
  baseColumns._locale = adapter.enums.enum__locales('_locale').notNull();
259
262
  baseExtraConfig._localeIdx = (cols)=>(0, _pgcore.index)('locale_idx').on(cols._locale);
260
263
  }
261
- const { relationsToBuild: subRelationsToBuild } = (0, _build.buildTable)({
264
+ const { hasManyNumberField: subHasManyNumberField, relationsToBuild: subRelationsToBuild } = (0, _build.buildTable)({
262
265
  adapter,
263
266
  baseColumns,
264
267
  baseExtraConfig,
@@ -271,6 +274,9 @@ const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, di
271
274
  rootTableName,
272
275
  tableName: blockTableName
273
276
  });
277
+ if (subHasManyNumberField) {
278
+ if (!hasManyNumberField || subHasManyNumberField === 'index') hasManyNumberField = subHasManyNumberField;
279
+ }
274
280
  const blockTableRelations = (0, _drizzleorm.relations)(adapter.tables[blockTableName], ({ many, one })=>{
275
281
  const result = {
276
282
  _parentID: one(adapter.tables[rootTableName], {
@@ -309,6 +315,7 @@ const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, di
309
315
  if (!('name' in field)) {
310
316
  const { hasLocalizedField: groupHasLocalizedField, hasLocalizedManyNumberField: groupHasLocalizedManyNumberField, hasLocalizedRelationshipField: groupHasLocalizedRelationshipField, hasManyNumberField: groupHasManyNumberField } = traverseFields({
311
317
  adapter,
318
+ buildNumbers,
312
319
  buildRelationships,
313
320
  columnPrefix,
314
321
  columns,
@@ -337,6 +344,7 @@ const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, di
337
344
  const disableNotNullFromHere = Boolean(field.admin?.condition) || disableNotNull;
338
345
  const { hasLocalizedField: groupHasLocalizedField, hasLocalizedManyNumberField: groupHasLocalizedManyNumberField, hasLocalizedRelationshipField: groupHasLocalizedRelationshipField, hasManyNumberField: groupHasManyNumberField } = traverseFields({
339
346
  adapter,
347
+ buildNumbers,
340
348
  buildRelationships,
341
349
  columnPrefix: `${columnName}_`,
342
350
  columns,
@@ -367,6 +375,7 @@ const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, di
367
375
  const disableNotNullFromHere = Boolean(field.admin?.condition) || disableNotNull;
368
376
  const { hasLocalizedField: tabHasLocalizedField, hasLocalizedManyNumberField: tabHasLocalizedManyNumberField, hasLocalizedRelationshipField: tabHasLocalizedRelationshipField, hasManyNumberField: tabHasManyNumberField } = traverseFields({
369
377
  adapter,
378
+ buildNumbers,
370
379
  buildRelationships,
371
380
  columnPrefix,
372
381
  columns,
@@ -401,6 +410,7 @@ const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, di
401
410
  const disableNotNullFromHere = Boolean(field.admin?.condition) || disableNotNull;
402
411
  const { hasLocalizedField: rowHasLocalizedField, hasLocalizedManyNumberField: rowHasLocalizedManyNumberField, hasLocalizedRelationshipField: rowHasLocalizedRelationshipField, hasManyNumberField: rowHasManyNumberField } = traverseFields({
403
412
  adapter,
413
+ buildNumbers,
404
414
  buildRelationships,
405
415
  columnPrefix,
406
416
  columns,
@@ -453,4 +463,4 @@ const traverseFields = ({ adapter, buildRelationships, columnPrefix, columns, di
453
463
  };
454
464
  };
455
465
 
456
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zY2hlbWEvdHJhdmVyc2VGaWVsZHMudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcGFyYW0tcmVhc3NpZ24gKi9cbmltcG9ydCB0eXBlIHsgUmVsYXRpb24gfSBmcm9tICdkcml6emxlLW9ybSdcbmltcG9ydCB7IHJlbGF0aW9ucyB9IGZyb20gJ2RyaXp6bGUtb3JtJ1xuaW1wb3J0IHR5cGUgeyBJbmRleEJ1aWxkZXIsIFBnQ29sdW1uQnVpbGRlciwgVW5pcXVlQ29uc3RyYWludEJ1aWxkZXIgfSBmcm9tICdkcml6emxlLW9ybS9wZy1jb3JlJ1xuaW1wb3J0IHtcbiAgYm9vbGVhbixcbiAgaW5kZXgsXG4gIGludGVnZXIsXG4gIGpzb25iLFxuICBudW1lcmljLFxuICBwZ0VudW0sXG4gIFBnTnVtZXJpY0J1aWxkZXIsXG4gIFBnVmFyY2hhckJ1aWxkZXIsXG4gIHRleHQsXG4gIHRpbWVzdGFtcCxcbiAgdmFyY2hhcixcbn0gZnJvbS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ZpZWxkLmhhc01hbnkpIHtcbiAgICAgICAgICBpZiAoZmllbGQubG9jYWxpemVkKSB7XG4gICAgICAgICAgICBoYXNMb2NhbGl6ZWRNYW55TnVtYmVyRmllbGQgPSB0cnVlXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGZpZWxkLmluZGV4KSB7XG4gICAgICAgICAgICBoYXNNYW55TnVtYmVyRmllbGQgPSAnaW5kZXgnXG4gICAgICAgICAgfSBlbHNlIGlmICghaGFzTWFueU51bWJlckZpZWxkKSB7XG4gICAgICAgICAgICBoYXNNYW55TnVtYmVyRmllbGQgPSB0cnVlXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGZpZWxkLnVuaXF1ZSkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEludmFsaWRDb25maWd1cmF0aW9uKFxuICAgICAgICAgICAgICAnVW5pcXVlIGlzIG5vdCBzdXBwb3J0ZWQgaW4gUG9zdGdyZXMgZm9yIGhhc01hbnkgbnVtYmVyIGZpZWxkcy4nLFxuICAgICAgICAgICAgKVxuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB0YXJnZXRUYWJsZVtmaWVsZE5hbWVdID0gbnVtZXJpYyhjb2x1bW5OYW1lKVxuICAgICAgICB9XG4gICAgICAgIGJyZWFrXG4gICAgICB9XG5cbiAgICAgIGNhc2UgJ3JpY2hUZXh0JzpcbiAgICAgIGNhc2UgJ2pzb24nOiB7XG4gICAgICAgIHRhcmdldFRhYmxlW2ZpZWxkTmFtZV0gPSBqc29uYihjb2x1bW5OYW1lKVxuICAgICAgICBicmVha1xuICAgICAgfVxuXG4gICAgICBjYXNlICdkYXRlJzoge1xuICAgICAgICB0YXJnZXRUYWJsZVtmaWVsZE5hbWVdID0gdGltZXN0YW1wKGNvbHVtbk5hbWUsIHtcbiAgICAgICAgICBtb2RlOiAnc3RyaW5nJyxcbiAgICAgICAgICBwcmVjaXNpb246IDMsXG4gICAgICAgICAgd2l0aFRpbWV6b25lOiB0cnVlLFxuICAgICAgICB9KVxuICAgICAgICBicmVha1xuICAgICAgfVxuXG4gICAgICBjYXNlICdwb2ludCc6IHtcbiAgICAgICAgYnJlYWtcbiAgICAgIH1cblxuICAgICAgY2FzZSAncmFkaW8nOlxuICAgICAgY2FzZSAnc2VsZWN0Jzoge1xuICAgICAgICBjb25zdCBlbnVtTmFtZSA9IGBlbnVtXyR7bmV3VGFibGVOYW1lfV8ke3RvU25ha2VDYXNlKGZpZWxkLm5hbWUpfWBcblxuICAgICAgICBhZGFwdGVyLmVudW1zW2VudW1OYW1lXSA9IHBnRW51bShcbiAgICAgICAgICBlbnVtTmFtZSxcbiAgICAgICAgICBmaWVsZC5vcHRpb25zLm1hcCgob3B0aW9uKSA9PiB7XG4gICAgICAgICAgICBpZiAob3B0aW9uSXNPYmplY3Qob3B0aW9uKSkge1xuICAgICAgICAgICAgICByZXR1cm4gb3B0aW9uLnZhbHVlXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBvcHRpb25cbiAgICAgICAgICB9KSBhcyBbc3RyaW5nLCAuLi5zdHJpbmdbXV0sXG4gICAgICAgIClcblxuICAgICAgICBpZiAoZmllbGQudHlwZSA9PT0gJ3NlbGVjdCcgJiYgZmllbGQuaGFzTWFueSkge1xuICAgICAgICAgIGNvbnN0IHNlbGVjdFRhYmxlTmFtZSA9IGAke25ld1RhYmxlTmFtZX1fJHt0b1NuYWtlQ2FzZShmaWVsZC5uYW1lKX1gXG4gICAgICAgICAgY29uc3QgYmFzZUNvbHVtbnM6IFJlY29yZDxzdHJpbmcsIFBnQ29sdW1uQnVpbGRlcj4gPSB7XG4gICAgICAgICAgICBvcmRlcjogaW50ZWdlcignb3JkZXInKS5ub3ROdWxsKCksXG4gICAgICAgICAgICBwYXJlbnQ6IHBhcmVudElEQ29sdW1uTWFwW3BhcmVudElEQ29sVHlwZV0oJ3BhcmVudF9pZCcpXG4gICAgICAgICAgICAgIC5yZWZlcmVuY2VzKCgpID0+IGFkYXB0ZXIudGFibGVzW3BhcmVudFRhYmxlTmFtZV0uaWQsIHsgb25EZWxldGU6ICdjYXNjYWRlJyB9KVxuICAgICAgICAgICAgICAubm90TnVsbCgpLFxuICAgICAgICAgICAgdmFsdWU6IGFkYXB0ZXIuZW51bXNbZW51bU5hbWVdKCd2YWx1ZScpLFxuICAgICAgICAgIH1cblxuICAgICAgICAgIGNvbnN0IGJhc2VFeHRyYUNvbmZpZzogUmVjb3JkPFxuICAgICAgICAgICAgc3RyaW5nLFxuICAgICAgICAgICAgKGNvbHM6IEdlbmVyaWNDb2x1bW5zKSA9PiBJbmRleEJ1aWxkZXIgfCBVbmlxdWVDb25zdHJhaW50QnVpbGRlclxuICAgICAgICAgID4gPSB7XG4gICAgICAgICAgICBvcmRlcklkeDogKGNvbHMpID0+IGluZGV4KCdvcmRlcl9pZHgnKS5vbihjb2xzLm9yZGVyKSxcbiAgICAgICAgICAgIHBhcmVudElkeDogKGNvbHMpID0+IGluZGV4KCdwYXJlbnRfaWR4Jykub24oY29scy5wYXJlbnQpLFxuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChmaWVsZC5sb2NhbGl6ZWQpIHtcbiAgICAgICAgICAgIGJhc2VDb2x1bW5zLmxvY2FsZSA9IGFkYXB0ZXIuZW51bXMuZW51bV9fbG9jYWxlcygnbG9jYWxlJykubm90TnVsbCgpXG4gICAgICAgICAgICBiYXNlRXh0cmFDb25maWcubG9jYWxlSWR4ID0gKGNvbHMpID0+IGluZGV4KCdsb2NhbGVfaWR4Jykub24oY29scy5sb2NhbGUpXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGZpZWxkLmluZGV4KSB7XG4gICAgICAgICAgICBiYXNlRXh0cmFDb25maWcudmFsdWUgPSAoY29scykgPT4gaW5kZXgoJ3ZhbHVlX2lkeCcpLm9uKGNvbHMudmFsdWUpXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnVpbGRUYWJsZSh7XG4gICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgYmFzZUNvbHVtbnMsXG4gICAgICAgICAgICBiYXNlRXh0cmFDb25maWcsXG4gICAgICAgICAgICBkaXNhYmxlTm90TnVsbCxcbiAgICAgICAgICAgIGRpc2FibGVVbmlxdWUsXG4gICAgICAgICAgICBmaWVsZHM6IFtdLFxuICAgICAgICAgICAgdGFibGVOYW1lOiBzZWxlY3RUYWJsZU5hbWUsXG4gICAgICAgICAgfSlcblxuICAgICAgICAgIHJlbGF0aW9uc1RvQnVpbGQuc2V0KGZpZWxkTmFtZSwgc2VsZWN0VGFibGVOYW1lKVxuXG4gICAgICAgICAgY29uc3Qgc2VsZWN0VGFibGVSZWxhdGlvbnMgPSByZWxhdGlvbnMoYWRhcHRlci50YWJsZXNbc2VsZWN0VGFibGVOYW1lXSwgKHsgb25lIH0pID0+IHtcbiAgICAgICAgICAgIGNvbnN0IHJlc3VsdDogUmVjb3JkPHN0cmluZywgUmVsYXRpb248c3RyaW5nPj4gPSB7XG4gICAgICAgICAgICAgIHBhcmVudDogb25lKGFkYXB0ZXIudGFibGVzW3BhcmVudFRhYmxlTmFtZV0sIHtcbiAgICAgICAgICAgICAgICBmaWVsZHM6IFthZGFwdGVyLnRhYmxlc1tzZWxlY3RUYWJsZU5hbWVdLnBhcmVudF0sXG4gICAgICAgICAgICAgICAgcmVmZXJlbmNlczogW2FkYXB0ZXIudGFibGVzW3BhcmVudFRhYmxlTmFtZV0uaWRdLFxuICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdFxuICAgICAgICAgIH0pXG5cbiAgICAgICAgICBhZGFwdGVyLnJlbGF0aW9uc1tgcmVsYXRpb25fJHtzZWxlY3RUYWJsZU5hbWV9YF0gPSBzZWxlY3RUYWJsZVJlbGF0aW9uc1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHRhcmdldFRhYmxlW2ZpZWxkTmFtZV0gPSBhZ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gICAgICAgX29yZGVySWR4OiAoY29scykgPT4gaW5kZXgoJ19vcmRlcl9pZHgnKS5vbihjb2xzLl9vcmRlciksXG4gICAgICAgICAgX3BhcmVudElESWR4OiAoY29scykgPT4gaW5kZXgoJ19wYXJlbnRfaWRfaWR4Jykub24oY29scy5fcGFyZW50SUQpLFxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGZpZWxkLmxvY2FsaXplZCAmJiBhZGFwdGVyLnBheWxvYWQuY29uZmlnLmxvY2FsaXphdGlvbikge1xuICAgICAgICAgIGJhc2VDb2x1bW5zLl9sb2NhbGUgPSBhZGFwdGVyLmVudW1zLmVudW1fX2xvY2FsZXMoJ19sb2NhbGUnKS5ub3ROdWxsKClcbiAgICAgICAgICBiYXNlRXh0cmFDb25maWcuX2xvY2FsZUlkeCA9IChjb2xzKSA9PiBpbmRleCgnX2xvY2FsZV9pZHgnKS5vbihjb2xzLl9sb2NhbGUpXG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCB7IHJlbGF0aW9uc1RvQnVpbGQ6IHN1YlJlbGF0aW9uc1RvQnVpbGQgfSA9IGJ1aWxkVGFibGUoe1xuICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgYmFzZUNvbHVtbnMsXG4gICAgICAgICAgYmFzZUV4dHJhQ29uZmlnLFxuICAgICAgICAgIGRpc2FibGVOb3ROdWxsOiBkaXNhYmxlTm90TnVsbEZyb21IZXJlLFxuICAgICAgICAgIGRpc2FibGVVbmlxdWUsXG4gICAgICAgICAgZmllbGRzOiBkaXNhYmxlVW5pcXVlID8gaWRUb1VVSUQoZmllbGQuZmllbGRzKSA6IGZpZWxkLmZpZWxkcyxcbiAgICAgICAgICByb290UmVsYXRpb25zVG9CdWlsZCxcbiAgICAgICAgICByb290UmVsYXRpb25zaGlwczogcmVsYXRpb25zaGlwcyxcbiAgICAgICAgICByb290VGFibGVJRENvbFR5cGUsXG4gICAgICAgICAgcm9vdFRhYmxlTmFtZSxcbiAgICAgICAgIC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2xzOiBHZW5lcmljQ29sdW1ucykgPT4gSW5kZXhCdWlsZGVyIHwgVW5pcXVlQ29uc3RyYWludEJ1aWxkZXJcbiAgICAgICAgICAgID4gPSB7XG4gICAgICAgICAgICAgIF9vcmRlcklkeDogKGNvbHMpID0+IGluZGV4KCdvcmRlcl9pZHgnKS5vbihjb2xzLl9vcmRlciksXG4gICAgICAgICAgICAgIF9wYXJlbnRJRElkeDogKGNvbHMpID0+IGluZGV4KCdwYXJlbnRfaWRfaWR4Jykub24oY29scy5fcGFyZW50SUQpLFxuICAgICAgICAgICAgICBfcGF0aElkeDogKGNvbHMpID0+IGluZGV4KCdwYXRoX2lkeCcpLm9uKGNvbHMuX3BhdGgpLFxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoZmllbGQubG9jYWxpemVkICYmIGFkYXB0ZXIucGF5bG9hZC5jb25maWcubG9jYWxpemF0aW9uKSB7XG4gICAgICAgICAgICAgIGJhc2VDb2x1bW5zLl9sb2NhbGUgPSBhZGFwdGVyLmVudW1zLmVudW1fX2xvY2FsZXMoJ19sb2NhbGUnKS5ub3ROdWxsKClcbiAgICAgICAgICAgICAgYmFzZUV4dHJhQ29uZmlnLl9sb2NhbGVJZHggPSAoY29scykgPT4gaW5kZXgoJ2xvY2FsZV9pZHgnKS5vbihjb2xzLl9sb2NhbGUpXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGNvbnN0IHsgcmVsYXRpb25zVG9CdWlsZDogc3ViUmVsYXRpb25zVG9CdWlsZCB9ID0gYnVpbGRUYWJsZSh7XG4gICAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICAgIGJhc2VDb2x1bW5zLFxuICAgICAgICAgICAgICBiYXNlRXh0cmFDb25maWcsXG4gICAgICAgICAgICAgIGRpc2FibGVOb3ROdWxsOiBkaXNhYmxlTm90TnVsbEZyb21IZXJlLFxuICAgICAgICAgICAgICBkaXNhYmxlVW5pcXVlLFxuICAgICAgICAgICAgICBmaWVsZHM6IGRpc2FibGVVbmlxdWUgPyBpZFRvVVVJRChibG9jay5maWVsZHMpIDogYmxvY2suZmllbGRzLFxuICAgICAgICAgICAgICByb290UmVsYXRpb25zVG9CdWlsZCxcbiAgICAgICAgICAgICAgcm9vdFJlbGF0aW9uc2hpcHM6IHJlbGF0aW9uc2hpcHMsXG4gICAgICAgICAgICAgIHJvb3RUYWJsZUlEQ29sVHlwZSxcbiAgICAgICAgICAgICAgcm9vdFRhYmxlTmFtZSxcbiAgICAgICAgICAgICAgdGFibGVOYW1lOiBibG9ja1RhYmxlTmFtZSxcbiAgICAgICAgICAgIH0pXG5cbiAgICAgICAgICAgIGNvbnN0IGJsb2NrVGFibGVSZWxhdGlvbnMgPSByZWxhdGlvbnMoXG4gICAgICAgICAgICAgIGFkYXB0ZXIudGFibGVzW2Jsb2NrVGFibGVOYW1lXSxcbiAgICAgICAgICAgICAgKHsgbWFueSwgb25lIH0pID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCByZXN1bHQ6IFJlY29yZDxzdHJpbmcsIFJlbGF0aW9uPHN0cmluZz4+ID0ge1xuICAgICAgICAgICAgICAgICAgX3BhcmVudElEOiBvbmUoYWRhcHRlci50YWJsZXNbcm9vdFRhYmxlTmFtZV0sIHtcbiAgICAgICAgICAgICAgICAgICAgZmllbGRzOiBbYWRhcHRlci50YWJsZXNbYmxvY2tUYWJsZU5hbWVdLl9wYXJlbnRJRF0sXG4gICAgICAgICAgICAgICAgICAgIHJlZmVyZW5jZXM6IFthZGFwdGVyLnRhYmxlc1tyb290VGFibGVOYW1lXS5pZF0sXG4gICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoaGFzTG9jYWxlc1RhYmxlKGJsb2NrLmZpZWxkcykpIHtcbiAgICAgICAgICAgICAgICAgIHJlc3VsdC5fbG9jYWxlcyA9IG1hbnkoYWRhcHRlci50YWJsZXNbYCR7YmxvY2tUYWJsZU5hbWV9X2xvY2FsZXNgXSlcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBzdWJSZWxhdGlvbnNUb0J1aWxkLmZvckVhY2goKHZhbCwga2V5KSA9PiB7XG4gICAgICAgICAgICAgICAgICByZXN1bHRba2V5XSA9IG1hbnkoYWRhcHRlci50YWJsZXNbdmFsXSlcbiAgICAgICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICBhZGFwdGVyLnJlbGF0aW9uc1tgcmVsYXRpb25zXyR7YmxvY2tUYWJsZU5hbWV9YF0gPSBibG9ja1RhYmxlUmVsYXRpb25zXG4gICAgICAgICAgfSBlbHNlIGlmIChwcm9jZXNzLmVudi5OT0RFX0VOViAhPT0gJ3Byb2R1Y3Rpb24nKSB7XG4gICAgICAgICAgICB2YWxpZGF0ZUV4aXN0aW5nQmxvY2tJc0lkZW50aWNhbCh7XG4gICAgICAgICAgICAgIGJsb2NrLFxuICAgICAgICAgICAgICBsb2NhbGl6ZWQ6IGZpZWxkLmxvY2FsaXplZCxcbiAgICAgICAgICAgICAgcm9vdFRhYmxlTmFtZSxcbiAgICAgICAgICAgICAgdGFibGU6IGFkYXB0ZXIudGFibGVzW2Jsb2NrVGFibGVOYW1lXSxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcm9vdFJlbGF0aW9uc1RvQnVpbGQuc2V0KGBfYmxvY2tzXyR7YmxvY2suc2x1Z31gLCBibG9ja1RhYmxlTmFtZSlcbiAgICAgICAgfSlcblxuICAgICAgICBicmVha1xuICAgICAgfVxuXG4gICAgICBjYXNlICd0YWInOlxuICAgICAgY2FzZSAnZ3JvdXAnOiB7XG4gICAgICAgIGlmICghKCduYW1lJyBpbiBmaWVsZCkpIHtcbiAgICAgICAgICBjb25zdCB7XG4gICAgICAgICAgICBoYXNMb2NhbGl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GFyZW50VGFibGVOYW1lLFxuICAgICAgICAgIHJlbGF0aW9uc1RvQnVpbGQsXG4gICAgICAgICAgcmVsYXRpb25zaGlwcyxcbiAgICAgICAgICByb290UmVsYXRpb25zVG9CdWlsZCxcbiAgICAgICAgICByb290VGFibGVJRENvbFR5cGUsXG4gICAgICAgICAgcm9vdFRhYmxlTmFtZSxcbiAgICAgICAgfSlcblxuICAgICAgICBpZiAodGFiSGFzTG9jYWxpemVkRmllbGQpIGhhc0xvY2FsaXplZEZpZWxkID0gdHJ1ZVxuICAgICAgICBpZiAodGFiSGFzTG9jYWxpemVkUmVsYXRpb25zaGlwRmllbGQpIGhhc0xvY2FsaXplZFJlbGF0aW9uc2hpcEZpZWxkID0gdHJ1ZVxuICAgICAgICBpZiAodGFiSGFzTWFueU51bWJlckZpZWxkKSBoYXNNYW55TnVtYmVyRmllbGQgPSB0cnVlXG4gICAgICAgIGlmICh0YWJIYXNMb2NhbGl6ZWRNYW55TnVtYmVyRmllbGQpIGhhc0xvY2FsaXplZE1hbnlOdW1iZXJGaWVsZCA9IHRydWVcblxuICAgICAgICBicmVha1xuICAgICAgfVxuXG4gICAgICBjYXNlICdyb3cnOlxuICAgICAgY2FzZSAnY29sbGFwc2libGUnOiB7XG4gICAgICAgIGNvbnN0IGRpc2FibGVOb3ROdWxsRnJvbUhlcmUgPSBCb29sZWFuKGZpZWxkLmFkbWluPy5jb25kaXRpb24pIHx8IGRpc2FibGVOb3ROdWxsXG4gICAgICAgIGNvbnN0IHtcbiAgICAgICAgICBoYXNMb2NhbGl6ZWRGaWVsZDogcm93SGFzTG9jYWxpemVkRmllbGQsXG4gICAgICAgICAgaGFzTG9jYWxpemVkTWFueU51bWJlckZpZWxkOiByb3dIYXNMb2NhbGl6ZWRNYW55TnVtYmVyRmllbGQsXG4gICAgICAgICAgaGFzTG9jYWxpemVkUmVsYXRpb25zaGlwRmllbGQ6IHJvd0hhc0xvY2FsaXplZFJlbGF0aW9uc2hpcEZpZWxkLFxuICA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ydWVcbiAgICAgICAgaWYgKHJvd0hhc0xvY2FsaXplZE1hbnlOdW1iZXJGaWVsZCkgaGFzTG9jYWxpemVkTWFueU51bWJlckZpZWxkID0gdHJ1ZVxuICAgICAgICBicmVha1xuICAgICAgfVxuXG4gICAgICBjYXNlICdyZWxhdGlvbnNoaXAnOlxuICAgICAgY2FzZSAndXBsb2FkJzpcbiAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkoZmllbGQucmVsYXRpb25UbykpIHtcbiAgICAgICAgICBmaWVsZC5yZWxhdGlvblRvLmZvckVhY2goKHJlbGF0aW9uKSA9PiByZWxhdGlvbnNoaXBzLmFkZChyZWxhdGlvbikpXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgcmVsYXRpb25zaGlwcy5hZGQoZmllbGQucmVsYXRpb25UbylcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChmaWVsZC5sb2NhbGl6ZWQgJiYgYWRhcHRlci5wYXlsb2FkLmNvbmZpZy5sb2NhbGl6YXRpb24pIHtcbiAgICAgICAgICBoYXNMb2NhbGl6ZWRSZWxhdGlvbnNoaXBGaWVsZCA9IHRydWVcbiAgICAgICAgfVxuICAgICAgICBicmVha1xuXG4gICAgICBkZWZhdWx0OlxuICAgICAgICBicmVha1xuICAgIH1cblxuICAgIGNvbnN0IGNvbmRpdGlvbiA9IGZpZWxkLmFkbWluICYmIGZpZWxkLmFkbWluLmNvbmRpdGlvblxuXG4gICAgaWYgKFxuICAgICAgIWRpc2FibGVOb3ROdWxsICYmXG4gICAgICB0YXJnZXRUYWJsZVtmaWVsZE5hbWVdICYmXG4gICAgICAncmVxdWlyZWQnIGluIGZpZWxkICYmXG4gICAgICBmaWVsZC5yZXF1aXJlZCAmJlxuICAgICAgIWNvbmRpdGlvblxuICAgICkge1xuICAgICAgdGFyZ2V0VGFibGVbZmllbGROYW1lXS5ub3ROdWxsKClcbiAgICB9XG4gIH0pXG5cbiAgcmV0dXJuIHtcbiAgICBoYXNMb2NhbGl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aGFzTWFueSBudW1iZXIgZmllbGRzLicsXG4gICAgICAgICAgICApXG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHRhcmdldFRhYmxlW2ZpZWxkTmFtZV0gPSBudW1lcmljKGNvbHVtbk5hbWUpXG4gICAgICAgIH1cbiAgICAgICAgYnJlYWtcbiAgICAgIH1cblxuICAgICAgY2FzZSAncmljaFRleHQnOlxuICAgICAgY2FzZSAnanNvbic6IHtcbiAgICAgICAgdGFyZ2V0VGFibGVbZmllbGROYW1lXSA9IGpzb25iKGNvbHVtbk5hbWUpXG4gICAgICAgIGJyZWFrXG4gICAgICB9XG5cbiAgICAgIGNhc2UgJ2RhdGUnOiB7XG4gICAgICAgIHRhcmdldFRhYmxlW2ZpZWxkTmFtZV0gPSB0aW1lc3RhbXAoY29sdW1uTmFtZSwge1xuICAgICAgICAgIG1vZGU6ICdzdHJpbmcnLFxuICAgICAgICAgIHByZWNpc2lvbjogMyxcbiAgICAgICAgICB3aXRoVGltZXpvbmU6IHRydWUsXG4gICAgICAgIH0pXG4gICAgICAgIGJyZWFrXG4gICAgICB9XG5cbiAgICAgIGNhc2UgJ3BvaW50Jzoge1xuICAgICAgICBicmVha1xuICAgICAgfVxuXG4gICAgICBjYXNlICdyYWRpbyc6XG4gICAgICBjYXNlICdzZWxlY3QnOiB7XG4gICAgICAgIGNvbnN0IGVudW1OYW1lID0gYGVudW1fJHtuZXdUYWJsZU5hbWV9XyR7dG9TbmFrZUNhc2UoZmllbGQubmFtZSl9YFxuXG4gICAgICAgIGFkYXB0ZXIuZW51bXNbZW51bU5hbWVdID0gcGdFbnVtKFxuICAgICAgICAgIGVudW1OYW1lLFxuICAgICAgICAgIGZpZWxkLm9wdGlvbnMubWFwKChvcHRpb24pID0+IHtcbiAgICAgICAgICAgIGlmIChvcHRpb25Jc09iamVjdChvcHRpb24pKSB7XG4gICAgICAgICAgICAgIHJldHVybiBvcHRpb24udmFsdWVcbiAgICAgICAgICAgIH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8c3RyaW5nLCBSZWxhdGlvbjxzdHJpbmc+PiA9IHtcbiAgICAgICAgICAgICAgcGFyZW50OiBvbmUoYWRhcHRlci50YWJsZXNbcGFyZW50VGFibGVOYW1lXSwge1xuICAgICAgICAgICAgICAgIGZpZWxkczogW2FkYXB0ZXIudGFibGVzW3NlbGVjdFRhYmxlTmFtZV0ucGFyZW50XSxcbiAgICAgICAgICAgICAgICByZWZlcmVuY2VzOiBbYWRhcHRlci50YWJsZXNbcGFyZW50VGFibGVOYW1lXS5pZF0sXG4gICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0XG4gICAgICAgICAgfSlcblxuICAgICAgICAgIGFkYXB0ZXIucmVsYXRpb25zW2ByZWxhdGlvbl8ke3NlbGVjdFRhYmxlTmFtZX1gXSA9IHNlbGVjdFRhYmxlUmVsYXRpb25zXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdGFyZ2V0VGFibGVbZmllbGROYW1lXSA9IGFkYXB0ZXIuZW51bXNbZW51bU5hbWVdKGZpZWxkTmFtZSlcbiAgICAgICAgfVxuICAgICAgICBicmVha1xuICAgICAgfVxuXG4gICAgICBjYXNlICdjaGVja2JveCc6IHtcbiAgICAgICAgdGFyZ2V0VGFibGVbZmllbGROYW1lXSA9IGJvb2xlYW4oY29sdW1uTmFtZSlcbiAgICAgICAgYnJlYWtcbiAgICAgIH1cblxuICAgICAgY2FzZSAnYXJyYXknOiB7XG4gICAgICAgIGNvbnN0IGRpc2FibGVOb3ROdWxsRnJvbUhlcmUgPSBCb29sZWFuKGZpZWxkLmFkbWluPy5jb25kaXRpb24pIHx8IGRpc2FibGVOb3ROdWxsXG5cbiAgICAgICAgY29uc3QgYXJyYXlUYWJsZU5hbWUgPSBgJHtuZXdUYWJsZU5hbWV9XyR7dG9TbmFrZUNhc2UoZmllbGQubmFtZSl9YFxuICAgICAgICBjb25zdCBiYXNlQ29sdW1uczogUmVjb3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AgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHsgaGFzTWFueU51bWJlckZpZWxkOiBzdWJIYXNNYW55TnVtYmVyRmllbGQsIHJlbGF0aW9uc1RvQnVpbGQ6IHN1YlJlbGF0aW9uc1RvQnVpbGQgfSA9XG4gICAgICAgICAgYnVpbGRUYWJsZSh7XG4gICAgICAgICAgICBhZGFwdGVyLFxuICAgICAgICAgICAgYmFzZUNvbHVtbnMsXG4gICAgICAgICAgICBiYXNlRXh0cmFDb25maWcsXG4gICAgICAgICAgICBkaXNhYmxlTm90TnVsbDogZGlzYWJsZU5vdE51bGxGcm9tSGVyZSxcbiAgICAgICAgICAgIGRpc2FibGVVbmlxdWUsXG4gICAgICAgICAgICBmaWVsZHM6IGRpc2FibGVVbmlxdWUgPyBpZFRvVVVJRChmaWVsZC5maWVsZHMpIDogZmllbGQuZmllbGRzLFxuICAgICAgICAgICAgcm9vdFJlbGF0aW9uc1RvQnVpbGQsXG4gICAgICAgICAgICByb290UmVsYXRpb25zaGlwczogcmVsYXRpb25zaGlwcyxcbiAgICAgICAgICAgIHJvb3RUYWJsZUlEQ29sVHlwZSxcbiAgICAgICAgICAgIHJvb3RUYWJsZU5hbWUsXG4gICAgICAgICAgICB0YWJsZU5hbWU6IGFycmF5VGFibGVOYW1lLFxuICAgICAgICAgIH0pXG5cbiAgICAgICAgaWYgKHN1Ykhhc01hbnlOdW1iZXJGaWVsZCkge1xuICAgICAgICAgIGlmICghaGFzTWFueU51bWJlckZpZWxkIHx8IHN1Ykhhc01hbnlOdW1iZXJGaWVsZCA9PT0gJ2luZGV4JylcbiAgICAgICAgICAgIGhhc01hbnlOdW1iZXJGaWVsZCA9IHN1Ykhhc01hbnlOdW1iZXJGaWVsZFxuICAgICAgICB9XG5cbiAgICAgICAgcmVsYXRpb25zVG9CdWlsZC5zZXQoZmllbGROYW1lLCBhcnJheVRhYmxlTmFtZSlcblxuICAgICAgICBjb25zdCBhcnJheVRhYmxlUmVsYXRpb25zID0gcmVsYXRpb25zKGFkYXB0ZXIudGFibGVzW2FycmF5VGFibGVOYW1lXSwgKHsgbWFueSwgb25lIH0pID0+IHtcbiAgICAgICAgICBjb25zdCByZXN1bHQ6IFJlY29yZDxzdHJpbmcsIFJlbGF0aW9uPHN0cmluZz4+ID0ge1xuICAgICAgICAgICAgX3BhcmVudElEOiBvbmUoYWRhcHRlci50YWJsZXNbcGFyZW50VGFibGVOYW1lXSwge1xuICAgICAgICAgICAgICBmaWVsZHM6IFthZGFwdGVyLnRhYmxlc1thcnJheVRhYmxlTmFtZV0uX3BhcmVudElEXSxcbiAgICAgICAgICAgICAgcmVmZXJlbmNlczogW2FkYXB0ZXIudGFibGVzW3BhcmVudFRhYmxlTmFtZV0uaWRdLFxuICAgICAgICAgICAgfSksXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGhhc0xvY2FsZXNUYWJsZShmaWVsZC5maWVsZHMpKSB7XG4gICAgICAgICAgICByZXN1bHQuX2xvY2FsZXMgPSBtYW55KGFkYXB0ZXIudGFibGVzW2Ake2FycmF5VGFibGVOYW1lfV9sb2NhbGVzYF0pXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgc3ViUmVsYXRpb25zVG9CdWlsZC5mb3JFYWNoKCh2YWwsIGtleSkgPT4ge1xuICAgICAgICAgICAgcmVzdWx0W2tleV0gPSBtYW55KGFkYXB0ZXIudGFibGVzW3ZhbF0pXG4gICAgICAgICAgfSlcblxuICAgICAgICAgIHJldHVybiByZXN1bHRcbiAgICAgICAgfSlcblxuICAgICAgICBhZGFwdGVyLnJlbGF0aW9uc1tgcmVsYXRpb25zXyR7YXJyYXlUYWJsZU5hbWV9YF0gPSBhcnJheVRhYmxlUmVsYXRpb25zXG5cbiAgICAgICAgYnJlYWtcbiAgICAgIH1cblxuICAgICAgY2FzZSAnYmxvY2tzJzoge1xuICAgICAgICBjb25zdCBkaXNhYmxlTm90TnVsbEZyb21IZXJlID0gQm9vbGVhbihmaWVsZC5hZG1pbj8uY29u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ICAgICAgX3BhcmVudElESWR4OiAoY29scykgPT4gaW5kZXgoJ3BhcmVudF9pZF9pZHgnKS5vbihjb2xzLl9wYXJlbnRJRCksXG4gICAgICAgICAgICAgIF9wYXRoSWR4OiAoY29scykgPT4gaW5kZXgoJ3BhdGhfaWR4Jykub24oY29scy5fcGF0aCksXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChmaWVsZC5sb2NhbGl6ZWQgJiYgYWRhcHRlci5wYXlsb2FkLmNvbmZpZy5sb2NhbGl6YXRpb24pIHtcbiAgICAgICAgICAgICAgYmFzZUNvbHVtbnMuX2xvY2FsZSA9IGFkYXB0ZXIuZW51bXMuZW51bV9fbG9jYWxlcygnX2xvY2FsZScpLm5vdE51bGwoKVxuICAgICAgICAgICAgICBiYXNlRXh0cmFDb25maWcuX2xvY2FsZUlkeCA9IChjb2xzKSA9PiBpbmRleCgnbG9jYWxlX2lkeCcpLm9uKGNvbHMuX2xvY2FsZSlcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY29uc3Qge1xuICAgICAgICAgICAgICBoYXNNYW55TnVtYmVyRmllbGQ6IHN1Ykhhc01hbnlOdW1iZXJGaWVsZCxcbiAgICAgICAgICAgICAgcmVsYXRpb25zVG9CdWlsZDogc3ViUmVsYXRpb25zVG9CdWlsZCxcbiAgICAgICAgICAgIH0gPSBidWlsZFRhYmxlKHtcbiAgICAgICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICAgICAgYmFzZUNvbHVtbnMsXG4gICAgICAgICAgICAgIGJhc2VFeHRyYUNvbmZpZyxcbiAgICAgICAgICAgICAgZGlzYWJsZU5vdE51bGw6IGRpc2FibGVOb3ROdWxsRnJvbUhlcmUsXG4gICAgICAgICAgICAgIGRpc2FibGVVbmlxdWUsXG4gICAgICAgICAgICAgIGZpZWxkczogZGlzYWJsZVVuaXF1ZSA/IGlkVG9VVUlEKGJsb2NrLmZpZWxkcykgOiBibG9jay5maWVsZHMsXG4gICAgICAgICAgICAgIHJvb3RSZWxhdGlvbnNUb0J1aWxkLFxuICAgICAgICAgICAgICByb290UmVsYXRpb25zaGlwczogcmVsYXRpb25zaGlwcyxcbiAgICAgICAgICAgICAgcm9vdFRhYmxlSURDb2xUeXBlLFxuICAgICAgICAgICAgICByb290VGFibGVOYW1lLFxuICAgICAgICAgICAgICB0YWJsZU5hbWU6IGJsb2NrVGFibGVOYW1lLFxuICAgICAgICAgICAgfSlcblxuICAgICAgICAgICAgaWYgKHN1Ykhhc01hbnlOdW1iZXJGaWVsZCkge1xuICAgICAgICAgICAgICBpZiAoIWhhc01hbnlOdW1iZXJGaWVsZCB8fCBzdWJIYXNNYW55TnVtYmVyRmllbGQgPT09ICdpbmRleCcpXG4gICAgICAgICAgICAgICAgaGFzTWFueU51bWJlckZpZWxkID0gc3ViSGFzTWFueU51bWJlckZpZWxkXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGNvbnN0IGJsb2NrVGFibGVSZWxhdGlvbnMgPSByZWxhdGlvbnMoXG4gICAgICAgICAgICAgIGFkYXB0ZXIudGFibGVzW2Jsb2NrVGFibGVOYW1lXSxcbiAgICAgICAgICAgICAgKHsgbWFueSwgb25lIH0pID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCByZXN1bHQ6IFJlY29yZDxzdHJpbmcsIFJlbGF0aW9uPHN0cmluZz4+ID0ge1xuICAgICAgICAgICAgICAgICAgX3BhcmVudElEOiBvbmUoYWRhcHRlci50YWJsZXNbcm9vdFRhYmxlTmFtZV0sIHtcbiAgICAgICAgICAgICAgICAgICAgZmllbGRzOiBbYWRhcHRlci50YWJsZXNbYmxvY2tUYWJsZU5hbWVdLl9wYXJlbnRJRF0sXG4gICAgICAgICAgICAgICAgICAgIHJlZmVyZW5jZXM6IFthZGFwdGVyLnRhYmxlc1tyb290VGFibGVOYW1lXS5pZF0sXG4gICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoaGFzTG9jYWxlc1RhYmxlKGJsb2NrLmZpZWxkcykpIHtcbiAgICAgICAgICAgICAgICAgIHJlc3VsdC5fbG9jYWxlcyA9IG1hbnkoYWRhcHRlci50YWJsZXNbYCR7YmxvY2tUYWJsZU5hbWV9X2xvY2FsZXNgXSlcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBzdWJSZWxhdGlvbnNUb0J1aWxkLmZvckVhY2goKHZhbCwga2V5KSA9PiB7XG4gICAgICAgICAgICAgICAgICByZXN1bHRba2V5XSA9IG1hbnkoYWRhcHRlci50YWJsZXNbdmFsXSlcbiAgICAgICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdFxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgKVxuXG4gICAgICAgICAgICBhZGFwdGVyLnJlbGF0aW9uc1tgcmVsYXRpb25zXyR7YmxvY2tUYWJsZU5hbWV9YF0gPSBibG9ja1RhYmxlUmVsYXRpb25zXG4gICAgICAgICAgfSBlbHNlIGlmIChwcm9jZXNzLmVudi5OT0RFX0VOViAhPT0gJ3Byb2R1Y3Rpb24nKSB7XG4gICAgICAgICAgICB2YWxpZGF0ZUV4aXN0aW5nQmxvY2tJc0lkZW50aWNhbCh7XG4gICAgICAgICAgICAgIGJsb2NrLFxuICAgICAgICAgICAgICBsb2NhbGl6ZWQ6IGZpZWxkLmxvY2FsaXplZCxcbiAgICAgICAgICAgICAgcm9vdFRhYmxlTmFtZSxcbiAgICAgICAgICAgICAgdGFibGU6IGFkYXB0ZXIudGFibGVzW2Jsb2NrVGFibGVOYW1lXSxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcm9vdFJlbGF0aW9uc1RvQnVpbGQuc2V0KGBfYmxvY2tzXyR7YmxvY2suc2x1Z31gLCBibG9ja1RhYmxlTmFtZSlcbiAgICAgICAgfSlcblxuICAgICAgICBicmVha1xuICAgICAgfVxuXG4gICAgIC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nSSxHQUFHLENBQUNuSCxNQUFNaUgsVUFBVTtnQkFDcEM7Z0JBRUEsSUFBSWpILE1BQU1ZLFNBQVMsSUFBSXpDLFFBQVFzQyxPQUFPLENBQUNDLE1BQU0sQ0FBQ0MsWUFBWSxFQUFFO29CQUMxRG5CLGdDQUFnQztnQkFDbEM7Z0JBQ0E7WUFFRjtnQkFDRTtRQUNKO1FBRUEsTUFBTTBFLFlBQVlsRSxNQUFNaUUsS0FBSyxJQUFJakUsTUFBTWlFLEtBQUssQ0FBQ0MsU0FBUztRQUV0RCxJQUNFLENBQUMxRixrQkFDRDRCLFdBQVcsQ0FBQ0QsVUFBVSxJQUN0QixjQUFjSCxTQUNkQSxNQUFNb0gsUUFBUSxJQUNkLENBQUNsRCxXQUNEO1lBQ0E5RCxXQUFXLENBQUNELFVBQVUsQ0FBQ3NDLE9BQU87UUFDaEM7SUFDRjtJQUVBLE9BQU87UUFDTGxEO1FBQ0FHO1FBQ0FGO1FBQ0FDO0lBQ0Y7QUFDRiJ9
@@ -1 +1 @@
1
- {"version":3,"file":"commitTransaction.d.ts","sourceRoot":"","sources":["../../src/transactions/commitTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,eAAO,MAAM,iBAAiB,EAAE,iBAY/B,CAAA"}
1
+ {"version":3,"file":"commitTransaction.d.ts","sourceRoot":"","sources":["../../src/transactions/commitTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAEzD,eAAO,MAAM,iBAAiB,EAAE,iBAa/B,CAAA"}
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "commitTransaction", {
9
9
  }
10
10
  });
11
11
  const commitTransaction = async function commitTransaction(id) {
12
+ // if the session was deleted it has already been aborted
12
13
  if (!this.sessions[id]) {
13
14
  return;
14
15
  }
@@ -20,4 +21,4 @@ const commitTransaction = async function commitTransaction(id) {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yxRQUFRLENBQUNELEdBQUcsQ0FBQ0UsT0FBTztJQUMzQixFQUFFLE9BQU9DLEtBQWM7UUFDckIsSUFBSSxDQUFDRixRQUFRLENBQUNELEdBQUcsQ0FBQ0ksTUFBTTtJQUMxQjtJQUVBLE9BQU8sSUFBSSxDQUFDSCxRQUFRLENBQUNELEdBQUc7QUFDMUIifQ==
@@ -1 +1 @@
1
- {"version":3,"file":"rollbackTransaction.d.ts","sourceRoot":"","sources":["../../src/transactions/rollbackTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAE3D,eAAO,MAAM,mBAAmB,EAAE,mBAWjC,CAAA"}
1
+ {"version":3,"file":"rollbackTransaction.d.ts","sourceRoot":"","sources":["../../src/transactions/rollbackTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAE3D,eAAO,MAAM,mBAAmB,EAAE,mBAcjC,CAAA"}
@@ -9,12 +9,15 @@ Object.defineProperty(exports, "rollbackTransaction", {
9
9
  }
10
10
  });
11
11
  const rollbackTransaction = async function rollbackTransaction(id = '') {
12
+ // if multiple operations are using the same transaction, the first will flow through and delete the session.
13
+ // subsequent calls should be ignored.
12
14
  if (!this.sessions[id]) {
13
- this.payload.logger.warn('rollbackTransaction called when no transaction exists');
14
15
  return;
15
16
  }
17
+ // end the session promise in failure by calling reject
16
18
  await this.sessions[id].reject();
19
+ // delete the session causing any other operations with the same transaction to fail
17
20
  delete this.sessions[id];
18
21
  };
19
22
 
20
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90cmFuc2FjdGlvbnMvcm9sbGJhY2tUcmFuc2FjdGlvbi50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSB7IFJvbGxiYWNrVHJhbnNhY3Rpb24gfSBmcm9tICdwYXls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FJLENBQUNDLFFBQVEsQ0FBQ0QsR0FBRyxFQUFFO1FBQ3RCO0lBQ0Y7SUFFQSx1REFBdUQ7SUFDdkQsTUFBTSxJQUFJLENBQUNDLFFBQVEsQ0FBQ0QsR0FBRyxDQUFDRSxNQUFNO0lBRTlCLG9GQUFvRjtJQUNwRixPQUFPLElBQUksQ0FBQ0QsUUFBUSxDQUFDRCxHQUFHO0FBQzFCIn0=
@@ -1,7 +1,8 @@
1
1
  type Args = {
2
2
  data: unknown;
3
+ id?: unknown;
3
4
  locale?: string;
4
5
  };
5
- export declare const transformSelects: ({ data, locale }: Args) => Record<string, unknown>[];
6
+ export declare const transformSelects: ({ id, data, locale }: Args) => Record<string, unknown>[];
6
7
  export {};
7
8
  //# sourceMappingURL=selects.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"selects.d.ts","sourceRoot":"","sources":["../../../src/transform/write/selects.ts"],"names":[],"mappings":"AAGA,KAAK,IAAI,GAAG;IACV,IAAI,EAAE,OAAO,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,gBAAgB,qBAAsB,IAAI,8BAmBtD,CAAA"}
1
+ {"version":3,"file":"selects.d.ts","sourceRoot":"","sources":["../../../src/transform/write/selects.ts"],"names":[],"mappings":"AAGA,KAAK,IAAI,GAAG;IACV,IAAI,EAAE,OAAO,CAAA;IACb,EAAE,CAAC,EAAE,OAAO,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,gBAAgB,yBAA0B,IAAI,8BAoB1D,CAAA"}
@@ -9,12 +9,13 @@ Object.defineProperty(exports, "transformSelects", {
9
9
  }
10
10
  });
11
11
  const _isArrayOfRows = require("../../utilities/isArrayOfRows");
12
- const transformSelects = ({ data, locale })=>{
12
+ const transformSelects = ({ id, data, locale })=>{
13
13
  const newRows = [];
14
14
  if ((0, _isArrayOfRows.isArrayOfRows)(data)) {
15
15
  data.forEach((value, i)=>{
16
16
  const newRow = {
17
17
  order: i + 1,
18
+ parent: id,
18
19
  value
19
20
  };
20
21
  if (locale) {
@@ -26,4 +27,4 @@ const transformSelects = ({ data, locale })=>{
26
27
  return newRows;
27
28
  };
28
29
 
29
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cmFuc2Zvcm0vd3JpdGUvc2VsZWN0cy50cyJdLCJzb3VyY2VzQ29udGVudCI6WyIvKiBlc2xpbnQtZGlzYWJsZSBuby1wYXJhbS1yZWFzc2lnbiAqL1xuaW1wb3J0IHsgaXNBcnJheU9mUm93cyB9IGZyb20gJy4uLy4uL3V0aWxpdGllcy9pc0FycmF5T2ZSb3dzJ1xuXG50eXBlIEFyZ3MgPSB7XG4gIGRhdGE6IHVua25vd25cbiAgbG9jYWxlPzogc3RyaW5nXG59XG5cbmV4cG9ydCBjb25zdCB0cmFuc2Zvcm1TZWxlY3RzID0gKHsgZGF0YSwgbG9jYWxlIH06IEFyZ3MpID0+IHtcbiAgY29uc3QgbmV3Um93czogUmVjb3JkPHN0cmluZywgdW5rbm93bj5bXSA9IFtdXG5cbiAgaWYgKGlzQXJyYXlPZlJvd3MoZGF0YSkpIHtcbiAgICBkYXRhLmZvckVhY2goKHZhbHVlLCBpKSA9PiB7XG4gICAgICBjb25zdCBuZXdSb3c6IFJlY29yZDxzdHJpbmcsIHVua25vd24+ID0ge1xuICAgICAgICBvcmRlcjogaSArIDEsXG4gICAgICAgIHZhbHVlLFxuICAgICAgfVxuXG4gICAgICBpZiAobG9jYWxlKSB7XG4gICAgICAgIG5ld1Jvdy5sb2NhbGUgPSBsb2NhbGVcbiAgICAgIH1cblxuICAgICAgbmV3Um93cy5wdXNoKG5ld1JvdylcbiAgICB9KVxuICB9XG5cbiAgcmV0dXJuIG5ld1Jvd3Ncbn1cbiJdLCJuYW1lcyI6WyJ0cmFuc2Zvcm1TZWxlY3RzIiwiZGF0YSIsIm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