@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, "createJSONQuery", {
6
- enumerable: true,
7
- get: function() {
8
- return createJSONQuery;
9
- }
10
- });
11
- const _convertPathToJSONTraversal = require("./convertPathToJSONTraversal");
12
- const _formatJSONPathSegment = require("./formatJSONPathSegment");
1
+ import { convertPathToJSONTraversal } from './convertPathToJSONTraversal';
2
+ import { formatJSONPathSegment } from './formatJSONPathSegment';
13
3
  const operatorMap = {
14
4
  contains: '~*',
15
5
  equals: '=',
@@ -19,7 +9,7 @@ const fromArray = ({ isRoot, operator, pathSegments, treatAsArray, value })=>{
19
9
  const newPathSegments = pathSegments.slice(isRoot ? 1 : 2);
20
10
  const alias = `${pathSegments[isRoot ? 0 : 1]}_alias_${newPathSegments.length}`;
21
11
  newPathSegments.unshift(alias);
22
- const arrayElements = isRoot ? pathSegments[0] : `${pathSegments[0]} -> ${(0, _formatJSONPathSegment.formatJSONPathSegment)(pathSegments[1])}`;
12
+ const arrayElements = isRoot ? pathSegments[0] : `${pathSegments[0]} -> ${formatJSONPathSegment(pathSegments[1])}`;
23
13
  return `EXISTS (
24
14
  SELECT 1
25
15
  FROM jsonb_array_elements(${arrayElements}) AS ${alias}
@@ -32,10 +22,10 @@ const fromArray = ({ isRoot, operator, pathSegments, treatAsArray, value })=>{
32
22
  )`;
33
23
  };
34
24
  const createConstraint = ({ operator, pathSegments, value })=>{
35
- const jsonQuery = (0, _convertPathToJSONTraversal.convertPathToJSONTraversal)(pathSegments);
25
+ const jsonQuery = convertPathToJSONTraversal(pathSegments);
36
26
  return `${pathSegments[0]}${jsonQuery} ${operatorMap[operator]} '${value}'`;
37
27
  };
38
- const createJSONQuery = ({ operator, pathSegments, treatAsArray, treatRootAsArray, value })=>{
28
+ export const createJSONQuery = ({ operator, pathSegments, treatAsArray, treatRootAsArray, value })=>{
39
29
  if (treatRootAsArray) {
40
30
  return fromArray({
41
31
  isRoot: true,
@@ -61,4 +51,4 @@ const createJSONQuery = ({ operator, pathSegments, treatAsArray, treatRootAsArra
61
51
  });
62
52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0gsVUFBVTtZQUNmRTtZQUNBQztZQUNBQztZQUNBQztRQUNGO0lBQ0Y7SUFFQSxPQUFPUSxpQkFBaUI7UUFBRVg7UUFBVUM7UUFBY0M7UUFBY0M7SUFBTTtBQUN4RSxFQUFDIn0=
@@ -1,31 +1,20 @@
1
- /* eslint-disable no-param-reassign */ "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "getTableColumnFromPath", {
6
- enumerable: true,
7
- get: function() {
8
- return getTableColumnFromPath;
9
- }
10
- });
11
- const _drizzleorm = require("drizzle-orm");
12
- const _pgcore = require("drizzle-orm/pg-core");
13
- const _errors = require("payload/errors");
14
- const _types = require("payload/types");
15
- const _utilities = require("payload/utilities");
16
- const _tosnakecase = /*#__PURE__*/ _interop_require_default(require("to-snake-case"));
17
- const _uuid = require("uuid");
18
- function _interop_require_default(obj) {
19
- return obj && obj.__esModule ? obj : {
20
- default: obj
21
- };
22
- }
23
- const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPrefix = '', constraintPath: incomingConstraintPath, constraints = [], fields, joinAliases, joins, locale: incomingLocale, pathSegments: incomingSegments, rootTableName: incomingRootTableName, selectFields, tableName, tableNameSuffix = '', value })=>{
1
+ /* eslint-disable no-param-reassign */ import { and, eq, like, sql } from 'drizzle-orm';
2
+ import { alias } from 'drizzle-orm/pg-core';
3
+ import { APIError } from 'payload/errors';
4
+ import { fieldAffectsData, tabHasName } from 'payload/types';
5
+ import { flattenTopLevelFields } from 'payload/utilities';
6
+ import toSnakeCase from 'to-snake-case';
7
+ import { v4 as uuid } from 'uuid';
8
+ /**
9
+ * Transforms path to table and column name
10
+ * Adds tables to `join`
11
+ * @returns TableColumn
12
+ */ export const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPrefix = '', constraintPath: incomingConstraintPath, constraints = [], fields, joinAliases, joins, locale: incomingLocale, pathSegments: incomingSegments, rootTableName: incomingRootTableName, selectFields, tableName, tableNameSuffix = '', value })=>{
24
13
  const fieldPath = incomingSegments[0];
25
14
  let locale = incomingLocale;
26
15
  const rootTableName = incomingRootTableName || tableName;
27
16
  let constraintPath = incomingConstraintPath || '';
28
- const field = (0, _utilities.flattenTopLevelFields)(fields).find((fieldToFind)=>(0, _types.fieldAffectsData)(fieldToFind) && fieldToFind.name === fieldPath);
17
+ const field = flattenTopLevelFields(fields).find((fieldToFind)=>fieldAffectsData(fieldToFind) && fieldToFind.name === fieldPath);
29
18
  let newTableName = tableName;
30
19
  if (!field && fieldPath === 'id') {
31
20
  selectFields.id = adapter.tables[newTableName].id;
@@ -79,7 +68,7 @@ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPre
79
68
  }
80
69
  case 'tab':
81
70
  {
82
- if ((0, _types.tabHasName)(field)) {
71
+ if (tabHasName(field)) {
83
72
  return getTableColumnFromPath({
84
73
  adapter,
85
74
  aliasTable,
@@ -95,7 +84,7 @@ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPre
95
84
  rootTableName,
96
85
  selectFields,
97
86
  tableName: newTableName,
98
- tableNameSuffix: `${tableNameSuffix}${(0, _tosnakecase.default)(field.name)}_`,
87
+ tableNameSuffix: `${tableNameSuffix}${toSnakeCase(field.name)}_`,
99
88
  value
100
89
  });
101
90
  }
@@ -122,7 +111,7 @@ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPre
122
111
  {
123
112
  if (locale && field.localized && adapter.payload.config.localization) {
124
113
  newTableName = `${tableName}_locales`;
125
- joins[tableName] = (0, _drizzleorm.eq)(adapter.tables[tableName].id, adapter.tables[newTableName]._parentID);
114
+ joins[tableName] = eq(adapter.tables[tableName].id, adapter.tables[newTableName]._parentID);
126
115
  if (locale !== 'all') {
127
116
  constraints.push({
128
117
  columnName: '_locale',
@@ -146,16 +135,16 @@ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPre
146
135
  rootTableName,
147
136
  selectFields,
148
137
  tableName: newTableName,
149
- tableNameSuffix: `${tableNameSuffix}${(0, _tosnakecase.default)(field.name)}_`,
138
+ tableNameSuffix: `${tableNameSuffix}${toSnakeCase(field.name)}_`,
150
139
  value
151
140
  });
152
141
  }
153
142
  case 'array':
154
143
  {
155
- newTableName = `${tableName}_${tableNameSuffix}${(0, _tosnakecase.default)(field.name)}`;
144
+ newTableName = `${tableName}_${tableNameSuffix}${toSnakeCase(field.name)}`;
156
145
  constraintPath = `${constraintPath}${field.name}.%.`;
157
146
  if (locale && field.localized && adapter.payload.config.localization) {
158
- joins[newTableName] = (0, _drizzleorm.and)((0, _drizzleorm.eq)(adapter.tables[tableName].id, adapter.tables[newTableName]._parentID), (0, _drizzleorm.eq)(adapter.tables[newTableName]._locale, locale));
147
+ joins[newTableName] = and(eq(adapter.tables[tableName].id, adapter.tables[newTableName]._parentID), eq(adapter.tables[newTableName]._locale, locale));
159
148
  if (locale !== 'all') {
160
149
  constraints.push({
161
150
  columnName: '_locale',
@@ -164,7 +153,7 @@ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPre
164
153
  });
165
154
  }
166
155
  } else {
167
- joins[newTableName] = (0, _drizzleorm.eq)(adapter.tables[tableName].id, adapter.tables[newTableName]._parentID);
156
+ joins[newTableName] = eq(adapter.tables[tableName].id, adapter.tables[newTableName]._parentID);
168
157
  }
169
158
  return getTableColumnFromPath({
170
159
  adapter,
@@ -194,8 +183,8 @@ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPre
194
183
  ];
195
184
  blockTypes.forEach((blockType)=>{
196
185
  const block = field.blocks.find((block)=>block.slug === blockType);
197
- newTableName = `${tableName}_blocks_${(0, _tosnakecase.default)(block.slug)}`;
198
- joins[newTableName] = (0, _drizzleorm.eq)(adapter.tables[tableName].id, adapter.tables[newTableName]._parentID);
186
+ newTableName = `${tableName}_blocks_${toSnakeCase(block.slug)}`;
187
+ joins[newTableName] = eq(adapter.tables[tableName].id, adapter.tables[newTableName]._parentID);
199
188
  constraints.push({
200
189
  columnName: '_path',
201
190
  table: adapter.tables[newTableName],
@@ -210,7 +199,7 @@ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPre
210
199
  };
211
200
  }
212
201
  const hasBlockField = field.blocks.some((block)=>{
213
- newTableName = `${tableName}_blocks_${(0, _tosnakecase.default)(block.slug)}`;
202
+ newTableName = `${tableName}_blocks_${toSnakeCase(block.slug)}`;
214
203
  constraintPath = `${constraintPath}${field.name}.%.`;
215
204
  let result;
216
205
  const blockConstraints = [];
@@ -244,7 +233,7 @@ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPre
244
233
  ...blockSelectFields
245
234
  };
246
235
  if (field.localized && adapter.payload.config.localization) {
247
- joins[newTableName] = (0, _drizzleorm.and)((0, _drizzleorm.eq)(adapter.tables[tableName].id, adapter.tables[newTableName]._parentID), (0, _drizzleorm.eq)(adapter.tables[newTableName]._locale, locale));
236
+ joins[newTableName] = and(eq(adapter.tables[tableName].id, adapter.tables[newTableName]._parentID), eq(adapter.tables[newTableName]._locale, locale));
248
237
  if (locale) {
249
238
  constraints.push({
250
239
  columnName: '_locale',
@@ -253,7 +242,7 @@ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPre
253
242
  });
254
243
  }
255
244
  } else {
256
- joins[newTableName] = (0, _drizzleorm.eq)(adapter.tables[tableName].id, adapter.tables[newTableName]._parentID);
245
+ joins[newTableName] = eq(adapter.tables[tableName].id, adapter.tables[newTableName]._parentID);
257
246
  }
258
247
  return true;
259
248
  });
@@ -275,22 +264,22 @@ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPre
275
264
  let relationshipFields;
276
265
  const relationTableName = `${rootTableName}_rels`;
277
266
  const newCollectionPath = pathSegments.slice(1).join('.');
278
- const aliasRelationshipTableName = (0, _uuid.v4)();
279
- const aliasRelationshipTable = (0, _pgcore.alias)(adapter.tables[relationTableName], aliasRelationshipTableName);
267
+ const aliasRelationshipTableName = uuid();
268
+ const aliasRelationshipTable = alias(adapter.tables[relationTableName], aliasRelationshipTableName);
280
269
  // Join in the relationships table
281
270
  joinAliases.push({
282
- condition: (0, _drizzleorm.and)((0, _drizzleorm.eq)((aliasTable || adapter.tables[rootTableName]).id, aliasRelationshipTable.parent), (0, _drizzleorm.like)(aliasRelationshipTable.path, `${constraintPath}${field.name}`)),
271
+ condition: and(eq((aliasTable || adapter.tables[rootTableName]).id, aliasRelationshipTable.parent), like(aliasRelationshipTable.path, `${constraintPath}${field.name}`)),
283
272
  table: aliasRelationshipTable
284
273
  });
285
274
  selectFields[`${relationTableName}.path`] = aliasRelationshipTable.path;
286
275
  let newAliasTable;
287
276
  if (typeof field.relationTo === 'string') {
288
- newTableName = `${(0, _tosnakecase.default)(field.relationTo)}`;
277
+ newTableName = `${toSnakeCase(field.relationTo)}`;
289
278
  // parent to relationship join table
290
279
  relationshipFields = adapter.payload.collections[field.relationTo].config.fields;
291
- newAliasTable = (0, _pgcore.alias)(adapter.tables[newTableName], (0, _tosnakecase.default)((0, _uuid.v4)()));
280
+ newAliasTable = alias(adapter.tables[newTableName], toSnakeCase(uuid()));
292
281
  joinAliases.push({
293
- condition: (0, _drizzleorm.eq)(newAliasTable.id, aliasRelationshipTable[`${field.relationTo}ID`]),
282
+ condition: eq(newAliasTable.id, aliasRelationshipTable[`${field.relationTo}ID`]),
294
283
  table: newAliasTable
295
284
  });
296
285
  if (newCollectionPath === '' || newCollectionPath === 'id') {
@@ -302,11 +291,11 @@ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPre
302
291
  };
303
292
  }
304
293
  } else if (newCollectionPath === 'value') {
305
- const tableColumnsNames = field.relationTo.map((relationTo)=>`"${aliasRelationshipTableName}"."${(0, _tosnakecase.default)(relationTo)}_id"`);
294
+ const tableColumnsNames = field.relationTo.map((relationTo)=>`"${aliasRelationshipTableName}"."${toSnakeCase(relationTo)}_id"`);
306
295
  return {
307
296
  constraints,
308
297
  field,
309
- rawColumn: _drizzleorm.sql.raw(`COALESCE(${tableColumnsNames.join(', ')})`),
298
+ rawColumn: sql.raw(`COALESCE(${tableColumnsNames.join(', ')})`),
310
299
  table: aliasRelationshipTable
311
300
  };
312
301
  } else if (newCollectionPath === 'relationTo') {
@@ -324,7 +313,7 @@ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPre
324
313
  table: aliasRelationshipTable
325
314
  };
326
315
  } else {
327
- throw new _errors.APIError('Not supported');
316
+ throw new APIError('Not supported');
328
317
  }
329
318
  return getTableColumnFromPath({
330
319
  adapter,
@@ -344,13 +333,13 @@ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPre
344
333
  }
345
334
  default:
346
335
  {
347
- if ((0, _types.fieldAffectsData)(field)) {
336
+ if (fieldAffectsData(field)) {
348
337
  if (field.localized && adapter.payload.config.localization) {
349
338
  // If localized, we go to localized table and set aliasTable to undefined
350
339
  // so it is not picked up below to be used as targetTable
351
340
  newTableName = `${tableName}_locales`;
352
341
  const parentTable = aliasTable || adapter.tables[tableName];
353
- joins[newTableName] = (0, _drizzleorm.eq)(parentTable.id, adapter.tables[newTableName]._parentID);
342
+ joins[newTableName] = eq(parentTable.id, adapter.tables[newTableName]._parentID);
354
343
  aliasTable = undefined;
355
344
  if (locale !== 'all') {
356
345
  constraints.push({
@@ -373,7 +362,7 @@ const getTableColumnFromPath = ({ adapter, aliasTable, collectionPath, columnPre
373
362
  }
374
363
  }
375
364
  }
376
- throw new _errors.APIError(`Cannot find field for path at ${fieldPath}`);
365
+ throw new APIError(`Cannot find field for path at ${fieldPath}`);
377
366
  };
378
367
 
379
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9xdWVyaWVzL2dldFRhYmxlQ29sdW1uRnJvbVBhdGgudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyogZXNsaW50LWRpc2FibGUgbm8tcGFyYW0tcmVhc3NpZ24gKi9cbmltcG9ydCB0eXBlIHsgU1FMIH0gZnJvbSAnZHJp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5wYXlsb2FkLmNvbmZpZy5sb2NhbGl6YXRpb24pIHtcbiAgICAgIGNvbnN0IG1hdGNoZWRMb2NhbGUgPSBhZGFwdGVyLnBheWxvYWQuY29uZmlnLmxvY2FsaXphdGlvbi5sb2NhbGVDb2Rlcy5maW5kKFxuICAgICAgICAobG9jYWxlKSA9PiBsb2NhbGUgPT09IHBhdGhTZWdtZW50c1sxXSxcbiAgICAgIClcblxuICAgICAgaWYgKG1hdGNoZWRMb2NhbGUpIHtcbiAgICAgICAgbG9jYWxlID0gbWF0Y2hlZExvY2FsZVxuICAgICAgICBwYXRoU2VnbWVudHMuc3BsaWNlKDEsIDEpXG4gICAgICB9XG4gICAgfVxuXG4gICAgc3dpdGNoIChmaWVsZC50eXBlKSB7XG4gICAgICBjYXNlICd0YWJzJzoge1xuICAgICAgICByZXR1cm4gZ2V0VGFibGVDb2x1bW5Gcm9tUGF0aCh7XG4gICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICBhbGlhc1RhYmxlLFxuICAgICAgICAgIGNvbGxlY3Rpb25QYXRoLFxuICAgICAgICAgIGNvbHVtblByZWZpeCxcbiAgICAgICAgICBjb25zdHJhaW50UGF0aCxcbiAgICAgICAgICBjb25zdHJhaW50cyxcbiAgICAgICAgICBmaWVsZHM6IGZpZWxkLnRhYnMubWFwKCh0YWIpID0+ICh7XG4gICAgICAgICAgICAuLi50YWIsXG4gICAgICAgICAgICB0eXBlOiAndGFiJyxcbiAgICAgICAgICB9KSksXG4gICAgICAgICAgam9pbkFsaWFzZXMsXG4gICAgICAgICAgam9pbnMsXG4gICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgIHBhdGhTZWdtZW50czogcGF0aFNlZ21lbnRzLnNsaWNlKDEpLFxuICAgICAgICAgIHJvb3RUYWJsZU5hbWUsXG4gICAgICAgICAgc2VsZWN0RmllbGRzLFxuICAgICAgICAgIHRhYmxlTmFtZTogbmV3VGFibGVOYW1lLFxuICAgICAgICAgIHRhYmxlTmFtZVN1ZmZpeCxcbiAgICAgICAgICB2YWx1ZSxcbiAgICAgICAgfSlcbiAgICAgIH1cbiAgICAgIGNhc2UgJ3RhYic6IHtcbiAgICAgICAgaWYgKHRhYkhhc05hbWUoZmllbGQpKSB7XG4gICAgICAgICAgcmV0dXJuIGdldFRhYmxlQ29sdW1uRnJvbVBhdGgoe1xuICAgICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICAgIGFsaWFzVGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uUGF0aCxcbiAgICAgICAgICAgIGNvbHVtblByZWZpeDogYCR7Y29sdW1uUHJlZml4fSR7ZmllbGQubmFtZX1fYCxcbiAgICAgICAgICAgIGNvbnN0cmFpbnRQYXRoOiBgJHtjb25zdHJhaW50UGF0aH0ke2ZpZWxkLm5hbWV9LmAsXG4gICAgICAgICAgICBjb25zdHJhaW50cyxcbiAgICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgICAgam9pbkFsaWFzZXMsXG4gICAgICAgICAgICBqb2lucyxcbiAgICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICAgIHBhdGhTZWdtZW50czogcGF0aFNlZ21lbnRzLnNsaWNlKDEpLFxuICAgICAgICAgICAgcm9vdFRhYmxlTmFtZSxcbiAgICAgICAgICAgIHNlbGVjdEZpZWxkcyxcbiAgICAgICAgICAgIHRhYmxlTmFtZTogbmV3VGFibGVOYW1lLFxuICAgICAgICAgICAgdGFibGVOYW1lU3VmZml4OiBgJHt0YWJsZU5hbWVTdWZmaXh9JHt0b1NuYWtlQ2FzZShmaWVsZC5uYW1lKX1fYCxcbiAgICAgICAgICAgIHZhbHVlLFxuICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGdldFRhYmxlQ29sdW1uRnJvbVBhdGgoe1xuICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgYWxpYXNUYWJsZSxcbiAgICAgICAgICBjb2xsZWN0aW9uUGF0aCxcbiAgICAgICAgICBjb2x1bW5QcmVmaXgsXG4gICAgICAgICAgY29uc3RyYWludFBhdGgsXG4gICAgICAgICAgY29uc3RyYWludHMsXG4gICAgICAgICAgZmllbGRzOiBmaWVsZC5maWVsZHMsXG4gICAgICAgICAgam9pbkFsaWFzZXMsXG4gICAgICAgICAgam9pbnMsXG4gICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgIHBhdGhTZWdtZW50czogcGF0aFNlZ21lbnRzLnNsaWNlKDEpLFxuICAgICAgICAgIHJvb3RUYWJsZU5hbWUsXG4gICAgICAgICAgc2VsZWN0RmllbGRzLFxuICAgICAgICAgIHRhYmxlTmFtZTogbmV3VGFibGVOYW1lLFxuICAgICAgICAgIHRhYmxlTmFtZVN1ZmZpeCxcbiAgICAgICAgICB2YWx1ZSxcbiAgICAgICAgfSlcbiAgICAgIH1cblxuICAgICAgY2FzZSAnZ3JvdXAnOiB7XG4gICAgICAgIGlmIChsb2NhbGUgJiYgZmllbGQubG9jYWxpemVkICYmIGFkYXB0ZXIucGF5bG9hZC5jb25maWcubG9jYWxpemF0aW9uKSB7XG4gICAgICAgICAgbmV3VGFibGVOYW1lID0gYCR7dGFibGVOYW1lfV9sb2NhbGVzYFxuXG4gICAgICAgICAgam9pbnNbdGFibGVOYW1lXSA9IGVxKFxuICAgICAgICAgICAgYWRhcHRlci50YWJsZXNbdGFibGVOYW1lXS5pZCxcbiAgICAgICAgICAgIGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0uX3BhcmVudElELFxuICAgICAgICAgIClcbiAgICAgICAgICBpZiAobG9jYWxlICE9PSAnYWxsJykge1xuICAgICAgICAgICAgY29uc3RyYWludHMucHVzaCh7XG4gICAgICAgICAgICAgIGNvbHVtbk5hbWU6ICdfbG9jYWxlJyxcbiAgICAgICAgICAgICAgdGFibGU6IGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0sXG4gICAgICAgICAgICAgIHZhbHVlOiBsb2NhbGUsXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZ2V0VGFibGVDb2x1bW5Gcm9tUGF0aCh7XG4gICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICBhbGlhc1RhYmxlLFxuICAgICAgICAgIGNvbGxlY3Rpb25QYXRoLFxuICAgICAgICAgIGNvbHVtblByZWZpeDogYCR7Y29sdW1uUHJlZml4fSR7ZmllbGQubmFtZX1fYCxcbiAgICAgICAgICBjb25zdHJhaW50UGF0aDogYCR7Y29uc3RyYWludFBhdGh9JHtmaWVsZC5uYW1lfS5gLFxuICAgICAgICAgIGNvbnN0cmFpbnRzLFxuICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgIGpvaW5BbGlhc2VzLFxuICAgICAgICAgIGpvaW5zLFxuICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICBwYXRoU2VnbWVudHM6IHBhdGhTZWdtZW50cy5zbGljZSgxKSxcbiAgICAgICAgICByb290VGFibGVOYW1lLFxuICAgICAgICAgIHNlbGVjdEZpZWxkcyxcbiAgICAgICAgICB0YWJsZU5hbWU6IG5ld1RhYmxlTmFtZSxcbiAgICAgICAgICB0YWJsZU5hbWVTdWZmaXg6IGAke3RhYmxlTmFtZVN1ZmZpeH0ke3RvU25ha2VDYXNlKGZpZWxkLm5hbWUpfV9gLFxuICAgICAgICAgIHZhbHVlLFxuICAgICAgICB9KVxuICAgICAgfVxuXG4gICAgICBjYXNlICdhcnJheSc6IHtcbiAgICAgICAgbmV3VGFibGVOYW1lID0gYCR7dGFibGVOYW1lfV8ke3RhYmxlTmFtZVN1ZmZpeH0ke3RvU25ha2VDYXNlKGZpZWxkLm5hbWUpfWBcbiAgICAgICAgY29uc3RyYWludFBhdGggPSBgJHtjb25zdHJhaW50UGF0aH0ke2ZpZWxkLm5hbWV9LiUuYFxuICAgICAgICBpZiAobG9jYWxlICYmIGZpZWxkLmxvY2FsaXplZCAmJiBhZGFwdGVyLnBheWxvYWQuY29uZmlnLmxvY2FsaXphdGlvbikge1xuICAgICAgICAgIGpvaW5zW25ld1RhYmxlTmFtZV0gPSBhbmQoXG4gICAgICAgICAgICBlcShhZGFwdGVyLnRhYmxlc1t0YWJsZU5hbWVdLmlkLCBhZGFwdGVyLnRhYmxlc1tuZXdUYWJsZU5hbWVdLl9wYXJlbnRJRCksXG4gICAgICAgICAgICBlcShhZGFwdGVyLnRhYmxlc1tuZXdUYWJsZU5hbWVdLl9sb2NhbGUsIGxvY2FsZSksXG4gICAgICAgICAgKVxuICAgICAgICAgIGlmIChsb2NhbGUgIT09ICdhbGwnKSB7XG4gICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKHtcbiAgICAgICAgICAgICAgY29sdW1uTmFtZTogJ19sb2NhbGUnLFxuICAgICAgICAgICAgICB0YWJsZTogYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXSxcbiAgICAgICAgICAgICAgdmFsdWU6IGxvY2FsZSxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGpvaW5zW25ld1RhYmxlTmFtZV0gPSBlcShcbiAgICAgICAgICAgIGFkYXB0ZXIudGFibGVzW3RhYmxlTmFtZV0uaWQsXG4gICAgICAgICAgICBhZGFwdGVyLnRhYmxlc1tuZXdUYWJsZU5hbWVdLl9wYXJlbnRJRCxcbiAgICAgICAgICApXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGdldFRhYmxlQ29sdW1uRnJvbVBhdGgoe1xuICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgY29sbGVjdGlvblBhdGgsXG4gICAgICAgICAgY29uc3RyYWludFBhdGgsXG4gICAgICAgICAgY29uc3RyYWludHMsXG4gICAgICAgICAgZmllbGRzOiBmaWVsZC5maWVsZHMsXG4gICAgICAgICAgam9pbkFsaWFzZXMsXG4gICAgICAgICAgam9pbnMsXG4gICAgICAgICAgbG9jYWxl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ApXG4gICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKHtcbiAgICAgICAgICAgICAgY29sdW1uTmFtZTogJ19wYXRoJyxcbiAgICAgICAgICAgICAgdGFibGU6IGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0sXG4gICAgICAgICAgICAgIHZhbHVlOiBwYXRoU2VnbWVudHNbMF0sXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH0pXG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGNvbnN0cmFpbnRzLFxuICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICBnZXROb3ROdWxsQ29sdW1uQnlWYWx1ZTogKCkgPT4gJ2lkJyxcbiAgICAgICAgICAgIHRhYmxlOiBhZGFwdGVyLnRhYmxlc1t0YWJsZU5hbWVdLFxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGhhc0Jsb2NrRmllbGQgPSBmaWVsZC5ibG9ja3Muc29tZSgoYmxvY2spID0+IHtcbiAgICAgICAgICBuZXdUYWJsZU5hbWUgPSBgJHt0YWJsZU5hbWV9X2Jsb2Nrc18ke3RvU25ha2VDYXNlKGJsb2NrLnNsdWcpfWBcbiAgICAgICAgICBjb25zdHJhaW50UGF0aCA9IGAke2NvbnN0cmFpbnRQYXRofSR7ZmllbGQubmFtZX0uJS5gXG4gICAgICAgICAgbGV0IHJlc3VsdFxuICAgICAgICAgIGNvbnN0IGJsb2NrQ29uc3RyYWludHMgPSBbXVxuICAgICAgICAgIGNvbnN0IGJsb2NrU2VsZWN0RmllbGRzID0ge31cbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgcmVzdWx0ID0gZ2V0VGFibGVDb2x1bW5Gcm9tUGF0aCh7XG4gICAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICAgIGNvbGxlY3Rpb25QYXRoLFxuICAgICAgICAgICAgICBjb25zdHJhaW50UGF0aCxcbiAgICAgICAgICAgICAgY29uc3RyYWludHM6IGJsb2NrQ29uc3RyYWludHMsXG4gICAgICAgICAgICAgIGZpZWxkczogYmxvY2suZmllbGRzLFxuICAgICAgICAgICAgICBqb2luQWxpYXNlcyxcbiAgICAgICAgICAgICAgam9pbnMsXG4gICAgICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICAgICAgcGF0aFNlZ21lbnRzOiBwYXRoU2VnbWVudHMuc2xpY2UoMSksXG4gICAgICAgICAgICAgIHJvb3RUYWJsZU5hbWUsXG4gICAgICAgICAgICAgIHNlbGVjdEZpZWxkczogYmxvY2tTZWxlY3RGaWVsZHMsXG4gICAgICAgICAgICAgIHRhYmxlTmFtZTogbmV3VGFibGVOYW1lLFxuICAgICAgICAgICAgICB2YWx1ZSxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgIC8vIHRoaXMgaXMgZmluZSwgbm90IGV2ZXJ5IGJsb2NrIHdpbGwgaGF2ZSB0aGUgZmllbGRcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKCFyZXN1bHQpIHtcbiAgICAgICAgICAgIHJldHVyblxuICAgICAgICAgIH1cbiAgICAgICAgICBibG9ja1RhYmxlQ29sdW1uID0gcmVzdWx0XG4gICAgICAgICAgY29uc3RyYWludHMgPSBjb25zdHJhaW50cy5jb25jYXQoYmxvY2tDb25zdHJhaW50cylcbiAgICAgICAgICBzZWxlY3RGaWVsZHMgPSB7IC4uLnNlbGVjdEZpZWxkcywgLi4uYmxvY2tTZWxlY3RGaWVsZHMgfVxuICAgICAgICAgIGlmIChmaWVsZC5sb2NhbGl6ZWQgJiYgYWRhcHRlci5wYXlsb2FkLmNvbmZpZy5sb2NhbGl6YXRpb24pIHtcbiAgICAgICAgICAgIGpvaW5zW25ld1RhYmxlTmFtZV0gPSBhbmQoXG4gICAgICAgICAgICAgIGVxKGFkYXB0ZXIudGFibGVzW3RhYmxlTmFtZV0uaWQsIGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0uX3BhcmVudElEKSxcbiAgICAgICAgICAgICAgZXEoYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXS5fbG9jYWxlLCBsb2NhbGUpLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgaWYgKGxvY2FsZSkge1xuICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKHtcbiAgICAgICAgICAgICAgICBjb2x1bW5OYW1lOiAnX2xvY2FsZScsXG4gICAgICAgICAgICAgICAgdGFibGU6IGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0sXG4gICAgICAgICAgICAgICAgdmFsdWU6IGxvY2FsZSxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgam9pbnNbbmV3VGFibGVOYW1lXSA9IGVxKFxuICAgICAgICAgICAgICBhZGFwdGVyLnRhYmxlc1t0YWJsZU5hbWVdLmlkLFxuICAgICAgICAgICAgICBhZGFwdGVyLnRhYmxlc1tuZXdUYWJsZU5hbWVdLl9wYXJlbnRJRCxcbiAgICAgICAgICAgIClcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIHRydWVcbiAgICAgICAgfSlcbiAgICAgICAgaWYgKGhhc0Jsb2NrRmllbGQpIHtcbiAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgY29sdW1uTmFtZTogYmxvY2tUYWJsZUNvbHVtbi5jb2x1bW5OYW1lLFxuICAgICAgICAgICAgY29uc3RyYWludHMsXG4gICAgICAgICAgICBmaWVsZDogYmxvY2tUYWJsZUNvbHVtbi5maWVsZCxcbiAgICAgICAgICAgIHBhdGhTZWdtZW50czogcGF0aFNlZ21lbnRzLnNsaWNlKDEpLFxuICAgICAgICAgICAgcmF3Q29sdW1uOiBibG9ja1RhYmxlQ29sdW1uLnJhd0NvbHVtbixcbiAgICAgICAgICAgIHRhYmxlOiBibG9ja1RhYmxlQ29sdW1uLnRhYmxlLFxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBicmVha1xuICAgICAgfVxuXG4gICAgICBjYXNlICdyZWxhdGlvbnNoaXAnOlxuICAgICAgY2FzZSAndXBsb2FkJzoge1xuICAgICAgICBsZXQgcmVsYXRpb25zaGlwRmllbGRzXG4gICAgICAgIGNvbnN0IHJlbGF0aW9uVGFibGVOYW1lID0gYCR7cm9vdFRhYmxlTmFtZX1fcmVsc2BcbiAgICAgICAgY29uc3QgbmV3Q29sbGVjdGlvblBhdGggPSBwYXRoU2VnbWVudHMuc2xpY2UoMSkuam9pbignLicpXG4gICAgICAgIGNvbnN0IGFsaWFzUmVsYXRpb25zaGlwVGFibGVOYW1lID0gdXVpZCgpXG4gICAgICAgIGNvbnN0IGFsaWFzUmVsYXRpb25zaGlwVGFibGUgPSBhbGlhcyhcbiAgICAgICAgICBhZGFwdGVyLnRhYmxlc1tyZWxhdGlvblRhYmxlTmFtZV0sXG4gICAgICAgICAgYWxpYXNSZWxhdGlvbnNoaXBUYWJsZU5hbWUsXG4gICAgICAgIClcblxuICAgICAgICAvLyBKb2luIGluIHRoZSByZWxhdGlvbnNoaXBzIHRhYmxlXG4gICAgICAgIGpvaW5BbGlhc2VzLnB1c2goe1xuICAgICAgICAgIGNvbmRpdGlvbjogYW5kKFxuICAgICAgICAgICAgZXEoKGFsaWFzVGFibGUgfHwgYWRhcHRlci50YWJsZXNbcm9vdFRhYmxlTmFtZV0pLmlkLCBhbGlhc1JlbGF0aW9uc2hpcFRhYmxlLnBhcmVudCksXG4gICAgICAgICAgICBsaWtlKGFsaWFzUmVsYXRpb25zaGlwVGFibGUucGF0aCwgYCR7Y29uc3RyYWludFBhdGh9JHtmaWVsZC5uYW1lfWApLFxuICAgICAgICAgICksXG4gICAgICAgICAgdGFibGU6IGFsaWFzUmVsYXRpb25zaGlwVGFibGUsXG4gICAgICAgIH0pXG5cbiAgICAgICAgc2VsZWN0RmllbGRzW2Ake3JlbGF0aW9u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ZSxcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAobmV3Q29sbGVjdGlvblBhdGggPT09ICd2YWx1ZScpIHtcbiAgICAgICAgICBjb25zdCB0YWJsZUNvbHVtbnNOYW1lcyA9IGZpZWxkLnJlbGF0aW9uVG8ubWFwKFxuICAgICAgICAgICAgKHJlbGF0aW9uVG8pID0+IGBcIiR7YWxpYXNSZWxhdGlvbnNoaXBUYWJsZU5hbWV9XCIuXCIke3RvU25ha2VDYXNlKHJlbGF0aW9uVG8pfV9pZFwiYCxcbiAgICAgICAgICApXG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGNvbnN0cmFpbnRzLFxuICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICByYXdDb2x1bW46IHNxbC5yYXcoYENPQUxFU0NFKCR7dGFibGVDb2x1bW5zTmFtZXMuam9pbignLCAnKX0pYCksXG4gICAgICAgICAgICB0YWJsZTogYWxpYXNSZWxhdGlvbnNoaXBUYWJsZSxcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAobmV3Q29sbGVjdGlvblBhdGggPT09ICdyZWxhdGlvblRvJykge1xuICAgICAgICAgIGNvbnN0IHJlbGF0aW9uVG8gPSBBcnJheS5pc0FycmF5KGZpZWxkLnJlbGF0aW9uVG8pID8gZmllbGQucmVsYXRpb25UbyA6IFtmaWVsZC5yZWxhdGlvblRvXVxuXG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGNvbnN0cmFpbnRzLFxuICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICBnZXROb3ROdWxsQ29sdW1uQnlWYWx1ZTogKHZhbCkgPT4ge1xuICAgICAgICAgICAgICBjb25zdCBtYXRjaGVkUmVsYXRpb24gPSByZWxhdGlvblRvLmZpbmQoKHJlbGF0aW9uKSA9PiByZWxhdGlvbiA9PT0gdmFsKVxuICAgICAgICAgICAgICBpZiAobWF0Y2hlZFJlbGF0aW9uKSByZXR1cm4gYCR7bWF0Y2hlZFJlbGF0aW9ufUlEYFxuICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgdGFibGU6IGFsaWFzUmVsYXRpb25zaGlwVGFibGUsXG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHRocm93IG5ldyBBUElFcnJvcignTm90IHN1cHBvcnRlZCcpXG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gZ2V0VGFibGVDb2x1bW5Gcm9tUGF0aCh7XG4gICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICBhbGlhc1RhYmxlOiBuZXdBbGlhc1RhYmxlLFxuICAgICAgICAgIGNvbGxlY3Rpb25QYXRoOiBuZXdDb2xsZWN0aW9uUGF0aCxcbiAgICAgICAgICBjb25zdHJhaW50cyxcbiAgICAgICAgICBmaWVsZHM6IHJlbGF0aW9uc2hpcEZpZWxkcyxcbiAgICAgICAgICBqb2luQWxpYXNlcyxcbiAgICAgICAgICBqb2lucyxcbiAgICAgICAgICBsb2NhbGUsXG4gICAgICAgICAgcGF0aFNlZ21lbnRzOiBwYXRoU2VnbWVudHMuc2xpY2UoMSksXG4gICAgICAgICAgcm9vdFRhYmxlTmFtZTogbmV3VGFibGVOYW1lLFxuICAgICAgICAgIHNlbGVjdEZpZWxkcyxcbiAgICAgICAgICB0YWJsZU5hbWU6IG5ld1RhYmxlTmFtZSxcbiAgICAgICAgICB2YWx1ZSxcbiAgICAgICAgfSlcbiAgICAgIH1cblxuICAgICAgZGVmYXVsdDoge1xuICAgICAgICBpZiAoZmllbGRBZmZlY3RzRGF0YShmaWVsZCkpIHtcbiAgICAgICAgICBpZiAoZmllbGQubG9jYWxpemVkICYmIGFkYXB0ZXIucGF5bG9hZC5jb25maWcubG9jYWxpemF0aW9uKSB7XG4gICAgICAgICAgICAvLyBJZiBsb2NhbGl6ZWQsIHdlIGdvIHRvIGxvY2FsaXplZCB0YWJsZSBhbmQgc2V0IGFsaWFzVGFibGUgdG8gdW5kZWZpbmVkXG4gICAgICAgICAgICAvLyBzbyBpdCBpcyBub3QgcGlja2VkIHVwIGJlbG93IHRvIGJlIHVzZWQgYXMgdGFyZ2V0VGFibGVcbiAgICAgICAgICAgIG5ld1RhYmxlTmFtZSA9IGAke3RhYmxlTmFtZX1fbG9jYWxlc2BcblxuICAgICAgICAgICAgY29uc3QgcGFyZW50VGFibGUgPSBhbGlhc1RhYmxlIHx8IGFkYXB0ZXIudGFibGVzW3RhYmxlTmFtZV1cblxuICAgICAgICAgICAgam9pbnNbbmV3VGFibGVOYW1lXSA9IGVxKHBhcmVudFRhYmxlLmlkLCBhZGFwdGVyLnRhYmxlc1tuZXdUYWJsZU5hbWVdLl9wYXJlbnRJRClcblxuICAgICAgICAgICAgYWxpYXNUYWJsZSA9IHVuZGVmaW5lZFxuXG4gICAgICAgICAgICBpZiAobG9jYWxlICE9PSAnYWxsJykge1xuICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKHtcbiAgICAgICAgICAgICAgICBjb2x1bW5OYW1lOiAnX2xvY2FsZScsXG4gICAgICAgICAgICAgICAgdGFibGU6IGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0sXG4gICAgICAgICAgICAgICAgdmFsdWU6IGxvY2FsZSxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBjb25zdCB0YXJnZXRUYWJsZSA9IGFsaWFzVGFibGUgfHwgYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXVxuXG4gICAgICAgICAgc2VsZWN0RmllbGRzW2Ake25ld1RhYmxlTmFtZX0uJHtjb2x1bW5QcmVmaXh9JHtmaWVsZC5uYW1lfWBdID1cbiAgICAgICAgICAgIHRhcmdldFRhYmxlW2Ake2NvbHVtblByZWZpeH0ke2ZpZWxkLm5hbWV9YF1cblxuICAgICAgICAgIH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2V0VGFibGVDb2x1bW5Gcm9tUGF0aCh7XG4gICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICBhbGlhc1RhYmxlLFxuICAgICAgICAgIGNvbGxlY3Rpb25QYXRoLFxuICAgICAgICAgIGNvbHVtblByZWZpeCxcbiAgICAgICAgICBjb25zdHJhaW50UGF0aCxcbiAgICAgICAgICBjb25zdHJhaW50cyxcbiAgICAgICAgICBmaWVsZHM6IGZpZWxkLnRhYnMubWFwKCh0YWIpID0+ICh7XG4gICAgICAgICAgICAuLi50YWIsXG4gICAgICAgICAgICB0eXBlOiAndGFiJyxcbiAgICAgICAgICB9KSksXG4gICAgICAgICAgam9pbkFsaWFzZXMsXG4gICAgICAgICAgam9pbnMsXG4gICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgIHBhdGhTZWdtZW50czogcGF0aFNlZ21lbnRzLnNsaWNlKDEpLFxuICAgICAgICAgIHJvb3RUYWJsZU5hbWUsXG4gICAgICAgICAgc2VsZWN0RmllbGRzLFxuICAgICAgICAgIHRhYmxlTmFtZTogbmV3VGFibGVOYW1lLFxuICAgICAgICAgIHRhYmxlTmFtZVN1ZmZpeCxcbiAgICAgICAgICB2YWx1ZSxcbiAgICAgICAgfSlcbiAgICAgIH1cbiAgICAgIGNhc2UgJ3RhYic6IHtcbiAgICAgICAgaWYgKHRhYkhhc05hbWUoZmllbGQpKSB7XG4gICAgICAgICAgcmV0dXJuIGdldFRhYmxlQ29sdW1uRnJvbVBhdGgoe1xuICAgICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICAgIGFsaWFzVGFibGUsXG4gICAgICAgICAgICBjb2xsZWN0aW9uUGF0aCxcbiAgICAgICAgICAgIGNvbHVtblByZWZpeDogYCR7Y29sdW1uUHJlZml4fSR7ZmllbGQubmFtZX1fYCxcbiAgICAgICAgICAgIGNvbnN0cmFpbnRQYXRoOiBgJHtjb25zdHJhaW50UGF0aH0ke2ZpZWxkLm5hbWV9LmAsXG4gICAgICAgICAgICBjb25zdHJhaW50cyxcbiAgICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgICAgam9pbkFsaWFzZXMsXG4gICAgICAgICAgICBqb2lucyxcbiAgICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICAgIHBhdGhTZWdtZW50czogcGF0aFNlZ21lbnRzLnNsaWNlKDEpLFxuICAgICAgICAgICAgcm9vdFRhYmxlTmFtZSxcbiAgICAgICAgICAgIHNlbGVjdEZpZWxkcyxcbiAgICAgICAgICAgIHRhYmxlTmFtZTogbmV3VGFibGVOYW1lLFxuICAgICAgICAgICAgdGFibGVOYW1lU3VmZml4OiBgJHt0YWJsZU5hbWVTdWZmaXh9JHt0b1NuYWtlQ2FzZShmaWVsZC5uYW1lKX1fYCxcbiAgICAgICAgICAgIHZhbHVlLFxuICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGdldFRhYmxlQ29sdW1uRnJvbVBhdGgoe1xuICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgYWxpYXNUYWJsZSxcbiAgICAgICAgICBjb2xsZWN0aW9uUGF0aCxcbiAgICAgICAgICBjb2x1bW5QcmVmaXgsXG4gICAgICAgICAgY29uc3RyYWludFBhdGgsXG4gICAgICAgICAgY29uc3RyYWludHMsXG4gICAgICAgICAgZmllbGRzOiBmaWVsZC5maWVsZHMsXG4gICAgICAgICAgam9pbkFsaWFzZXMsXG4gICAgICAgICAgam9pbnMsXG4gICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgIHBhdGhTZWdtZW50czogcGF0aFNlZ21lbnRzLnNsaWNlKDEpLFxuICAgICAgICAgIHJvb3RUYWJsZU5hbWUsXG4gICAgICAgICAgc2VsZWN0RmllbGRzLFxuICAgICAgICAgIHRhYmxlTmFtZTogbmV3VGFibGVOYW1lLFxuICAgICAgICAgIHRhYmxlTmFtZVN1ZmZpeCxcbiAgICAgICAgICB2YWx1ZSxcbiAgICAgICAgfSlcbiAgICAgIH1cblxuICAgICAgY2FzZSAnZ3JvdXAnOiB7XG4gICAgICAgIGlmIChsb2NhbGUgJiYgZmllbGQubG9jYWxpemVkICYmIGFkYXB0ZXIucGF5bG9hZC5jb25maWcubG9jYWxpemF0aW9uKSB7XG4gICAgICAgICAgbmV3VGFibGVOYW1lID0gYCR7dGFibGVOYW1lfV9sb2NhbGVzYFxuXG4gICAgICAgICAgam9pbnNbdGFibGVOYW1lXSA9IGVxKFxuICAgICAgICAgICAgYWRhcHRlci50YWJsZXNbdGFibGVOYW1lXS5pZCxcbiAgICAgICAgICAgIGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0uX3BhcmVudElELFxuICAgICAgICAgIClcbiAgICAgICAgICBpZiAobG9jYWxlICE9PSAnYWxsJykge1xuICAgICAgICAgICAgY29uc3RyYWludHMucHVzaCh7XG4gICAgICAgICAgICAgIGNvbHVtbk5hbWU6ICdfbG9jYWxlJyxcbiAgICAgICAgICAgICAgdGFibGU6IGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0sXG4gICAgICAgICAgICAgIHZhbHVlOiBsb2NhbGUsXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZ2V0VGFibGVDb2x1bW5Gcm9tUGF0aCh7XG4gICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICBhbGlhc1RhYmxlLFxuICAgICAgICAgIGNvbGxlY3Rpb25QYXRoLFxuICAgICAgICAgIGNvbHVtblByZWZpeDogYCR7Y29sdW1uUHJlZml4fSR7ZmllbGQubmFtZX1fYCxcbiAgICAgICAgICBjb25zdHJhaW50UGF0aDogYCR7Y29uc3RyYWludFBhdGh9JHtmaWVsZC5uYW1lfS5gLFxuICAgICAgICAgIGNvbnN0cmFpbnRzLFxuICAgICAgICAgIGZpZWxkczogZmllbGQuZmllbGRzLFxuICAgICAgICAgIGpvaW5BbGlhc2VzLFxuICAgICAgICAgIGpvaW5zLFxuICA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ZTogYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXSxcbiAgICAgICAgICAgICAgdmFsdWU6IGxvY2FsZSxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGpvaW5zW25ld1RhYmxlTmFtZV0gPSBlcShcbiAgICAgICAgICAgIGFkYXB0ZXIudGFibGVzW3RhYmxlTmFtZV0uaWQsXG4gICAgICAgICAgICBhZGFwdGVyLnRhYmxlc1tuZXdUYWJsZU5hbWVdLl9wYXJlbnRJRCxcbiAgICAgICAgICApXG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGdldFRhYmxlQ29sdW1uRnJvbVBhdGgoe1xuICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgY29sbGVjdGlvblBhdGgsXG4gICAgICAgICAgY29uc3RyYWludFBhdGgsXG4gICAgICAgICAgY29uc3RyYWludHMsXG4gICAgICAgICAgZmllbGRzOiBmaWVsZC5maWVsZHMsXG4gICAgICAgICAgam9pbkFsaWFzZXMsXG4gICAgICAgICAgam9pbnMsXG4gICAgICAgICAgbG9jYWxlLFxuICAgICAgICAgIHBhdGhTZWdtZW50czogcGF0aFNlZ21lbnRzLnNsaWNlKDEpLFxuICAgICAgICAgIHJvb3RUYWJsZU5hbWUsXG4gICAgICAgICAgc2VsZWN0RmllbGRzLFxuICAgICAgICAgIHRhYmxlTmFtZTogbmV3VGFibGVOYW1lLFxuICAgICAgICAgIHZhbHVlLFxuICAgICAgICB9KVxuICAgICAgfVxuXG4gICAgICBjYXNlICdibG9ja3MnOiB7XG4gICAgICAgIGxldCBibG9ja1RhYmxlQ29sdW1uOiBUYWJsZUNvbHVtblxuICAgICAgICBsZXQgbmV3VGFibGVOYW1lOiBzdHJpbmdcblxuICAgICAgICAvLyBoYW5kbGUgYmxvY2tUeXBlIHF1ZXJpZXNcbiAgICAgICAgaWYgKHBhdGhTZWdtZW50c1sxXSA9PT0gJ2Jsb2NrVHlwZScpIHtcbiAgICAgICAgICAvLyBmaW5kIHRoZSBibG9jayBjb25maWcgdXNpbmcgdGhlIHZhbHVlXG4gICAgICAgICAgY29uc3QgYmxvY2tUeXBlcyA9IEFycmF5LmlzQXJyYXkodmFsdWUpID8gdmFsdWUgOiBbdmFsdWVdXG4gICAgICAgICAgYmxvY2tUeXBlcy5mb3JFYWNoKChibG9ja1R5cGUpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IGJsb2NrID0gZmllbGQuYmxvY2tzLmZpbmQoKGJsb2NrKSA9PiBibG9jay5zbHVnID09PSBibG9ja1R5cGUpXG4gICAgICAgICAgICBuZXdUYWJsZU5hbWUgPSBgJHt0YWJsZU5hbWV9X2Jsb2Nrc18ke3RvU25ha2VDYXNlKGJsb2NrLnNsdWcpfWBcbiAgICAgICAgICAgIGpvaW5zW25ld1RhYmxlTmFtZV0gPSBlcShcbiAgICAgICAgICAgICAgYWRhcHRlci50YWJsZXNbdGFibGVOYW1lXS5pZCxcbiAgICAgICAgICAgICAgYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXS5fcGFyZW50SUQsXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKHtcbiAgICAgICAgICAgICAgY29sdW1uTmFtZTogJ19wYXRoJyxcbiAgICAgICAgICAgICAgdGFibGU6IGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0sXG4gICAgICAgICAgICAgIHZhbHVlOiBwYXRoU2VnbWVudHNbMF0sXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH0pXG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGNvbnN0cmFpbnRzLFxuICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICBnZXROb3ROdWxsQ29sdW1uQnlWYWx1ZTogKCkgPT4gJ2lkJyxcbiAgICAgICAgICAgIHRhYmxlOiBhZGFwdGVyLnRhYmxlc1t0YWJsZU5hbWVdLFxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGhhc0Jsb2NrRmllbGQgPSBmaWVsZC5ibG9ja3Muc29tZSgoYmxvY2spID0+IHtcbiAgICAgICAgICBuZXdUYWJsZU5hbWUgPSBgJHt0YWJsZU5hbWV9X2Jsb2Nrc18ke3RvU25ha2VDYXNlKGJsb2NrLnNsdWcpfWBcbiAgICAgICAgICBjb25zdHJhaW50UGF0aCA9IGAke2NvbnN0cmFpbnRQYXRofSR7ZmllbGQubmFtZX0uJS5gXG4gICAgICAgICAgbGV0IHJlc3VsdFxuICAgICAgICAgIGNvbnN0IGJsb2NrQ29uc3RyYWludHMgPSBbXVxuICAgICAgICAgIGNvbnN0IGJsb2NrU2VsZWN0RmllbGRzID0ge31cbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgcmVzdWx0ID0gZ2V0VGFibGVDb2x1bW5Gcm9tUGF0aCh7XG4gICAgICAgICAgICAgIGFkYXB0ZXIsXG4gICAgICAgICAgICAgIGNvbGxlY3Rpb25QYXRoLFxuICAgICAgICAgICAgICBjb25zdHJhaW50UGF0aCxcbiAgICAgICAgICAgICAgY29uc3RyYWludHM6IGJsb2NrQ29uc3RyYWludHMsXG4gICAgICAgICAgICAgIGZpZWxkczogYmxvY2suZmllbGRzLFxuICAgICAgICAgICAgICBqb2luQWxpYXNlcyxcbiAgICAgICAgICAgICAgam9pbnMsXG4gICAgICAgICAgICAgIGxvY2FsZSxcbiAgICAgICAgICAgICAgcGF0aFNlZ21lbnRzOiBwYXRoU2VnbWVudHMuc2xpY2UoMSksXG4gICAgICAgICAgICAgIHJvb3RUYWJsZU5hbWUsXG4gICAgICAgICAgICAgIHNlbGVjdEZpZWxkczogYmxvY2tTZWxlY3RGaWVsZHMsXG4gICAgICAgICAgICAgIHRhYmxlTmFtZTogbmV3VGFibGVOYW1lLFxuICAgICAgICAgICAgICB2YWx1ZSxcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgIC8vIHRoaXMgaXMgZmluZSwgbm90IGV2ZXJ5IGJsb2NrIHdpbGwgaGF2ZSB0aGUgZmllbGRcbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKCFyZXN1bHQpIHtcbiAgICAgICAgICAgIHJldHVyblxuICAgICAgICAgIH1cbiAgICAgICAgICBibG9ja1RhYmxlQ29sdW1uID0gcmVzdWx0XG4gICAgICAgICAgY29uc3RyYWludHMgPSBjb25zdHJhaW50cy5jb25jYXQoYmxvY2tDb25zdHJhaW50cylcbiAgICAgICAgICBzZWxlY3RGaWVsZHMgPSB7IC4uLnNlbGVjdEZpZWxkcywgLi4uYmxvY2tTZWxlY3RGaWVsZHMgfVxuICAgICAgICAgIGlmIChmaWVsZC5sb2NhbGl6ZWQgJiYgYWRhcHRlci5wYXlsb2FkLmNvbmZpZy5sb2NhbGl6YXRpb24pIHtcbiAgICAgICAgICAgIGpvaW5zW25ld1RhYmxlTmFtZV0gPSBhbmQoXG4gICAgICAgICAgICAgIGVxKGFkYXB0ZXIudGFibGVzW3RhYmxlTmFtZV0uaWQsIGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0uX3BhcmVudElEKSxcbiAgICAgICAgICAgICAgZXEoYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXS5fbG9jYWxlLCBsb2NhbGUpLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgaWYgKGxvY2FsZSkge1xuICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKHtcbiAgICAgICAgICAgICAgICBjb2x1bW5OYW1lOiAnX2xvY2FsZScsXG4gICAgICAgICAgICAgICAgdGFibGU6IGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0sXG4gICAgICAgICAgICAgICAgdmFsdWU6IGxvY2FsZSxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgam9pbnNbbmV3VGFibGVOYW1lXSA9IGVxKFxuICAgICAgICAgICAgICBhZGFwdGVyLnRhYmxlc1t0YWJsZU5hbWVdLmlkLFxuICAgICAgICAgICAgICBhZGFwdGVyLnRhYmxlc1tuZXdUYWJsZU5hbWVdLl9wYXJlbnRJRCxcbiAgICAgICAgICAgIClcbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIHRydWVcbiAgICAgICAgfSlcbiAgICAgICAgaWYgKGhhc0Jsb2NrRmllbGQpIHtcbiAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgY29sdW1uTmFtZTogYmxvY2tUYWJsZUNvbHVtbi5jb2x1bW5OYW1lLFxuICAgICAgICAgICAgY29uc3RyYWludHMsXG4gICAgICAgICAgICBmaWVsZDogYmxvY2tUYWJsZUNvbHVtbi5maWVsZCxcbiAgICAgICAgICAgIHBhdGhTZWdtZW50czogcGF0aFNlZ21lbnRzLnNsaWNlKDEpLFxuICAgICAgICAgICAgcmF3Q29sdW1uOiBibG9ja1RhYmxlQ29sdW1uLnJhd0NvbHVtbixcbiAgICAgICAgICAgIHRhYmxlOiBibG9ja1RhYmxlQ29sdW1uLnRhYmxlLFxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBicmVha1xuICAgICAgfVxuXG4gICAgICBjYXNlICdyZWxhdGlvbnNoaXAnOlxuICAgICAgY2FzZSAndXBsb2FkJzoge1xuICAgICAgICBsZXQgcmVsYXRpb25zaGlwRmllbGRzXG4gICAgICAgIGNvbnN0IHJlbGF0aW9uVGFibGVOYW1lID0gYCR7cm9vdFRhYmxlTmFtZX1fcmVsc2BcbiAgICAgICAgY29uc3QgbmV3Q29sbGVjdGlvblBhdGggPSBwYXRoU2VnbWVudHMuc2xpY2UoMSkuam9pbignLicpXG4gICAgICAgIGNvbnN0IGFsaWFzUmVsYXRpb25zaGlwVGFibGVOYW1lID0gdXVpZCgpXG4gICAgICAgIGNvbnN0IGFsaWFzUmVsYXRpb25zaGlwVGFibGUgPSB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FsaWFzVGFibGUgPSBhbGlhcyhhZGFwdGVyLnRhYmxlc1tuZXdUYWJsZU5hbWVdLCB0b1NuYWtlQ2FzZSh1dWlkKCkpKVxuXG4gICAgICAgICAgam9pbkFsaWFzZXMucHVzaCh7XG4gICAgICAgICAgICBjb25kaXRpb246IGVxKG5ld0FsaWFzVGFibGUuaWQsIGFsaWFzUmVsYXRpb25zaGlwVGFibGVbYCR7ZmllbGQucmVsYXRpb25Ub31JRGBdKSxcbiAgICAgICAgICAgIHRhYmxlOiBuZXdBbGlhc1RhYmxlLFxuICAgICAgICAgIH0pXG5cbiAgICAgICAgICBpZiAobmV3Q29sbGVjdGlvblBhdGggPT09ICcnIHx8IG5ld0NvbGxlY3Rpb25QYXRoID09PSAnaWQnKSB7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICBjb2x1bW5OYW1lOiBgJHtmaWVsZC5yZWxhdGlvblRvfUlEYCxcbiAgICAgICAgICAgICAgY29uc3RyYWludHMsXG4gICAgICAgICAgICAgIGZpZWxkLFxuICAgICAgICAgICAgICB0YWJsZTogYWxpYXNSZWxhdGlvbnNoaXBUYWJsZSxcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAobmV3Q29sbGVjdGlvblBhdGggPT09ICd2YWx1ZScpIHtcbiAgICAgICAgICBjb25zdCB0YWJsZUNvbHVtbnNOYW1lcyA9IGZpZWxkLnJlbGF0aW9uVG8ubWFwKFxuICAgICAgICAgICAgKHJlbGF0aW9uVG8pID0+IGBcIiR7YWxpYXNSZWxhdGlvbnNoaXBUYWJsZU5hbWV9XCIuXCIke3RvU25ha2VDYXNlKHJlbGF0aW9uVG8pfV9pZFwiYCxcbiAgICAgICAgICApXG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGNvbnN0cmFpbnRzLFxuICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICByYXdDb2x1bW46IHNxbC5yYXcoYENPQUxFU0NFKCR7dGFibGVDb2x1bW5zTmFtZXMuam9pbignLCAnKX0pYCksXG4gICAgICAgICAgICB0YWJsZTogYWxpYXNSZWxhdGlvbnNoaXBUYWJsZSxcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAobmV3Q29sbGVjdGlvblBhdGggPT09ICdyZWxhdGlvblRvJykge1xuICAgICAgICAgIGNvbnN0IHJlbGF0aW9uVG8gPSBBcnJheS5pc0FycmF5KGZpZWxkLnJlbGF0aW9uVG8pID8gZmllbGQucmVsYXRpb25UbyA6IFtmaWVsZC5yZWxhdGlvblRvXVxuXG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGNvbnN0cmFpbnRzLFxuICAgICAgICAgICAgZmllbGQsXG4gICAgICAgICAgICBnZXROb3ROdWxsQ29sdW1uQnlWYWx1ZTogKHZhbCkgPT4ge1xuICAgICAgICAgICAgICBjb25zdCBtYXRjaGVkUmVsYXRpb24gPSByZWxhdGlvblRvLmZpbmQoKHJlbGF0aW9uKSA9PiByZWxhdGlvbiA9PT0gdmFsKVxuICAgICAgICAgICAgICBpZiAobWF0Y2hlZFJlbGF0aW9uKSByZXR1cm4gYCR7bWF0Y2hlZFJlbGF0aW9ufUlEYFxuICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgdGFibGU6IGFsaWFzUmVsYXRpb25zaGlwVGFibGUsXG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHRocm93IG5ldyBBUElFcnJvcignTm90IHN1cHBvcnRlZCcpXG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gZ2V0VGFibGVDb2x1bW5Gcm9tUGF0aCh7XG4gICAgICAgICAgYWRhcHRlcixcbiAgICAgICAgICBhbGlhc1RhYmxlOiBuZXdBbGlhc1RhYmxlLFxuICAgICAgICAgIGNvbGxlY3Rpb25QYXRoOiBuZXdDb2xsZWN0aW9uUG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ICAgYWxpYXNUYWJsZSA9IHVuZGVmaW5lZFxuXG4gICAgICAgICAgICBpZiAobG9jYWxlICE9PSAnYWxsJykge1xuICAgICAgICAgICAgICBjb25zdHJhaW50cy5wdXNoKHtcbiAgICAgICAgICAgICAgICBjb2x1bW5OYW1lOiAnX2xvY2FsZScsXG4gICAgICAgICAgICAgICAgdGFibGU6IGFkYXB0ZXIudGFibGVzW25ld1RhYmxlTmFtZV0sXG4gICAgICAgICAgICAgICAgdmFsdWU6IGxvY2FsZSxcbiAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBjb25zdCB0YXJnZXRUYWJsZSA9IGFsaWFzVGFibGUgfHwgYWRhcHRlci50YWJsZXNbbmV3VGFibGVOYW1lXVxuXG4gICAgICAgICAgc2VsZWN0RmllbGRzW2Ake25ld1RhYmxlTmFtZX0uJHtjb2x1bW5QcmVmaXh9JHtmaWVsZC5uYW1lfWBdID1cbiAgICAgICAgICAgIHRhcmdldFRhYmxlW2Ake2NvbHVtblByZWZpeH0ke2ZpZWxkLm5hbWV9YF1cblxuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBjb2x1bW5OYW1lOiBgJHtjb2x1bW5QcmVmaXh9JHtmaWVsZC5uYW1lfWAsXG4gICAgICAgICAgICBjb25zdHJhaW50cyxcbiAgICAgICAgICAgIGZpZWxkLFxuICAgICAgICAgICAgcGF0aFNlZ21lbnRzLFxuICAgICAgICAgICAgdGFibGU6IHRhcmdldFRhYmxlLFxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfVxuXG4gIHRocm93IG5ldyBBUElFcnJvcihgQ2Fubm90IGZpbmQgZmllbGQgZm9yIHBhdGggYXQgJHtmaWVsZFBhdGh9YClcbn1cbiJdLCJuYW1lcyI6WyJhbmQiLCJlcSIsImxpa2UiLCJzcWwiLCJhbGlhcyIsIkFQSUVycm9yIiwiZmllbGRBZmZlY3R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LENBQUNGLGFBQWEsQ0FBQ2tCLFNBQVM7NEJBRS9FMUMsYUFBYWdGOzRCQUViLElBQUl2RSxXQUFXLE9BQU87Z0NBQ3BCSixZQUFZc0MsSUFBSSxDQUFDO29DQUNmaEIsWUFBWTtvQ0FDWkcsT0FBTy9CLFFBQVEyQixNQUFNLENBQUNGLGFBQWE7b0NBQ25DTixPQUFPVDtnQ0FDVDs0QkFDRjt3QkFDRjt3QkFFQSxNQUFNeUUsY0FBY2xGLGNBQWNELFFBQVEyQixNQUFNLENBQUNGLGFBQWE7d0JBRTlEVCxZQUFZLENBQUMsQ0FBQyxFQUFFUyxhQUFhLENBQUMsRUFBRXRCLGFBQWEsRUFBRWtCLE1BQU1HLElBQUksQ0FBQyxDQUFDLENBQUMsR0FDMUQyRCxXQUFXLENBQUMsQ0FBQyxFQUFFaEYsYUFBYSxFQUFFa0IsTUFBTUcsSUFBSSxDQUFDLENBQUMsQ0FBQzt3QkFFN0MsT0FBTzs0QkFDTEksWUFBWSxDQUFDLEVBQUV6QixhQUFhLEVBQUVrQixNQUFNRyxJQUFJLENBQUMsQ0FBQzs0QkFDMUNsQjs0QkFDQWU7NEJBQ0FUOzRCQUNBbUIsT0FBT29EO3dCQUNUO29CQUNGO2dCQUNGO1FBQ0Y7SUFDRjtJQUVBLE1BQU0sSUFBSTNGLFNBQVMsQ0FBQyw4QkFBOEIsRUFBRTRCLFVBQVUsQ0FBQztBQUNqRSxFQUFDIn0=
@@ -1,34 +1,24 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "operatorMap", {
6
- enumerable: true,
7
- get: function() {
8
- return operatorMap;
9
- }
10
- });
11
- const _drizzleorm = require("drizzle-orm");
12
- const operatorMap = {
1
+ import { and, eq, gt, gte, ilike, inArray, isNotNull, isNull, lt, lte, ne, notInArray, or } from 'drizzle-orm';
2
+ export const operatorMap = {
13
3
  // intersects: intersects,
14
- and: _drizzleorm.and,
15
- contains: _drizzleorm.ilike,
16
- equals: _drizzleorm.eq,
17
- exists: _drizzleorm.isNotNull,
18
- greater_than: _drizzleorm.gt,
19
- greater_than_equal: _drizzleorm.gte,
20
- in: _drizzleorm.inArray,
21
- isNull: _drizzleorm.isNull,
22
- less_than: _drizzleorm.lt,
23
- less_than_equal: _drizzleorm.lte,
24
- like: _drizzleorm.ilike,
25
- not_equals: _drizzleorm.ne,
4
+ and,
5
+ contains: ilike,
6
+ equals: eq,
7
+ exists: isNotNull,
8
+ greater_than: gt,
9
+ greater_than_equal: gte,
10
+ in: inArray,
11
+ isNull,
12
+ less_than: lt,
13
+ less_than_equal: lte,
14
+ like: ilike,
15
+ not_equals: ne,
26
16
  // TODO: geojson queries
27
17
  // near: near,
28
18
  // within: within,
29
19
  // all: all,
30
- not_in: _drizzleorm.notInArray,
31
- or: _drizzleorm.or
20
+ not_in: notInArray,
21
+ or
32
22
  };
33
23
 
34
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9xdWVyaWVzL29wZXJhdG9yTWFwLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7XG4gIGFuZCxcbiAgZXEsXG4gIGd0LFxuICBndGUsXG4gIGlsaWtlLFxuICBpbkFycmF5LFxuICBpc05vdE51bGwsXG4gIGlzTnVsbCxcbiAgbHQsXG4gIGx0ZSxcbiAgbmUsXG4gIG5vdEluQXJyYXksXG4gIG9yLFxufSBmcm9tICdkcml6emxlLW9ybSdcblxuZXhwb3J0IGNvbnN0IG9wZXJhdG9yTWFwID0ge1xuICAvLyBpbnRlcnNlY3RzOiBpbnRlcnNlY3RzLFxuICBhbmQsXG4gIGNvbnRhaW5zOiBpbGlrZSxcbiAgZXF1YWxzOiBlcSxcbiAgZXhpc3RzOiBpc05vdE51bGwsXG4gIGdyZWF0ZXJfdGhhbjogZ3QsXG4gIGdyZWF0ZXJfdGhhbl9lcXVhbDogZ3RlLFxuICBp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