@bigbinary/neeto-playwright-commons 1.8.23 → 1.8.24

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.
package/index.cjs.js CHANGED
@@ -2,15 +2,15 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var test = require('@playwright/test');
5
+ var test$1 = require('@playwright/test');
6
6
  var require$$0$1 = require('fs');
7
+ var require$$0$2 = require('util');
7
8
  var ramda = require('ramda');
8
9
  var faker = require('@faker-js/faker');
9
10
  var MailosaurClient = require('mailosaur');
10
11
  var dayjs = require('dayjs');
11
12
  var require$$1 = require('tty');
12
- var require$$0$3 = require('util');
13
- var require$$0$2 = require('os');
13
+ var require$$0$3 = require('os');
14
14
  var require$$0$4 = require('path');
15
15
  var require$$0$5 = require('stream');
16
16
  var require$$0$6 = require('events');
@@ -38,14 +38,14 @@ function _interopNamespace(e) {
38
38
  return Object.freeze(n);
39
39
  }
40
40
 
41
- var test__default = /*#__PURE__*/_interopDefaultLegacy(test);
41
+ var test__default = /*#__PURE__*/_interopDefaultLegacy(test$1);
42
42
  var require$$0__namespace = /*#__PURE__*/_interopNamespace(require$$0$1);
43
43
  var require$$0__default$4 = /*#__PURE__*/_interopDefaultLegacy(require$$0$1);
44
+ var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0$2);
44
45
  var MailosaurClient__default = /*#__PURE__*/_interopDefaultLegacy(MailosaurClient);
45
46
  var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
46
47
  var require$$1__default = /*#__PURE__*/_interopDefaultLegacy(require$$1);
47
48
  var require$$0__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$0$3);
48
- var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0$2);
49
49
  var require$$0__default$2 = /*#__PURE__*/_interopDefaultLegacy(require$$0$4);
50
50
  var require$$0__default$3 = /*#__PURE__*/_interopDefaultLegacy(require$$0$5);
51
51
  var require$$0__default$5 = /*#__PURE__*/_interopDefaultLegacy(require$$0$6);
@@ -194,165 +194,6 @@ const COMMON_SELECTORS = {
194
194
  breadcrumbHeader: "header-breadcrumb",
195
195
  };
196
196
 
