@adtrackify/at-service-common 1.2.10 → 1.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/package.json +3 -7
  2. package/dist/__tests__/helpers/subscription-helper.spec.d.ts +0 -1
  3. package/dist/__tests__/helpers/subscription-helper.spec.js +0 -28
  4. package/dist/__tests__/helpers/subscription-helper.spec.js.map +0 -1
  5. package/dist/clients/generic/cognito-client.d.ts +0 -19
  6. package/dist/clients/generic/cognito-client.js +0 -140
  7. package/dist/clients/generic/cognito-client.js.map +0 -1
  8. package/dist/clients/generic/dynamodb-client.d.ts +0 -15
  9. package/dist/clients/generic/dynamodb-client.js +0 -123
  10. package/dist/clients/generic/dynamodb-client.js.map +0 -1
  11. package/dist/clients/generic/eventbridge-client.d.ts +0 -14
  12. package/dist/clients/generic/eventbridge-client.js +0 -46
  13. package/dist/clients/generic/eventbridge-client.js.map +0 -1
  14. package/dist/clients/generic/http-client.d.ts +0 -30
  15. package/dist/clients/generic/http-client.js +0 -29
  16. package/dist/clients/generic/http-client.js.map +0 -1
  17. package/dist/clients/generic/index.d.ts +0 -6
  18. package/dist/clients/generic/index.js +0 -7
  19. package/dist/clients/generic/index.js.map +0 -1
  20. package/dist/clients/generic/s3-client.d.ts +0 -6
  21. package/dist/clients/generic/s3-client.js +0 -25
  22. package/dist/clients/generic/s3-client.js.map +0 -1
  23. package/dist/clients/generic/sqs-client.d.ts +0 -14
  24. package/dist/clients/generic/sqs-client.js +0 -35
  25. package/dist/clients/generic/sqs-client.js.map +0 -1
  26. package/dist/clients/index.d.ts +0 -3
  27. package/dist/clients/index.js +0 -4
  28. package/dist/clients/index.js.map +0 -1
  29. package/dist/clients/internal-api/accounts-client.d.ts +0 -82
  30. package/dist/clients/internal-api/accounts-client.js +0 -79
  31. package/dist/clients/internal-api/accounts-client.js.map +0 -1
  32. package/dist/clients/internal-api/destinations-client.d.ts +0 -54
  33. package/dist/clients/internal-api/destinations-client.js +0 -37
  34. package/dist/clients/internal-api/destinations-client.js.map +0 -1
  35. package/dist/clients/internal-api/index.d.ts +0 -4
  36. package/dist/clients/internal-api/index.js +0 -5
  37. package/dist/clients/internal-api/index.js.map +0 -1
  38. package/dist/clients/internal-api/shopify-app-install-client.d.ts +0 -57
  39. package/dist/clients/internal-api/shopify-app-install-client.js +0 -43
  40. package/dist/clients/internal-api/shopify-app-install-client.js.map +0 -1
  41. package/dist/clients/internal-api/users-auth-client.d.ts +0 -61
  42. package/dist/clients/internal-api/users-auth-client.js +0 -74
  43. package/dist/clients/internal-api/users-auth-client.js.map +0 -1
  44. package/dist/clients/third-party/index.d.ts +0 -1
  45. package/dist/clients/third-party/index.js +0 -2
  46. package/dist/clients/third-party/index.js.map +0 -1
  47. package/dist/clients/third-party/shopify-client.d.ts +0 -90
  48. package/dist/clients/third-party/shopify-client.js +0 -122
  49. package/dist/clients/third-party/shopify-client.js.map +0 -1
  50. package/dist/helpers/index.d.ts +0 -7
  51. package/dist/helpers/index.js +0 -8
  52. package/dist/helpers/index.js.map +0 -1
  53. package/dist/helpers/input-validation-helper.d.ts +0 -2
  54. package/dist/helpers/input-validation-helper.js +0 -19
  55. package/dist/helpers/input-validation-helper.js.map +0 -1
  56. package/dist/helpers/logging-helper.d.ts +0 -1
  57. package/dist/helpers/logging-helper.js +0 -10
  58. package/dist/helpers/logging-helper.js.map +0 -1
  59. package/dist/helpers/response-helper.d.ts +0 -36
  60. package/dist/helpers/response-helper.js +0 -36
  61. package/dist/helpers/response-helper.js.map +0 -1
  62. package/dist/helpers/shopify-helper.d.ts +0 -9
  63. package/dist/helpers/shopify-helper.js +0 -24
  64. package/dist/helpers/shopify-helper.js.map +0 -1
  65. package/dist/helpers/subscription-helper.d.ts +0 -8
  66. package/dist/helpers/subscription-helper.js +0 -182
  67. package/dist/helpers/subscription-helper.js.map +0 -1
  68. package/dist/helpers/traits-helper.d.ts +0 -2
  69. package/dist/helpers/traits-helper.js +0 -5
  70. package/dist/helpers/traits-helper.js.map +0 -1
  71. package/dist/helpers/utils.d.ts +0 -1
  72. package/dist/helpers/utils.js +0 -11
  73. package/dist/helpers/utils.js.map +0 -1
  74. package/dist/index.d.ts +0 -5
  75. package/dist/index.esm.js +0 -4485
  76. package/dist/index.esm.js.map +0 -7
  77. package/dist/index.js +0 -6
  78. package/dist/index.js.map +0 -1
  79. package/dist/libs/crypto.d.ts +0 -1
  80. package/dist/libs/crypto.js +0 -6
  81. package/dist/libs/crypto.js.map +0 -1
  82. package/dist/libs/dates.d.ts +0 -3
  83. package/dist/libs/dates.js +0 -11
  84. package/dist/libs/dates.js.map +0 -1
  85. package/dist/libs/http-error.d.ts +0 -21
  86. package/dist/libs/http-error.js +0 -56
  87. package/dist/libs/http-error.js.map +0 -1
  88. package/dist/libs/http-status-codes.d.ts +0 -58
  89. package/dist/libs/http-status-codes.js +0 -60
  90. package/dist/libs/http-status-codes.js.map +0 -1
  91. package/dist/libs/index.d.ts +0 -6
  92. package/dist/libs/index.js +0 -7
  93. package/dist/libs/index.js.map +0 -1
  94. package/dist/libs/url.d.ts +0 -1
  95. package/dist/libs/url.js +0 -10
  96. package/dist/libs/url.js.map +0 -1
  97. package/dist/services/eventbridge-integration-service.d.ts +0 -9
  98. package/dist/services/eventbridge-integration-service.js +0 -25
  99. package/dist/services/eventbridge-integration-service.js.map +0 -1
  100. package/dist/services/index.d.ts +0 -1
  101. package/dist/services/index.js +0 -2
  102. package/dist/services/index.js.map +0 -1
  103. package/dist/types/api-response.d.ts +0 -6
  104. package/dist/types/api-response.js +0 -2
  105. package/dist/types/api-response.js.map +0 -1
  106. package/dist/types/index.d.ts +0 -1
  107. package/dist/types/index.js +0 -2
  108. package/dist/types/index.js.map +0 -1
  109. package/dist/types/internal-events/event-detail-types.d.ts +0 -20
  110. package/dist/types/internal-events/event-detail-types.js +0 -25
  111. package/dist/types/internal-events/event-detail-types.js.map +0 -1
  112. package/dist/types/internal-events/index.d.ts +0 -1
  113. package/dist/types/internal-events/index.js +0 -2
  114. package/dist/types/internal-events/index.js.map +0 -1
