@bigbinary/neeto-playwright-commons 1.8.22 → 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.js CHANGED
@@ -1,18 +1,18 @@
1
- import test, { expect, test as test$1, defineConfig, devices } from '@playwright/test';
1
+ import test$1, { expect, test as test$2, defineConfig, devices } from '@playwright/test';
2
2
  import * as require$$0$1 from 'fs';
3
3
  import require$$0__default from 'fs';
4
+ import require$$0$2 from 'util';
4
5
  import { isEmpty as isEmpty$1, isNil, isNotNil, mergeDeepLeft, mergeAll } from 'ramda';
5
6
  import { faker } from '@faker-js/faker';
6
7
  import MailosaurClient from 'mailosaur';
7
8
  import dayjs from 'dayjs';
8
9
  import require$$1 from 'tty';
9
- import require$$0$3 from 'util';
10
- import require$$0$2 from 'os';
10
+ import require$$0$3 from 'os';
11
11
  import require$$0$4 from 'path';
12
12
  import require$$0$5 from 'stream';
13
13
  import require$$0$6 from 'events';
14
14
  import { getI18nInstance, initI18n } from 'playwright-i18next-fixture';
15
- import { humanize, isNotEmpty } from '@bigbinary/neeto-cist';
15
+ import { isNotEmpty, humanize } from '@bigbinary/neeto-cist';
16
16
  import require$$3 from 'crypto';
17
17
 