197
- class CustomCommands {
198
- constructor(page, request, baseURL = process.env.BASE_URL) {
199
- this.interceptMultipleResponses = ({ responseUrl = "", responseStatus = 200, times = 1, baseUrl, customPageContext, timeout = 35000, } = {}) => {
200
- const pageContext = customPageContext !== null && customPageContext !== void 0 ? customPageContext : this.page;
201
- return Promise.all([...new Array(times)].map(() => pageContext.waitForResponse((response) => {
202
- var _a, _b, _c;
203
- if (response.request().resourceType() === "xhr" &&
204
- response.status() === responseStatus &&
205
- response.url().includes(responseUrl) &&
206
- response.url().startsWith((_a = baseUrl !== null && baseUrl !== void 0 ? baseUrl : this.baseURL) !== null && _a !== void 0 ? _a : "") &&
207
- !this.responses.includes((_b = response.headers()) === null || _b === void 0 ? void 0 : _b["x-request-id"])) {
208
- this.responses.push((_c = response.headers()) === null || _c === void 0 ? void 0 : _c["x-request-id"]);
209
- return true;
210
- }
211
- return false;
212
- }, { timeout })));
213
- };
214
- this.recursiveMethod = async (callback, condition, timeout, startTime) => {
215
- if (Date.now() - timeout >= startTime) {
216
- return false;
217
- }
218
- else if (await condition()) {
219
- return await callback();
220
- }
221
- return await this.recursiveMethod(callback, condition, timeout, startTime);
222
- };
223
- this.executeRecursively = async ({ callback, condition, timeout = 5000, }) => {
224
- const startTime = Date.now();
225
- await this.recursiveMethod(callback, condition, timeout, startTime);
226
- };
227
- this.verifySuccessToast = async ({ message = "", closeAfterVerification = true, } = {}) => {
228
- if (!ramda.isEmpty(message)) {
229
- await test.expect(this.page.getByTestId(COMMON_SELECTORS.toastMessage)).toContainText(message);
230
- }
231
- else {
232
- await test.expect(this.page.locator(COMMON_SELECTORS.toastIcon)).toContainText("👍");
233
- }
234
- closeAfterVerification &&
235
- (await this.page.getByTestId(COMMON_SELECTORS.toastCloseButton).click());
236
- await test.expect(this.page.locator(COMMON_SELECTORS.toastIcon)).toBeHidden();
237
- };
238
- this.reloadAndWait = async (requestCount, customPageContext, interceptMultipleResponsesProps = {}) => {
239
- const pageContext = customPageContext !== null && customPageContext !== void 0 ? customPageContext : this.page;
240
- const reloadRequests = this.interceptMultipleResponses({
241
- times: requestCount,
242
- ...interceptMultipleResponsesProps,
243
- });
244
- await pageContext.reload();
245
- await reloadRequests;
246
- };
247
- this.apiRequest = async ({ url, failOnStatusCode = true, headers: additionalHeaders, body: data, method = "get", params = {}, ...otherOptions }) => {
248
- const csrfToken = await this.page
249
- .locator("[name='csrf-token']")
250
- .getAttribute("content");
251
- const requestOptions = {
252
- failOnStatusCode,
253
- headers: {
254
- ...additionalHeaders,
255
- "accept-encoding": "gzip",
256
- "x-csrf-token": csrfToken !== null && csrfToken !== void 0 ? csrfToken : "",
257
- },
258
- data,
259
- params,
260
- ...otherOptions,
261
- };
262
- const httpMethodsHandlers = {
263
- get: () => this.request.get(url, requestOptions),
264
- patch: () => this.request.patch(url, requestOptions),
265
- post: () => this.request.post(url, requestOptions),
266
- put: () => this.request.put(url, requestOptions),
267
- delete: () => this.request.delete(url, requestOptions),
268
- };
269
- return await httpMethodsHandlers[method]();
270
- };
271
- this.verifyFieldValue = values => {
272
- const verifyEachFieldValue = ({ field, value, }) => test.expect(this.page.getByTestId(field)).toHaveValue(value);
273
- return Array.isArray(values)
274
- ? Promise.all(values.map(value => verifyEachFieldValue(value)))
275
- : verifyEachFieldValue(values);
276
- };
277
- this.page = page;
278
- this.responses = [];
279
- this.request = request;
280
- this.baseURL = baseURL;
281
- }
282
- }
283
-
284
- class MailosaurUtils {
285
- constructor(mailosaur) {
286
- this.fetchOtpFromEmail = async ({ email, subjectSubstring = OTP_EMAIL_PATTERN, timeout = 2 * 60 * 1000, receivedAfter = new Date(), }) => {
287
- var _a, _b, _c;
288
- const receivedEmail = await this.mailosaur.messages.get(this.serverId, { sentTo: email, subject: subjectSubstring }, { timeout, receivedAfter });
289
- const otp = (_c = (_b = (_a = receivedEmail === null || receivedEmail === void 0 ? void 0 : receivedEmail.text) === null || _a === void 0 ? void 0 : _a.codes) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.value;
290
- if (ramda.isNil(otp)) {
291
- throw new Error(`No codes found in the email with subject: ${receivedEmail.subject}. Please re-evaluate the filtering parameters.`);
292
- }
293
- return otp;
294
- };
295
- this.generateRandomMailosaurEmail = () => faker.faker.internet.email({ provider: `${this.serverId}.mailosaur.net` });
296
- this.mailosaur = mailosaur;
297
- if (ramda.isNotNil(process.env.MAILOSAUR_SERVER_ID)) {
298
- this.serverId = process.env.MAILOSAUR_SERVER_ID;
299
- }
300
- else {
301
- throw new Error("ENV variable MAILOSAUR_SERVER_ID is not defined. Please add the Server ID to use this method. Please visit https://mailosaur.com/app/servers to find the Server ID.");
302
- }
303
- }
304
- }
305
-
306
- const commands = {
307
- neetoPlaywrightUtilities: async ({ page, request, baseURL }, use) => {
308
- const commands = new CustomCommands(page, request, baseURL);
309
- await use(commands);
310
- },
311
- mailosaur: async ({}, use) => {
312
- skipTest.forAllExceptStagingEnv();
313
- if (ramda.isNotNil(process.env.MAILOSAUR_API_KEY)) {
314
- const mailosaur = new MailosaurClient__default["default"](process.env.MAILOSAUR_API_KEY);
315
- await use(mailosaur);
316
- }
317
- else {
318
- throw new Error("ENV variable MAILOSAUR_API_KEY is not defined. Please add the API key to use this fixture. Please visit https://mailosaur.com/app/account/keys to find the API key.");
319
- }
320
- },
321
- page: async ({ page }, use) => {
322
- await page.goto("/");
323
- await page.waitForLoadState();
324
- await use(page);
325
- },
326
- mailosaurUtils: async ({ mailosaur }, use) => {
327
- skipTest.forAllExceptStagingEnv();
328
- const mailosaurUtils = new MailosaurUtils(mailosaur);
329
- await use(mailosaurUtils);
330
- },
331
- };
332
-
333
- const generateStagingData = (product = "invoice") => {
334
- var _a;
335
- const timestamp = `${dayjs__default["default"]().format("MMDDHHmmssSSS")}${(_a = process.env.JOB_COMPLETION_INDEX) !== null && _a !== void 0 ? _a : ""}`;
336
- const firstName = "André";
337
- const lastName = "O'Reilly";
338
- const otpBypassKey = process.env.OTP_BYPASS_KEY;
339
- const stagingOrganization = `cpt-${product}-${timestamp}`;
340
- return {
341
- firstName,
342
- lastName,
343
- otp: 111111,
344
- domain: `neeto${product}.net`,
345
- currentUserName: IS_STAGING_ENV
346
- ? joinString(firstName, lastName)
347
- : CREDENTIALS.name,
348
- businessName: stagingOrganization,
349
- subdomainName: IS_STAGING_ENV ? stagingOrganization : "spinkart",
350
- email: IS_STAGING_ENV
351
- ? `cpt${otpBypassKey}+${product}+${timestamp}@bigbinary.com`
352
- : CREDENTIALS.email,
353
- };
354
- };
355
-
356
197
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
357
198
 
358
199
  function getDefaultExportFromCjs (x) {
@@ -380,6 +221,2400 @@ function getAugmentedNamespace(n) {
380
221
  return a;
381
222
  }
382
223
 
224
+ /* eslint complexity: [2, 18], max-statements: [2, 33] */
225
+ var shams = function hasSymbols() {
226
+ if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
227
+ if (typeof Symbol.iterator === 'symbol') { return true; }
228
+
229
+ var obj = {};
230
+ var sym = Symbol('test');
231
+ var symObj = Object(sym);
232
+ if (typeof sym === 'string') { return false; }
233
+
234
+ if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
235
+ if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
236
+
237
+ // temp disabled per https://github.com/ljharb/object.assign/issues/17
238
+ // if (sym instanceof Symbol) { return false; }
239
+ // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
240
+ // if (!(symObj instanceof Symbol)) { return false; }
241
+
242
+ // if (typeof Symbol.prototype.toString !== 'function') { return false; }
243
+ // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
244
+
245
+ var symVal = 42;
246
+ obj[sym] = symVal;
247
+ for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
248
+ if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
249
+
250
+ if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
251
+
252
+ var syms = Object.getOwnPropertySymbols(obj);
253
+ if (syms.length !== 1 || syms[0] !== sym) { return false; }
254
+
255
+ if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
256
+
257
+ if (typeof Object.getOwnPropertyDescriptor === 'function') {
258
+ var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
259
+ if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
260
+ }
261
+
262
+ return true;
263
+ };
264
+
265
+ var origSymbol = typeof Symbol !== 'undefined' && Symbol;
266
+ var hasSymbolSham = shams;
267
+
268
+ var hasSymbols$1 = function hasNativeSymbols() {
269
+ if (typeof origSymbol !== 'function') { return false; }
270
+ if (typeof Symbol !== 'function') { return false; }
271
+ if (typeof origSymbol('foo') !== 'symbol') { return false; }
272
+ if (typeof Symbol('bar') !== 'symbol') { return false; }
273
+
274
+ return hasSymbolSham();
275
+ };
276
+
277
+ var test = {
278
+ foo: {}
279
+ };
280
+
281
+ var $Object = Object;
282
+
283
+ var hasProto$1 = function hasProto() {
284
+ return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);
285
+ };
286
+
287
+ /* eslint no-invalid-this: 1 */
288
+
289
+ var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
290
+ var toStr$1 = Object.prototype.toString;
291
+ var max = Math.max;
292
+ var funcType = '[object Function]';
293
+
294
+ var concatty = function concatty(a, b) {
295
+ var arr = [];
296
+
297
+ for (var i = 0; i < a.length; i += 1) {
298
+ arr[i] = a[i];
299
+ }
300
+ for (var j = 0; j < b.length; j += 1) {
301
+ arr[j + a.length] = b[j];
302
+ }
303
+
304
+ return arr;
305
+ };
306
+
307
+ var slicy = function slicy(arrLike, offset) {
308
+ var arr = [];
309
+ for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
310
+ arr[j] = arrLike[i];
311
+ }
312
+ return arr;
313
+ };
314
+
315
+ var joiny = function (arr, joiner) {
316
+ var str = '';
317
+ for (var i = 0; i < arr.length; i += 1) {
318
+ str += arr[i];
319
+ if (i + 1 < arr.length) {
320
+ str += joiner;
321
+ }
322
+ }
323
+ return str;
324
+ };
325
+
326
+ var implementation$1 = function bind(that) {
327
+ var target = this;
328
+ if (typeof target !== 'function' || toStr$1.apply(target) !== funcType) {
329
+ throw new TypeError(ERROR_MESSAGE + target);
330
+ }
331
+ var args = slicy(arguments, 1);
332
+
333
+ var bound;
334
+ var binder = function () {
335
+ if (this instanceof bound) {
336
+ var result = target.apply(
337
+ this,
338
+ concatty(args, arguments)
339
+ );
340
+ if (Object(result) === result) {
341
+ return result;
342
+ }
343
+ return this;
344
+ }
345
+ return target.apply(
346
+ that,
347
+ concatty(args, arguments)
348
+ );
349
+
350
+ };
351
+
352
+ var boundLength = max(0, target.length - args.length);
353
+ var boundArgs = [];
354
+ for (var i = 0; i < boundLength; i++) {
355
+ boundArgs[i] = '$' + i;
356
+ }
357
+
358
+ bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
359
+
360
+ if (target.prototype) {
361
+ var Empty = function Empty() {};
362
+ Empty.prototype = target.prototype;
363
+ bound.prototype = new Empty();
364
+ Empty.prototype = null;
365
+ }
366
+
367
+ return bound;
368
+ };
369
+
370
+ var implementation = implementation$1;
371
+
372
+ var functionBind = Function.prototype.bind || implementation;
373
+
374
+ var call = Function.prototype.call;
375
+ var $hasOwn = Object.prototype.hasOwnProperty;
376
+ var bind$1 = functionBind;
377
+
378
+ /** @type {(o: {}, p: PropertyKey) => p is keyof o} */
379
+ var hasown = bind$1.call(call, $hasOwn);
380
+
381
+ var undefined$1;
382
+
383
+ var $SyntaxError$1 = SyntaxError;
384
+ var $Function = Function;
385
+ var $TypeError$3 = TypeError;
386
+
387
+ // eslint-disable-next-line consistent-return
388
+ var getEvalledConstructor = function (expressionSyntax) {
389
+ try {
390
+ return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
391
+ } catch (e) {}
392
+ };
393
+
394
+ var $gOPD$1 = Object.getOwnPropertyDescriptor;
395
+ if ($gOPD$1) {
396
+ try {
397
+ $gOPD$1({}, '');
398
+ } catch (e) {
399
+ $gOPD$1 = null; // this is IE 8, which has a broken gOPD
400
+ }
401
+ }
402
+
403
+ var throwTypeError = function () {
404
+ throw new $TypeError$3();
405
+ };
406
+ var ThrowTypeError = $gOPD$1
407
+ ? (function () {
408
+ try {
409
+ // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
410
+ arguments.callee; // IE 8 does not throw here
411
+ return throwTypeError;
412
+ } catch (calleeThrows) {
413
+ try {
414
+ // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
415
+ return $gOPD$1(arguments, 'callee').get;
416
+ } catch (gOPDthrows) {
417
+ return throwTypeError;
418
+ }
419
+ }
420
+ }())
421
+ : throwTypeError;
422
+
423
+ var hasSymbols = hasSymbols$1();
424
+ var hasProto = hasProto$1();
425
+
426
+ var getProto = Object.getPrototypeOf || (
427
+ hasProto
428
+ ? function (x) { return x.__proto__; } // eslint-disable-line no-proto
429
+ : null
430
+ );
431
+
432
+ var needsEval = {};
433
+
434
+ var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined$1 : getProto(Uint8Array);
435
+
436
+ var INTRINSICS = {
437
+ '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
438
+ '%Array%': Array,
439
+ '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
440
+ '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined$1,
441
+ '%AsyncFromSyncIteratorPrototype%': undefined$1,
442
+ '%AsyncFunction%': needsEval,
443
+ '%AsyncGenerator%': needsEval,
444
+ '%AsyncGeneratorFunction%': needsEval,
445
+ '%AsyncIteratorPrototype%': needsEval,
446
+ '%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
447
+ '%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
448
+ '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$1 : BigInt64Array,
449
+ '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$1 : BigUint64Array,
450
+ '%Boolean%': Boolean,
451
+ '%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
452
+ '%Date%': Date,
453
+ '%decodeURI%': decodeURI,
454
+ '%decodeURIComponent%': decodeURIComponent,
455
+ '%encodeURI%': encodeURI,
456
+ '%encodeURIComponent%': encodeURIComponent,
457
+ '%Error%': Error,
458
+ '%eval%': eval, // eslint-disable-line no-eval
459
+ '%EvalError%': EvalError,
460
+ '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
461
+ '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
462
+ '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
463
+ '%Function%': $Function,
464
+ '%GeneratorFunction%': needsEval,
465
+ '%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
466
+ '%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
467
+ '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
468
+ '%isFinite%': isFinite,
469
+ '%isNaN%': isNaN,
470
+ '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
471
+ '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
472
+ '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
473
+ '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
474
+ '%Math%': Math,
475
+ '%Number%': Number,
476
+ '%Object%': Object,
477
+ '%parseFloat%': parseFloat,
478
+ '%parseInt%': parseInt,
479
+ '%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
480
+ '%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
481
+ '%RangeError%': RangeError,
482
+ '%ReferenceError%': ReferenceError,
483
+ '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
484
+ '%RegExp%': RegExp,
485
+ '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
486
+ '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
487
+ '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
488
+ '%String%': String,
489
+ '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined$1,
490
+ '%Symbol%': hasSymbols ? Symbol : undefined$1,
491
+ '%SyntaxError%': $SyntaxError$1,
492
+ '%ThrowTypeError%': ThrowTypeError,
493
+ '%TypedArray%': TypedArray,
494
+ '%TypeError%': $TypeError$3,
495
+ '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
496
+ '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
497
+ '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
498
+ '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
499
+ '%URIError%': URIError,
500
+ '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
501
+ '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
502
+ '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
503
+ };
504
+
505
+ if (getProto) {
506
+ try {
507
+ null.error; // eslint-disable-line no-unused-expressions
508
+ } catch (e) {
509
+ // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
510
+ var errorProto = getProto(getProto(e));
511
+ INTRINSICS['%Error.prototype%'] = errorProto;
512
+ }
513
+ }
514
+
515
+ var doEval = function doEval(name) {
516
+ var value;
517
+ if (name === '%AsyncFunction%') {
518
+ value = getEvalledConstructor('async function () {}');
519
+ } else if (name === '%GeneratorFunction%') {
520
+ value = getEvalledConstructor('function* () {}');
521
+ } else if (name === '%AsyncGeneratorFunction%') {
522
+ value = getEvalledConstructor('async function* () {}');
523
+ } else if (name === '%AsyncGenerator%') {
524
+ var fn = doEval('%AsyncGeneratorFunction%');
525
+ if (fn) {
526
+ value = fn.prototype;
527
+ }
528
+ } else if (name === '%AsyncIteratorPrototype%') {
529
+ var gen = doEval('%AsyncGenerator%');
530
+ if (gen && getProto) {
531
+ value = getProto(gen.prototype);
532
+ }
533
+ }
534
+
535
+ INTRINSICS[name] = value;
536
+
537
+ return value;
538
+ };
539
+
540
+ var LEGACY_ALIASES = {
541
+ '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
542
+ '%ArrayPrototype%': ['Array', 'prototype'],
543
+ '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
544
+ '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
545
+ '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
546
+ '%ArrayProto_values%': ['Array', 'prototype', 'values'],
547
+ '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
548
+ '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
549
+ '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
550
+ '%BooleanPrototype%': ['Boolean', 'prototype'],
551
+ '%DataViewPrototype%': ['DataView', 'prototype'],
552
+ '%DatePrototype%': ['Date', 'prototype'],
553
+ '%ErrorPrototype%': ['Error', 'prototype'],
554
+ '%EvalErrorPrototype%': ['EvalError', 'prototype'],
555
+ '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
556
+ '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
557
+ '%FunctionPrototype%': ['Function', 'prototype'],
558
+ '%Generator%': ['GeneratorFunction', 'prototype'],
559
+ '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
560
+ '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
561
+ '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
562
+ '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
563
+ '%JSONParse%': ['JSON', 'parse'],
564
+ '%JSONStringify%': ['JSON', 'stringify'],
565
+ '%MapPrototype%': ['Map', 'prototype'],
566
+ '%NumberPrototype%': ['Number', 'prototype'],
567
+ '%ObjectPrototype%': ['Object', 'prototype'],
568
+ '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
569
+ '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
570
+ '%PromisePrototype%': ['Promise', 'prototype'],
571
+ '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
572
+ '%Promise_all%': ['Promise', 'all'],
573
+ '%Promise_reject%': ['Promise', 'reject'],
574
+ '%Promise_resolve%': ['Promise', 'resolve'],
575
+ '%RangeErrorPrototype%': ['RangeError', 'prototype'],
576
+ '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
577
+ '%RegExpPrototype%': ['RegExp', 'prototype'],
578
+ '%SetPrototype%': ['Set', 'prototype'],
579
+ '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
580
+ '%StringPrototype%': ['String', 'prototype'],
581
+ '%SymbolPrototype%': ['Symbol', 'prototype'],
582
+ '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
583
+ '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
584
+ '%TypeErrorPrototype%': ['TypeError', 'prototype'],
585
+ '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
586
+ '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
587
+ '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
588
+ '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
589
+ '%URIErrorPrototype%': ['URIError', 'prototype'],
590
+ '%WeakMapPrototype%': ['WeakMap', 'prototype'],
591
+ '%WeakSetPrototype%': ['WeakSet', 'prototype']
592
+ };
593
+
594
+ var bind = functionBind;
595
+ var hasOwn$1 = hasown;
596
+ var $concat$1 = bind.call(Function.call, Array.prototype.concat);
597
+ var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
598
+ var $replace$1 = bind.call(Function.call, String.prototype.replace);
599
+ var $strSlice = bind.call(Function.call, String.prototype.slice);
600
+ var $exec = bind.call(Function.call, RegExp.prototype.exec);
601
+
602
+ /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
603
+ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
604
+ var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
605
+ var stringToPath = function stringToPath(string) {
606
+ var first = $strSlice(string, 0, 1);
607
+ var last = $strSlice(string, -1);
608
+ if (first === '%' && last !== '%') {
609
+ throw new $SyntaxError$1('invalid intrinsic syntax, expected closing `%`');
610
+ } else if (last === '%' && first !== '%') {
611
+ throw new $SyntaxError$1('invalid intrinsic syntax, expected opening `%`');
612
+ }
613
+ var result = [];
614
+ $replace$1(string, rePropName, function (match, number, quote, subString) {
615
+ result[result.length] = quote ? $replace$1(subString, reEscapeChar, '$1') : number || match;
616
+ });
617
+ return result;
618
+ };
619
+ /* end adaptation */
620
+
621
+ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
622
+ var intrinsicName = name;
623
+ var alias;
624
+ if (hasOwn$1(LEGACY_ALIASES, intrinsicName)) {
625
+ alias = LEGACY_ALIASES[intrinsicName];
626
+ intrinsicName = '%' + alias[0] + '%';
627
+ }
628
+
629
+ if (hasOwn$1(INTRINSICS, intrinsicName)) {
630
+ var value = INTRINSICS[intrinsicName];
631
+ if (value === needsEval) {
632
+ value = doEval(intrinsicName);
633
+ }
634
+ if (typeof value === 'undefined' && !allowMissing) {
635
+ throw new $TypeError$3('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
636
+ }
637
+
638
+ return {
639
+ alias: alias,
640
+ name: intrinsicName,
641
+ value: value
642
+ };
643
+ }
644
+
645
+ throw new $SyntaxError$1('intrinsic ' + name + ' does not exist!');
646
+ };
647
+
648
+ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
649
+ if (typeof name !== 'string' || name.length === 0) {
650
+ throw new $TypeError$3('intrinsic name must be a non-empty string');
651
+ }
652
+ if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
653
+ throw new $TypeError$3('"allowMissing" argument must be a boolean');
654
+ }
655
+
656
+ if ($exec(/^%?[^%]*%?$/, name) === null) {
657
+ throw new $SyntaxError$1('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
658
+ }
659
+ var parts = stringToPath(name);
660
+ var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
661
+
662
+ var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
663
+ var intrinsicRealName = intrinsic.name;
664
+ var value = intrinsic.value;
665
+ var skipFurtherCaching = false;
666
+
667
+ var alias = intrinsic.alias;
668
+ if (alias) {
669
+ intrinsicBaseName = alias[0];
670
+ $spliceApply(parts, $concat$1([0, 1], alias));
671
+ }
672
+
673
+ for (var i = 1, isOwn = true; i < parts.length; i += 1) {
674
+ var part = parts[i];
675
+ var first = $strSlice(part, 0, 1);
676
+ var last = $strSlice(part, -1);
677
+ if (
678
+ (
679
+ (first === '"' || first === "'" || first === '`')
680
+ || (last === '"' || last === "'" || last === '`')
681
+ )
682
+ && first !== last
683
+ ) {
684
+ throw new $SyntaxError$1('property names with quotes must have matching quotes');
685
+ }
686
+ if (part === 'constructor' || !isOwn) {
687
+ skipFurtherCaching = true;
688
+ }
689
+
690
+ intrinsicBaseName += '.' + part;
691
+ intrinsicRealName = '%' + intrinsicBaseName + '%';
692
+
693
+ if (hasOwn$1(INTRINSICS, intrinsicRealName)) {
694
+ value = INTRINSICS[intrinsicRealName];
695
+ } else if (value != null) {
696
+ if (!(part in value)) {
697
+ if (!allowMissing) {
698
+ throw new $TypeError$3('base intrinsic for ' + name + ' exists, but the property is not available.');
699
+ }
700
+ return void undefined$1;
701
+ }
702
+ if ($gOPD$1 && (i + 1) >= parts.length) {
703
+ var desc = $gOPD$1(value, part);
704
+ isOwn = !!desc;
705
+
706
+ // By convention, when a data property is converted to an accessor
707
+ // property to emulate a data property that does not suffer from
708
+ // the override mistake, that accessor's getter is marked with
709
+ // an `originalValue` property. Here, when we detect this, we
710
+ // uphold the illusion by pretending to see that original data
711
+ // property, i.e., returning the value rather than the getter
712
+ // itself.
713
+ if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
714
+ value = desc.get;
715
+ } else {
716
+ value = value[part];
717
+ }
718
+ } else {
719
+ isOwn = hasOwn$1(value, part);
720
+ value = value[part];
721
+ }
722
+
723
+ if (isOwn && !skipFurtherCaching) {
724
+ INTRINSICS[intrinsicRealName] = value;
725
+ }
726
+ }
727
+ }
728
+ return value;
729
+ };
730
+
731
+ var callBind$1 = {exports: {}};
732
+
733
+ var GetIntrinsic$5 = getIntrinsic;
734
+
735
+ var $defineProperty$1 = GetIntrinsic$5('%Object.defineProperty%', true);
736
+
737
+ var hasPropertyDescriptors$1 = function hasPropertyDescriptors() {
738
+ if ($defineProperty$1) {
739
+ try {
740
+ $defineProperty$1({}, 'a', { value: 1 });
741
+ return true;
742
+ } catch (e) {
743
+ // IE 8 has a broken defineProperty
744
+ return false;
745
+ }
746
+ }
747
+ return false;
748
+ };
749
+
750
+ hasPropertyDescriptors$1.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
751
+ // node v0.6 has a bug where array lengths can be Set but not Defined
752
+ if (!hasPropertyDescriptors$1()) {
753
+ return null;
754
+ }
755
+ try {
756
+ return $defineProperty$1([], 'length', { value: 1 }).length !== 1;
757
+ } catch (e) {
758
+ // In Firefox 4-22, defining length on an array throws an exception.
759
+ return true;
760
+ }
761
+ };
762
+
763
+ var hasPropertyDescriptors_1 = hasPropertyDescriptors$1;
764
+
765
+ var GetIntrinsic$4 = getIntrinsic;
766
+
767
+ var $gOPD = GetIntrinsic$4('%Object.getOwnPropertyDescriptor%', true);
768
+
769
+ if ($gOPD) {
770
+ try {
771
+ $gOPD([], 'length');
772
+ } catch (e) {
773
+ // IE 8 has a broken gOPD
774
+ $gOPD = null;
775
+ }
776
+ }
777
+
778
+ var gopd$1 = $gOPD;
779
+
780
+ var hasPropertyDescriptors = hasPropertyDescriptors_1();
781
+
782
+ var GetIntrinsic$3 = getIntrinsic;
783
+
784
+ var $defineProperty = hasPropertyDescriptors && GetIntrinsic$3('%Object.defineProperty%', true);
785
+ if ($defineProperty) {
786
+ try {
787
+ $defineProperty({}, 'a', { value: 1 });
788
+ } catch (e) {
789
+ // IE 8 has a broken defineProperty
790
+ $defineProperty = false;
791
+ }
792
+ }
793
+
794
+ var $SyntaxError = GetIntrinsic$3('%SyntaxError%');
795
+ var $TypeError$2 = GetIntrinsic$3('%TypeError%');
796
+
797
+ var gopd = gopd$1;
798
+
799
+ /** @type {(obj: Record<PropertyKey, unknown>, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */
800
+ var defineDataProperty = function defineDataProperty(
801
+ obj,
802
+ property,
803
+ value
804
+ ) {
805
+ if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
806
+ throw new $TypeError$2('`obj` must be an object or a function`');
807
+ }
808
+ if (typeof property !== 'string' && typeof property !== 'symbol') {
809
+ throw new $TypeError$2('`property` must be a string or a symbol`');
810
+ }
811
+ if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
812
+ throw new $TypeError$2('`nonEnumerable`, if provided, must be a boolean or null');
813
+ }
814
+ if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
815
+ throw new $TypeError$2('`nonWritable`, if provided, must be a boolean or null');
816
+ }
817
+ if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
818
+ throw new $TypeError$2('`nonConfigurable`, if provided, must be a boolean or null');
819
+ }
820
+ if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
821
+ throw new $TypeError$2('`loose`, if provided, must be a boolean');
822
+ }
823
+
824
+ var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
825
+ var nonWritable = arguments.length > 4 ? arguments[4] : null;
826
+ var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
827
+ var loose = arguments.length > 6 ? arguments[6] : false;
828
+
829
+ /* @type {false | TypedPropertyDescriptor<unknown>} */
830
+ var desc = !!gopd && gopd(obj, property);
831
+
832
+ if ($defineProperty) {
833
+ $defineProperty(obj, property, {
834
+ configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
835
+ enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
836
+ value: value,
837
+ writable: nonWritable === null && desc ? desc.writable : !nonWritable
838
+ });
839
+ } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
840
+ // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
841
+ obj[property] = value; // eslint-disable-line no-param-reassign
842
+ } else {
843
+ throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
844
+ }
845
+ };
846
+
847
+ var GetIntrinsic$2 = getIntrinsic;
848
+ var define = defineDataProperty;
849
+ var hasDescriptors = hasPropertyDescriptors_1();
850
+ var gOPD = gopd$1;
851
+
852
+ var $TypeError$1 = GetIntrinsic$2('%TypeError%');
853
+ var $floor$1 = GetIntrinsic$2('%Math.floor%');
854
+
855
+ var setFunctionLength = function setFunctionLength(fn, length) {
856
+ if (typeof fn !== 'function') {
857
+ throw new $TypeError$1('`fn` is not a function');
858
+ }
859
+ if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor$1(length) !== length) {
860
+ throw new $TypeError$1('`length` must be a positive 32-bit integer');
861
+ }
862
+
863
+ var loose = arguments.length > 2 && !!arguments[2];
864
+
865
+ var functionLengthIsConfigurable = true;
866
+ var functionLengthIsWritable = true;
867
+ if ('length' in fn && gOPD) {
868
+ var desc = gOPD(fn, 'length');
869
+ if (desc && !desc.configurable) {
870
+ functionLengthIsConfigurable = false;
871
+ }
872
+ if (desc && !desc.writable) {
873
+ functionLengthIsWritable = false;
874
+ }
875
+ }
876
+
877
+ if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
878
+ if (hasDescriptors) {
879
+ define(fn, 'length', length, true, true);
880
+ } else {
881
+ define(fn, 'length', length);
882
+ }
883
+ }
884
+ return fn;
885
+ };
886
+
887
+ (function (module) {
888
+
889
+ var bind = functionBind;
890
+ var GetIntrinsic = getIntrinsic;
891
+ var setFunctionLength$1 = setFunctionLength;
892
+
893
+ var $TypeError = GetIntrinsic('%TypeError%');
894
+ var $apply = GetIntrinsic('%Function.prototype.apply%');
895
+ var $call = GetIntrinsic('%Function.prototype.call%');
896
+ var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
897
+
898
+ var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
899
+ var $max = GetIntrinsic('%Math.max%');
900
+
901
+ if ($defineProperty) {
902
+ try {
903
+ $defineProperty({}, 'a', { value: 1 });
904
+ } catch (e) {
905
+ // IE 8 has a broken defineProperty
906
+ $defineProperty = null;
907
+ }
908
+ }
909
+
910
+ module.exports = function callBind(originalFunction) {
911
+ if (typeof originalFunction !== 'function') {
912
+ throw new $TypeError('a function is required');
913
+ }
914
+ var func = $reflectApply(bind, $call, arguments);
915
+ return setFunctionLength$1(
916
+ func,
917
+ 1 + $max(0, originalFunction.length - (arguments.length - 1)),
918
+ true
919
+ );
920
+ };
921
+
922
+ var applyBind = function applyBind() {
923
+ return $reflectApply(bind, $apply, arguments);
924
+ };
925
+
926
+ if ($defineProperty) {
927
+ $defineProperty(module.exports, 'apply', { value: applyBind });
928
+ } else {
929
+ module.exports.apply = applyBind;
930
+ }
931
+ } (callBind$1));
932
+
933
+ var GetIntrinsic$1 = getIntrinsic;
934
+
935
+ var callBind = callBind$1.exports;
936
+
937
+ var $indexOf = callBind(GetIntrinsic$1('String.prototype.indexOf'));
938
+
939
+ var callBound$1 = function callBoundIntrinsic(name, allowMissing) {
940
+ var intrinsic = GetIntrinsic$1(name, !!allowMissing);
941
+ if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
942
+ return callBind(intrinsic);
943
+ }
944
+ return intrinsic;
945
+ };
946
+
947
+ var util_inspect = require$$0__default["default"].inspect;
948
+
949
+ var hasMap = typeof Map === 'function' && Map.prototype;
950
+ var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
951
+ var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
952
+ var mapForEach = hasMap && Map.prototype.forEach;
953
+ var hasSet = typeof Set === 'function' && Set.prototype;
954
+ var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
955
+ var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
956
+ var setForEach = hasSet && Set.prototype.forEach;
957
+ var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
958
+ var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
959
+ var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
960
+ var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
961
+ var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
962
+ var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
963
+ var booleanValueOf = Boolean.prototype.valueOf;
964
+ var objectToString = Object.prototype.toString;
965
+ var functionToString = Function.prototype.toString;
966
+ var $match = String.prototype.match;
967
+ var $slice = String.prototype.slice;
968
+ var $replace = String.prototype.replace;
969
+ var $toUpperCase = String.prototype.toUpperCase;
970
+ var $toLowerCase = String.prototype.toLowerCase;
971
+ var $test = RegExp.prototype.test;
972
+ var $concat = Array.prototype.concat;
973
+ var $join = Array.prototype.join;
974
+ var $arrSlice = Array.prototype.slice;
975
+ var $floor = Math.floor;
976
+ var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
977
+ var gOPS = Object.getOwnPropertySymbols;
978
+ var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
979
+ var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
980
+ // ie, `has-tostringtag/shams
981
+ var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
982
+ ? Symbol.toStringTag
983
+ : null;
984
+ var isEnumerable = Object.prototype.propertyIsEnumerable;
985
+
986
+ var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
987
+ [].__proto__ === Array.prototype // eslint-disable-line no-proto
988
+ ? function (O) {
989
+ return O.__proto__; // eslint-disable-line no-proto
990
+ }
991
+ : null
992
+ );
993
+
994
+ function addNumericSeparator(num, str) {
995
+ if (
996
+ num === Infinity
997
+ || num === -Infinity
998
+ || num !== num
999
+ || (num && num > -1000 && num < 1000)
1000
+ || $test.call(/e/, str)
1001
+ ) {
1002
+ return str;
1003
+ }
1004
+ var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
1005
+ if (typeof num === 'number') {
1006
+ var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
1007
+ if (int !== num) {
1008
+ var intStr = String(int);
1009
+ var dec = $slice.call(str, intStr.length + 1);
1010
+ return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
1011
+ }
1012
+ }
1013
+ return $replace.call(str, sepRegex, '$&_');
1014
+ }
1015
+
1016
+ var utilInspect = util_inspect;
1017
+ var inspectCustom = utilInspect.custom;
1018
+ var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
1019
+
1020
+ var objectInspect = function inspect_(obj, options, depth, seen) {
1021
+ var opts = options || {};
1022
+
1023
+ if (has$3(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
1024
+ throw new TypeError('option "quoteStyle" must be "single" or "double"');
1025
+ }
1026
+ if (
1027
+ has$3(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
1028
+ ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
1029
+ : opts.maxStringLength !== null
1030
+ )
1031
+ ) {
1032
+ throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
1033
+ }
1034
+ var customInspect = has$3(opts, 'customInspect') ? opts.customInspect : true;
1035
+ if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
1036
+ throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
1037
+ }
1038
+
1039
+ if (
1040
+ has$3(opts, 'indent')
1041
+ && opts.indent !== null
1042
+ && opts.indent !== '\t'
1043
+ && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
1044
+ ) {
1045
+ throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
1046
+ }
1047
+ if (has$3(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
1048
+ throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
1049
+ }
1050
+ var numericSeparator = opts.numericSeparator;
1051
+
1052
+ if (typeof obj === 'undefined') {
1053
+ return 'undefined';
1054
+ }
1055
+ if (obj === null) {
1056
+ return 'null';
1057
+ }
1058
+ if (typeof obj === 'boolean') {
1059
+ return obj ? 'true' : 'false';
1060
+ }
1061
+
1062
+ if (typeof obj === 'string') {
1063
+ return inspectString(obj, opts);
1064
+ }
1065
+ if (typeof obj === 'number') {
1066
+ if (obj === 0) {
1067
+ return Infinity / obj > 0 ? '0' : '-0';
1068
+ }
1069
+ var str = String(obj);
1070
+ return numericSeparator ? addNumericSeparator(obj, str) : str;
1071
+ }
1072
+ if (typeof obj === 'bigint') {
1073
+ var bigIntStr = String(obj) + 'n';
1074
+ return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
1075
+ }
1076
+
1077
+ var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
1078
+ if (typeof depth === 'undefined') { depth = 0; }
1079
+ if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
1080
+ return isArray$3(obj) ? '[Array]' : '[Object]';
1081
+ }
1082
+
1083
+ var indent = getIndent(opts, depth);
1084
+
1085
+ if (typeof seen === 'undefined') {
1086
+ seen = [];
1087
+ } else if (indexOf(seen, obj) >= 0) {
1088
+ return '[Circular]';
1089
+ }
1090
+
1091
+ function inspect(value, from, noIndent) {
1092
+ if (from) {
1093
+ seen = $arrSlice.call(seen);
1094
+ seen.push(from);
1095
+ }
1096
+ if (noIndent) {
1097
+ var newOpts = {
1098
+ depth: opts.depth
1099
+ };
1100
+ if (has$3(opts, 'quoteStyle')) {
1101
+ newOpts.quoteStyle = opts.quoteStyle;
1102
+ }
1103
+ return inspect_(value, newOpts, depth + 1, seen);
1104
+ }
1105
+ return inspect_(value, opts, depth + 1, seen);
1106
+ }
1107
+
1108
+ if (typeof obj === 'function' && !isRegExp$1(obj)) { // in older engines, regexes are callable
1109
+ var name = nameOf(obj);
1110
+ var keys = arrObjKeys(obj, inspect);
1111
+ return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
1112
+ }
1113
+ if (isSymbol(obj)) {
1114
+ var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
1115
+ return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
1116
+ }
1117
+ if (isElement(obj)) {
1118
+ var s = '<' + $toLowerCase.call(String(obj.nodeName));
1119
+ var attrs = obj.attributes || [];
1120
+ for (var i = 0; i < attrs.length; i++) {
1121
+ s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
1122
+ }
1123
+ s += '>';
1124
+ if (obj.childNodes && obj.childNodes.length) { s += '...'; }
1125
+ s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
1126
+ return s;
1127
+ }
1128
+ if (isArray$3(obj)) {
1129
+ if (obj.length === 0) { return '[]'; }
1130
+ var xs = arrObjKeys(obj, inspect);
1131
+ if (indent && !singleLineValues(xs)) {
1132
+ return '[' + indentedJoin(xs, indent) + ']';
1133
+ }
1134
+ return '[ ' + $join.call(xs, ', ') + ' ]';
1135
+ }
1136
+ if (isError(obj)) {
1137
+ var parts = arrObjKeys(obj, inspect);
1138
+ if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
1139
+ return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
1140
+ }
1141
+ if (parts.length === 0) { return '[' + String(obj) + ']'; }
1142
+ return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
1143
+ }
1144
+ if (typeof obj === 'object' && customInspect) {
1145
+ if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
1146
+ return utilInspect(obj, { depth: maxDepth - depth });
1147
+ } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
1148
+ return obj.inspect();
1149
+ }
1150
+ }
1151
+ if (isMap(obj)) {
1152
+ var mapParts = [];
1153
+ if (mapForEach) {
1154
+ mapForEach.call(obj, function (value, key) {
1155
+ mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
1156
+ });
1157
+ }
1158
+ return collectionOf('Map', mapSize.call(obj), mapParts, indent);
1159
+ }
1160
+ if (isSet(obj)) {
1161
+ var setParts = [];
1162
+ if (setForEach) {
1163
+ setForEach.call(obj, function (value) {
1164
+ setParts.push(inspect(value, obj));
1165
+ });
1166
+ }
1167
+ return collectionOf('Set', setSize.call(obj), setParts, indent);
1168
+ }
1169
+ if (isWeakMap(obj)) {
1170
+ return weakCollectionOf('WeakMap');
1171
+ }
1172
+ if (isWeakSet(obj)) {
1173
+ return weakCollectionOf('WeakSet');
1174
+ }
1175
+ if (isWeakRef(obj)) {
1176
+ return weakCollectionOf('WeakRef');
1177
+ }
1178
+ if (isNumber$3(obj)) {
1179
+ return markBoxed(inspect(Number(obj)));
1180
+ }
1181
+ if (isBigInt(obj)) {
1182
+ return markBoxed(inspect(bigIntValueOf.call(obj)));
1183
+ }
1184
+ if (isBoolean(obj)) {
1185
+ return markBoxed(booleanValueOf.call(obj));
1186
+ }
1187
+ if (isString$1(obj)) {
1188
+ return markBoxed(inspect(String(obj)));
1189
+ }
1190
+ // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other
1191
+ /* eslint-env browser */
1192
+ if (typeof window !== 'undefined' && obj === window) {
1193
+ return '{ [object Window] }';
1194
+ }
1195
+ if (obj === commonjsGlobal) {
1196
+ return '{ [object globalThis] }';
1197
+ }
1198
+ if (!isDate(obj) && !isRegExp$1(obj)) {
1199
+ var ys = arrObjKeys(obj, inspect);
1200
+ var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
1201
+ var protoTag = obj instanceof Object ? '' : 'null prototype';
1202
+ var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
1203
+ var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
1204
+ var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
1205
+ if (ys.length === 0) { return tag + '{}'; }
1206
+ if (indent) {
1207
+ return tag + '{' + indentedJoin(ys, indent) + '}';
1208
+ }
1209
+ return tag + '{ ' + $join.call(ys, ', ') + ' }';
1210
+ }
1211
+ return String(obj);
1212
+ };
1213
+
1214
+ function wrapQuotes(s, defaultStyle, opts) {
1215
+ var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
1216
+ return quoteChar + s + quoteChar;
1217
+ }
1218
+
1219
+ function quote(s) {
1220
+ return $replace.call(String(s), /"/g, '&quot;');
1221
+ }
1222
+
1223
+ function isArray$3(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1224
+ function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1225
+ function isRegExp$1(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1226
+ function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1227
+ function isString$1(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1228
+ function isNumber$3(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1229
+ function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1230
+
1231
+ // Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
1232
+ function isSymbol(obj) {
1233
+ if (hasShammedSymbols) {
1234
+ return obj && typeof obj === 'object' && obj instanceof Symbol;
1235
+ }
1236
+ if (typeof obj === 'symbol') {
1237
+ return true;
1238
+ }
1239
+ if (!obj || typeof obj !== 'object' || !symToString) {
1240
+ return false;
1241
+ }
1242
+ try {
1243
+ symToString.call(obj);
1244
+ return true;
1245
+ } catch (e) {}
1246
+ return false;
1247
+ }
1248
+
1249
+ function isBigInt(obj) {
1250
+ if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
1251
+ return false;
1252
+ }
1253
+ try {
1254
+ bigIntValueOf.call(obj);
1255
+ return true;
1256
+ } catch (e) {}
1257
+ return false;
1258
+ }
1259
+
1260
+ var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
1261
+ function has$3(obj, key) {
1262
+ return hasOwn.call(obj, key);
1263
+ }
1264
+
1265
+ function toStr(obj) {
1266
+ return objectToString.call(obj);
1267
+ }
1268
+
1269
+ function nameOf(f) {
1270
+ if (f.name) { return f.name; }
1271
+ var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
1272
+ if (m) { return m[1]; }
1273
+ return null;
1274
+ }
1275
+
1276
+ function indexOf(xs, x) {
1277
+ if (xs.indexOf) { return xs.indexOf(x); }
1278
+ for (var i = 0, l = xs.length; i < l; i++) {
1279
+ if (xs[i] === x) { return i; }
1280
+ }
1281
+ return -1;
1282
+ }
1283
+
1284
+ function isMap(x) {
1285
+ if (!mapSize || !x || typeof x !== 'object') {
1286
+ return false;
1287
+ }
1288
+ try {
1289
+ mapSize.call(x);
1290
+ try {
1291
+ setSize.call(x);
1292
+ } catch (s) {
1293
+ return true;
1294
+ }
1295
+ return x instanceof Map; // core-js workaround, pre-v2.5.0
1296
+ } catch (e) {}
1297
+ return false;
1298
+ }
1299
+
1300
+ function isWeakMap(x) {
1301
+ if (!weakMapHas || !x || typeof x !== 'object') {
1302
+ return false;
1303
+ }
1304
+ try {
1305
+ weakMapHas.call(x, weakMapHas);
1306
+ try {
1307
+ weakSetHas.call(x, weakSetHas);
1308
+ } catch (s) {
1309
+ return true;
1310
+ }
1311
+ return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
1312
+ } catch (e) {}
1313
+ return false;
1314
+ }
1315
+
1316
+ function isWeakRef(x) {
1317
+ if (!weakRefDeref || !x || typeof x !== 'object') {
1318
+ return false;
1319
+ }
1320
+ try {
1321
+ weakRefDeref.call(x);
1322
+ return true;
1323
+ } catch (e) {}
1324
+ return false;
1325
+ }
1326
+
1327
+ function isSet(x) {
1328
+ if (!setSize || !x || typeof x !== 'object') {
1329
+ return false;
1330
+ }
1331
+ try {
1332
+ setSize.call(x);
1333
+ try {
1334
+ mapSize.call(x);
1335
+ } catch (m) {
1336
+ return true;
1337
+ }
1338
+ return x instanceof Set; // core-js workaround, pre-v2.5.0
1339
+ } catch (e) {}
1340
+ return false;
1341
+ }
1342
+
1343
+ function isWeakSet(x) {
1344
+ if (!weakSetHas || !x || typeof x !== 'object') {
1345
+ return false;
1346
+ }
1347
+ try {
1348
+ weakSetHas.call(x, weakSetHas);
1349
+ try {
1350
+ weakMapHas.call(x, weakMapHas);
1351
+ } catch (s) {
1352
+ return true;
1353
+ }
1354
+ return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
1355
+ } catch (e) {}
1356
+ return false;
1357
+ }
1358
+
1359
+ function isElement(x) {
1360
+ if (!x || typeof x !== 'object') { return false; }
1361
+ if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
1362
+ return true;
1363
+ }
1364
+ return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
1365
+ }
1366
+
1367
+ function inspectString(str, opts) {
1368
+ if (str.length > opts.maxStringLength) {
1369
+ var remaining = str.length - opts.maxStringLength;
1370
+ var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
1371
+ return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
1372
+ }
1373
+ // eslint-disable-next-line no-control-regex
1374
+ var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
1375
+ return wrapQuotes(s, 'single', opts);
1376
+ }
1377
+
1378
+ function lowbyte(c) {
1379
+ var n = c.charCodeAt(0);
1380
+ var x = {
1381
+ 8: 'b',
1382
+ 9: 't',
1383
+ 10: 'n',
1384
+ 12: 'f',
1385
+ 13: 'r'
1386
+ }[n];
1387
+ if (x) { return '\\' + x; }
1388
+ return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
1389
+ }
1390
+
1391
+ function markBoxed(str) {
1392
+ return 'Object(' + str + ')';
1393
+ }
1394
+
1395
+ function weakCollectionOf(type) {
1396
+ return type + ' { ? }';
1397
+ }
1398
+
1399
+ function collectionOf(type, size, entries, indent) {
1400
+ var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
1401
+ return type + ' (' + size + ') {' + joinedEntries + '}';
1402
+ }
1403
+
1404
+ function singleLineValues(xs) {
1405
+ for (var i = 0; i < xs.length; i++) {
1406
+ if (indexOf(xs[i], '\n') >= 0) {
1407
+ return false;
1408
+ }
1409
+ }
1410
+ return true;
1411
+ }
1412
+
1413
+ function getIndent(opts, depth) {
1414
+ var baseIndent;
1415
+ if (opts.indent === '\t') {
1416
+ baseIndent = '\t';
1417
+ } else if (typeof opts.indent === 'number' && opts.indent > 0) {
1418
+ baseIndent = $join.call(Array(opts.indent + 1), ' ');
1419
+ } else {
1420
+ return null;
1421
+ }
1422
+ return {
1423
+ base: baseIndent,
1424
+ prev: $join.call(Array(depth + 1), baseIndent)
1425
+ };
1426
+ }
1427
+
1428
+ function indentedJoin(xs, indent) {
1429
+ if (xs.length === 0) { return ''; }
1430
+ var lineJoiner = '\n' + indent.prev + indent.base;
1431
+ return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
1432
+ }
1433
+
1434
+ function arrObjKeys(obj, inspect) {
1435
+ var isArr = isArray$3(obj);
1436
+ var xs = [];
1437
+ if (isArr) {
1438
+ xs.length = obj.length;
1439
+ for (var i = 0; i < obj.length; i++) {
1440
+ xs[i] = has$3(obj, i) ? inspect(obj[i], obj) : '';
1441
+ }
1442
+ }
1443
+ var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
1444
+ var symMap;
1445
+ if (hasShammedSymbols) {
1446
+ symMap = {};
1447
+ for (var k = 0; k < syms.length; k++) {
1448
+ symMap['$' + syms[k]] = syms[k];
1449
+ }
1450
+ }
1451
+
1452
+ for (var key in obj) { // eslint-disable-line no-restricted-syntax
1453
+ if (!has$3(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
1454
+ if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
1455
+ if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
1456
+ // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
1457
+ continue; // eslint-disable-line no-restricted-syntax, no-continue
1458
+ } else if ($test.call(/[^\w$]/, key)) {
1459
+ xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
1460
+ } else {
1461
+ xs.push(key + ': ' + inspect(obj[key], obj));
1462
+ }
1463
+ }
1464
+ if (typeof gOPS === 'function') {
1465
+ for (var j = 0; j < syms.length; j++) {
1466
+ if (isEnumerable.call(obj, syms[j])) {
1467
+ xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
1468
+ }
1469
+ }
1470
+ }
1471
+ return xs;
1472
+ }
1473
+
1474
+ var GetIntrinsic = getIntrinsic;
1475
+ var callBound = callBound$1;
1476
+ var inspect = objectInspect;
1477
+
1478
+ var $TypeError = GetIntrinsic('%TypeError%');
1479
+ var $WeakMap = GetIntrinsic('%WeakMap%', true);
1480
+ var $Map = GetIntrinsic('%Map%', true);
1481
+
1482
+ var $weakMapGet = callBound('WeakMap.prototype.get', true);
1483
+ var $weakMapSet = callBound('WeakMap.prototype.set', true);
1484
+ var $weakMapHas = callBound('WeakMap.prototype.has', true);
1485
+ var $mapGet = callBound('Map.prototype.get', true);
1486
+ var $mapSet = callBound('Map.prototype.set', true);
1487
+ var $mapHas = callBound('Map.prototype.has', true);
1488
+
1489
+ /*
1490
+ * This function traverses the list returning the node corresponding to the
1491
+ * given key.
1492
+ *
1493
+ * That node is also moved to the head of the list, so that if it's accessed
1494
+ * again we don't need to traverse the whole list. By doing so, all the recently
1495
+ * used nodes can be accessed relatively quickly.
1496
+ */
1497
+ var listGetNode = function (list, key) { // eslint-disable-line consistent-return
1498
+ for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
1499
+ if (curr.key === key) {
1500
+ prev.next = curr.next;
1501
+ curr.next = list.next;
1502
+ list.next = curr; // eslint-disable-line no-param-reassign
1503
+ return curr;
1504
+ }
1505
+ }
1506
+ };
1507
+
1508
+ var listGet = function (objects, key) {
1509
+ var node = listGetNode(objects, key);
1510
+ return node && node.value;
1511
+ };
1512
+ var listSet = function (objects, key, value) {
1513
+ var node = listGetNode(objects, key);
1514
+ if (node) {
1515
+ node.value = value;
1516
+ } else {
1517
+ // Prepend the new node to the beginning of the list
1518
+ objects.next = { // eslint-disable-line no-param-reassign
1519
+ key: key,
1520
+ next: objects.next,
1521
+ value: value
1522
+ };
1523
+ }
1524
+ };
1525
+ var listHas = function (objects, key) {
1526
+ return !!listGetNode(objects, key);
1527
+ };
1528
+
1529
+ var sideChannel = function getSideChannel() {
1530
+ var $wm;
1531
+ var $m;
1532
+ var $o;
1533
+ var channel = {
1534
+ assert: function (key) {
1535
+ if (!channel.has(key)) {
1536
+ throw new $TypeError('Side channel does not contain ' + inspect(key));
1537
+ }
1538
+ },
1539
+ get: function (key) { // eslint-disable-line consistent-return
1540
+ if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
1541
+ if ($wm) {
1542
+ return $weakMapGet($wm, key);
1543
+ }
1544
+ } else if ($Map) {
1545
+ if ($m) {
1546
+ return $mapGet($m, key);
1547
+ }
1548
+ } else {
1549
+ if ($o) { // eslint-disable-line no-lonely-if
1550
+ return listGet($o, key);
1551
+ }
1552
+ }
1553
+ },
1554
+ has: function (key) {
1555
+ if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
1556
+ if ($wm) {
1557
+ return $weakMapHas($wm, key);
1558
+ }
1559
+ } else if ($Map) {
1560
+ if ($m) {
1561
+ return $mapHas($m, key);
1562
+ }
1563
+ } else {
1564
+ if ($o) { // eslint-disable-line no-lonely-if
1565
+ return listHas($o, key);
1566
+ }
1567
+ }
1568
+ return false;
1569
+ },
1570
+ set: function (key, value) {
1571
+ if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
1572
+ if (!$wm) {
1573
+ $wm = new $WeakMap();
1574
+ }
1575
+ $weakMapSet($wm, key, value);
1576
+ } else if ($Map) {
1577
+ if (!$m) {
1578
+ $m = new $Map();
1579
+ }
1580
+ $mapSet($m, key, value);
1581
+ } else {
1582
+ if (!$o) {
1583
+ /*
1584
+ * Initialize the linked list as an empty node, so that we don't have
1585
+ * to special-case handling of the first node: we can always refer to
1586
+ * it as (previous node).next, instead of something like (list).head
1587
+ */
1588
+ $o = { key: {}, next: null };
1589
+ }
1590
+ listSet($o, key, value);
1591
+ }
1592
+ }
1593
+ };
1594
+ return channel;
1595
+ };
1596
+
1597
+ var replace = String.prototype.replace;
1598
+ var percentTwenties = /%20/g;
1599
+
1600
+ var Format = {
1601
+ RFC1738: 'RFC1738',
1602
+ RFC3986: 'RFC3986'
1603
+ };
1604
+
1605
+ var formats$3 = {
1606
+ 'default': Format.RFC3986,
1607
+ formatters: {
1608
+ RFC1738: function (value) {
1609
+ return replace.call(value, percentTwenties, '+');
1610
+ },
1611
+ RFC3986: function (value) {
1612
+ return String(value);
1613
+ }
1614
+ },
1615
+ RFC1738: Format.RFC1738,
1616
+ RFC3986: Format.RFC3986
1617
+ };
1618
+
1619
+ var formats$2 = formats$3;
1620
+
1621
+ var has$2 = Object.prototype.hasOwnProperty;
1622
+ var isArray$2 = Array.isArray;
1623
+
1624
+ var hexTable = (function () {
1625
+ var array = [];
1626
+ for (var i = 0; i < 256; ++i) {
1627
+ array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
1628
+ }
1629
+
1630
+ return array;
1631
+ }());
1632
+
1633
+ var compactQueue = function compactQueue(queue) {
1634
+ while (queue.length > 1) {
1635
+ var item = queue.pop();
1636
+ var obj = item.obj[item.prop];
1637
+
1638
+ if (isArray$2(obj)) {
1639
+ var compacted = [];
1640
+
1641
+ for (var j = 0; j < obj.length; ++j) {
1642
+ if (typeof obj[j] !== 'undefined') {
1643
+ compacted.push(obj[j]);
1644
+ }
1645
+ }
1646
+
1647
+ item.obj[item.prop] = compacted;
1648
+ }
1649
+ }
1650
+ };
1651
+
1652
+ var arrayToObject = function arrayToObject(source, options) {
1653
+ var obj = options && options.plainObjects ? Object.create(null) : {};
1654
+ for (var i = 0; i < source.length; ++i) {
1655
+ if (typeof source[i] !== 'undefined') {
1656
+ obj[i] = source[i];
1657
+ }
1658
+ }
1659
+
1660
+ return obj;
1661
+ };
1662
+
1663
+ var merge$2 = function merge(target, source, options) {
1664
+ /* eslint no-param-reassign: 0 */
1665
+ if (!source) {
1666
+ return target;
1667
+ }
1668
+
1669
+ if (typeof source !== 'object') {
1670
+ if (isArray$2(target)) {
1671
+ target.push(source);
1672
+ } else if (target && typeof target === 'object') {
1673
+ if ((options && (options.plainObjects || options.allowPrototypes)) || !has$2.call(Object.prototype, source)) {
1674
+ target[source] = true;
1675
+ }
1676
+ } else {
1677
+ return [target, source];
1678
+ }
1679
+
1680
+ return target;
1681
+ }
1682
+
1683
+ if (!target || typeof target !== 'object') {
1684
+ return [target].concat(source);
1685
+ }
1686
+
1687
+ var mergeTarget = target;
1688
+ if (isArray$2(target) && !isArray$2(source)) {
1689
+ mergeTarget = arrayToObject(target, options);
1690
+ }
1691
+
1692
+ if (isArray$2(target) && isArray$2(source)) {
1693
+ source.forEach(function (item, i) {
1694
+ if (has$2.call(target, i)) {
1695
+ var targetItem = target[i];
1696
+ if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
1697
+ target[i] = merge(targetItem, item, options);
1698
+ } else {
1699
+ target.push(item);
1700
+ }
1701
+ } else {
1702
+ target[i] = item;
1703
+ }
1704
+ });
1705
+ return target;
1706
+ }
1707
+
1708
+ return Object.keys(source).reduce(function (acc, key) {
1709
+ var value = source[key];
1710
+
1711
+ if (has$2.call(acc, key)) {
1712
+ acc[key] = merge(acc[key], value, options);
1713
+ } else {
1714
+ acc[key] = value;
1715
+ }
1716
+ return acc;
1717
+ }, mergeTarget);
1718
+ };
1719
+
1720
+ var assign = function assignSingleSource(target, source) {
1721
+ return Object.keys(source).reduce(function (acc, key) {
1722
+ acc[key] = source[key];
1723
+ return acc;
1724
+ }, target);
1725
+ };
1726
+
1727
+ var decode = function (str, decoder, charset) {
1728
+ var strWithoutPlus = str.replace(/\+/g, ' ');
1729
+ if (charset === 'iso-8859-1') {
1730
+ // unescape never throws, no try...catch needed:
1731
+ return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
1732
+ }
1733
+ // utf-8
1734
+ try {
1735
+ return decodeURIComponent(strWithoutPlus);
1736
+ } catch (e) {
1737
+ return strWithoutPlus;
1738
+ }
1739
+ };
1740
+
1741
+ var encode = function encode(str, defaultEncoder, charset, kind, format) {
1742
+ // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
1743
+ // It has been adapted here for stricter adherence to RFC 3986
1744
+ if (str.length === 0) {
1745
+ return str;
1746
+ }
1747
+
1748
+ var string = str;
1749
+ if (typeof str === 'symbol') {
1750
+ string = Symbol.prototype.toString.call(str);
1751
+ } else if (typeof str !== 'string') {
1752
+ string = String(str);
1753
+ }
1754
+
1755
+ if (charset === 'iso-8859-1') {
1756
+ return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
1757
+ return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
1758
+ });
1759
+ }
1760
+
1761
+ var out = '';
1762
+ for (var i = 0; i < string.length; ++i) {
1763
+ var c = string.charCodeAt(i);
1764
+
1765
+ if (
1766
+ c === 0x2D // -
1767
+ || c === 0x2E // .
1768
+ || c === 0x5F // _
1769
+ || c === 0x7E // ~
1770
+ || (c >= 0x30 && c <= 0x39) // 0-9
1771
+ || (c >= 0x41 && c <= 0x5A) // a-z
1772
+ || (c >= 0x61 && c <= 0x7A) // A-Z
1773
+ || (format === formats$2.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
1774
+ ) {
1775
+ out += string.charAt(i);
1776
+ continue;
1777
+ }
1778
+
1779
+ if (c < 0x80) {
1780
+ out = out + hexTable[c];
1781
+ continue;
1782
+ }
1783
+
1784
+ if (c < 0x800) {
1785
+ out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
1786
+ continue;
1787
+ }
1788
+
1789
+ if (c < 0xD800 || c >= 0xE000) {
1790
+ out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
1791
+ continue;
1792
+ }
1793
+
1794
+ i += 1;
1795
+ c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
1796
+ /* eslint operator-linebreak: [2, "before"] */
1797
+ out += hexTable[0xF0 | (c >> 18)]
1798
+ + hexTable[0x80 | ((c >> 12) & 0x3F)]
1799
+ + hexTable[0x80 | ((c >> 6) & 0x3F)]
1800
+ + hexTable[0x80 | (c & 0x3F)];
1801
+ }
1802
+
1803
+ return out;
1804
+ };
1805
+
1806
+ var compact = function compact(value) {
1807
+ var queue = [{ obj: { o: value }, prop: 'o' }];
1808
+ var refs = [];
1809
+
1810
+ for (var i = 0; i < queue.length; ++i) {
1811
+ var item = queue[i];
1812
+ var obj = item.obj[item.prop];
1813
+
1814
+ var keys = Object.keys(obj);
1815
+ for (var j = 0; j < keys.length; ++j) {
1816
+ var key = keys[j];
1817
+ var val = obj[key];
1818
+ if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
1819
+ queue.push({ obj: obj, prop: key });
1820
+ refs.push(val);
1821
+ }
1822
+ }
1823
+ }
1824
+
1825
+ compactQueue(queue);
1826
+
1827
+ return value;
1828
+ };
1829
+
1830
+ var isRegExp = function isRegExp(obj) {
1831
+ return Object.prototype.toString.call(obj) === '[object RegExp]';
1832
+ };
1833
+
1834
+ var isBuffer = function isBuffer(obj) {
1835
+ if (!obj || typeof obj !== 'object') {
1836
+ return false;
1837
+ }
1838
+
1839
+ return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
1840
+ };
1841
+
1842
+ var combine = function combine(a, b) {
1843
+ return [].concat(a, b);
1844
+ };
1845
+
1846
+ var maybeMap = function maybeMap(val, fn) {
1847
+ if (isArray$2(val)) {
1848
+ var mapped = [];
1849
+ for (var i = 0; i < val.length; i += 1) {
1850
+ mapped.push(fn(val[i]));
1851
+ }
1852
+ return mapped;
1853
+ }
1854
+ return fn(val);
1855
+ };
1856
+
1857
+ var utils$n = {
1858
+ arrayToObject: arrayToObject,
1859
+ assign: assign,
1860
+ combine: combine,
1861
+ compact: compact,
1862
+ decode: decode,
1863
+ encode: encode,
1864
+ isBuffer: isBuffer,
1865
+ isRegExp: isRegExp,
1866
+ maybeMap: maybeMap,
1867
+ merge: merge$2
1868
+ };
1869
+
1870
+ var getSideChannel = sideChannel;
1871
+ var utils$m = utils$n;
1872
+ var formats$1 = formats$3;
1873
+ var has$1 = Object.prototype.hasOwnProperty;
1874
+
1875
+ var arrayPrefixGenerators = {
1876
+ brackets: function brackets(prefix) {
1877
+ return prefix + '[]';
1878
+ },
1879
+ comma: 'comma',
1880
+ indices: function indices(prefix, key) {
1881
+ return prefix + '[' + key + ']';
1882
+ },
1883
+ repeat: function repeat(prefix) {
1884
+ return prefix;
1885
+ }
1886
+ };
1887
+
1888
+ var isArray$1 = Array.isArray;
1889
+ var push = Array.prototype.push;
1890
+ var pushToArray = function (arr, valueOrArray) {
1891
+ push.apply(arr, isArray$1(valueOrArray) ? valueOrArray : [valueOrArray]);
1892
+ };
1893
+
1894
+ var toISO = Date.prototype.toISOString;
1895
+
1896
+ var defaultFormat = formats$1['default'];
1897
+ var defaults$1 = {
1898
+ addQueryPrefix: false,
1899
+ allowDots: false,
1900
+ charset: 'utf-8',
1901
+ charsetSentinel: false,
1902
+ delimiter: '&',
1903
+ encode: true,
1904
+ encoder: utils$m.encode,
1905
+ encodeValuesOnly: false,
1906
+ format: defaultFormat,
1907
+ formatter: formats$1.formatters[defaultFormat],
1908
+ // deprecated
1909
+ indices: false,
1910
+ serializeDate: function serializeDate(date) {
1911
+ return toISO.call(date);
1912
+ },
1913
+ skipNulls: false,
1914
+ strictNullHandling: false
1915
+ };
1916
+
1917
+ var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
1918
+ return typeof v === 'string'
1919
+ || typeof v === 'number'
1920
+ || typeof v === 'boolean'
1921
+ || typeof v === 'symbol'
1922
+ || typeof v === 'bigint';
1923
+ };
1924
+
1925
+ var sentinel = {};
1926
+
1927
+ var stringify$6 = function stringify(
1928
+ object,
1929
+ prefix,
1930
+ generateArrayPrefix,
1931
+ commaRoundTrip,
1932
+ strictNullHandling,
1933
+ skipNulls,
1934
+ encoder,
1935
+ filter,
1936
+ sort,
1937
+ allowDots,
1938
+ serializeDate,
1939
+ format,
1940
+ formatter,
1941
+ encodeValuesOnly,
1942
+ charset,
1943
+ sideChannel
1944
+ ) {
1945
+ var obj = object;
1946
+
1947
+ var tmpSc = sideChannel;
1948
+ var step = 0;
1949
+ var findFlag = false;
1950
+ while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
1951
+ // Where object last appeared in the ref tree
1952
+ var pos = tmpSc.get(object);
1953
+ step += 1;
1954
+ if (typeof pos !== 'undefined') {
1955
+ if (pos === step) {
1956
+ throw new RangeError('Cyclic object value');
1957
+ } else {
1958
+ findFlag = true; // Break while
1959
+ }
1960
+ }
1961
+ if (typeof tmpSc.get(sentinel) === 'undefined') {
1962
+ step = 0;
1963
+ }
1964
+ }
1965
+
1966
+ if (typeof filter === 'function') {
1967
+ obj = filter(prefix, obj);
1968
+ } else if (obj instanceof Date) {
1969
+ obj = serializeDate(obj);
1970
+ } else if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
1971
+ obj = utils$m.maybeMap(obj, function (value) {
1972
+ if (value instanceof Date) {
1973
+ return serializeDate(value);
1974
+ }
1975
+ return value;
1976
+ });
1977
+ }
1978
+
1979
+ if (obj === null) {
1980
+ if (strictNullHandling) {
1981
+ return encoder && !encodeValuesOnly ? encoder(prefix, defaults$1.encoder, charset, 'key', format) : prefix;
1982
+ }
1983
+
1984
+ obj = '';
1985
+ }
1986
+
1987
+ if (isNonNullishPrimitive(obj) || utils$m.isBuffer(obj)) {
1988
+ if (encoder) {
1989
+ var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults$1.encoder, charset, 'key', format);
1990
+ return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults$1.encoder, charset, 'value', format))];
1991
+ }
1992
+ return [formatter(prefix) + '=' + formatter(String(obj))];
1993
+ }
1994
+
1995
+ var values = [];
1996
+
1997
+ if (typeof obj === 'undefined') {
1998
+ return values;
1999
+ }
2000
+
2001
+ var objKeys;
2002
+ if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
2003
+ // we need to join elements in
2004
+ if (encodeValuesOnly && encoder) {
2005
+ obj = utils$m.maybeMap(obj, encoder);
2006
+ }
2007
+ objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
2008
+ } else if (isArray$1(filter)) {
2009
+ objKeys = filter;
2010
+ } else {
2011
+ var keys = Object.keys(obj);
2012
+ objKeys = sort ? keys.sort(sort) : keys;
2013
+ }
2014
+
2015
+ var adjustedPrefix = commaRoundTrip && isArray$1(obj) && obj.length === 1 ? prefix + '[]' : prefix;
2016
+
2017
+ for (var j = 0; j < objKeys.length; ++j) {
2018
+ var key = objKeys[j];
2019
+ var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
2020
+
2021
+ if (skipNulls && value === null) {
2022
+ continue;
2023
+ }
2024
+
2025
+ var keyPrefix = isArray$1(obj)
2026
+ ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix
2027
+ : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');
2028
+
2029
+ sideChannel.set(object, step);
2030
+ var valueSideChannel = getSideChannel();
2031
+ valueSideChannel.set(sentinel, sideChannel);
2032
+ pushToArray(values, stringify(
2033
+ value,
2034
+ keyPrefix,
2035
+ generateArrayPrefix,
2036
+ commaRoundTrip,
2037
+ strictNullHandling,
2038
+ skipNulls,
2039
+ generateArrayPrefix === 'comma' && encodeValuesOnly && isArray$1(obj) ? null : encoder,
2040
+ filter,
2041
+ sort,
2042
+ allowDots,
2043
+ serializeDate,
2044
+ format,
2045
+ formatter,
2046
+ encodeValuesOnly,
2047
+ charset,
2048
+ valueSideChannel
2049
+ ));
2050
+ }
2051
+
2052
+ return values;
2053
+ };
2054
+
2055
+ var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
2056
+ if (!opts) {
2057
+ return defaults$1;
2058
+ }
2059
+
2060
+ if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
2061
+ throw new TypeError('Encoder has to be a function.');
2062
+ }
2063
+
2064
+ var charset = opts.charset || defaults$1.charset;
2065
+ if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
2066
+ throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
2067
+ }
2068
+
2069
+ var format = formats$1['default'];
2070
+ if (typeof opts.format !== 'undefined') {
2071
+ if (!has$1.call(formats$1.formatters, opts.format)) {
2072
+ throw new TypeError('Unknown format option provided.');
2073
+ }
2074
+ format = opts.format;
2075
+ }
2076
+ var formatter = formats$1.formatters[format];
2077
+
2078
+ var filter = defaults$1.filter;
2079
+ if (typeof opts.filter === 'function' || isArray$1(opts.filter)) {
2080
+ filter = opts.filter;
2081
+ }
2082
+
2083
+ return {
2084
+ addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults$1.addQueryPrefix,
2085
+ allowDots: typeof opts.allowDots === 'undefined' ? defaults$1.allowDots : !!opts.allowDots,
2086
+ charset: charset,
2087
+ charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults$1.charsetSentinel,
2088
+ delimiter: typeof opts.delimiter === 'undefined' ? defaults$1.delimiter : opts.delimiter,
2089
+ encode: typeof opts.encode === 'boolean' ? opts.encode : defaults$1.encode,
2090
+ encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults$1.encoder,
2091
+ encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults$1.encodeValuesOnly,
2092
+ filter: filter,
2093
+ format: format,
2094
+ formatter: formatter,
2095
+ serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults$1.serializeDate,
2096
+ skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults$1.skipNulls,
2097
+ sort: typeof opts.sort === 'function' ? opts.sort : null,
2098
+ strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults$1.strictNullHandling
2099
+ };
2100
+ };
2101
+
2102
+ var stringify_1 = function (object, opts) {
2103
+ var obj = object;
2104
+ var options = normalizeStringifyOptions(opts);
2105
+
2106
+ var objKeys;
2107
+ var filter;
2108
+
2109
+ if (typeof options.filter === 'function') {
2110
+ filter = options.filter;
2111
+ obj = filter('', obj);
2112
+ } else if (isArray$1(options.filter)) {
2113
+ filter = options.filter;
2114
+ objKeys = filter;
2115
+ }
2116
+
2117
+ var keys = [];
2118
+
2119
+ if (typeof obj !== 'object' || obj === null) {
2120
+ return '';
2121
+ }
2122
+
2123
+ var arrayFormat;
2124
+ if (opts && opts.arrayFormat in arrayPrefixGenerators) {
2125
+ arrayFormat = opts.arrayFormat;
2126
+ } else if (opts && 'indices' in opts) {
2127
+ arrayFormat = opts.indices ? 'indices' : 'repeat';
2128
+ } else {
2129
+ arrayFormat = 'indices';
2130
+ }
2131
+
2132
+ var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
2133
+ if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
2134
+ throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
2135
+ }
2136
+ var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;
2137
+
2138
+ if (!objKeys) {
2139
+ objKeys = Object.keys(obj);
2140
+ }
2141
+
2142
+ if (options.sort) {
2143
+ objKeys.sort(options.sort);
2144
+ }
2145
+
2146
+ var sideChannel = getSideChannel();
2147
+ for (var i = 0; i < objKeys.length; ++i) {
2148
+ var key = objKeys[i];
2149
+
2150
+ if (options.skipNulls && obj[key] === null) {
2151
+ continue;
2152
+ }
2153
+ pushToArray(keys, stringify$6(
2154
+ obj[key],
2155
+ key,
2156
+ generateArrayPrefix,
2157
+ commaRoundTrip,
2158
+ options.strictNullHandling,
2159
+ options.skipNulls,
2160
+ options.encode ? options.encoder : null,
2161
+ options.filter,
2162
+ options.sort,
2163
+ options.allowDots,
2164
+ options.serializeDate,
2165
+ options.format,
2166
+ options.formatter,
2167
+ options.encodeValuesOnly,
2168
+ options.charset,
2169
+ sideChannel
2170
+ ));
2171
+ }
2172
+
2173
+ var joined = keys.join(options.delimiter);
2174
+ var prefix = options.addQueryPrefix === true ? '?' : '';
2175
+
2176
+ if (options.charsetSentinel) {
2177
+ if (options.charset === 'iso-8859-1') {
2178
+ // encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
2179
+ prefix += 'utf8=%26%2310003%3B&';
2180
+ } else {
2181
+ // encodeURIComponent('✓')
2182
+ prefix += 'utf8=%E2%9C%93&';
2183
+ }
2184
+ }
2185
+
2186
+ return joined.length > 0 ? prefix + joined : '';
2187
+ };
2188
+
2189
+ var utils$l = utils$n;
2190
+
2191
+ var has = Object.prototype.hasOwnProperty;
2192
+ var isArray = Array.isArray;
2193
+
2194
+ var defaults = {
2195
+ allowDots: false,
2196
+ allowPrototypes: false,
2197
+ allowSparse: false,
2198
+ arrayLimit: 20,
2199
+ charset: 'utf-8',
2200
+ charsetSentinel: false,
2201
+ comma: false,
2202
+ decoder: utils$l.decode,
2203
+ delimiter: '&',
2204
+ depth: 5,
2205
+ ignoreQueryPrefix: false,
2206
+ interpretNumericEntities: false,
2207
+ parameterLimit: 1000,
2208
+ parseArrays: true,
2209
+ plainObjects: false,
2210
+ strictNullHandling: false
2211
+ };
2212
+
2213
+ var interpretNumericEntities = function (str) {
2214
+ return str.replace(/&#(\d+);/g, function ($0, numberStr) {
2215
+ return String.fromCharCode(parseInt(numberStr, 10));
2216
+ });
2217
+ };
2218
+
2219
+ var parseArrayValue = function (val, options) {
2220
+ if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
2221
+ return val.split(',');
2222
+ }
2223
+
2224
+ return val;
2225
+ };
2226
+
2227
+ // This is what browsers will submit when the ✓ character occurs in an
2228
+ // application/x-www-form-urlencoded body and the encoding of the page containing
2229
+ // the form is iso-8859-1, or when the submitted form has an accept-charset
2230
+ // attribute of iso-8859-1. Presumably also with other charsets that do not contain
2231
+ // the ✓ character, such as us-ascii.
2232
+ var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')
2233
+
2234
+ // These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
2235
+ var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
2236
+
2237
+ var parseValues = function parseQueryStringValues(str, options) {
2238
+ var obj = { __proto__: null };
2239
+
2240
+ var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
2241
+ var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
2242
+ var parts = cleanStr.split(options.delimiter, limit);
2243
+ var skipIndex = -1; // Keep track of where the utf8 sentinel was found
2244
+ var i;
2245
+
2246
+ var charset = options.charset;
2247
+ if (options.charsetSentinel) {
2248
+ for (i = 0; i < parts.length; ++i) {
2249
+ if (parts[i].indexOf('utf8=') === 0) {
2250
+ if (parts[i] === charsetSentinel) {
2251
+ charset = 'utf-8';
2252
+ } else if (parts[i] === isoSentinel) {
2253
+ charset = 'iso-8859-1';
2254
+ }
2255
+ skipIndex = i;
2256
+ i = parts.length; // The eslint settings do not allow break;
2257
+ }
2258
+ }
2259
+ }
2260
+
2261
+ for (i = 0; i < parts.length; ++i) {
2262
+ if (i === skipIndex) {
2263
+ continue;
2264
+ }
2265
+ var part = parts[i];
2266
+
2267
+ var bracketEqualsPos = part.indexOf(']=');
2268
+ var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
2269
+
2270
+ var key, val;
2271
+ if (pos === -1) {
2272
+ key = options.decoder(part, defaults.decoder, charset, 'key');
2273
+ val = options.strictNullHandling ? null : '';
2274
+ } else {
2275
+ key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
2276
+ val = utils$l.maybeMap(
2277
+ parseArrayValue(part.slice(pos + 1), options),
2278
+ function (encodedVal) {
2279
+ return options.decoder(encodedVal, defaults.decoder, charset, 'value');
2280
+ }
2281
+ );
2282
+ }
2283
+
2284
+ if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
2285
+ val = interpretNumericEntities(val);
2286
+ }
2287
+
2288
+ if (part.indexOf('[]=') > -1) {
2289
+ val = isArray(val) ? [val] : val;
2290
+ }
2291
+
2292
+ if (has.call(obj, key)) {
2293
+ obj[key] = utils$l.combine(obj[key], val);
2294
+ } else {
2295
+ obj[key] = val;
2296
+ }
2297
+ }
2298
+
2299
+ return obj;
2300
+ };
2301
+
2302
+ var parseObject = function (chain, val, options, valuesParsed) {
2303
+ var leaf = valuesParsed ? val : parseArrayValue(val, options);
2304
+
2305
+ for (var i = chain.length - 1; i >= 0; --i) {
2306
+ var obj;
2307
+ var root = chain[i];
2308
+
2309
+ if (root === '[]' && options.parseArrays) {
2310
+ obj = [].concat(leaf);
2311
+ } else {
2312
+ obj = options.plainObjects ? Object.create(null) : {};
2313
+ var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
2314
+ var index = parseInt(cleanRoot, 10);
2315
+ if (!options.parseArrays && cleanRoot === '') {
2316
+ obj = { 0: leaf };
2317
+ } else if (
2318
+ !isNaN(index)
2319
+ && root !== cleanRoot
2320
+ && String(index) === cleanRoot
2321
+ && index >= 0
2322
+ && (options.parseArrays && index <= options.arrayLimit)
2323
+ ) {
2324
+ obj = [];
2325
+ obj[index] = leaf;
2326
+ } else if (cleanRoot !== '__proto__') {
2327
+ obj[cleanRoot] = leaf;
2328
+ }
2329
+ }
2330
+
2331
+ leaf = obj;
2332
+ }
2333
+
2334
+ return leaf;
2335
+ };
2336
+
2337
+ var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
2338
+ if (!givenKey) {
2339
+ return;
2340
+ }
2341
+
2342
+ // Transform dot notation to bracket notation
2343
+ var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
2344
+
2345
+ // The regex chunks
2346
+
2347
+ var brackets = /(\[[^[\]]*])/;
2348
+ var child = /(\[[^[\]]*])/g;
2349
+
2350
+ // Get the parent
2351
+
2352
+ var segment = options.depth > 0 && brackets.exec(key);
2353
+ var parent = segment ? key.slice(0, segment.index) : key;
2354
+
2355
+ // Stash the parent if it exists
2356
+
2357
+ var keys = [];
2358
+ if (parent) {
2359
+ // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
2360
+ if (!options.plainObjects && has.call(Object.prototype, parent)) {
2361
+ if (!options.allowPrototypes) {
2362
+ return;
2363
+ }
2364
+ }
2365
+
2366
+ keys.push(parent);
2367
+ }
2368
+
2369
+ // Loop through children appending to the array until we hit depth
2370
+
2371
+ var i = 0;
2372
+ while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
2373
+ i += 1;
2374
+ if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
2375
+ if (!options.allowPrototypes) {
2376
+ return;
2377
+ }
2378
+ }
2379
+ keys.push(segment[1]);
2380
+ }
2381
+
2382
+ // If there's a remainder, just add whatever is left
2383
+
2384
+ if (segment) {
2385
+ keys.push('[' + key.slice(segment.index) + ']');
2386
+ }
2387
+
2388
+ return parseObject(keys, val, options, valuesParsed);
2389
+ };
2390
+
2391
+ var normalizeParseOptions = function normalizeParseOptions(opts) {
2392
+ if (!opts) {
2393
+ return defaults;
2394
+ }
2395
+
2396
+ if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
2397
+ throw new TypeError('Decoder has to be a function.');
2398
+ }
2399
+
2400
+ if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
2401
+ throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
2402
+ }
2403
+ var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
2404
+
2405
+ return {
2406
+ allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
2407
+ allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
2408
+ allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
2409
+ arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
2410
+ charset: charset,
2411
+ charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
2412
+ comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
2413
+ decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
2414
+ delimiter: typeof opts.delimiter === 'string' || utils$l.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
2415
+ // eslint-disable-next-line no-implicit-coercion, no-extra-parens
2416
+ depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
2417
+ ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
2418
+ interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
2419
+ parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
2420
+ parseArrays: opts.parseArrays !== false,
2421
+ plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
2422
+ strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
2423
+ };
2424
+ };
2425
+
2426
+ var parse$6 = function (str, opts) {
2427
+ var options = normalizeParseOptions(opts);
2428
+
2429
+ if (str === '' || str === null || typeof str === 'undefined') {
2430
+ return options.plainObjects ? Object.create(null) : {};
2431
+ }
2432
+
2433
+ var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
2434
+ var obj = options.plainObjects ? Object.create(null) : {};
2435
+
2436
+ // Iterate over the keys and setup the new object
2437
+
2438
+ var keys = Object.keys(tempObj);
2439
+ for (var i = 0; i < keys.length; ++i) {
2440
+ var key = keys[i];
2441
+ var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
2442
+ obj = utils$l.merge(obj, newObj, options);
2443
+ }
2444
+
2445
+ if (options.allowSparse === true) {
2446
+ return obj;
2447
+ }
2448
+
2449
+ return utils$l.compact(obj);
2450
+ };
2451
+
2452
+ var stringify$5 = stringify_1;
2453
+ var parse$5 = parse$6;
2454
+ var formats = formats$3;
2455
+
2456
+ var lib = {
2457
+ formats: formats,
2458
+ parse: parse$5,
2459
+ stringify: stringify$5
2460
+ };
2461
+
2462
+ class CustomCommands {
2463
+ constructor(page, request, baseURL = process.env.BASE_URL) {
2464
+ this.interceptMultipleResponses = ({ responseUrl = "", responseStatus = 200, times = 1, baseUrl, customPageContext, timeout = 35000, } = {}) => {
2465
+ const pageContext = customPageContext !== null && customPageContext !== void 0 ? customPageContext : this.page;
2466
+ return Promise.all([...new Array(times)].map(() => pageContext.waitForResponse((response) => {
2467
+ var _a, _b, _c;
2468
+ if (response.request().resourceType() === "xhr" &&
2469
+ response.status() === responseStatus &&
2470
+ response.url().includes(responseUrl) &&
2471
+ response.url().startsWith((_a = baseUrl !== null && baseUrl !== void 0 ? baseUrl : this.baseURL) !== null && _a !== void 0 ? _a : "") &&
2472
+ !this.responses.includes((_b = response.headers()) === null || _b === void 0 ? void 0 : _b["x-request-id"])) {
2473
+ this.responses.push((_c = response.headers()) === null || _c === void 0 ? void 0 : _c["x-request-id"]);
2474
+ return true;
2475
+ }
2476
+ return false;
2477
+ }, { timeout })));
2478
+ };
2479
+ this.recursiveMethod = async (callback, condition, timeout, startTime) => {
2480
+ if (Date.now() - timeout >= startTime) {
2481
+ return false;
2482
+ }
2483
+ else if (await condition()) {
2484
+ return await callback();
2485
+ }
2486
+ return await this.recursiveMethod(callback, condition, timeout, startTime);
2487
+ };
2488
+ this.executeRecursively = async ({ callback, condition, timeout = 5000, }) => {
2489
+ const startTime = Date.now();
2490
+ await this.recursiveMethod(callback, condition, timeout, startTime);
2491
+ };
2492
+ this.verifySuccessToast = async ({ message = "", closeAfterVerification = true, } = {}) => {
2493
+ if (!ramda.isEmpty(message)) {
2494
+ await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.toastMessage)).toContainText(message);
2495
+ }
2496
+ else {
2497
+ await test$1.expect(this.page.locator(COMMON_SELECTORS.toastIcon)).toContainText("👍");
2498
+ }
2499
+ closeAfterVerification &&
2500
+ (await this.page.getByTestId(COMMON_SELECTORS.toastCloseButton).click());
2501
+ await test$1.expect(this.page.locator(COMMON_SELECTORS.toastIcon)).toBeHidden();
2502
+ };
2503
+ this.reloadAndWait = async (requestCount, customPageContext, interceptMultipleResponsesProps = {}) => {
2504
+ const pageContext = customPageContext !== null && customPageContext !== void 0 ? customPageContext : this.page;
2505
+ const reloadRequests = this.interceptMultipleResponses({
2506
+ times: requestCount,
2507
+ ...interceptMultipleResponsesProps,
2508
+ });
2509
+ await pageContext.reload();
2510
+ await reloadRequests;
2511
+ };
2512
+ this.apiRequest = async ({ url, failOnStatusCode = true, headers: additionalHeaders, body: data, method = "get", params = {}, ...otherOptions }) => {
2513
+ const csrfToken = await this.page
2514
+ .locator("[name='csrf-token']")
2515
+ .getAttribute("content");
2516
+ const requestOptions = {
2517
+ failOnStatusCode,
2518
+ headers: {
2519
+ ...additionalHeaders,
2520
+ "accept-encoding": "gzip",
2521
+ "x-csrf-token": csrfToken !== null && csrfToken !== void 0 ? csrfToken : "",
2522
+ },
2523
+ data,
2524
+ ...otherOptions,
2525
+ };
2526
+ const formattedUrl = ramda.isEmpty(params)
2527
+ ? url
2528
+ : `${url}?${lib.stringify(params, {
2529
+ arrayFormat: "brackets",
2530
+ })}`;
2531
+ return await this.request[method](formattedUrl, requestOptions);
2532
+ };
2533
+ this.verifyFieldValue = values => {
2534
+ const verifyEachFieldValue = ({ field, value, }) => test$1.expect(this.page.getByTestId(field)).toHaveValue(value);
2535
+ return Array.isArray(values)
2536
+ ? Promise.all(values.map(value => verifyEachFieldValue(value)))
2537
+ : verifyEachFieldValue(values);
2538
+ };
2539
+ this.page = page;
2540
+ this.responses = [];
2541
+ this.request = request;
2542
+ this.baseURL = baseURL;
2543
+ }
2544
+ }
2545
+
2546
+ class MailosaurUtils {
2547
+ constructor(mailosaur) {
2548
+ this.fetchOtpFromEmail = async ({ email, subjectSubstring = OTP_EMAIL_PATTERN, timeout = 2 * 60 * 1000, receivedAfter = new Date(), }) => {
2549
+ var _a, _b, _c;
2550
+ const receivedEmail = await this.mailosaur.messages.get(this.serverId, { sentTo: email, subject: subjectSubstring }, { timeout, receivedAfter });
2551
+ const otp = (_c = (_b = (_a = receivedEmail === null || receivedEmail === void 0 ? void 0 : receivedEmail.text) === null || _a === void 0 ? void 0 : _a.codes) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.value;
2552
+ if (ramda.isNil(otp)) {
2553
+ throw new Error(`No codes found in the email with subject: ${receivedEmail.subject}. Please re-evaluate the filtering parameters.`);
2554
+ }
2555
+ return otp;
2556
+ };
2557
+ this.generateRandomMailosaurEmail = () => faker.faker.internet.email({ provider: `${this.serverId}.mailosaur.net` });
2558
+ this.mailosaur = mailosaur;
2559
+ if (ramda.isNotNil(process.env.MAILOSAUR_SERVER_ID)) {
2560
+ this.serverId = process.env.MAILOSAUR_SERVER_ID;
2561
+ }
2562
+ else {
2563
+ throw new Error("ENV variable MAILOSAUR_SERVER_ID is not defined. Please add the Server ID to use this method. Please visit https://mailosaur.com/app/servers to find the Server ID.");
2564
+ }
2565
+ }
2566
+ }
2567
+
2568
+ const commands = {
2569
+ neetoPlaywrightUtilities: async ({ page, request, baseURL }, use) => {
2570
+ const commands = new CustomCommands(page, request, baseURL);
2571
+ await use(commands);
2572
+ },
2573
+ mailosaur: async ({}, use) => {
2574
+ skipTest.forAllExceptStagingEnv();
2575
+ if (ramda.isNotNil(process.env.MAILOSAUR_API_KEY)) {
2576
+ const mailosaur = new MailosaurClient__default["default"](process.env.MAILOSAUR_API_KEY);
2577
+ await use(mailosaur);
2578
+ }
2579
+ else {
2580
+ throw new Error("ENV variable MAILOSAUR_API_KEY is not defined. Please add the API key to use this fixture. Please visit https://mailosaur.com/app/account/keys to find the API key.");
2581
+ }
2582
+ },
2583
+ page: async ({ page }, use) => {
2584
+ await page.goto("/");
2585
+ await page.waitForLoadState();
2586
+ await use(page);
2587
+ },
2588
+ mailosaurUtils: async ({ mailosaur }, use) => {
2589
+ skipTest.forAllExceptStagingEnv();
2590
+ const mailosaurUtils = new MailosaurUtils(mailosaur);
2591
+ await use(mailosaurUtils);
2592
+ },
2593
+ };
2594
+
2595
+ const generateStagingData = (product = "invoice") => {
2596
+ var _a;
2597
+ const timestamp = `${dayjs__default["default"]().format("MMDDHHmmssSSS")}${(_a = process.env.JOB_COMPLETION_INDEX) !== null && _a !== void 0 ? _a : ""}`;
2598
+ const firstName = "André";
2599
+ const lastName = "O'Reilly";
2600
+ const otpBypassKey = process.env.OTP_BYPASS_KEY;
2601
+ const stagingOrganization = `cpt-${product}-${timestamp}`;
2602
+ return {
2603
+ firstName,
2604
+ lastName,
2605
+ otp: 111111,
2606
+ domain: `neeto${product}.net`,
2607
+ currentUserName: IS_STAGING_ENV
2608
+ ? joinString(firstName, lastName)
2609
+ : CREDENTIALS.name,
2610
+ businessName: stagingOrganization,
2611
+ subdomainName: IS_STAGING_ENV ? stagingOrganization : "spinkart",
2612
+ email: IS_STAGING_ENV
2613
+ ? `cpt${otpBypassKey}+${product}+${timestamp}@bigbinary.com`
2614
+ : CREDENTIALS.email,
2615
+ };
2616
+ };
2617
+
383
2618
  var src = {exports: {}};
384
2619
 
385
2620
  var browser$1 = {exports: {}};
@@ -1140,7 +3375,7 @@ var hasRequiredSupportsColor;
1140
3375
  function requireSupportsColor () {
1141
3376
  if (hasRequiredSupportsColor) return supportsColor_1;
1142
3377
  hasRequiredSupportsColor = 1;
1143
- const os = require$$0__default["default"];
3378
+ const os = require$$0__default$1["default"];
1144
3379
  const tty = require$$1__default["default"];
1145
3380
  const hasFlag = requireHasFlag();
1146
3381
 
@@ -1288,7 +3523,7 @@ function requireNode () {
1288
3523
  hasRequiredNode = 1;
1289
3524
  (function (module, exports) {
1290
3525
  const tty = require$$1__default["default"];
1291
- const util = require$$0__default$1["default"];
3526
+ const util = require$$0__default["default"];
1292
3527
 
1293
3528
  /**
1294
3529
  * This is the Node.js implementation of `debug()`.
@@ -3158,7 +5393,7 @@ class StealthPlugin extends PuppeteerExtraPlugin {
3158
5393
  const defaultExport = opts => new StealthPlugin(opts);
3159
5394
  var puppeteerExtraPluginStealth = defaultExport;
3160
5395
 
3161
- var stealth = test.test.extend({
5396
+ var stealth = test$1.test.extend({
3162
5397
  browser: async ({ browser }, use) => {
3163
5398
  await browser.close();
3164
5399
  chromium.use(puppeteerExtraPluginStealth());
@@ -3286,7 +5521,7 @@ var path$a = {};
3286
5521
 
3287
5522
  Object.defineProperty(path$a, "__esModule", { value: true });
3288
5523
  path$a.convertPosixPathToPattern = path$a.convertWindowsPathToPattern = path$a.convertPathToPattern = path$a.escapePosixPath = path$a.escapeWindowsPath = path$a.escape = path$a.removeLeadingDotSegment = path$a.makeAbsolute = path$a.unixify = void 0;
3289
- const os$1 = require$$0__default["default"];
5524
+ const os$1 = require$$0__default$1["default"];
3290
5525
  const path$9 = require$$0__default$2["default"];
3291
5526
  const IS_WINDOWS_PLATFORM = os$1.platform() === 'win32';
3292
5527
  const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\
@@ -3528,7 +5763,7 @@ var isGlob$1 = function isGlob(str, options) {
3528
5763
 
3529
5764
  var isGlob = isGlob$1;
3530
5765
  var pathPosixDirname = require$$0__default$2["default"].posix.dirname;
3531
- var isWin32 = require$$0__default["default"].platform() === 'win32';
5766
+ var isWin32 = require$$0__default$1["default"].platform() === 'win32';
3532
5767
 
3533
5768
  var slash = '/';
3534
5769
  var backslash = /\\/g;
@@ -4024,7 +6259,7 @@ var toRegexRange_1 = toRegexRange$1;
4024
6259
  * Licensed under the MIT License.
4025
6260
  */
4026
6261
 
4027
- const util$1 = require$$0__default$1["default"];
6262
+ const util$1 = require$$0__default["default"];
4028
6263
  const toRegexRange = toRegexRange_1;
4029
6264
 
4030
6265
  const isObject$1 = val => val !== null && typeof val === 'object' && !Array.isArray(val);
@@ -7061,7 +9296,7 @@ var picomatch_1 = picomatch$1;
7061
9296
  module.exports = picomatch_1;
7062
9297
  } (picomatch$2));
7063
9298
 
7064
- const util = require$$0__default$1["default"];
9299
+ const util = require$$0__default["default"];
7065
9300
  const braces = braces_1;
7066
9301
  const picomatch = picomatch$2.exports;
7067
9302
  const utils$b = utils$f;
@@ -9764,7 +11999,7 @@ var settings = {};
9764
11999
  Object.defineProperty(exports, "__esModule", { value: true });
9765
12000
  exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
9766
12001
  const fs = require$$0__default$4["default"];
9767
- const os = require$$0__default["default"];
12002
+ const os = require$$0__default$1["default"];
9768
12003
  /**
9769
12004
  * The `os.cpus` method can return zero. We expect the number of cores to be greater than zero.
9770
12005
  * https://github.com/nodejs/node/blob/7faeddf23a98c53896f8b574a6e66589e8fb1eb8/lib/os.js#L106-L107
@@ -10101,21 +12336,21 @@ class HelpAndProfilePage {
10101
12336
  constructor({ page, neetoPlaywrightUtilities, chatApiBaseURL, kbDocsBaseURL, changelogBaseURL, }) {
10102
12337
  this.hoverOnBody = () => this.page.locator("body").hover();
10103
12338
  this.openHelpCenterV2 = async () => {
10104
- await test.expect(async () => {
12339
+ await test$1.expect(async () => {
10105
12340
  await this.hoverOnBody();
10106
12341
  const floatingActionMenuButton = this.page.getByTestId(COMMON_SELECTORS.floatingActionMenuButton);
10107
12342
  await floatingActionMenuButton.scrollIntoViewIfNeeded();
10108
12343
  await floatingActionMenuButton.hover();
10109
- await test.expect(this.page.getByTestId(HELP_CENTER_SELECTORS.chatButton)).toBeVisible();
12344
+ await test$1.expect(this.page.getByTestId(HELP_CENTER_SELECTORS.chatButton)).toBeVisible();
10110
12345
  }).toPass({ timeout: 15000 });
10111
12346
  };
10112
12347
  this.openLiveChatAndVerify = async () => {
10113
- await test.expect(async () => {
12348
+ await test$1.expect(async () => {
10114
12349
  await this.openHelpCenterV2();
10115
12350
  await this.page.getByTestId(HELP_CENTER_SELECTORS.chatButton).click();
10116
- await test.expect(this.neetoChatWidget).toBeVisible();
10117
- await test.expect(this.neetoChatSpinner).toBeHidden({ timeout: 20 * 1000 });
10118
- await test.expect(this.neetoChatWidget).toBeVisible();
12351
+ await test$1.expect(this.neetoChatWidget).toBeVisible();
12352
+ await test$1.expect(this.neetoChatSpinner).toBeHidden({ timeout: 20 * 1000 });
12353
+ await test$1.expect(this.neetoChatWidget).toBeVisible();
10119
12354
  }).toPass({ timeout: 45000 });
10120
12355
  };
10121
12356
  this.openAndVerifyChatWidgetV2 = async () => {
@@ -10125,21 +12360,21 @@ class HelpAndProfilePage {
10125
12360
  });
10126
12361
  await this.page.reload();
10127
12362
  await chatInitializationApis;
10128
- await test.test.step("Step 1: Open live chat and verify iframe", this.openLiveChatAndVerify);
10129
- await test.test.step("Step 2: Close and reopen live chat frame", async () => {
12363
+ await test$1.test.step("Step 1: Open live chat and verify iframe", this.openLiveChatAndVerify);
12364
+ await test$1.test.step("Step 2: Close and reopen live chat frame", async () => {
10130
12365
  await this.page.getByTestId(CHAT_WIDGET_SELECTORS.closeChat).click();
10131
- await test.expect(this.neetoChatWidget).toBeHidden({ timeout: 20000 });
12366
+ await test$1.expect(this.neetoChatWidget).toBeHidden({ timeout: 35000 });
10132
12367
  await this.openLiveChatAndVerify();
10133
12368
  });
10134
- await test.test.step("Step 3: Start new conversation", async () => {
12369
+ await test$1.test.step("Step 3: Start new conversation", async () => {
10135
12370
  const newConversationButton = this.neetoChatFrame.getByRole("button", {
10136
12371
  name: CHAT_WIDGET_TEXTS.newConversation,
10137
12372
  });
10138
- await test.expect(newConversationButton).toBeVisible({ timeout: 20000 }); // Adding additional toBeVisible to take advantage of the auto-retrying web-first assertion
12373
+ await test$1.expect(newConversationButton).toBeVisible({ timeout: 35000 }); // Adding additional toBeVisible to take advantage of the auto-retrying web-first assertion
10139
12374
  await newConversationButton.click();
10140
- await test.expect(this.neetoChatSpinner).toBeHidden({ timeout: 20000 });
12375
+ await test$1.expect(this.neetoChatSpinner).toBeHidden({ timeout: 35000 });
10141
12376
  });
10142
- await test.test.step("Step 4: Fill and submit email", async () => {
12377
+ await test$1.test.step("Step 4: Fill and submit email", async () => {
10143
12378
  var _a, _b;
10144
12379
  await this.neetoChatFrame
10145
12380
  .getByTestId(CHAT_WIDGET_SELECTORS.preChatEmailInput)
@@ -10148,42 +12383,42 @@ class HelpAndProfilePage {
10148
12383
  .getByTestId(CHAT_WIDGET_SELECTORS.preChatSubmitButton)
10149
12384
  .getByRole("button")
10150
12385
  .click();
10151
- await test.expect(this.neetoChatSpinner).toBeHidden({ timeout: 20000 });
12386
+ await test$1.expect(this.neetoChatSpinner).toBeHidden({ timeout: 35000 });
10152
12387
  });
10153
- await test.test.step("Step 5: Verify conversation window", async () => {
10154
- await test.expect(this.neetoChatFrame.getByTestId(CHAT_WIDGET_SELECTORS.chatBubble)).toHaveText(CHAT_WIDGET_TEXTS.welcomeChatBubble);
12388
+ await test$1.test.step("Step 5: Verify conversation window", async () => {
12389
+ await test$1.expect(this.neetoChatFrame.getByTestId(CHAT_WIDGET_SELECTORS.chatBubble)).toHaveText(CHAT_WIDGET_TEXTS.welcomeChatBubble);
10155
12390
  });
10156
12391
  };
10157
12392
  this.openAndVerifyHelpArticlesV2 = async () => {
10158
- await test.test.step("Step 1: Open Help Center links", this.openHelpCenterV2);
10159
- await test.test.step("Step 2: Open and verify help articles link", async () => {
12393
+ await test$1.test.step("Step 1: Open Help Center links", this.openHelpCenterV2);
12394
+ await test$1.test.step("Step 2: Open and verify help articles link", async () => {
10160
12395
  const helpArticlesPromise = this.page.waitForEvent("popup");
10161
12396
  await this.page
10162
12397
  .getByTestId(HELP_CENTER_SELECTORS.documentationButton)
10163
12398
  .click();
10164
12399
  const helpArticlesPage = await helpArticlesPromise;
10165
12400
  await helpArticlesPage.waitForLoadState();
10166
- await test.expect(helpArticlesPage).toHaveURL(this.kbDocsBaseURL);
12401
+ await test$1.expect(helpArticlesPage).toHaveURL(this.kbDocsBaseURL);
10167
12402
  await helpArticlesPage.close();
10168
12403
  });
10169
12404
  };
10170
12405
  this.openChangelogPaneV2 = async () => {
10171
- await test.expect(async () => {
12406
+ await test$1.expect(async () => {
10172
12407
  await this.openHelpCenterV2();
10173
12408
  await this.page.getByTestId(HELP_CENTER_SELECTORS.whatsNewButton).click();
10174
- await test.expect(this.page.locator(CHANGELOG_WIDGET_SELECTORS.changelogWrapper)).toBeVisible();
12409
+ await test$1.expect(this.page.locator(CHANGELOG_WIDGET_SELECTORS.changelogWrapper)).toBeVisible();
10175
12410
  }).toPass({ timeout: 45000 });
10176
12411
  };
10177
12412
  this.openAndVerifyChangelogV2 = async () => {
10178
- await test.test.step("Step 1: Open Help Center links and changelog", this.openChangelogPaneV2);
10179
- await test.test.step("Step 2: Close and reopen changelog pane", async () => {
12413
+ await test$1.test.step("Step 1: Open Help Center links and changelog", this.openChangelogPaneV2);
12414
+ await test$1.test.step("Step 2: Close and reopen changelog pane", async () => {
10180
12415
  await this.page
10181
12416
  .getByTestId(CHANGELOG_WIDGET_SELECTORS.closeButton)
10182
12417
  .click();
10183
- await test.expect(this.page.locator(CHANGELOG_WIDGET_SELECTORS.changelogWrapper)).toBeHidden();
12418
+ await test$1.expect(this.page.locator(CHANGELOG_WIDGET_SELECTORS.changelogWrapper)).toBeHidden();
10184
12419
  await this.openChangelogPaneV2();
10185
12420
  });
10186
- await test.test.step("Step 3: Open and verify public URL", async () => {
12421
+ await test$1.test.step("Step 3: Open and verify public URL", async () => {
10187
12422
  const changelogPagePromise = this.page.waitForEvent("popup");
10188
12423
  await this.page
10189
12424
  .getByTestId(CHANGELOG_WIDGET_SELECTORS.publicUrlLink)
@@ -10194,7 +12429,7 @@ class HelpAndProfilePage {
10194
12429
  baseUrl: this.changelogBaseURL.split("/site")[0],
10195
12430
  times: 3,
10196
12431
  });
10197
- await test.expect(changelogPage).toHaveURL(this.changelogBaseURL);
12432
+ await test$1.expect(changelogPage).toHaveURL(this.changelogBaseURL);
10198
12433
  await changelogPage.close();
10199
12434
  });
10200
12435
  };
@@ -10222,42 +12457,42 @@ class HelpAndProfilePage {
10222
12457
  },
10223
12458
  ];
10224
12459
  const shortcuts = [...globalShortcuts, ...productShortcuts];
10225
- await test.test.step("Step 1: Open Help Center", this.openHelpCenterV2);
10226
- await test.test.step("Step 2: Open and close keyboard shortcuts from UI", async () => {
12460
+ await test$1.test.step("Step 1: Open Help Center", this.openHelpCenterV2);
12461
+ await test$1.test.step("Step 2: Open and close keyboard shortcuts from UI", async () => {
10227
12462
  await this.page
10228
12463
  .getByTestId(HELP_CENTER_SELECTORS.keyboardShortcutButton)
10229
12464
  .click();
10230
- await test.expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).not.toHaveCSS("width", "1px");
12465
+ await test$1.expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).not.toHaveCSS("width", "1px");
10231
12466
  await this.page
10232
12467
  .getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.closePaneButton)
10233
12468
  .click();
10234
- await test.expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).toHaveCSS("width", "1px");
12469
+ await test$1.expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).toHaveCSS("width", "1px");
10235
12470
  });
10236
- await test.test.step("Step 3: Open and close keyboard shortcuts through shortcut", async () => {
12471
+ await test$1.test.step("Step 3: Open and close keyboard shortcuts through shortcut", async () => {
10237
12472
  await this.page.keyboard.press("Shift+/");
10238
- await test.expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).not.toHaveCSS("width", "1px");
12473
+ await test$1.expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).not.toHaveCSS("width", "1px");
10239
12474
  await this.page.keyboard.press("Escape");
10240
- await test.expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).toHaveCSS("width", "1px");
12475
+ await test$1.expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).toHaveCSS("width", "1px");
10241
12476
  });
10242
- await test.test.step("Step 4: Verify all displayed keyboard shortcuts", async () => {
12477
+ await test$1.test.step("Step 4: Verify all displayed keyboard shortcuts", async () => {
10243
12478
  await this.page.keyboard.press("Shift+/");
10244
- await test.expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).not.toHaveCSS("width", "1px");
10245
- await test.expect(this.page
12479
+ await test$1.expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).not.toHaveCSS("width", "1px");
12480
+ await test$1.expect(this.page
10246
12481
  .getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.hotKeyItem)
10247
12482
  .locator("p")).toHaveText(shortcuts.map(shortcut => shortcut.description));
10248
12483
  const formattedSequences = shortcuts.map(shortcut => this.formatKeyboardShortcut(shortcut.sequence, osPlatform));
10249
- await test.expect(this.page
12484
+ await test$1.expect(this.page
10250
12485
  .getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.hotKeyItem)
10251
12486
  .locator("div")).toHaveText(formattedSequences);
10252
12487
  });
10253
12488
  };
10254
12489
  this.openAppSwitcherAndVerifyV2 = async () => {
10255
- await test.test.step("Step 1: Verify hovering over app switcher opens the app switcher drawer", () => test.expect(async () => {
12490
+ await test$1.test.step("Step 1: Verify hovering over app switcher opens the app switcher drawer", () => test$1.expect(async () => {
10256
12491
  await this.openHelpCenterV2();
10257
12492
  await this.page
10258
12493
  .getByTestId(COMMON_SELECTORS.appSwitcherButton)
10259
12494
  .hover();
10260
- await test.expect(this.page.getByTestId(COMMON_SELECTORS.appSwitcherWrapper)).toBeVisible();
12495
+ await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.appSwitcherWrapper)).toBeVisible();
10261
12496
  }).toPass({ timeout: 45000 }));
10262
12497
  };
10263
12498
  this.openAuthLinkAndVerify = async ({ linkSelector, redirectLink, }) => {
@@ -10266,18 +12501,18 @@ class HelpAndProfilePage {
10266
12501
  await this.page.getByTestId(linkSelector).click();
10267
12502
  const profilePage = await profilePagePromise;
10268
12503
  await profilePage.waitForLoadState();
10269
- await test.expect(profilePage).toHaveURL(new RegExp(NEETO_AUTH_BASE_URL((_b = (_a = readFileSyncIfExists()) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? void 0 : _b.subdomainName)));
10270
- await test.expect(profilePage).toHaveURL(new RegExp(redirectLink));
12504
+ await test$1.expect(profilePage).toHaveURL(new RegExp(NEETO_AUTH_BASE_URL((_b = (_a = readFileSyncIfExists()) === null || _a === void 0 ? void 0 : _a.user) === null || _b === void 0 ? void 0 : _b.subdomainName)));
12505
+ await test$1.expect(profilePage).toHaveURL(new RegExp(redirectLink));
10271
12506
  await profilePage.close();
10272
12507
  };
10273
12508
  this.verifyProfileAndOrganizationLinksV2 = async () => {
10274
- await test.test.step("Step 1: Open Help center and verify", this.openHelpCenterV2);
10275
- await test.test.step("Step 2: Open My profile link and verify", async () => this.openAuthLinkAndVerify({
12509
+ await test$1.test.step("Step 1: Open Help center and verify", this.openHelpCenterV2);
12510
+ await test$1.test.step("Step 2: Open My profile link and verify", async () => this.openAuthLinkAndVerify({
10276
12511
  linkSelector: PROFILE_SECTION_SELECTORS.myProfileButton,
10277
12512
  redirectLink: ROUTES.myProfile,
10278
12513
  }));
10279
- await test.test.step("Step 3: Open Help center and verify", this.openHelpCenterV2);
10280
- await test.test.step("Step 4: Open My organization link and verify", async () => this.openAuthLinkAndVerify({
12514
+ await test$1.test.step("Step 3: Open Help center and verify", this.openHelpCenterV2);
12515
+ await test$1.test.step("Step 4: Open My organization link and verify", async () => this.openAuthLinkAndVerify({
10281
12516
  linkSelector: PROFILE_SECTION_SELECTORS.profileOrganizationSettingsButton,
10282
12517
  redirectLink: ROUTES.authSettings,
10283
12518
  }));
@@ -10285,16 +12520,16 @@ class HelpAndProfilePage {
10285
12520
  this.verifyLogoutV2 = async () => {
10286
12521
  if (shouldSkipSetupAndTeardown())
10287
12522
  return;
10288
- await test.test.step("Step 1: Open Help center and verify", this.openHelpCenterV2);
10289
- await test.test.step("Step 2: Click logout and verify", async () => {
12523
+ await test$1.test.step("Step 1: Open Help center and verify", this.openHelpCenterV2);
12524
+ await test$1.test.step("Step 2: Click logout and verify", async () => {
10290
12525
  await this.page
10291
12526
  .getByTestId(PROFILE_SECTION_SELECTORS.logoutButton)
10292
12527
  .click();
10293
12528
  process.env.TEST_ENV === ENVIRONMENT.staging &&
10294
- (await test.expect(this.page).toHaveURL(new RegExp(NEETO_AUTH_BASE_URL()), {
12529
+ (await test$1.expect(this.page).toHaveURL(new RegExp(NEETO_AUTH_BASE_URL()), {
10295
12530
  timeout: 15000,
10296
12531
  }));
10297
- await test.expect(this.page).toHaveURL(new RegExp(ROUTES.loginLink), {
12532
+ await test$1.expect(this.page).toHaveURL(new RegExp(ROUTES.loginLink), {
10298
12533
  timeout: 15000,
10299
12534
  });
10300
12535
  });
@@ -10338,7 +12573,7 @@ class IntegrationBase {
10338
12573
  this.connect = async (skipGoTo) => {
10339
12574
  !skipGoTo && (await this.gotoIntegrationIndex());
10340
12575
  await this.clickOnIntegrationCard();
10341
- await test.expect(this.page.getByRole("heading", {
12576
+ await test$1.expect(this.page.getByRole("heading", {
10342
12577
  name: this.connectHeader,
10343
12578
  })).toBeVisible();
10344
12579
  await this.page.getByTestId(INTEGRATION_SELECTORS.connectButton).click();
@@ -10346,17 +12581,17 @@ class IntegrationBase {
10346
12581
  this.verifyIntegrationStatus = async (status = "connected") => {
10347
12582
  await this.gotoIntegrationIndex();
10348
12583
  if (status === "connected") {
10349
- await test.expect(this.integrationCard.getByTestId(INTEGRATION_SELECTORS.integrationStatusTag)).toBeVisible({ timeout: 10000 });
12584
+ await test$1.expect(this.integrationCard.getByTestId(INTEGRATION_SELECTORS.integrationStatusTag)).toBeVisible({ timeout: 10000 });
10350
12585
  }
10351
12586
  await this.clickOnIntegrationCard();
10352
12587
  const header = status === "connected" ? this.connectedHeader : this.connectHeader;
10353
- await test.expect(this.page.getByRole("heading", { name: header })).toBeVisible();
12588
+ await test$1.expect(this.page.getByRole("heading", { name: header })).toBeVisible();
10354
12589
  };
10355
12590
  this.clickOnIntegrationCard = async () => {
10356
- await test.expect(this.page.getByTestId(COMMON_SELECTORS.spinner)).toHaveCount(0);
12591
+ await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.spinner)).toHaveCount(0);
10357
12592
  await this.integrationCard.scrollIntoViewIfNeeded();
10358
12593
  await this.integrationCard.click();
10359
- await test.expect(this.page.getByTestId(COMMON_SELECTORS.pageLoader)).toBeHidden();
12594
+ await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.pageLoader)).toBeHidden();
10360
12595
  };
10361
12596
  this.gotoIntegrationIndex = async () => {
10362
12597
  neetoCist.isNotEmpty(this.integrationRouteIndex) &&
@@ -10413,19 +12648,19 @@ class SlackPage extends IntegrationBase {
10413
12648
  const allowButton = this.page.getByRole("button", {
10414
12649
  name: SLACK_WEB_TEXTS.allow,
10415
12650
  });
10416
- await test.expect(allowButton).toBeEnabled({ timeout: 20000 });
12651
+ await test$1.expect(allowButton).toBeEnabled({ timeout: 20000 });
10417
12652
  const currentWorkspace = (await this.page
10418
12653
  .locator(SLACK_SELECTORS.teamPicketButtonContent)
10419
12654
  .textContent()) || "";
10420
12655
  await allowButton.click();
10421
12656
  await this.page.waitForURL(redirectUrl);
10422
- await test.expect(this.page.getByTestId(COMMON_SELECTORS.pageLoader)).toBeHidden({ timeout: 10000 });
10423
- await test.expect(this.page.getByRole("heading", {
12657
+ await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.pageLoader)).toBeHidden({ timeout: 10000 });
12658
+ await test$1.expect(this.page.getByRole("heading", {
10424
12659
  name: this.t("neetoSlack.slack.configure.title", {
10425
12660
  teamName: currentWorkspace,
10426
12661
  }),
10427
12662
  })).toBeVisible();
10428
- await test.expect(this.page.getByTestId(COMMON_SELECTORS.selectValueContainer)).toContainText(SLACK_DEFAULT_CHANNEL);
12663
+ await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.selectValueContainer)).toContainText(SLACK_DEFAULT_CHANNEL);
10429
12664
  await this.page
10430
12665
  .getByRole("button", { name: this.t("neetoSlack.common.continue") })
10431
12666
  .click();
@@ -10433,7 +12668,7 @@ class SlackPage extends IntegrationBase {
10433
12668
  await customSteps();
10434
12669
  }
10435
12670
  else {
10436
- await test.expect(this.page.getByRole("heading", {
12671
+ await test$1.expect(this.page.getByRole("heading", {
10437
12672
  name: this.t("neetoSlack.slack.finish.title", {
10438
12673
  teamName: currentWorkspace,
10439
12674
  }),
@@ -10535,22 +12770,22 @@ class WebhooksPage {
10535
12770
  const addWebhook = this.neetoPlaywrightUtilities.interceptMultipleResponses({ responseUrl: ROUTES.webhooks, times: 2 });
10536
12771
  await this.page.getByTestId(COMMON_SELECTORS.saveChangesButton).click();
10537
12772
  await addWebhook;
10538
- await test.expect(this.page.getByRole("row", { name: webhookSiteURL })).toBeVisible();
12773
+ await test$1.expect(this.page.getByRole("row", { name: webhookSiteURL })).toBeVisible();
10539
12774
  };
10540
12775
  this.verifyLatestWebhookResponse = async ({ callback = () => { }, webhookToken, ...otherParams }) => {
10541
12776
  let response;
10542
- await test.expect(async () => {
12777
+ await test$1.expect(async () => {
10543
12778
  response = await this.request.get(`https://webhook.site/token/${webhookToken}/request/latest`);
10544
- test.expect(response.status()).toBe(200);
12779
+ test$1.expect(response.status()).toBe(200);
10545
12780
  if (response.status() === 200) {
10546
12781
  const { content } = await response.json();
10547
12782
  const parsedResponse = JSON.parse(content).webhook;
10548
12783
  callback({ parsedResponse, ...otherParams });
10549
12784
  }
10550
- }).toPass({ timeout: 10000 });
12785
+ }).toPass({ timeout: 20000 });
10551
12786
  };
10552
12787
  this.verifyWebhookDeliveries = async ({ callback = () => { }, ...otherParams }) => {
10553
- await test.expect(this.page.getByTestId(WEBHOOK_SELECTORS.deliveryResponseCode)).toHaveText("200");
12788
+ await test$1.expect(this.page.getByTestId(WEBHOOK_SELECTORS.deliveryResponseCode)).toHaveText("200");
10554
12789
  const requestPayload = (await this.page
10555
12790
  .getByTestId(WEBHOOK_SELECTORS.deliveryRequestPayload)
10556
12791
  .textContent());
@@ -10681,7 +12916,7 @@ class OrganizationPage {
10681
12916
  subdomainName: user.subdomainName,
10682
12917
  appName: `neeto${product}`,
10683
12918
  });
10684
- await test.expect(this.page.locator(COMMON_SELECTORS.spinner)).toBeHidden();
12919
+ await test$1.expect(this.page.locator(COMMON_SELECTORS.spinner)).toBeHidden();
10685
12920
  const userCredentials = readFileSyncIfExists();
10686
12921
  await this.page.context().storageState({ path: STORAGE_STATE });
10687
12922
  const mergedCredentials = ramda.mergeAll([
@@ -10964,10 +13199,10 @@ const memberUtils = {
10964
13199
 
10965
13200
  const assertColumnHeaderVisibility = async ({ page, columnName, shouldBeVisible, }) => {
10966
13201
  const visibilityAssertion = shouldBeVisible ? "toBeVisible" : "toBeHidden";
10967
- await test.expect(page.getByRole("columnheader", { name: columnName }))[visibilityAssertion]();
13202
+ await test$1.expect(page.getByRole("columnheader", { name: columnName }))[visibilityAssertion]();
10968
13203
  };
10969
13204
  const verifyTableColumnsExistence = async ({ page, columnNames, }) => {
10970
- await Promise.all(columnNames.map(columnName => test.expect(page.getByRole("columnheader", { name: columnName, exact: true })).toBeVisible()));
13205
+ await Promise.all(columnNames.map(columnName => test$1.expect(page.getByRole("columnheader", { name: columnName, exact: true })).toBeVisible()));
10971
13206
  };
10972
13207
  const toggleColumnCheckboxAndVerifyVisibility = async ({ page, tableColumns, shouldBeChecked, }) => {
10973
13208
  await page.getByTestId(COMMON_SELECTORS.columnsDropdownButton).click();
@@ -10982,8 +13217,8 @@ const toggleColumnCheckboxAndVerifyVisibility = async ({ page, tableColumns, sho
10982
13217
  await checkbox.click();
10983
13218
  }
10984
13219
  shouldBeChecked
10985
- ? await test.expect(checkbox).toBeChecked()
10986
- : await test.expect(checkbox).not.toBeChecked();
13220
+ ? await test$1.expect(checkbox).toBeChecked()
13221
+ : await test$1.expect(checkbox).not.toBeChecked();
10987
13222
  }
10988
13223
  await page.getByTestId(COMMON_SELECTORS.columnsDropdownButton).click();
10989
13224
  for (const columnName of tableColumns) {
@@ -11001,8 +13236,8 @@ const tableUtils = {
11001
13236
  };
11002
13237
 
11003
13238
  const verifyBreadcrumbs = async ({ page, titlesAndRoutes, }) => {
11004
- await test.expect(page.getByTestId(COMMON_SELECTORS.breadcrumbHeader)).toHaveCount(titlesAndRoutes.length);
11005
- await Promise.all(titlesAndRoutes.map(({ title, route }) => test.expect(page.getByTestId(COMMON_SELECTORS.breadcrumbHeader).getByRole("link", {
13239
+ await test$1.expect(page.getByTestId(COMMON_SELECTORS.breadcrumbHeader)).toHaveCount(titlesAndRoutes.length);
13240
+ await Promise.all(titlesAndRoutes.map(({ title, route }) => test$1.expect(page.getByTestId(COMMON_SELECTORS.breadcrumbHeader).getByRole("link", {
11006
13241
  name: title,
11007
13242
  exact: true,
11008
13243
  })).toHaveAttribute("href", route)));
@@ -11095,7 +13330,7 @@ var require$$4 = {
11095
13330
 
11096
13331
  const fs = require$$0__default$4["default"];
11097
13332
  const path = require$$0__default$2["default"];
11098
- const os = require$$0__default["default"];
13333
+ const os = require$$0__default$1["default"];
11099
13334
  const crypto = require$$3__default["default"];
11100
13335
  const packageJson = require$$4;
11101
13336
 
@@ -11509,7 +13744,7 @@ const currentsConfig = {
11509
13744
  const isCI = [ENVIRONMENT.staging, ENVIRONMENT.review].includes((_b = process.env.TEST_ENV) !== null && _b !== void 0 ? _b : ENVIRONMENT.development) && !!process.env.NEETO_CI_JOB_ID;
11510
13745
  const definePlaywrightConfig = (overrides) => {
11511
13746
  const { globalOverrides = {}, useOverrides = {}, useCustomProjects = false, projectOverrides = [], currentsOverrides = {}, } = overrides;
11512
- return test.defineConfig({
13747
+ return test$1.defineConfig({
11513
13748
  testDir: "./e2e/tests",
11514
13749
  fullyParallel: true,
11515
13750
  forbidOnly: isCI,
@@ -11541,7 +13776,7 @@ const definePlaywrightConfig = (overrides) => {
11541
13776
  },
11542
13777
  {
11543
13778
  name: "chromium",
11544
- use: { ...test.devices["Desktop Chrome"], storageState: STORAGE_STATE },
13779
+ use: { ...test$1.devices["Desktop Chrome"], storageState: STORAGE_STATE },
11545
13780
  dependencies: ["setup"],
11546
13781
  },
11547
13782
  { name: "cleanup credentials", testMatch: "global.teardown.ts" },