package/dist/index.esm.js DELETED
@@ -1,4485 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __require = /* @__PURE__ */ ((x2) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x2, {
9
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
10
- }) : x2)(function(x2) {
11
- if (typeof require !== "undefined")
12
- return require.apply(this, arguments);
13
- throw new Error('Dynamic require of "' + x2 + '" is not supported');
14
- });
15
- var __commonJS = (cb, mod) => function __require2() {
16
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
17
- };
18
- var __copyProps = (to, from, except, desc) => {
19
- if (from && typeof from === "object" || typeof from === "function") {
20
- for (let key of __getOwnPropNames(from))
21
- if (!__hasOwnProp.call(to, key) && key !== except)
22
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
- }
24
- return to;
25
- };
26
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
27
- // If the importer is in node compatibility mode or this is not an ESM
28
- // file that has been converted to a CommonJS file using a Babel-
29
- // compatible transform (i.e. "__esModule" has not been set), then set
30
- // "default" to the CommonJS "module.exports" for node compatibility.
31
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
32
- mod
33
- ));
34
- var __publicField = (obj, key, value) => {
35
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
36
- return value;
37
- };
38
-
39
- // node_modules/object-keys/isArguments.js
40
- var require_isArguments = __commonJS({
41
- "node_modules/object-keys/isArguments.js"(exports, module) {
42
- "use strict";
43
- var toStr = Object.prototype.toString;
44
- module.exports = function isArguments(value) {
45
- var str = toStr.call(value);
46
- var isArgs = str === "[object Arguments]";
47
- if (!isArgs) {
48
- isArgs = str !== "[object Array]" && value !== null && typeof value === "object" && typeof value.length === "number" && value.length >= 0 && toStr.call(value.callee) === "[object Function]";
49
- }
50
- return isArgs;
51
- };
52
- }
53
- });
54
-
55
- // node_modules/object-keys/implementation.js
56
- var require_implementation = __commonJS({
57
- "node_modules/object-keys/implementation.js"(exports, module) {
58
- "use strict";
59
- var keysShim;
60
- if (!Object.keys) {
61
- has = Object.prototype.hasOwnProperty;
62
- toStr = Object.prototype.toString;
63
- isArgs = require_isArguments();
64
- isEnumerable = Object.prototype.propertyIsEnumerable;
65
- hasDontEnumBug = !isEnumerable.call({ toString: null }, "toString");
66
- hasProtoEnumBug = isEnumerable.call(function() {
67
- }, "prototype");
68
- dontEnums = [
69
- "toString",
70
- "toLocaleString",
71
- "valueOf",
72
- "hasOwnProperty",
73
- "isPrototypeOf",
74
- "propertyIsEnumerable",
75
- "constructor"
76
- ];
77
- equalsConstructorPrototype = function(o) {
78
- var ctor = o.constructor;
79
- return ctor && ctor.prototype === o;
80
- };
81
- excludedKeys = {
82
- $applicationCache: true,
83
- $console: true,
84
- $external: true,
85
- $frame: true,
86
- $frameElement: true,
87
- $frames: true,
88
- $innerHeight: true,
89
- $innerWidth: true,
90
- $onmozfullscreenchange: true,
91
- $onmozfullscreenerror: true,
92
- $outerHeight: true,
93
- $outerWidth: true,
94
- $pageXOffset: true,
95
- $pageYOffset: true,
96
- $parent: true,
97
- $scrollLeft: true,
98
- $scrollTop: true,
99
- $scrollX: true,
100
- $scrollY: true,
101
- $self: true,
102
- $webkitIndexedDB: true,
103
- $webkitStorageInfo: true,
104
- $window: true
105
- };
106
- hasAutomationEqualityBug = function() {
107
- if (typeof window === "undefined") {
108
- return false;
109
- }
110
- for (var k in window) {
111
- try {
112
- if (!excludedKeys["$" + k] && has.call(window, k) && window[k] !== null && typeof window[k] === "object") {
113
- try {
114
- equalsConstructorPrototype(window[k]);
115
- } catch (e) {
116
- return true;
117
- }
118
- }
119
- } catch (e) {
120
- return true;
121
- }
122
- }
123
- return false;
124
- }();
125
- equalsConstructorPrototypeIfNotBuggy = function(o) {
126
- if (typeof window === "undefined" || !hasAutomationEqualityBug) {
127
- return equalsConstructorPrototype(o);
128
- }
129
- try {
130
- return equalsConstructorPrototype(o);
131
- } catch (e) {
132
- return false;
133
- }
134
- };
135
- keysShim = function keys(object) {
136
- var isObject = object !== null && typeof object === "object";
137
- var isFunction = toStr.call(object) === "[object Function]";
138
- var isArguments = isArgs(object);
139
- var isString = isObject && toStr.call(object) === "[object String]";
140
- var theKeys = [];
141
- if (!isObject && !isFunction && !isArguments) {
142
- throw new TypeError("Object.keys called on a non-object");
143
- }
144
- var skipProto = hasProtoEnumBug && isFunction;
145
- if (isString && object.length > 0 && !has.call(object, 0)) {
146
- for (var i = 0; i < object.length; ++i) {
147
- theKeys.push(String(i));
148
- }
149
- }
150
- if (isArguments && object.length > 0) {
151
- for (var j = 0; j < object.length; ++j) {
152
- theKeys.push(String(j));
153
- }
154
- } else {
155
- for (var name in object) {
156
- if (!(skipProto && name === "prototype") && has.call(object, name)) {
157
- theKeys.push(String(name));
158
- }
159
- }
160
- }
161
- if (hasDontEnumBug) {
162
- var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
163
- for (var k = 0; k < dontEnums.length; ++k) {
164
- if (!(skipConstructor && dontEnums[k] === "constructor") && has.call(object, dontEnums[k])) {
165
- theKeys.push(dontEnums[k]);
166
- }
167
- }
168
- }
169
- return theKeys;
170
- };
171
- }
172
- var has;
173
- var toStr;
174
- var isArgs;
175
- var isEnumerable;
176
- var hasDontEnumBug;
177
- var hasProtoEnumBug;
178
- var dontEnums;
179
- var equalsConstructorPrototype;
180
- var excludedKeys;
181
- var hasAutomationEqualityBug;
182
- var equalsConstructorPrototypeIfNotBuggy;
183
- module.exports = keysShim;
184
- }
185
- });
186
-
187
- // node_modules/object-keys/index.js
188
- var require_object_keys = __commonJS({
189
- "node_modules/object-keys/index.js"(exports, module) {
190
- "use strict";
191
- var slice = Array.prototype.slice;
192
- var isArgs = require_isArguments();
193
- var origKeys = Object.keys;
194
- var keysShim = origKeys ? function keys(o) {
195
- return origKeys(o);
196
- } : require_implementation();
197
- var originalKeys = Object.keys;
198
- keysShim.shim = function shimObjectKeys() {
199
- if (Object.keys) {
200
- var keysWorksWithArguments = function() {
201
- var args = Object.keys(arguments);
202
- return args && args.length === arguments.length;
203
- }(1, 2);
204
- if (!keysWorksWithArguments) {
205
- Object.keys = function keys(object) {
206
- if (isArgs(object)) {
207
- return originalKeys(slice.call(object));
208
- }
209
- return originalKeys(object);
210
- };
211
- }
212
- } else {
213
- Object.keys = keysShim;
214
- }
215
- return Object.keys || keysShim;
216
- };
217
- module.exports = keysShim;
218
- }
219
- });
220
-
221
- // node_modules/has-symbols/shams.js
222
- var require_shams = __commonJS({
223
- "node_modules/has-symbols/shams.js"(exports, module) {
224
- "use strict";
225
- module.exports = function hasSymbols() {
226
- if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
227
- return false;
228
- }
229
- if (typeof Symbol.iterator === "symbol") {
230
- return true;
231
- }
232
- var obj = {};
233
- var sym = Symbol("test");
234
- var symObj = Object(sym);
235
- if (typeof sym === "string") {
236
- return false;
237
- }
238
- if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
239
- return false;
240
- }
241
- if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
242
- return false;
243
- }
244
- var symVal = 42;
245
- obj[sym] = symVal;
246
- for (sym in obj) {
247
- return false;
248
- }
249
- if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
250
- return false;
251
- }
252
- if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
253
- return false;
254
- }
255
- var syms = Object.getOwnPropertySymbols(obj);
256
- if (syms.length !== 1 || syms[0] !== sym) {
257
- return false;
258
- }
259
- if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
260
- return false;
261
- }
262
- if (typeof Object.getOwnPropertyDescriptor === "function") {
263
- var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
264
- if (descriptor.value !== symVal || descriptor.enumerable !== true) {
265
- return false;
266
- }
267
- }
268
- return true;
269
- };
270
- }
271
- });
272
-
273
- // node_modules/has-symbols/index.js
274
- var require_has_symbols = __commonJS({
275
- "node_modules/has-symbols/index.js"(exports, module) {
276
- "use strict";
277
- var origSymbol = typeof Symbol !== "undefined" && Symbol;
278
- var hasSymbolSham = require_shams();
279
- module.exports = function hasNativeSymbols() {
280
- if (typeof origSymbol !== "function") {
281
- return false;
282
- }
283
- if (typeof Symbol !== "function") {
284
- return false;
285
- }
286
- if (typeof origSymbol("foo") !== "symbol") {
287
- return false;
288
- }
289
- if (typeof Symbol("bar") !== "symbol") {
290
- return false;
291
- }
292
- return hasSymbolSham();
293
- };
294
- }
295
- });
296
-
297
- // node_modules/function-bind/implementation.js
298
- var require_implementation2 = __commonJS({
299
- "node_modules/function-bind/implementation.js"(exports, module) {
300
- "use strict";
301
- var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
302
- var slice = Array.prototype.slice;
303
- var toStr = Object.prototype.toString;
304
- var funcType = "[object Function]";
305
- module.exports = function bind(that) {
306
- var target = this;
307
- if (typeof target !== "function" || toStr.call(target) !== funcType) {
308
- throw new TypeError(ERROR_MESSAGE + target);
309
- }
310
- var args = slice.call(arguments, 1);
311
- var bound;
312
- var binder = function() {
313
- if (this instanceof bound) {
314
- var result = target.apply(
315
- this,
316
- args.concat(slice.call(arguments))
317
- );
318
- if (Object(result) === result) {
319
- return result;
320
- }
321
- return this;
322
- } else {
323
- return target.apply(
324
- that,
325
- args.concat(slice.call(arguments))
326
- );
327
- }
328
- };
329
- var boundLength = Math.max(0, target.length - args.length);
330
- var boundArgs = [];
331
- for (var i = 0; i < boundLength; i++) {
332
- boundArgs.push("$" + i);
333
- }
334
- bound = Function("binder", "return function (" + boundArgs.join(",") + "){ return binder.apply(this,arguments); }")(binder);
335
- if (target.prototype) {
336
- var Empty = function Empty2() {
337
- };
338
- Empty.prototype = target.prototype;
339
- bound.prototype = new Empty();
340
- Empty.prototype = null;
341
- }
342
- return bound;
343
- };
344
- }
345
- });
346
-
347
- // node_modules/function-bind/index.js
348
- var require_function_bind = __commonJS({
349
- "node_modules/function-bind/index.js"(exports, module) {
350
- "use strict";
351
- var implementation = require_implementation2();
352
- module.exports = Function.prototype.bind || implementation;
353
- }
354
- });
355
-
356
- // node_modules/has/src/index.js
357
- var require_src = __commonJS({
358
- "node_modules/has/src/index.js"(exports, module) {
359
- "use strict";
360
- var bind = require_function_bind();
361
- module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
362
- }
363
- });
364
-
365
- // node_modules/get-intrinsic/index.js
366
- var require_get_intrinsic = __commonJS({
367
- "node_modules/get-intrinsic/index.js"(exports, module) {
368
- "use strict";
369
- var undefined2;
370
- var $SyntaxError = SyntaxError;
371
- var $Function = Function;
372
- var $TypeError = TypeError;
373
- var getEvalledConstructor = function(expressionSyntax) {
374
- try {
375
- return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
376
- } catch (e) {
377
- }
378
- };
379
- var $gOPD = Object.getOwnPropertyDescriptor;
380
- if ($gOPD) {
381
- try {
382
- $gOPD({}, "");
383
- } catch (e) {
384
- $gOPD = null;
385
- }
386
- }
387
- var throwTypeError = function() {
388
- throw new $TypeError();
389
- };
390
- var ThrowTypeError = $gOPD ? function() {
391
- try {
392
- arguments.callee;
393
- return throwTypeError;
394
- } catch (calleeThrows) {
395
- try {
396
- return $gOPD(arguments, "callee").get;
397
- } catch (gOPDthrows) {
398
- return throwTypeError;
399
- }
400
- }
401
- }() : throwTypeError;
402
- var hasSymbols = require_has_symbols()();
403
- var getProto = Object.getPrototypeOf || function(x2) {
404
- return x2.__proto__;
405
- };
406
- var needsEval = {};
407
- var TypedArray = typeof Uint8Array === "undefined" ? undefined2 : getProto(Uint8Array);
408
- var INTRINSICS = {
409
- "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError,
410
- "%Array%": Array,
411
- "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer,
412
- "%ArrayIteratorPrototype%": hasSymbols ? getProto([][Symbol.iterator]()) : undefined2,
413
- "%AsyncFromSyncIteratorPrototype%": undefined2,
414
- "%AsyncFunction%": needsEval,
415
- "%AsyncGenerator%": needsEval,
416
- "%AsyncGeneratorFunction%": needsEval,
417
- "%AsyncIteratorPrototype%": needsEval,
418
- "%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics,
419
- "%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
420
- "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array,
421
- "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array,
422
- "%Boolean%": Boolean,
423
- "%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
424
- "%Date%": Date,
425
- "%decodeURI%": decodeURI,
426
- "%decodeURIComponent%": decodeURIComponent,
427
- "%encodeURI%": encodeURI,
428
- "%encodeURIComponent%": encodeURIComponent,
429
- "%Error%": Error,
430
- "%eval%": eval,
431
- // eslint-disable-line no-eval
432
- "%EvalError%": EvalError,
433
- "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
434
- "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
435
- "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry,
436
- "%Function%": $Function,
437
- "%GeneratorFunction%": needsEval,
438
- "%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array,
439
- "%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array,
440
- "%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array,
441
- "%isFinite%": isFinite,
442
- "%isNaN%": isNaN,
443
- "%IteratorPrototype%": hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined2,
444
- "%JSON%": typeof JSON === "object" ? JSON : undefined2,
445
- "%Map%": typeof Map === "undefined" ? undefined2 : Map,
446
- "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
447
- "%Math%": Math,
448
- "%Number%": Number,
449
- "%Object%": Object,
450
- "%parseFloat%": parseFloat,
451
- "%parseInt%": parseInt,
452
- "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise,
453
- "%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy,
454
- "%RangeError%": RangeError,
455
- "%ReferenceError%": ReferenceError,
456
- "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect,
457
- "%RegExp%": RegExp,
458
- "%Set%": typeof Set === "undefined" ? undefined2 : Set,
459
- "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
460
- "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer,
461
- "%String%": String,
462
- "%StringIteratorPrototype%": hasSymbols ? getProto(""[Symbol.iterator]()) : undefined2,
463
- "%Symbol%": hasSymbols ? Symbol : undefined2,
464
- "%SyntaxError%": $SyntaxError,
465
- "%ThrowTypeError%": ThrowTypeError,
466
- "%TypedArray%": TypedArray,
467
- "%TypeError%": $TypeError,
468
- "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array,
469
- "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray,
470
- "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array,
471
- "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array,
472
- "%URIError%": URIError,
473
- "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap,
474
- "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
475
- "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet
476
- };
477
- try {
478
- null.error;
479
- } catch (e) {
480
- errorProto = getProto(getProto(e));
481
- INTRINSICS["%Error.prototype%"] = errorProto;
482
- }
483
- var errorProto;
484
- var doEval = function doEval2(name) {
485
- var value;
486
- if (name === "%AsyncFunction%") {
487
- value = getEvalledConstructor("async function () {}");
488
- } else if (name === "%GeneratorFunction%") {
489
- value = getEvalledConstructor("function* () {}");
490
- } else if (name === "%AsyncGeneratorFunction%") {
491
- value = getEvalledConstructor("async function* () {}");
492
- } else if (name === "%AsyncGenerator%") {
493
- var fn = doEval2("%AsyncGeneratorFunction%");
494
- if (fn) {
495
- value = fn.prototype;
496
- }
497
- } else if (name === "%AsyncIteratorPrototype%") {
498
- var gen = doEval2("%AsyncGenerator%");
499
- if (gen) {
500
- value = getProto(gen.prototype);
501
- }
502
- }
503
- INTRINSICS[name] = value;
504
- return value;
505
- };
506
- var LEGACY_ALIASES = {
507
- "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
508
- "%ArrayPrototype%": ["Array", "prototype"],
509
- "%ArrayProto_entries%": ["Array", "prototype", "entries"],
510
- "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
511
- "%ArrayProto_keys%": ["Array", "prototype", "keys"],
512
- "%ArrayProto_values%": ["Array", "prototype", "values"],
513
- "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
514
- "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
515
- "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
516
- "%BooleanPrototype%": ["Boolean", "prototype"],
517
- "%DataViewPrototype%": ["DataView", "prototype"],
518
- "%DatePrototype%": ["Date", "prototype"],
519
- "%ErrorPrototype%": ["Error", "prototype"],
520
- "%EvalErrorPrototype%": ["EvalError", "prototype"],
521
- "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
522
- "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
523
- "%FunctionPrototype%": ["Function", "prototype"],
524
- "%Generator%": ["GeneratorFunction", "prototype"],
525
- "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
526
- "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
527
- "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
528
- "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
529
- "%JSONParse%": ["JSON", "parse"],
530
- "%JSONStringify%": ["JSON", "stringify"],
531
- "%MapPrototype%": ["Map", "prototype"],
532
- "%NumberPrototype%": ["Number", "prototype"],
533
- "%ObjectPrototype%": ["Object", "prototype"],
534
- "%ObjProto_toString%": ["Object", "prototype", "toString"],
535
- "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
536
- "%PromisePrototype%": ["Promise", "prototype"],
537
- "%PromiseProto_then%": ["Promise", "prototype", "then"],
538
- "%Promise_all%": ["Promise", "all"],
539
- "%Promise_reject%": ["Promise", "reject"],
540
- "%Promise_resolve%": ["Promise", "resolve"],
541
- "%RangeErrorPrototype%": ["RangeError", "prototype"],
542
- "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
543
- "%RegExpPrototype%": ["RegExp", "prototype"],
544
- "%SetPrototype%": ["Set", "prototype"],
545
- "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
546
- "%StringPrototype%": ["String", "prototype"],
547
- "%SymbolPrototype%": ["Symbol", "prototype"],
548
- "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
549
- "%TypedArrayPrototype%": ["TypedArray", "prototype"],
550
- "%TypeErrorPrototype%": ["TypeError", "prototype"],
551
- "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
552
- "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
553
- "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
554
- "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
555
- "%URIErrorPrototype%": ["URIError", "prototype"],
556
- "%WeakMapPrototype%": ["WeakMap", "prototype"],
557
- "%WeakSetPrototype%": ["WeakSet", "prototype"]
558
- };
559
- var bind = require_function_bind();
560
- var hasOwn = require_src();
561
- var $concat = bind.call(Function.call, Array.prototype.concat);
562
- var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
563
- var $replace = bind.call(Function.call, String.prototype.replace);
564
- var $strSlice = bind.call(Function.call, String.prototype.slice);
565
- var $exec = bind.call(Function.call, RegExp.prototype.exec);
566
- var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
567
- var reEscapeChar = /\\(\\)?/g;
568
- var stringToPath = function stringToPath2(string) {
569
- var first = $strSlice(string, 0, 1);
570
- var last = $strSlice(string, -1);
571
- if (first === "%" && last !== "%") {
572
- throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
573
- } else if (last === "%" && first !== "%") {
574
- throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
575
- }
576
- var result = [];
577
- $replace(string, rePropName, function(match, number, quote, subString) {
578
- result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match;
579
- });
580
- return result;
581
- };
582
- var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
583
- var intrinsicName = name;
584
- var alias;
585
- if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
586
- alias = LEGACY_ALIASES[intrinsicName];
587
- intrinsicName = "%" + alias[0] + "%";
588
- }
589
- if (hasOwn(INTRINSICS, intrinsicName)) {
590
- var value = INTRINSICS[intrinsicName];
591
- if (value === needsEval) {
592
- value = doEval(intrinsicName);
593
- }
594
- if (typeof value === "undefined" && !allowMissing) {
595
- throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
596
- }
597
- return {
598
- alias,
599
- name: intrinsicName,
600
- value
601
- };
602
- }
603
- throw new $SyntaxError("intrinsic " + name + " does not exist!");
604
- };
605
- module.exports = function GetIntrinsic(name, allowMissing) {
606
- if (typeof name !== "string" || name.length === 0) {
607
- throw new $TypeError("intrinsic name must be a non-empty string");
608
- }
609
- if (arguments.length > 1 && typeof allowMissing !== "boolean") {
610
- throw new $TypeError('"allowMissing" argument must be a boolean');
611
- }
612
- if ($exec(/^%?[^%]*%?$/, name) === null) {
613
- throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
614
- }
615
- var parts = stringToPath(name);
616
- var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
617
- var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
618
- var intrinsicRealName = intrinsic.name;
619
- var value = intrinsic.value;
620
- var skipFurtherCaching = false;
621
- var alias = intrinsic.alias;
622
- if (alias) {
623
- intrinsicBaseName = alias[0];
624
- $spliceApply(parts, $concat([0, 1], alias));
625
- }
626
- for (var i = 1, isOwn = true; i < parts.length; i += 1) {
627
- var part = parts[i];
628
- var first = $strSlice(part, 0, 1);
629
- var last = $strSlice(part, -1);
630
- if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
631
- throw new $SyntaxError("property names with quotes must have matching quotes");
632
- }
633
- if (part === "constructor" || !isOwn) {
634
- skipFurtherCaching = true;
635
- }
636
- intrinsicBaseName += "." + part;
637
- intrinsicRealName = "%" + intrinsicBaseName + "%";
638
- if (hasOwn(INTRINSICS, intrinsicRealName)) {
639
- value = INTRINSICS[intrinsicRealName];
640
- } else if (value != null) {
641
- if (!(part in value)) {
642
- if (!allowMissing) {
643
- throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
644
- }
645
- return void 0;
646
- }
647
- if ($gOPD && i + 1 >= parts.length) {
648
- var desc = $gOPD(value, part);
649
- isOwn = !!desc;
650
- if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
651
- value = desc.get;
652
- } else {
653
- value = value[part];
654
- }
655
- } else {
656
- isOwn = hasOwn(value, part);
657
- value = value[part];
658
- }
659
- if (isOwn && !skipFurtherCaching) {
660
- INTRINSICS[intrinsicRealName] = value;
661
- }
662
- }
663
- }
664
- return value;
665
- };
666
- }
667
- });
668
-
669
- // node_modules/has-property-descriptors/index.js
670
- var require_has_property_descriptors = __commonJS({
671
- "node_modules/has-property-descriptors/index.js"(exports, module) {
672
- "use strict";
673
- var GetIntrinsic = require_get_intrinsic();
674
- var $defineProperty = GetIntrinsic("%Object.defineProperty%", true);
675
- var hasPropertyDescriptors = function hasPropertyDescriptors2() {
676
- if ($defineProperty) {
677
- try {
678
- $defineProperty({}, "a", { value: 1 });
679
- return true;
680
- } catch (e) {
681
- return false;
682
- }
683
- }
684
- return false;
685
- };
686
- hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
687
- if (!hasPropertyDescriptors()) {
688
- return null;
689
- }
690
- try {
691
- return $defineProperty([], "length", { value: 1 }).length !== 1;
692
- } catch (e) {
693
- return true;
694
- }
695
- };
696
- module.exports = hasPropertyDescriptors;
697
- }
698
- });
699
-
700
- // node_modules/define-properties/index.js
701
- var require_define_properties = __commonJS({
702
- "node_modules/define-properties/index.js"(exports, module) {
703
- "use strict";
704
- var keys = require_object_keys();
705
- var hasSymbols = typeof Symbol === "function" && typeof Symbol("foo") === "symbol";
706
- var toStr = Object.prototype.toString;
707
- var concat = Array.prototype.concat;
708
- var origDefineProperty = Object.defineProperty;
709
- var isFunction = function(fn) {
710
- return typeof fn === "function" && toStr.call(fn) === "[object Function]";
711
- };
712
- var hasPropertyDescriptors = require_has_property_descriptors()();
713
- var supportsDescriptors = origDefineProperty && hasPropertyDescriptors;
714
- var defineProperty = function(object, name, value, predicate) {
715
- if (name in object) {
716
- if (predicate === true) {
717
- if (object[name] === value) {
718
- return;
719
- }
720
- } else if (!isFunction(predicate) || !predicate()) {
721
- return;
722
- }
723
- }
724
- if (supportsDescriptors) {
725
- origDefineProperty(object, name, {
726
- configurable: true,
727
- enumerable: false,
728
- value,
729
- writable: true
730
- });
731
- } else {
732
- object[name] = value;
733
- }
734
- };
735
- var defineProperties = function(object, map) {
736
- var predicates = arguments.length > 2 ? arguments[2] : {};
737
- var props = keys(map);
738
- if (hasSymbols) {
739
- props = concat.call(props, Object.getOwnPropertySymbols(map));
740
- }
741
- for (var i = 0; i < props.length; i += 1) {
742
- defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
743
- }
744
- };
745
- defineProperties.supportsDescriptors = !!supportsDescriptors;
746
- module.exports = defineProperties;
747
- }
748
- });
749
-
750
- // node_modules/call-bind/index.js
751
- var require_call_bind = __commonJS({
752
- "node_modules/call-bind/index.js"(exports, module) {
753
- "use strict";
754
- var bind = require_function_bind();
755
- var GetIntrinsic = require_get_intrinsic();
756
- var $apply = GetIntrinsic("%Function.prototype.apply%");
757
- var $call = GetIntrinsic("%Function.prototype.call%");
758
- var $reflectApply = GetIntrinsic("%Reflect.apply%", true) || bind.call($call, $apply);
759
- var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true);
760
- var $defineProperty = GetIntrinsic("%Object.defineProperty%", true);
761
- var $max = GetIntrinsic("%Math.max%");
762
- if ($defineProperty) {
763
- try {
764
- $defineProperty({}, "a", { value: 1 });
765
- } catch (e) {
766
- $defineProperty = null;
767
- }
768
- }
769
- module.exports = function callBind(originalFunction) {
770
- var func = $reflectApply(bind, $call, arguments);
771
- if ($gOPD && $defineProperty) {
772
- var desc = $gOPD(func, "length");
773
- if (desc.configurable) {
774
- $defineProperty(
775
- func,
776
- "length",
777
- { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
778
- );
779
- }
780
- }
781
- return func;
782
- };
783
- var applyBind = function applyBind2() {
784
- return $reflectApply(bind, $apply, arguments);
785
- };
786
- if ($defineProperty) {
787
- $defineProperty(module.exports, "apply", { value: applyBind });
788
- } else {
789
- module.exports.apply = applyBind;
790
- }
791
- }
792
- });
793
-
794
- // node_modules/call-bind/callBound.js
795
- var require_callBound = __commonJS({
796
- "node_modules/call-bind/callBound.js"(exports, module) {
797
- "use strict";
798
- var GetIntrinsic = require_get_intrinsic();
799
- var callBind = require_call_bind();
800
- var $indexOf = callBind(GetIntrinsic("String.prototype.indexOf"));
801
- module.exports = function callBoundIntrinsic(name, allowMissing) {
802
- var intrinsic = GetIntrinsic(name, !!allowMissing);
803
- if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
804
- return callBind(intrinsic);
805
- }
806
- return intrinsic;
807
- };
808
- }
809
- });
810
-
811
- // node_modules/object.assign/implementation.js
812
- var require_implementation3 = __commonJS({
813
- "node_modules/object.assign/implementation.js"(exports, module) {
814
- "use strict";
815
- var objectKeys = require_object_keys();
816
- var hasSymbols = require_shams()();
817
- var callBound = require_callBound();
818
- var toObject = Object;
819
- var $push = callBound("Array.prototype.push");
820
- var $propIsEnumerable = callBound("Object.prototype.propertyIsEnumerable");
821
- var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null;
822
- module.exports = function assign(target, source1) {
823
- if (target == null) {
824
- throw new TypeError("target must be an object");
825
- }
826
- var to = toObject(target);
827
- if (arguments.length === 1) {
828
- return to;
829
- }
830
- for (var s2 = 1; s2 < arguments.length; ++s2) {
831
- var from = toObject(arguments[s2]);
832
- var keys = objectKeys(from);
833
- var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols);
834
- if (getSymbols) {
835
- var syms = getSymbols(from);
836
- for (var j = 0; j < syms.length; ++j) {
837
- var key = syms[j];
838
- if ($propIsEnumerable(from, key)) {
839
- $push(keys, key);
840
- }
841
- }
842
- }
843
- for (var i = 0; i < keys.length; ++i) {
844
- var nextKey = keys[i];
845
- if ($propIsEnumerable(from, nextKey)) {
846
- var propValue = from[nextKey];
847
- to[nextKey] = propValue;
848
- }
849
- }
850
- }
851
- return to;
852
- };
853
- }
854
- });
855
-
856
- // node_modules/object.assign/polyfill.js
857
- var require_polyfill = __commonJS({
858
- "node_modules/object.assign/polyfill.js"(exports, module) {
859
- "use strict";
860
- var implementation = require_implementation3();
861
- var lacksProperEnumerationOrder = function() {
862
- if (!Object.assign) {
863
- return false;
864
- }
865
- var str = "abcdefghijklmnopqrst";
866
- var letters = str.split("");
867
- var map = {};
868
- for (var i = 0; i < letters.length; ++i) {
869
- map[letters[i]] = letters[i];
870
- }
871
- var obj = Object.assign({}, map);
872
- var actual = "";
873
- for (var k in obj) {
874
- actual += k;
875
- }
876
- return str !== actual;
877
- };
878
- var assignHasPendingExceptions = function() {
879
- if (!Object.assign || !Object.preventExtensions) {
880
- return false;
881
- }
882
- var thrower = Object.preventExtensions({ 1: 2 });
883
- try {
884
- Object.assign(thrower, "xy");
885
- } catch (e) {
886
- return thrower[1] === "y";
887
- }
888
- return false;
889
- };
890
- module.exports = function getPolyfill() {
891
- if (!Object.assign) {
892
- return implementation;
893
- }
894
- if (lacksProperEnumerationOrder()) {
895
- return implementation;
896
- }
897
- if (assignHasPendingExceptions()) {
898
- return implementation;
899
- }
900
- return Object.assign;
901
- };
902
- }
903
- });
904
-
905
- // node_modules/object.assign/shim.js
906
- var require_shim = __commonJS({
907
- "node_modules/object.assign/shim.js"(exports, module) {
908
- "use strict";
909
- var define = require_define_properties();
910
- var getPolyfill = require_polyfill();
911
- module.exports = function shimAssign() {
912
- var polyfill = getPolyfill();
913
- define(
914
- Object,
915
- { assign: polyfill },
916
- { assign: function() {
917
- return Object.assign !== polyfill;
918
- } }
919
- );
920
- return polyfill;
921
- };
922
- }
923
- });
924
-
925
- // node_modules/object.assign/index.js
926
- var require_object = __commonJS({
927
- "node_modules/object.assign/index.js"(exports, module) {
928
- "use strict";
929
- var defineProperties = require_define_properties();
930
- var callBind = require_call_bind();
931
- var implementation = require_implementation3();
932
- var getPolyfill = require_polyfill();
933
- var shim = require_shim();
934
- var polyfill = callBind.apply(getPolyfill());
935
- var bound = function assign(target, source1) {
936
- return polyfill(Object, arguments);
937
- };
938
- defineProperties(bound, {
939
- getPolyfill,
940
- implementation,
941
- shim
942
- });
943
- module.exports = bound;
944
- }
945
- });
946
-
947
- // node_modules/functions-have-names/index.js
948
- var require_functions_have_names = __commonJS({
949
- "node_modules/functions-have-names/index.js"(exports, module) {
950
- "use strict";
951
- var functionsHaveNames = function functionsHaveNames2() {
952
- return typeof function f2() {
953
- }.name === "string";
954
- };
955
- var gOPD = Object.getOwnPropertyDescriptor;
956
- if (gOPD) {
957
- try {
958
- gOPD([], "length");
959
- } catch (e) {
960
- gOPD = null;
961
- }
962
- }
963
- functionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {
964
- if (!functionsHaveNames() || !gOPD) {
965
- return false;
966
- }
967
- var desc = gOPD(function() {
968
- }, "name");
969
- return !!desc && !!desc.configurable;
970
- };
971
- var $bind = Function.prototype.bind;
972
- functionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() {
973
- return functionsHaveNames() && typeof $bind === "function" && function f2() {
974
- }.bind().name !== "";
975
- };
976
- module.exports = functionsHaveNames;
977
- }
978
- });
979
-
980
- // node_modules/regexp.prototype.flags/implementation.js
981
- var require_implementation4 = __commonJS({
982
- "node_modules/regexp.prototype.flags/implementation.js"(exports, module) {
983
- "use strict";
984
- var functionsHaveConfigurableNames = require_functions_have_names().functionsHaveConfigurableNames();
985
- var $Object = Object;
986
- var $TypeError = TypeError;
987
- module.exports = function flags() {
988
- if (this != null && this !== $Object(this)) {
989
- throw new $TypeError("RegExp.prototype.flags getter called on non-object");
990
- }
991
- var result = "";
992
- if (this.hasIndices) {
993
- result += "d";
994
- }
995
- if (this.global) {
996
- result += "g";
997
- }
998
- if (this.ignoreCase) {
999
- result += "i";
1000
- }
1001
- if (this.multiline) {
1002
- result += "m";
1003
- }
1004
- if (this.dotAll) {
1005
- result += "s";
1006
- }
1007
- if (this.unicode) {
1008
- result += "u";
1009
- }
1010
- if (this.sticky) {
1011
- result += "y";
1012
- }
1013
- return result;
1014
- };
1015
- if (functionsHaveConfigurableNames && Object.defineProperty) {
1016
- Object.defineProperty(module.exports, "name", { value: "get flags" });
1017
- }
1018
- }
1019
- });
1020
-
1021
- // node_modules/regexp.prototype.flags/polyfill.js
1022
- var require_polyfill2 = __commonJS({
1023
- "node_modules/regexp.prototype.flags/polyfill.js"(exports, module) {
1024
- "use strict";
1025
- var implementation = require_implementation4();
1026
- var supportsDescriptors = require_define_properties().supportsDescriptors;
1027
- var $gOPD = Object.getOwnPropertyDescriptor;
1028
- module.exports = function getPolyfill() {
1029
- if (supportsDescriptors && /a/mig.flags === "gim") {
1030
- var descriptor = $gOPD(RegExp.prototype, "flags");
1031
- if (descriptor && typeof descriptor.get === "function" && typeof RegExp.prototype.dotAll === "boolean" && typeof RegExp.prototype.hasIndices === "boolean") {
1032
- var calls = "";
1033
- var o = {};
1034
- Object.defineProperty(o, "hasIndices", {
1035
- get: function() {
1036
- calls += "d";
1037
- }
1038
- });
1039
- Object.defineProperty(o, "sticky", {
1040
- get: function() {
1041
- calls += "y";
1042
- }
1043
- });
1044
- if (calls === "dy") {
1045
- return descriptor.get;
1046
- }
1047
- }
1048
- }
1049
- return implementation;
1050
- };
1051
- }
1052
- });
1053
-
1054
- // node_modules/regexp.prototype.flags/shim.js
1055
- var require_shim2 = __commonJS({
1056
- "node_modules/regexp.prototype.flags/shim.js"(exports, module) {
1057
- "use strict";
1058
- var supportsDescriptors = require_define_properties().supportsDescriptors;
1059
- var getPolyfill = require_polyfill2();
1060
- var gOPD = Object.getOwnPropertyDescriptor;
1061
- var defineProperty = Object.defineProperty;
1062
- var TypeErr = TypeError;
1063
- var getProto = Object.getPrototypeOf;
1064
- var regex = /a/;
1065
- module.exports = function shimFlags() {
1066
- if (!supportsDescriptors || !getProto) {
1067
- throw new TypeErr("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");
1068
- }
1069
- var polyfill = getPolyfill();
1070
- var proto = getProto(regex);
1071
- var descriptor = gOPD(proto, "flags");
1072
- if (!descriptor || descriptor.get !== polyfill) {
1073
- defineProperty(proto, "flags", {
1074
- configurable: true,
1075
- enumerable: false,
1076
- get: polyfill
1077
- });
1078
- }
1079
- return polyfill;
1080
- };
1081
- }
1082
- });
1083
-
1084
- // node_modules/regexp.prototype.flags/index.js
1085
- var require_regexp_prototype = __commonJS({
1086
- "node_modules/regexp.prototype.flags/index.js"(exports, module) {
1087
- "use strict";
1088
- var define = require_define_properties();
1089
- var callBind = require_call_bind();
1090
- var implementation = require_implementation4();
1091
- var getPolyfill = require_polyfill2();
1092
- var shim = require_shim2();
1093
- var flagsBound = callBind(getPolyfill());
1094
- define(flagsBound, {
1095
- getPolyfill,
1096
- implementation,
1097
- shim
1098
- });
1099
- module.exports = flagsBound;
1100
- }
1101
- });
1102
-
1103
- // node_modules/es-get-iterator/node.js
1104
- var require_node = __commonJS({
1105
- "node_modules/es-get-iterator/node.js"(exports, module) {
1106
- "use strict";
1107
- var $iterator = Symbol.iterator;
1108
- module.exports = function getIterator(iterable) {
1109
- if (iterable != null && typeof iterable[$iterator] !== "undefined") {
1110
- return iterable[$iterator]();
1111
- }
1112
- };
1113
- }
1114
- });
1115
-
1116
- // node_modules/object-inspect/util.inspect.js
1117
- var require_util_inspect = __commonJS({
1118
- "node_modules/object-inspect/util.inspect.js"(exports, module) {
1119
- module.exports = __require("util").inspect;
1120
- }
1121
- });
1122
-
1123
- // node_modules/object-inspect/index.js
1124
- var require_object_inspect = __commonJS({
1125
- "node_modules/object-inspect/index.js"(exports, module) {
1126
- var hasMap = typeof Map === "function" && Map.prototype;
1127
- var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null;
1128
- var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null;
1129
- var mapForEach = hasMap && Map.prototype.forEach;
1130
- var hasSet = typeof Set === "function" && Set.prototype;
1131
- var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null;
1132
- var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null;
1133
- var setForEach = hasSet && Set.prototype.forEach;
1134
- var hasWeakMap = typeof WeakMap === "function" && WeakMap.prototype;
1135
- var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
1136
- var hasWeakSet = typeof WeakSet === "function" && WeakSet.prototype;
1137
- var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
1138
- var hasWeakRef = typeof WeakRef === "function" && WeakRef.prototype;
1139
- var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
1140
- var booleanValueOf = Boolean.prototype.valueOf;
1141
- var objectToString = Object.prototype.toString;
1142
- var functionToString = Function.prototype.toString;
1143
- var $match = String.prototype.match;
1144
- var $slice = String.prototype.slice;
1145
- var $replace = String.prototype.replace;
1146
- var $toUpperCase = String.prototype.toUpperCase;
1147
- var $toLowerCase = String.prototype.toLowerCase;
1148
- var $test = RegExp.prototype.test;
1149
- var $concat = Array.prototype.concat;
1150
- var $join = Array.prototype.join;
1151
- var $arrSlice = Array.prototype.slice;
1152
- var $floor = Math.floor;
1153
- var bigIntValueOf = typeof BigInt === "function" ? BigInt.prototype.valueOf : null;
1154
- var gOPS = Object.getOwnPropertySymbols;
1155
- var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null;
1156
- var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object";
1157
- var toStringTag = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null;
1158
- var isEnumerable = Object.prototype.propertyIsEnumerable;
1159
- var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O) {
1160
- return O.__proto__;
1161
- } : null);
1162
- function addNumericSeparator(num, str) {
1163
- if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) {
1164
- return str;
1165
- }
1166
- var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
1167
- if (typeof num === "number") {
1168
- var int = num < 0 ? -$floor(-num) : $floor(num);
1169
- if (int !== num) {
1170
- var intStr = String(int);
1171
- var dec = $slice.call(str, intStr.length + 1);
1172
- return $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, "");
1173
- }
1174
- }
1175
- return $replace.call(str, sepRegex, "$&_");
1176
- }
1177
- var utilInspect = require_util_inspect();
1178
- var inspectCustom = utilInspect.custom;
1179
- var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
1180
- module.exports = function inspect_(obj, options2, depth, seen) {
1181
- var opts = options2 || {};
1182
- if (has(opts, "quoteStyle") && (opts.quoteStyle !== "single" && opts.quoteStyle !== "double")) {
1183
- throw new TypeError('option "quoteStyle" must be "single" or "double"');
1184
- }
1185
- if (has(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) {
1186
- throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
1187
- }
1188
- var customInspect = has(opts, "customInspect") ? opts.customInspect : true;
1189
- if (typeof customInspect !== "boolean" && customInspect !== "symbol") {
1190
- throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
1191
- }
1192
- if (has(opts, "indent") && opts.indent !== null && opts.indent !== " " && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) {
1193
- throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
1194
- }
1195
- if (has(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") {
1196
- throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
1197
- }
1198
- var numericSeparator = opts.numericSeparator;
1199
- if (typeof obj === "undefined") {
1200
- return "undefined";
1201
- }
1202
- if (obj === null) {
1203
- return "null";
1204
- }
1205
- if (typeof obj === "boolean") {
1206
- return obj ? "true" : "false";
1207
- }
1208
- if (typeof obj === "string") {
1209
- return inspectString(obj, opts);
1210
- }
1211
- if (typeof obj === "number") {
1212
- if (obj === 0) {
1213
- return Infinity / obj > 0 ? "0" : "-0";
1214
- }
1215
- var str = String(obj);
1216
- return numericSeparator ? addNumericSeparator(obj, str) : str;
1217
- }
1218
- if (typeof obj === "bigint") {
1219
- var bigIntStr = String(obj) + "n";
1220
- return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
1221
- }
1222
- var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth;
1223
- if (typeof depth === "undefined") {
1224
- depth = 0;
1225
- }
1226
- if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") {
1227
- return isArray(obj) ? "[Array]" : "[Object]";
1228
- }
1229
- var indent = getIndent(opts, depth);
1230
- if (typeof seen === "undefined") {
1231
- seen = [];
1232
- } else if (indexOf(seen, obj) >= 0) {
1233
- return "[Circular]";
1234
- }
1235
- function inspect(value, from, noIndent) {
1236
- if (from) {
1237
- seen = $arrSlice.call(seen);
1238
- seen.push(from);
1239
- }
1240
- if (noIndent) {
1241
- var newOpts = {
1242
- depth: opts.depth
1243
- };
1244
- if (has(opts, "quoteStyle")) {
1245
- newOpts.quoteStyle = opts.quoteStyle;
1246
- }
1247
- return inspect_(value, newOpts, depth + 1, seen);
1248
- }
1249
- return inspect_(value, opts, depth + 1, seen);
1250
- }
1251
- if (typeof obj === "function" && !isRegExp(obj)) {
1252
- var name = nameOf(obj);
1253
- var keys = arrObjKeys(obj, inspect);
1254
- return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : "");
1255
- }
1256
- if (isSymbol(obj)) {
1257
- var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj);
1258
- return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString;
1259
- }
1260
- if (isElement(obj)) {
1261
- var s2 = "<" + $toLowerCase.call(String(obj.nodeName));
1262
- var attrs = obj.attributes || [];
1263
- for (var i = 0; i < attrs.length; i++) {
1264
- s2 += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts);
1265
- }
1266
- s2 += ">";
1267
- if (obj.childNodes && obj.childNodes.length) {
1268
- s2 += "...";
1269
- }
1270
- s2 += "</" + $toLowerCase.call(String(obj.nodeName)) + ">";
1271
- return s2;
1272
- }
1273
- if (isArray(obj)) {
1274
- if (obj.length === 0) {
1275
- return "[]";
1276
- }
1277
- var xs = arrObjKeys(obj, inspect);
1278
- if (indent && !singleLineValues(xs)) {
1279
- return "[" + indentedJoin(xs, indent) + "]";
1280
- }
1281
- return "[ " + $join.call(xs, ", ") + " ]";
1282
- }
1283
- if (isError(obj)) {
1284
- var parts = arrObjKeys(obj, inspect);
1285
- if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) {
1286
- return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect(obj.cause), parts), ", ") + " }";
1287
- }
1288
- if (parts.length === 0) {
1289
- return "[" + String(obj) + "]";
1290
- }
1291
- return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }";
1292
- }
1293
- if (typeof obj === "object" && customInspect) {
1294
- if (inspectSymbol && typeof obj[inspectSymbol] === "function" && utilInspect) {
1295
- return utilInspect(obj, { depth: maxDepth - depth });
1296
- } else if (customInspect !== "symbol" && typeof obj.inspect === "function") {
1297
- return obj.inspect();
1298
- }
1299
- }
1300
- if (isMap(obj)) {
1301
- var mapParts = [];
1302
- if (mapForEach) {
1303
- mapForEach.call(obj, function(value, key) {
1304
- mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj));
1305
- });
1306
- }
1307
- return collectionOf("Map", mapSize.call(obj), mapParts, indent);
1308
- }
1309
- if (isSet(obj)) {
1310
- var setParts = [];
1311
- if (setForEach) {
1312
- setForEach.call(obj, function(value) {
1313
- setParts.push(inspect(value, obj));
1314
- });
1315
- }
1316
- return collectionOf("Set", setSize.call(obj), setParts, indent);
1317
- }
1318
- if (isWeakMap(obj)) {
1319
- return weakCollectionOf("WeakMap");
1320
- }
1321
- if (isWeakSet(obj)) {
1322
- return weakCollectionOf("WeakSet");
1323
- }
1324
- if (isWeakRef(obj)) {
1325
- return weakCollectionOf("WeakRef");
1326
- }
1327
- if (isNumber(obj)) {
1328
- return markBoxed(inspect(Number(obj)));
1329
- }
1330
- if (isBigInt(obj)) {
1331
- return markBoxed(inspect(bigIntValueOf.call(obj)));
1332
- }
1333
- if (isBoolean(obj)) {
1334
- return markBoxed(booleanValueOf.call(obj));
1335
- }
1336
- if (isString(obj)) {
1337
- return markBoxed(inspect(String(obj)));
1338
- }
1339
- if (!isDate(obj) && !isRegExp(obj)) {
1340
- var ys = arrObjKeys(obj, inspect);
1341
- var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
1342
- var protoTag = obj instanceof Object ? "" : "null prototype";
1343
- var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
1344
- var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
1345
- var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
1346
- if (ys.length === 0) {
1347
- return tag + "{}";
1348
- }
1349
- if (indent) {
1350
- return tag + "{" + indentedJoin(ys, indent) + "}";
1351
- }
1352
- return tag + "{ " + $join.call(ys, ", ") + " }";
1353
- }
1354
- return String(obj);
1355
- };
1356
- function wrapQuotes(s2, defaultStyle, opts) {
1357
- var quoteChar = (opts.quoteStyle || defaultStyle) === "double" ? '"' : "'";
1358
- return quoteChar + s2 + quoteChar;
1359
- }
1360
- function quote(s2) {
1361
- return $replace.call(String(s2), /"/g, "&quot;");
1362
- }
1363
- function isArray(obj) {
1364
- return toStr(obj) === "[object Array]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1365
- }
1366
- function isDate(obj) {
1367
- return toStr(obj) === "[object Date]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1368
- }
1369
- function isRegExp(obj) {
1370
- return toStr(obj) === "[object RegExp]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1371
- }
1372
- function isError(obj) {
1373
- return toStr(obj) === "[object Error]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1374
- }
1375
- function isString(obj) {
1376
- return toStr(obj) === "[object String]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1377
- }
1378
- function isNumber(obj) {
1379
- return toStr(obj) === "[object Number]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1380
- }
1381
- function isBoolean(obj) {
1382
- return toStr(obj) === "[object Boolean]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1383
- }
1384
- function isSymbol(obj) {
1385
- if (hasShammedSymbols) {
1386
- return obj && typeof obj === "object" && obj instanceof Symbol;
1387
- }
1388
- if (typeof obj === "symbol") {
1389
- return true;
1390
- }
1391
- if (!obj || typeof obj !== "object" || !symToString) {
1392
- return false;
1393
- }
1394
- try {
1395
- symToString.call(obj);
1396
- return true;
1397
- } catch (e) {
1398
- }
1399
- return false;
1400
- }
1401
- function isBigInt(obj) {
1402
- if (!obj || typeof obj !== "object" || !bigIntValueOf) {
1403
- return false;
1404
- }
1405
- try {
1406
- bigIntValueOf.call(obj);
1407
- return true;
1408
- } catch (e) {
1409
- }
1410
- return false;
1411
- }
1412
- var hasOwn = Object.prototype.hasOwnProperty || function(key) {
1413
- return key in this;
1414
- };
1415
- function has(obj, key) {
1416
- return hasOwn.call(obj, key);
1417
- }
1418
- function toStr(obj) {
1419
- return objectToString.call(obj);
1420
- }
1421
- function nameOf(f2) {
1422
- if (f2.name) {
1423
- return f2.name;
1424
- }
1425
- var m2 = $match.call(functionToString.call(f2), /^function\s*([\w$]+)/);
1426
- if (m2) {
1427
- return m2[1];
1428
- }
1429
- return null;
1430
- }
1431
- function indexOf(xs, x2) {
1432
- if (xs.indexOf) {
1433
- return xs.indexOf(x2);
1434
- }
1435
- for (var i = 0, l2 = xs.length; i < l2; i++) {
1436
- if (xs[i] === x2) {
1437
- return i;
1438
- }
1439
- }
1440
- return -1;
1441
- }
1442
- function isMap(x2) {
1443
- if (!mapSize || !x2 || typeof x2 !== "object") {
1444
- return false;
1445
- }
1446
- try {
1447
- mapSize.call(x2);
1448
- try {
1449
- setSize.call(x2);
1450
- } catch (s2) {
1451
- return true;
1452
- }
1453
- return x2 instanceof Map;
1454
- } catch (e) {
1455
- }
1456
- return false;
1457
- }
1458
- function isWeakMap(x2) {
1459
- if (!weakMapHas || !x2 || typeof x2 !== "object") {
1460
- return false;
1461
- }
1462
- try {
1463
- weakMapHas.call(x2, weakMapHas);
1464
- try {
1465
- weakSetHas.call(x2, weakSetHas);
1466
- } catch (s2) {
1467
- return true;
1468
- }
1469
- return x2 instanceof WeakMap;
1470
- } catch (e) {
1471
- }
1472
- return false;
1473
- }
1474
- function isWeakRef(x2) {
1475
- if (!weakRefDeref || !x2 || typeof x2 !== "object") {
1476
- return false;
1477
- }
1478
- try {
1479
- weakRefDeref.call(x2);
1480
- return true;
1481
- } catch (e) {
1482
- }
1483
- return false;
1484
- }
1485
- function isSet(x2) {
1486
- if (!setSize || !x2 || typeof x2 !== "object") {
1487
- return false;
1488
- }
1489
- try {
1490
- setSize.call(x2);
1491
- try {
1492
- mapSize.call(x2);
1493
- } catch (m2) {
1494
- return true;
1495
- }
1496
- return x2 instanceof Set;
1497
- } catch (e) {
1498
- }
1499
- return false;
1500
- }
1501
- function isWeakSet(x2) {
1502
- if (!weakSetHas || !x2 || typeof x2 !== "object") {
1503
- return false;
1504
- }
1505
- try {
1506
- weakSetHas.call(x2, weakSetHas);
1507
- try {
1508
- weakMapHas.call(x2, weakMapHas);
1509
- } catch (s2) {
1510
- return true;
1511
- }
1512
- return x2 instanceof WeakSet;
1513
- } catch (e) {
1514
- }
1515
- return false;
1516
- }
1517
- function isElement(x2) {
1518
- if (!x2 || typeof x2 !== "object") {
1519
- return false;
1520
- }
1521
- if (typeof HTMLElement !== "undefined" && x2 instanceof HTMLElement) {
1522
- return true;
1523
- }
1524
- return typeof x2.nodeName === "string" && typeof x2.getAttribute === "function";
1525
- }
1526
- function inspectString(str, opts) {
1527
- if (str.length > opts.maxStringLength) {
1528
- var remaining = str.length - opts.maxStringLength;
1529
- var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : "");
1530
- return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
1531
- }
1532
- var s2 = $replace.call($replace.call(str, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, lowbyte);
1533
- return wrapQuotes(s2, "single", opts);
1534
- }
1535
- function lowbyte(c2) {
1536
- var n = c2.charCodeAt(0);
1537
- var x2 = {
1538
- 8: "b",
1539
- 9: "t",
1540
- 10: "n",
1541
- 12: "f",
1542
- 13: "r"
1543
- }[n];
1544
- if (x2) {
1545
- return "\\" + x2;
1546
- }
1547
- return "\\x" + (n < 16 ? "0" : "") + $toUpperCase.call(n.toString(16));
1548
- }
1549
- function markBoxed(str) {
1550
- return "Object(" + str + ")";
1551
- }
1552
- function weakCollectionOf(type) {
1553
- return type + " { ? }";
1554
- }
1555
- function collectionOf(type, size, entries, indent) {
1556
- var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ", ");
1557
- return type + " (" + size + ") {" + joinedEntries + "}";
1558
- }
1559
- function singleLineValues(xs) {
1560
- for (var i = 0; i < xs.length; i++) {
1561
- if (indexOf(xs[i], "\n") >= 0) {
1562
- return false;
1563
- }
1564
- }
1565
- return true;
1566
- }
1567
- function getIndent(opts, depth) {
1568
- var baseIndent;
1569
- if (opts.indent === " ") {
1570
- baseIndent = " ";
1571
- } else if (typeof opts.indent === "number" && opts.indent > 0) {
1572
- baseIndent = $join.call(Array(opts.indent + 1), " ");
1573
- } else {
1574
- return null;
1575
- }
1576
- return {
1577
- base: baseIndent,
1578
- prev: $join.call(Array(depth + 1), baseIndent)
1579
- };
1580
- }
1581
- function indentedJoin(xs, indent) {
1582
- if (xs.length === 0) {
1583
- return "";
1584
- }
1585
- var lineJoiner = "\n" + indent.prev + indent.base;
1586
- return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev;
1587
- }
1588
- function arrObjKeys(obj, inspect) {
1589
- var isArr = isArray(obj);
1590
- var xs = [];
1591
- if (isArr) {
1592
- xs.length = obj.length;
1593
- for (var i = 0; i < obj.length; i++) {
1594
- xs[i] = has(obj, i) ? inspect(obj[i], obj) : "";
1595
- }
1596
- }
1597
- var syms = typeof gOPS === "function" ? gOPS(obj) : [];
1598
- var symMap;
1599
- if (hasShammedSymbols) {
1600
- symMap = {};
1601
- for (var k = 0; k < syms.length; k++) {
1602
- symMap["$" + syms[k]] = syms[k];
1603
- }
1604
- }
1605
- for (var key in obj) {
1606
- if (!has(obj, key)) {
1607
- continue;
1608
- }
1609
- if (isArr && String(Number(key)) === key && key < obj.length) {
1610
- continue;
1611
- }
1612
- if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) {
1613
- continue;
1614
- } else if ($test.call(/[^\w$]/, key)) {
1615
- xs.push(inspect(key, obj) + ": " + inspect(obj[key], obj));
1616
- } else {
1617
- xs.push(key + ": " + inspect(obj[key], obj));
1618
- }
1619
- }
1620
- if (typeof gOPS === "function") {
1621
- for (var j = 0; j < syms.length; j++) {
1622
- if (isEnumerable.call(obj, syms[j])) {
1623
- xs.push("[" + inspect(syms[j]) + "]: " + inspect(obj[syms[j]], obj));
1624
- }
1625
- }
1626
- }
1627
- return xs;
1628
- }
1629
- }
1630
- });
1631
-
1632
- // node_modules/side-channel/index.js
1633
- var require_side_channel = __commonJS({
1634
- "node_modules/side-channel/index.js"(exports, module) {
1635
- "use strict";
1636
- var GetIntrinsic = require_get_intrinsic();
1637
- var callBound = require_callBound();
1638
- var inspect = require_object_inspect();
1639
- var $TypeError = GetIntrinsic("%TypeError%");
1640
- var $WeakMap = GetIntrinsic("%WeakMap%", true);
1641
- var $Map = GetIntrinsic("%Map%", true);
1642
- var $weakMapGet = callBound("WeakMap.prototype.get", true);
1643
- var $weakMapSet = callBound("WeakMap.prototype.set", true);
1644
- var $weakMapHas = callBound("WeakMap.prototype.has", true);
1645
- var $mapGet = callBound("Map.prototype.get", true);
1646
- var $mapSet = callBound("Map.prototype.set", true);
1647
- var $mapHas = callBound("Map.prototype.has", true);
1648
- var listGetNode = function(list, key) {
1649
- for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
1650
- if (curr.key === key) {
1651
- prev.next = curr.next;
1652
- curr.next = list.next;
1653
- list.next = curr;
1654
- return curr;
1655
- }
1656
- }
1657
- };
1658
- var listGet = function(objects, key) {
1659
- var node = listGetNode(objects, key);
1660
- return node && node.value;
1661
- };
1662
- var listSet = function(objects, key, value) {
1663
- var node = listGetNode(objects, key);
1664
- if (node) {
1665
- node.value = value;
1666
- } else {
1667
- objects.next = {
1668
- // eslint-disable-line no-param-reassign
1669
- key,
1670
- next: objects.next,
1671
- value
1672
- };
1673
- }
1674
- };
1675
- var listHas = function(objects, key) {
1676
- return !!listGetNode(objects, key);
1677
- };
1678
- module.exports = function getSideChannel() {
1679
- var $wm;
1680
- var $m;
1681
- var $o;
1682
- var channel = {
1683
- assert: function(key) {
1684
- if (!channel.has(key)) {
1685
- throw new $TypeError("Side channel does not contain " + inspect(key));
1686
- }
1687
- },
1688
- get: function(key) {
1689
- if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
1690
- if ($wm) {
1691
- return $weakMapGet($wm, key);
1692
- }
1693
- } else if ($Map) {
1694
- if ($m) {
1695
- return $mapGet($m, key);
1696
- }
1697
- } else {
1698
- if ($o) {
1699
- return listGet($o, key);
1700
- }
1701
- }
1702
- },
1703
- has: function(key) {
1704
- if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
1705
- if ($wm) {
1706
- return $weakMapHas($wm, key);
1707
- }
1708
- } else if ($Map) {
1709
- if ($m) {
1710
- return $mapHas($m, key);
1711
- }
1712
- } else {
1713
- if ($o) {
1714
- return listHas($o, key);
1715
- }
1716
- }
1717
- return false;
1718
- },
1719
- set: function(key, value) {
1720
- if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
1721
- if (!$wm) {
1722
- $wm = new $WeakMap();
1723
- }
1724
- $weakMapSet($wm, key, value);
1725
- } else if ($Map) {
1726
- if (!$m) {
1727
- $m = new $Map();
1728
- }
1729
- $mapSet($m, key, value);
1730
- } else {
1731
- if (!$o) {
1732
- $o = { key: {}, next: null };
1733
- }
1734
- listSet($o, key, value);
1735
- }
1736
- }
1737
- };
1738
- return channel;
1739
- };
1740
- }
1741
- });
1742
-
1743
- // node_modules/object-is/implementation.js
1744
- var require_implementation5 = __commonJS({
1745
- "node_modules/object-is/implementation.js"(exports, module) {
1746
- "use strict";
1747
- var numberIsNaN = function(value) {
1748
- return value !== value;
1749
- };
1750
- module.exports = function is(a, b) {
1751
- if (a === 0 && b === 0) {
1752
- return 1 / a === 1 / b;
1753
- }
1754
- if (a === b) {
1755
- return true;
1756
- }
1757
- if (numberIsNaN(a) && numberIsNaN(b)) {
1758
- return true;
1759
- }
1760
- return false;
1761
- };
1762
- }
1763
- });
1764
-
1765
- // node_modules/object-is/polyfill.js
1766
- var require_polyfill3 = __commonJS({
1767
- "node_modules/object-is/polyfill.js"(exports, module) {
1768
- "use strict";
1769
- var implementation = require_implementation5();
1770
- module.exports = function getPolyfill() {
1771
- return typeof Object.is === "function" ? Object.is : implementation;
1772
- };
1773
- }
1774
- });
1775
-
1776
- // node_modules/object-is/shim.js
1777
- var require_shim3 = __commonJS({
1778
- "node_modules/object-is/shim.js"(exports, module) {
1779
- "use strict";
1780
- var getPolyfill = require_polyfill3();
1781
- var define = require_define_properties();
1782
- module.exports = function shimObjectIs() {
1783
- var polyfill = getPolyfill();
1784
- define(Object, { is: polyfill }, {
1785
- is: function testObjectIs() {
1786
- return Object.is !== polyfill;
1787
- }
1788
- });
1789
- return polyfill;
1790
- };
1791
- }
1792
- });
1793
-
1794
- // node_modules/object-is/index.js
1795
- var require_object_is = __commonJS({
1796
- "node_modules/object-is/index.js"(exports, module) {
1797
- "use strict";
1798
- var define = require_define_properties();
1799
- var callBind = require_call_bind();
1800
- var implementation = require_implementation5();
1801
- var getPolyfill = require_polyfill3();
1802
- var shim = require_shim3();
1803
- var polyfill = callBind(getPolyfill(), Object);
1804
- define(polyfill, {
1805
- getPolyfill,
1806
- implementation,
1807
- shim
1808
- });
1809
- module.exports = polyfill;
1810
- }
1811
- });
1812
-
1813
- // node_modules/has-tostringtag/shams.js
1814
- var require_shams2 = __commonJS({
1815
- "node_modules/has-tostringtag/shams.js"(exports, module) {
1816
- "use strict";
1817
- var hasSymbols = require_shams();
1818
- module.exports = function hasToStringTagShams() {
1819
- return hasSymbols() && !!Symbol.toStringTag;
1820
- };
1821
- }
1822
- });
1823
-
1824
- // node_modules/is-arguments/index.js
1825
- var require_is_arguments = __commonJS({
1826
- "node_modules/is-arguments/index.js"(exports, module) {
1827
- "use strict";
1828
- var hasToStringTag = require_shams2()();
1829
- var callBound = require_callBound();
1830
- var $toString = callBound("Object.prototype.toString");
1831
- var isStandardArguments = function isArguments(value) {
1832
- if (hasToStringTag && value && typeof value === "object" && Symbol.toStringTag in value) {
1833
- return false;
1834
- }
1835
- return $toString(value) === "[object Arguments]";
1836
- };
1837
- var isLegacyArguments = function isArguments(value) {
1838
- if (isStandardArguments(value)) {
1839
- return true;
1840
- }
1841
- return value !== null && typeof value === "object" && typeof value.length === "number" && value.length >= 0 && $toString(value) !== "[object Array]" && $toString(value.callee) === "[object Function]";
1842
- };
1843
- var supportsStandardArguments = function() {
1844
- return isStandardArguments(arguments);
1845
- }();
1846
- isStandardArguments.isLegacyArguments = isLegacyArguments;
1847
- module.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;
1848
- }
1849
- });
1850
-
1851
- // node_modules/deep-equal/node_modules/isarray/index.js
1852
- var require_isarray = __commonJS({
1853
- "node_modules/deep-equal/node_modules/isarray/index.js"(exports, module) {
1854
- var toString = {}.toString;
1855
- module.exports = Array.isArray || function(arr) {
1856
- return toString.call(arr) == "[object Array]";
1857
- };
1858
- }
1859
- });
1860
-
1861
- // node_modules/is-callable/index.js
1862
- var require_is_callable = __commonJS({
1863
- "node_modules/is-callable/index.js"(exports, module) {
1864
- "use strict";
1865
- var fnToStr = Function.prototype.toString;
1866
- var reflectApply = typeof Reflect === "object" && Reflect !== null && Reflect.apply;
1867
- var badArrayLike;
1868
- var isCallableMarker;
1869
- if (typeof reflectApply === "function" && typeof Object.defineProperty === "function") {
1870
- try {
1871
- badArrayLike = Object.defineProperty({}, "length", {
1872
- get: function() {
1873
- throw isCallableMarker;
1874
- }
1875
- });
1876
- isCallableMarker = {};
1877
- reflectApply(function() {
1878
- throw 42;
1879
- }, null, badArrayLike);
1880
- } catch (_) {
1881
- if (_ !== isCallableMarker) {
1882
- reflectApply = null;
1883
- }
1884
- }
1885
- } else {
1886
- reflectApply = null;
1887
- }
1888
- var constructorRegex = /^\s*class\b/;
1889
- var isES6ClassFn = function isES6ClassFunction(value) {
1890
- try {
1891
- var fnStr = fnToStr.call(value);
1892
- return constructorRegex.test(fnStr);
1893
- } catch (e) {
1894
- return false;
1895
- }
1896
- };
1897
- var tryFunctionObject = function tryFunctionToStr(value) {
1898
- try {
1899
- if (isES6ClassFn(value)) {
1900
- return false;
1901
- }
1902
- fnToStr.call(value);
1903
- return true;
1904
- } catch (e) {
1905
- return false;
1906
- }
1907
- };
1908
- var toStr = Object.prototype.toString;
1909
- var objectClass = "[object Object]";
1910
- var fnClass = "[object Function]";
1911
- var genClass = "[object GeneratorFunction]";
1912
- var ddaClass = "[object HTMLAllCollection]";
1913
- var ddaClass2 = "[object HTML document.all class]";
1914
- var ddaClass3 = "[object HTMLCollection]";
1915
- var hasToStringTag = typeof Symbol === "function" && !!Symbol.toStringTag;
1916
- var isIE68 = !(0 in [,]);
1917
- var isDDA = function isDocumentDotAll() {
1918
- return false;
1919
- };
1920
- if (typeof document === "object") {
1921
- all = document.all;
1922
- if (toStr.call(all) === toStr.call(document.all)) {
1923
- isDDA = function isDocumentDotAll(value) {
1924
- if ((isIE68 || !value) && (typeof value === "undefined" || typeof value === "object")) {
1925
- try {
1926
- var str = toStr.call(value);
1927
- return (str === ddaClass || str === ddaClass2 || str === ddaClass3 || str === objectClass) && value("") == null;
1928
- } catch (e) {
1929
- }
1930
- }
1931
- return false;
1932
- };
1933
- }
1934
- }
1935
- var all;
1936
- module.exports = reflectApply ? function isCallable(value) {
1937
- if (isDDA(value)) {
1938
- return true;
1939
- }
1940
- if (!value) {
1941
- return false;
1942
- }
1943
- if (typeof value !== "function" && typeof value !== "object") {
1944
- return false;
1945
- }
1946
- try {
1947
- reflectApply(value, null, badArrayLike);
1948
- } catch (e) {
1949
- if (e !== isCallableMarker) {
1950
- return false;
1951
- }
1952
- }
1953
- return !isES6ClassFn(value) && tryFunctionObject(value);
1954
- } : function isCallable(value) {
1955
- if (isDDA(value)) {
1956
- return true;
1957
- }
1958
- if (!value) {
1959
- return false;
1960
- }
1961
- if (typeof value !== "function" && typeof value !== "object") {
1962
- return false;
1963
- }
1964
- if (hasToStringTag) {
1965
- return tryFunctionObject(value);
1966
- }
1967
- if (isES6ClassFn(value)) {
1968
- return false;
1969
- }
1970
- var strClass = toStr.call(value);
1971
- if (strClass !== fnClass && strClass !== genClass && !/^\[object HTML/.test(strClass)) {
1972
- return false;
1973
- }
1974
- return tryFunctionObject(value);
1975
- };
1976
- }
1977
- });
1978
-
1979
- // node_modules/for-each/index.js
1980
- var require_for_each = __commonJS({
1981
- "node_modules/for-each/index.js"(exports, module) {
1982
- "use strict";
1983
- var isCallable = require_is_callable();
1984
- var toStr = Object.prototype.toString;
1985
- var hasOwnProperty = Object.prototype.hasOwnProperty;
1986
- var forEachArray = function forEachArray2(array, iterator, receiver) {
1987
- for (var i = 0, len = array.length; i < len; i++) {
1988
- if (hasOwnProperty.call(array, i)) {
1989
- if (receiver == null) {
1990
- iterator(array[i], i, array);
1991
- } else {
1992
- iterator.call(receiver, array[i], i, array);
1993
- }
1994
- }
1995
- }
1996
- };
1997
- var forEachString = function forEachString2(string, iterator, receiver) {
1998
- for (var i = 0, len = string.length; i < len; i++) {
1999
- if (receiver == null) {
2000
- iterator(string.charAt(i), i, string);
2001
- } else {
2002
- iterator.call(receiver, string.charAt(i), i, string);
2003
- }
2004
- }
2005
- };
2006
- var forEachObject = function forEachObject2(object, iterator, receiver) {
2007
- for (var k in object) {
2008
- if (hasOwnProperty.call(object, k)) {
2009
- if (receiver == null) {
2010
- iterator(object[k], k, object);
2011
- } else {
2012
- iterator.call(receiver, object[k], k, object);
2013
- }
2014
- }
2015
- }
2016
- };
2017
- var forEach = function forEach2(list, iterator, thisArg) {
2018
- if (!isCallable(iterator)) {
2019
- throw new TypeError("iterator must be a function");
2020
- }
2021
- var receiver;
2022
- if (arguments.length >= 3) {
2023
- receiver = thisArg;
2024
- }
2025
- if (toStr.call(list) === "[object Array]") {
2026
- forEachArray(list, iterator, receiver);
2027
- } else if (typeof list === "string") {
2028
- forEachString(list, iterator, receiver);
2029
- } else {
2030
- forEachObject(list, iterator, receiver);
2031
- }
2032
- };
2033
- module.exports = forEach;
2034
- }
2035
- });
2036
-
2037
- // node_modules/available-typed-arrays/index.js
2038
- var require_available_typed_arrays = __commonJS({
2039
- "node_modules/available-typed-arrays/index.js"(exports, module) {
2040
- "use strict";
2041
- var possibleNames = [
2042
- "BigInt64Array",
2043
- "BigUint64Array",
2044
- "Float32Array",
2045
- "Float64Array",
2046
- "Int16Array",
2047
- "Int32Array",
2048
- "Int8Array",
2049
- "Uint16Array",
2050
- "Uint32Array",
2051
- "Uint8Array",
2052
- "Uint8ClampedArray"
2053
- ];
2054
- var g2 = typeof globalThis === "undefined" ? global : globalThis;
2055
- module.exports = function availableTypedArrays() {
2056
- var out = [];
2057
- for (var i = 0; i < possibleNames.length; i++) {
2058
- if (typeof g2[possibleNames[i]] === "function") {
2059
- out[out.length] = possibleNames[i];
2060
- }
2061
- }
2062
- return out;
2063
- };
2064
- }
2065
- });
2066
-
2067
- // node_modules/gopd/index.js
2068
- var require_gopd = __commonJS({
2069
- "node_modules/gopd/index.js"(exports, module) {
2070
- "use strict";
2071
- var GetIntrinsic = require_get_intrinsic();
2072
- var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true);
2073
- if ($gOPD) {
2074
- try {
2075
- $gOPD([], "length");
2076
- } catch (e) {
2077
- $gOPD = null;
2078
- }
2079
- }
2080
- module.exports = $gOPD;
2081
- }
2082
- });
2083
-
2084
- // node_modules/is-typed-array/index.js
2085
- var require_is_typed_array = __commonJS({
2086
- "node_modules/is-typed-array/index.js"(exports, module) {
2087
- "use strict";
2088
- var forEach = require_for_each();
2089
- var availableTypedArrays = require_available_typed_arrays();
2090
- var callBound = require_callBound();
2091
- var $toString = callBound("Object.prototype.toString");
2092
- var hasToStringTag = require_shams2()();
2093
- var gOPD = require_gopd();
2094
- var g2 = typeof globalThis === "undefined" ? global : globalThis;
2095
- var typedArrays = availableTypedArrays();
2096
- var $indexOf = callBound("Array.prototype.indexOf", true) || function indexOf(array, value) {
2097
- for (var i = 0; i < array.length; i += 1) {
2098
- if (array[i] === value) {
2099
- return i;
2100
- }
2101
- }
2102
- return -1;
2103
- };
2104
- var $slice = callBound("String.prototype.slice");
2105
- var toStrTags = {};
2106
- var getPrototypeOf = Object.getPrototypeOf;
2107
- if (hasToStringTag && gOPD && getPrototypeOf) {
2108
- forEach(typedArrays, function(typedArray) {
2109
- var arr = new g2[typedArray]();
2110
- if (Symbol.toStringTag in arr) {
2111
- var proto = getPrototypeOf(arr);
2112
- var descriptor = gOPD(proto, Symbol.toStringTag);
2113
- if (!descriptor) {
2114
- var superProto = getPrototypeOf(proto);
2115
- descriptor = gOPD(superProto, Symbol.toStringTag);
2116
- }
2117
- toStrTags[typedArray] = descriptor.get;
2118
- }
2119
- });
2120
- }
2121
- var tryTypedArrays = function tryAllTypedArrays(value) {
2122
- var anyTrue = false;
2123
- forEach(toStrTags, function(getter, typedArray) {
2124
- if (!anyTrue) {
2125
- try {
2126
- anyTrue = getter.call(value) === typedArray;
2127
- } catch (e) {
2128
- }
2129
- }
2130
- });
2131
- return anyTrue;
2132
- };
2133
- module.exports = function isTypedArray(value) {
2134
- if (!value || typeof value !== "object") {
2135
- return false;
2136
- }
2137
- if (!hasToStringTag || !(Symbol.toStringTag in value)) {
2138
- var tag = $slice($toString(value), 8, -1);
2139
- return $indexOf(typedArrays, tag) > -1;
2140
- }
2141
- if (!gOPD) {
2142
- return false;
2143
- }
2144
- return tryTypedArrays(value);
2145
- };
2146
- }
2147
- });
2148
-
2149
- // node_modules/is-array-buffer/index.js
2150
- var require_is_array_buffer = __commonJS({
2151
- "node_modules/is-array-buffer/index.js"(exports, module) {
2152
- "use strict";
2153
- var callBind = require_call_bind();
2154
- var callBound = require_callBound();
2155
- var GetIntrinsic = require_get_intrinsic();
2156
- var isTypedArray = require_is_typed_array();
2157
- var $ArrayBuffer = GetIntrinsic("ArrayBuffer", true);
2158
- var $Float32Array = GetIntrinsic("Float32Array", true);
2159
- var $byteLength = callBound("ArrayBuffer.prototype.byteLength", true);
2160
- var abSlice = $ArrayBuffer && !$byteLength && new $ArrayBuffer().slice;
2161
- var $abSlice = abSlice && callBind(abSlice);
2162
- module.exports = $byteLength || $abSlice ? function isArrayBuffer(obj) {
2163
- if (!obj || typeof obj !== "object") {
2164
- return false;
2165
- }
2166
- try {
2167
- if ($byteLength) {
2168
- $byteLength(obj);
2169
- } else {
2170
- $abSlice(obj, 0);
2171
- }
2172
- return true;
2173
- } catch (e) {
2174
- return false;
2175
- }
2176
- } : $Float32Array ? function IsArrayBuffer(obj) {
2177
- try {
2178
- return new $Float32Array(obj).buffer === obj && !isTypedArray(obj);
2179
- } catch (e) {
2180
- return typeof obj === "object" && e.name === "RangeError";
2181
- }
2182
- } : function isArrayBuffer(obj) {
2183
- return false;
2184
- };
2185
- }
2186
- });
2187
-
2188
- // node_modules/is-date-object/index.js
2189
- var require_is_date_object = __commonJS({
2190
- "node_modules/is-date-object/index.js"(exports, module) {
2191
- "use strict";
2192
- var getDay = Date.prototype.getDay;
2193
- var tryDateObject = function tryDateGetDayCall(value) {
2194
- try {
2195
- getDay.call(value);
2196
- return true;
2197
- } catch (e) {
2198
- return false;
2199
- }
2200
- };
2201
- var toStr = Object.prototype.toString;
2202
- var dateClass = "[object Date]";
2203
- var hasToStringTag = require_shams2()();
2204
- module.exports = function isDateObject(value) {
2205
- if (typeof value !== "object" || value === null) {
2206
- return false;
2207
- }
2208
- return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;
2209
- };
2210
- }
2211
- });
2212
-
2213
- // node_modules/is-regex/index.js
2214
- var require_is_regex = __commonJS({
2215
- "node_modules/is-regex/index.js"(exports, module) {
2216
- "use strict";
2217
- var callBound = require_callBound();
2218
- var hasToStringTag = require_shams2()();
2219
- var has;
2220
- var $exec;
2221
- var isRegexMarker;
2222
- var badStringifier;
2223
- if (hasToStringTag) {
2224
- has = callBound("Object.prototype.hasOwnProperty");
2225
- $exec = callBound("RegExp.prototype.exec");
2226
- isRegexMarker = {};
2227
- throwRegexMarker = function() {
2228
- throw isRegexMarker;
2229
- };
2230
- badStringifier = {
2231
- toString: throwRegexMarker,
2232
- valueOf: throwRegexMarker
2233
- };
2234
- if (typeof Symbol.toPrimitive === "symbol") {
2235
- badStringifier[Symbol.toPrimitive] = throwRegexMarker;
2236
- }
2237
- }
2238
- var throwRegexMarker;
2239
- var $toString = callBound("Object.prototype.toString");
2240
- var gOPD = Object.getOwnPropertyDescriptor;
2241
- var regexClass = "[object RegExp]";
2242
- module.exports = hasToStringTag ? function isRegex(value) {
2243
- if (!value || typeof value !== "object") {
2244
- return false;
2245
- }
2246
- var descriptor = gOPD(value, "lastIndex");
2247
- var hasLastIndexDataProperty = descriptor && has(descriptor, "value");
2248
- if (!hasLastIndexDataProperty) {
2249
- return false;
2250
- }
2251
- try {
2252
- $exec(value, badStringifier);
2253
- } catch (e) {
2254
- return e === isRegexMarker;
2255
- }
2256
- } : function isRegex(value) {
2257
- if (!value || typeof value !== "object" && typeof value !== "function") {
2258
- return false;
2259
- }
2260
- return $toString(value) === regexClass;
2261
- };
2262
- }
2263
- });
2264
-
2265
- // node_modules/is-shared-array-buffer/index.js
2266
- var require_is_shared_array_buffer = __commonJS({
2267
- "node_modules/is-shared-array-buffer/index.js"(exports, module) {
2268
- "use strict";
2269
- var callBound = require_callBound();
2270
- var $byteLength = callBound("SharedArrayBuffer.prototype.byteLength", true);
2271
- module.exports = $byteLength ? function isSharedArrayBuffer(obj) {
2272
- if (!obj || typeof obj !== "object") {
2273
- return false;
2274
- }
2275
- try {
2276
- $byteLength(obj);
2277
- return true;
2278
- } catch (e) {
2279
- return false;
2280
- }
2281
- } : function isSharedArrayBuffer(obj) {
2282
- return false;
2283
- };
2284
- }
2285
- });
2286
-
2287
- // node_modules/is-string/index.js
2288
- var require_is_string = __commonJS({
2289
- "node_modules/is-string/index.js"(exports, module) {
2290
- "use strict";
2291
- var strValue = String.prototype.valueOf;
2292
- var tryStringObject = function tryStringObject2(value) {
2293
- try {
2294
- strValue.call(value);
2295
- return true;
2296
- } catch (e) {
2297
- return false;
2298
- }
2299
- };
2300
- var toStr = Object.prototype.toString;
2301
- var strClass = "[object String]";
2302
- var hasToStringTag = require_shams2()();
2303
- module.exports = function isString(value) {
2304
- if (typeof value === "string") {
2305
- return true;
2306
- }
2307
- if (typeof value !== "object") {
2308
- return false;
2309
- }
2310
- return hasToStringTag ? tryStringObject(value) : toStr.call(value) === strClass;
2311
- };
2312
- }
2313
- });
2314
-
2315
- // node_modules/is-number-object/index.js
2316
- var require_is_number_object = __commonJS({
2317
- "node_modules/is-number-object/index.js"(exports, module) {
2318
- "use strict";
2319
- var numToStr = Number.prototype.toString;
2320
- var tryNumberObject = function tryNumberObject2(value) {
2321
- try {
2322
- numToStr.call(value);
2323
- return true;
2324
- } catch (e) {
2325
- return false;
2326
- }
2327
- };
2328
- var toStr = Object.prototype.toString;
2329
- var numClass = "[object Number]";
2330
- var hasToStringTag = require_shams2()();
2331
- module.exports = function isNumberObject(value) {
2332
- if (typeof value === "number") {
2333
- return true;
2334
- }
2335
- if (typeof value !== "object") {
2336
- return false;
2337
- }
2338
- return hasToStringTag ? tryNumberObject(value) : toStr.call(value) === numClass;
2339
- };
2340
- }
2341
- });
2342
-
2343
- // node_modules/is-boolean-object/index.js
2344
- var require_is_boolean_object = __commonJS({
2345
- "node_modules/is-boolean-object/index.js"(exports, module) {
2346
- "use strict";
2347
- var callBound = require_callBound();
2348
- var $boolToStr = callBound("Boolean.prototype.toString");
2349
- var $toString = callBound("Object.prototype.toString");
2350
- var tryBooleanObject = function booleanBrandCheck(value) {
2351
- try {
2352
- $boolToStr(value);
2353
- return true;
2354
- } catch (e) {
2355
- return false;
2356
- }
2357
- };
2358
- var boolClass = "[object Boolean]";
2359
- var hasToStringTag = require_shams2()();
2360
- module.exports = function isBoolean(value) {
2361
- if (typeof value === "boolean") {
2362
- return true;
2363
- }
2364
- if (value === null || typeof value !== "object") {
2365
- return false;
2366
- }
2367
- return hasToStringTag && Symbol.toStringTag in value ? tryBooleanObject(value) : $toString(value) === boolClass;
2368
- };
2369
- }
2370
- });
2371
-
2372
- // node_modules/is-symbol/index.js
2373
- var require_is_symbol = __commonJS({
2374
- "node_modules/is-symbol/index.js"(exports, module) {
2375
- "use strict";
2376
- var toStr = Object.prototype.toString;
2377
- var hasSymbols = require_has_symbols()();
2378
- if (hasSymbols) {
2379
- symToStr = Symbol.prototype.toString;
2380
- symStringRegex = /^Symbol\(.*\)$/;
2381
- isSymbolObject = function isRealSymbolObject(value) {
2382
- if (typeof value.valueOf() !== "symbol") {
2383
- return false;
2384
- }
2385
- return symStringRegex.test(symToStr.call(value));
2386
- };
2387
- module.exports = function isSymbol(value) {
2388
- if (typeof value === "symbol") {
2389
- return true;
2390
- }
2391
- if (toStr.call(value) !== "[object Symbol]") {
2392
- return false;
2393
- }
2394
- try {
2395
- return isSymbolObject(value);
2396
- } catch (e) {
2397
- return false;
2398
- }
2399
- };
2400
- } else {
2401
- module.exports = function isSymbol(value) {
2402
- return false;
2403
- };
2404
- }
2405
- var symToStr;
2406
- var symStringRegex;
2407
- var isSymbolObject;
2408
- }
2409
- });
2410
-
2411
- // node_modules/has-bigints/index.js
2412
- var require_has_bigints = __commonJS({
2413
- "node_modules/has-bigints/index.js"(exports, module) {
2414
- "use strict";
2415
- var $BigInt = typeof BigInt !== "undefined" && BigInt;
2416
- module.exports = function hasNativeBigInts() {
2417
- return typeof $BigInt === "function" && typeof BigInt === "function" && typeof $BigInt(42) === "bigint" && typeof BigInt(42) === "bigint";
2418
- };
2419
- }
2420
- });
2421
-
2422
- // node_modules/is-bigint/index.js
2423
- var require_is_bigint = __commonJS({
2424
- "node_modules/is-bigint/index.js"(exports, module) {
2425
- "use strict";
2426
- var hasBigInts = require_has_bigints()();
2427
- if (hasBigInts) {
2428
- bigIntValueOf = BigInt.prototype.valueOf;
2429
- tryBigInt = function tryBigIntObject(value) {
2430
- try {
2431
- bigIntValueOf.call(value);
2432
- return true;
2433
- } catch (e) {
2434
- }
2435
- return false;
2436
- };
2437
- module.exports = function isBigInt(value) {
2438
- if (value === null || typeof value === "undefined" || typeof value === "boolean" || typeof value === "string" || typeof value === "number" || typeof value === "symbol" || typeof value === "function") {
2439
- return false;
2440
- }
2441
- if (typeof value === "bigint") {
2442
- return true;
2443
- }
2444
- return tryBigInt(value);
2445
- };
2446
- } else {
2447
- module.exports = function isBigInt(value) {
2448
- return false;
2449
- };
2450
- }
2451
- var bigIntValueOf;
2452
- var tryBigInt;
2453
- }
2454
- });
2455
-
2456
- // node_modules/which-boxed-primitive/index.js
2457
- var require_which_boxed_primitive = __commonJS({
2458
- "node_modules/which-boxed-primitive/index.js"(exports, module) {
2459
- "use strict";
2460
- var isString = require_is_string();
2461
- var isNumber = require_is_number_object();
2462
- var isBoolean = require_is_boolean_object();
2463
- var isSymbol = require_is_symbol();
2464
- var isBigInt = require_is_bigint();
2465
- module.exports = function whichBoxedPrimitive(value) {
2466
- if (value == null || typeof value !== "object" && typeof value !== "function") {
2467
- return null;
2468
- }
2469
- if (isString(value)) {
2470
- return "String";
2471
- }
2472
- if (isNumber(value)) {
2473
- return "Number";
2474
- }
2475
- if (isBoolean(value)) {
2476
- return "Boolean";
2477
- }
2478
- if (isSymbol(value)) {
2479
- return "Symbol";
2480
- }
2481
- if (isBigInt(value)) {
2482
- return "BigInt";
2483
- }
2484
- };
2485
- }
2486
- });
2487
-
2488
- // node_modules/is-map/index.js
2489
- var require_is_map = __commonJS({
2490
- "node_modules/is-map/index.js"(exports, module) {
2491
- "use strict";
2492
- var $Map = typeof Map === "function" && Map.prototype ? Map : null;
2493
- var $Set = typeof Set === "function" && Set.prototype ? Set : null;
2494
- var exported;
2495
- if (!$Map) {
2496
- exported = function isMap(x2) {
2497
- return false;
2498
- };
2499
- }
2500
- var $mapHas = $Map ? Map.prototype.has : null;
2501
- var $setHas = $Set ? Set.prototype.has : null;
2502
- if (!exported && !$mapHas) {
2503
- exported = function isMap(x2) {
2504
- return false;
2505
- };
2506
- }
2507
- module.exports = exported || function isMap(x2) {
2508
- if (!x2 || typeof x2 !== "object") {
2509
- return false;
2510
- }
2511
- try {
2512
- $mapHas.call(x2);
2513
- if ($setHas) {
2514
- try {
2515
- $setHas.call(x2);
2516
- } catch (e) {
2517
- return true;
2518
- }
2519
- }
2520
- return x2 instanceof $Map;
2521
- } catch (e) {
2522
- }
2523
- return false;
2524
- };
2525
- }
2526
- });
2527
-
2528
- // node_modules/is-set/index.js
2529
- var require_is_set = __commonJS({
2530
- "node_modules/is-set/index.js"(exports, module) {
2531
- "use strict";
2532
- var $Map = typeof Map === "function" && Map.prototype ? Map : null;
2533
- var $Set = typeof Set === "function" && Set.prototype ? Set : null;
2534
- var exported;
2535
- if (!$Set) {
2536
- exported = function isSet(x2) {
2537
- return false;
2538
- };
2539
- }
2540
- var $mapHas = $Map ? Map.prototype.has : null;
2541
- var $setHas = $Set ? Set.prototype.has : null;
2542
- if (!exported && !$setHas) {
2543
- exported = function isSet(x2) {
2544
- return false;
2545
- };
2546
- }
2547
- module.exports = exported || function isSet(x2) {
2548
- if (!x2 || typeof x2 !== "object") {
2549
- return false;
2550
- }
2551
- try {
2552
- $setHas.call(x2);
2553
- if ($mapHas) {
2554
- try {
2555
- $mapHas.call(x2);
2556
- } catch (e) {
2557
- return true;
2558
- }
2559
- }
2560
- return x2 instanceof $Set;
2561
- } catch (e) {
2562
- }
2563
- return false;
2564
- };
2565
- }
2566
- });
2567
-
2568
- // node_modules/is-weakmap/index.js
2569
- var require_is_weakmap = __commonJS({
2570
- "node_modules/is-weakmap/index.js"(exports, module) {
2571
- "use strict";
2572
- var $WeakMap = typeof WeakMap === "function" && WeakMap.prototype ? WeakMap : null;
2573
- var $WeakSet = typeof WeakSet === "function" && WeakSet.prototype ? WeakSet : null;
2574
- var exported;
2575
- if (!$WeakMap) {
2576
- exported = function isWeakMap(x2) {
2577
- return false;
2578
- };
2579
- }
2580
- var $mapHas = $WeakMap ? $WeakMap.prototype.has : null;
2581
- var $setHas = $WeakSet ? $WeakSet.prototype.has : null;
2582
- if (!exported && !$mapHas) {
2583
- exported = function isWeakMap(x2) {
2584
- return false;
2585
- };
2586
- }
2587
- module.exports = exported || function isWeakMap(x2) {
2588
- if (!x2 || typeof x2 !== "object") {
2589
- return false;
2590
- }
2591
- try {
2592
- $mapHas.call(x2, $mapHas);
2593
- if ($setHas) {
2594
- try {
2595
- $setHas.call(x2, $setHas);
2596
- } catch (e) {
2597
- return true;
2598
- }
2599
- }
2600
- return x2 instanceof $WeakMap;
2601
- } catch (e) {
2602
- }
2603
- return false;
2604
- };
2605
- }
2606
- });
2607
-
2608
- // node_modules/is-weakset/index.js
2609
- var require_is_weakset = __commonJS({
2610
- "node_modules/is-weakset/index.js"(exports, module) {
2611
- "use strict";
2612
- var GetIntrinsic = require_get_intrinsic();
2613
- var callBound = require_callBound();
2614
- var $WeakSet = GetIntrinsic("%WeakSet%", true);
2615
- var $setHas = callBound("WeakSet.prototype.has", true);
2616
- if ($setHas) {
2617
- $mapHas = callBound("WeakMap.prototype.has", true);
2618
- module.exports = function isWeakSet(x2) {
2619
- if (!x2 || typeof x2 !== "object") {
2620
- return false;
2621
- }
2622
- try {
2623
- $setHas(x2, $setHas);
2624
- if ($mapHas) {
2625
- try {
2626
- $mapHas(x2, $mapHas);
2627
- } catch (e) {
2628
- return true;
2629
- }
2630
- }
2631
- return x2 instanceof $WeakSet;
2632
- } catch (e) {
2633
- }
2634
- return false;
2635
- };
2636
- } else {
2637
- module.exports = function isWeakSet(x2) {
2638
- return false;
2639
- };
2640
- }
2641
- var $mapHas;
2642
- }
2643
- });
2644
-
2645
- // node_modules/which-collection/index.js
2646
- var require_which_collection = __commonJS({
2647
- "node_modules/which-collection/index.js"(exports, module) {
2648
- "use strict";
2649
- var isMap = require_is_map();
2650
- var isSet = require_is_set();
2651
- var isWeakMap = require_is_weakmap();
2652
- var isWeakSet = require_is_weakset();
2653
- module.exports = function whichCollection(value) {
2654
- if (value && typeof value === "object") {
2655
- if (isMap(value)) {
2656
- return "Map";
2657
- }
2658
- if (isSet(value)) {
2659
- return "Set";
2660
- }
2661
- if (isWeakMap(value)) {
2662
- return "WeakMap";
2663
- }
2664
- if (isWeakSet(value)) {
2665
- return "WeakSet";
2666
- }
2667
- }
2668
- return false;
2669
- };
2670
- }
2671
- });
2672
-
2673
- // node_modules/which-typed-array/index.js
2674
- var require_which_typed_array = __commonJS({
2675
- "node_modules/which-typed-array/index.js"(exports, module) {
2676
- "use strict";
2677
- var forEach = require_for_each();
2678
- var availableTypedArrays = require_available_typed_arrays();
2679
- var callBound = require_callBound();
2680
- var gOPD = require_gopd();
2681
- var $toString = callBound("Object.prototype.toString");
2682
- var hasToStringTag = require_shams2()();
2683
- var g2 = typeof globalThis === "undefined" ? global : globalThis;
2684
- var typedArrays = availableTypedArrays();
2685
- var $slice = callBound("String.prototype.slice");
2686
- var toStrTags = {};
2687
- var getPrototypeOf = Object.getPrototypeOf;
2688
- if (hasToStringTag && gOPD && getPrototypeOf) {
2689
- forEach(typedArrays, function(typedArray) {
2690
- if (typeof g2[typedArray] === "function") {
2691
- var arr = new g2[typedArray]();
2692
- if (Symbol.toStringTag in arr) {
2693
- var proto = getPrototypeOf(arr);
2694
- var descriptor = gOPD(proto, Symbol.toStringTag);
2695
- if (!descriptor) {
2696
- var superProto = getPrototypeOf(proto);
2697
- descriptor = gOPD(superProto, Symbol.toStringTag);
2698
- }
2699
- toStrTags[typedArray] = descriptor.get;
2700
- }
2701
- }
2702
- });
2703
- }
2704
- var tryTypedArrays = function tryAllTypedArrays(value) {
2705
- var foundName = false;
2706
- forEach(toStrTags, function(getter, typedArray) {
2707
- if (!foundName) {
2708
- try {
2709
- var name = getter.call(value);
2710
- if (name === typedArray) {
2711
- foundName = name;
2712
- }
2713
- } catch (e) {
2714
- }
2715
- }
2716
- });
2717
- return foundName;
2718
- };
2719
- var isTypedArray = require_is_typed_array();
2720
- module.exports = function whichTypedArray(value) {
2721
- if (!isTypedArray(value)) {
2722
- return false;
2723
- }
2724
- if (!hasToStringTag || !(Symbol.toStringTag in value)) {
2725
- return $slice($toString(value), 8, -1);
2726
- }
2727
- return tryTypedArrays(value);
2728
- };
2729
- }
2730
- });
2731
-
2732
- // node_modules/deep-equal/index.js
2733
- var require_deep_equal = __commonJS({
2734
- "node_modules/deep-equal/index.js"(exports, module) {
2735
- "use strict";
2736
- var assign = require_object();
2737
- var callBound = require_callBound();
2738
- var flags = require_regexp_prototype();
2739
- var GetIntrinsic = require_get_intrinsic();
2740
- var getIterator = require_node();
2741
- var getSideChannel = require_side_channel();
2742
- var is = require_object_is();
2743
- var isArguments = require_is_arguments();
2744
- var isArray = require_isarray();
2745
- var isArrayBuffer = require_is_array_buffer();
2746
- var isDate = require_is_date_object();
2747
- var isRegex = require_is_regex();
2748
- var isSharedArrayBuffer = require_is_shared_array_buffer();
2749
- var objectKeys = require_object_keys();
2750
- var whichBoxedPrimitive = require_which_boxed_primitive();
2751
- var whichCollection = require_which_collection();
2752
- var whichTypedArray = require_which_typed_array();
2753
- var byteLength = callBound("ArrayBuffer.prototype.byteLength", true) || function byteLength2(ab) {
2754
- return ab.byteLength;
2755
- };
2756
- var sabByteLength = callBound("SharedArrayBuffer.prototype.byteLength", true);
2757
- var $getTime = callBound("Date.prototype.getTime");
2758
- var gPO = Object.getPrototypeOf;
2759
- var $objToString = callBound("Object.prototype.toString");
2760
- var $Set = GetIntrinsic("%Set%", true);
2761
- var $mapHas = callBound("Map.prototype.has", true);
2762
- var $mapGet = callBound("Map.prototype.get", true);
2763
- var $mapSize = callBound("Map.prototype.size", true);
2764
- var $setAdd = callBound("Set.prototype.add", true);
2765
- var $setDelete = callBound("Set.prototype.delete", true);
2766
- var $setHas = callBound("Set.prototype.has", true);
2767
- var $setSize = callBound("Set.prototype.size", true);
2768
- function setHasEqualElement(set, val1, opts, channel) {
2769
- var i = getIterator(set);
2770
- var result;
2771
- while ((result = i.next()) && !result.done) {
2772
- if (internalDeepEqual(val1, result.value, opts, channel)) {
2773
- $setDelete(set, result.value);
2774
- return true;
2775
- }
2776
- }
2777
- return false;
2778
- }
2779
- function findLooseMatchingPrimitives(prim) {
2780
- if (typeof prim === "undefined") {
2781
- return null;
2782
- }
2783
- if (typeof prim === "object") {
2784
- return void 0;
2785
- }
2786
- if (typeof prim === "symbol") {
2787
- return false;
2788
- }
2789
- if (typeof prim === "string" || typeof prim === "number") {
2790
- return +prim === +prim;
2791
- }
2792
- return true;
2793
- }
2794
- function mapMightHaveLoosePrim(a, b, prim, item, opts, channel) {
2795
- var altValue = findLooseMatchingPrimitives(prim);
2796
- if (altValue != null) {
2797
- return altValue;
2798
- }
2799
- var curB = $mapGet(b, altValue);
2800
- var looseOpts = assign({}, opts, { strict: false });
2801
- if (typeof curB === "undefined" && !$mapHas(b, altValue) || !internalDeepEqual(item, curB, looseOpts, channel)) {
2802
- return false;
2803
- }
2804
- return !$mapHas(a, altValue) && internalDeepEqual(item, curB, looseOpts, channel);
2805
- }
2806
- function setMightHaveLoosePrim(a, b, prim) {
2807
- var altValue = findLooseMatchingPrimitives(prim);
2808
- if (altValue != null) {
2809
- return altValue;
2810
- }
2811
- return $setHas(b, altValue) && !$setHas(a, altValue);
2812
- }
2813
- function mapHasEqualEntry(set, map, key1, item1, opts, channel) {
2814
- var i = getIterator(set);
2815
- var result;
2816
- var key2;
2817
- while ((result = i.next()) && !result.done) {
2818
- key2 = result.value;
2819
- if (
2820
- // eslint-disable-next-line no-use-before-define
2821
- internalDeepEqual(key1, key2, opts, channel) && internalDeepEqual(item1, $mapGet(map, key2), opts, channel)
2822
- ) {
2823
- $setDelete(set, key2);
2824
- return true;
2825
- }
2826
- }
2827
- return false;
2828
- }
2829
- function internalDeepEqual(actual, expected, options2, channel) {
2830
- var opts = options2 || {};
2831
- if (opts.strict ? is(actual, expected) : actual === expected) {
2832
- return true;
2833
- }
2834
- var actualBoxed = whichBoxedPrimitive(actual);
2835
- var expectedBoxed = whichBoxedPrimitive(expected);
2836
- if (actualBoxed !== expectedBoxed) {
2837
- return false;
2838
- }
2839
- if (!actual || !expected || typeof actual !== "object" && typeof expected !== "object") {
2840
- return opts.strict ? is(actual, expected) : actual == expected;
2841
- }
2842
- var hasActual = channel.has(actual);
2843
- var hasExpected = channel.has(expected);
2844
- var sentinel;
2845
- if (hasActual && hasExpected) {
2846
- if (channel.get(actual) === channel.get(expected)) {
2847
- return true;
2848
- }
2849
- } else {
2850
- sentinel = {};
2851
- }
2852
- if (!hasActual) {
2853
- channel.set(actual, sentinel);
2854
- }
2855
- if (!hasExpected) {
2856
- channel.set(expected, sentinel);
2857
- }
2858
- return objEquiv(actual, expected, opts, channel);
2859
- }
2860
- function isBuffer(x2) {
2861
- if (!x2 || typeof x2 !== "object" || typeof x2.length !== "number") {
2862
- return false;
2863
- }
2864
- if (typeof x2.copy !== "function" || typeof x2.slice !== "function") {
2865
- return false;
2866
- }
2867
- if (x2.length > 0 && typeof x2[0] !== "number") {
2868
- return false;
2869
- }
2870
- return !!(x2.constructor && x2.constructor.isBuffer && x2.constructor.isBuffer(x2));
2871
- }
2872
- function setEquiv(a, b, opts, channel) {
2873
- if ($setSize(a) !== $setSize(b)) {
2874
- return false;
2875
- }
2876
- var iA = getIterator(a);
2877
- var iB = getIterator(b);
2878
- var resultA;
2879
- var resultB;
2880
- var set;
2881
- while ((resultA = iA.next()) && !resultA.done) {
2882
- if (resultA.value && typeof resultA.value === "object") {
2883
- if (!set) {
2884
- set = new $Set();
2885
- }
2886
- $setAdd(set, resultA.value);
2887
- } else if (!$setHas(b, resultA.value)) {
2888
- if (opts.strict) {
2889
- return false;
2890
- }
2891
- if (!setMightHaveLoosePrim(a, b, resultA.value)) {
2892
- return false;
2893
- }
2894
- if (!set) {
2895
- set = new $Set();
2896
- }
2897
- $setAdd(set, resultA.value);
2898
- }
2899
- }
2900
- if (set) {
2901
- while ((resultB = iB.next()) && !resultB.done) {
2902
- if (resultB.value && typeof resultB.value === "object") {
2903
- if (!setHasEqualElement(set, resultB.value, opts.strict, channel)) {
2904
- return false;
2905
- }
2906
- } else if (!opts.strict && !$setHas(a, resultB.value) && !setHasEqualElement(set, resultB.value, opts.strict, channel)) {
2907
- return false;
2908
- }
2909
- }
2910
- return $setSize(set) === 0;
2911
- }
2912
- return true;
2913
- }
2914
- function mapEquiv(a, b, opts, channel) {
2915
- if ($mapSize(a) !== $mapSize(b)) {
2916
- return false;
2917
- }
2918
- var iA = getIterator(a);
2919
- var iB = getIterator(b);
2920
- var resultA;
2921
- var resultB;
2922
- var set;
2923
- var key;
2924
- var item1;
2925
- var item2;
2926
- while ((resultA = iA.next()) && !resultA.done) {
2927
- key = resultA.value[0];
2928
- item1 = resultA.value[1];
2929
- if (key && typeof key === "object") {
2930
- if (!set) {
2931
- set = new $Set();
2932
- }
2933
- $setAdd(set, key);
2934
- } else {
2935
- item2 = $mapGet(b, key);
2936
- if (typeof item2 === "undefined" && !$mapHas(b, key) || !internalDeepEqual(item1, item2, opts, channel)) {
2937
- if (opts.strict) {
2938
- return false;
2939
- }
2940
- if (!mapMightHaveLoosePrim(a, b, key, item1, opts, channel)) {
2941
- return false;
2942
- }
2943
- if (!set) {
2944
- set = new $Set();
2945
- }
2946
- $setAdd(set, key);
2947
- }
2948
- }
2949
- }
2950
- if (set) {
2951
- while ((resultB = iB.next()) && !resultB.done) {
2952
- key = resultB.value[0];
2953
- item2 = resultB.value[1];
2954
- if (key && typeof key === "object") {
2955
- if (!mapHasEqualEntry(set, a, key, item2, opts, channel)) {
2956
- return false;
2957
- }
2958
- } else if (!opts.strict && (!a.has(key) || !internalDeepEqual($mapGet(a, key), item2, opts, channel)) && !mapHasEqualEntry(set, a, key, item2, assign({}, opts, { strict: false }), channel)) {
2959
- return false;
2960
- }
2961
- }
2962
- return $setSize(set) === 0;
2963
- }
2964
- return true;
2965
- }
2966
- function objEquiv(a, b, opts, channel) {
2967
- var i, key;
2968
- if (typeof a !== typeof b) {
2969
- return false;
2970
- }
2971
- if (a == null || b == null) {
2972
- return false;
2973
- }
2974
- if ($objToString(a) !== $objToString(b)) {
2975
- return false;
2976
- }
2977
- if (isArguments(a) !== isArguments(b)) {
2978
- return false;
2979
- }
2980
- var aIsArray = isArray(a);
2981
- var bIsArray = isArray(b);
2982
- if (aIsArray !== bIsArray) {
2983
- return false;
2984
- }
2985
- var aIsError = a instanceof Error;
2986
- var bIsError = b instanceof Error;
2987
- if (aIsError !== bIsError) {
2988
- return false;
2989
- }
2990
- if (aIsError || bIsError) {
2991
- if (a.name !== b.name || a.message !== b.message) {
2992
- return false;
2993
- }
2994
- }
2995
- var aIsRegex = isRegex(a);
2996
- var bIsRegex = isRegex(b);
2997
- if (aIsRegex !== bIsRegex) {
2998
- return false;
2999
- }
3000
- if ((aIsRegex || bIsRegex) && (a.source !== b.source || flags(a) !== flags(b))) {
3001
- return false;
3002
- }
3003
- var aIsDate = isDate(a);
3004
- var bIsDate = isDate(b);
3005
- if (aIsDate !== bIsDate) {
3006
- return false;
3007
- }
3008
- if (aIsDate || bIsDate) {
3009
- if ($getTime(a) !== $getTime(b)) {
3010
- return false;
3011
- }
3012
- }
3013
- if (opts.strict && gPO && gPO(a) !== gPO(b)) {
3014
- return false;
3015
- }
3016
- var aWhich = whichTypedArray(a);
3017
- var bWhich = whichTypedArray(b);
3018
- if ((aWhich || bWhich) && aWhich !== bWhich) {
3019
- return false;
3020
- }
3021
- var aIsBuffer = isBuffer(a);
3022
- var bIsBuffer = isBuffer(b);
3023
- if (aIsBuffer !== bIsBuffer) {
3024
- return false;
3025
- }
3026
- if (aIsBuffer || bIsBuffer) {
3027
- if (a.length !== b.length) {
3028
- return false;
3029
- }
3030
- for (i = 0; i < a.length; i++) {
3031
- if (a[i] !== b[i]) {
3032
- return false;
3033
- }
3034
- }
3035
- return true;
3036
- }
3037
- var aIsArrayBuffer = isArrayBuffer(a);
3038
- var bIsArrayBuffer = isArrayBuffer(b);
3039
- if (aIsArrayBuffer !== bIsArrayBuffer) {
3040
- return false;
3041
- }
3042
- if (aIsArrayBuffer || bIsArrayBuffer) {
3043
- if (byteLength(a) !== byteLength(b)) {
3044
- return false;
3045
- }
3046
- return typeof Uint8Array === "function" && internalDeepEqual(new Uint8Array(a), new Uint8Array(b), opts, channel);
3047
- }
3048
- var aIsSAB = isSharedArrayBuffer(a);
3049
- var bIsSAB = isSharedArrayBuffer(b);
3050
- if (aIsSAB !== bIsSAB) {
3051
- return false;
3052
- }
3053
- if (aIsSAB || bIsSAB) {
3054
- if (sabByteLength(a) !== sabByteLength(b)) {
3055
- return false;
3056
- }
3057
- return typeof Uint8Array === "function" && internalDeepEqual(new Uint8Array(a), new Uint8Array(b), opts, channel);
3058
- }
3059
- if (typeof a !== typeof b) {
3060
- return false;
3061
- }
3062
- var ka = objectKeys(a);
3063
- var kb = objectKeys(b);
3064
- if (ka.length !== kb.length) {
3065
- return false;
3066
- }
3067
- ka.sort();
3068
- kb.sort();
3069
- for (i = ka.length - 1; i >= 0; i--) {
3070
- if (ka[i] != kb[i]) {
3071
- return false;
3072
- }
3073
- }
3074
- for (i = ka.length - 1; i >= 0; i--) {
3075
- key = ka[i];
3076
- if (!internalDeepEqual(a[key], b[key], opts, channel)) {
3077
- return false;
3078
- }
3079
- }
3080
- var aCollection = whichCollection(a);
3081
- var bCollection = whichCollection(b);
3082
- if (aCollection !== bCollection) {
3083
- return false;
3084
- }
3085
- if (aCollection === "Set" || bCollection === "Set") {
3086
- return setEquiv(a, b, opts, channel);
3087
- }
3088
- if (aCollection === "Map") {
3089
- return mapEquiv(a, b, opts, channel);
3090
- }
3091
- return true;
3092
- }
3093
- module.exports = function deepEqual2(a, b, opts) {
3094
- return internalDeepEqual(a, b, opts, getSideChannel());
3095
- };
3096
- }
3097
- });
3098
-
3099
- // src/clients/generic/dynamodb-client.ts
3100
- import { DynamoDBClient } from "@aws-sdk/client-dynamodb";
3101
- import { DynamoDBDocument } from "@aws-sdk/lib-dynamodb";
3102
- import * as log from "lambda-log";
3103
- var marshallOptions = {
3104
- convertEmptyValues: false,
3105
- removeUndefinedValues: false,
3106
- convertClassInstanceToMap: true
3107
- };
3108
- var unmarshallOptions = {
3109
- wrapNumbers: false
3110
- };
3111
- var translateConfig = { marshallOptions, unmarshallOptions };
3112
- var ddbClient = new DynamoDBClient({});
3113
- var client = DynamoDBDocument.from(ddbClient, translateConfig);
3114
- var _DynamoDbClient = class {
3115
- };
3116
- var DynamoDbClient = _DynamoDbClient;
3117
- __publicField(DynamoDbClient, "safeGet", async (tableName, keyName, keyValue) => {
3118
- try {
3119
- const params = {
3120
- TableName: tableName,
3121
- Key: {
3122
- [keyName]: keyValue
3123
- }
3124
- };
3125
- const res = await client.get(params);
3126
- return res?.Item ?? null;
3127
- } catch (e) {
3128
- log.error(e, { message: "Dynamo Client Get Failed" });
3129
- return null;
3130
- }
3131
- });
3132
- __publicField(DynamoDbClient, "safePut", async (tableName, data) => {
3133
- try {
3134
- const params = {
3135
- TableName: tableName,
3136
- Item: data
3137
- };
3138
- const res = await client.put(params);
3139
- return res;
3140
- } catch (e) {
3141
- log.error(e, { message: "Dynamo failed simplePut" });
3142
- return null;
3143
- }
3144
- });
3145
- __publicField(DynamoDbClient, "safeDelete", async (tableName, keyName, keyValue) => {
3146
- try {
3147
- const params = {
3148
- TableName: tableName,
3149
- Key: {
3150
- [keyName]: keyValue
3151
- }
3152
- };
3153
- const res = await client.delete(params);
3154
- return res;
3155
- } catch (e) {
3156
- log.error(e, { message: "Dynamo failed safeDelete" });
3157
- return null;
3158
- }
3159
- });
3160
- __publicField(DynamoDbClient, "safeQueryByGSI", async (tableName, gsiName, keyName, keyValue) => {
3161
- const query = {
3162
- TableName: tableName,
3163
- IndexName: gsiName,
3164
- KeyConditionExpression: `${keyName} = :value`,
3165
- ExpressionAttributeValues: {
3166
- ":value": keyValue
3167
- }
3168
- };
3169
- const results = await _DynamoDbClient.queryAll(query);
3170
- return results;
3171
- });
3172
- __publicField(DynamoDbClient, "safeBatchGet", async (tableName, keys) => {
3173
- try {
3174
- const params = {
3175
- RequestItems: {}
3176
- };
3177
- params.RequestItems[tableName] = {
3178
- Keys: keys
3179
- };
3180
- const res = await client.batchGet(params);
3181
- log.info("batchget res", { batchGetRes: res });
3182
- if (res?.Responses?.[tableName]) {
3183
- return res?.Responses?.[tableName];
3184
- }
3185
- return [];
3186
- } catch (e) {
3187
- log.error(e, { message: "Dynamo failed safeBatchGet" });
3188
- return [];
3189
- }
3190
- });
3191
- __publicField(DynamoDbClient, "queryAll", async (params) => {
3192
- try {
3193
- log.info("Invoke Query All", { params });
3194
- let currentResult, exclusiveStartKey;
3195
- let accumulatedResults = [];
3196
- do {
3197
- params.ExclusiveStartKey = exclusiveStartKey;
3198
- params.Limit = 200;
3199
- currentResult = await client.query(params);
3200
- if (currentResult.Items) {
3201
- exclusiveStartKey = currentResult.LastEvaluatedKey;
3202
- accumulatedResults = [...accumulatedResults, ...currentResult.Items];
3203
- }
3204
- } while (currentResult.Items && currentResult.Items.length > 0 && currentResult.LastEvaluatedKey);
3205
- return accumulatedResults;
3206
- } catch (e) {
3207
- log.error(e, { message: "Dynamo failed queryAll" });
3208
- return null;
3209
- }
3210
- });
3211
- __publicField(DynamoDbClient, "batchGet", (params) => client.batchGet(params));
3212
- __publicField(DynamoDbClient, "get", (params) => client.get(params));
3213
- __publicField(DynamoDbClient, "put", (params) => client.put(params));
3214
- __publicField(DynamoDbClient, "query", (params) => client.query(params));
3215
- __publicField(DynamoDbClient, "scan", (params) => client.scan(params));
3216
- __publicField(DynamoDbClient, "update", (params) => client.update(params));
3217
- __publicField(DynamoDbClient, "delete", (params) => client.delete(params));
3218
-
3219
- // src/clients/generic/eventbridge-client.ts
3220
- import { EventBridgeClient as EventBridge, PutEventsCommand } from "@aws-sdk/client-eventbridge";
3221
- import { v4 as uuidv4 } from "uuid";
3222
-
3223
- // src/libs/dates.ts
3224
- import { DateTime } from "luxon";
3225
- var getCurrentTimestamp = () => {
3226
- return DateTime.utc().toJSDate().toISOString();
3227
- };
3228
- var getDateFromTimestamp = (timestamp) => {
3229
- return timestamp.split("T")[0];
3230
- };
3231
- var getCurrentDate = () => {
3232
- return getDateFromTimestamp(getCurrentTimestamp());
3233
- };
3234
-
3235
- // src/clients/generic/eventbridge-client.ts
3236
- import * as log2 from "lambda-log";
3237
- var EventBridgeClient = class {
3238
- eventBridge;
3239
- EVENT_BUS_NAME;
3240
- constructor(eventBusName) {
3241
- this.eventBridge = new EventBridge({});
3242
- this.EVENT_BUS_NAME = eventBusName;
3243
- }
3244
- buildAndSendEvent = async (eventSource, eventType, eventData) => {
3245
- const event = this.buildEvent(eventType, eventData);
3246
- return await this.putEvent(eventSource, eventType, event);
3247
- };
3248
- buildEvent = (eventType, eventData, eventId = uuidv4(), eventTime = getCurrentTimestamp()) => {
3249
- return {
3250
- eventId,
3251
- eventType,
3252
- eventTime,
3253
- eventData
3254
- };
3255
- };
3256
- putEvent = async (source, detailType, data, headers = null) => {
3257
- const params = {
3258
- Entries: [{
3259
- Detail: JSON.stringify({ headers, data }),
3260
- DetailType: detailType,
3261
- EventBusName: this.EVENT_BUS_NAME,
3262
- Source: source,
3263
- Time: /* @__PURE__ */ new Date()
3264
- }]
3265
- };
3266
- const putEventscommand = new PutEventsCommand(params);
3267
- const response = await this.eventBridge.send(putEventscommand);
3268
- log2.debug(
3269
- "EventBus Event Published",
3270
- {
3271
- eventBusName: this.EVENT_BUS_NAME,
3272
- eventSource: source,
3273
- eventType: detailType,
3274
- event: data,
3275
- response
3276
- }
3277
- );
3278
- return response;
3279
- };
3280
- };
3281
-
3282
- // src/clients/generic/http-client.ts
3283
- import axios from "axios";
3284
- import https from "https";
3285
- var httpResponse = (res = {}) => {
3286
- return {
3287
- headers: res?.header || {},
3288
- data: res?.data || {},
3289
- status: res?.status || 0
3290
- };
3291
- };
3292
- var handleAxiosError = (error7) => {
3293
- if (!error7?.response && !error7?.request)
3294
- throw error7;
3295
- return error7.response ? httpResponse(error7.response) : httpResponse({ status: 500, data: { error: error7.request } });
3296
- };
3297
- var axiosHttpService = (config = {}) => {
3298
- config.adapter = "http";
3299
- config.httpsAgent = new https.Agent({ keepAlive: true });
3300
- const axiosService = axios.create(config);
3301
- return {
3302
- instance: () => axiosService,
3303
- get: (url, config2) => axiosService.get(url, config2).then(httpResponse, handleAxiosError),
3304
- post: (url, data, config2) => axiosService.post(url, data, config2).then(httpResponse, handleAxiosError),
3305
- delete: (url, config2) => axiosService.delete(url, config2).then(httpResponse, handleAxiosError),
3306
- put: (url, data, config2) => axiosService.put(url, data, config2).then(httpResponse, handleAxiosError),
3307
- patch: (url, data, config2) => axiosService.patch(url, data, config2).then(httpResponse, handleAxiosError),
3308
- setBaseUrl: (url) => !!(axiosService.defaults.baseURL = url)
3309
- };
3310
- };
3311
-
3312
- // src/clients/generic/s3-client.ts
3313
- import { ObjectCannedACL, S3 } from "@aws-sdk/client-s3";
3314
- import * as log3 from "lambda-log";
3315
- var S3Client = class {
3316
- s3;
3317
- constructor(region = "us-west-2") {
3318
- this.s3 = new S3({ region });
3319
- }
3320
- async uploadJson(path, bucket, jsonData, ACL = ObjectCannedACL.private) {
3321
- try {
3322
- const res = await this.s3.putObject({
3323
- ACL,
3324
- Bucket: bucket,
3325
- ContentType: "application/json; charset=utf-8",
3326
- Body: JSON.stringify(jsonData),
3327
- Key: path
3328
- });
3329
- return res;
3330
- } catch (error7) {
3331
- log3.error("Error in s3 upload json", { error: error7 });
3332
- return error7;
3333
- }
3334
- }
3335
- };
3336
-
3337
- // src/clients/generic/cognito-client.ts
3338
- import { CognitoIdentityProvider } from "@aws-sdk/client-cognito-identity-provider";
3339
- import * as log4 from "lambda-log";
3340
- function dictToAwsAttributes(input) {
3341
- delete input.email;
3342
- delete input.password;
3343
- const output = [];
3344
- for (const att in input) {
3345
- if (Object.prototype.hasOwnProperty.call(input, att)) {
3346
- output.push({ Name: att, Value: input[att] });
3347
- }
3348
- }
3349
- return output;
3350
- }
3351
- var buildAttributes = (data) => {
3352
- const attributes = {
3353
- name: data.givenName,
3354
- family_name: data.familyName
3355
- };
3356
- return dictToAwsAttributes(attributes);
3357
- };
3358
- var CognitoClient = class {
3359
- cognitoClient;
3360
- USER_POOL_ID;
3361
- USER_POOL_NO_SECRET_CLIENT_ID;
3362
- constructor(userPoolId, userPoolNoSecretClientId) {
3363
- this.cognitoClient = new CognitoIdentityProvider({});
3364
- this.USER_POOL_ID = userPoolId;
3365
- this.USER_POOL_NO_SECRET_CLIENT_ID = userPoolNoSecretClientId;
3366
- }
3367
- signupUser = async (data) => {
3368
- const params = {
3369
- ClientId: this.USER_POOL_NO_SECRET_CLIENT_ID,
3370
- Password: data.password,
3371
- Username: data.email,
3372
- UserAttributes: buildAttributes(data)
3373
- };
3374
- const cognitoResponse = await this.cognitoClient.signUp(params);
3375
- log4.debug("Successfully Registered User", { cognitoResponse });
3376
- return cognitoResponse;
3377
- };
3378
- forgotPassword = async (email) => {
3379
- await this.adminEmailVerify(email);
3380
- const params = {
3381
- ClientId: this.USER_POOL_NO_SECRET_CLIENT_ID,
3382
- Username: email
3383
- };
3384
- const cognitoResponse = await this.cognitoClient.forgotPassword(params);
3385
- log4.debug("Sent Forgot Password", { cognitoResponse });
3386
- return cognitoResponse;
3387
- };
3388
- adminEmailVerify = async (email) => {
3389
- try {
3390
- const user = await this.getUserByEmail(email);
3391
- if (user && user?.UserStatus === "CONFIRMED" && user?.email_verified !== "true") {
3392
- await this.forceValidateEmail(email);
3393
- }
3394
- } catch (error7) {
3395
- log4.error("Failed admin email verify", { error: error7 });
3396
- }
3397
- };
3398
- forceValidateEmail = async (email) => {
3399
- try {
3400
- const params = {
3401
- UserPoolId: this.USER_POOL_ID,
3402
- Username: email,
3403
- UserAttributes: [
3404
- {
3405
- Name: "email_verified",
3406
- Value: "true"
3407
- }
3408
- ]
3409
- };
3410
- await this.cognitoClient.adminUpdateUserAttributes(params);
3411
- } catch (error7) {
3412
- log4.error("Failed force validate email", { email, error: error7 });
3413
- }
3414
- };
3415
- adminConfirmUser = async (data) => {
3416
- const params = {
3417
- UserPoolId: this.USER_POOL_ID,
3418
- Username: data.email
3419
- };
3420
- const cognitoResponse = await this.cognitoClient.adminConfirmSignUp(params);
3421
- await this.forceValidateEmail(data.email);
3422
- log4.debug("Admin Successfully Confirmed User", { cognitoResponse });
3423
- return cognitoResponse;
3424
- };
3425
- confirmUser = async (data) => {
3426
- const params = {
3427
- ClientId: this.USER_POOL_NO_SECRET_CLIENT_ID,
3428
- ConfirmationCode: data.confirmationCode,
3429
- Username: data.email
3430
- };
3431
- const cognitoResponse = await this.cognitoClient.confirmSignUp(params);
3432
- log4.debug("Successfully Confirmed User", { cognitoResponse });
3433
- return cognitoResponse;
3434
- };
3435
- resendCode = async (email) => {
3436
- const params = {
3437
- ClientId: this.USER_POOL_NO_SECRET_CLIENT_ID,
3438
- Username: email
3439
- };
3440
- await this.cognitoClient.resendConfirmationCode(params);
3441
- log4.debug("Successfully Resend Confirmation Code", { email });
3442
- return;
3443
- };
3444
- adminDeleteUser = async (userId) => {
3445
- const params = {
3446
- UserPoolId: this.USER_POOL_ID,
3447
- Username: userId
3448
- };
3449
- await this.cognitoClient.adminDeleteUser(params);
3450
- return true;
3451
- };
3452
- getUserByEmail = async (email) => {
3453
- const params = {
3454
- UserPoolId: this.USER_POOL_ID,
3455
- Filter: `email="${email}"`,
3456
- Limit: 1
3457
- };
3458
- const cognitoResponse = await this.cognitoClient.listUsers(params);
3459
- log4.debug("Get Users by Email", { cognitoResponse });
3460
- if (cognitoResponse?.Users && cognitoResponse?.Users.length > 0) {
3461
- const attributes = cognitoResponse.Users[0].Attributes;
3462
- const user = {
3463
- ...cognitoResponse.Users[0],
3464
- Attributes: void 0,
3465
- id: cognitoResponse.Users[0].sub
3466
- };
3467
- attributes.forEach((attr) => {
3468
- user[attr.Name] = attr?.Value;
3469
- });
3470
- return user;
3471
- }
3472
- return null;
3473
- };
3474
- };
3475
-
3476
- // src/clients/generic/sqs-client.ts
3477
- import { SQS } from "@aws-sdk/client-sqs";
3478
- import { v4 as uuidv42 } from "uuid";
3479
- import * as log5 from "lambda-log";
3480
- var SQSClient = class {
3481
- sqs;
3482
- queueUrl;
3483
- constructor(region, accountId, queueName) {
3484
- this.sqs = new SQS({ region });
3485
- this.queueUrl = `https://sqs.${region}.amazonaws.com/${accountId}/${queueName}`;
3486
- }
3487
- buildAndSendEvent = async (eventType, eventData, deplaySeconds = 0) => {
3488
- const event = this.buildEvent(eventType, eventData);
3489
- return await this.putEvent(event, deplaySeconds);
3490
- };
3491
- buildEvent = (eventType, eventData, eventId = uuidv42(), eventTime = getCurrentTimestamp()) => {
3492
- return {
3493
- eventId,
3494
- eventType,
3495
- eventTime,
3496
- eventData
3497
- };
3498
- };
3499
- putEvent = async (data, delaySeconds = 0) => {
3500
- const params = {
3501
- QueueUrl: this.queueUrl,
3502
- DelaySeconds: delaySeconds,
3503
- MessageBody: JSON.stringify(data)
3504
- };
3505
- const response = await this.sqs.sendMessage(params);
3506
- log5.debug("SQS Event Published", { queueUrl: this.queueUrl, event: data });
3507
- return response;
3508
- };
3509
- };
3510
-
3511
- // src/clients/internal-api/destinations-client.ts
3512
- import * as log6 from "lambda-log";
3513
- var DestinationsClient = class {
3514
- BASE_API_URL;
3515
- DESTINATIONS_API_KEY;
3516
- constructor(baseApiUrl, destinationsApiKey) {
3517
- this.BASE_API_URL = baseApiUrl;
3518
- this.DESTINATIONS_API_KEY = destinationsApiKey;
3519
- }
3520
- getConfig = () => {
3521
- const SERVICE_API_ROOT_URL = `${this.BASE_API_URL}/destinations`;
3522
- return {
3523
- baseURL: SERVICE_API_ROOT_URL,
3524
- headers: {
3525
- common: {
3526
- "x-api-key": this.DESTINATIONS_API_KEY
3527
- }
3528
- }
3529
- };
3530
- };
3531
- getClient = async () => {
3532
- return axiosHttpService(this.getConfig());
3533
- };
3534
- createDestination = async (createDestinationRequest) => {
3535
- const client2 = await this.getClient();
3536
- const response = await client2.post("/", createDestinationRequest);
3537
- log6.info("createDestinationResponse", { response });
3538
- return response;
3539
- };
3540
- getPixelDestinations = async (pixelId) => {
3541
- const client2 = await this.getClient();
3542
- const response = await client2.get(`/?pixelId=${pixelId}`);
3543
- log6.info("getPixelResponse", { response });
3544
- return response;
3545
- };
3546
- };
3547
-
3548
- // src/clients/internal-api/accounts-client.ts
3549
- import * as log7 from "lambda-log";
3550
- var AccountsClient = class {
3551
- BASE_API_URL;
3552
- ACCOUNTS_API_KEY;
3553
- constructor(baseApiUrl, accountsApiKey) {
3554
- this.BASE_API_URL = baseApiUrl;
3555
- this.ACCOUNTS_API_KEY = accountsApiKey;
3556
- }
3557
- getConfig = () => {
3558
- const SERVICE_API_ROOT_URL = `${this.BASE_API_URL}/accounts`;
3559
- const params = {
3560
- baseURL: SERVICE_API_ROOT_URL
3561
- };
3562
- if (this.ACCOUNTS_API_KEY) {
3563
- params.headers = {
3564
- common: {
3565
- "x-api-key": this.ACCOUNTS_API_KEY
3566
- }
3567
- };
3568
- }
3569
- return params;
3570
- };
3571
- getClient = async () => {
3572
- return axiosHttpService(this.getConfig());
3573
- };
3574
- createAccount = async (createAccountRequest) => {
3575
- const client2 = await this.getClient();
3576
- const createAccountResponse = await client2.post("", createAccountRequest);
3577
- log7.info("createAccountResponse", { createAccountResponse });
3578
- return createAccountResponse;
3579
- };
3580
- updateAccount = async (accountId, body) => {
3581
- const client2 = await this.getClient();
3582
- const response = await client2.patch(`/${accountId}/`, body);
3583
- log7.info("update Account response", { response });
3584
- return response;
3585
- };
3586
- addOwner = async (accountId, userId) => {
3587
- const client2 = await this.getClient();
3588
- const addOwnerResponse = await client2.post("/addOwner", { accountId, userId });
3589
- log7.info("addOwnerResponse", { addOwnerResponse });
3590
- return addOwnerResponse;
3591
- };
3592
- isAuthorizedUser = async (userId, accountId, pixelId) => {
3593
- const client2 = await this.getClient();
3594
- const body = {
3595
- userId,
3596
- accountId,
3597
- pixelId
3598
- };
3599
- const response = await client2.post("/checkUserAuthorization", body);
3600
- log7.info("checkUserAuthorization", { response });
3601
- return response;
3602
- };
3603
- adminDeleteAccount = async (accountId) => {
3604
- const client2 = await this.getClient();
3605
- const success2 = await client2.delete(`/${accountId}`);
3606
- log7.info("adminDeleteAccount");
3607
- return success2;
3608
- };
3609
- getPixelConfigById = async (pixelId) => {
3610
- const client2 = await this.getClient();
3611
- const pixelResponse = await client2.get(`/px/${pixelId}/config`);
3612
- log7.debug("get pixelResponse", { pixelResponse });
3613
- return pixelResponse;
3614
- };
3615
- getAccount = async (accountId) => {
3616
- const client2 = await this.getClient();
3617
- const response = await client2.get(`/${accountId}/`);
3618
- log7.info("get account response", { response });
3619
- return response;
3620
- };
3621
- addUserToAccount = async (accountId, userId) => {
3622
- const client2 = await this.getClient();
3623
- const response = await client2.post("/addUser", { accountId, userId });
3624
- log7.info("add user account response", { response });
3625
- return response;
3626
- };
3627
- // setAccountSubscriptionId = async (accountId: string, subscriptionId: string): Promise<ApiResponse<any>> => {
3628
- // const client = await this.getClient();
3629
- // const pixelResponse = await client.get(`/px/${pixelId}/config`);
3630
- // log.debug('pixelResponse', { pixelResponse });
3631
- // return pixelResponse;
3632
- // };
3633
- };
3634
-
3635
- // src/clients/internal-api/users-auth-client.ts
3636
- import * as log8 from "lambda-log";
3637
-
3638
- // src/libs/http-error.ts
3639
- import { strict as assert } from "assert";
3640
- var deepClone = (o = {}) => JSON.parse(JSON.stringify(o));
3641
- var containsStackTrace = (text = "") => /at.+\.js:\d+:\d+/.test(text);
3642
- var objectContainsStackTrace = (obj) => !obj ? false : containsStackTrace(JSON.stringify(obj));
3643
- var supportedStatusCodes = {
3644
- 400: "Bad Request",
3645
- 401: "Unauthorized",
3646
- 403: "Forbidden",
3647
- 404: "Not Found",
3648
- 405: "Method Not Allowed",
3649
- 409: "Conflict",
3650
- 412: "Precondition Failed",
3651
- 413: "Payload Too Large",
3652
- 415: "Unsupported Media Type",
3653
- 428: "Precondition Required",
3654
- 429: "Too Many Requests",
3655
- 500: "Internal Server Error",
3656
- 501: "Not Implemented",
3657
- 502: "Bad Gateway",
3658
- 503: "Service Unavailable",
3659
- 504: "Gateway Timeout"
3660
- };
3661
- var supportedStatusCodesMessage = `statusCode must be one of the following: ${JSON.stringify(Object.keys(supportedStatusCodes))}`;
3662
- var _HttpError = class extends Error {
3663
- body;
3664
- headers;
3665
- statusCode;
3666
- isServerError;
3667
- constructor(statusCode, message, body, headers) {
3668
- assert(statusCode in supportedStatusCodes, supportedStatusCodesMessage);
3669
- const isServerError = statusCode > 499;
3670
- assert(
3671
- body === void 0 || typeof body === "object",
3672
- "body must be an object or omitted"
3673
- );
3674
- assert(
3675
- headers === void 0 || typeof headers === "object",
3676
- "headers must be an object or omitted"
3677
- );
3678
- message = message ?? supportedStatusCodes[statusCode];
3679
- assert(
3680
- !containsStackTrace(message) && !objectContainsStackTrace(body),
3681
- "the message or data parameters may not contain errors or stack traces"
3682
- );
3683
- super(message);
3684
- this.body = deepClone(body);
3685
- this.headers = deepClone(headers);
3686
- this.statusCode = statusCode;
3687
- this.isServerError = isServerError;
3688
- if (!this?.body?.message) {
3689
- this.body.message = this.message;
3690
- }
3691
- }
3692
- static get supportedStatusCodes() {
3693
- return supportedStatusCodes;
3694
- }
3695
- };
3696
- var HttpError = _HttpError;
3697
- __publicField(HttpError, "badRequest", (message, body, headers) => {
3698
- return new _HttpError(400, message, body, headers);
3699
- });
3700
- __publicField(HttpError, "unauthorized", (message, body, headers) => new _HttpError(401, message, body, headers));
3701
- __publicField(HttpError, "forbidden", (message, body, headers) => new _HttpError(403, message, body, headers));
3702
- __publicField(HttpError, "notFound", (message, body, headers) => new _HttpError(404, message, body, headers));
3703
- __publicField(HttpError, "internal", (message, body, headers) => new _HttpError(500, message, body, headers));
3704
- __publicField(HttpError, "notImplemented", () => new _HttpError(501));
3705
- __publicField(HttpError, "badGateway", () => new _HttpError(502));
3706
- __publicField(HttpError, "serviceUnavailable", (headers) => new _HttpError(503, void 0, void 0, headers));
3707
- __publicField(HttpError, "gatewayTimeout", () => new _HttpError(504));
3708
-
3709
- // src/libs/http-status-codes.ts
3710
- var HttpStatusCodes = /* @__PURE__ */ ((HttpStatusCodes2) => {
3711
- HttpStatusCodes2[HttpStatusCodes2["CONTINUE"] = 100] = "CONTINUE";
3712
- HttpStatusCodes2[HttpStatusCodes2["SWITCHING_PROTOCOLS"] = 101] = "SWITCHING_PROTOCOLS";
3713
- HttpStatusCodes2[HttpStatusCodes2["PROCESSING"] = 102] = "PROCESSING";
3714
- HttpStatusCodes2[HttpStatusCodes2["OK"] = 200] = "OK";
3715
- HttpStatusCodes2[HttpStatusCodes2["CREATED"] = 201] = "CREATED";
3716
- HttpStatusCodes2[HttpStatusCodes2["ACCEPTED"] = 202] = "ACCEPTED";
3717
- HttpStatusCodes2[HttpStatusCodes2["NON_AUTHORITATIVE_INFORMATION"] = 203] = "NON_AUTHORITATIVE_INFORMATION";
3718
- HttpStatusCodes2[HttpStatusCodes2["NO_CONTENT"] = 204] = "NO_CONTENT";
3719
- HttpStatusCodes2[HttpStatusCodes2["RESET_CONTENT"] = 205] = "RESET_CONTENT";
3720
- HttpStatusCodes2[HttpStatusCodes2["PARTIAL_CONTENT"] = 206] = "PARTIAL_CONTENT";
3721
- HttpStatusCodes2[HttpStatusCodes2["MULTI_STATUS"] = 207] = "MULTI_STATUS";
3722
- HttpStatusCodes2[HttpStatusCodes2["MULTIPLE_CHOICES"] = 300] = "MULTIPLE_CHOICES";
3723
- HttpStatusCodes2[HttpStatusCodes2["MOVED_PERMANENTLY"] = 301] = "MOVED_PERMANENTLY";
3724
- HttpStatusCodes2[HttpStatusCodes2["MOVED_TEMPORARILY"] = 302] = "MOVED_TEMPORARILY";
3725
- HttpStatusCodes2[HttpStatusCodes2["SEE_OTHER"] = 303] = "SEE_OTHER";
3726
- HttpStatusCodes2[HttpStatusCodes2["NOT_MODIFIED"] = 304] = "NOT_MODIFIED";
3727
- HttpStatusCodes2[HttpStatusCodes2["USE_PROXY"] = 305] = "USE_PROXY";
3728
- HttpStatusCodes2[HttpStatusCodes2["TEMPORARY_REDIRECT"] = 307] = "TEMPORARY_REDIRECT";
3729
- HttpStatusCodes2[HttpStatusCodes2["PERMANENT_REDIRECT"] = 308] = "PERMANENT_REDIRECT";
3730
- HttpStatusCodes2[HttpStatusCodes2["BAD_REQUEST"] = 400] = "BAD_REQUEST";
3731
- HttpStatusCodes2[HttpStatusCodes2["UNAUTHORIZED"] = 401] = "UNAUTHORIZED";
3732
- HttpStatusCodes2[HttpStatusCodes2["PAYMENT_REQUIRED"] = 402] = "PAYMENT_REQUIRED";
3733
- HttpStatusCodes2[HttpStatusCodes2["FORBIDDEN"] = 403] = "FORBIDDEN";
3734
- HttpStatusCodes2[HttpStatusCodes2["NOT_FOUND"] = 404] = "NOT_FOUND";
3735
- HttpStatusCodes2[HttpStatusCodes2["METHOD_NOT_ALLOWED"] = 405] = "METHOD_NOT_ALLOWED";
3736
- HttpStatusCodes2[HttpStatusCodes2["NOT_ACCEPTABLE"] = 406] = "NOT_ACCEPTABLE";
3737
- HttpStatusCodes2[HttpStatusCodes2["PROXY_AUTHENTICATION_REQUIRED"] = 407] = "PROXY_AUTHENTICATION_REQUIRED";
3738
- HttpStatusCodes2[HttpStatusCodes2["REQUEST_TIMEOUT"] = 408] = "REQUEST_TIMEOUT";
3739
- HttpStatusCodes2[HttpStatusCodes2["CONFLICT"] = 409] = "CONFLICT";
3740
- HttpStatusCodes2[HttpStatusCodes2["GONE"] = 410] = "GONE";
3741
- HttpStatusCodes2[HttpStatusCodes2["LENGTH_REQUIRED"] = 411] = "LENGTH_REQUIRED";
3742
- HttpStatusCodes2[HttpStatusCodes2["PRECONDITION_FAILED"] = 412] = "PRECONDITION_FAILED";
3743
- HttpStatusCodes2[HttpStatusCodes2["REQUEST_TOO_LONG"] = 413] = "REQUEST_TOO_LONG";
3744
- HttpStatusCodes2[HttpStatusCodes2["REQUEST_URI_TOO_LONG"] = 414] = "REQUEST_URI_TOO_LONG";
3745
- HttpStatusCodes2[HttpStatusCodes2["UNSUPPORTED_MEDIA_TYPE"] = 415] = "UNSUPPORTED_MEDIA_TYPE";
3746
- HttpStatusCodes2[HttpStatusCodes2["REQUESTED_RANGE_NOT_SATISFIABLE"] = 416] = "REQUESTED_RANGE_NOT_SATISFIABLE";
3747
- HttpStatusCodes2[HttpStatusCodes2["EXPECTATION_FAILED"] = 417] = "EXPECTATION_FAILED";
3748
- HttpStatusCodes2[HttpStatusCodes2["IM_A_TEAPOT"] = 418] = "IM_A_TEAPOT";
3749
- HttpStatusCodes2[HttpStatusCodes2["INSUFFICIENT_SPACE_ON_RESOURCE"] = 419] = "INSUFFICIENT_SPACE_ON_RESOURCE";
3750
- HttpStatusCodes2[HttpStatusCodes2["METHOD_FAILURE"] = 420] = "METHOD_FAILURE";
3751
- HttpStatusCodes2[HttpStatusCodes2["MISDIRECTED_REQUEST"] = 421] = "MISDIRECTED_REQUEST";
3752
- HttpStatusCodes2[HttpStatusCodes2["UNPROCESSABLE_ENTITY"] = 422] = "UNPROCESSABLE_ENTITY";
3753
- HttpStatusCodes2[HttpStatusCodes2["LOCKED"] = 423] = "LOCKED";
3754
- HttpStatusCodes2[HttpStatusCodes2["FAILED_DEPENDENCY"] = 424] = "FAILED_DEPENDENCY";
3755
- HttpStatusCodes2[HttpStatusCodes2["PRECONDITION_REQUIRED"] = 428] = "PRECONDITION_REQUIRED";
3756
- HttpStatusCodes2[HttpStatusCodes2["TOO_MANY_REQUESTS"] = 429] = "TOO_MANY_REQUESTS";
3757
- HttpStatusCodes2[HttpStatusCodes2["REQUEST_HEADER_FIELDS_TOO_LARGE"] = 431] = "REQUEST_HEADER_FIELDS_TOO_LARGE";
3758
- HttpStatusCodes2[HttpStatusCodes2["UNAVAILABLE_FOR_LEGAL_REASONS"] = 451] = "UNAVAILABLE_FOR_LEGAL_REASONS";
3759
- HttpStatusCodes2[HttpStatusCodes2["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR";
3760
- HttpStatusCodes2[HttpStatusCodes2["NOT_IMPLEMENTED"] = 501] = "NOT_IMPLEMENTED";
3761
- HttpStatusCodes2[HttpStatusCodes2["BAD_GATEWAY"] = 502] = "BAD_GATEWAY";
3762
- HttpStatusCodes2[HttpStatusCodes2["SERVICE_UNAVAILABLE"] = 503] = "SERVICE_UNAVAILABLE";
3763
- HttpStatusCodes2[HttpStatusCodes2["GATEWAY_TIMEOUT"] = 504] = "GATEWAY_TIMEOUT";
3764
- HttpStatusCodes2[HttpStatusCodes2["HTTP_VERSION_NOT_SUPPORTED"] = 505] = "HTTP_VERSION_NOT_SUPPORTED";
3765
- HttpStatusCodes2[HttpStatusCodes2["INSUFFICIENT_STORAGE"] = 507] = "INSUFFICIENT_STORAGE";
3766
- HttpStatusCodes2[HttpStatusCodes2["NETWORK_AUTHENTICATION_REQUIRED"] = 511] = "NETWORK_AUTHENTICATION_REQUIRED";
3767
- return HttpStatusCodes2;
3768
- })(HttpStatusCodes || {});
3769
-
3770
- // src/clients/internal-api/users-auth-client.ts
3771
- var UsersAuthClient = class {
3772
- SERVICE_API_ROOT_URL;
3773
- BASE_API_URL;
3774
- USERS_AUTH_API_KEY;
3775
- constructor(baseApiUrl, usersAuthApiKey) {
3776
- this.BASE_API_URL = baseApiUrl;
3777
- this.USERS_AUTH_API_KEY = usersAuthApiKey;
3778
- this.SERVICE_API_ROOT_URL = `${this.BASE_API_URL}/auth`;
3779
- }
3780
- getConfig = () => {
3781
- return {
3782
- baseURL: this.SERVICE_API_ROOT_URL,
3783
- headers: {
3784
- common: {}
3785
- }
3786
- };
3787
- };
3788
- getClient = async () => {
3789
- return axiosHttpService(this.getConfig());
3790
- };
3791
- signupAndConfirmUser = async (userSignupRequest) => {
3792
- const user = await this.signupUser(userSignupRequest);
3793
- await this.adminConfirmUser(user.email);
3794
- return user;
3795
- };
3796
- signupUser = async (userSignupRequest) => {
3797
- log8.info("Attempting to signup user", { email: userSignupRequest.email });
3798
- const client2 = await this.getClient();
3799
- const response = await client2.post("/signup", userSignupRequest);
3800
- if (response.status !== 200 || !response?.data?.user) {
3801
- const message = "User Signup Failed";
3802
- log8.error(message, { response });
3803
- throw new HttpError(500 /* INTERNAL_SERVER_ERROR */, message);
3804
- }
3805
- log8.info("User Signup Successful", { response });
3806
- return response.data.user;
3807
- };
3808
- //userName is same as user id
3809
- adminConfirmUser = async (email) => {
3810
- log8.info("Attempting to admin confirm user", { email });
3811
- const client2 = await this.getClient();
3812
- const response = await client2.post(
3813
- "/admin/confirm",
3814
- {
3815
- email
3816
- },
3817
- {
3818
- headers: {
3819
- "x-api-key": this.USERS_AUTH_API_KEY
3820
- }
3821
- }
3822
- );
3823
- if (response.status !== 200) {
3824
- const message = "Admin User Confirmation Failed";
3825
- log8.error(message, { response });
3826
- throw new HttpError(500 /* INTERNAL_SERVER_ERROR */, message);
3827
- }
3828
- log8.info("Admin User Confirmation Successful", { response });
3829
- return response;
3830
- };
3831
- getUserByEmail = async (email) => {
3832
- const client2 = await this.getClient();
3833
- const getUserResponse = await client2.get("/lookup", {
3834
- headers: {
3835
- "x-api-key": this.USERS_AUTH_API_KEY
3836
- },
3837
- params: {
3838
- email
3839
- }
3840
- });
3841
- log8.info("getUserResponse", { getUserResponse });
3842
- return getUserResponse;
3843
- };
3844
- };
3845
-
3846
- // src/clients/internal-api/shopify-app-install-client.ts
3847
- import log9 from "lambda-log";
3848
- var ShopifyAppInstallClient = class {
3849
- BASE_API_URL;
3850
- SHOPIFY_APP_INSTALL_API_KEY;
3851
- constructor(baseApiUrl, shopifyAppInstallApiKey) {
3852
- this.BASE_API_URL = baseApiUrl;
3853
- this.SHOPIFY_APP_INSTALL_API_KEY = shopifyAppInstallApiKey;
3854
- }
3855
- getConfig = () => {
3856
- const SERVICE_API_ROOT_URL = `${this.BASE_API_URL}/shopify-app-installs`;
3857
- return {
3858
- baseURL: SERVICE_API_ROOT_URL,
3859
- headers: {
3860
- common: {
3861
- "x-api-key": this.SHOPIFY_APP_INSTALL_API_KEY
3862
- }
3863
- }
3864
- };
3865
- };
3866
- getClient = async () => {
3867
- return axiosHttpService(this.getConfig());
3868
- };
3869
- updateShopifyAppInstall = async (shopifyAppInstallId, updateShopifyAppInstallRequest) => {
3870
- const client2 = await this.getClient();
3871
- const response = await client2.put(`/${shopifyAppInstallId}`, updateShopifyAppInstallRequest);
3872
- log9.info("updateShopifyAppInstall", { response });
3873
- return response;
3874
- };
3875
- getShopifyAppInstall = async (shopifyAppInstallId) => {
3876
- const client2 = await this.getClient();
3877
- const response = await client2.get(`/${shopifyAppInstallId}`);
3878
- log9.info("getShopifyAppInstall", { response });
3879
- return response;
3880
- };
3881
- getShopifyAppInstallByShop = async (shop) => {
3882
- const client2 = await this.getClient();
3883
- const response = await client2.get(`/?shop=${shop}`);
3884
- log9.info("getShopifyAppInstallByShop", { response });
3885
- return response;
3886
- };
3887
- };
3888
-
3889
- // src/clients/third-party/shopify-client.ts
3890
- import * as log10 from "lambda-log";
3891
- var _ShopifyClient = class {
3892
- };
3893
- var ShopifyClient = _ShopifyClient;
3894
- __publicField(ShopifyClient, "_shopify_api_version", process.env.SHOPIFY_API_VERSION);
3895
- __publicField(ShopifyClient, "getConfig", (shopifyDomain, accessToken) => {
3896
- const config = {
3897
- baseURL: `https://${shopifyDomain}/admin/api/${_ShopifyClient._shopify_api_version}`,
3898
- headers: {
3899
- common: {
3900
- "X-Shopify-Access-Token": accessToken
3901
- }
3902
- }
3903
- };
3904
- return config;
3905
- });
3906
- __publicField(ShopifyClient, "getClient", (shopifyDomain, accessToken) => {
3907
- return axiosHttpService(
3908
- _ShopifyClient.getConfig(shopifyDomain, accessToken)
3909
- );
3910
- });
3911
- __publicField(ShopifyClient, "registerApp", async (shop, code, appKey, appSecret) => {
3912
- const client2 = axiosHttpService();
3913
- const url = "https://" + shop + "/admin/oauth/access_token";
3914
- const payload = {
3915
- client_id: appKey,
3916
- client_secret: appSecret,
3917
- code
3918
- };
3919
- const res = await client2.post(url, payload);
3920
- return res;
3921
- });
3922
- __publicField(ShopifyClient, "registerWebhookTopic", async (shop, accessToken, eventBridgeArn, topic) => {
3923
- const client2 = axiosHttpService();
3924
- const url = `https://${shop}/admin/api/${_ShopifyClient._shopify_api_version}/webhooks.json`;
3925
- const payload = {
3926
- webhook: {
3927
- topic,
3928
- address: eventBridgeArn,
3929
- format: "json"
3930
- }
3931
- };
3932
- const res = await client2.post(url, payload, { headers: { "X-Shopify-Access-Token": accessToken } });
3933
- if (res.status >= 400) {
3934
- log10.error("Failed to register Webhook Topic", { shop, accessToken, eventBridgeArn, topic, url, payload });
3935
- }
3936
- log10.debug("Shopify Client Webhook Registration Response", { registrationResponse: res });
3937
- return res;
3938
- });
3939
- __publicField(ShopifyClient, "updateShopifyAppMetafield", async (shop, accessToken, pixelId) => {
3940
- const url = `https://${shop}/admin/api/${_ShopifyClient._shopify_api_version}/metafields.json`;
3941
- const payload = {
3942
- metafield: {
3943
- namespace: "adtr",
3944
- key: "adtr.config",
3945
- value: pixelId,
3946
- type: "single_line_text_field"
3947
- }
3948
- };
3949
- const res = await _ShopifyClient.genericShopifyPost(url, accessToken, payload);
3950
- if (res.status >= 400) {
3951
- log10.error("Failed to update Shopify app Metafield ", { shop, accessToken, url, payload });
3952
- }
3953
- return res;
3954
- });
3955
- __publicField(ShopifyClient, "getShopifyStoreProperties", async (shop, accessToken) => {
3956
- const url = `https://${shop}/admin/api/${_ShopifyClient._shopify_api_version}/shop.json`;
3957
- const res = await _ShopifyClient.genericShopifyGet(url, accessToken);
3958
- if (res.status >= 400) {
3959
- log10.error("Failed to get Shopify Store Properties", { shop, accessToken, url });
3960
- }
3961
- return res;
3962
- });
3963
- __publicField(ShopifyClient, "createAppSubscription", async (shop, accessToken, planName, price, returnUrl, trialDays, test) => {
3964
- const url = `https://${shop}/admin/api/${_ShopifyClient._shopify_api_version}/recurring_application_charges.json`;
3965
- const recurring_application_charge = {
3966
- name: planName,
3967
- price,
3968
- return_url: returnUrl,
3969
- trial_days: trialDays,
3970
- test
3971
- };
3972
- const res = await _ShopifyClient.genericShopifyPost(url, accessToken, { recurring_application_charge });
3973
- if (res.status >= 400) {
3974
- log10.error("Failed to create App Subscription", { shop, accessToken, url });
3975
- }
3976
- return res;
3977
- });
3978
- __publicField(ShopifyClient, "cancelAppSubscription", async (shop, accessToken, chargeId) => {
3979
- const url = `https://${shop}/admin/api/${_ShopifyClient._shopify_api_version}/recurring_application_charges/${chargeId}.json`;
3980
- const client2 = axiosHttpService();
3981
- const res = await client2.delete(url, { headers: { "X-Shopify-Access-Token": accessToken } });
3982
- if (res.status !== 200) {
3983
- log10.error("Failed to cancel recurring App billing", { shop, accessToken, url });
3984
- }
3985
- return res;
3986
- });
3987
- __publicField(ShopifyClient, "listAppSubscriptions", async (shop, accessToken) => {
3988
- const url = `https://${shop}/admin/api/${_ShopifyClient._shopify_api_version}/recurring_application_charges.json`;
3989
- const res = await _ShopifyClient.genericShopifyGet(url, accessToken);
3990
- if (res.status >= 400) {
3991
- log10.error("Failed to get App Subscriptions", { shop, accessToken, url });
3992
- }
3993
- return res;
3994
- });
3995
- __publicField(ShopifyClient, "genericShopifyPost", async (url, accessToken, payload) => {
3996
- const client2 = axiosHttpService();
3997
- const res = await client2.post(url, payload, { headers: { "X-Shopify-Access-Token": accessToken, "Content-Type": "application/json" } });
3998
- log10.debug("Shopify Client Response", { res });
3999
- return res;
4000
- });
4001
- __publicField(ShopifyClient, "genericShopifyGet", async (url, accessToken) => {
4002
- const client2 = axiosHttpService();
4003
- const res = await client2.get(url, { headers: { "X-Shopify-Access-Token": accessToken } });
4004
- log10.debug("Shopify Client Response", { res });
4005
- return res;
4006
- });
4007
- __publicField(ShopifyClient, "genericShopifyPut", async (url, accessToken, payload) => {
4008
- const client2 = axiosHttpService();
4009
- const res = await client2.put(url, payload, { headers: { "X-Shopify-Access-Token": accessToken } });
4010
- log10.debug("Shopify Client Response", { res });
4011
- return res;
4012
- });
4013
-
4014
- // src/helpers/input-validation-helper.ts
4015
- import * as log11 from "lambda-log";
4016
- var validateInput = (schema, input) => {
4017
- const { error: error7, value } = schema.validate(input);
4018
- if (error7) {
4019
- log11.info("", { error: error7 });
4020
- const httperr = HttpError.badRequest("Bad Request", {
4021
- errors: error7.details.map((detail) => ({
4022
- message: detail?.message,
4023
- key: detail?.context?.key,
4024
- path: detail?.path
4025
- }))
4026
- });
4027
- log11.info("", { httperr });
4028
- throw httperr;
4029
- }
4030
- return value;
4031
- };
4032
-
4033
- // src/helpers/logging-helper.ts
4034
- import * as log12 from "lambda-log";
4035
- var stage = process?.env?.STAGE;
4036
- var configureLogger = (event, context, debug6 = true) => {
4037
- log12.options.meta.stage = stage;
4038
- log12.options.meta.source_name = context?.functionName || "unknown";
4039
- log12.options.meta.awsRequestId = context?.awsRequestId || "unknown";
4040
- log12.options.meta.lambdaEvent = event;
4041
- log12.options.debug = debug6;
4042
- };
4043
-
4044
- // src/helpers/response-helper.ts
4045
- var success = (body) => {
4046
- return buildResponse(200, body);
4047
- };
4048
- var defaultError = {
4049
- message: "internalServerError"
4050
- };
4051
- var failure = (error7, statusCode = 500) => {
4052
- statusCode = error7?.statusCode ?? statusCode;
4053
- let body = defaultError;
4054
- if (error7?.body) {
4055
- body = error7.body;
4056
- } else if (error7?.message) {
4057
- body = { message: error7.message };
4058
- } else if (statusCode === 500) {
4059
- body = defaultError;
4060
- }
4061
- return buildResponse(statusCode, body);
4062
- };
4063
- var buildResponse = (statusCode, body = {}) => {
4064
- delete body.stack;
4065
- return {
4066
- statusCode,
4067
- headers: {
4068
- "Access-Control-Allow-Origin": "*",
4069
- "Access-Control-Allow-Credentials": true,
4070
- "cache-control": "max-age=86400",
4071
- Date: /* @__PURE__ */ new Date(),
4072
- "Last-Modified": /* @__PURE__ */ new Date(),
4073
- "Access-Control-Allow-Headers": "Content-Type, Content-Encoding"
4074
- },
4075
- body: JSON.stringify(body)
4076
- };
4077
- };
4078
-
4079
- // src/helpers/shopify-helper.ts
4080
- import { createHmac } from "crypto";
4081
- import * as log13 from "lambda-log";
4082
-
4083
- // src/libs/url.ts
4084
- var mapObjectToQueryString = (inputObj) => {
4085
- const qsp = Object.entries(inputObj).sort((a, b) => a[0] < b[0] ? -1 : 1);
4086
- const urlParams = new URLSearchParams();
4087
- qsp.map((p2) => {
4088
- urlParams.append(p2[0], p2[1]);
4089
- });
4090
- const qs = urlParams.toString();
4091
- return qs;
4092
- };
4093
-
4094
- // src/helpers/shopify-helper.ts
4095
- var isShopifyRequestValid = (validationParams, validationHmac, shopifyAppApiSecret) => {
4096
- delete validationParams.hmac;
4097
- const hmacString = mapObjectToQueryString(validationParams);
4098
- const generatedHash = createHmac("sha256", shopifyAppApiSecret).update(hmacString).digest("hex");
4099
- return generatedHash === validationHmac;
4100
- };
4101
- var validateShopifyRequest = (validationParams, validationHmac, shopifyAppApiSecret) => {
4102
- log13.info("Validating shopify request is authentic", { validationParams });
4103
- const isValid = isShopifyRequestValid(validationParams, validationHmac, shopifyAppApiSecret);
4104
- if (!isValid) {
4105
- const message = "Failed: Shopify Request hmac validation";
4106
- log13.error(message);
4107
- throw HttpError.badRequest(message);
4108
- }
4109
- log13.info("Sucess: Shopify Request hmac validation");
4110
- return true;
4111
- };
4112
-
4113
- // node_modules/@adtrackify/at-tracking-event-types/dist/index.js
4114
- var s = ((n) => (n.PENDING = "pending", n.ACTIVE = "active", n.INACTIVE = "inactive", n))(s || {});
4115
- var g = ((i) => (i.FACEBOOK = "facebook", i.TIKTOK = "tiktok", i.GOOGLE_ADS = "googleAds", i.GOOGLE_ANALYTICS_4 = "googleAnalytics4", i.HUBSPOT = "hubspot", i.WEBHOOK = "webhook", i.CUSTOM_HTML = "customHTML", i.CUSTOM_JS = "customJS", i.SNAPCHAT = "snapchat", i.TWITTER = "twitter", i.REDDIT = "reddit", i))(g || {});
4116
- var c = ((n) => (n.HEADER = "header", n.FOOTER = "footer", n.BODY = "body", n))(c || {});
4117
- var p = ((o) => (o.STARTED = "started", o.COMPLETED = "completed", o.UNINSTALLED = "uninstalled", o.FAILED = "failed", o.NONE = "none", o))(p || {});
4118
- var d = ((e) => (e.ACTIVE = "active", e.CANCELLED = "cancelled", e.DECLINED = "declined", e.EXPIRED = "expired", e.FROZEN = "frozen", e.PENDING = "pending", e.NOT_SUBMITTED = "na", e))(d || {});
4119
- var f = ((a) => (a.MONTHLY = "monthly", a.YEARLY = "yearly", a))(f || {});
4120
- var m = ((r) => (r.CURRENT = "current", r.PAST_DUE = "past_due", r.CANCELLED = "cancelled", r.FAILED = "failed", r))(m || {});
4121
- var l = ((e) => (e.ACTIVE = "active", e.CANCELLED = "cancelled", e.DECLINED = "declined", e.EXPIRED = "expired", e.FROZEN = "frozen", e.PENDING = "pending", e.NOT_SUBMITTED = "na", e))(l || {});
4122
- var u = ((n) => (n.STRIPE = "stripe", n.PAYPAL = "paypal", n.SHOPIFY = "shopify", n))(u || {});
4123
- var x = ((t) => (t.ADD_PAYMENT_INFO = "add_payment_info", t.ADD_SHIPPING_INFO = "add_shipping_info", t.ADD_TO_CART = "add_to_cart", t.ADD_TO_WISHLIST = "add_to_wishlist", t.INITIATE_CHECKOUT = "initiate_checkout", t.LEAD = "lead", t.LOGIN = "login", t.PAGE_VIEW = "page_view", t.PURCHASE = "purchase", t.REFUND = "refund", t.SEARCH = "search", t.SIGN_UP = "sign_up", t.VIEW_CART = "view_cart", t.VIEW_CONTENT = "view_content", t.SELECT_SHIPPING_METHOD = "select_shipping_method", t.VIRTUALIZED_VIEWED_PAYMENT_FORM = "virtualized_viewd_payment_form", t.METRIC = "metric", t.WEB_VITAL = "web_vital", t))(x || {});
4124
- var C = ((r) => (r.TRACKING = "tracking", r.METRIC = "metric", r.IDENTIFY = "identify", r.LOG = "log", r))(C || {});
4125
-
4126
- // src/helpers/subscription-helper.ts
4127
- var StripeBillingMap = {
4128
- dev2: {
4129
- "free": "price_1JzjbKK7krGh4037ezNbGJEm",
4130
- "starter_monthly": "price_1JwzsGK7krGh4037Li0hPpsZ",
4131
- "starter_yearly": "price_1JwzsGK7krGh4037Li0hPpsZ",
4132
- "scale_monthly": "price_1JzjcSK7krGh4037yh34LPk3",
4133
- "scale_yearly": "price_1JzjcSK7krGh4037QiBJYfnD",
4134
- "growth_monthly": "price_1Jzje1K7krGh4037KErHBp5N",
4135
- "growth_yearly": "price_1Jzje1K7krGh4037MhCUhTDh"
4136
- },
4137
- qa2: {
4138
- "free": "price_1JzjbKK7krGh4037ezNbGJEm",
4139
- "starter_monthly": "price_1JwzsGK7krGh4037Li0hPpsZ",
4140
- "starter_yearly": "price_1JwzsGK7krGh4037Li0hPpsZ",
4141
- "scale_monthly": "price_1JzjcSK7krGh4037yh34LPk3",
4142
- "scale_yearly": "price_1JzjcSK7krGh4037QiBJYfnD",
4143
- "growth_monthly": "price_1Jzje1K7krGh4037KErHBp5N",
4144
- "growth_yearly": "price_1Jzje1K7krGh4037MhCUhTDh"
4145
- },
4146
- prod2: {
4147
- "free": "price_1KAFsIK7krGh4037RsaAYMEl",
4148
- "starter_monthly": "price_1KAFsMK7krGh4037Lz3P0ksU",
4149
- "starter_yearly": "price_1KAFsMK7krGh4037Dj1WmSi8",
4150
- "scale_monthly": "price_1KAFrxK7krGh4037zWCdaTly",
4151
- "scale_yearly": "price_1KAFrxK7krGh40375fhymyWP",
4152
- "growth_monthly": "price_1KAFs7K7krGh4037JChjz5Cr",
4153
- "growth_yearly": "price_1KAFs7K7krGh4037rZElg12s"
4154
- },
4155
- dev: {
4156
- "free": "price_1JzjbKK7krGh4037ezNbGJEm",
4157
- "starter_monthly": "price_1JwzsGK7krGh4037Li0hPpsZ",
4158
- "starter_yearly": "price_1JwzsGK7krGh4037Li0hPpsZ",
4159
- "scale_monthly": "price_1JzjcSK7krGh4037yh34LPk3",
4160
- "scale_yearly": "price_1JzjcSK7krGh4037QiBJYfnD",
4161
- "growth_monthly": "price_1Jzje1K7krGh4037KErHBp5N",
4162
- "growth_yearly": "price_1Jzje1K7krGh4037MhCUhTDh"
4163
- },
4164
- qa: {
4165
- "free": "price_1JzjbKK7krGh4037ezNbGJEm",
4166
- "starter_monthly": "price_1JwzsGK7krGh4037Li0hPpsZ",
4167
- "starter_yearly": "price_1JwzsGK7krGh4037Li0hPpsZ",
4168
- "scale_monthly": "price_1JzjcSK7krGh4037yh34LPk3",
4169
- "scale_yearly": "price_1JzjcSK7krGh4037QiBJYfnD",
4170
- "growth_monthly": "price_1Jzje1K7krGh4037KErHBp5N",
4171
- "growth_yearly": "price_1Jzje1K7krGh4037MhCUhTDh"
4172
- },
4173
- prod: {
4174
- "free": "price_1KAFsIK7krGh4037RsaAYMEl",
4175
- "starter_monthly": "price_1KAFsMK7krGh4037Lz3P0ksU",
4176
- "starter_yearly": "price_1KAFsMK7krGh4037Dj1WmSi8",
4177
- "scale_monthly": "price_1KAFrxK7krGh4037zWCdaTly",
4178
- "scale_yearly": "price_1KAFrxK7krGh40375fhymyWP",
4179
- "growth_monthly": "price_1KAFs7K7krGh4037JChjz5Cr",
4180
- "growth_yearly": "price_1KAFs7K7krGh4037rZElg12s"
4181
- }
4182
- };
4183
- var CommonPlanInfo = [
4184
- //'60-day Risk Free Trial',
4185
- "Free Server Side Tracking & Conversion API",
4186
- "MultiPixel Support (Multiple facebook, tiktok, etc)",
4187
- "Corrects Facebook Conversion Tracking post IOS14",
4188
- "Increase ROAS & Attribution Data",
4189
- "Enhanced Fingerprinting & Identity Resolution",
4190
- "Unlimited Integrations",
4191
- "Advanced Integrations (Webhooks, Custom JS/HTML, Hubspot)"
4192
- ];
4193
- var SubscriptionPlanSeedItems = {
4194
- items: [
4195
- {
4196
- id: 1,
4197
- planName: "free",
4198
- displayName: "Free",
4199
- sku: "ADT-001",
4200
- description: "Free Plan - Monthly",
4201
- price: "0",
4202
- displayPrice: "$0",
4203
- billingFrequency: f.MONTHLY,
4204
- trialLengthDays: 0,
4205
- trialRequiresCreditCard: false,
4206
- planDesc: [
4207
- ...CommonPlanInfo,
4208
- "Free Up to 500 orders/month (50,000 events)*"
4209
- ],
4210
- unitPriceText: "try now - free forever",
4211
- isHighlighted: false,
4212
- isBanner: false
4213
- },
4214
- // STARTER PLANS
4215
- {
4216
- id: 2,
4217
- planName: "starter_monthly",
4218
- displayName: "Starter",
4219
- sku: "ADT-002",
4220
- description: "Starter Plan - Monthly",
4221
- price: "79.99",
4222
- displayPrice: "$79.99",
4223
- billingFrequency: f.MONTHLY,
4224
- trialLengthDays: 60,
4225
- trialRequiresCreditCard: false,
4226
- planDesc: [
4227
- "60-day Risk Free Trial",
4228
- ...CommonPlanInfo,
4229
- "Up to 2,000 orders/month (250,000 events)*"
4230
- ],
4231
- isHighlighted: true,
4232
- isBanner: true,
4233
- bannerColor: "blue",
4234
- bannerText: "MOST POPULAR"
4235
- },
4236
- {
4237
- id: 3,
4238
- planName: "starter_yearly",
4239
- displayName: "Starter",
4240
- sku: "ADT-003",
4241
- description: "Starter Plan - Yearly",
4242
- price: "767.90",
4243
- displayPrice: "$63.99",
4244
- billingFrequency: f.YEARLY,
4245
- trialLengthDays: 30,
4246
- trialRequiresCreditCard: false,
4247
- planDesc: [
4248
- "60-day Risk Free Trial",
4249
- ...CommonPlanInfo,
4250
- "Up to 2,000 orders/month (250,000 events)*"
4251
- ],
4252
- unitPriceText: "billed yearly ($767.90) - 20% savings",
4253
- isHighlighted: true,
4254
- isBanner: true,
4255
- bannerColor: "blue",
4256
- bannerText: "MOST POPULAR"
4257
- },
4258
- // SCALE PLANS
4259
- {
4260
- id: 4,
4261
- planName: "scale_monthly",
4262
- displayName: "Scale",
4263
- sku: "ADT-004",
4264
- description: "Scale Plan - Monthly",
4265
- price: "199.99",
4266
- displayPrice: "$199.99",
4267
- billingFrequency: f.MONTHLY,
4268
- trialLengthDays: 60,
4269
- trialRequiresCreditCard: false,
4270
- planDesc: [
4271
- "60-day Risk Free Trial",
4272
- ...CommonPlanInfo,
4273
- "Up to 7,500 orders/month (750,000 events)*"
4274
- ],
4275
- unitPriceText: "",
4276
- isHighlighted: false,
4277
- isBanner: false
4278
- },
4279
- {
4280
- id: 5,
4281
- planName: "scale_yearly",
4282
- displayName: "Scale",
4283
- sku: "ADT-005",
4284
- description: "Scale Plan - Yearly",
4285
- price: "1823.91",
4286
- displayPrice: "$151.99",
4287
- billingFrequency: f.YEARLY,
4288
- trialLengthDays: 60,
4289
- trialRequiresCreditCard: false,
4290
- planDesc: [
4291
- "60-day Risk Free Trial",
4292
- ...CommonPlanInfo,
4293
- "Up to 7,500 orders/month (750,000 events)*"
4294
- ],
4295
- unitPriceText: "billed yearly ($1823.91) - 24% savings",
4296
- isHighlighted: false,
4297
- isBanner: false
4298
- }
4299
- // // GROWTH PLANS
4300
- // {
4301
- // id: 6,
4302
- // planName: 'growth_monthly',
4303
- // displayName: 'Growth',
4304
- // sku: 'ADT-006',
4305
- // description: 'Growth Plan - Monthly',
4306
- // price: '199.99',
4307
- // displayPrice: '$199.99',
4308
- // billingFrequency: PLAN_BILLING_FREQUENCY.MONTHLY,
4309
- // trialLengthDays: 60,
4310
- // trialRequiresCreditCard: false,
4311
- // planDesc: [
4312
- // '60-day Risk Free Trial',
4313
- // ...CommonPlanInfo,
4314
- // '250,000 tracking events/mo'
4315
- // ],
4316
- // unitPriceText: 'billed yearly ($540) - 25% savings',
4317
- // isHighlighted: false,
4318
- // isBanner: true,
4319
- // bannerColor: 'orange',
4320
- // bannerText: 'BEST VALUE'
4321
- // }, {
4322
- // id: 7,
4323
- // planName: 'growth_yearly',
4324
- // displayName: 'Growth',
4325
- // sku: 'ADT-007',
4326
- // description: 'Growth Plan - Yearly',
4327
- // price: '1799.91',
4328
- // displayPrice: '$149.99',
4329
- // billingFrequency: PLAN_BILLING_FREQUENCY.YEARLY,
4330
- // trialLengthDays: 60,
4331
- // trialRequiresCreditCard: false,
4332
- // planDesc: [
4333
- // '30-day Risk Free Trial',
4334
- // 'Fixes IOS14.5 tracking',
4335
- // 'Multi Pixel Support',
4336
- // 'Enhanced Tracking / Attribution',
4337
- // 'Unlimited Facebook Conversion API',
4338
- // 'Unlimited Integrations',
4339
- // 'Easy no code setup',
4340
- // '100,000 tracking events/mo'
4341
- // ],
4342
- // unitPriceText: 'billed yearly ($1799.91) - 25% savings',
4343
- // isHighlighted: false,
4344
- // isBanner: true,
4345
- // bannerColor: 'orange',
4346
- // bannerText: 'BEST VALUE'
4347
- // },
4348
- ]
4349
- };
4350
- var getPlanDetails = (planId, stage2) => {
4351
- const plan = SubscriptionPlanSeedItems.items.filter((x2) => x2.id === planId)[0];
4352
- plan.stripePriceId = StripeBillingMap[stage2][plan.planName];
4353
- return plan;
4354
- };
4355
- var getPlanByStripePriceId = (stripePriceId, stage2) => {
4356
- const stripePriceIds = StripeBillingMap[stage2];
4357
- const planName = Object.keys(stripePriceIds).find((key) => stripePriceIds[key] === stripePriceId);
4358
- const plan = SubscriptionPlanSeedItems.items.filter((x2) => x2.planName === planName)[0];
4359
- plan.stripePriceId = stripePriceId;
4360
- return plan;
4361
- };
4362
-
4363
- // src/helpers/traits-helper.ts
4364
- var getEmailArrayFromIdentity = (identity) => {
4365
- const emails = [identity?.traits?.email, ...identity?.traits?.addresses?.map((x2) => x2?.email) || []];
4366
- return emails;
4367
- };
4368
-
4369
- // src/helpers/utils.ts
4370
- var import_deep_equal = __toESM(require_deep_equal(), 1);
4371
- var getUniqueList = (values) => {
4372
- const uniqueList = [];
4373
- for (const val of values) {
4374
- if (uniqueList.findIndex((x2) => (0, import_deep_equal.default)(val, x2)) === -1) {
4375
- uniqueList.push(val);
4376
- }
4377
- }
4378
- return uniqueList;
4379
- };
4380
-
4381
- // src/libs/crypto.ts
4382
- import crypto from "crypto";
4383
- var generatePublicKey = () => {
4384
- const publicKey = crypto.randomBytes(26);
4385
- return publicKey.toString("utf8");
4386
- };
4387
-
4388
- // src/types/internal-events/event-detail-types.ts
4389
- var ADTRACKIFY_EVENT_TYPES = /* @__PURE__ */ ((ADTRACKIFY_EVENT_TYPES2) => {
4390
- ADTRACKIFY_EVENT_TYPES2["NOTIFY_SHOPIFY_SUBSCRIPTION_CREATED"] = "shopifySubscriptionCreated";
4391
- ADTRACKIFY_EVENT_TYPES2["NOTIFY_SUBSCRIPTION_SIGNUP_COMPLETED"] = "subscription.signupCompleted";
4392
- ADTRACKIFY_EVENT_TYPES2["REQUEST_SET_ACCOUNT_OWNER"] = "setAccountOwner";
4393
- ADTRACKIFY_EVENT_TYPES2["REQUEST_SET_ACCOUNT_SUBSCRIPTION_ID"] = "setAccountSubscriptionId";
4394
- return ADTRACKIFY_EVENT_TYPES2;
4395
- })(ADTRACKIFY_EVENT_TYPES || {});
4396
- var ADTRACKIFY_EVENT_SOURCES = /* @__PURE__ */ ((ADTRACKIFY_EVENT_SOURCES2) => {
4397
- ADTRACKIFY_EVENT_SOURCES2["SUBSCRIPTIONS"] = "subscriptions";
4398
- return ADTRACKIFY_EVENT_SOURCES2;
4399
- })(ADTRACKIFY_EVENT_SOURCES || {});
4400
- var PostmarkRequestType = /* @__PURE__ */ ((PostmarkRequestType2) => {
4401
- PostmarkRequestType2["SINGLE_EMAIL"] = "single_email";
4402
- PostmarkRequestType2["TEMPLATE_EMAIL"] = "template_email";
4403
- return PostmarkRequestType2;
4404
- })(PostmarkRequestType || {});
4405
- var ADTRACKIFY_EVENT_BRIDGE_EVENTS = /* @__PURE__ */ ((ADTRACKIFY_EVENT_BRIDGE_EVENTS2) => {
4406
- ADTRACKIFY_EVENT_BRIDGE_EVENTS2["SEND_POSTMARK_EMAIL"] = "integration.sendPostmarkEmail";
4407
- ADTRACKIFY_EVENT_BRIDGE_EVENTS2["NOTIFY_SHOPIFY_SUBSCRIPTION_CREATED"] = "shopifySubscriptionCreated";
4408
- ADTRACKIFY_EVENT_BRIDGE_EVENTS2["NOTIFY_SUBSCRIPTION_SIGNUP_COMPLETED"] = "subscription.signupCompleted";
4409
- ADTRACKIFY_EVENT_BRIDGE_EVENTS2["REQUEST_SET_ACCOUNT_OWNER"] = "setAccountOwner";
4410
- ADTRACKIFY_EVENT_BRIDGE_EVENTS2["REQUEST_SET_ACCOUNT_SUBSCRIPTION_ID"] = "setAccountSubscriptionId";
4411
- return ADTRACKIFY_EVENT_BRIDGE_EVENTS2;
4412
- })(ADTRACKIFY_EVENT_BRIDGE_EVENTS || {});
4413
-
4414
- // src/services/eventbridge-integration-service.ts
4415
- var EventBridgeIntegrationService = class {
4416
- eventBridgeClient;
4417
- EVENT_BUS_NAME;
4418
- constructor(eventBusName) {
4419
- this.eventBridgeClient = new EventBridgeClient(eventBusName);
4420
- this.EVENT_BUS_NAME = eventBusName;
4421
- }
4422
- sendPostmarkEmailEvent = async (eventSource, postmarkMessage, postmarkServerToken) => {
4423
- return await this.eventBridgeClient.buildAndSendEvent(
4424
- eventSource,
4425
- "integration.sendPostmarkEmail" /* SEND_POSTMARK_EMAIL */,
4426
- {
4427
- postmarkMessage,
4428
- postmarkRequestType: "single_email" /* SINGLE_EMAIL */,
4429
- postmarkServerToken
4430
- }
4431
- );
4432
- };
4433
- sendPostmarkTemplatedEmailEvent = async (eventSource, postmarkMessage, postmarkServerToken) => {
4434
- return await this.eventBridgeClient.buildAndSendEvent(
4435
- eventSource,
4436
- "integration.sendPostmarkEmail" /* SEND_POSTMARK_EMAIL */,
4437
- {
4438
- postmarkMessage,
4439
- postmarkRequestType: "template_email" /* TEMPLATE_EMAIL */,
4440
- postmarkServerToken
4441
- }
4442
- );
4443
- };
4444
- };
4445
- export {
4446
- ADTRACKIFY_EVENT_BRIDGE_EVENTS,
4447
- ADTRACKIFY_EVENT_SOURCES,
4448
- ADTRACKIFY_EVENT_TYPES,
4449
- AccountsClient,
4450
- CognitoClient,
4451
- CommonPlanInfo,
4452
- DestinationsClient,
4453
- DynamoDbClient,
4454
- EventBridgeClient,
4455
- EventBridgeIntegrationService,
4456
- HttpError,
4457
- HttpStatusCodes,
4458
- PostmarkRequestType,
4459
- S3Client,
4460
- SQSClient,
4461
- ShopifyAppInstallClient,
4462
- ShopifyClient,
4463
- StripeBillingMap,
4464
- SubscriptionPlanSeedItems,
4465
- UsersAuthClient,
4466
- axiosHttpService,
4467
- buildResponse,
4468
- configureLogger,
4469
- dictToAwsAttributes,
4470
- failure,
4471
- generatePublicKey,
4472
- getCurrentDate,
4473
- getCurrentTimestamp,
4474
- getDateFromTimestamp,
4475
- getEmailArrayFromIdentity,
4476
- getPlanByStripePriceId,
4477
- getPlanDetails,
4478
- getUniqueList,
4479
- isShopifyRequestValid,
4480
- mapObjectToQueryString,
4481
- success,
4482
- validateInput,
4483
- validateShopifyRequest
4484
- };
4485
- //# sourceMappingURL=index.esm.js.map