18
18
  const ENVIRONMENT = {
@@ -89,9 +89,9 @@ const hyphenize = input => {
89
89
  };
90
90
  const joinHyphenCase = (...args) => args.join(" ").replace(/\s+/g, "-").toLowerCase();
91
91
  const skipTest = {
92
- forDevelopmentEnv: () => test.skip(process.env.TEST_ENV === ENVIRONMENT.development),
93
- forReviewEnv: () => test.skip(process.env.TEST_ENV === ENVIRONMENT.review),
94
- forAllExceptStagingEnv: () => test.skip(process.env.TEST_ENV !== ENVIRONMENT.staging),
92
+ forDevelopmentEnv: () => test$1.skip(process.env.TEST_ENV === ENVIRONMENT.development),
93
+ forReviewEnv: () => test$1.skip(process.env.TEST_ENV === ENVIRONMENT.review),
94
+ forAllExceptStagingEnv: () => test$1.skip(process.env.TEST_ENV !== ENVIRONMENT.staging),
95
95
  };
96
96
  const shouldSkipSetupAndTeardown = () => { var _a; return ((_a = getGlobalUserState()) === null || _a === void 0 ? void 0 : _a.isLoggedIn) && process.env.SKIP_SETUP === "true"; };
97
97
 
@@ -158,6 +158,2271 @@ const COMMON_SELECTORS = {
158
158
  breadcrumbHeader: "header-breadcrumb",
159
159
  };
160
160
 
161
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
162
+
163
+ function getDefaultExportFromCjs (x) {
164
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
165
+ }
166
+
167
+ function getAugmentedNamespace(n) {
168
+ var f = n.default;
169
+ if (typeof f == "function") {
170
+ var a = function () {
171
+ return f.apply(this, arguments);
172
+ };
173
+ a.prototype = f.prototype;
174
+ } else a = {};
175
+ Object.defineProperty(a, '__esModule', {value: true});
176
+ Object.keys(n).forEach(function (k) {
177
+ var d = Object.getOwnPropertyDescriptor(n, k);
178
+ Object.defineProperty(a, k, d.get ? d : {
179
+ enumerable: true,
180
+ get: function () {
181
+ return n[k];
182
+ }
183
+ });
184
+ });
185
+ return a;
186
+ }
187
+
188
+ /* eslint complexity: [2, 18], max-statements: [2, 33] */
189
+ var shams = function hasSymbols() {
190
+ if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
191
+ if (typeof Symbol.iterator === 'symbol') { return true; }
192
+
193
+ var obj = {};
194
+ var sym = Symbol('test');
195
+ var symObj = Object(sym);
196
+ if (typeof sym === 'string') { return false; }
197
+
198
+ if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
199
+ if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
200
+
201
+ // temp disabled per https://github.com/ljharb/object.assign/issues/17
202
+ // if (sym instanceof Symbol) { return false; }
203
+ // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
204
+ // if (!(symObj instanceof Symbol)) { return false; }
205
+
206
+ // if (typeof Symbol.prototype.toString !== 'function') { return false; }
207
+ // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
208
+
209
+ var symVal = 42;
210
+ obj[sym] = symVal;
211
+ for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
212
+ if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
213
+
214
+ if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
215
+
216
+ var syms = Object.getOwnPropertySymbols(obj);
217
+ if (syms.length !== 1 || syms[0] !== sym) { return false; }
218
+
219
+ if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
220
+
221
+ if (typeof Object.getOwnPropertyDescriptor === 'function') {
222
+ var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
223
+ if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
224
+ }
225
+
226
+ return true;
227
+ };
228
+
229
+ var origSymbol = typeof Symbol !== 'undefined' && Symbol;
230
+ var hasSymbolSham = shams;
231
+
232
+ var hasSymbols$1 = function hasNativeSymbols() {
233
+ if (typeof origSymbol !== 'function') { return false; }
234
+ if (typeof Symbol !== 'function') { return false; }
235
+ if (typeof origSymbol('foo') !== 'symbol') { return false; }
236
+ if (typeof Symbol('bar') !== 'symbol') { return false; }
237
+
238
+ return hasSymbolSham();
239
+ };
240
+
241
+ var test = {
242
+ foo: {}
243
+ };
244
+
245
+ var $Object = Object;
246
+
247
+ var hasProto$1 = function hasProto() {
248
+ return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);
249
+ };
250
+
251
+ /* eslint no-invalid-this: 1 */
252
+
253
+ var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
254
+ var toStr$1 = Object.prototype.toString;
255
+ var max = Math.max;
256
+ var funcType = '[object Function]';
257
+
258
+ var concatty = function concatty(a, b) {
259
+ var arr = [];
260
+
261
+ for (var i = 0; i < a.length; i += 1) {
262
+ arr[i] = a[i];
263
+ }
264
+ for (var j = 0; j < b.length; j += 1) {
265
+ arr[j + a.length] = b[j];
266
+ }
267
+
268
+ return arr;
269
+ };
270
+
271
+ var slicy = function slicy(arrLike, offset) {
272
+ var arr = [];
273
+ for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
274
+ arr[j] = arrLike[i];
275
+ }
276
+ return arr;
277
+ };
278
+
279
+ var joiny = function (arr, joiner) {
280
+ var str = '';
281
+ for (var i = 0; i < arr.length; i += 1) {
282
+ str += arr[i];
283
+ if (i + 1 < arr.length) {
284
+ str += joiner;
285
+ }
286
+ }
287
+ return str;
288
+ };
289
+
290
+ var implementation$1 = function bind(that) {
291
+ var target = this;
292
+ if (typeof target !== 'function' || toStr$1.apply(target) !== funcType) {
293
+ throw new TypeError(ERROR_MESSAGE + target);
294
+ }
295
+ var args = slicy(arguments, 1);
296
+
297
+ var bound;
298
+ var binder = function () {
299
+ if (this instanceof bound) {
300
+ var result = target.apply(
301
+ this,
302
+ concatty(args, arguments)
303
+ );
304
+ if (Object(result) === result) {
305
+ return result;
306
+ }
307
+ return this;
308
+ }
309
+ return target.apply(
310
+ that,
311
+ concatty(args, arguments)
312
+ );
313
+
314
+ };
315
+
316
+ var boundLength = max(0, target.length - args.length);
317
+ var boundArgs = [];
318
+ for (var i = 0; i < boundLength; i++) {
319
+ boundArgs[i] = '$' + i;
320
+ }
321
+
322
+ bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
323
+
324
+ if (target.prototype) {
325
+ var Empty = function Empty() {};
326
+ Empty.prototype = target.prototype;
327
+ bound.prototype = new Empty();
328
+ Empty.prototype = null;
329
+ }
330
+
331
+ return bound;
332
+ };
333
+
334
+ var implementation = implementation$1;
335
+
336
+ var functionBind = Function.prototype.bind || implementation;
337
+
338
+ var call = Function.prototype.call;
339
+ var $hasOwn = Object.prototype.hasOwnProperty;
340
+ var bind$1 = functionBind;
341
+
342
+ /** @type {(o: {}, p: PropertyKey) => p is keyof o} */
343
+ var hasown = bind$1.call(call, $hasOwn);
344
+
345
+ var undefined$1;
346
+
347
+ var $SyntaxError$1 = SyntaxError;
348
+ var $Function = Function;
349
+ var $TypeError$3 = TypeError;
350
+
351
+ // eslint-disable-next-line consistent-return
352
+ var getEvalledConstructor = function (expressionSyntax) {
353
+ try {
354
+ return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
355
+ } catch (e) {}
356
+ };
357
+
358
+ var $gOPD$1 = Object.getOwnPropertyDescriptor;
359
+ if ($gOPD$1) {
360
+ try {
361
+ $gOPD$1({}, '');
362
+ } catch (e) {
363
+ $gOPD$1 = null; // this is IE 8, which has a broken gOPD
364
+ }
365
+ }
366
+
367
+ var throwTypeError = function () {
368
+ throw new $TypeError$3();
369
+ };
370
+ var ThrowTypeError = $gOPD$1
371
+ ? (function () {
372
+ try {
373
+ // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
374
+ arguments.callee; // IE 8 does not throw here
375
+ return throwTypeError;
376
+ } catch (calleeThrows) {
377
+ try {
378
+ // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
379
+ return $gOPD$1(arguments, 'callee').get;
380
+ } catch (gOPDthrows) {
381
+ return throwTypeError;
382
+ }
383
+ }
384
+ }())
385
+ : throwTypeError;
386
+
387
+ var hasSymbols = hasSymbols$1();
388
+ var hasProto = hasProto$1();
389
+
390
+ var getProto = Object.getPrototypeOf || (
391
+ hasProto
392
+ ? function (x) { return x.__proto__; } // eslint-disable-line no-proto
393
+ : null
394
+ );
395
+
396
+ var needsEval = {};
397
+
398
+ var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined$1 : getProto(Uint8Array);
399
+
400
+ var INTRINSICS = {
401
+ '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
402
+ '%Array%': Array,
403
+ '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
404
+ '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined$1,
405
+ '%AsyncFromSyncIteratorPrototype%': undefined$1,
406
+ '%AsyncFunction%': needsEval,
407
+ '%AsyncGenerator%': needsEval,
408
+ '%AsyncGeneratorFunction%': needsEval,
409
+ '%AsyncIteratorPrototype%': needsEval,
410
+ '%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
411
+ '%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
412
+ '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$1 : BigInt64Array,
413
+ '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$1 : BigUint64Array,
414
+ '%Boolean%': Boolean,
415
+ '%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
416
+ '%Date%': Date,
417
+ '%decodeURI%': decodeURI,
418
+ '%decodeURIComponent%': decodeURIComponent,
419
+ '%encodeURI%': encodeURI,
420
+ '%encodeURIComponent%': encodeURIComponent,
421
+ '%Error%': Error,
422
+ '%eval%': eval, // eslint-disable-line no-eval
423
+ '%EvalError%': EvalError,
424
+ '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
425
+ '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
426
+ '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
427
+ '%Function%': $Function,
428
+ '%GeneratorFunction%': needsEval,
429
+ '%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
430
+ '%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
431
+ '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
432
+ '%isFinite%': isFinite,
433
+ '%isNaN%': isNaN,
434
+ '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
435
+ '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
436
+ '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
437
+ '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
438
+ '%Math%': Math,
439
+ '%Number%': Number,
440
+ '%Object%': Object,
441
+ '%parseFloat%': parseFloat,
442
+ '%parseInt%': parseInt,
443
+ '%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
444
+ '%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
445
+ '%RangeError%': RangeError,
446
+ '%ReferenceError%': ReferenceError,
447
+ '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
448
+ '%RegExp%': RegExp,
449
+ '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
450
+ '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
451
+ '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
452
+ '%String%': String,
453
+ '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined$1,
454
+ '%Symbol%': hasSymbols ? Symbol : undefined$1,
455
+ '%SyntaxError%': $SyntaxError$1,
456
+ '%ThrowTypeError%': ThrowTypeError,
457
+ '%TypedArray%': TypedArray,
458
+ '%TypeError%': $TypeError$3,
459
+ '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
460
+ '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
461
+ '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
462
+ '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
463
+ '%URIError%': URIError,
464
+ '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
465
+ '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
466
+ '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
467
+ };
468
+
469
+ if (getProto) {
470
+ try {
471
+ null.error; // eslint-disable-line no-unused-expressions
472
+ } catch (e) {
473
+ // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
474
+ var errorProto = getProto(getProto(e));
475
+ INTRINSICS['%Error.prototype%'] = errorProto;
476
+ }
477
+ }
478
+
479
+ var doEval = function doEval(name) {
480
+ var value;
481
+ if (name === '%AsyncFunction%') {
482
+ value = getEvalledConstructor('async function () {}');
483
+ } else if (name === '%GeneratorFunction%') {
484
+ value = getEvalledConstructor('function* () {}');
485
+ } else if (name === '%AsyncGeneratorFunction%') {
486
+ value = getEvalledConstructor('async function* () {}');
487
+ } else if (name === '%AsyncGenerator%') {
488
+ var fn = doEval('%AsyncGeneratorFunction%');
489
+ if (fn) {
490
+ value = fn.prototype;
491
+ }
492
+ } else if (name === '%AsyncIteratorPrototype%') {
493
+ var gen = doEval('%AsyncGenerator%');
494
+ if (gen && getProto) {
495
+ value = getProto(gen.prototype);
496
+ }
497
+ }
498
+
499
+ INTRINSICS[name] = value;
500
+
501
+ return value;
502
+ };
503
+
504
+ var LEGACY_ALIASES = {
505
+ '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
506
+ '%ArrayPrototype%': ['Array', 'prototype'],
507
+ '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
508
+ '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
509
+ '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
510
+ '%ArrayProto_values%': ['Array', 'prototype', 'values'],
511
+ '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
512
+ '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
513
+ '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
514
+ '%BooleanPrototype%': ['Boolean', 'prototype'],
515
+ '%DataViewPrototype%': ['DataView', 'prototype'],
516
+ '%DatePrototype%': ['Date', 'prototype'],
517
+ '%ErrorPrototype%': ['Error', 'prototype'],
518
+ '%EvalErrorPrototype%': ['EvalError', 'prototype'],
519
+ '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
520
+ '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
521
+ '%FunctionPrototype%': ['Function', 'prototype'],
522
+ '%Generator%': ['GeneratorFunction', 'prototype'],
523
+ '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
524
+ '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
525
+ '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
526
+ '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
527
+ '%JSONParse%': ['JSON', 'parse'],
528
+ '%JSONStringify%': ['JSON', 'stringify'],
529
+ '%MapPrototype%': ['Map', 'prototype'],
530
+ '%NumberPrototype%': ['Number', 'prototype'],
531
+ '%ObjectPrototype%': ['Object', 'prototype'],
532
+ '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
533
+ '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
534
+ '%PromisePrototype%': ['Promise', 'prototype'],
535
+ '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
536
+ '%Promise_all%': ['Promise', 'all'],
537
+ '%Promise_reject%': ['Promise', 'reject'],
538
+ '%Promise_resolve%': ['Promise', 'resolve'],
539
+ '%RangeErrorPrototype%': ['RangeError', 'prototype'],
540
+ '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
541
+ '%RegExpPrototype%': ['RegExp', 'prototype'],
542
+ '%SetPrototype%': ['Set', 'prototype'],
543
+ '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
544
+ '%StringPrototype%': ['String', 'prototype'],
545
+ '%SymbolPrototype%': ['Symbol', 'prototype'],
546
+ '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
547
+ '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
548
+ '%TypeErrorPrototype%': ['TypeError', 'prototype'],
549
+ '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
550
+ '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
551
+ '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
552
+ '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
553
+ '%URIErrorPrototype%': ['URIError', 'prototype'],
554
+ '%WeakMapPrototype%': ['WeakMap', 'prototype'],
555
+ '%WeakSetPrototype%': ['WeakSet', 'prototype']
556
+ };
557
+
558
+ var bind = functionBind;
559
+ var hasOwn$1 = hasown;
560
+ var $concat$1 = bind.call(Function.call, Array.prototype.concat);
561
+ var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
562
+ var $replace$1 = bind.call(Function.call, String.prototype.replace);
563
+ var $strSlice = bind.call(Function.call, String.prototype.slice);
564
+ var $exec = bind.call(Function.call, RegExp.prototype.exec);
565
+
566
+ /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
567
+ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
568
+ var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
569
+ var stringToPath = function stringToPath(string) {
570
+ var first = $strSlice(string, 0, 1);
571
+ var last = $strSlice(string, -1);
572
+ if (first === '%' && last !== '%') {
573
+ throw new $SyntaxError$1('invalid intrinsic syntax, expected closing `%`');
574
+ } else if (last === '%' && first !== '%') {
575
+ throw new $SyntaxError$1('invalid intrinsic syntax, expected opening `%`');
576
+ }
577
+ var result = [];
578
+ $replace$1(string, rePropName, function (match, number, quote, subString) {
579
+ result[result.length] = quote ? $replace$1(subString, reEscapeChar, '$1') : number || match;
580
+ });
581
+ return result;
582
+ };
583
+ /* end adaptation */
584
+
585
+ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
586
+ var intrinsicName = name;
587
+ var alias;
588
+ if (hasOwn$1(LEGACY_ALIASES, intrinsicName)) {
589
+ alias = LEGACY_ALIASES[intrinsicName];
590
+ intrinsicName = '%' + alias[0] + '%';
591
+ }
592
+
593
+ if (hasOwn$1(INTRINSICS, intrinsicName)) {
594
+ var value = INTRINSICS[intrinsicName];
595
+ if (value === needsEval) {
596
+ value = doEval(intrinsicName);
597
+ }
598
+ if (typeof value === 'undefined' && !allowMissing) {
599
+ throw new $TypeError$3('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
600
+ }
601
+
602
+ return {
603
+ alias: alias,
604
+ name: intrinsicName,
605
+ value: value
606
+ };
607
+ }
608
+
609
+ throw new $SyntaxError$1('intrinsic ' + name + ' does not exist!');
610
+ };
611
+
612
+ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
613
+ if (typeof name !== 'string' || name.length === 0) {
614
+ throw new $TypeError$3('intrinsic name must be a non-empty string');
615
+ }
616
+ if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
617
+ throw new $TypeError$3('"allowMissing" argument must be a boolean');
618
+ }
619
+
620
+ if ($exec(/^%?[^%]*%?$/, name) === null) {
621
+ throw new $SyntaxError$1('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
622
+ }
623
+ var parts = stringToPath(name);
624
+ var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
625
+
626
+ var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
627
+ var intrinsicRealName = intrinsic.name;
628
+ var value = intrinsic.value;
629
+ var skipFurtherCaching = false;
630
+
631
+ var alias = intrinsic.alias;
632
+ if (alias) {
633
+ intrinsicBaseName = alias[0];
634
+ $spliceApply(parts, $concat$1([0, 1], alias));
635
+ }
636
+
637
+ for (var i = 1, isOwn = true; i < parts.length; i += 1) {
638
+ var part = parts[i];
639
+ var first = $strSlice(part, 0, 1);
640
+ var last = $strSlice(part, -1);
641
+ if (
642
+ (
643
+ (first === '"' || first === "'" || first === '`')
644
+ || (last === '"' || last === "'" || last === '`')
645
+ )
646
+ && first !== last
647
+ ) {
648
+ throw new $SyntaxError$1('property names with quotes must have matching quotes');
649
+ }
650
+ if (part === 'constructor' || !isOwn) {
651
+ skipFurtherCaching = true;
652
+ }
653
+
654
+ intrinsicBaseName += '.' + part;
655
+ intrinsicRealName = '%' + intrinsicBaseName + '%';
656
+
657
+ if (hasOwn$1(INTRINSICS, intrinsicRealName)) {
658
+ value = INTRINSICS[intrinsicRealName];
659
+ } else if (value != null) {
660
+ if (!(part in value)) {
661
+ if (!allowMissing) {
662
+ throw new $TypeError$3('base intrinsic for ' + name + ' exists, but the property is not available.');
663
+ }
664
+ return void undefined$1;
665
+ }
666
+ if ($gOPD$1 && (i + 1) >= parts.length) {
667
+ var desc = $gOPD$1(value, part);
668
+ isOwn = !!desc;
669
+
670
+ // By convention, when a data property is converted to an accessor
671
+ // property to emulate a data property that does not suffer from
672
+ // the override mistake, that accessor's getter is marked with
673
+ // an `originalValue` property. Here, when we detect this, we
674
+ // uphold the illusion by pretending to see that original data
675
+ // property, i.e., returning the value rather than the getter
676
+ // itself.
677
+ if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
678
+ value = desc.get;
679
+ } else {
680
+ value = value[part];
681
+ }
682
+ } else {
683
+ isOwn = hasOwn$1(value, part);
684
+ value = value[part];
685
+ }
686
+
687
+ if (isOwn && !skipFurtherCaching) {
688
+ INTRINSICS[intrinsicRealName] = value;
689
+ }
690
+ }
691
+ }
692
+ return value;
693
+ };
694
+
695
+ var callBind$1 = {exports: {}};
696
+
697
+ var GetIntrinsic$5 = getIntrinsic;
698
+
699
+ var $defineProperty$1 = GetIntrinsic$5('%Object.defineProperty%', true);
700
+
701
+ var hasPropertyDescriptors$1 = function hasPropertyDescriptors() {
702
+ if ($defineProperty$1) {
703
+ try {
704
+ $defineProperty$1({}, 'a', { value: 1 });
705
+ return true;
706
+ } catch (e) {
707
+ // IE 8 has a broken defineProperty
708
+ return false;
709
+ }
710
+ }
711
+ return false;
712
+ };
713
+
714
+ hasPropertyDescriptors$1.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
715
+ // node v0.6 has a bug where array lengths can be Set but not Defined
716
+ if (!hasPropertyDescriptors$1()) {
717
+ return null;
718
+ }
719
+ try {
720
+ return $defineProperty$1([], 'length', { value: 1 }).length !== 1;
721
+ } catch (e) {
722
+ // In Firefox 4-22, defining length on an array throws an exception.
723
+ return true;
724
+ }
725
+ };
726
+
727
+ var hasPropertyDescriptors_1 = hasPropertyDescriptors$1;
728
+
729
+ var GetIntrinsic$4 = getIntrinsic;
730
+
731
+ var $gOPD = GetIntrinsic$4('%Object.getOwnPropertyDescriptor%', true);
732
+
733
+ if ($gOPD) {
734
+ try {
735
+ $gOPD([], 'length');
736
+ } catch (e) {
737
+ // IE 8 has a broken gOPD
738
+ $gOPD = null;
739
+ }
740
+ }
741
+
742
+ var gopd$1 = $gOPD;
743
+
744
+ var hasPropertyDescriptors = hasPropertyDescriptors_1();
745
+
746
+ var GetIntrinsic$3 = getIntrinsic;
747
+
748
+ var $defineProperty = hasPropertyDescriptors && GetIntrinsic$3('%Object.defineProperty%', true);
749
+ if ($defineProperty) {
750
+ try {
751
+ $defineProperty({}, 'a', { value: 1 });
752
+ } catch (e) {
753
+ // IE 8 has a broken defineProperty
754
+ $defineProperty = false;
755
+ }
756
+ }
757
+
758
+ var $SyntaxError = GetIntrinsic$3('%SyntaxError%');
759
+ var $TypeError$2 = GetIntrinsic$3('%TypeError%');
760
+
761
+ var gopd = gopd$1;
762
+
763
+ /** @type {(obj: Record<PropertyKey, unknown>, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */
764
+ var defineDataProperty = function defineDataProperty(
765
+ obj,
766
+ property,
767
+ value
768
+ ) {
769
+ if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
770
+ throw new $TypeError$2('`obj` must be an object or a function`');
771
+ }
772
+ if (typeof property !== 'string' && typeof property !== 'symbol') {
773
+ throw new $TypeError$2('`property` must be a string or a symbol`');
774
+ }
775
+ if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
776
+ throw new $TypeError$2('`nonEnumerable`, if provided, must be a boolean or null');
777
+ }
778
+ if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
779
+ throw new $TypeError$2('`nonWritable`, if provided, must be a boolean or null');
780
+ }
781
+ if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
782
+ throw new $TypeError$2('`nonConfigurable`, if provided, must be a boolean or null');
783
+ }
784
+ if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
785
+ throw new $TypeError$2('`loose`, if provided, must be a boolean');
786
+ }
787
+
788
+ var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
789
+ var nonWritable = arguments.length > 4 ? arguments[4] : null;
790
+ var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
791
+ var loose = arguments.length > 6 ? arguments[6] : false;
792
+
793
+ /* @type {false | TypedPropertyDescriptor<unknown>} */
794
+ var desc = !!gopd && gopd(obj, property);
795
+
796
+ if ($defineProperty) {
797
+ $defineProperty(obj, property, {
798
+ configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
799
+ enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
800
+ value: value,
801
+ writable: nonWritable === null && desc ? desc.writable : !nonWritable
802
+ });
803
+ } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
804
+ // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
805
+ obj[property] = value; // eslint-disable-line no-param-reassign
806
+ } else {
807
+ throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
808
+ }
809
+ };
810
+
811
+ var GetIntrinsic$2 = getIntrinsic;
812
+ var define = defineDataProperty;
813
+ var hasDescriptors = hasPropertyDescriptors_1();
814
+ var gOPD = gopd$1;
815
+
816
+ var $TypeError$1 = GetIntrinsic$2('%TypeError%');
817
+ var $floor$1 = GetIntrinsic$2('%Math.floor%');
818
+
819
+ var setFunctionLength = function setFunctionLength(fn, length) {
820
+ if (typeof fn !== 'function') {
821
+ throw new $TypeError$1('`fn` is not a function');
822
+ }
823
+ if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor$1(length) !== length) {
824
+ throw new $TypeError$1('`length` must be a positive 32-bit integer');
825
+ }
826
+
827
+ var loose = arguments.length > 2 && !!arguments[2];
828
+
829
+ var functionLengthIsConfigurable = true;
830
+ var functionLengthIsWritable = true;
831
+ if ('length' in fn && gOPD) {
832
+ var desc = gOPD(fn, 'length');
833
+ if (desc && !desc.configurable) {
834
+ functionLengthIsConfigurable = false;
835
+ }
836
+ if (desc && !desc.writable) {
837
+ functionLengthIsWritable = false;
838
+ }
839
+ }
840
+
841
+ if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
842
+ if (hasDescriptors) {
843
+ define(fn, 'length', length, true, true);
844
+ } else {
845
+ define(fn, 'length', length);
846
+ }
847
+ }
848
+ return fn;
849
+ };
850
+
851
+ (function (module) {
852
+
853
+ var bind = functionBind;
854
+ var GetIntrinsic = getIntrinsic;
855
+ var setFunctionLength$1 = setFunctionLength;
856
+
857
+ var $TypeError = GetIntrinsic('%TypeError%');
858
+ var $apply = GetIntrinsic('%Function.prototype.apply%');
859
+ var $call = GetIntrinsic('%Function.prototype.call%');
860
+ var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
861
+
862
+ var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
863
+ var $max = GetIntrinsic('%Math.max%');
864
+
865
+ if ($defineProperty) {
866
+ try {
867
+ $defineProperty({}, 'a', { value: 1 });
868
+ } catch (e) {
869
+ // IE 8 has a broken defineProperty
870
+ $defineProperty = null;
871
+ }
872
+ }
873
+
874
+ module.exports = function callBind(originalFunction) {
875
+ if (typeof originalFunction !== 'function') {
876
+ throw new $TypeError('a function is required');
877
+ }
878
+ var func = $reflectApply(bind, $call, arguments);
879
+ return setFunctionLength$1(
880
+ func,
881
+ 1 + $max(0, originalFunction.length - (arguments.length - 1)),
882
+ true
883
+ );
884
+ };
885
+
886
+ var applyBind = function applyBind() {
887
+ return $reflectApply(bind, $apply, arguments);
888
+ };
889
+
890
+ if ($defineProperty) {
891
+ $defineProperty(module.exports, 'apply', { value: applyBind });
892
+ } else {
893
+ module.exports.apply = applyBind;
894
+ }
895
+ } (callBind$1));
896
+
897
+ var GetIntrinsic$1 = getIntrinsic;
898
+
899
+ var callBind = callBind$1.exports;
900
+
901
+ var $indexOf = callBind(GetIntrinsic$1('String.prototype.indexOf'));
902
+
903
+ var callBound$1 = function callBoundIntrinsic(name, allowMissing) {
904
+ var intrinsic = GetIntrinsic$1(name, !!allowMissing);
905
+ if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
906
+ return callBind(intrinsic);
907
+ }
908
+ return intrinsic;
909
+ };
910
+
911
+ var util_inspect = require$$0$2.inspect;
912
+
913
+ var hasMap = typeof Map === 'function' && Map.prototype;
914
+ var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
915
+ var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
916
+ var mapForEach = hasMap && Map.prototype.forEach;
917
+ var hasSet = typeof Set === 'function' && Set.prototype;
918
+ var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
919
+ var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
920
+ var setForEach = hasSet && Set.prototype.forEach;
921
+ var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
922
+ var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
923
+ var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
924
+ var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
925
+ var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
926
+ var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
927
+ var booleanValueOf = Boolean.prototype.valueOf;
928
+ var objectToString = Object.prototype.toString;
929
+ var functionToString = Function.prototype.toString;
930
+ var $match = String.prototype.match;
931
+ var $slice = String.prototype.slice;
932
+ var $replace = String.prototype.replace;
933
+ var $toUpperCase = String.prototype.toUpperCase;
934
+ var $toLowerCase = String.prototype.toLowerCase;
935
+ var $test = RegExp.prototype.test;
936
+ var $concat = Array.prototype.concat;
937
+ var $join = Array.prototype.join;
938
+ var $arrSlice = Array.prototype.slice;
939
+ var $floor = Math.floor;
940
+ var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
941
+ var gOPS = Object.getOwnPropertySymbols;
942
+ var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
943
+ var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
944
+ // ie, `has-tostringtag/shams
945
+ var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
946
+ ? Symbol.toStringTag
947
+ : null;
948
+ var isEnumerable = Object.prototype.propertyIsEnumerable;
949
+
950
+ var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
951
+ [].__proto__ === Array.prototype // eslint-disable-line no-proto
952
+ ? function (O) {
953
+ return O.__proto__; // eslint-disable-line no-proto
954
+ }
955
+ : null
956
+ );
957
+
958
+ function addNumericSeparator(num, str) {
959
+ if (
960
+ num === Infinity
961
+ || num === -Infinity
962
+ || num !== num
963
+ || (num && num > -1000 && num < 1000)
964
+ || $test.call(/e/, str)
965
+ ) {
966
+ return str;
967
+ }
968
+ var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
969
+ if (typeof num === 'number') {
970
+ var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
971
+ if (int !== num) {
972
+ var intStr = String(int);
973
+ var dec = $slice.call(str, intStr.length + 1);
974
+ return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
975
+ }
976
+ }
977
+ return $replace.call(str, sepRegex, '$&_');
978
+ }
979
+
980
+ var utilInspect = util_inspect;
981
+ var inspectCustom = utilInspect.custom;
982
+ var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
983
+
984
+ var objectInspect = function inspect_(obj, options, depth, seen) {
985
+ var opts = options || {};
986
+
987
+ if (has$3(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
988
+ throw new TypeError('option "quoteStyle" must be "single" or "double"');
989
+ }
990
+ if (
991
+ has$3(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
992
+ ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
993
+ : opts.maxStringLength !== null
994
+ )
995
+ ) {
996
+ throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
997
+ }
998
+ var customInspect = has$3(opts, 'customInspect') ? opts.customInspect : true;
999
+ if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
1000
+ throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
1001
+ }
1002
+
1003
+ if (
1004
+ has$3(opts, 'indent')
1005
+ && opts.indent !== null
1006
+ && opts.indent !== '\t'
1007
+ && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
1008
+ ) {
1009
+ throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
1010
+ }
1011
+ if (has$3(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
1012
+ throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
1013
+ }
1014
+ var numericSeparator = opts.numericSeparator;
1015
+
1016
+ if (typeof obj === 'undefined') {
1017
+ return 'undefined';
1018
+ }
1019
+ if (obj === null) {
1020
+ return 'null';
1021
+ }
1022
+ if (typeof obj === 'boolean') {
1023
+ return obj ? 'true' : 'false';
1024
+ }
1025
+
1026
+ if (typeof obj === 'string') {
1027
+ return inspectString(obj, opts);
1028
+ }
1029
+ if (typeof obj === 'number') {
1030
+ if (obj === 0) {
1031
+ return Infinity / obj > 0 ? '0' : '-0';
1032
+ }
1033
+ var str = String(obj);
1034
+ return numericSeparator ? addNumericSeparator(obj, str) : str;
1035
+ }
1036
+ if (typeof obj === 'bigint') {
1037
+ var bigIntStr = String(obj) + 'n';
1038
+ return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
1039
+ }
1040
+
1041
+ var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
1042
+ if (typeof depth === 'undefined') { depth = 0; }
1043
+ if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
1044
+ return isArray$3(obj) ? '[Array]' : '[Object]';
1045
+ }
1046
+
1047
+ var indent = getIndent(opts, depth);
1048
+
1049
+ if (typeof seen === 'undefined') {
1050
+ seen = [];
1051
+ } else if (indexOf(seen, obj) >= 0) {
1052
+ return '[Circular]';
1053
+ }
1054
+
1055
+ function inspect(value, from, noIndent) {
1056
+ if (from) {
1057
+ seen = $arrSlice.call(seen);
1058
+ seen.push(from);
1059
+ }
1060
+ if (noIndent) {
1061
+ var newOpts = {
1062
+ depth: opts.depth
1063
+ };
1064
+ if (has$3(opts, 'quoteStyle')) {
1065
+ newOpts.quoteStyle = opts.quoteStyle;
1066
+ }
1067
+ return inspect_(value, newOpts, depth + 1, seen);
1068
+ }
1069
+ return inspect_(value, opts, depth + 1, seen);
1070
+ }
1071
+
1072
+ if (typeof obj === 'function' && !isRegExp$1(obj)) { // in older engines, regexes are callable
1073
+ var name = nameOf(obj);
1074
+ var keys = arrObjKeys(obj, inspect);
1075
+ return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
1076
+ }
1077
+ if (isSymbol(obj)) {
1078
+ var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
1079
+ return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
1080
+ }
1081
+ if (isElement(obj)) {
1082
+ var s = '<' + $toLowerCase.call(String(obj.nodeName));
1083
+ var attrs = obj.attributes || [];
1084
+ for (var i = 0; i < attrs.length; i++) {
1085
+ s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
1086
+ }
1087
+ s += '>';
1088
+ if (obj.childNodes && obj.childNodes.length) { s += '...'; }
1089
+ s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
1090
+ return s;
1091
+ }
1092
+ if (isArray$3(obj)) {
1093
+ if (obj.length === 0) { return '[]'; }
1094
+ var xs = arrObjKeys(obj, inspect);
1095
+ if (indent && !singleLineValues(xs)) {
1096
+ return '[' + indentedJoin(xs, indent) + ']';
1097
+ }
1098
+ return '[ ' + $join.call(xs, ', ') + ' ]';
1099
+ }
1100
+ if (isError(obj)) {
1101
+ var parts = arrObjKeys(obj, inspect);
1102
+ if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
1103
+ return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
1104
+ }
1105
+ if (parts.length === 0) { return '[' + String(obj) + ']'; }
1106
+ return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
1107
+ }
1108
+ if (typeof obj === 'object' && customInspect) {
1109
+ if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
1110
+ return utilInspect(obj, { depth: maxDepth - depth });
1111
+ } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
1112
+ return obj.inspect();
1113
+ }
1114
+ }
1115
+ if (isMap(obj)) {
1116
+ var mapParts = [];
1117
+ if (mapForEach) {
1118
+ mapForEach.call(obj, function (value, key) {
1119
+ mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
1120
+ });
1121
+ }
1122
+ return collectionOf('Map', mapSize.call(obj), mapParts, indent);
1123
+ }
1124
+ if (isSet(obj)) {
1125
+ var setParts = [];
1126
+ if (setForEach) {
1127
+ setForEach.call(obj, function (value) {
1128
+ setParts.push(inspect(value, obj));
1129
+ });
1130
+ }
1131
+ return collectionOf('Set', setSize.call(obj), setParts, indent);
1132
+ }
1133
+ if (isWeakMap(obj)) {
1134
+ return weakCollectionOf('WeakMap');
1135
+ }
1136
+ if (isWeakSet(obj)) {
1137
+ return weakCollectionOf('WeakSet');
1138
+ }
1139
+ if (isWeakRef(obj)) {
1140
+ return weakCollectionOf('WeakRef');
1141
+ }
1142
+ if (isNumber$3(obj)) {
1143
+ return markBoxed(inspect(Number(obj)));
1144
+ }
1145
+ if (isBigInt(obj)) {
1146
+ return markBoxed(inspect(bigIntValueOf.call(obj)));
1147
+ }
1148
+ if (isBoolean(obj)) {
1149
+ return markBoxed(booleanValueOf.call(obj));
1150
+ }
1151
+ if (isString$1(obj)) {
1152
+ return markBoxed(inspect(String(obj)));
1153
+ }
1154
+ // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other
1155
+ /* eslint-env browser */
1156
+ if (typeof window !== 'undefined' && obj === window) {
1157
+ return '{ [object Window] }';
1158
+ }
1159
+ if (obj === commonjsGlobal) {
1160
+ return '{ [object globalThis] }';
1161
+ }
1162
+ if (!isDate(obj) && !isRegExp$1(obj)) {
1163
+ var ys = arrObjKeys(obj, inspect);
1164
+ var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
1165
+ var protoTag = obj instanceof Object ? '' : 'null prototype';
1166
+ var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
1167
+ var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
1168
+ var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
1169
+ if (ys.length === 0) { return tag + '{}'; }
1170
+ if (indent) {
1171
+ return tag + '{' + indentedJoin(ys, indent) + '}';
1172
+ }
1173
+ return tag + '{ ' + $join.call(ys, ', ') + ' }';
1174
+ }
1175
+ return String(obj);
1176
+ };
1177
+
1178
+ function wrapQuotes(s, defaultStyle, opts) {
1179
+ var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
1180
+ return quoteChar + s + quoteChar;
1181
+ }
1182
+
1183
+ function quote(s) {
1184
+ return $replace.call(String(s), /"/g, '&quot;');
1185
+ }
1186
+
1187
+ function isArray$3(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1188
+ function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1189
+ function isRegExp$1(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1190
+ function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1191
+ function isString$1(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1192
+ function isNumber$3(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1193
+ function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1194
+
1195
+ // Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
1196
+ function isSymbol(obj) {
1197
+ if (hasShammedSymbols) {
1198
+ return obj && typeof obj === 'object' && obj instanceof Symbol;
1199
+ }
1200
+ if (typeof obj === 'symbol') {
1201
+ return true;
1202
+ }
1203
+ if (!obj || typeof obj !== 'object' || !symToString) {
1204
+ return false;
1205
+ }
1206
+ try {
1207
+ symToString.call(obj);
1208
+ return true;
1209
+ } catch (e) {}
1210
+ return false;
1211
+ }
1212
+
1213
+ function isBigInt(obj) {
1214
+ if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
1215
+ return false;
1216
+ }
1217
+ try {
1218
+ bigIntValueOf.call(obj);
1219
+ return true;
1220
+ } catch (e) {}
1221
+ return false;
1222
+ }
1223
+
1224
+ var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
1225
+ function has$3(obj, key) {
1226
+ return hasOwn.call(obj, key);
1227
+ }
1228
+
1229
+ function toStr(obj) {
1230
+ return objectToString.call(obj);
1231
+ }
1232
+
1233
+ function nameOf(f) {
1234
+ if (f.name) { return f.name; }
1235
+ var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
1236
+ if (m) { return m[1]; }
1237
+ return null;
1238
+ }
1239
+
1240
+ function indexOf(xs, x) {
1241
+ if (xs.indexOf) { return xs.indexOf(x); }
1242
+ for (var i = 0, l = xs.length; i < l; i++) {
1243
+ if (xs[i] === x) { return i; }
1244
+ }
1245
+ return -1;
1246
+ }
1247
+
1248
+ function isMap(x) {
1249
+ if (!mapSize || !x || typeof x !== 'object') {
1250
+ return false;
1251
+ }
1252
+ try {
1253
+ mapSize.call(x);
1254
+ try {
1255
+ setSize.call(x);
1256
+ } catch (s) {
1257
+ return true;
1258
+ }
1259
+ return x instanceof Map; // core-js workaround, pre-v2.5.0
1260
+ } catch (e) {}
1261
+ return false;
1262
+ }
1263
+
1264
+ function isWeakMap(x) {
1265
+ if (!weakMapHas || !x || typeof x !== 'object') {
1266
+ return false;
1267
+ }
1268
+ try {
1269
+ weakMapHas.call(x, weakMapHas);
1270
+ try {
1271
+ weakSetHas.call(x, weakSetHas);
1272
+ } catch (s) {
1273
+ return true;
1274
+ }
1275
+ return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
1276
+ } catch (e) {}
1277
+ return false;
1278
+ }
1279
+
1280
+ function isWeakRef(x) {
1281
+ if (!weakRefDeref || !x || typeof x !== 'object') {
1282
+ return false;
1283
+ }
1284
+ try {
1285
+ weakRefDeref.call(x);
1286
+ return true;
1287
+ } catch (e) {}
1288
+ return false;
1289
+ }
1290
+
1291
+ function isSet(x) {
1292
+ if (!setSize || !x || typeof x !== 'object') {
1293
+ return false;
1294
+ }
1295
+ try {
1296
+ setSize.call(x);
1297
+ try {
1298
+ mapSize.call(x);
1299
+ } catch (m) {
1300
+ return true;
1301
+ }
1302
+ return x instanceof Set; // core-js workaround, pre-v2.5.0
1303
+ } catch (e) {}
1304
+ return false;
1305
+ }
1306
+
1307
+ function isWeakSet(x) {
1308
+ if (!weakSetHas || !x || typeof x !== 'object') {
1309
+ return false;
1310
+ }
1311
+ try {
1312
+ weakSetHas.call(x, weakSetHas);
1313
+ try {
1314
+ weakMapHas.call(x, weakMapHas);
1315
+ } catch (s) {
1316
+ return true;
1317
+ }
1318
+ return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
1319
+ } catch (e) {}
1320
+ return false;
1321
+ }
1322
+
1323
+ function isElement(x) {
1324
+ if (!x || typeof x !== 'object') { return false; }
1325
+ if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
1326
+ return true;
1327
+ }
1328
+ return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
1329
+ }
1330
+
1331
+ function inspectString(str, opts) {
1332
+ if (str.length > opts.maxStringLength) {
1333
+ var remaining = str.length - opts.maxStringLength;
1334
+ var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
1335
+ return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
1336
+ }
1337
+ // eslint-disable-next-line no-control-regex
1338
+ var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
1339
+ return wrapQuotes(s, 'single', opts);
1340
+ }
1341
+
1342
+ function lowbyte(c) {
1343
+ var n = c.charCodeAt(0);
1344
+ var x = {
1345
+ 8: 'b',
1346
+ 9: 't',
1347
+ 10: 'n',
1348
+ 12: 'f',
1349
+ 13: 'r'
1350
+ }[n];
1351
+ if (x) { return '\\' + x; }
1352
+ return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
1353
+ }
1354
+
1355
+ function markBoxed(str) {
1356
+ return 'Object(' + str + ')';
1357
+ }
1358
+
1359
+ function weakCollectionOf(type) {
1360
+ return type + ' { ? }';
1361
+ }
1362
+
1363
+ function collectionOf(type, size, entries, indent) {
1364
+ var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
1365
+ return type + ' (' + size + ') {' + joinedEntries + '}';
1366
+ }
1367
+
1368
+ function singleLineValues(xs) {
1369
+ for (var i = 0; i < xs.length; i++) {
1370
+ if (indexOf(xs[i], '\n') >= 0) {
1371
+ return false;
1372
+ }
1373
+ }
1374
+ return true;
1375
+ }
1376
+
1377
+ function getIndent(opts, depth) {
1378
+ var baseIndent;
1379
+ if (opts.indent === '\t') {
1380
+ baseIndent = '\t';
1381
+ } else if (typeof opts.indent === 'number' && opts.indent > 0) {
1382
+ baseIndent = $join.call(Array(opts.indent + 1), ' ');
1383
+ } else {
1384
+ return null;
1385
+ }
1386
+ return {
1387
+ base: baseIndent,
1388
+ prev: $join.call(Array(depth + 1), baseIndent)
1389
+ };
1390
+ }
1391
+
1392
+ function indentedJoin(xs, indent) {
1393
+ if (xs.length === 0) { return ''; }
1394
+ var lineJoiner = '\n' + indent.prev + indent.base;
1395
+ return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
1396
+ }
1397
+
1398
+ function arrObjKeys(obj, inspect) {
1399
+ var isArr = isArray$3(obj);
1400
+ var xs = [];
1401
+ if (isArr) {
1402
+ xs.length = obj.length;
1403
+ for (var i = 0; i < obj.length; i++) {
1404
+ xs[i] = has$3(obj, i) ? inspect(obj[i], obj) : '';
1405
+ }
1406
+ }
1407
+ var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
1408
+ var symMap;
1409
+ if (hasShammedSymbols) {
1410
+ symMap = {};
1411
+ for (var k = 0; k < syms.length; k++) {
1412
+ symMap['$' + syms[k]] = syms[k];
1413
+ }
1414
+ }
1415
+
1416
+ for (var key in obj) { // eslint-disable-line no-restricted-syntax
1417
+ if (!has$3(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
1418
+ if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
1419
+ if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
1420
+ // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
1421
+ continue; // eslint-disable-line no-restricted-syntax, no-continue
1422
+ } else if ($test.call(/[^\w$]/, key)) {
1423
+ xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
1424
+ } else {
1425
+ xs.push(key + ': ' + inspect(obj[key], obj));
1426
+ }
1427
+ }
1428
+ if (typeof gOPS === 'function') {
1429
+ for (var j = 0; j < syms.length; j++) {
1430
+ if (isEnumerable.call(obj, syms[j])) {
1431
+ xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
1432
+ }
1433
+ }
1434
+ }
1435
+ return xs;
1436
+ }
1437
+
1438
+ var GetIntrinsic = getIntrinsic;
1439
+ var callBound = callBound$1;
1440
+ var inspect = objectInspect;
1441
+
1442
+ var $TypeError = GetIntrinsic('%TypeError%');
1443
+ var $WeakMap = GetIntrinsic('%WeakMap%', true);
1444
+ var $Map = GetIntrinsic('%Map%', true);
1445
+
1446
+ var $weakMapGet = callBound('WeakMap.prototype.get', true);
1447
+ var $weakMapSet = callBound('WeakMap.prototype.set', true);
1448
+ var $weakMapHas = callBound('WeakMap.prototype.has', true);
1449
+ var $mapGet = callBound('Map.prototype.get', true);
1450
+ var $mapSet = callBound('Map.prototype.set', true);
1451
+ var $mapHas = callBound('Map.prototype.has', true);
1452
+
1453
+ /*
1454
+ * This function traverses the list returning the node corresponding to the
1455
+ * given key.
1456
+ *
1457
+ * That node is also moved to the head of the list, so that if it's accessed
1458
+ * again we don't need to traverse the whole list. By doing so, all the recently
1459
+ * used nodes can be accessed relatively quickly.
1460
+ */
1461
+ var listGetNode = function (list, key) { // eslint-disable-line consistent-return
1462
+ for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
1463
+ if (curr.key === key) {
1464
+ prev.next = curr.next;
1465
+ curr.next = list.next;
1466
+ list.next = curr; // eslint-disable-line no-param-reassign
1467
+ return curr;
1468
+ }
1469
+ }
1470
+ };
1471
+
1472
+ var listGet = function (objects, key) {
1473
+ var node = listGetNode(objects, key);
1474
+ return node && node.value;
1475
+ };
1476
+ var listSet = function (objects, key, value) {
1477
+ var node = listGetNode(objects, key);
1478
+ if (node) {
1479
+ node.value = value;
1480
+ } else {
1481
+ // Prepend the new node to the beginning of the list
1482
+ objects.next = { // eslint-disable-line no-param-reassign
1483
+ key: key,
1484
+ next: objects.next,
1485
+ value: value
1486
+ };
1487
+ }
1488
+ };
1489
+ var listHas = function (objects, key) {
1490
+ return !!listGetNode(objects, key);
1491
+ };
1492
+
1493
+ var sideChannel = function getSideChannel() {
1494
+ var $wm;
1495
+ var $m;
1496
+ var $o;
1497
+ var channel = {
1498
+ assert: function (key) {
1499
+ if (!channel.has(key)) {
1500
+ throw new $TypeError('Side channel does not contain ' + inspect(key));
1501
+ }
1502
+ },
1503
+ get: function (key) { // eslint-disable-line consistent-return
1504
+ if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
1505
+ if ($wm) {
1506
+ return $weakMapGet($wm, key);
1507
+ }
1508
+ } else if ($Map) {
1509
+ if ($m) {
1510
+ return $mapGet($m, key);
1511
+ }
1512
+ } else {
1513
+ if ($o) { // eslint-disable-line no-lonely-if
1514
+ return listGet($o, key);
1515
+ }
1516
+ }
1517
+ },
1518
+ has: function (key) {
1519
+ if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
1520
+ if ($wm) {
1521
+ return $weakMapHas($wm, key);
1522
+ }
1523
+ } else if ($Map) {
1524
+ if ($m) {
1525
+ return $mapHas($m, key);
1526
+ }
1527
+ } else {
1528
+ if ($o) { // eslint-disable-line no-lonely-if
1529
+ return listHas($o, key);
1530
+ }
1531
+ }
1532
+ return false;
1533
+ },
1534
+ set: function (key, value) {
1535
+ if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
1536
+ if (!$wm) {
1537
+ $wm = new $WeakMap();
1538
+ }
1539
+ $weakMapSet($wm, key, value);
1540
+ } else if ($Map) {
1541
+ if (!$m) {
1542
+ $m = new $Map();
1543
+ }
1544
+ $mapSet($m, key, value);
1545
+ } else {
1546
+ if (!$o) {
1547
+ /*
1548
+ * Initialize the linked list as an empty node, so that we don't have
1549
+ * to special-case handling of the first node: we can always refer to
1550
+ * it as (previous node).next, instead of something like (list).head
1551
+ */
1552
+ $o = { key: {}, next: null };
1553
+ }
1554
+ listSet($o, key, value);
1555
+ }
1556
+ }
1557
+ };
1558
+ return channel;
1559
+ };
1560
+
1561
+ var replace = String.prototype.replace;
1562
+ var percentTwenties = /%20/g;
1563
+
1564
+ var Format = {
1565
+ RFC1738: 'RFC1738',
1566
+ RFC3986: 'RFC3986'
1567
+ };
1568
+
1569
+ var formats$3 = {
1570
+ 'default': Format.RFC3986,
1571
+ formatters: {
1572
+ RFC1738: function (value) {
1573
+ return replace.call(value, percentTwenties, '+');
1574
+ },
1575
+ RFC3986: function (value) {
1576
+ return String(value);
1577
+ }
1578
+ },
1579
+ RFC1738: Format.RFC1738,
1580
+ RFC3986: Format.RFC3986
1581
+ };
1582
+
1583
+ var formats$2 = formats$3;
1584
+
1585
+ var has$2 = Object.prototype.hasOwnProperty;
1586
+ var isArray$2 = Array.isArray;
1587
+
1588
+ var hexTable = (function () {
1589
+ var array = [];
1590
+ for (var i = 0; i < 256; ++i) {
1591
+ array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
1592
+ }
1593
+
1594
+ return array;
1595
+ }());
1596
+
1597
+ var compactQueue = function compactQueue(queue) {
1598
+ while (queue.length > 1) {
1599
+ var item = queue.pop();
1600
+ var obj = item.obj[item.prop];
1601
+
1602
+ if (isArray$2(obj)) {
1603
+ var compacted = [];
1604
+
1605
+ for (var j = 0; j < obj.length; ++j) {
1606
+ if (typeof obj[j] !== 'undefined') {
1607
+ compacted.push(obj[j]);
1608
+ }
1609
+ }
1610
+
1611
+ item.obj[item.prop] = compacted;
1612
+ }
1613
+ }
1614
+ };
1615
+
1616
+ var arrayToObject = function arrayToObject(source, options) {
1617
+ var obj = options && options.plainObjects ? Object.create(null) : {};
1618
+ for (var i = 0; i < source.length; ++i) {
1619
+ if (typeof source[i] !== 'undefined') {
1620
+ obj[i] = source[i];
1621
+ }
1622
+ }
1623
+
1624
+ return obj;
1625
+ };
1626
+
1627
+ var merge$2 = function merge(target, source, options) {
1628
+ /* eslint no-param-reassign: 0 */
1629
+ if (!source) {
1630
+ return target;
1631
+ }
1632
+
1633
+ if (typeof source !== 'object') {
1634
+ if (isArray$2(target)) {
1635
+ target.push(source);
1636
+ } else if (target && typeof target === 'object') {
1637
+ if ((options && (options.plainObjects || options.allowPrototypes)) || !has$2.call(Object.prototype, source)) {
1638
+ target[source] = true;
1639
+ }
1640
+ } else {
1641
+ return [target, source];
1642
+ }
1643
+
1644
+ return target;
1645
+ }
1646
+
1647
+ if (!target || typeof target !== 'object') {
1648
+ return [target].concat(source);
1649
+ }
1650
+
1651
+ var mergeTarget = target;
1652
+ if (isArray$2(target) && !isArray$2(source)) {
1653
+ mergeTarget = arrayToObject(target, options);
1654
+ }
1655
+
1656
+ if (isArray$2(target) && isArray$2(source)) {
1657
+ source.forEach(function (item, i) {
1658
+ if (has$2.call(target, i)) {
1659
+ var targetItem = target[i];
1660
+ if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
1661
+ target[i] = merge(targetItem, item, options);
1662
+ } else {
1663
+ target.push(item);
1664
+ }
1665
+ } else {
1666
+ target[i] = item;
1667
+ }
1668
+ });
1669
+ return target;
1670
+ }
1671
+
1672
+ return Object.keys(source).reduce(function (acc, key) {
1673
+ var value = source[key];
1674
+
1675
+ if (has$2.call(acc, key)) {
1676
+ acc[key] = merge(acc[key], value, options);
1677
+ } else {
1678
+ acc[key] = value;
1679
+ }
1680
+ return acc;
1681
+ }, mergeTarget);
1682
+ };
1683
+
1684
+ var assign = function assignSingleSource(target, source) {
1685
+ return Object.keys(source).reduce(function (acc, key) {
1686
+ acc[key] = source[key];
1687
+ return acc;
1688
+ }, target);
1689
+ };
1690
+
1691
+ var decode = function (str, decoder, charset) {
1692
+ var strWithoutPlus = str.replace(/\+/g, ' ');
1693
+ if (charset === 'iso-8859-1') {
1694
+ // unescape never throws, no try...catch needed:
1695
+ return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
1696
+ }
1697
+ // utf-8
1698
+ try {
1699
+ return decodeURIComponent(strWithoutPlus);
1700
+ } catch (e) {
1701
+ return strWithoutPlus;
1702
+ }
1703
+ };
1704
+
1705
+ var encode = function encode(str, defaultEncoder, charset, kind, format) {
1706
+ // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
1707
+ // It has been adapted here for stricter adherence to RFC 3986
1708
+ if (str.length === 0) {
1709
+ return str;
1710
+ }
1711
+
1712
+ var string = str;
1713
+ if (typeof str === 'symbol') {
1714
+ string = Symbol.prototype.toString.call(str);
1715
+ } else if (typeof str !== 'string') {
1716
+ string = String(str);
1717
+ }
1718
+
1719
+ if (charset === 'iso-8859-1') {
1720
+ return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
1721
+ return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
1722
+ });
1723
+ }
1724
+
1725
+ var out = '';
1726
+ for (var i = 0; i < string.length; ++i) {
1727
+ var c = string.charCodeAt(i);
1728
+
1729
+ if (
1730
+ c === 0x2D // -
1731
+ || c === 0x2E // .
1732
+ || c === 0x5F // _
1733
+ || c === 0x7E // ~
1734
+ || (c >= 0x30 && c <= 0x39) // 0-9
1735
+ || (c >= 0x41 && c <= 0x5A) // a-z
1736
+ || (c >= 0x61 && c <= 0x7A) // A-Z
1737
+ || (format === formats$2.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
1738
+ ) {
1739
+ out += string.charAt(i);
1740
+ continue;
1741
+ }
1742
+
1743
+ if (c < 0x80) {
1744
+ out = out + hexTable[c];
1745
+ continue;
1746
+ }
1747
+
1748
+ if (c < 0x800) {
1749
+ out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
1750
+ continue;
1751
+ }
1752
+
1753
+ if (c < 0xD800 || c >= 0xE000) {
1754
+ out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
1755
+ continue;
1756
+ }
1757
+
1758
+ i += 1;
1759
+ c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
1760
+ /* eslint operator-linebreak: [2, "before"] */
1761
+ out += hexTable[0xF0 | (c >> 18)]
1762
+ + hexTable[0x80 | ((c >> 12) & 0x3F)]
1763
+ + hexTable[0x80 | ((c >> 6) & 0x3F)]
1764
+ + hexTable[0x80 | (c & 0x3F)];
1765
+ }
1766
+
1767
+ return out;
1768
+ };
1769
+
1770
+ var compact = function compact(value) {
1771
+ var queue = [{ obj: { o: value }, prop: 'o' }];
1772
+ var refs = [];
1773
+
1774
+ for (var i = 0; i < queue.length; ++i) {
1775
+ var item = queue[i];
1776
+ var obj = item.obj[item.prop];
1777
+
1778
+ var keys = Object.keys(obj);
1779
+ for (var j = 0; j < keys.length; ++j) {
1780
+ var key = keys[j];
1781
+ var val = obj[key];
1782
+ if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
1783
+ queue.push({ obj: obj, prop: key });
1784
+ refs.push(val);
1785
+ }
1786
+ }
1787
+ }
1788
+
1789
+ compactQueue(queue);
1790
+
1791
+ return value;
1792
+ };
1793
+
1794
+ var isRegExp = function isRegExp(obj) {
1795
+ return Object.prototype.toString.call(obj) === '[object RegExp]';
1796
+ };
1797
+
1798
+ var isBuffer = function isBuffer(obj) {
1799
+ if (!obj || typeof obj !== 'object') {
1800
+ return false;
1801
+ }
1802
+
1803
+ return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
1804
+ };
1805
+
1806
+ var combine = function combine(a, b) {
1807
+ return [].concat(a, b);
1808
+ };
1809
+
1810
+ var maybeMap = function maybeMap(val, fn) {
1811
+ if (isArray$2(val)) {
1812
+ var mapped = [];
1813
+ for (var i = 0; i < val.length; i += 1) {
1814
+ mapped.push(fn(val[i]));
1815
+ }
1816
+ return mapped;
1817
+ }
1818
+ return fn(val);
1819
+ };
1820
+
1821
+ var utils$n = {
1822
+ arrayToObject: arrayToObject,
1823
+ assign: assign,
1824
+ combine: combine,
1825
+ compact: compact,
1826
+ decode: decode,
1827
+ encode: encode,
1828
+ isBuffer: isBuffer,
1829
+ isRegExp: isRegExp,
1830
+ maybeMap: maybeMap,
1831
+ merge: merge$2
1832
+ };
1833
+
1834
+ var getSideChannel = sideChannel;
1835
+ var utils$m = utils$n;
1836
+ var formats$1 = formats$3;
1837
+ var has$1 = Object.prototype.hasOwnProperty;
1838
+
1839
+ var arrayPrefixGenerators = {
1840
+ brackets: function brackets(prefix) {
1841
+ return prefix + '[]';
1842
+ },
1843
+ comma: 'comma',
1844
+ indices: function indices(prefix, key) {
1845
+ return prefix + '[' + key + ']';
1846
+ },
1847
+ repeat: function repeat(prefix) {
1848
+ return prefix;
1849
+ }
1850
+ };
1851
+
1852
+ var isArray$1 = Array.isArray;
1853
+ var push = Array.prototype.push;
1854
+ var pushToArray = function (arr, valueOrArray) {
1855
+ push.apply(arr, isArray$1(valueOrArray) ? valueOrArray : [valueOrArray]);
1856
+ };
1857
+
1858
+ var toISO = Date.prototype.toISOString;
1859
+
1860
+ var defaultFormat = formats$1['default'];
1861
+ var defaults$1 = {
1862
+ addQueryPrefix: false,
1863
+ allowDots: false,
1864
+ charset: 'utf-8',
1865
+ charsetSentinel: false,
1866
+ delimiter: '&',
1867
+ encode: true,
1868
+ encoder: utils$m.encode,
1869
+ encodeValuesOnly: false,
1870
+ format: defaultFormat,
1871
+ formatter: formats$1.formatters[defaultFormat],
1872
+ // deprecated
1873
+ indices: false,
1874
+ serializeDate: function serializeDate(date) {
1875
+ return toISO.call(date);
1876
+ },
1877
+ skipNulls: false,
1878
+ strictNullHandling: false
1879
+ };
1880
+
1881
+ var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
1882
+ return typeof v === 'string'
1883
+ || typeof v === 'number'
1884
+ || typeof v === 'boolean'
1885
+ || typeof v === 'symbol'
1886
+ || typeof v === 'bigint';
1887
+ };
1888
+
1889
+ var sentinel = {};
1890
+
1891
+ var stringify$6 = function stringify(
1892
+ object,
1893
+ prefix,
1894
+ generateArrayPrefix,
1895
+ commaRoundTrip,
1896
+ strictNullHandling,
1897
+ skipNulls,
1898
+ encoder,
1899
+ filter,
1900
+ sort,
1901
+ allowDots,
1902
+ serializeDate,
1903
+ format,
1904
+ formatter,
1905
+ encodeValuesOnly,
1906
+ charset,
1907
+ sideChannel
1908
+ ) {
1909
+ var obj = object;
1910
+
1911
+ var tmpSc = sideChannel;
1912
+ var step = 0;
1913
+ var findFlag = false;
1914
+ while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
1915
+ // Where object last appeared in the ref tree
1916
+ var pos = tmpSc.get(object);
1917
+ step += 1;
1918
+ if (typeof pos !== 'undefined') {
1919
+ if (pos === step) {
1920
+ throw new RangeError('Cyclic object value');
1921
+ } else {
1922
+ findFlag = true; // Break while
1923
+ }
1924
+ }
1925
+ if (typeof tmpSc.get(sentinel) === 'undefined') {
1926
+ step = 0;
1927
+ }
1928
+ }
1929
+
1930
+ if (typeof filter === 'function') {
1931
+ obj = filter(prefix, obj);
1932
+ } else if (obj instanceof Date) {
1933
+ obj = serializeDate(obj);
1934
+ } else if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
1935
+ obj = utils$m.maybeMap(obj, function (value) {
1936
+ if (value instanceof Date) {
1937
+ return serializeDate(value);
1938
+ }
1939
+ return value;
1940
+ });
1941
+ }
1942
+
1943
+ if (obj === null) {
1944
+ if (strictNullHandling) {
1945
+ return encoder && !encodeValuesOnly ? encoder(prefix, defaults$1.encoder, charset, 'key', format) : prefix;
1946
+ }
1947
+
1948
+ obj = '';
1949
+ }
1950
+
1951
+ if (isNonNullishPrimitive(obj) || utils$m.isBuffer(obj)) {
1952
+ if (encoder) {
1953
+ var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults$1.encoder, charset, 'key', format);
1954
+ return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults$1.encoder, charset, 'value', format))];
1955
+ }
1956
+ return [formatter(prefix) + '=' + formatter(String(obj))];
1957
+ }
1958
+
1959
+ var values = [];
1960
+
1961
+ if (typeof obj === 'undefined') {
1962
+ return values;
1963
+ }
1964
+
1965
+ var objKeys;
1966
+ if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
1967
+ // we need to join elements in
1968
+ if (encodeValuesOnly && encoder) {
1969
+ obj = utils$m.maybeMap(obj, encoder);
1970
+ }
1971
+ objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
1972
+ } else if (isArray$1(filter)) {
1973
+ objKeys = filter;
1974
+ } else {
1975
+ var keys = Object.keys(obj);
1976
+ objKeys = sort ? keys.sort(sort) : keys;
1977
+ }
1978
+
1979
+ var adjustedPrefix = commaRoundTrip && isArray$1(obj) && obj.length === 1 ? prefix + '[]' : prefix;
1980
+
1981
+ for (var j = 0; j < objKeys.length; ++j) {
1982
+ var key = objKeys[j];
1983
+ var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
1984
+
1985
+ if (skipNulls && value === null) {
1986
+ continue;
1987
+ }
1988
+
1989
+ var keyPrefix = isArray$1(obj)
1990
+ ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix
1991
+ : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');
1992
+
1993
+ sideChannel.set(object, step);
1994
+ var valueSideChannel = getSideChannel();
1995
+ valueSideChannel.set(sentinel, sideChannel);
1996
+ pushToArray(values, stringify(
1997
+ value,
1998
+ keyPrefix,
1999
+ generateArrayPrefix,
2000
+ commaRoundTrip,
2001
+ strictNullHandling,
2002
+ skipNulls,
2003
+ generateArrayPrefix === 'comma' && encodeValuesOnly && isArray$1(obj) ? null : encoder,
2004
+ filter,
2005
+ sort,
2006
+ allowDots,
2007
+ serializeDate,
2008
+ format,
2009
+ formatter,
2010
+ encodeValuesOnly,
2011
+ charset,
2012
+ valueSideChannel
2013
+ ));
2014
+ }
2015
+
2016
+ return values;
2017
+ };
2018
+
2019
+ var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
2020
+ if (!opts) {
2021
+ return defaults$1;
2022
+ }
2023
+
2024
+ if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
2025
+ throw new TypeError('Encoder has to be a function.');
2026
+ }
2027
+
2028
+ var charset = opts.charset || defaults$1.charset;
2029
+ if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
2030
+ throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
2031
+ }
2032
+
2033
+ var format = formats$1['default'];
2034
+ if (typeof opts.format !== 'undefined') {
2035
+ if (!has$1.call(formats$1.formatters, opts.format)) {
2036
+ throw new TypeError('Unknown format option provided.');
2037
+ }
2038
+ format = opts.format;
2039
+ }
2040
+ var formatter = formats$1.formatters[format];
2041
+
2042
+ var filter = defaults$1.filter;
2043
+ if (typeof opts.filter === 'function' || isArray$1(opts.filter)) {
2044
+ filter = opts.filter;
2045
+ }
2046
+
2047
+ return {
2048
+ addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults$1.addQueryPrefix,
2049
+ allowDots: typeof opts.allowDots === 'undefined' ? defaults$1.allowDots : !!opts.allowDots,
2050
+ charset: charset,
2051
+ charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults$1.charsetSentinel,
2052
+ delimiter: typeof opts.delimiter === 'undefined' ? defaults$1.delimiter : opts.delimiter,
2053
+ encode: typeof opts.encode === 'boolean' ? opts.encode : defaults$1.encode,
2054
+ encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults$1.encoder,
2055
+ encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults$1.encodeValuesOnly,
2056
+ filter: filter,
2057
+ format: format,
2058
+ formatter: formatter,
2059
+ serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults$1.serializeDate,
2060
+ skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults$1.skipNulls,
2061
+ sort: typeof opts.sort === 'function' ? opts.sort : null,
2062
+ strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults$1.strictNullHandling
2063
+ };
2064
+ };
2065
+
2066
+ var stringify_1 = function (object, opts) {
2067
+ var obj = object;
2068
+ var options = normalizeStringifyOptions(opts);
2069
+
2070
+ var objKeys;
2071
+ var filter;
2072
+
2073
+ if (typeof options.filter === 'function') {
2074
+ filter = options.filter;
2075
+ obj = filter('', obj);
2076
+ } else if (isArray$1(options.filter)) {
2077
+ filter = options.filter;
2078
+ objKeys = filter;
2079
+ }
2080
+
2081
+ var keys = [];
2082
+
2083
+ if (typeof obj !== 'object' || obj === null) {
2084
+ return '';
2085
+ }
2086
+
2087
+ var arrayFormat;
2088
+ if (opts && opts.arrayFormat in arrayPrefixGenerators) {
2089
+ arrayFormat = opts.arrayFormat;
2090
+ } else if (opts && 'indices' in opts) {
2091
+ arrayFormat = opts.indices ? 'indices' : 'repeat';
2092
+ } else {
2093
+ arrayFormat = 'indices';
2094
+ }
2095
+
2096
+ var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
2097
+ if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
2098
+ throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
2099
+ }
2100
+ var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;
2101
+
2102
+ if (!objKeys) {
2103
+ objKeys = Object.keys(obj);
2104
+ }
2105
+
2106
+ if (options.sort) {
2107
+ objKeys.sort(options.sort);
2108
+ }
2109
+
2110
+ var sideChannel = getSideChannel();
2111
+ for (var i = 0; i < objKeys.length; ++i) {
2112
+ var key = objKeys[i];
2113
+
2114
+ if (options.skipNulls && obj[key] === null) {
2115
+ continue;
2116
+ }
2117
+ pushToArray(keys, stringify$6(
2118
+ obj[key],
2119
+ key,
2120
+ generateArrayPrefix,
2121
+ commaRoundTrip,
2122
+ options.strictNullHandling,
2123
+ options.skipNulls,
2124
+ options.encode ? options.encoder : null,
2125
+ options.filter,
2126
+ options.sort,
2127
+ options.allowDots,
2128
+ options.serializeDate,
2129
+ options.format,
2130
+ options.formatter,
2131
+ options.encodeValuesOnly,
2132
+ options.charset,
2133
+ sideChannel
2134
+ ));
2135
+ }
2136
+
2137
+ var joined = keys.join(options.delimiter);
2138
+ var prefix = options.addQueryPrefix === true ? '?' : '';
2139
+
2140
+ if (options.charsetSentinel) {
2141
+ if (options.charset === 'iso-8859-1') {
2142
+ // encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
2143
+ prefix += 'utf8=%26%2310003%3B&';
2144
+ } else {
2145
+ // encodeURIComponent('✓')
2146
+ prefix += 'utf8=%E2%9C%93&';
2147
+ }
2148
+ }
2149
+
2150
+ return joined.length > 0 ? prefix + joined : '';
2151
+ };
2152
+
2153
+ var utils$l = utils$n;
2154
+
2155
+ var has = Object.prototype.hasOwnProperty;
2156
+ var isArray = Array.isArray;
2157
+
2158
+ var defaults = {
2159
+ allowDots: false,
2160
+ allowPrototypes: false,
2161
+ allowSparse: false,
2162
+ arrayLimit: 20,
2163
+ charset: 'utf-8',
2164
+ charsetSentinel: false,
2165
+ comma: false,
2166
+ decoder: utils$l.decode,
2167
+ delimiter: '&',
2168
+ depth: 5,
2169
+ ignoreQueryPrefix: false,
2170
+ interpretNumericEntities: false,
2171
+ parameterLimit: 1000,
2172
+ parseArrays: true,
2173
+ plainObjects: false,
2174
+ strictNullHandling: false
2175
+ };
2176
+
2177
+ var interpretNumericEntities = function (str) {
2178
+ return str.replace(/&#(\d+);/g, function ($0, numberStr) {
2179
+ return String.fromCharCode(parseInt(numberStr, 10));
2180
+ });
2181
+ };
2182
+
2183
+ var parseArrayValue = function (val, options) {
2184
+ if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
2185
+ return val.split(',');
2186
+ }
2187
+
2188
+ return val;
2189
+ };
2190
+
2191
+ // This is what browsers will submit when the ✓ character occurs in an
2192
+ // application/x-www-form-urlencoded body and the encoding of the page containing
2193
+ // the form is iso-8859-1, or when the submitted form has an accept-charset
2194
+ // attribute of iso-8859-1. Presumably also with other charsets that do not contain
2195
+ // the ✓ character, such as us-ascii.
2196
+ var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')
2197
+
2198
+ // These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
2199
+ var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
2200
+
2201
+ var parseValues = function parseQueryStringValues(str, options) {
2202
+ var obj = { __proto__: null };
2203
+
2204
+ var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
2205
+ var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
2206
+ var parts = cleanStr.split(options.delimiter, limit);
2207
+ var skipIndex = -1; // Keep track of where the utf8 sentinel was found
2208
+ var i;
2209
+
2210
+ var charset = options.charset;
2211
+ if (options.charsetSentinel) {
2212
+ for (i = 0; i < parts.length; ++i) {
2213
+ if (parts[i].indexOf('utf8=') === 0) {
2214
+ if (parts[i] === charsetSentinel) {
2215
+ charset = 'utf-8';
2216
+ } else if (parts[i] === isoSentinel) {
2217
+ charset = 'iso-8859-1';
2218
+ }
2219
+ skipIndex = i;
2220
+ i = parts.length; // The eslint settings do not allow break;
2221
+ }
2222
+ }
2223
+ }
2224
+
2225
+ for (i = 0; i < parts.length; ++i) {
2226
+ if (i === skipIndex) {
2227
+ continue;
2228
+ }
2229
+ var part = parts[i];
2230
+
2231
+ var bracketEqualsPos = part.indexOf(']=');
2232
+ var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
2233
+
2234
+ var key, val;
2235
+ if (pos === -1) {
2236
+ key = options.decoder(part, defaults.decoder, charset, 'key');
2237
+ val = options.strictNullHandling ? null : '';
2238
+ } else {
2239
+ key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
2240
+ val = utils$l.maybeMap(
2241
+ parseArrayValue(part.slice(pos + 1), options),
2242
+ function (encodedVal) {
2243
+ return options.decoder(encodedVal, defaults.decoder, charset, 'value');
2244
+ }
2245
+ );
2246
+ }
2247
+
2248
+ if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
2249
+ val = interpretNumericEntities(val);
2250
+ }
2251
+
2252
+ if (part.indexOf('[]=') > -1) {
2253
+ val = isArray(val) ? [val] : val;
2254
+ }
2255
+
2256
+ if (has.call(obj, key)) {
2257
+ obj[key] = utils$l.combine(obj[key], val);
2258
+ } else {
2259
+ obj[key] = val;
2260
+ }
2261
+ }
2262
+
2263
+ return obj;
2264
+ };
2265
+
2266
+ var parseObject = function (chain, val, options, valuesParsed) {
2267
+ var leaf = valuesParsed ? val : parseArrayValue(val, options);
2268
+
2269
+ for (var i = chain.length - 1; i >= 0; --i) {
2270
+ var obj;
2271
+ var root = chain[i];
2272
+
2273
+ if (root === '[]' && options.parseArrays) {
2274
+ obj = [].concat(leaf);
2275
+ } else {
2276
+ obj = options.plainObjects ? Object.create(null) : {};
2277
+ var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
2278
+ var index = parseInt(cleanRoot, 10);
2279
+ if (!options.parseArrays && cleanRoot === '') {
2280
+ obj = { 0: leaf };
2281
+ } else if (
2282
+ !isNaN(index)
2283
+ && root !== cleanRoot
2284
+ && String(index) === cleanRoot
2285
+ && index >= 0
2286
+ && (options.parseArrays && index <= options.arrayLimit)
2287
+ ) {
2288
+ obj = [];
2289
+ obj[index] = leaf;
2290
+ } else if (cleanRoot !== '__proto__') {
2291
+ obj[cleanRoot] = leaf;
2292
+ }
2293
+ }
2294
+
2295
+ leaf = obj;
2296
+ }
2297
+
2298
+ return leaf;
2299
+ };
2300
+
2301
+ var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
2302
+ if (!givenKey) {
2303
+ return;
2304
+ }
2305
+
2306
+ // Transform dot notation to bracket notation
2307
+ var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
2308
+
2309
+ // The regex chunks
2310
+
2311
+ var brackets = /(\[[^[\]]*])/;
2312
+ var child = /(\[[^[\]]*])/g;
2313
+
2314
+ // Get the parent
2315
+
2316
+ var segment = options.depth > 0 && brackets.exec(key);
2317
+ var parent = segment ? key.slice(0, segment.index) : key;
2318
+
2319
+ // Stash the parent if it exists
2320
+
2321
+ var keys = [];
2322
+ if (parent) {
2323
+ // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
2324
+ if (!options.plainObjects && has.call(Object.prototype, parent)) {
2325
+ if (!options.allowPrototypes) {
2326
+ return;
2327
+ }
2328
+ }
2329
+
2330
+ keys.push(parent);
2331
+ }
2332
+
2333
+ // Loop through children appending to the array until we hit depth
2334
+
2335
+ var i = 0;
2336
+ while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
2337
+ i += 1;
2338
+ if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
2339
+ if (!options.allowPrototypes) {
2340
+ return;
2341
+ }
2342
+ }
2343
+ keys.push(segment[1]);
2344
+ }
2345
+
2346
+ // If there's a remainder, just add whatever is left
2347
+
2348
+ if (segment) {
2349
+ keys.push('[' + key.slice(segment.index) + ']');
2350
+ }
2351
+
2352
+ return parseObject(keys, val, options, valuesParsed);
2353
+ };
2354
+
2355
+ var normalizeParseOptions = function normalizeParseOptions(opts) {
2356
+ if (!opts) {
2357
+ return defaults;
2358
+ }
2359
+
2360
+ if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
2361
+ throw new TypeError('Decoder has to be a function.');
2362
+ }
2363
+
2364
+ if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
2365
+ throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
2366
+ }
2367
+ var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
2368
+
2369
+ return {
2370
+ allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
2371
+ allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
2372
+ allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
2373
+ arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
2374
+ charset: charset,
2375
+ charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
2376
+ comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
2377
+ decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
2378
+ delimiter: typeof opts.delimiter === 'string' || utils$l.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
2379
+ // eslint-disable-next-line no-implicit-coercion, no-extra-parens
2380
+ depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
2381
+ ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
2382
+ interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
2383
+ parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
2384
+ parseArrays: opts.parseArrays !== false,
2385
+ plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
2386
+ strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
2387
+ };
2388
+ };
2389
+
2390
+ var parse$6 = function (str, opts) {
2391
+ var options = normalizeParseOptions(opts);
2392
+
2393
+ if (str === '' || str === null || typeof str === 'undefined') {
2394
+ return options.plainObjects ? Object.create(null) : {};
2395
+ }
2396
+
2397
+ var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
2398
+ var obj = options.plainObjects ? Object.create(null) : {};
2399
+
2400
+ // Iterate over the keys and setup the new object
2401
+
2402
+ var keys = Object.keys(tempObj);
2403
+ for (var i = 0; i < keys.length; ++i) {
2404
+ var key = keys[i];
2405
+ var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
2406
+ obj = utils$l.merge(obj, newObj, options);
2407
+ }
2408
+
2409
+ if (options.allowSparse === true) {
2410
+ return obj;
2411
+ }
2412
+
2413
+ return utils$l.compact(obj);
2414
+ };
2415
+
2416
+ var stringify$5 = stringify_1;
2417
+ var parse$5 = parse$6;
2418
+ var formats = formats$3;
2419
+
2420
+ var lib = {
2421
+ formats: formats,
2422
+ parse: parse$5,
2423
+ stringify: stringify$5
2424
+ };
2425
+
161
2426
  class CustomCommands {
162
2427
  constructor(page, request, baseURL = process.env.BASE_URL) {
163
2428
  this.interceptMultipleResponses = ({ responseUrl = "", responseStatus = 200, times = 1, baseUrl, customPageContext, timeout = 35000, } = {}) => {
@@ -220,17 +2485,14 @@ class CustomCommands {
220
2485
  "x-csrf-token": csrfToken !== null && csrfToken !== void 0 ? csrfToken : "",
221
2486
  },
222
2487
  data,
223
- params,
224
2488
  ...otherOptions,
225
2489
  };
226
- const httpMethodsHandlers = {
227
- get: () => this.request.get(url, requestOptions),
228
- patch: () => this.request.patch(url, requestOptions),
229
- post: () => this.request.post(url, requestOptions),
230
- put: () => this.request.put(url, requestOptions),
231
- delete: () => this.request.delete(url, requestOptions),
232
- };
233
- return await httpMethodsHandlers[method]();
2490
+ const formattedUrl = isEmpty$1(params)
2491
+ ? url
2492
+ : `${url}?${lib.stringify(params, {
2493
+ arrayFormat: "brackets",
2494
+ })}`;
2495
+ return await this.request[method](formattedUrl, requestOptions);
234
2496
  };
235
2497
  this.verifyFieldValue = values => {
236
2498
  const verifyEachFieldValue = ({ field, value, }) => expect(this.page.getByTestId(field)).toHaveValue(value);
@@ -317,33 +2579,6 @@ const generateStagingData = (product = "invoice") => {
317
2579
  };
318
2580
  };
319
2581
 
320
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
321
-
322
- function getDefaultExportFromCjs (x) {
323
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
324
- }
325
-
326
- function getAugmentedNamespace(n) {
327
- var f = n.default;
328
- if (typeof f == "function") {
329
- var a = function () {
330
- return f.apply(this, arguments);
331
- };
332
- a.prototype = f.prototype;
333
- } else a = {};
334
- Object.defineProperty(a, '__esModule', {value: true});
335
- Object.keys(n).forEach(function (k) {
336
- var d = Object.getOwnPropertyDescriptor(n, k);
337
- Object.defineProperty(a, k, d.get ? d : {
338
- enumerable: true,
339
- get: function () {
340
- return n[k];
341
- }
342
- });
343
- });
344
- return a;
345
- }
346
-
347
2582
  var src = {exports: {}};
348
2583
 
349
2584
  var browser$1 = {exports: {}};
@@ -1104,7 +3339,7 @@ var hasRequiredSupportsColor;
1104
3339
  function requireSupportsColor () {
1105
3340
  if (hasRequiredSupportsColor) return supportsColor_1;
1106
3341
  hasRequiredSupportsColor = 1;
1107
- const os = require$$0$2;
3342
+ const os = require$$0$3;
1108
3343
  const tty = require$$1;
1109
3344
  const hasFlag = requireHasFlag();
1110
3345
 
@@ -1252,7 +3487,7 @@ function requireNode () {
1252
3487
  hasRequiredNode = 1;
1253
3488
  (function (module, exports) {
1254
3489
  const tty = require$$1;
1255
- const util = require$$0$3;
3490
+ const util = require$$0$2;
1256
3491
 
1257
3492
  /**
1258
3493
  * This is the Node.js implementation of `debug()`.
@@ -3122,7 +5357,7 @@ class StealthPlugin extends PuppeteerExtraPlugin {
3122
5357
  const defaultExport = opts => new StealthPlugin(opts);
3123
5358
  var puppeteerExtraPluginStealth = defaultExport;
3124
5359
 
3125
- var stealth = test$1.extend({
5360
+ var stealth = test$2.extend({
3126
5361
  browser: async ({ browser }, use) => {
3127
5362
  await browser.close();
3128
5363
  chromium.use(puppeteerExtraPluginStealth());
@@ -3250,7 +5485,7 @@ var path$a = {};
3250
5485
 
3251
5486
  Object.defineProperty(path$a, "__esModule", { value: true });
3252
5487
  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;
3253
- const os$1 = require$$0$2;
5488
+ const os$1 = require$$0$3;
3254
5489
  const path$9 = require$$0$4;
3255
5490
  const IS_WINDOWS_PLATFORM = os$1.platform() === 'win32';
3256
5491
  const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\
@@ -3492,7 +5727,7 @@ var isGlob$1 = function isGlob(str, options) {
3492
5727
 
3493
5728
  var isGlob = isGlob$1;
3494
5729
  var pathPosixDirname = require$$0$4.posix.dirname;
3495
- var isWin32 = require$$0$2.platform() === 'win32';
5730
+ var isWin32 = require$$0$3.platform() === 'win32';
3496
5731
 
3497
5732
  var slash = '/';
3498
5733
  var backslash = /\\/g;
@@ -3988,7 +6223,7 @@ var toRegexRange_1 = toRegexRange$1;
3988
6223
  * Licensed under the MIT License.
3989
6224
  */
3990
6225
 
3991
- const util$1 = require$$0$3;
6226
+ const util$1 = require$$0$2;
3992
6227
  const toRegexRange = toRegexRange_1;
3993
6228
 
3994
6229
  const isObject$1 = val => val !== null && typeof val === 'object' && !Array.isArray(val);
@@ -7025,7 +9260,7 @@ var picomatch_1 = picomatch$1;
7025
9260
  module.exports = picomatch_1;
7026
9261
  } (picomatch$2));
7027
9262
 
7028
- const util = require$$0$3;
9263
+ const util = require$$0$2;
7029
9264
  const braces = braces_1;
7030
9265
  const picomatch = picomatch$2.exports;
7031
9266
  const utils$b = utils$f;
@@ -9728,7 +11963,7 @@ var settings = {};
9728
11963
  Object.defineProperty(exports, "__esModule", { value: true });
9729
11964
  exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
9730
11965
  const fs = require$$0__default;
9731
- const os = require$$0$2;
11966
+ const os = require$$0$3;
9732
11967
  /**
9733
11968
  * The `os.cpus` method can return zero. We expect the number of cores to be greater than zero.
9734
11969
  * https://github.com/nodejs/node/blob/7faeddf23a98c53896f8b574a6e66589e8fb1eb8/lib/os.js#L106-L107
@@ -10011,8 +12246,8 @@ const MEMBER_TEXTS = {
10011
12246
  agent: "Agent",
10012
12247
  };
10013
12248
  const INTEGRATIONS_TEXTS = {
10014
- connectHeader: (integration) => `Connect your ${humanize(integration)} account`,
10015
- connectedHeader: (integration) => `You are connected to ${humanize(integration)}`,
12249
+ connectHeader: (integration) => `Connect your ${integration} account`,
12250
+ connectedHeader: (integration) => `You are connected to ${integration}`,
10016
12251
  };
10017
12252
  const SLACK_WEB_TEXTS = {
10018
12253
  signOut: "Sign out",
@@ -10089,21 +12324,21 @@ class HelpAndProfilePage {
10089
12324
  });
10090
12325
  await this.page.reload();
10091
12326
  await chatInitializationApis;
10092
- await test$1.step("Step 1: Open live chat and verify iframe", this.openLiveChatAndVerify);
10093
- await test$1.step("Step 2: Close and reopen live chat frame", async () => {
12327
+ await test$2.step("Step 1: Open live chat and verify iframe", this.openLiveChatAndVerify);
12328
+ await test$2.step("Step 2: Close and reopen live chat frame", async () => {
10094
12329
  await this.page.getByTestId(CHAT_WIDGET_SELECTORS.closeChat).click();
10095
- await expect(this.neetoChatWidget).toBeHidden({ timeout: 20000 });
12330
+ await expect(this.neetoChatWidget).toBeHidden({ timeout: 35000 });
10096
12331
  await this.openLiveChatAndVerify();
10097
12332
  });
10098
- await test$1.step("Step 3: Start new conversation", async () => {
12333
+ await test$2.step("Step 3: Start new conversation", async () => {
10099
12334
  const newConversationButton = this.neetoChatFrame.getByRole("button", {
10100
12335
  name: CHAT_WIDGET_TEXTS.newConversation,
10101
12336
  });
10102
- await expect(newConversationButton).toBeVisible({ timeout: 20000 }); // Adding additional toBeVisible to take advantage of the auto-retrying web-first assertion
12337
+ await expect(newConversationButton).toBeVisible({ timeout: 35000 }); // Adding additional toBeVisible to take advantage of the auto-retrying web-first assertion
10103
12338
  await newConversationButton.click();
10104
- await expect(this.neetoChatSpinner).toBeHidden({ timeout: 20000 });
12339
+ await expect(this.neetoChatSpinner).toBeHidden({ timeout: 35000 });
10105
12340
  });
10106
- await test$1.step("Step 4: Fill and submit email", async () => {
12341
+ await test$2.step("Step 4: Fill and submit email", async () => {
10107
12342
  var _a, _b;
10108
12343
  await this.neetoChatFrame
10109
12344
  .getByTestId(CHAT_WIDGET_SELECTORS.preChatEmailInput)
@@ -10112,15 +12347,15 @@ class HelpAndProfilePage {
10112
12347
  .getByTestId(CHAT_WIDGET_SELECTORS.preChatSubmitButton)
10113
12348
  .getByRole("button")
10114
12349
  .click();
10115
- await expect(this.neetoChatSpinner).toBeHidden({ timeout: 20000 });
12350
+ await expect(this.neetoChatSpinner).toBeHidden({ timeout: 35000 });
10116
12351
  });
10117
- await test$1.step("Step 5: Verify conversation window", async () => {
12352
+ await test$2.step("Step 5: Verify conversation window", async () => {
10118
12353
  await expect(this.neetoChatFrame.getByTestId(CHAT_WIDGET_SELECTORS.chatBubble)).toHaveText(CHAT_WIDGET_TEXTS.welcomeChatBubble);
10119
12354
  });
10120
12355
  };
10121
12356
  this.openAndVerifyHelpArticlesV2 = async () => {
10122
- await test$1.step("Step 1: Open Help Center links", this.openHelpCenterV2);
10123
- await test$1.step("Step 2: Open and verify help articles link", async () => {
12357
+ await test$2.step("Step 1: Open Help Center links", this.openHelpCenterV2);
12358
+ await test$2.step("Step 2: Open and verify help articles link", async () => {
10124
12359
  const helpArticlesPromise = this.page.waitForEvent("popup");
10125
12360
  await this.page
10126
12361
  .getByTestId(HELP_CENTER_SELECTORS.documentationButton)
@@ -10139,15 +12374,15 @@ class HelpAndProfilePage {
10139
12374
  }).toPass({ timeout: 45000 });
10140
12375
  };
10141
12376
  this.openAndVerifyChangelogV2 = async () => {
10142
- await test$1.step("Step 1: Open Help Center links and changelog", this.openChangelogPaneV2);
10143
- await test$1.step("Step 2: Close and reopen changelog pane", async () => {
12377
+ await test$2.step("Step 1: Open Help Center links and changelog", this.openChangelogPaneV2);
12378
+ await test$2.step("Step 2: Close and reopen changelog pane", async () => {
10144
12379
  await this.page
10145
12380
  .getByTestId(CHANGELOG_WIDGET_SELECTORS.closeButton)
10146
12381
  .click();
10147
12382
  await expect(this.page.locator(CHANGELOG_WIDGET_SELECTORS.changelogWrapper)).toBeHidden();
10148
12383
  await this.openChangelogPaneV2();
10149
12384
  });
10150
- await test$1.step("Step 3: Open and verify public URL", async () => {
12385
+ await test$2.step("Step 3: Open and verify public URL", async () => {
10151
12386
  const changelogPagePromise = this.page.waitForEvent("popup");
10152
12387
  await this.page
10153
12388
  .getByTestId(CHANGELOG_WIDGET_SELECTORS.publicUrlLink)
@@ -10186,8 +12421,8 @@ class HelpAndProfilePage {
10186
12421
  },
10187
12422
  ];
10188
12423
  const shortcuts = [...globalShortcuts, ...productShortcuts];
10189
- await test$1.step("Step 1: Open Help Center", this.openHelpCenterV2);
10190
- await test$1.step("Step 2: Open and close keyboard shortcuts from UI", async () => {
12424
+ await test$2.step("Step 1: Open Help Center", this.openHelpCenterV2);
12425
+ await test$2.step("Step 2: Open and close keyboard shortcuts from UI", async () => {
10191
12426
  await this.page
10192
12427
  .getByTestId(HELP_CENTER_SELECTORS.keyboardShortcutButton)
10193
12428
  .click();
@@ -10197,13 +12432,13 @@ class HelpAndProfilePage {
10197
12432
  .click();
10198
12433
  await expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).toHaveCSS("width", "1px");
10199
12434
  });
10200
- await test$1.step("Step 3: Open and close keyboard shortcuts through shortcut", async () => {
12435
+ await test$2.step("Step 3: Open and close keyboard shortcuts through shortcut", async () => {
10201
12436
  await this.page.keyboard.press("Shift+/");
10202
12437
  await expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).not.toHaveCSS("width", "1px");
10203
12438
  await this.page.keyboard.press("Escape");
10204
12439
  await expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).toHaveCSS("width", "1px");
10205
12440
  });
10206
- await test$1.step("Step 4: Verify all displayed keyboard shortcuts", async () => {
12441
+ await test$2.step("Step 4: Verify all displayed keyboard shortcuts", async () => {
10207
12442
  await this.page.keyboard.press("Shift+/");
10208
12443
  await expect(this.page.getByTestId(KEYBOARD_SHORTCUTS_SELECTORS.keyboardShortcutsPane)).not.toHaveCSS("width", "1px");
10209
12444
  await expect(this.page
@@ -10216,7 +12451,7 @@ class HelpAndProfilePage {
10216
12451
  });
10217
12452
  };
10218
12453
  this.openAppSwitcherAndVerifyV2 = async () => {
10219
- await test$1.step("Step 1: Verify hovering over app switcher opens the app switcher drawer", () => expect(async () => {
12454
+ await test$2.step("Step 1: Verify hovering over app switcher opens the app switcher drawer", () => expect(async () => {
10220
12455
  await this.openHelpCenterV2();
10221
12456
  await this.page
10222
12457
  .getByTestId(COMMON_SELECTORS.appSwitcherButton)
@@ -10235,13 +12470,13 @@ class HelpAndProfilePage {
10235
12470
  await profilePage.close();
10236
12471
  };
10237
12472
  this.verifyProfileAndOrganizationLinksV2 = async () => {
10238
- await test$1.step("Step 1: Open Help center and verify", this.openHelpCenterV2);
10239
- await test$1.step("Step 2: Open My profile link and verify", async () => this.openAuthLinkAndVerify({
12473
+ await test$2.step("Step 1: Open Help center and verify", this.openHelpCenterV2);
12474
+ await test$2.step("Step 2: Open My profile link and verify", async () => this.openAuthLinkAndVerify({
10240
12475
  linkSelector: PROFILE_SECTION_SELECTORS.myProfileButton,
10241
12476
  redirectLink: ROUTES.myProfile,
10242
12477
  }));
10243
- await test$1.step("Step 3: Open Help center and verify", this.openHelpCenterV2);
10244
- await test$1.step("Step 4: Open My organization link and verify", async () => this.openAuthLinkAndVerify({
12478
+ await test$2.step("Step 3: Open Help center and verify", this.openHelpCenterV2);
12479
+ await test$2.step("Step 4: Open My organization link and verify", async () => this.openAuthLinkAndVerify({
10245
12480
  linkSelector: PROFILE_SECTION_SELECTORS.profileOrganizationSettingsButton,
10246
12481
  redirectLink: ROUTES.authSettings,
10247
12482
  }));
@@ -10249,8 +12484,8 @@ class HelpAndProfilePage {
10249
12484
  this.verifyLogoutV2 = async () => {
10250
12485
  if (shouldSkipSetupAndTeardown())
10251
12486
  return;
10252
- await test$1.step("Step 1: Open Help center and verify", this.openHelpCenterV2);
10253
- await test$1.step("Step 2: Click logout and verify", async () => {
12487
+ await test$2.step("Step 1: Open Help center and verify", this.openHelpCenterV2);
12488
+ await test$2.step("Step 2: Click logout and verify", async () => {
10254
12489
  await this.page
10255
12490
  .getByTestId(PROFILE_SECTION_SELECTORS.logoutButton)
10256
12491
  .click();
@@ -10333,9 +12568,11 @@ class IntegrationBase {
10333
12568
  this.integrationCard = this.page.getByTestId(INTEGRATION_SELECTORS.integrationCard(integration));
10334
12569
  this.integrationRouteIndex = integrationRouteIndex || "";
10335
12570
  this.connectHeader =
10336
- connectHeader || INTEGRATIONS_TEXTS.connectHeader(this.integration);
12571
+ connectHeader ||
12572
+ INTEGRATIONS_TEXTS.connectHeader(humanize(this.integration));
10337
12573
  this.connectedHeader =
10338
- connectedHeader || INTEGRATIONS_TEXTS.connectedHeader(this.integration);
12574
+ connectedHeader ||
12575
+ INTEGRATIONS_TEXTS.connectedHeader(humanize(this.integration));
10339
12576
  }
10340
12577
  }
10341
12578
 
@@ -10509,7 +12746,7 @@ class WebhooksPage {
10509
12746
  const parsedResponse = JSON.parse(content).webhook;
10510
12747
  callback({ parsedResponse, ...otherParams });
10511
12748
  }
10512
- }).toPass({ timeout: 10000 });
12749
+ }).toPass({ timeout: 20000 });
10513
12750
  };
10514
12751
  this.verifyWebhookDeliveries = async ({ callback = () => { }, ...otherParams }) => {
10515
12752
  await expect(this.page.getByTestId(WEBHOOK_SELECTORS.deliveryResponseCode)).toHaveText("200");
@@ -11057,7 +13294,7 @@ var require$$4 = {
11057
13294
 
11058
13295
  const fs = require$$0__default;
11059
13296
  const path = require$$0$4;
11060
- const os = require$$0$2;
13297
+ const os = require$$0$3;
11061
13298
  const crypto = require$$3;
11062
13299
  const packageJson = require$$4;
11063
13300