@elizaos/cli 1.0.0-beta.14 → 1.0.0-beta.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/assets/{index-DkttuN8l.js → index-B-Oq3Jrm.js} +397 -4049
  2. package/dist/assets/index-B-Oq3Jrm.js.br +0 -0
  3. package/dist/assets/index-B-Oq3Jrm.js.map +1 -0
  4. package/dist/assets/{index-CYFSqIDY.js → index-CqlCBiSA.js} +3610 -428
  5. package/dist/assets/index-CqlCBiSA.js.br +0 -0
  6. package/dist/assets/index-CqlCBiSA.js.map +1 -0
  7. package/dist/assets/{index-DGD81AaH.css → index-D5zkI4F0.css} +1 -1
  8. package/dist/assets/index-D5zkI4F0.css.br +0 -0
  9. package/dist/{chunk-NVS7BKOK.js → chunk-3IDMS7WK.js} +3 -3
  10. package/dist/{chunk-CM5ZFXSA.js → chunk-7ABFGZSM.js} +2 -2
  11. package/dist/{chunk-EE5EBKCS.js → chunk-C52PRVAX.js} +4 -4
  12. package/dist/{chunk-MIT7FN7P.js → chunk-DRXDXUAS.js} +1 -1
  13. package/dist/{chunk-7BS7QK7T.js → chunk-F5O2S4B6.js} +4 -4
  14. package/dist/{chunk-WYJ4WNMA.js → chunk-GJF7L573.js} +1 -1
  15. package/dist/{chunk-TTGJBCS7.js → chunk-KI3MVMH4.js} +2 -2
  16. package/dist/{chunk-ZFMKXYT3.js → chunk-M7UCL2VC.js} +4 -4
  17. package/dist/{chunk-NMCP6M4Z.js → chunk-MJEUXHN3.js} +1 -1
  18. package/dist/{chunk-6UCSNJIG.js → chunk-Q5F6LCOL.js} +18 -2
  19. package/dist/{chunk-LCYCJQD6.js → chunk-QNB6Q2ZE.js} +3 -3
  20. package/dist/{chunk-ETBDSKOZ.js → chunk-QPX7K5IA.js} +2 -2
  21. package/dist/{chunk-XC3HV53B.js → chunk-STQA5JJO.js} +4 -4
  22. package/dist/{chunk-CACOPOIR.js → chunk-T63WV6GP.js} +15 -8
  23. package/dist/{chunk-UTLCVYAM.js → chunk-WCHP2HIF.js} +3 -3
  24. package/dist/{chunk-JB3ORIGH.js → chunk-ZNJIRLA4.js} +2 -2
  25. package/dist/{chunk-2GOBLHKT.js → chunk-ZQITDVO6.js} +3 -3
  26. package/dist/commands/agent.js +2 -2
  27. package/dist/commands/create.js +5 -5
  28. package/dist/commands/dev.js +4 -4
  29. package/dist/commands/env.js +3 -3
  30. package/dist/commands/install.js +3 -3
  31. package/dist/commands/plugin.js +5 -5
  32. package/dist/commands/project.js +5 -5
  33. package/dist/commands/publish.js +5 -5
  34. package/dist/commands/start.js +8 -8
  35. package/dist/commands/test.js +9 -9
  36. package/dist/commands/update.js +4 -4
  37. package/dist/index.html +2 -2
  38. package/dist/index.js +17 -17
  39. package/dist/{registry-74RTO7NE.js → registry-XXYZKVH4.js} +2 -2
  40. package/package.json +6 -6
  41. package/templates/plugin-starter/package.json +1 -1
  42. package/templates/project-starter/package.json +6 -6
  43. package/dist/assets/index-CYFSqIDY.js.br +0 -0
  44. package/dist/assets/index-CYFSqIDY.js.map +0 -1
  45. package/dist/assets/index-DGD81AaH.css.br +0 -0
  46. package/dist/assets/index-DkttuN8l.js.br +0 -0
  47. package/dist/assets/index-DkttuN8l.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { r as require$$2, a as requireString_decoder, c as commonjsGlobal, b as requireEvents, g as getDefaultExportFromCjs } from "./index-CYFSqIDY.js";
1
+ import { r as require$$2, a as requireString_decoder, c as commonjsGlobal, b as requireEvents, g as getDefaultExportFromCjs } from "./index-CqlCBiSA.js";
2
2
  function _mergeNamespaces(n, m) {
3
3
  for (var i = 0; i < m.length; i++) {
4
4
  const e = m[i];
@@ -815,24 +815,24 @@ function requireColors() {
815
815
  };
816
816
  return colors;
817
817
  }
818
- var util$1 = {};
819
- var isBufferBrowser$1;
820
- var hasRequiredIsBufferBrowser$1;
821
- function requireIsBufferBrowser$1() {
822
- if (hasRequiredIsBufferBrowser$1) return isBufferBrowser$1;
823
- hasRequiredIsBufferBrowser$1 = 1;
824
- isBufferBrowser$1 = function isBuffer(arg) {
818
+ var util = {};
819
+ var isBufferBrowser;
820
+ var hasRequiredIsBufferBrowser;
821
+ function requireIsBufferBrowser() {
822
+ if (hasRequiredIsBufferBrowser) return isBufferBrowser;
823
+ hasRequiredIsBufferBrowser = 1;
824
+ isBufferBrowser = function isBuffer(arg) {
825
825
  return arg && typeof arg === "object" && typeof arg.copy === "function" && typeof arg.fill === "function" && typeof arg.readUInt8 === "function";
826
826
  };
827
- return isBufferBrowser$1;
827
+ return isBufferBrowser;
828
828
  }
829
- var inherits_browser$1 = { exports: {} };
830
- var hasRequiredInherits_browser$1;
831
- function requireInherits_browser$1() {
832
- if (hasRequiredInherits_browser$1) return inherits_browser$1.exports;
833
- hasRequiredInherits_browser$1 = 1;
829
+ var inherits_browser = { exports: {} };
830
+ var hasRequiredInherits_browser;
831
+ function requireInherits_browser() {
832
+ if (hasRequiredInherits_browser) return inherits_browser.exports;
833
+ hasRequiredInherits_browser = 1;
834
834
  if (typeof Object.create === "function") {
835
- inherits_browser$1.exports = function inherits(ctor, superCtor) {
835
+ inherits_browser.exports = function inherits(ctor, superCtor) {
836
836
  ctor.super_ = superCtor;
837
837
  ctor.prototype = Object.create(superCtor.prototype, {
838
838
  constructor: {
@@ -844,7 +844,7 @@ function requireInherits_browser$1() {
844
844
  });
845
845
  };
846
846
  } else {
847
- inherits_browser$1.exports = function inherits(ctor, superCtor) {
847
+ inherits_browser.exports = function inherits(ctor, superCtor) {
848
848
  ctor.super_ = superCtor;
849
849
  var TempCtor = function() {
850
850
  };
@@ -853,12 +853,12 @@ function requireInherits_browser$1() {
853
853
  ctor.prototype.constructor = ctor;
854
854
  };
855
855
  }
856
- return inherits_browser$1.exports;
856
+ return inherits_browser.exports;
857
857
  }
858
- var hasRequiredUtil$1;
859
- function requireUtil$1() {
860
- if (hasRequiredUtil$1) return util$1;
861
- hasRequiredUtil$1 = 1;
858
+ var hasRequiredUtil;
859
+ function requireUtil() {
860
+ if (hasRequiredUtil) return util;
861
+ hasRequiredUtil = 1;
862
862
  (function(exports) {
863
863
  var define_process_env_default = {};
864
864
  var formatRegExp = /%[sdj%]/g;
@@ -1254,7 +1254,7 @@ function requireUtil$1() {
1254
1254
  typeof arg === "undefined";
1255
1255
  }
1256
1256
  exports.isPrimitive = isPrimitive;
1257
- exports.isBuffer = requireIsBufferBrowser$1();
1257
+ exports.isBuffer = requireIsBufferBrowser();
1258
1258
  function objectToString(o) {
1259
1259
  return Object.prototype.toString.call(o);
1260
1260
  }
@@ -1287,7 +1287,7 @@ function requireUtil$1() {
1287
1287
  exports.log = function() {
1288
1288
  console.log("%s - %s", timestamp(), exports.format.apply(exports, arguments));
1289
1289
  };
1290
- exports.inherits = requireInherits_browser$1();
1290
+ exports.inherits = requireInherits_browser();
1291
1291
  exports._extend = function(origin, add) {
1292
1292
  if (!add || !isObject(add)) return origin;
1293
1293
  var keys = Object.keys(add);
@@ -1300,4080 +1300,428 @@ function requireUtil$1() {
1300
1300
  function hasOwnProperty(obj, prop) {
1301
1301
  return Object.prototype.hasOwnProperty.call(obj, prop);
1302
1302
  }
1303
- })(util$1);
1304
- return util$1;
1303
+ })(util);
1304
+ return util;
1305
1305
  }
1306
1306
  var path = { exports: {} };
1307
- var util = {};
1308
- var isBufferBrowser;
1309
- var hasRequiredIsBufferBrowser;
1310
- function requireIsBufferBrowser() {
1311
- if (hasRequiredIsBufferBrowser) return isBufferBrowser;
1312
- hasRequiredIsBufferBrowser = 1;
1313
- isBufferBrowser = function isBuffer(arg) {
1314
- return arg && typeof arg === "object" && typeof arg.copy === "function" && typeof arg.fill === "function" && typeof arg.readUInt8 === "function";
1315
- };
1316
- return isBufferBrowser;
1317
- }
1318
- var inherits_browser = { exports: {} };
1319
- var hasRequiredInherits_browser;
1320
- function requireInherits_browser() {
1321
- if (hasRequiredInherits_browser) return inherits_browser.exports;
1322
- hasRequiredInherits_browser = 1;
1323
- if (typeof Object.create === "function") {
1324
- inherits_browser.exports = function inherits(ctor, superCtor) {
1325
- ctor.super_ = superCtor;
1326
- ctor.prototype = Object.create(superCtor.prototype, {
1327
- constructor: {
1328
- value: ctor,
1329
- enumerable: false,
1330
- writable: true,
1331
- configurable: true
1307
+ var hasRequiredPath;
1308
+ function requirePath() {
1309
+ if (hasRequiredPath) return path.exports;
1310
+ hasRequiredPath = 1;
1311
+ var define_process_env_default = {};
1312
+ var isWindows = process.platform === "win32";
1313
+ var util2 = requireUtil();
1314
+ function normalizeArray(parts, allowAboveRoot) {
1315
+ var res = [];
1316
+ for (var i = 0; i < parts.length; i++) {
1317
+ var p = parts[i];
1318
+ if (!p || p === ".")
1319
+ continue;
1320
+ if (p === "..") {
1321
+ if (res.length && res[res.length - 1] !== "..") {
1322
+ res.pop();
1323
+ } else if (allowAboveRoot) {
1324
+ res.push("..");
1332
1325
  }
1333
- });
1334
- };
1335
- } else {
1336
- inherits_browser.exports = function inherits(ctor, superCtor) {
1337
- ctor.super_ = superCtor;
1338
- var TempCtor = function() {
1339
- };
1340
- TempCtor.prototype = superCtor.prototype;
1341
- ctor.prototype = new TempCtor();
1342
- ctor.prototype.constructor = ctor;
1326
+ } else {
1327
+ res.push(p);
1328
+ }
1329
+ }
1330
+ return res;
1331
+ }
1332
+ function trimArray(arr) {
1333
+ var lastIndex = arr.length - 1;
1334
+ var start = 0;
1335
+ for (; start <= lastIndex; start++) {
1336
+ if (arr[start])
1337
+ break;
1338
+ }
1339
+ var end = lastIndex;
1340
+ for (; end >= 0; end--) {
1341
+ if (arr[end])
1342
+ break;
1343
+ }
1344
+ if (start === 0 && end === lastIndex)
1345
+ return arr;
1346
+ if (start > end)
1347
+ return [];
1348
+ return arr.slice(start, end + 1);
1349
+ }
1350
+ var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
1351
+ var splitTailRe = /^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/;
1352
+ var win32 = {};
1353
+ function win32SplitPath(filename) {
1354
+ var result = splitDeviceRe.exec(filename), device = (result[1] || "") + (result[2] || ""), tail = result[3] || "";
1355
+ var result2 = splitTailRe.exec(tail), dir = result2[1], basename = result2[2], ext = result2[3];
1356
+ return [device, dir, basename, ext];
1357
+ }
1358
+ function win32StatPath(path2) {
1359
+ var result = splitDeviceRe.exec(path2), device = result[1] || "", isUnc = !!device && device[1] !== ":";
1360
+ return {
1361
+ device,
1362
+ isUnc,
1363
+ isAbsolute: isUnc || !!result[2],
1364
+ // UNC paths are always absolute
1365
+ tail: result[3]
1343
1366
  };
1344
1367
  }
1345
- return inherits_browser.exports;
1346
- }
1347
- var hasRequiredUtil;
1348
- function requireUtil() {
1349
- if (hasRequiredUtil) return util;
1350
- hasRequiredUtil = 1;
1351
- (function(exports) {
1352
- var define_process_env_default = {};
1353
- var formatRegExp = /%[sdj%]/g;
1354
- exports.format = function(f) {
1355
- if (!isString(f)) {
1356
- var objects = [];
1357
- for (var i = 0; i < arguments.length; i++) {
1358
- objects.push(inspect(arguments[i]));
1359
- }
1360
- return objects.join(" ");
1361
- }
1362
- var i = 1;
1363
- var args = arguments;
1364
- var len = args.length;
1365
- var str = String(f).replace(formatRegExp, function(x2) {
1366
- if (x2 === "%%") return "%";
1367
- if (i >= len) return x2;
1368
- switch (x2) {
1369
- case "%s":
1370
- return String(args[i++]);
1371
- case "%d":
1372
- return Number(args[i++]);
1373
- case "%j":
1374
- try {
1375
- return JSON.stringify(args[i++]);
1376
- } catch (_) {
1377
- return "[Circular]";
1378
- }
1379
- default:
1380
- return x2;
1381
- }
1382
- });
1383
- for (var x = args[i]; i < len; x = args[++i]) {
1384
- if (isNull(x) || !isObject(x)) {
1385
- str += " " + x;
1386
- } else {
1387
- str += " " + inspect(x);
1368
+ function normalizeUNCRoot(device) {
1369
+ return "\\\\" + device.replace(/^[\\\/]+/, "").replace(/[\\\/]+/g, "\\");
1370
+ }
1371
+ win32.resolve = function() {
1372
+ var resolvedDevice = "", resolvedTail = "", resolvedAbsolute = false;
1373
+ for (var i = arguments.length - 1; i >= -1; i--) {
1374
+ var path2;
1375
+ if (i >= 0) {
1376
+ path2 = arguments[i];
1377
+ } else if (!resolvedDevice) {
1378
+ path2 = process.cwd();
1379
+ } else {
1380
+ path2 = define_process_env_default["=" + resolvedDevice];
1381
+ if (!path2 || path2.substr(0, 3).toLowerCase() !== resolvedDevice.toLowerCase() + "\\") {
1382
+ path2 = resolvedDevice + "\\";
1388
1383
  }
1389
1384
  }
1390
- return str;
1391
- };
1392
- exports.deprecate = function(fn, msg) {
1393
- if (isUndefined(commonjsGlobal.process)) {
1394
- return function() {
1395
- return exports.deprecate(fn, msg).apply(this, arguments);
1396
- };
1385
+ if (!util2.isString(path2)) {
1386
+ throw new TypeError("Arguments to path.resolve must be strings");
1387
+ } else if (!path2) {
1388
+ continue;
1397
1389
  }
1398
- if (process.noDeprecation === true) {
1399
- return fn;
1390
+ var result = win32StatPath(path2), device = result.device, isUnc = result.isUnc, isAbsolute = result.isAbsolute, tail = result.tail;
1391
+ if (device && resolvedDevice && device.toLowerCase() !== resolvedDevice.toLowerCase()) {
1392
+ continue;
1400
1393
  }
1401
- var warned = false;
1402
- function deprecated() {
1403
- if (!warned) {
1404
- if (process.throwDeprecation) {
1405
- throw new Error(msg);
1406
- } else if (process.traceDeprecation) {
1407
- console.trace(msg);
1408
- } else {
1409
- console.error(msg);
1410
- }
1411
- warned = true;
1412
- }
1413
- return fn.apply(this, arguments);
1394
+ if (!resolvedDevice) {
1395
+ resolvedDevice = device;
1414
1396
  }
1415
- return deprecated;
1416
- };
1417
- var debugs = {};
1418
- var debugEnviron;
1419
- exports.debuglog = function(set) {
1420
- if (isUndefined(debugEnviron))
1421
- debugEnviron = define_process_env_default.NODE_DEBUG || "";
1422
- set = set.toUpperCase();
1423
- if (!debugs[set]) {
1424
- if (new RegExp("\\b" + set + "\\b", "i").test(debugEnviron)) {
1425
- var pid = process.pid;
1426
- debugs[set] = function() {
1427
- var msg = exports.format.apply(exports, arguments);
1428
- console.error("%s %d: %s", set, pid, msg);
1429
- };
1430
- } else {
1431
- debugs[set] = function() {
1432
- };
1433
- }
1397
+ if (!resolvedAbsolute) {
1398
+ resolvedTail = tail + "\\" + resolvedTail;
1399
+ resolvedAbsolute = isAbsolute;
1434
1400
  }
1435
- return debugs[set];
1436
- };
1437
- function inspect(obj, opts) {
1438
- var ctx = {
1439
- seen: [],
1440
- stylize: stylizeNoColor
1441
- };
1442
- if (arguments.length >= 3) ctx.depth = arguments[2];
1443
- if (arguments.length >= 4) ctx.colors = arguments[3];
1444
- if (isBoolean(opts)) {
1445
- ctx.showHidden = opts;
1446
- } else if (opts) {
1447
- exports._extend(ctx, opts);
1401
+ if (resolvedDevice && resolvedAbsolute) {
1402
+ break;
1448
1403
  }
1449
- if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
1450
- if (isUndefined(ctx.depth)) ctx.depth = 2;
1451
- if (isUndefined(ctx.colors)) ctx.colors = false;
1452
- if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
1453
- if (ctx.colors) ctx.stylize = stylizeWithColor;
1454
- return formatValue(ctx, obj, ctx.depth);
1455
1404
  }
1456
- exports.inspect = inspect;
1457
- inspect.colors = {
1458
- "bold": [1, 22],
1459
- "italic": [3, 23],
1460
- "underline": [4, 24],
1461
- "inverse": [7, 27],
1462
- "white": [37, 39],
1463
- "grey": [90, 39],
1464
- "black": [30, 39],
1465
- "blue": [34, 39],
1466
- "cyan": [36, 39],
1467
- "green": [32, 39],
1468
- "magenta": [35, 39],
1469
- "red": [31, 39],
1470
- "yellow": [33, 39]
1471
- };
1472
- inspect.styles = {
1473
- "special": "cyan",
1474
- "number": "yellow",
1475
- "boolean": "yellow",
1476
- "undefined": "grey",
1477
- "null": "bold",
1478
- "string": "green",
1479
- "date": "magenta",
1480
- // "name": intentionally not styling
1481
- "regexp": "red"
1482
- };
1483
- function stylizeWithColor(str, styleType) {
1484
- var style = inspect.styles[styleType];
1485
- if (style) {
1486
- return "\x1B[" + inspect.colors[style][0] + "m" + str + "\x1B[" + inspect.colors[style][1] + "m";
1487
- } else {
1488
- return str;
1489
- }
1490
- }
1491
- function stylizeNoColor(str, styleType) {
1492
- return str;
1493
- }
1494
- function arrayToHash(array) {
1495
- var hash = {};
1496
- array.forEach(function(val, idx) {
1497
- hash[val] = true;
1498
- });
1499
- return hash;
1500
- }
1501
- function formatValue(ctx, value, recurseTimes) {
1502
- if (ctx.customInspect && value && isFunction(value.inspect) && // Filter out the util module, it's inspect function is special
1503
- value.inspect !== exports.inspect && // Also filter out any prototype objects using the circular check.
1504
- !(value.constructor && value.constructor.prototype === value)) {
1505
- var ret = value.inspect(recurseTimes, ctx);
1506
- if (!isString(ret)) {
1507
- ret = formatValue(ctx, ret, recurseTimes);
1508
- }
1509
- return ret;
1510
- }
1511
- var primitive = formatPrimitive(ctx, value);
1512
- if (primitive) {
1513
- return primitive;
1514
- }
1515
- var keys = Object.keys(value);
1516
- var visibleKeys = arrayToHash(keys);
1517
- if (ctx.showHidden) {
1518
- keys = Object.getOwnPropertyNames(value);
1519
- }
1520
- if (isError(value) && (keys.indexOf("message") >= 0 || keys.indexOf("description") >= 0)) {
1521
- return formatError(value);
1522
- }
1523
- if (keys.length === 0) {
1524
- if (isFunction(value)) {
1525
- var name = value.name ? ": " + value.name : "";
1526
- return ctx.stylize("[Function" + name + "]", "special");
1527
- }
1528
- if (isRegExp(value)) {
1529
- return ctx.stylize(RegExp.prototype.toString.call(value), "regexp");
1530
- }
1531
- if (isDate(value)) {
1532
- return ctx.stylize(Date.prototype.toString.call(value), "date");
1533
- }
1534
- if (isError(value)) {
1535
- return formatError(value);
1536
- }
1537
- }
1538
- var base = "", array = false, braces = ["{", "}"];
1539
- if (isArray(value)) {
1540
- array = true;
1541
- braces = ["[", "]"];
1542
- }
1543
- if (isFunction(value)) {
1544
- var n = value.name ? ": " + value.name : "";
1545
- base = " [Function" + n + "]";
1546
- }
1547
- if (isRegExp(value)) {
1548
- base = " " + RegExp.prototype.toString.call(value);
1549
- }
1550
- if (isDate(value)) {
1551
- base = " " + Date.prototype.toUTCString.call(value);
1552
- }
1553
- if (isError(value)) {
1554
- base = " " + formatError(value);
1555
- }
1556
- if (keys.length === 0 && (!array || value.length == 0)) {
1557
- return braces[0] + base + braces[1];
1558
- }
1559
- if (recurseTimes < 0) {
1560
- if (isRegExp(value)) {
1561
- return ctx.stylize(RegExp.prototype.toString.call(value), "regexp");
1562
- } else {
1563
- return ctx.stylize("[Object]", "special");
1564
- }
1565
- }
1566
- ctx.seen.push(value);
1567
- var output;
1568
- if (array) {
1569
- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
1570
- } else {
1571
- output = keys.map(function(key) {
1572
- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
1573
- });
1574
- }
1575
- ctx.seen.pop();
1576
- return reduceToSingleString(output, base, braces);
1577
- }
1578
- function formatPrimitive(ctx, value) {
1579
- if (isUndefined(value))
1580
- return ctx.stylize("undefined", "undefined");
1581
- if (isString(value)) {
1582
- var simple = "'" + JSON.stringify(value).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
1583
- return ctx.stylize(simple, "string");
1584
- }
1585
- if (isNumber(value))
1586
- return ctx.stylize("" + value, "number");
1587
- if (isBoolean(value))
1588
- return ctx.stylize("" + value, "boolean");
1589
- if (isNull(value))
1590
- return ctx.stylize("null", "null");
1591
- }
1592
- function formatError(value) {
1593
- return "[" + Error.prototype.toString.call(value) + "]";
1594
- }
1595
- function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
1596
- var output = [];
1597
- for (var i = 0, l = value.length; i < l; ++i) {
1598
- if (hasOwnProperty(value, String(i))) {
1599
- output.push(formatProperty(
1600
- ctx,
1601
- value,
1602
- recurseTimes,
1603
- visibleKeys,
1604
- String(i),
1605
- true
1606
- ));
1607
- } else {
1608
- output.push("");
1609
- }
1610
- }
1611
- keys.forEach(function(key) {
1612
- if (!key.match(/^\d+$/)) {
1613
- output.push(formatProperty(
1614
- ctx,
1615
- value,
1616
- recurseTimes,
1617
- visibleKeys,
1618
- key,
1619
- true
1620
- ));
1621
- }
1622
- });
1623
- return output;
1624
- }
1625
- function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
1626
- var name, str, desc;
1627
- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
1628
- if (desc.get) {
1629
- if (desc.set) {
1630
- str = ctx.stylize("[Getter/Setter]", "special");
1631
- } else {
1632
- str = ctx.stylize("[Getter]", "special");
1633
- }
1634
- } else {
1635
- if (desc.set) {
1636
- str = ctx.stylize("[Setter]", "special");
1637
- }
1638
- }
1639
- if (!hasOwnProperty(visibleKeys, key)) {
1640
- name = "[" + key + "]";
1641
- }
1642
- if (!str) {
1643
- if (ctx.seen.indexOf(desc.value) < 0) {
1644
- if (isNull(recurseTimes)) {
1645
- str = formatValue(ctx, desc.value, null);
1646
- } else {
1647
- str = formatValue(ctx, desc.value, recurseTimes - 1);
1648
- }
1649
- if (str.indexOf("\n") > -1) {
1650
- if (array) {
1651
- str = str.split("\n").map(function(line) {
1652
- return " " + line;
1653
- }).join("\n").substr(2);
1654
- } else {
1655
- str = "\n" + str.split("\n").map(function(line) {
1656
- return " " + line;
1657
- }).join("\n");
1658
- }
1659
- }
1660
- } else {
1661
- str = ctx.stylize("[Circular]", "special");
1662
- }
1663
- }
1664
- if (isUndefined(name)) {
1665
- if (array && key.match(/^\d+$/)) {
1666
- return str;
1667
- }
1668
- name = JSON.stringify("" + key);
1669
- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
1670
- name = name.substr(1, name.length - 2);
1671
- name = ctx.stylize(name, "name");
1672
- } else {
1673
- name = name.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
1674
- name = ctx.stylize(name, "string");
1675
- }
1676
- }
1677
- return name + ": " + str;
1678
- }
1679
- function reduceToSingleString(output, base, braces) {
1680
- var length = output.reduce(function(prev, cur) {
1681
- if (cur.indexOf("\n") >= 0) ;
1682
- return prev + cur.replace(/\u001b\[\d\d?m/g, "").length + 1;
1683
- }, 0);
1684
- if (length > 60) {
1685
- return braces[0] + (base === "" ? "" : base + "\n ") + " " + output.join(",\n ") + " " + braces[1];
1686
- }
1687
- return braces[0] + base + " " + output.join(", ") + " " + braces[1];
1688
- }
1689
- function isArray(ar) {
1690
- return Array.isArray(ar);
1691
- }
1692
- exports.isArray = isArray;
1693
- function isBoolean(arg) {
1694
- return typeof arg === "boolean";
1695
- }
1696
- exports.isBoolean = isBoolean;
1697
- function isNull(arg) {
1698
- return arg === null;
1699
- }
1700
- exports.isNull = isNull;
1701
- function isNullOrUndefined(arg) {
1702
- return arg == null;
1703
- }
1704
- exports.isNullOrUndefined = isNullOrUndefined;
1705
- function isNumber(arg) {
1706
- return typeof arg === "number";
1707
- }
1708
- exports.isNumber = isNumber;
1709
- function isString(arg) {
1710
- return typeof arg === "string";
1711
- }
1712
- exports.isString = isString;
1713
- function isSymbol(arg) {
1714
- return typeof arg === "symbol";
1715
- }
1716
- exports.isSymbol = isSymbol;
1717
- function isUndefined(arg) {
1718
- return arg === void 0;
1719
- }
1720
- exports.isUndefined = isUndefined;
1721
- function isRegExp(re) {
1722
- return isObject(re) && objectToString(re) === "[object RegExp]";
1723
- }
1724
- exports.isRegExp = isRegExp;
1725
- function isObject(arg) {
1726
- return typeof arg === "object" && arg !== null;
1727
- }
1728
- exports.isObject = isObject;
1729
- function isDate(d) {
1730
- return isObject(d) && objectToString(d) === "[object Date]";
1731
- }
1732
- exports.isDate = isDate;
1733
- function isError(e) {
1734
- return isObject(e) && (objectToString(e) === "[object Error]" || e instanceof Error);
1735
- }
1736
- exports.isError = isError;
1737
- function isFunction(arg) {
1738
- return typeof arg === "function";
1739
- }
1740
- exports.isFunction = isFunction;
1741
- function isPrimitive(arg) {
1742
- return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || // ES6 symbol
1743
- typeof arg === "undefined";
1744
- }
1745
- exports.isPrimitive = isPrimitive;
1746
- exports.isBuffer = requireIsBufferBrowser();
1747
- function objectToString(o) {
1748
- return Object.prototype.toString.call(o);
1749
- }
1750
- function pad(n) {
1751
- return n < 10 ? "0" + n.toString(10) : n.toString(10);
1752
- }
1753
- var months = [
1754
- "Jan",
1755
- "Feb",
1756
- "Mar",
1757
- "Apr",
1758
- "May",
1759
- "Jun",
1760
- "Jul",
1761
- "Aug",
1762
- "Sep",
1763
- "Oct",
1764
- "Nov",
1765
- "Dec"
1766
- ];
1767
- function timestamp() {
1768
- var d = /* @__PURE__ */ new Date();
1769
- var time = [
1770
- pad(d.getHours()),
1771
- pad(d.getMinutes()),
1772
- pad(d.getSeconds())
1773
- ].join(":");
1774
- return [d.getDate(), months[d.getMonth()], time].join(" ");
1775
- }
1776
- exports.log = function() {
1777
- console.log("%s - %s", timestamp(), exports.format.apply(exports, arguments));
1778
- };
1779
- exports.inherits = requireInherits_browser();
1780
- exports._extend = function(origin, add) {
1781
- if (!add || !isObject(add)) return origin;
1782
- var keys = Object.keys(add);
1783
- var i = keys.length;
1784
- while (i--) {
1785
- origin[keys[i]] = add[keys[i]];
1786
- }
1787
- return origin;
1788
- };
1789
- function hasOwnProperty(obj, prop) {
1790
- return Object.prototype.hasOwnProperty.call(obj, prop);
1791
- }
1792
- })(util);
1793
- return util;
1794
- }
1795
- var hasRequiredPath;
1796
- function requirePath() {
1797
- if (hasRequiredPath) return path.exports;
1798
- hasRequiredPath = 1;
1799
- var define_process_env_default = {};
1800
- var isWindows = process.platform === "win32";
1801
- var util2 = requireUtil();
1802
- function normalizeArray(parts, allowAboveRoot) {
1803
- var res = [];
1804
- for (var i = 0; i < parts.length; i++) {
1805
- var p = parts[i];
1806
- if (!p || p === ".")
1807
- continue;
1808
- if (p === "..") {
1809
- if (res.length && res[res.length - 1] !== "..") {
1810
- res.pop();
1811
- } else if (allowAboveRoot) {
1812
- res.push("..");
1813
- }
1814
- } else {
1815
- res.push(p);
1816
- }
1817
- }
1818
- return res;
1819
- }
1820
- function trimArray(arr) {
1821
- var lastIndex = arr.length - 1;
1822
- var start = 0;
1823
- for (; start <= lastIndex; start++) {
1824
- if (arr[start])
1825
- break;
1826
- }
1827
- var end = lastIndex;
1828
- for (; end >= 0; end--) {
1829
- if (arr[end])
1830
- break;
1831
- }
1832
- if (start === 0 && end === lastIndex)
1833
- return arr;
1834
- if (start > end)
1835
- return [];
1836
- return arr.slice(start, end + 1);
1837
- }
1838
- var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
1839
- var splitTailRe = /^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/;
1840
- var win32 = {};
1841
- function win32SplitPath(filename) {
1842
- var result = splitDeviceRe.exec(filename), device = (result[1] || "") + (result[2] || ""), tail = result[3] || "";
1843
- var result2 = splitTailRe.exec(tail), dir = result2[1], basename = result2[2], ext = result2[3];
1844
- return [device, dir, basename, ext];
1845
- }
1846
- function win32StatPath(path2) {
1847
- var result = splitDeviceRe.exec(path2), device = result[1] || "", isUnc = !!device && device[1] !== ":";
1848
- return {
1849
- device,
1850
- isUnc,
1851
- isAbsolute: isUnc || !!result[2],
1852
- // UNC paths are always absolute
1853
- tail: result[3]
1854
- };
1855
- }
1856
- function normalizeUNCRoot(device) {
1857
- return "\\\\" + device.replace(/^[\\\/]+/, "").replace(/[\\\/]+/g, "\\");
1858
- }
1859
- win32.resolve = function() {
1860
- var resolvedDevice = "", resolvedTail = "", resolvedAbsolute = false;
1861
- for (var i = arguments.length - 1; i >= -1; i--) {
1862
- var path2;
1863
- if (i >= 0) {
1864
- path2 = arguments[i];
1865
- } else if (!resolvedDevice) {
1866
- path2 = process.cwd();
1867
- } else {
1868
- path2 = define_process_env_default["=" + resolvedDevice];
1869
- if (!path2 || path2.substr(0, 3).toLowerCase() !== resolvedDevice.toLowerCase() + "\\") {
1870
- path2 = resolvedDevice + "\\";
1871
- }
1872
- }
1873
- if (!util2.isString(path2)) {
1874
- throw new TypeError("Arguments to path.resolve must be strings");
1875
- } else if (!path2) {
1876
- continue;
1877
- }
1878
- var result = win32StatPath(path2), device = result.device, isUnc = result.isUnc, isAbsolute = result.isAbsolute, tail = result.tail;
1879
- if (device && resolvedDevice && device.toLowerCase() !== resolvedDevice.toLowerCase()) {
1880
- continue;
1881
- }
1882
- if (!resolvedDevice) {
1883
- resolvedDevice = device;
1884
- }
1885
- if (!resolvedAbsolute) {
1886
- resolvedTail = tail + "\\" + resolvedTail;
1887
- resolvedAbsolute = isAbsolute;
1888
- }
1889
- if (resolvedDevice && resolvedAbsolute) {
1890
- break;
1891
- }
1892
- }
1893
- if (isUnc) {
1894
- resolvedDevice = normalizeUNCRoot(resolvedDevice);
1895
- }
1896
- resolvedTail = normalizeArray(
1897
- resolvedTail.split(/[\\\/]+/),
1898
- !resolvedAbsolute
1899
- ).join("\\");
1900
- return resolvedDevice + (resolvedAbsolute ? "\\" : "") + resolvedTail || ".";
1901
- };
1902
- win32.normalize = function(path2) {
1903
- var result = win32StatPath(path2), device = result.device, isUnc = result.isUnc, isAbsolute = result.isAbsolute, tail = result.tail, trailingSlash = /[\\\/]$/.test(tail);
1904
- tail = normalizeArray(tail.split(/[\\\/]+/), !isAbsolute).join("\\");
1905
- if (!tail && !isAbsolute) {
1906
- tail = ".";
1907
- }
1908
- if (tail && trailingSlash) {
1909
- tail += "\\";
1910
- }
1911
- if (isUnc) {
1912
- device = normalizeUNCRoot(device);
1913
- }
1914
- return device + (isAbsolute ? "\\" : "") + tail;
1915
- };
1916
- win32.isAbsolute = function(path2) {
1917
- return win32StatPath(path2).isAbsolute;
1918
- };
1919
- win32.join = function() {
1920
- var paths = [];
1921
- for (var i = 0; i < arguments.length; i++) {
1922
- var arg = arguments[i];
1923
- if (!util2.isString(arg)) {
1924
- throw new TypeError("Arguments to path.join must be strings");
1925
- }
1926
- if (arg) {
1927
- paths.push(arg);
1928
- }
1929
- }
1930
- var joined = paths.join("\\");
1931
- if (!/^[\\\/]{2}[^\\\/]/.test(paths[0])) {
1932
- joined = joined.replace(/^[\\\/]{2,}/, "\\");
1933
- }
1934
- return win32.normalize(joined);
1935
- };
1936
- win32.relative = function(from, to) {
1937
- from = win32.resolve(from);
1938
- to = win32.resolve(to);
1939
- var lowerFrom = from.toLowerCase();
1940
- var lowerTo = to.toLowerCase();
1941
- var toParts = trimArray(to.split("\\"));
1942
- var lowerFromParts = trimArray(lowerFrom.split("\\"));
1943
- var lowerToParts = trimArray(lowerTo.split("\\"));
1944
- var length = Math.min(lowerFromParts.length, lowerToParts.length);
1945
- var samePartsLength = length;
1946
- for (var i = 0; i < length; i++) {
1947
- if (lowerFromParts[i] !== lowerToParts[i]) {
1948
- samePartsLength = i;
1949
- break;
1950
- }
1951
- }
1952
- if (samePartsLength == 0) {
1953
- return to;
1954
- }
1955
- var outputParts = [];
1956
- for (var i = samePartsLength; i < lowerFromParts.length; i++) {
1957
- outputParts.push("..");
1958
- }
1959
- outputParts = outputParts.concat(toParts.slice(samePartsLength));
1960
- return outputParts.join("\\");
1961
- };
1962
- win32._makeLong = function(path2) {
1963
- if (!util2.isString(path2))
1964
- return path2;
1965
- if (!path2) {
1966
- return "";
1967
- }
1968
- var resolvedPath = win32.resolve(path2);
1969
- if (/^[a-zA-Z]\:\\/.test(resolvedPath)) {
1970
- return "\\\\?\\" + resolvedPath;
1971
- } else if (/^\\\\[^?.]/.test(resolvedPath)) {
1972
- return "\\\\?\\UNC\\" + resolvedPath.substring(2);
1973
- }
1974
- return path2;
1975
- };
1976
- win32.dirname = function(path2) {
1977
- var result = win32SplitPath(path2), root = result[0], dir = result[1];
1978
- if (!root && !dir) {
1979
- return ".";
1980
- }
1981
- if (dir) {
1982
- dir = dir.substr(0, dir.length - 1);
1983
- }
1984
- return root + dir;
1985
- };
1986
- win32.basename = function(path2, ext) {
1987
- var f = win32SplitPath(path2)[2];
1988
- if (ext && f.substr(-1 * ext.length) === ext) {
1989
- f = f.substr(0, f.length - ext.length);
1990
- }
1991
- return f;
1992
- };
1993
- win32.extname = function(path2) {
1994
- return win32SplitPath(path2)[3];
1995
- };
1996
- win32.format = function(pathObject) {
1997
- if (!util2.isObject(pathObject)) {
1998
- throw new TypeError(
1999
- "Parameter 'pathObject' must be an object, not " + typeof pathObject
2000
- );
2001
- }
2002
- var root = pathObject.root || "";
2003
- if (!util2.isString(root)) {
2004
- throw new TypeError(
2005
- "'pathObject.root' must be a string or undefined, not " + typeof pathObject.root
2006
- );
2007
- }
2008
- var dir = pathObject.dir;
2009
- var base = pathObject.base || "";
2010
- if (!dir) {
2011
- return base;
2012
- }
2013
- if (dir[dir.length - 1] === win32.sep) {
2014
- return dir + base;
2015
- }
2016
- return dir + win32.sep + base;
2017
- };
2018
- win32.parse = function(pathString) {
2019
- if (!util2.isString(pathString)) {
2020
- throw new TypeError(
2021
- "Parameter 'pathString' must be a string, not " + typeof pathString
2022
- );
2023
- }
2024
- var allParts = win32SplitPath(pathString);
2025
- if (!allParts || allParts.length !== 4) {
2026
- throw new TypeError("Invalid path '" + pathString + "'");
2027
- }
2028
- return {
2029
- root: allParts[0],
2030
- dir: allParts[0] + allParts[1].slice(0, -1),
2031
- base: allParts[2],
2032
- ext: allParts[3],
2033
- name: allParts[2].slice(0, allParts[2].length - allParts[3].length)
2034
- };
2035
- };
2036
- win32.sep = "\\";
2037
- win32.delimiter = ";";
2038
- var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
2039
- var posix = {};
2040
- function posixSplitPath(filename) {
2041
- return splitPathRe.exec(filename).slice(1);
2042
- }
2043
- posix.resolve = function() {
2044
- var resolvedPath = "", resolvedAbsolute = false;
2045
- for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
2046
- var path2 = i >= 0 ? arguments[i] : process.cwd();
2047
- if (!util2.isString(path2)) {
2048
- throw new TypeError("Arguments to path.resolve must be strings");
2049
- } else if (!path2) {
2050
- continue;
2051
- }
2052
- resolvedPath = path2 + "/" + resolvedPath;
2053
- resolvedAbsolute = path2[0] === "/";
2054
- }
2055
- resolvedPath = normalizeArray(
2056
- resolvedPath.split("/"),
2057
- !resolvedAbsolute
2058
- ).join("/");
2059
- return (resolvedAbsolute ? "/" : "") + resolvedPath || ".";
2060
- };
2061
- posix.normalize = function(path2) {
2062
- var isAbsolute = posix.isAbsolute(path2), trailingSlash = path2 && path2[path2.length - 1] === "/";
2063
- path2 = normalizeArray(path2.split("/"), !isAbsolute).join("/");
2064
- if (!path2 && !isAbsolute) {
2065
- path2 = ".";
2066
- }
2067
- if (path2 && trailingSlash) {
2068
- path2 += "/";
2069
- }
2070
- return (isAbsolute ? "/" : "") + path2;
2071
- };
2072
- posix.isAbsolute = function(path2) {
2073
- return path2.charAt(0) === "/";
2074
- };
2075
- posix.join = function() {
2076
- var path2 = "";
2077
- for (var i = 0; i < arguments.length; i++) {
2078
- var segment = arguments[i];
2079
- if (!util2.isString(segment)) {
2080
- throw new TypeError("Arguments to path.join must be strings");
2081
- }
2082
- if (segment) {
2083
- if (!path2) {
2084
- path2 += segment;
2085
- } else {
2086
- path2 += "/" + segment;
2087
- }
2088
- }
2089
- }
2090
- return posix.normalize(path2);
2091
- };
2092
- posix.relative = function(from, to) {
2093
- from = posix.resolve(from).substr(1);
2094
- to = posix.resolve(to).substr(1);
2095
- var fromParts = trimArray(from.split("/"));
2096
- var toParts = trimArray(to.split("/"));
2097
- var length = Math.min(fromParts.length, toParts.length);
2098
- var samePartsLength = length;
2099
- for (var i = 0; i < length; i++) {
2100
- if (fromParts[i] !== toParts[i]) {
2101
- samePartsLength = i;
2102
- break;
2103
- }
2104
- }
2105
- var outputParts = [];
2106
- for (var i = samePartsLength; i < fromParts.length; i++) {
2107
- outputParts.push("..");
2108
- }
2109
- outputParts = outputParts.concat(toParts.slice(samePartsLength));
2110
- return outputParts.join("/");
2111
- };
2112
- posix._makeLong = function(path2) {
2113
- return path2;
2114
- };
2115
- posix.dirname = function(path2) {
2116
- var result = posixSplitPath(path2), root = result[0], dir = result[1];
2117
- if (!root && !dir) {
2118
- return ".";
2119
- }
2120
- if (dir) {
2121
- dir = dir.substr(0, dir.length - 1);
2122
- }
2123
- return root + dir;
2124
- };
2125
- posix.basename = function(path2, ext) {
2126
- var f = posixSplitPath(path2)[2];
2127
- if (ext && f.substr(-1 * ext.length) === ext) {
2128
- f = f.substr(0, f.length - ext.length);
2129
- }
2130
- return f;
2131
- };
2132
- posix.extname = function(path2) {
2133
- return posixSplitPath(path2)[3];
2134
- };
2135
- posix.format = function(pathObject) {
2136
- if (!util2.isObject(pathObject)) {
2137
- throw new TypeError(
2138
- "Parameter 'pathObject' must be an object, not " + typeof pathObject
2139
- );
2140
- }
2141
- var root = pathObject.root || "";
2142
- if (!util2.isString(root)) {
2143
- throw new TypeError(
2144
- "'pathObject.root' must be a string or undefined, not " + typeof pathObject.root
2145
- );
2146
- }
2147
- var dir = pathObject.dir ? pathObject.dir + posix.sep : "";
2148
- var base = pathObject.base || "";
2149
- return dir + base;
2150
- };
2151
- posix.parse = function(pathString) {
2152
- if (!util2.isString(pathString)) {
2153
- throw new TypeError(
2154
- "Parameter 'pathString' must be a string, not " + typeof pathString
2155
- );
2156
- }
2157
- var allParts = posixSplitPath(pathString);
2158
- if (!allParts || allParts.length !== 4) {
2159
- throw new TypeError("Invalid path '" + pathString + "'");
2160
- }
2161
- allParts[1] = allParts[1] || "";
2162
- allParts[2] = allParts[2] || "";
2163
- allParts[3] = allParts[3] || "";
2164
- return {
2165
- root: allParts[0],
2166
- dir: allParts[0] + allParts[1].slice(0, -1),
2167
- base: allParts[2],
2168
- ext: allParts[3],
2169
- name: allParts[2].slice(0, allParts[2].length - allParts[3].length)
2170
- };
2171
- };
2172
- posix.sep = "/";
2173
- posix.delimiter = ":";
2174
- if (isWindows)
2175
- path.exports = win32;
2176
- else
2177
- path.exports = posix;
2178
- path.exports.posix = posix;
2179
- path.exports.win32 = win32;
2180
- return path.exports;
2181
- }
2182
- var atomicSleep = { exports: {} };
2183
- var hasRequiredAtomicSleep;
2184
- function requireAtomicSleep() {
2185
- if (hasRequiredAtomicSleep) return atomicSleep.exports;
2186
- hasRequiredAtomicSleep = 1;
2187
- if (typeof SharedArrayBuffer !== "undefined" && typeof Atomics !== "undefined") {
2188
- let sleep = function(ms) {
2189
- const valid = ms > 0 && ms < Infinity;
2190
- if (valid === false) {
2191
- if (typeof ms !== "number" && typeof ms !== "bigint") {
2192
- throw TypeError("sleep: ms must be a number");
2193
- }
2194
- throw RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");
2195
- }
2196
- Atomics.wait(nil, 0, 0, Number(ms));
2197
- };
2198
- const nil = new Int32Array(new SharedArrayBuffer(4));
2199
- atomicSleep.exports = sleep;
2200
- } else {
2201
- let sleep = function(ms) {
2202
- const valid = ms > 0 && ms < Infinity;
2203
- if (valid === false) {
2204
- if (typeof ms !== "number" && typeof ms !== "bigint") {
2205
- throw TypeError("sleep: ms must be a number");
2206
- }
2207
- throw RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");
2208
- }
2209
- };
2210
- atomicSleep.exports = sleep;
2211
- }
2212
- return atomicSleep.exports;
2213
- }
2214
- var assert = { exports: {} };
2215
- var errors = {};
2216
- var hasRequiredErrors;
2217
- function requireErrors() {
2218
- if (hasRequiredErrors) return errors;
2219
- hasRequiredErrors = 1;
2220
- function _typeof(o) {
2221
- "@babel/helpers - typeof";
2222
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
2223
- return typeof o2;
2224
- } : function(o2) {
2225
- return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
2226
- }, _typeof(o);
2227
- }
2228
- function _createClass(Constructor, protoProps, staticProps) {
2229
- Object.defineProperty(Constructor, "prototype", { writable: false });
2230
- return Constructor;
2231
- }
2232
- function _classCallCheck(instance, Constructor) {
2233
- if (!(instance instanceof Constructor)) {
2234
- throw new TypeError("Cannot call a class as a function");
2235
- }
2236
- }
2237
- function _inherits(subClass, superClass) {
2238
- if (typeof superClass !== "function" && superClass !== null) {
2239
- throw new TypeError("Super expression must either be null or a function");
2240
- }
2241
- subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
2242
- Object.defineProperty(subClass, "prototype", { writable: false });
2243
- if (superClass) _setPrototypeOf(subClass, superClass);
2244
- }
2245
- function _setPrototypeOf(o, p) {
2246
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
2247
- o2.__proto__ = p2;
2248
- return o2;
2249
- };
2250
- return _setPrototypeOf(o, p);
2251
- }
2252
- function _createSuper(Derived) {
2253
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
2254
- return function _createSuperInternal() {
2255
- var Super = _getPrototypeOf(Derived), result;
2256
- if (hasNativeReflectConstruct) {
2257
- var NewTarget = _getPrototypeOf(this).constructor;
2258
- result = Reflect.construct(Super, arguments, NewTarget);
2259
- } else {
2260
- result = Super.apply(this, arguments);
2261
- }
2262
- return _possibleConstructorReturn(this, result);
2263
- };
2264
- }
2265
- function _possibleConstructorReturn(self, call) {
2266
- if (call && (_typeof(call) === "object" || typeof call === "function")) {
2267
- return call;
2268
- } else if (call !== void 0) {
2269
- throw new TypeError("Derived constructors may only return object or undefined");
2270
- }
2271
- return _assertThisInitialized(self);
2272
- }
2273
- function _assertThisInitialized(self) {
2274
- if (self === void 0) {
2275
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
2276
- }
2277
- return self;
2278
- }
2279
- function _isNativeReflectConstruct() {
2280
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
2281
- if (Reflect.construct.sham) return false;
2282
- if (typeof Proxy === "function") return true;
2283
- try {
2284
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
2285
- }));
2286
- return true;
2287
- } catch (e) {
2288
- return false;
2289
- }
2290
- }
2291
- function _getPrototypeOf(o) {
2292
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o2) {
2293
- return o2.__proto__ || Object.getPrototypeOf(o2);
2294
- };
2295
- return _getPrototypeOf(o);
2296
- }
2297
- var codes = {};
2298
- var assert2;
2299
- var util2;
2300
- function createErrorType(code, message, Base) {
2301
- if (!Base) {
2302
- Base = Error;
2303
- }
2304
- function getMessage(arg1, arg2, arg3) {
2305
- if (typeof message === "string") {
2306
- return message;
2307
- } else {
2308
- return message(arg1, arg2, arg3);
2309
- }
2310
- }
2311
- var NodeError = /* @__PURE__ */ function(_Base) {
2312
- _inherits(NodeError2, _Base);
2313
- var _super = _createSuper(NodeError2);
2314
- function NodeError2(arg1, arg2, arg3) {
2315
- var _this;
2316
- _classCallCheck(this, NodeError2);
2317
- _this = _super.call(this, getMessage(arg1, arg2, arg3));
2318
- _this.code = code;
2319
- return _this;
2320
- }
2321
- return _createClass(NodeError2);
2322
- }(Base);
2323
- codes[code] = NodeError;
2324
- }
2325
- function oneOf(expected, thing) {
2326
- if (Array.isArray(expected)) {
2327
- var len = expected.length;
2328
- expected = expected.map(function(i) {
2329
- return String(i);
2330
- });
2331
- if (len > 2) {
2332
- return "one of ".concat(thing, " ").concat(expected.slice(0, len - 1).join(", "), ", or ") + expected[len - 1];
2333
- } else if (len === 2) {
2334
- return "one of ".concat(thing, " ").concat(expected[0], " or ").concat(expected[1]);
2335
- } else {
2336
- return "of ".concat(thing, " ").concat(expected[0]);
2337
- }
2338
- } else {
2339
- return "of ".concat(thing, " ").concat(String(expected));
2340
- }
2341
- }
2342
- function startsWith(str, search, pos) {
2343
- return str.substr(0, search.length) === search;
2344
- }
2345
- function endsWith(str, search, this_len) {
2346
- if (this_len === void 0 || this_len > str.length) {
2347
- this_len = str.length;
2348
- }
2349
- return str.substring(this_len - search.length, this_len) === search;
2350
- }
2351
- function includes(str, search, start) {
2352
- if (typeof start !== "number") {
2353
- start = 0;
2354
- }
2355
- if (start + search.length > str.length) {
2356
- return false;
2357
- } else {
2358
- return str.indexOf(search, start) !== -1;
2359
- }
2360
- }
2361
- createErrorType("ERR_AMBIGUOUS_ARGUMENT", 'The "%s" argument is ambiguous. %s', TypeError);
2362
- createErrorType("ERR_INVALID_ARG_TYPE", function(name, expected, actual) {
2363
- if (assert2 === void 0) assert2 = requireAssert();
2364
- assert2(typeof name === "string", "'name' must be a string");
2365
- var determiner;
2366
- if (typeof expected === "string" && startsWith(expected, "not ")) {
2367
- determiner = "must not be";
2368
- expected = expected.replace(/^not /, "");
2369
- } else {
2370
- determiner = "must be";
2371
- }
2372
- var msg;
2373
- if (endsWith(name, " argument")) {
2374
- msg = "The ".concat(name, " ").concat(determiner, " ").concat(oneOf(expected, "type"));
2375
- } else {
2376
- var type2 = includes(name, ".") ? "property" : "argument";
2377
- msg = 'The "'.concat(name, '" ').concat(type2, " ").concat(determiner, " ").concat(oneOf(expected, "type"));
2378
- }
2379
- msg += ". Received type ".concat(_typeof(actual));
2380
- return msg;
2381
- }, TypeError);
2382
- createErrorType("ERR_INVALID_ARG_VALUE", function(name, value) {
2383
- var reason = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "is invalid";
2384
- if (util2 === void 0) util2 = requireUtil$1();
2385
- var inspected = util2.inspect(value);
2386
- if (inspected.length > 128) {
2387
- inspected = "".concat(inspected.slice(0, 128), "...");
2388
- }
2389
- return "The argument '".concat(name, "' ").concat(reason, ". Received ").concat(inspected);
2390
- }, TypeError);
2391
- createErrorType("ERR_INVALID_RETURN_VALUE", function(input, name, value) {
2392
- var type2;
2393
- if (value && value.constructor && value.constructor.name) {
2394
- type2 = "instance of ".concat(value.constructor.name);
2395
- } else {
2396
- type2 = "type ".concat(_typeof(value));
2397
- }
2398
- return "Expected ".concat(input, ' to be returned from the "').concat(name, '"') + " function but got ".concat(type2, ".");
2399
- }, TypeError);
2400
- createErrorType("ERR_MISSING_ARGS", function() {
2401
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2402
- args[_key] = arguments[_key];
2403
- }
2404
- if (assert2 === void 0) assert2 = requireAssert();
2405
- assert2(args.length > 0, "At least one arg needs to be specified");
2406
- var msg = "The ";
2407
- var len = args.length;
2408
- args = args.map(function(a) {
2409
- return '"'.concat(a, '"');
2410
- });
2411
- switch (len) {
2412
- case 1:
2413
- msg += "".concat(args[0], " argument");
2414
- break;
2415
- case 2:
2416
- msg += "".concat(args[0], " and ").concat(args[1], " arguments");
2417
- break;
2418
- default:
2419
- msg += args.slice(0, len - 1).join(", ");
2420
- msg += ", and ".concat(args[len - 1], " arguments");
2421
- break;
2422
- }
2423
- return "".concat(msg, " must be specified");
2424
- }, TypeError);
2425
- errors.codes = codes;
2426
- return errors;
2427
- }
2428
- var assertion_error;
2429
- var hasRequiredAssertion_error;
2430
- function requireAssertion_error() {
2431
- if (hasRequiredAssertion_error) return assertion_error;
2432
- hasRequiredAssertion_error = 1;
2433
- function ownKeys(e, r) {
2434
- var t = Object.keys(e);
2435
- if (Object.getOwnPropertySymbols) {
2436
- var o = Object.getOwnPropertySymbols(e);
2437
- r && (o = o.filter(function(r2) {
2438
- return Object.getOwnPropertyDescriptor(e, r2).enumerable;
2439
- })), t.push.apply(t, o);
2440
- }
2441
- return t;
2442
- }
2443
- function _objectSpread(e) {
2444
- for (var r = 1; r < arguments.length; r++) {
2445
- var t = null != arguments[r] ? arguments[r] : {};
2446
- r % 2 ? ownKeys(Object(t), true).forEach(function(r2) {
2447
- _defineProperty(e, r2, t[r2]);
2448
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) {
2449
- Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
2450
- });
2451
- }
2452
- return e;
2453
- }
2454
- function _defineProperty(obj, key, value) {
2455
- key = _toPropertyKey(key);
2456
- if (key in obj) {
2457
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
2458
- } else {
2459
- obj[key] = value;
2460
- }
2461
- return obj;
2462
- }
2463
- function _classCallCheck(instance, Constructor) {
2464
- if (!(instance instanceof Constructor)) {
2465
- throw new TypeError("Cannot call a class as a function");
2466
- }
2467
- }
2468
- function _defineProperties(target, props) {
2469
- for (var i = 0; i < props.length; i++) {
2470
- var descriptor = props[i];
2471
- descriptor.enumerable = descriptor.enumerable || false;
2472
- descriptor.configurable = true;
2473
- if ("value" in descriptor) descriptor.writable = true;
2474
- Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
2475
- }
2476
- }
2477
- function _createClass(Constructor, protoProps, staticProps) {
2478
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
2479
- Object.defineProperty(Constructor, "prototype", { writable: false });
2480
- return Constructor;
2481
- }
2482
- function _toPropertyKey(arg) {
2483
- var key = _toPrimitive(arg, "string");
2484
- return _typeof(key) === "symbol" ? key : String(key);
2485
- }
2486
- function _toPrimitive(input, hint) {
2487
- if (_typeof(input) !== "object" || input === null) return input;
2488
- var prim = input[Symbol.toPrimitive];
2489
- if (prim !== void 0) {
2490
- var res = prim.call(input, hint);
2491
- if (_typeof(res) !== "object") return res;
2492
- throw new TypeError("@@toPrimitive must return a primitive value.");
2493
- }
2494
- return String(input);
2495
- }
2496
- function _inherits(subClass, superClass) {
2497
- if (typeof superClass !== "function" && superClass !== null) {
2498
- throw new TypeError("Super expression must either be null or a function");
2499
- }
2500
- subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
2501
- Object.defineProperty(subClass, "prototype", { writable: false });
2502
- if (superClass) _setPrototypeOf(subClass, superClass);
2503
- }
2504
- function _createSuper(Derived) {
2505
- var hasNativeReflectConstruct = _isNativeReflectConstruct();
2506
- return function _createSuperInternal() {
2507
- var Super = _getPrototypeOf(Derived), result;
2508
- if (hasNativeReflectConstruct) {
2509
- var NewTarget = _getPrototypeOf(this).constructor;
2510
- result = Reflect.construct(Super, arguments, NewTarget);
2511
- } else {
2512
- result = Super.apply(this, arguments);
2513
- }
2514
- return _possibleConstructorReturn(this, result);
2515
- };
2516
- }
2517
- function _possibleConstructorReturn(self, call) {
2518
- if (call && (_typeof(call) === "object" || typeof call === "function")) {
2519
- return call;
2520
- } else if (call !== void 0) {
2521
- throw new TypeError("Derived constructors may only return object or undefined");
2522
- }
2523
- return _assertThisInitialized(self);
2524
- }
2525
- function _assertThisInitialized(self) {
2526
- if (self === void 0) {
2527
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
2528
- }
2529
- return self;
2530
- }
2531
- function _wrapNativeSuper(Class) {
2532
- var _cache = typeof Map === "function" ? /* @__PURE__ */ new Map() : void 0;
2533
- _wrapNativeSuper = function _wrapNativeSuper2(Class2) {
2534
- if (Class2 === null || !_isNativeFunction(Class2)) return Class2;
2535
- if (typeof Class2 !== "function") {
2536
- throw new TypeError("Super expression must either be null or a function");
2537
- }
2538
- if (typeof _cache !== "undefined") {
2539
- if (_cache.has(Class2)) return _cache.get(Class2);
2540
- _cache.set(Class2, Wrapper);
2541
- }
2542
- function Wrapper() {
2543
- return _construct(Class2, arguments, _getPrototypeOf(this).constructor);
2544
- }
2545
- Wrapper.prototype = Object.create(Class2.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } });
2546
- return _setPrototypeOf(Wrapper, Class2);
2547
- };
2548
- return _wrapNativeSuper(Class);
2549
- }
2550
- function _construct(Parent, args, Class) {
2551
- if (_isNativeReflectConstruct()) {
2552
- _construct = Reflect.construct.bind();
2553
- } else {
2554
- _construct = function _construct2(Parent2, args2, Class2) {
2555
- var a = [null];
2556
- a.push.apply(a, args2);
2557
- var Constructor = Function.bind.apply(Parent2, a);
2558
- var instance = new Constructor();
2559
- if (Class2) _setPrototypeOf(instance, Class2.prototype);
2560
- return instance;
2561
- };
2562
- }
2563
- return _construct.apply(null, arguments);
2564
- }
2565
- function _isNativeReflectConstruct() {
2566
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
2567
- if (Reflect.construct.sham) return false;
2568
- if (typeof Proxy === "function") return true;
2569
- try {
2570
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
2571
- }));
2572
- return true;
2573
- } catch (e) {
2574
- return false;
2575
- }
2576
- }
2577
- function _isNativeFunction(fn) {
2578
- return Function.toString.call(fn).indexOf("[native code]") !== -1;
2579
- }
2580
- function _setPrototypeOf(o, p) {
2581
- _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
2582
- o2.__proto__ = p2;
2583
- return o2;
2584
- };
2585
- return _setPrototypeOf(o, p);
2586
- }
2587
- function _getPrototypeOf(o) {
2588
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o2) {
2589
- return o2.__proto__ || Object.getPrototypeOf(o2);
2590
- };
2591
- return _getPrototypeOf(o);
2592
- }
2593
- function _typeof(o) {
2594
- "@babel/helpers - typeof";
2595
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
2596
- return typeof o2;
2597
- } : function(o2) {
2598
- return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
2599
- }, _typeof(o);
2600
- }
2601
- var _require = requireUtil$1(), inspect = _require.inspect;
2602
- var _require2 = requireErrors(), ERR_INVALID_ARG_TYPE = _require2.codes.ERR_INVALID_ARG_TYPE;
2603
- function endsWith(str, search, this_len) {
2604
- if (this_len === void 0 || this_len > str.length) {
2605
- this_len = str.length;
2606
- }
2607
- return str.substring(this_len - search.length, this_len) === search;
2608
- }
2609
- function repeat(str, count) {
2610
- count = Math.floor(count);
2611
- if (str.length == 0 || count == 0) return "";
2612
- var maxCount = str.length * count;
2613
- count = Math.floor(Math.log(count) / Math.log(2));
2614
- while (count) {
2615
- str += str;
2616
- count--;
2617
- }
2618
- str += str.substring(0, maxCount - str.length);
2619
- return str;
2620
- }
2621
- var blue = "";
2622
- var green = "";
2623
- var red = "";
2624
- var white = "";
2625
- var kReadableOperator = {
2626
- deepStrictEqual: "Expected values to be strictly deep-equal:",
2627
- strictEqual: "Expected values to be strictly equal:",
2628
- strictEqualObject: 'Expected "actual" to be reference-equal to "expected":',
2629
- deepEqual: "Expected values to be loosely deep-equal:",
2630
- equal: "Expected values to be loosely equal:",
2631
- notDeepStrictEqual: 'Expected "actual" not to be strictly deep-equal to:',
2632
- notStrictEqual: 'Expected "actual" to be strictly unequal to:',
2633
- notStrictEqualObject: 'Expected "actual" not to be reference-equal to "expected":',
2634
- notDeepEqual: 'Expected "actual" not to be loosely deep-equal to:',
2635
- notEqual: 'Expected "actual" to be loosely unequal to:',
2636
- notIdentical: "Values identical but not reference-equal:"
2637
- };
2638
- var kMaxShortLength = 10;
2639
- function copyError(source) {
2640
- var keys = Object.keys(source);
2641
- var target = Object.create(Object.getPrototypeOf(source));
2642
- keys.forEach(function(key) {
2643
- target[key] = source[key];
2644
- });
2645
- Object.defineProperty(target, "message", {
2646
- value: source.message
2647
- });
2648
- return target;
2649
- }
2650
- function inspectValue(val) {
2651
- return inspect(val, {
2652
- compact: false,
2653
- customInspect: false,
2654
- depth: 1e3,
2655
- maxArrayLength: Infinity,
2656
- // Assert compares only enumerable properties (with a few exceptions).
2657
- showHidden: false,
2658
- // Having a long line as error is better than wrapping the line for
2659
- // comparison for now.
2660
- // TODO(BridgeAR): `breakLength` should be limited as soon as soon as we
2661
- // have meta information about the inspected properties (i.e., know where
2662
- // in what line the property starts and ends).
2663
- breakLength: Infinity,
2664
- // Assert does not detect proxies currently.
2665
- showProxy: false,
2666
- sorted: true,
2667
- // Inspect getters as we also check them when comparing entries.
2668
- getters: true
2669
- });
2670
- }
2671
- function createErrDiff(actual, expected, operator) {
2672
- var other = "";
2673
- var res = "";
2674
- var lastPos = 0;
2675
- var end = "";
2676
- var skipped = false;
2677
- var actualInspected = inspectValue(actual);
2678
- var actualLines = actualInspected.split("\n");
2679
- var expectedLines = inspectValue(expected).split("\n");
2680
- var i = 0;
2681
- var indicator = "";
2682
- if (operator === "strictEqual" && _typeof(actual) === "object" && _typeof(expected) === "object" && actual !== null && expected !== null) {
2683
- operator = "strictEqualObject";
2684
- }
2685
- if (actualLines.length === 1 && expectedLines.length === 1 && actualLines[0] !== expectedLines[0]) {
2686
- var inputLength = actualLines[0].length + expectedLines[0].length;
2687
- if (inputLength <= kMaxShortLength) {
2688
- if ((_typeof(actual) !== "object" || actual === null) && (_typeof(expected) !== "object" || expected === null) && (actual !== 0 || expected !== 0)) {
2689
- return "".concat(kReadableOperator[operator], "\n\n") + "".concat(actualLines[0], " !== ").concat(expectedLines[0], "\n");
2690
- }
2691
- } else if (operator !== "strictEqualObject") {
2692
- var maxLength = process.stderr && process.stderr.isTTY ? process.stderr.columns : 80;
2693
- if (inputLength < maxLength) {
2694
- while (actualLines[0][i] === expectedLines[0][i]) {
2695
- i++;
2696
- }
2697
- if (i > 2) {
2698
- indicator = "\n ".concat(repeat(" ", i), "^");
2699
- i = 0;
2700
- }
2701
- }
2702
- }
2703
- }
2704
- var a = actualLines[actualLines.length - 1];
2705
- var b = expectedLines[expectedLines.length - 1];
2706
- while (a === b) {
2707
- if (i++ < 2) {
2708
- end = "\n ".concat(a).concat(end);
2709
- } else {
2710
- other = a;
2711
- }
2712
- actualLines.pop();
2713
- expectedLines.pop();
2714
- if (actualLines.length === 0 || expectedLines.length === 0) break;
2715
- a = actualLines[actualLines.length - 1];
2716
- b = expectedLines[expectedLines.length - 1];
2717
- }
2718
- var maxLines = Math.max(actualLines.length, expectedLines.length);
2719
- if (maxLines === 0) {
2720
- var _actualLines = actualInspected.split("\n");
2721
- if (_actualLines.length > 30) {
2722
- _actualLines[26] = "".concat(blue, "...").concat(white);
2723
- while (_actualLines.length > 27) {
2724
- _actualLines.pop();
2725
- }
2726
- }
2727
- return "".concat(kReadableOperator.notIdentical, "\n\n").concat(_actualLines.join("\n"), "\n");
2728
- }
2729
- if (i > 3) {
2730
- end = "\n".concat(blue, "...").concat(white).concat(end);
2731
- skipped = true;
2732
- }
2733
- if (other !== "") {
2734
- end = "\n ".concat(other).concat(end);
2735
- other = "";
2736
- }
2737
- var printedLines = 0;
2738
- var msg = kReadableOperator[operator] + "\n".concat(green, "+ actual").concat(white, " ").concat(red, "- expected").concat(white);
2739
- var skippedMsg = " ".concat(blue, "...").concat(white, " Lines skipped");
2740
- for (i = 0; i < maxLines; i++) {
2741
- var cur = i - lastPos;
2742
- if (actualLines.length < i + 1) {
2743
- if (cur > 1 && i > 2) {
2744
- if (cur > 4) {
2745
- res += "\n".concat(blue, "...").concat(white);
2746
- skipped = true;
2747
- } else if (cur > 3) {
2748
- res += "\n ".concat(expectedLines[i - 2]);
2749
- printedLines++;
2750
- }
2751
- res += "\n ".concat(expectedLines[i - 1]);
2752
- printedLines++;
2753
- }
2754
- lastPos = i;
2755
- other += "\n".concat(red, "-").concat(white, " ").concat(expectedLines[i]);
2756
- printedLines++;
2757
- } else if (expectedLines.length < i + 1) {
2758
- if (cur > 1 && i > 2) {
2759
- if (cur > 4) {
2760
- res += "\n".concat(blue, "...").concat(white);
2761
- skipped = true;
2762
- } else if (cur > 3) {
2763
- res += "\n ".concat(actualLines[i - 2]);
2764
- printedLines++;
2765
- }
2766
- res += "\n ".concat(actualLines[i - 1]);
2767
- printedLines++;
2768
- }
2769
- lastPos = i;
2770
- res += "\n".concat(green, "+").concat(white, " ").concat(actualLines[i]);
2771
- printedLines++;
2772
- } else {
2773
- var expectedLine = expectedLines[i];
2774
- var actualLine = actualLines[i];
2775
- var divergingLines = actualLine !== expectedLine && (!endsWith(actualLine, ",") || actualLine.slice(0, -1) !== expectedLine);
2776
- if (divergingLines && endsWith(expectedLine, ",") && expectedLine.slice(0, -1) === actualLine) {
2777
- divergingLines = false;
2778
- actualLine += ",";
2779
- }
2780
- if (divergingLines) {
2781
- if (cur > 1 && i > 2) {
2782
- if (cur > 4) {
2783
- res += "\n".concat(blue, "...").concat(white);
2784
- skipped = true;
2785
- } else if (cur > 3) {
2786
- res += "\n ".concat(actualLines[i - 2]);
2787
- printedLines++;
2788
- }
2789
- res += "\n ".concat(actualLines[i - 1]);
2790
- printedLines++;
2791
- }
2792
- lastPos = i;
2793
- res += "\n".concat(green, "+").concat(white, " ").concat(actualLine);
2794
- other += "\n".concat(red, "-").concat(white, " ").concat(expectedLine);
2795
- printedLines += 2;
2796
- } else {
2797
- res += other;
2798
- other = "";
2799
- if (cur === 1 || i === 0) {
2800
- res += "\n ".concat(actualLine);
2801
- printedLines++;
2802
- }
2803
- }
2804
- }
2805
- if (printedLines > 20 && i < maxLines - 2) {
2806
- return "".concat(msg).concat(skippedMsg, "\n").concat(res, "\n").concat(blue, "...").concat(white).concat(other, "\n") + "".concat(blue, "...").concat(white);
2807
- }
2808
- }
2809
- return "".concat(msg).concat(skipped ? skippedMsg : "", "\n").concat(res).concat(other).concat(end).concat(indicator);
2810
- }
2811
- var AssertionError = /* @__PURE__ */ function(_Error, _inspect$custom) {
2812
- _inherits(AssertionError2, _Error);
2813
- var _super = _createSuper(AssertionError2);
2814
- function AssertionError2(options) {
2815
- var _this;
2816
- _classCallCheck(this, AssertionError2);
2817
- if (_typeof(options) !== "object" || options === null) {
2818
- throw new ERR_INVALID_ARG_TYPE("options", "Object", options);
2819
- }
2820
- var message = options.message, operator = options.operator, stackStartFn = options.stackStartFn;
2821
- var actual = options.actual, expected = options.expected;
2822
- var limit = Error.stackTraceLimit;
2823
- Error.stackTraceLimit = 0;
2824
- if (message != null) {
2825
- _this = _super.call(this, String(message));
2826
- } else {
2827
- if (process.stderr && process.stderr.isTTY) {
2828
- if (process.stderr && process.stderr.getColorDepth && process.stderr.getColorDepth() !== 1) {
2829
- blue = "\x1B[34m";
2830
- green = "\x1B[32m";
2831
- white = "\x1B[39m";
2832
- red = "\x1B[31m";
2833
- } else {
2834
- blue = "";
2835
- green = "";
2836
- white = "";
2837
- red = "";
2838
- }
2839
- }
2840
- if (_typeof(actual) === "object" && actual !== null && _typeof(expected) === "object" && expected !== null && "stack" in actual && actual instanceof Error && "stack" in expected && expected instanceof Error) {
2841
- actual = copyError(actual);
2842
- expected = copyError(expected);
2843
- }
2844
- if (operator === "deepStrictEqual" || operator === "strictEqual") {
2845
- _this = _super.call(this, createErrDiff(actual, expected, operator));
2846
- } else if (operator === "notDeepStrictEqual" || operator === "notStrictEqual") {
2847
- var base = kReadableOperator[operator];
2848
- var res = inspectValue(actual).split("\n");
2849
- if (operator === "notStrictEqual" && _typeof(actual) === "object" && actual !== null) {
2850
- base = kReadableOperator.notStrictEqualObject;
2851
- }
2852
- if (res.length > 30) {
2853
- res[26] = "".concat(blue, "...").concat(white);
2854
- while (res.length > 27) {
2855
- res.pop();
2856
- }
2857
- }
2858
- if (res.length === 1) {
2859
- _this = _super.call(this, "".concat(base, " ").concat(res[0]));
2860
- } else {
2861
- _this = _super.call(this, "".concat(base, "\n\n").concat(res.join("\n"), "\n"));
2862
- }
2863
- } else {
2864
- var _res = inspectValue(actual);
2865
- var other = "";
2866
- var knownOperators = kReadableOperator[operator];
2867
- if (operator === "notDeepEqual" || operator === "notEqual") {
2868
- _res = "".concat(kReadableOperator[operator], "\n\n").concat(_res);
2869
- if (_res.length > 1024) {
2870
- _res = "".concat(_res.slice(0, 1021), "...");
2871
- }
2872
- } else {
2873
- other = "".concat(inspectValue(expected));
2874
- if (_res.length > 512) {
2875
- _res = "".concat(_res.slice(0, 509), "...");
2876
- }
2877
- if (other.length > 512) {
2878
- other = "".concat(other.slice(0, 509), "...");
2879
- }
2880
- if (operator === "deepEqual" || operator === "equal") {
2881
- _res = "".concat(knownOperators, "\n\n").concat(_res, "\n\nshould equal\n\n");
2882
- } else {
2883
- other = " ".concat(operator, " ").concat(other);
2884
- }
2885
- }
2886
- _this = _super.call(this, "".concat(_res).concat(other));
2887
- }
2888
- }
2889
- Error.stackTraceLimit = limit;
2890
- _this.generatedMessage = !message;
2891
- Object.defineProperty(_assertThisInitialized(_this), "name", {
2892
- value: "AssertionError [ERR_ASSERTION]",
2893
- enumerable: false,
2894
- writable: true,
2895
- configurable: true
2896
- });
2897
- _this.code = "ERR_ASSERTION";
2898
- _this.actual = actual;
2899
- _this.expected = expected;
2900
- _this.operator = operator;
2901
- if (Error.captureStackTrace) {
2902
- Error.captureStackTrace(_assertThisInitialized(_this), stackStartFn);
2903
- }
2904
- _this.stack;
2905
- _this.name = "AssertionError";
2906
- return _possibleConstructorReturn(_this);
2907
- }
2908
- _createClass(AssertionError2, [{
2909
- key: "toString",
2910
- value: function toString() {
2911
- return "".concat(this.name, " [").concat(this.code, "]: ").concat(this.message);
2912
- }
2913
- }, {
2914
- key: _inspect$custom,
2915
- value: function value(recurseTimes, ctx) {
2916
- return inspect(this, _objectSpread(_objectSpread({}, ctx), {}, {
2917
- customInspect: false,
2918
- depth: 0
2919
- }));
2920
- }
2921
- }]);
2922
- return AssertionError2;
2923
- }(/* @__PURE__ */ _wrapNativeSuper(Error), inspect.custom);
2924
- assertion_error = AssertionError;
2925
- return assertion_error;
2926
- }
2927
- var isArguments;
2928
- var hasRequiredIsArguments;
2929
- function requireIsArguments() {
2930
- if (hasRequiredIsArguments) return isArguments;
2931
- hasRequiredIsArguments = 1;
2932
- var toStr = Object.prototype.toString;
2933
- isArguments = function isArguments2(value) {
2934
- var str = toStr.call(value);
2935
- var isArgs = str === "[object Arguments]";
2936
- if (!isArgs) {
2937
- isArgs = str !== "[object Array]" && value !== null && typeof value === "object" && typeof value.length === "number" && value.length >= 0 && toStr.call(value.callee) === "[object Function]";
2938
- }
2939
- return isArgs;
2940
- };
2941
- return isArguments;
2942
- }
2943
- var implementation$4;
2944
- var hasRequiredImplementation$4;
2945
- function requireImplementation$4() {
2946
- if (hasRequiredImplementation$4) return implementation$4;
2947
- hasRequiredImplementation$4 = 1;
2948
- var keysShim;
2949
- if (!Object.keys) {
2950
- var has = Object.prototype.hasOwnProperty;
2951
- var toStr = Object.prototype.toString;
2952
- var isArgs = requireIsArguments();
2953
- var isEnumerable = Object.prototype.propertyIsEnumerable;
2954
- var hasDontEnumBug = !isEnumerable.call({ toString: null }, "toString");
2955
- var hasProtoEnumBug = isEnumerable.call(function() {
2956
- }, "prototype");
2957
- var dontEnums = [
2958
- "toString",
2959
- "toLocaleString",
2960
- "valueOf",
2961
- "hasOwnProperty",
2962
- "isPrototypeOf",
2963
- "propertyIsEnumerable",
2964
- "constructor"
2965
- ];
2966
- var equalsConstructorPrototype = function(o) {
2967
- var ctor = o.constructor;
2968
- return ctor && ctor.prototype === o;
2969
- };
2970
- var excludedKeys = {
2971
- $applicationCache: true,
2972
- $console: true,
2973
- $external: true,
2974
- $frame: true,
2975
- $frameElement: true,
2976
- $frames: true,
2977
- $innerHeight: true,
2978
- $innerWidth: true,
2979
- $onmozfullscreenchange: true,
2980
- $onmozfullscreenerror: true,
2981
- $outerHeight: true,
2982
- $outerWidth: true,
2983
- $pageXOffset: true,
2984
- $pageYOffset: true,
2985
- $parent: true,
2986
- $scrollLeft: true,
2987
- $scrollTop: true,
2988
- $scrollX: true,
2989
- $scrollY: true,
2990
- $self: true,
2991
- $webkitIndexedDB: true,
2992
- $webkitStorageInfo: true,
2993
- $window: true
2994
- };
2995
- var hasAutomationEqualityBug = function() {
2996
- if (typeof window === "undefined") {
2997
- return false;
2998
- }
2999
- for (var k in window) {
3000
- try {
3001
- if (!excludedKeys["$" + k] && has.call(window, k) && window[k] !== null && typeof window[k] === "object") {
3002
- try {
3003
- equalsConstructorPrototype(window[k]);
3004
- } catch (e) {
3005
- return true;
3006
- }
3007
- }
3008
- } catch (e) {
3009
- return true;
3010
- }
3011
- }
3012
- return false;
3013
- }();
3014
- var equalsConstructorPrototypeIfNotBuggy = function(o) {
3015
- if (typeof window === "undefined" || !hasAutomationEqualityBug) {
3016
- return equalsConstructorPrototype(o);
3017
- }
3018
- try {
3019
- return equalsConstructorPrototype(o);
3020
- } catch (e) {
3021
- return false;
3022
- }
3023
- };
3024
- keysShim = function keys(object) {
3025
- var isObject = object !== null && typeof object === "object";
3026
- var isFunction = toStr.call(object) === "[object Function]";
3027
- var isArguments2 = isArgs(object);
3028
- var isString = isObject && toStr.call(object) === "[object String]";
3029
- var theKeys = [];
3030
- if (!isObject && !isFunction && !isArguments2) {
3031
- throw new TypeError("Object.keys called on a non-object");
3032
- }
3033
- var skipProto = hasProtoEnumBug && isFunction;
3034
- if (isString && object.length > 0 && !has.call(object, 0)) {
3035
- for (var i = 0; i < object.length; ++i) {
3036
- theKeys.push(String(i));
3037
- }
3038
- }
3039
- if (isArguments2 && object.length > 0) {
3040
- for (var j = 0; j < object.length; ++j) {
3041
- theKeys.push(String(j));
3042
- }
3043
- } else {
3044
- for (var name in object) {
3045
- if (!(skipProto && name === "prototype") && has.call(object, name)) {
3046
- theKeys.push(String(name));
3047
- }
3048
- }
3049
- }
3050
- if (hasDontEnumBug) {
3051
- var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
3052
- for (var k = 0; k < dontEnums.length; ++k) {
3053
- if (!(skipConstructor && dontEnums[k] === "constructor") && has.call(object, dontEnums[k])) {
3054
- theKeys.push(dontEnums[k]);
3055
- }
3056
- }
3057
- }
3058
- return theKeys;
3059
- };
3060
- }
3061
- implementation$4 = keysShim;
3062
- return implementation$4;
3063
- }
3064
- var objectKeys;
3065
- var hasRequiredObjectKeys;
3066
- function requireObjectKeys() {
3067
- if (hasRequiredObjectKeys) return objectKeys;
3068
- hasRequiredObjectKeys = 1;
3069
- var slice = Array.prototype.slice;
3070
- var isArgs = requireIsArguments();
3071
- var origKeys = Object.keys;
3072
- var keysShim = origKeys ? function keys(o) {
3073
- return origKeys(o);
3074
- } : requireImplementation$4();
3075
- var originalKeys = Object.keys;
3076
- keysShim.shim = function shimObjectKeys() {
3077
- if (Object.keys) {
3078
- var keysWorksWithArguments = function() {
3079
- var args = Object.keys(arguments);
3080
- return args && args.length === arguments.length;
3081
- }(1, 2);
3082
- if (!keysWorksWithArguments) {
3083
- Object.keys = function keys(object) {
3084
- if (isArgs(object)) {
3085
- return originalKeys(slice.call(object));
3086
- }
3087
- return originalKeys(object);
3088
- };
3089
- }
3090
- } else {
3091
- Object.keys = keysShim;
3092
- }
3093
- return Object.keys || keysShim;
3094
- };
3095
- objectKeys = keysShim;
3096
- return objectKeys;
3097
- }
3098
- var shams;
3099
- var hasRequiredShams;
3100
- function requireShams() {
3101
- if (hasRequiredShams) return shams;
3102
- hasRequiredShams = 1;
3103
- shams = function hasSymbols2() {
3104
- if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
3105
- return false;
3106
- }
3107
- if (typeof Symbol.iterator === "symbol") {
3108
- return true;
3109
- }
3110
- var obj = {};
3111
- var sym = Symbol("test");
3112
- var symObj = Object(sym);
3113
- if (typeof sym === "string") {
3114
- return false;
3115
- }
3116
- if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
3117
- return false;
3118
- }
3119
- if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
3120
- return false;
3121
- }
3122
- var symVal = 42;
3123
- obj[sym] = symVal;
3124
- for (var _ in obj) {
3125
- return false;
3126
- }
3127
- if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
3128
- return false;
3129
- }
3130
- if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
3131
- return false;
3132
- }
3133
- var syms = Object.getOwnPropertySymbols(obj);
3134
- if (syms.length !== 1 || syms[0] !== sym) {
3135
- return false;
3136
- }
3137
- if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
3138
- return false;
3139
- }
3140
- if (typeof Object.getOwnPropertyDescriptor === "function") {
3141
- var descriptor = (
3142
- /** @type {PropertyDescriptor} */
3143
- Object.getOwnPropertyDescriptor(obj, sym)
3144
- );
3145
- if (descriptor.value !== symVal || descriptor.enumerable !== true) {
3146
- return false;
3147
- }
3148
- }
3149
- return true;
3150
- };
3151
- return shams;
3152
- }
3153
- var esObjectAtoms;
3154
- var hasRequiredEsObjectAtoms;
3155
- function requireEsObjectAtoms() {
3156
- if (hasRequiredEsObjectAtoms) return esObjectAtoms;
3157
- hasRequiredEsObjectAtoms = 1;
3158
- esObjectAtoms = Object;
3159
- return esObjectAtoms;
3160
- }
3161
- var esErrors;
3162
- var hasRequiredEsErrors;
3163
- function requireEsErrors() {
3164
- if (hasRequiredEsErrors) return esErrors;
3165
- hasRequiredEsErrors = 1;
3166
- esErrors = Error;
3167
- return esErrors;
3168
- }
3169
- var _eval;
3170
- var hasRequired_eval;
3171
- function require_eval() {
3172
- if (hasRequired_eval) return _eval;
3173
- hasRequired_eval = 1;
3174
- _eval = EvalError;
3175
- return _eval;
3176
- }
3177
- var range;
3178
- var hasRequiredRange;
3179
- function requireRange() {
3180
- if (hasRequiredRange) return range;
3181
- hasRequiredRange = 1;
3182
- range = RangeError;
3183
- return range;
3184
- }
3185
- var ref;
3186
- var hasRequiredRef;
3187
- function requireRef() {
3188
- if (hasRequiredRef) return ref;
3189
- hasRequiredRef = 1;
3190
- ref = ReferenceError;
3191
- return ref;
3192
- }
3193
- var syntax;
3194
- var hasRequiredSyntax;
3195
- function requireSyntax() {
3196
- if (hasRequiredSyntax) return syntax;
3197
- hasRequiredSyntax = 1;
3198
- syntax = SyntaxError;
3199
- return syntax;
3200
- }
3201
- var type;
3202
- var hasRequiredType;
3203
- function requireType() {
3204
- if (hasRequiredType) return type;
3205
- hasRequiredType = 1;
3206
- type = TypeError;
3207
- return type;
3208
- }
3209
- var uri;
3210
- var hasRequiredUri;
3211
- function requireUri() {
3212
- if (hasRequiredUri) return uri;
3213
- hasRequiredUri = 1;
3214
- uri = URIError;
3215
- return uri;
3216
- }
3217
- var abs;
3218
- var hasRequiredAbs;
3219
- function requireAbs() {
3220
- if (hasRequiredAbs) return abs;
3221
- hasRequiredAbs = 1;
3222
- abs = Math.abs;
3223
- return abs;
3224
- }
3225
- var floor;
3226
- var hasRequiredFloor;
3227
- function requireFloor() {
3228
- if (hasRequiredFloor) return floor;
3229
- hasRequiredFloor = 1;
3230
- floor = Math.floor;
3231
- return floor;
3232
- }
3233
- var max;
3234
- var hasRequiredMax;
3235
- function requireMax() {
3236
- if (hasRequiredMax) return max;
3237
- hasRequiredMax = 1;
3238
- max = Math.max;
3239
- return max;
3240
- }
3241
- var min;
3242
- var hasRequiredMin;
3243
- function requireMin() {
3244
- if (hasRequiredMin) return min;
3245
- hasRequiredMin = 1;
3246
- min = Math.min;
3247
- return min;
3248
- }
3249
- var pow;
3250
- var hasRequiredPow;
3251
- function requirePow() {
3252
- if (hasRequiredPow) return pow;
3253
- hasRequiredPow = 1;
3254
- pow = Math.pow;
3255
- return pow;
3256
- }
3257
- var round;
3258
- var hasRequiredRound;
3259
- function requireRound() {
3260
- if (hasRequiredRound) return round;
3261
- hasRequiredRound = 1;
3262
- round = Math.round;
3263
- return round;
3264
- }
3265
- var _isNaN;
3266
- var hasRequired_isNaN;
3267
- function require_isNaN() {
3268
- if (hasRequired_isNaN) return _isNaN;
3269
- hasRequired_isNaN = 1;
3270
- _isNaN = Number.isNaN || function isNaN2(a) {
3271
- return a !== a;
3272
- };
3273
- return _isNaN;
3274
- }
3275
- var sign;
3276
- var hasRequiredSign;
3277
- function requireSign() {
3278
- if (hasRequiredSign) return sign;
3279
- hasRequiredSign = 1;
3280
- var $isNaN = /* @__PURE__ */ require_isNaN();
3281
- sign = function sign2(number) {
3282
- if ($isNaN(number) || number === 0) {
3283
- return number;
3284
- }
3285
- return number < 0 ? -1 : 1;
3286
- };
3287
- return sign;
3288
- }
3289
- var gOPD;
3290
- var hasRequiredGOPD;
3291
- function requireGOPD() {
3292
- if (hasRequiredGOPD) return gOPD;
3293
- hasRequiredGOPD = 1;
3294
- gOPD = Object.getOwnPropertyDescriptor;
3295
- return gOPD;
3296
- }
3297
- var gopd;
3298
- var hasRequiredGopd;
3299
- function requireGopd() {
3300
- if (hasRequiredGopd) return gopd;
3301
- hasRequiredGopd = 1;
3302
- var $gOPD = /* @__PURE__ */ requireGOPD();
3303
- if ($gOPD) {
3304
- try {
3305
- $gOPD([], "length");
3306
- } catch (e) {
3307
- $gOPD = null;
3308
- }
3309
- }
3310
- gopd = $gOPD;
3311
- return gopd;
3312
- }
3313
- var esDefineProperty;
3314
- var hasRequiredEsDefineProperty;
3315
- function requireEsDefineProperty() {
3316
- if (hasRequiredEsDefineProperty) return esDefineProperty;
3317
- hasRequiredEsDefineProperty = 1;
3318
- var $defineProperty = Object.defineProperty || false;
3319
- if ($defineProperty) {
3320
- try {
3321
- $defineProperty({}, "a", { value: 1 });
3322
- } catch (e) {
3323
- $defineProperty = false;
3324
- }
3325
- }
3326
- esDefineProperty = $defineProperty;
3327
- return esDefineProperty;
3328
- }
3329
- var hasSymbols;
3330
- var hasRequiredHasSymbols;
3331
- function requireHasSymbols() {
3332
- if (hasRequiredHasSymbols) return hasSymbols;
3333
- hasRequiredHasSymbols = 1;
3334
- var origSymbol = typeof Symbol !== "undefined" && Symbol;
3335
- var hasSymbolSham = requireShams();
3336
- hasSymbols = function hasNativeSymbols() {
3337
- if (typeof origSymbol !== "function") {
3338
- return false;
3339
- }
3340
- if (typeof Symbol !== "function") {
3341
- return false;
3342
- }
3343
- if (typeof origSymbol("foo") !== "symbol") {
3344
- return false;
3345
- }
3346
- if (typeof Symbol("bar") !== "symbol") {
3347
- return false;
3348
- }
3349
- return hasSymbolSham();
3350
- };
3351
- return hasSymbols;
3352
- }
3353
- var Reflect_getPrototypeOf;
3354
- var hasRequiredReflect_getPrototypeOf;
3355
- function requireReflect_getPrototypeOf() {
3356
- if (hasRequiredReflect_getPrototypeOf) return Reflect_getPrototypeOf;
3357
- hasRequiredReflect_getPrototypeOf = 1;
3358
- Reflect_getPrototypeOf = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null;
3359
- return Reflect_getPrototypeOf;
3360
- }
3361
- var Object_getPrototypeOf;
3362
- var hasRequiredObject_getPrototypeOf;
3363
- function requireObject_getPrototypeOf() {
3364
- if (hasRequiredObject_getPrototypeOf) return Object_getPrototypeOf;
3365
- hasRequiredObject_getPrototypeOf = 1;
3366
- var $Object = /* @__PURE__ */ requireEsObjectAtoms();
3367
- Object_getPrototypeOf = $Object.getPrototypeOf || null;
3368
- return Object_getPrototypeOf;
3369
- }
3370
- var implementation$3;
3371
- var hasRequiredImplementation$3;
3372
- function requireImplementation$3() {
3373
- if (hasRequiredImplementation$3) return implementation$3;
3374
- hasRequiredImplementation$3 = 1;
3375
- var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
3376
- var toStr = Object.prototype.toString;
3377
- var max2 = Math.max;
3378
- var funcType = "[object Function]";
3379
- var concatty = function concatty2(a, b) {
3380
- var arr = [];
3381
- for (var i = 0; i < a.length; i += 1) {
3382
- arr[i] = a[i];
3383
- }
3384
- for (var j = 0; j < b.length; j += 1) {
3385
- arr[j + a.length] = b[j];
3386
- }
3387
- return arr;
3388
- };
3389
- var slicy = function slicy2(arrLike, offset) {
3390
- var arr = [];
3391
- for (var i = offset, j = 0; i < arrLike.length; i += 1, j += 1) {
3392
- arr[j] = arrLike[i];
3393
- }
3394
- return arr;
3395
- };
3396
- var joiny = function(arr, joiner) {
3397
- var str = "";
3398
- for (var i = 0; i < arr.length; i += 1) {
3399
- str += arr[i];
3400
- if (i + 1 < arr.length) {
3401
- str += joiner;
3402
- }
3403
- }
3404
- return str;
3405
- };
3406
- implementation$3 = function bind(that) {
3407
- var target = this;
3408
- if (typeof target !== "function" || toStr.apply(target) !== funcType) {
3409
- throw new TypeError(ERROR_MESSAGE + target);
3410
- }
3411
- var args = slicy(arguments, 1);
3412
- var bound;
3413
- var binder = function() {
3414
- if (this instanceof bound) {
3415
- var result = target.apply(
3416
- this,
3417
- concatty(args, arguments)
3418
- );
3419
- if (Object(result) === result) {
3420
- return result;
3421
- }
3422
- return this;
3423
- }
3424
- return target.apply(
3425
- that,
3426
- concatty(args, arguments)
3427
- );
3428
- };
3429
- var boundLength = max2(0, target.length - args.length);
3430
- var boundArgs = [];
3431
- for (var i = 0; i < boundLength; i++) {
3432
- boundArgs[i] = "$" + i;
3433
- }
3434
- bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
3435
- if (target.prototype) {
3436
- var Empty = function Empty2() {
3437
- };
3438
- Empty.prototype = target.prototype;
3439
- bound.prototype = new Empty();
3440
- Empty.prototype = null;
3441
- }
3442
- return bound;
3443
- };
3444
- return implementation$3;
3445
- }
3446
- var functionBind;
3447
- var hasRequiredFunctionBind;
3448
- function requireFunctionBind() {
3449
- if (hasRequiredFunctionBind) return functionBind;
3450
- hasRequiredFunctionBind = 1;
3451
- var implementation2 = requireImplementation$3();
3452
- functionBind = Function.prototype.bind || implementation2;
3453
- return functionBind;
3454
- }
3455
- var functionCall;
3456
- var hasRequiredFunctionCall;
3457
- function requireFunctionCall() {
3458
- if (hasRequiredFunctionCall) return functionCall;
3459
- hasRequiredFunctionCall = 1;
3460
- functionCall = Function.prototype.call;
3461
- return functionCall;
3462
- }
3463
- var functionApply;
3464
- var hasRequiredFunctionApply;
3465
- function requireFunctionApply() {
3466
- if (hasRequiredFunctionApply) return functionApply;
3467
- hasRequiredFunctionApply = 1;
3468
- functionApply = Function.prototype.apply;
3469
- return functionApply;
3470
- }
3471
- var reflectApply;
3472
- var hasRequiredReflectApply;
3473
- function requireReflectApply() {
3474
- if (hasRequiredReflectApply) return reflectApply;
3475
- hasRequiredReflectApply = 1;
3476
- reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
3477
- return reflectApply;
3478
- }
3479
- var actualApply;
3480
- var hasRequiredActualApply;
3481
- function requireActualApply() {
3482
- if (hasRequiredActualApply) return actualApply;
3483
- hasRequiredActualApply = 1;
3484
- var bind = requireFunctionBind();
3485
- var $apply = requireFunctionApply();
3486
- var $call = requireFunctionCall();
3487
- var $reflectApply = requireReflectApply();
3488
- actualApply = $reflectApply || bind.call($call, $apply);
3489
- return actualApply;
3490
- }
3491
- var callBindApplyHelpers;
3492
- var hasRequiredCallBindApplyHelpers;
3493
- function requireCallBindApplyHelpers() {
3494
- if (hasRequiredCallBindApplyHelpers) return callBindApplyHelpers;
3495
- hasRequiredCallBindApplyHelpers = 1;
3496
- var bind = requireFunctionBind();
3497
- var $TypeError = /* @__PURE__ */ requireType();
3498
- var $call = requireFunctionCall();
3499
- var $actualApply = requireActualApply();
3500
- callBindApplyHelpers = function callBindBasic(args) {
3501
- if (args.length < 1 || typeof args[0] !== "function") {
3502
- throw new $TypeError("a function is required");
3503
- }
3504
- return $actualApply(bind, $call, args);
3505
- };
3506
- return callBindApplyHelpers;
3507
- }
3508
- var get;
3509
- var hasRequiredGet;
3510
- function requireGet() {
3511
- if (hasRequiredGet) return get;
3512
- hasRequiredGet = 1;
3513
- var callBind2 = requireCallBindApplyHelpers();
3514
- var gOPD2 = /* @__PURE__ */ requireGopd();
3515
- var hasProtoAccessor;
3516
- try {
3517
- hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */
3518
- [].__proto__ === Array.prototype;
3519
- } catch (e) {
3520
- if (!e || typeof e !== "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") {
3521
- throw e;
3522
- }
3523
- }
3524
- var desc = !!hasProtoAccessor && gOPD2 && gOPD2(
3525
- Object.prototype,
3526
- /** @type {keyof typeof Object.prototype} */
3527
- "__proto__"
3528
- );
3529
- var $Object = Object;
3530
- var $getPrototypeOf = $Object.getPrototypeOf;
3531
- get = desc && typeof desc.get === "function" ? callBind2([desc.get]) : typeof $getPrototypeOf === "function" ? (
3532
- /** @type {import('./get')} */
3533
- function getDunder(value) {
3534
- return $getPrototypeOf(value == null ? value : $Object(value));
3535
- }
3536
- ) : false;
3537
- return get;
3538
- }
3539
- var getProto;
3540
- var hasRequiredGetProto;
3541
- function requireGetProto() {
3542
- if (hasRequiredGetProto) return getProto;
3543
- hasRequiredGetProto = 1;
3544
- var reflectGetProto = requireReflect_getPrototypeOf();
3545
- var originalGetProto = requireObject_getPrototypeOf();
3546
- var getDunderProto = /* @__PURE__ */ requireGet();
3547
- getProto = reflectGetProto ? function getProto2(O) {
3548
- return reflectGetProto(O);
3549
- } : originalGetProto ? function getProto2(O) {
3550
- if (!O || typeof O !== "object" && typeof O !== "function") {
3551
- throw new TypeError("getProto: not an object");
3552
- }
3553
- return originalGetProto(O);
3554
- } : getDunderProto ? function getProto2(O) {
3555
- return getDunderProto(O);
3556
- } : null;
3557
- return getProto;
3558
- }
3559
- var hasown;
3560
- var hasRequiredHasown;
3561
- function requireHasown() {
3562
- if (hasRequiredHasown) return hasown;
3563
- hasRequiredHasown = 1;
3564
- var call = Function.prototype.call;
3565
- var $hasOwn = Object.prototype.hasOwnProperty;
3566
- var bind = requireFunctionBind();
3567
- hasown = bind.call(call, $hasOwn);
3568
- return hasown;
3569
- }
3570
- var getIntrinsic;
3571
- var hasRequiredGetIntrinsic;
3572
- function requireGetIntrinsic() {
3573
- if (hasRequiredGetIntrinsic) return getIntrinsic;
3574
- hasRequiredGetIntrinsic = 1;
3575
- var undefined$1;
3576
- var $Object = /* @__PURE__ */ requireEsObjectAtoms();
3577
- var $Error = /* @__PURE__ */ requireEsErrors();
3578
- var $EvalError = /* @__PURE__ */ require_eval();
3579
- var $RangeError = /* @__PURE__ */ requireRange();
3580
- var $ReferenceError = /* @__PURE__ */ requireRef();
3581
- var $SyntaxError = /* @__PURE__ */ requireSyntax();
3582
- var $TypeError = /* @__PURE__ */ requireType();
3583
- var $URIError = /* @__PURE__ */ requireUri();
3584
- var abs2 = /* @__PURE__ */ requireAbs();
3585
- var floor2 = /* @__PURE__ */ requireFloor();
3586
- var max2 = /* @__PURE__ */ requireMax();
3587
- var min2 = /* @__PURE__ */ requireMin();
3588
- var pow2 = /* @__PURE__ */ requirePow();
3589
- var round2 = /* @__PURE__ */ requireRound();
3590
- var sign2 = /* @__PURE__ */ requireSign();
3591
- var $Function = Function;
3592
- var getEvalledConstructor = function(expressionSyntax) {
3593
- try {
3594
- return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
3595
- } catch (e) {
3596
- }
3597
- };
3598
- var $gOPD = /* @__PURE__ */ requireGopd();
3599
- var $defineProperty = /* @__PURE__ */ requireEsDefineProperty();
3600
- var throwTypeError = function() {
3601
- throw new $TypeError();
3602
- };
3603
- var ThrowTypeError = $gOPD ? function() {
3604
- try {
3605
- arguments.callee;
3606
- return throwTypeError;
3607
- } catch (calleeThrows) {
3608
- try {
3609
- return $gOPD(arguments, "callee").get;
3610
- } catch (gOPDthrows) {
3611
- return throwTypeError;
3612
- }
3613
- }
3614
- }() : throwTypeError;
3615
- var hasSymbols2 = requireHasSymbols()();
3616
- var getProto2 = requireGetProto();
3617
- var $ObjectGPO = requireObject_getPrototypeOf();
3618
- var $ReflectGPO = requireReflect_getPrototypeOf();
3619
- var $apply = requireFunctionApply();
3620
- var $call = requireFunctionCall();
3621
- var needsEval = {};
3622
- var TypedArray = typeof Uint8Array === "undefined" || !getProto2 ? undefined$1 : getProto2(Uint8Array);
3623
- var INTRINSICS = {
3624
- __proto__: null,
3625
- "%AggregateError%": typeof AggregateError === "undefined" ? undefined$1 : AggregateError,
3626
- "%Array%": Array,
3627
- "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined$1 : ArrayBuffer,
3628
- "%ArrayIteratorPrototype%": hasSymbols2 && getProto2 ? getProto2([][Symbol.iterator]()) : undefined$1,
3629
- "%AsyncFromSyncIteratorPrototype%": undefined$1,
3630
- "%AsyncFunction%": needsEval,
3631
- "%AsyncGenerator%": needsEval,
3632
- "%AsyncGeneratorFunction%": needsEval,
3633
- "%AsyncIteratorPrototype%": needsEval,
3634
- "%Atomics%": typeof Atomics === "undefined" ? undefined$1 : Atomics,
3635
- "%BigInt%": typeof BigInt === "undefined" ? undefined$1 : BigInt,
3636
- "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined$1 : BigInt64Array,
3637
- "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined$1 : BigUint64Array,
3638
- "%Boolean%": Boolean,
3639
- "%DataView%": typeof DataView === "undefined" ? undefined$1 : DataView,
3640
- "%Date%": Date,
3641
- "%decodeURI%": decodeURI,
3642
- "%decodeURIComponent%": decodeURIComponent,
3643
- "%encodeURI%": encodeURI,
3644
- "%encodeURIComponent%": encodeURIComponent,
3645
- "%Error%": $Error,
3646
- "%eval%": eval,
3647
- // eslint-disable-line no-eval
3648
- "%EvalError%": $EvalError,
3649
- "%Float16Array%": typeof Float16Array === "undefined" ? undefined$1 : Float16Array,
3650
- "%Float32Array%": typeof Float32Array === "undefined" ? undefined$1 : Float32Array,
3651
- "%Float64Array%": typeof Float64Array === "undefined" ? undefined$1 : Float64Array,
3652
- "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined$1 : FinalizationRegistry,
3653
- "%Function%": $Function,
3654
- "%GeneratorFunction%": needsEval,
3655
- "%Int8Array%": typeof Int8Array === "undefined" ? undefined$1 : Int8Array,
3656
- "%Int16Array%": typeof Int16Array === "undefined" ? undefined$1 : Int16Array,
3657
- "%Int32Array%": typeof Int32Array === "undefined" ? undefined$1 : Int32Array,
3658
- "%isFinite%": isFinite,
3659
- "%isNaN%": isNaN,
3660
- "%IteratorPrototype%": hasSymbols2 && getProto2 ? getProto2(getProto2([][Symbol.iterator]())) : undefined$1,
3661
- "%JSON%": typeof JSON === "object" ? JSON : undefined$1,
3662
- "%Map%": typeof Map === "undefined" ? undefined$1 : Map,
3663
- "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols2 || !getProto2 ? undefined$1 : getProto2((/* @__PURE__ */ new Map())[Symbol.iterator]()),
3664
- "%Math%": Math,
3665
- "%Number%": Number,
3666
- "%Object%": $Object,
3667
- "%Object.getOwnPropertyDescriptor%": $gOPD,
3668
- "%parseFloat%": parseFloat,
3669
- "%parseInt%": parseInt,
3670
- "%Promise%": typeof Promise === "undefined" ? undefined$1 : Promise,
3671
- "%Proxy%": typeof Proxy === "undefined" ? undefined$1 : Proxy,
3672
- "%RangeError%": $RangeError,
3673
- "%ReferenceError%": $ReferenceError,
3674
- "%Reflect%": typeof Reflect === "undefined" ? undefined$1 : Reflect,
3675
- "%RegExp%": RegExp,
3676
- "%Set%": typeof Set === "undefined" ? undefined$1 : Set,
3677
- "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols2 || !getProto2 ? undefined$1 : getProto2((/* @__PURE__ */ new Set())[Symbol.iterator]()),
3678
- "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined$1 : SharedArrayBuffer,
3679
- "%String%": String,
3680
- "%StringIteratorPrototype%": hasSymbols2 && getProto2 ? getProto2(""[Symbol.iterator]()) : undefined$1,
3681
- "%Symbol%": hasSymbols2 ? Symbol : undefined$1,
3682
- "%SyntaxError%": $SyntaxError,
3683
- "%ThrowTypeError%": ThrowTypeError,
3684
- "%TypedArray%": TypedArray,
3685
- "%TypeError%": $TypeError,
3686
- "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined$1 : Uint8Array,
3687
- "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined$1 : Uint8ClampedArray,
3688
- "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined$1 : Uint16Array,
3689
- "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined$1 : Uint32Array,
3690
- "%URIError%": $URIError,
3691
- "%WeakMap%": typeof WeakMap === "undefined" ? undefined$1 : WeakMap,
3692
- "%WeakRef%": typeof WeakRef === "undefined" ? undefined$1 : WeakRef,
3693
- "%WeakSet%": typeof WeakSet === "undefined" ? undefined$1 : WeakSet,
3694
- "%Function.prototype.call%": $call,
3695
- "%Function.prototype.apply%": $apply,
3696
- "%Object.defineProperty%": $defineProperty,
3697
- "%Object.getPrototypeOf%": $ObjectGPO,
3698
- "%Math.abs%": abs2,
3699
- "%Math.floor%": floor2,
3700
- "%Math.max%": max2,
3701
- "%Math.min%": min2,
3702
- "%Math.pow%": pow2,
3703
- "%Math.round%": round2,
3704
- "%Math.sign%": sign2,
3705
- "%Reflect.getPrototypeOf%": $ReflectGPO
3706
- };
3707
- if (getProto2) {
3708
- try {
3709
- null.error;
3710
- } catch (e) {
3711
- var errorProto = getProto2(getProto2(e));
3712
- INTRINSICS["%Error.prototype%"] = errorProto;
3713
- }
3714
- }
3715
- var doEval = function doEval2(name) {
3716
- var value;
3717
- if (name === "%AsyncFunction%") {
3718
- value = getEvalledConstructor("async function () {}");
3719
- } else if (name === "%GeneratorFunction%") {
3720
- value = getEvalledConstructor("function* () {}");
3721
- } else if (name === "%AsyncGeneratorFunction%") {
3722
- value = getEvalledConstructor("async function* () {}");
3723
- } else if (name === "%AsyncGenerator%") {
3724
- var fn = doEval2("%AsyncGeneratorFunction%");
3725
- if (fn) {
3726
- value = fn.prototype;
3727
- }
3728
- } else if (name === "%AsyncIteratorPrototype%") {
3729
- var gen = doEval2("%AsyncGenerator%");
3730
- if (gen && getProto2) {
3731
- value = getProto2(gen.prototype);
3732
- }
3733
- }
3734
- INTRINSICS[name] = value;
3735
- return value;
3736
- };
3737
- var LEGACY_ALIASES = {
3738
- __proto__: null,
3739
- "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
3740
- "%ArrayPrototype%": ["Array", "prototype"],
3741
- "%ArrayProto_entries%": ["Array", "prototype", "entries"],
3742
- "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
3743
- "%ArrayProto_keys%": ["Array", "prototype", "keys"],
3744
- "%ArrayProto_values%": ["Array", "prototype", "values"],
3745
- "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
3746
- "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
3747
- "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
3748
- "%BooleanPrototype%": ["Boolean", "prototype"],
3749
- "%DataViewPrototype%": ["DataView", "prototype"],
3750
- "%DatePrototype%": ["Date", "prototype"],
3751
- "%ErrorPrototype%": ["Error", "prototype"],
3752
- "%EvalErrorPrototype%": ["EvalError", "prototype"],
3753
- "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
3754
- "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
3755
- "%FunctionPrototype%": ["Function", "prototype"],
3756
- "%Generator%": ["GeneratorFunction", "prototype"],
3757
- "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
3758
- "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
3759
- "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
3760
- "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
3761
- "%JSONParse%": ["JSON", "parse"],
3762
- "%JSONStringify%": ["JSON", "stringify"],
3763
- "%MapPrototype%": ["Map", "prototype"],
3764
- "%NumberPrototype%": ["Number", "prototype"],
3765
- "%ObjectPrototype%": ["Object", "prototype"],
3766
- "%ObjProto_toString%": ["Object", "prototype", "toString"],
3767
- "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
3768
- "%PromisePrototype%": ["Promise", "prototype"],
3769
- "%PromiseProto_then%": ["Promise", "prototype", "then"],
3770
- "%Promise_all%": ["Promise", "all"],
3771
- "%Promise_reject%": ["Promise", "reject"],
3772
- "%Promise_resolve%": ["Promise", "resolve"],
3773
- "%RangeErrorPrototype%": ["RangeError", "prototype"],
3774
- "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
3775
- "%RegExpPrototype%": ["RegExp", "prototype"],
3776
- "%SetPrototype%": ["Set", "prototype"],
3777
- "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
3778
- "%StringPrototype%": ["String", "prototype"],
3779
- "%SymbolPrototype%": ["Symbol", "prototype"],
3780
- "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
3781
- "%TypedArrayPrototype%": ["TypedArray", "prototype"],
3782
- "%TypeErrorPrototype%": ["TypeError", "prototype"],
3783
- "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
3784
- "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
3785
- "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
3786
- "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
3787
- "%URIErrorPrototype%": ["URIError", "prototype"],
3788
- "%WeakMapPrototype%": ["WeakMap", "prototype"],
3789
- "%WeakSetPrototype%": ["WeakSet", "prototype"]
3790
- };
3791
- var bind = requireFunctionBind();
3792
- var hasOwn = /* @__PURE__ */ requireHasown();
3793
- var $concat = bind.call($call, Array.prototype.concat);
3794
- var $spliceApply = bind.call($apply, Array.prototype.splice);
3795
- var $replace = bind.call($call, String.prototype.replace);
3796
- var $strSlice = bind.call($call, String.prototype.slice);
3797
- var $exec = bind.call($call, RegExp.prototype.exec);
3798
- var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
3799
- var reEscapeChar = /\\(\\)?/g;
3800
- var stringToPath = function stringToPath2(string) {
3801
- var first = $strSlice(string, 0, 1);
3802
- var last = $strSlice(string, -1);
3803
- if (first === "%" && last !== "%") {
3804
- throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
3805
- } else if (last === "%" && first !== "%") {
3806
- throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
3807
- }
3808
- var result = [];
3809
- $replace(string, rePropName, function(match, number, quote, subString) {
3810
- result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match;
3811
- });
3812
- return result;
3813
- };
3814
- var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
3815
- var intrinsicName = name;
3816
- var alias;
3817
- if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
3818
- alias = LEGACY_ALIASES[intrinsicName];
3819
- intrinsicName = "%" + alias[0] + "%";
3820
- }
3821
- if (hasOwn(INTRINSICS, intrinsicName)) {
3822
- var value = INTRINSICS[intrinsicName];
3823
- if (value === needsEval) {
3824
- value = doEval(intrinsicName);
3825
- }
3826
- if (typeof value === "undefined" && !allowMissing) {
3827
- throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
3828
- }
3829
- return {
3830
- alias,
3831
- name: intrinsicName,
3832
- value
3833
- };
3834
- }
3835
- throw new $SyntaxError("intrinsic " + name + " does not exist!");
3836
- };
3837
- getIntrinsic = function GetIntrinsic(name, allowMissing) {
3838
- if (typeof name !== "string" || name.length === 0) {
3839
- throw new $TypeError("intrinsic name must be a non-empty string");
3840
- }
3841
- if (arguments.length > 1 && typeof allowMissing !== "boolean") {
3842
- throw new $TypeError('"allowMissing" argument must be a boolean');
3843
- }
3844
- if ($exec(/^%?[^%]*%?$/, name) === null) {
3845
- throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
3846
- }
3847
- var parts = stringToPath(name);
3848
- var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
3849
- var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
3850
- var intrinsicRealName = intrinsic.name;
3851
- var value = intrinsic.value;
3852
- var skipFurtherCaching = false;
3853
- var alias = intrinsic.alias;
3854
- if (alias) {
3855
- intrinsicBaseName = alias[0];
3856
- $spliceApply(parts, $concat([0, 1], alias));
3857
- }
3858
- for (var i = 1, isOwn = true; i < parts.length; i += 1) {
3859
- var part = parts[i];
3860
- var first = $strSlice(part, 0, 1);
3861
- var last = $strSlice(part, -1);
3862
- if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
3863
- throw new $SyntaxError("property names with quotes must have matching quotes");
3864
- }
3865
- if (part === "constructor" || !isOwn) {
3866
- skipFurtherCaching = true;
3867
- }
3868
- intrinsicBaseName += "." + part;
3869
- intrinsicRealName = "%" + intrinsicBaseName + "%";
3870
- if (hasOwn(INTRINSICS, intrinsicRealName)) {
3871
- value = INTRINSICS[intrinsicRealName];
3872
- } else if (value != null) {
3873
- if (!(part in value)) {
3874
- if (!allowMissing) {
3875
- throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
3876
- }
3877
- return void 0;
3878
- }
3879
- if ($gOPD && i + 1 >= parts.length) {
3880
- var desc = $gOPD(value, part);
3881
- isOwn = !!desc;
3882
- if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
3883
- value = desc.get;
3884
- } else {
3885
- value = value[part];
3886
- }
3887
- } else {
3888
- isOwn = hasOwn(value, part);
3889
- value = value[part];
3890
- }
3891
- if (isOwn && !skipFurtherCaching) {
3892
- INTRINSICS[intrinsicRealName] = value;
3893
- }
3894
- }
3895
- }
3896
- return value;
3897
- };
3898
- return getIntrinsic;
3899
- }
3900
- var callBound$1;
3901
- var hasRequiredCallBound$1;
3902
- function requireCallBound$1() {
3903
- if (hasRequiredCallBound$1) return callBound$1;
3904
- hasRequiredCallBound$1 = 1;
3905
- var GetIntrinsic = /* @__PURE__ */ requireGetIntrinsic();
3906
- var callBindBasic = requireCallBindApplyHelpers();
3907
- var $indexOf = callBindBasic([GetIntrinsic("%String.prototype.indexOf%")]);
3908
- callBound$1 = function callBoundIntrinsic(name, allowMissing) {
3909
- var intrinsic = (
3910
- /** @type {(this: unknown, ...args: unknown[]) => unknown} */
3911
- GetIntrinsic(name, !!allowMissing)
3912
- );
3913
- if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
3914
- return callBindBasic(
3915
- /** @type {const} */
3916
- [intrinsic]
3917
- );
3918
- }
3919
- return intrinsic;
3920
- };
3921
- return callBound$1;
3922
- }
3923
- var implementation$2;
3924
- var hasRequiredImplementation$2;
3925
- function requireImplementation$2() {
3926
- if (hasRequiredImplementation$2) return implementation$2;
3927
- hasRequiredImplementation$2 = 1;
3928
- var objectKeys2 = requireObjectKeys();
3929
- var hasSymbols2 = requireShams()();
3930
- var callBound2 = /* @__PURE__ */ requireCallBound$1();
3931
- var $Object = /* @__PURE__ */ requireEsObjectAtoms();
3932
- var $push = callBound2("Array.prototype.push");
3933
- var $propIsEnumerable = callBound2("Object.prototype.propertyIsEnumerable");
3934
- var originalGetSymbols = hasSymbols2 ? $Object.getOwnPropertySymbols : null;
3935
- implementation$2 = function assign(target, source1) {
3936
- if (target == null) {
3937
- throw new TypeError("target must be an object");
3938
- }
3939
- var to = $Object(target);
3940
- if (arguments.length === 1) {
3941
- return to;
3942
- }
3943
- for (var s = 1; s < arguments.length; ++s) {
3944
- var from = $Object(arguments[s]);
3945
- var keys = objectKeys2(from);
3946
- var getSymbols = hasSymbols2 && ($Object.getOwnPropertySymbols || originalGetSymbols);
3947
- if (getSymbols) {
3948
- var syms = getSymbols(from);
3949
- for (var j = 0; j < syms.length; ++j) {
3950
- var key = syms[j];
3951
- if ($propIsEnumerable(from, key)) {
3952
- $push(keys, key);
3953
- }
3954
- }
3955
- }
3956
- for (var i = 0; i < keys.length; ++i) {
3957
- var nextKey = keys[i];
3958
- if ($propIsEnumerable(from, nextKey)) {
3959
- var propValue = from[nextKey];
3960
- to[nextKey] = propValue;
3961
- }
3962
- }
3963
- }
3964
- return to;
3965
- };
3966
- return implementation$2;
3967
- }
3968
- var polyfill$2;
3969
- var hasRequiredPolyfill$2;
3970
- function requirePolyfill$2() {
3971
- if (hasRequiredPolyfill$2) return polyfill$2;
3972
- hasRequiredPolyfill$2 = 1;
3973
- var implementation2 = requireImplementation$2();
3974
- var lacksProperEnumerationOrder = function() {
3975
- if (!Object.assign) {
3976
- return false;
3977
- }
3978
- var str = "abcdefghijklmnopqrst";
3979
- var letters = str.split("");
3980
- var map = {};
3981
- for (var i = 0; i < letters.length; ++i) {
3982
- map[letters[i]] = letters[i];
3983
- }
3984
- var obj = Object.assign({}, map);
3985
- var actual = "";
3986
- for (var k in obj) {
3987
- actual += k;
3988
- }
3989
- return str !== actual;
3990
- };
3991
- var assignHasPendingExceptions = function() {
3992
- if (!Object.assign || !Object.preventExtensions) {
3993
- return false;
3994
- }
3995
- var thrower = Object.preventExtensions({ 1: 2 });
3996
- try {
3997
- Object.assign(thrower, "xy");
3998
- } catch (e) {
3999
- return thrower[1] === "y";
4000
- }
4001
- return false;
4002
- };
4003
- polyfill$2 = function getPolyfill() {
4004
- if (!Object.assign) {
4005
- return implementation2;
4006
- }
4007
- if (lacksProperEnumerationOrder()) {
4008
- return implementation2;
4009
- }
4010
- if (assignHasPendingExceptions()) {
4011
- return implementation2;
4012
- }
4013
- return Object.assign;
4014
- };
4015
- return polyfill$2;
4016
- }
4017
- var implementation$1;
4018
- var hasRequiredImplementation$1;
4019
- function requireImplementation$1() {
4020
- if (hasRequiredImplementation$1) return implementation$1;
4021
- hasRequiredImplementation$1 = 1;
4022
- var numberIsNaN = function(value) {
4023
- return value !== value;
4024
- };
4025
- implementation$1 = function is(a, b) {
4026
- if (a === 0 && b === 0) {
4027
- return 1 / a === 1 / b;
4028
- }
4029
- if (a === b) {
4030
- return true;
4031
- }
4032
- if (numberIsNaN(a) && numberIsNaN(b)) {
4033
- return true;
4034
- }
4035
- return false;
4036
- };
4037
- return implementation$1;
4038
- }
4039
- var polyfill$1;
4040
- var hasRequiredPolyfill$1;
4041
- function requirePolyfill$1() {
4042
- if (hasRequiredPolyfill$1) return polyfill$1;
4043
- hasRequiredPolyfill$1 = 1;
4044
- var implementation2 = requireImplementation$1();
4045
- polyfill$1 = function getPolyfill() {
4046
- return typeof Object.is === "function" ? Object.is : implementation2;
4047
- };
4048
- return polyfill$1;
4049
- }
4050
- var callBind = { exports: {} };
4051
- var defineDataProperty;
4052
- var hasRequiredDefineDataProperty;
4053
- function requireDefineDataProperty() {
4054
- if (hasRequiredDefineDataProperty) return defineDataProperty;
4055
- hasRequiredDefineDataProperty = 1;
4056
- var $defineProperty = /* @__PURE__ */ requireEsDefineProperty();
4057
- var $SyntaxError = /* @__PURE__ */ requireSyntax();
4058
- var $TypeError = /* @__PURE__ */ requireType();
4059
- var gopd2 = /* @__PURE__ */ requireGopd();
4060
- defineDataProperty = function defineDataProperty2(obj, property, value) {
4061
- if (!obj || typeof obj !== "object" && typeof obj !== "function") {
4062
- throw new $TypeError("`obj` must be an object or a function`");
4063
- }
4064
- if (typeof property !== "string" && typeof property !== "symbol") {
4065
- throw new $TypeError("`property` must be a string or a symbol`");
4066
- }
4067
- if (arguments.length > 3 && typeof arguments[3] !== "boolean" && arguments[3] !== null) {
4068
- throw new $TypeError("`nonEnumerable`, if provided, must be a boolean or null");
4069
- }
4070
- if (arguments.length > 4 && typeof arguments[4] !== "boolean" && arguments[4] !== null) {
4071
- throw new $TypeError("`nonWritable`, if provided, must be a boolean or null");
4072
- }
4073
- if (arguments.length > 5 && typeof arguments[5] !== "boolean" && arguments[5] !== null) {
4074
- throw new $TypeError("`nonConfigurable`, if provided, must be a boolean or null");
4075
- }
4076
- if (arguments.length > 6 && typeof arguments[6] !== "boolean") {
4077
- throw new $TypeError("`loose`, if provided, must be a boolean");
4078
- }
4079
- var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
4080
- var nonWritable = arguments.length > 4 ? arguments[4] : null;
4081
- var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
4082
- var loose = arguments.length > 6 ? arguments[6] : false;
4083
- var desc = !!gopd2 && gopd2(obj, property);
4084
- if ($defineProperty) {
4085
- $defineProperty(obj, property, {
4086
- configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
4087
- enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
4088
- value,
4089
- writable: nonWritable === null && desc ? desc.writable : !nonWritable
4090
- });
4091
- } else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) {
4092
- obj[property] = value;
4093
- } else {
4094
- throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
4095
- }
4096
- };
4097
- return defineDataProperty;
4098
- }
4099
- var hasPropertyDescriptors_1;
4100
- var hasRequiredHasPropertyDescriptors;
4101
- function requireHasPropertyDescriptors() {
4102
- if (hasRequiredHasPropertyDescriptors) return hasPropertyDescriptors_1;
4103
- hasRequiredHasPropertyDescriptors = 1;
4104
- var $defineProperty = /* @__PURE__ */ requireEsDefineProperty();
4105
- var hasPropertyDescriptors = function hasPropertyDescriptors2() {
4106
- return !!$defineProperty;
4107
- };
4108
- hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
4109
- if (!$defineProperty) {
4110
- return null;
4111
- }
4112
- try {
4113
- return $defineProperty([], "length", { value: 1 }).length !== 1;
4114
- } catch (e) {
4115
- return true;
4116
- }
4117
- };
4118
- hasPropertyDescriptors_1 = hasPropertyDescriptors;
4119
- return hasPropertyDescriptors_1;
4120
- }
4121
- var setFunctionLength;
4122
- var hasRequiredSetFunctionLength;
4123
- function requireSetFunctionLength() {
4124
- if (hasRequiredSetFunctionLength) return setFunctionLength;
4125
- hasRequiredSetFunctionLength = 1;
4126
- var GetIntrinsic = /* @__PURE__ */ requireGetIntrinsic();
4127
- var define = /* @__PURE__ */ requireDefineDataProperty();
4128
- var hasDescriptors = /* @__PURE__ */ requireHasPropertyDescriptors()();
4129
- var gOPD2 = /* @__PURE__ */ requireGopd();
4130
- var $TypeError = /* @__PURE__ */ requireType();
4131
- var $floor = GetIntrinsic("%Math.floor%");
4132
- setFunctionLength = function setFunctionLength2(fn, length) {
4133
- if (typeof fn !== "function") {
4134
- throw new $TypeError("`fn` is not a function");
4135
- }
4136
- if (typeof length !== "number" || length < 0 || length > 4294967295 || $floor(length) !== length) {
4137
- throw new $TypeError("`length` must be a positive 32-bit integer");
4138
- }
4139
- var loose = arguments.length > 2 && !!arguments[2];
4140
- var functionLengthIsConfigurable = true;
4141
- var functionLengthIsWritable = true;
4142
- if ("length" in fn && gOPD2) {
4143
- var desc = gOPD2(fn, "length");
4144
- if (desc && !desc.configurable) {
4145
- functionLengthIsConfigurable = false;
4146
- }
4147
- if (desc && !desc.writable) {
4148
- functionLengthIsWritable = false;
4149
- }
4150
- }
4151
- if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
4152
- if (hasDescriptors) {
4153
- define(
4154
- /** @type {Parameters<define>[0]} */
4155
- fn,
4156
- "length",
4157
- length,
4158
- true,
4159
- true
4160
- );
4161
- } else {
4162
- define(
4163
- /** @type {Parameters<define>[0]} */
4164
- fn,
4165
- "length",
4166
- length
4167
- );
4168
- }
4169
- }
4170
- return fn;
4171
- };
4172
- return setFunctionLength;
4173
- }
4174
- var applyBind;
4175
- var hasRequiredApplyBind;
4176
- function requireApplyBind() {
4177
- if (hasRequiredApplyBind) return applyBind;
4178
- hasRequiredApplyBind = 1;
4179
- var bind = requireFunctionBind();
4180
- var $apply = requireFunctionApply();
4181
- var actualApply2 = requireActualApply();
4182
- applyBind = function applyBind2() {
4183
- return actualApply2(bind, $apply, arguments);
4184
- };
4185
- return applyBind;
4186
- }
4187
- var hasRequiredCallBind;
4188
- function requireCallBind() {
4189
- if (hasRequiredCallBind) return callBind.exports;
4190
- hasRequiredCallBind = 1;
4191
- (function(module) {
4192
- var setFunctionLength2 = /* @__PURE__ */ requireSetFunctionLength();
4193
- var $defineProperty = /* @__PURE__ */ requireEsDefineProperty();
4194
- var callBindBasic = requireCallBindApplyHelpers();
4195
- var applyBind2 = requireApplyBind();
4196
- module.exports = function callBind2(originalFunction) {
4197
- var func = callBindBasic(arguments);
4198
- var adjustedLength = originalFunction.length - (arguments.length - 1);
4199
- return setFunctionLength2(
4200
- func,
4201
- 1 + (adjustedLength > 0 ? adjustedLength : 0),
4202
- true
4203
- );
4204
- };
4205
- if ($defineProperty) {
4206
- $defineProperty(module.exports, "apply", { value: applyBind2 });
4207
- } else {
4208
- module.exports.apply = applyBind2;
1405
+ if (isUnc) {
1406
+ resolvedDevice = normalizeUNCRoot(resolvedDevice);
4209
1407
  }
4210
- })(callBind);
4211
- return callBind.exports;
4212
- }
4213
- var callBound;
4214
- var hasRequiredCallBound;
4215
- function requireCallBound() {
4216
- if (hasRequiredCallBound) return callBound;
4217
- hasRequiredCallBound = 1;
4218
- var GetIntrinsic = /* @__PURE__ */ requireGetIntrinsic();
4219
- var callBind2 = requireCallBind();
4220
- var $indexOf = callBind2(GetIntrinsic("String.prototype.indexOf"));
4221
- callBound = function callBoundIntrinsic(name, allowMissing) {
4222
- var intrinsic = GetIntrinsic(name, !!allowMissing);
4223
- if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
4224
- return callBind2(intrinsic);
4225
- }
4226
- return intrinsic;
4227
- };
4228
- return callBound;
4229
- }
4230
- var defineProperties_1;
4231
- var hasRequiredDefineProperties;
4232
- function requireDefineProperties() {
4233
- if (hasRequiredDefineProperties) return defineProperties_1;
4234
- hasRequiredDefineProperties = 1;
4235
- var keys = requireObjectKeys();
4236
- var hasSymbols2 = typeof Symbol === "function" && typeof Symbol("foo") === "symbol";
4237
- var toStr = Object.prototype.toString;
4238
- var concat = Array.prototype.concat;
4239
- var defineDataProperty2 = /* @__PURE__ */ requireDefineDataProperty();
4240
- var isFunction = function(fn) {
4241
- return typeof fn === "function" && toStr.call(fn) === "[object Function]";
1408
+ resolvedTail = normalizeArray(
1409
+ resolvedTail.split(/[\\\/]+/),
1410
+ !resolvedAbsolute
1411
+ ).join("\\");
1412
+ return resolvedDevice + (resolvedAbsolute ? "\\" : "") + resolvedTail || ".";
4242
1413
  };
4243
- var supportsDescriptors = /* @__PURE__ */ requireHasPropertyDescriptors()();
4244
- var defineProperty = function(object, name, value, predicate) {
4245
- if (name in object) {
4246
- if (predicate === true) {
4247
- if (object[name] === value) {
4248
- return;
4249
- }
4250
- } else if (!isFunction(predicate) || !predicate()) {
4251
- return;
4252
- }
4253
- }
4254
- if (supportsDescriptors) {
4255
- defineDataProperty2(object, name, value, true);
4256
- } else {
4257
- defineDataProperty2(object, name, value);
1414
+ win32.normalize = function(path2) {
1415
+ var result = win32StatPath(path2), device = result.device, isUnc = result.isUnc, isAbsolute = result.isAbsolute, tail = result.tail, trailingSlash = /[\\\/]$/.test(tail);
1416
+ tail = normalizeArray(tail.split(/[\\\/]+/), !isAbsolute).join("\\");
1417
+ if (!tail && !isAbsolute) {
1418
+ tail = ".";
4258
1419
  }
4259
- };
4260
- var defineProperties = function(object, map) {
4261
- var predicates = arguments.length > 2 ? arguments[2] : {};
4262
- var props = keys(map);
4263
- if (hasSymbols2) {
4264
- props = concat.call(props, Object.getOwnPropertySymbols(map));
1420
+ if (tail && trailingSlash) {
1421
+ tail += "\\";
4265
1422
  }
4266
- for (var i = 0; i < props.length; i += 1) {
4267
- defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
1423
+ if (isUnc) {
1424
+ device = normalizeUNCRoot(device);
4268
1425
  }
1426
+ return device + (isAbsolute ? "\\" : "") + tail;
4269
1427
  };
4270
- defineProperties.supportsDescriptors = !!supportsDescriptors;
4271
- defineProperties_1 = defineProperties;
4272
- return defineProperties_1;
4273
- }
4274
- var shim$1;
4275
- var hasRequiredShim$1;
4276
- function requireShim$1() {
4277
- if (hasRequiredShim$1) return shim$1;
4278
- hasRequiredShim$1 = 1;
4279
- var getPolyfill = requirePolyfill$1();
4280
- var define = requireDefineProperties();
4281
- shim$1 = function shimObjectIs() {
4282
- var polyfill2 = getPolyfill();
4283
- define(Object, { is: polyfill2 }, {
4284
- is: function testObjectIs() {
4285
- return Object.is !== polyfill2;
4286
- }
4287
- });
4288
- return polyfill2;
4289
- };
4290
- return shim$1;
4291
- }
4292
- var objectIs;
4293
- var hasRequiredObjectIs;
4294
- function requireObjectIs() {
4295
- if (hasRequiredObjectIs) return objectIs;
4296
- hasRequiredObjectIs = 1;
4297
- var define = requireDefineProperties();
4298
- var callBind2 = requireCallBind();
4299
- var implementation2 = requireImplementation$1();
4300
- var getPolyfill = requirePolyfill$1();
4301
- var shim2 = requireShim$1();
4302
- var polyfill2 = callBind2(getPolyfill(), Object);
4303
- define(polyfill2, {
4304
- getPolyfill,
4305
- implementation: implementation2,
4306
- shim: shim2
4307
- });
4308
- objectIs = polyfill2;
4309
- return objectIs;
4310
- }
4311
- var implementation;
4312
- var hasRequiredImplementation;
4313
- function requireImplementation() {
4314
- if (hasRequiredImplementation) return implementation;
4315
- hasRequiredImplementation = 1;
4316
- implementation = function isNaN2(value) {
4317
- return value !== value;
4318
- };
4319
- return implementation;
4320
- }
4321
- var polyfill;
4322
- var hasRequiredPolyfill;
4323
- function requirePolyfill() {
4324
- if (hasRequiredPolyfill) return polyfill;
4325
- hasRequiredPolyfill = 1;
4326
- var implementation2 = requireImplementation();
4327
- polyfill = function getPolyfill() {
4328
- if (Number.isNaN && Number.isNaN(NaN) && !Number.isNaN("a")) {
4329
- return Number.isNaN;
4330
- }
4331
- return implementation2;
1428
+ win32.isAbsolute = function(path2) {
1429
+ return win32StatPath(path2).isAbsolute;
4332
1430
  };
4333
- return polyfill;
4334
- }
4335
- var shim;
4336
- var hasRequiredShim;
4337
- function requireShim() {
4338
- if (hasRequiredShim) return shim;
4339
- hasRequiredShim = 1;
4340
- var define = requireDefineProperties();
4341
- var getPolyfill = requirePolyfill();
4342
- shim = function shimNumberIsNaN() {
4343
- var polyfill2 = getPolyfill();
4344
- define(Number, { isNaN: polyfill2 }, {
4345
- isNaN: function testIsNaN() {
4346
- return Number.isNaN !== polyfill2;
1431
+ win32.join = function() {
1432
+ var paths = [];
1433
+ for (var i = 0; i < arguments.length; i++) {
1434
+ var arg = arguments[i];
1435
+ if (!util2.isString(arg)) {
1436
+ throw new TypeError("Arguments to path.join must be strings");
4347
1437
  }
4348
- });
4349
- return polyfill2;
4350
- };
4351
- return shim;
4352
- }
4353
- var isNan;
4354
- var hasRequiredIsNan;
4355
- function requireIsNan() {
4356
- if (hasRequiredIsNan) return isNan;
4357
- hasRequiredIsNan = 1;
4358
- var callBind2 = requireCallBind();
4359
- var define = requireDefineProperties();
4360
- var implementation2 = requireImplementation();
4361
- var getPolyfill = requirePolyfill();
4362
- var shim2 = requireShim();
4363
- var polyfill2 = callBind2(getPolyfill(), Number);
4364
- define(polyfill2, {
4365
- getPolyfill,
4366
- implementation: implementation2,
4367
- shim: shim2
4368
- });
4369
- isNan = polyfill2;
4370
- return isNan;
4371
- }
4372
- var comparisons;
4373
- var hasRequiredComparisons;
4374
- function requireComparisons() {
4375
- if (hasRequiredComparisons) return comparisons;
4376
- hasRequiredComparisons = 1;
4377
- function _slicedToArray(arr, i) {
4378
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
4379
- }
4380
- function _nonIterableRest() {
4381
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4382
- }
4383
- function _unsupportedIterableToArray(o, minLen) {
4384
- if (!o) return;
4385
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
4386
- var n = Object.prototype.toString.call(o).slice(8, -1);
4387
- if (n === "Object" && o.constructor) n = o.constructor.name;
4388
- if (n === "Map" || n === "Set") return Array.from(o);
4389
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
4390
- }
4391
- function _arrayLikeToArray(arr, len) {
4392
- if (len == null || len > arr.length) len = arr.length;
4393
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
4394
- return arr2;
4395
- }
4396
- function _iterableToArrayLimit(r, l) {
4397
- var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
4398
- if (null != t) {
4399
- var e, n, i, u, a = [], f = true, o = false;
4400
- try {
4401
- if (i = (t = t.call(r)).next, 0 === l) ;
4402
- else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = true) ;
4403
- } catch (r2) {
4404
- o = true, n = r2;
4405
- } finally {
4406
- try {
4407
- if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
4408
- } finally {
4409
- if (o) throw n;
4410
- }
1438
+ if (arg) {
1439
+ paths.push(arg);
4411
1440
  }
4412
- return a;
4413
1441
  }
4414
- }
4415
- function _arrayWithHoles(arr) {
4416
- if (Array.isArray(arr)) return arr;
4417
- }
4418
- function _typeof(o) {
4419
- "@babel/helpers - typeof";
4420
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
4421
- return typeof o2;
4422
- } : function(o2) {
4423
- return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
4424
- }, _typeof(o);
4425
- }
4426
- var regexFlagsSupported = /a/g.flags !== void 0;
4427
- var arrayFromSet = function arrayFromSet2(set) {
4428
- var array = [];
4429
- set.forEach(function(value) {
4430
- return array.push(value);
4431
- });
4432
- return array;
4433
- };
4434
- var arrayFromMap = function arrayFromMap2(map) {
4435
- var array = [];
4436
- map.forEach(function(value, key) {
4437
- return array.push([key, value]);
4438
- });
4439
- return array;
4440
- };
4441
- var objectIs2 = Object.is ? Object.is : requireObjectIs();
4442
- var objectGetOwnPropertySymbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols : function() {
4443
- return [];
1442
+ var joined = paths.join("\\");
1443
+ if (!/^[\\\/]{2}[^\\\/]/.test(paths[0])) {
1444
+ joined = joined.replace(/^[\\\/]{2,}/, "\\");
1445
+ }
1446
+ return win32.normalize(joined);
4444
1447
  };
4445
- var numberIsNaN = Number.isNaN ? Number.isNaN : requireIsNan();
4446
- function uncurryThis(f) {
4447
- return f.call.bind(f);
4448
- }
4449
- var hasOwnProperty = uncurryThis(Object.prototype.hasOwnProperty);
4450
- var propertyIsEnumerable = uncurryThis(Object.prototype.propertyIsEnumerable);
4451
- var objectToString = uncurryThis(Object.prototype.toString);
4452
- var _require$types = requireUtil$1().types, isAnyArrayBuffer = _require$types.isAnyArrayBuffer, isArrayBufferView = _require$types.isArrayBufferView, isDate = _require$types.isDate, isMap = _require$types.isMap, isRegExp = _require$types.isRegExp, isSet = _require$types.isSet, isNativeError = _require$types.isNativeError, isBoxedPrimitive = _require$types.isBoxedPrimitive, isNumberObject = _require$types.isNumberObject, isStringObject = _require$types.isStringObject, isBooleanObject = _require$types.isBooleanObject, isBigIntObject = _require$types.isBigIntObject, isSymbolObject = _require$types.isSymbolObject, isFloat32Array = _require$types.isFloat32Array, isFloat64Array = _require$types.isFloat64Array;
4453
- function isNonIndex(key) {
4454
- if (key.length === 0 || key.length > 10) return true;
4455
- for (var i = 0; i < key.length; i++) {
4456
- var code = key.charCodeAt(i);
4457
- if (code < 48 || code > 57) return true;
4458
- }
4459
- return key.length === 10 && key >= Math.pow(2, 32);
4460
- }
4461
- function getOwnNonIndexProperties(value) {
4462
- return Object.keys(value).filter(isNonIndex).concat(objectGetOwnPropertySymbols(value).filter(Object.prototype.propertyIsEnumerable.bind(value)));
4463
- }
4464
- /*!
4465
- * The buffer module from node.js, for the browser.
4466
- *
4467
- * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
4468
- * @license MIT
4469
- */
4470
- function compare(a, b) {
4471
- if (a === b) {
4472
- return 0;
4473
- }
4474
- var x = a.length;
4475
- var y = b.length;
4476
- for (var i = 0, len = Math.min(x, y); i < len; ++i) {
4477
- if (a[i] !== b[i]) {
4478
- x = a[i];
4479
- y = b[i];
1448
+ win32.relative = function(from, to) {
1449
+ from = win32.resolve(from);
1450
+ to = win32.resolve(to);
1451
+ var lowerFrom = from.toLowerCase();
1452
+ var lowerTo = to.toLowerCase();
1453
+ var toParts = trimArray(to.split("\\"));
1454
+ var lowerFromParts = trimArray(lowerFrom.split("\\"));
1455
+ var lowerToParts = trimArray(lowerTo.split("\\"));
1456
+ var length = Math.min(lowerFromParts.length, lowerToParts.length);
1457
+ var samePartsLength = length;
1458
+ for (var i = 0; i < length; i++) {
1459
+ if (lowerFromParts[i] !== lowerToParts[i]) {
1460
+ samePartsLength = i;
4480
1461
  break;
4481
1462
  }
4482
1463
  }
4483
- if (x < y) {
4484
- return -1;
4485
- }
4486
- if (y < x) {
4487
- return 1;
4488
- }
4489
- return 0;
4490
- }
4491
- var kStrict = true;
4492
- var kLoose = false;
4493
- var kNoIterator = 0;
4494
- var kIsArray = 1;
4495
- var kIsSet = 2;
4496
- var kIsMap = 3;
4497
- function areSimilarRegExps(a, b) {
4498
- return regexFlagsSupported ? a.source === b.source && a.flags === b.flags : RegExp.prototype.toString.call(a) === RegExp.prototype.toString.call(b);
4499
- }
4500
- function areSimilarFloatArrays(a, b) {
4501
- if (a.byteLength !== b.byteLength) {
4502
- return false;
4503
- }
4504
- for (var offset = 0; offset < a.byteLength; offset++) {
4505
- if (a[offset] !== b[offset]) {
4506
- return false;
4507
- }
4508
- }
4509
- return true;
4510
- }
4511
- function areSimilarTypedArrays(a, b) {
4512
- if (a.byteLength !== b.byteLength) {
4513
- return false;
4514
- }
4515
- return compare(new Uint8Array(a.buffer, a.byteOffset, a.byteLength), new Uint8Array(b.buffer, b.byteOffset, b.byteLength)) === 0;
4516
- }
4517
- function areEqualArrayBuffers(buf1, buf2) {
4518
- return buf1.byteLength === buf2.byteLength && compare(new Uint8Array(buf1), new Uint8Array(buf2)) === 0;
4519
- }
4520
- function isEqualBoxedPrimitive(val1, val2) {
4521
- if (isNumberObject(val1)) {
4522
- return isNumberObject(val2) && objectIs2(Number.prototype.valueOf.call(val1), Number.prototype.valueOf.call(val2));
4523
- }
4524
- if (isStringObject(val1)) {
4525
- return isStringObject(val2) && String.prototype.valueOf.call(val1) === String.prototype.valueOf.call(val2);
4526
- }
4527
- if (isBooleanObject(val1)) {
4528
- return isBooleanObject(val2) && Boolean.prototype.valueOf.call(val1) === Boolean.prototype.valueOf.call(val2);
4529
- }
4530
- if (isBigIntObject(val1)) {
4531
- return isBigIntObject(val2) && BigInt.prototype.valueOf.call(val1) === BigInt.prototype.valueOf.call(val2);
4532
- }
4533
- return isSymbolObject(val2) && Symbol.prototype.valueOf.call(val1) === Symbol.prototype.valueOf.call(val2);
4534
- }
4535
- function innerDeepEqual(val1, val2, strict, memos) {
4536
- if (val1 === val2) {
4537
- if (val1 !== 0) return true;
4538
- return strict ? objectIs2(val1, val2) : true;
4539
- }
4540
- if (strict) {
4541
- if (_typeof(val1) !== "object") {
4542
- return typeof val1 === "number" && numberIsNaN(val1) && numberIsNaN(val2);
4543
- }
4544
- if (_typeof(val2) !== "object" || val1 === null || val2 === null) {
4545
- return false;
4546
- }
4547
- if (Object.getPrototypeOf(val1) !== Object.getPrototypeOf(val2)) {
4548
- return false;
4549
- }
4550
- } else {
4551
- if (val1 === null || _typeof(val1) !== "object") {
4552
- if (val2 === null || _typeof(val2) !== "object") {
4553
- return val1 == val2;
4554
- }
4555
- return false;
4556
- }
4557
- if (val2 === null || _typeof(val2) !== "object") {
4558
- return false;
4559
- }
4560
- }
4561
- var val1Tag = objectToString(val1);
4562
- var val2Tag = objectToString(val2);
4563
- if (val1Tag !== val2Tag) {
4564
- return false;
4565
- }
4566
- if (Array.isArray(val1)) {
4567
- if (val1.length !== val2.length) {
4568
- return false;
4569
- }
4570
- var keys1 = getOwnNonIndexProperties(val1);
4571
- var keys2 = getOwnNonIndexProperties(val2);
4572
- if (keys1.length !== keys2.length) {
4573
- return false;
4574
- }
4575
- return keyCheck(val1, val2, strict, memos, kIsArray, keys1);
4576
- }
4577
- if (val1Tag === "[object Object]") {
4578
- if (!isMap(val1) && isMap(val2) || !isSet(val1) && isSet(val2)) {
4579
- return false;
4580
- }
4581
- }
4582
- if (isDate(val1)) {
4583
- if (!isDate(val2) || Date.prototype.getTime.call(val1) !== Date.prototype.getTime.call(val2)) {
4584
- return false;
4585
- }
4586
- } else if (isRegExp(val1)) {
4587
- if (!isRegExp(val2) || !areSimilarRegExps(val1, val2)) {
4588
- return false;
4589
- }
4590
- } else if (isNativeError(val1) || val1 instanceof Error) {
4591
- if (val1.message !== val2.message || val1.name !== val2.name) {
4592
- return false;
4593
- }
4594
- } else if (isArrayBufferView(val1)) {
4595
- if (!strict && (isFloat32Array(val1) || isFloat64Array(val1))) {
4596
- if (!areSimilarFloatArrays(val1, val2)) {
4597
- return false;
4598
- }
4599
- } else if (!areSimilarTypedArrays(val1, val2)) {
4600
- return false;
4601
- }
4602
- var _keys = getOwnNonIndexProperties(val1);
4603
- var _keys2 = getOwnNonIndexProperties(val2);
4604
- if (_keys.length !== _keys2.length) {
4605
- return false;
4606
- }
4607
- return keyCheck(val1, val2, strict, memos, kNoIterator, _keys);
4608
- } else if (isSet(val1)) {
4609
- if (!isSet(val2) || val1.size !== val2.size) {
4610
- return false;
4611
- }
4612
- return keyCheck(val1, val2, strict, memos, kIsSet);
4613
- } else if (isMap(val1)) {
4614
- if (!isMap(val2) || val1.size !== val2.size) {
4615
- return false;
4616
- }
4617
- return keyCheck(val1, val2, strict, memos, kIsMap);
4618
- } else if (isAnyArrayBuffer(val1)) {
4619
- if (!areEqualArrayBuffers(val1, val2)) {
4620
- return false;
4621
- }
4622
- } else if (isBoxedPrimitive(val1) && !isEqualBoxedPrimitive(val1, val2)) {
4623
- return false;
4624
- }
4625
- return keyCheck(val1, val2, strict, memos, kNoIterator);
4626
- }
4627
- function getEnumerables(val, keys) {
4628
- return keys.filter(function(k) {
4629
- return propertyIsEnumerable(val, k);
4630
- });
4631
- }
4632
- function keyCheck(val1, val2, strict, memos, iterationType, aKeys) {
4633
- if (arguments.length === 5) {
4634
- aKeys = Object.keys(val1);
4635
- var bKeys = Object.keys(val2);
4636
- if (aKeys.length !== bKeys.length) {
4637
- return false;
4638
- }
4639
- }
4640
- var i = 0;
4641
- for (; i < aKeys.length; i++) {
4642
- if (!hasOwnProperty(val2, aKeys[i])) {
4643
- return false;
4644
- }
4645
- }
4646
- if (strict && arguments.length === 5) {
4647
- var symbolKeysA = objectGetOwnPropertySymbols(val1);
4648
- if (symbolKeysA.length !== 0) {
4649
- var count = 0;
4650
- for (i = 0; i < symbolKeysA.length; i++) {
4651
- var key = symbolKeysA[i];
4652
- if (propertyIsEnumerable(val1, key)) {
4653
- if (!propertyIsEnumerable(val2, key)) {
4654
- return false;
4655
- }
4656
- aKeys.push(key);
4657
- count++;
4658
- } else if (propertyIsEnumerable(val2, key)) {
4659
- return false;
4660
- }
4661
- }
4662
- var symbolKeysB = objectGetOwnPropertySymbols(val2);
4663
- if (symbolKeysA.length !== symbolKeysB.length && getEnumerables(val2, symbolKeysB).length !== count) {
4664
- return false;
4665
- }
4666
- } else {
4667
- var _symbolKeysB = objectGetOwnPropertySymbols(val2);
4668
- if (_symbolKeysB.length !== 0 && getEnumerables(val2, _symbolKeysB).length !== 0) {
4669
- return false;
4670
- }
4671
- }
4672
- }
4673
- if (aKeys.length === 0 && (iterationType === kNoIterator || iterationType === kIsArray && val1.length === 0 || val1.size === 0)) {
4674
- return true;
4675
- }
4676
- if (memos === void 0) {
4677
- memos = {
4678
- val1: /* @__PURE__ */ new Map(),
4679
- val2: /* @__PURE__ */ new Map(),
4680
- position: 0
4681
- };
4682
- } else {
4683
- var val2MemoA = memos.val1.get(val1);
4684
- if (val2MemoA !== void 0) {
4685
- var val2MemoB = memos.val2.get(val2);
4686
- if (val2MemoB !== void 0) {
4687
- return val2MemoA === val2MemoB;
4688
- }
4689
- }
4690
- memos.position++;
4691
- }
4692
- memos.val1.set(val1, memos.position);
4693
- memos.val2.set(val2, memos.position);
4694
- var areEq = objEquiv(val1, val2, strict, aKeys, memos, iterationType);
4695
- memos.val1.delete(val1);
4696
- memos.val2.delete(val2);
4697
- return areEq;
4698
- }
4699
- function setHasEqualElement(set, val1, strict, memo) {
4700
- var setValues = arrayFromSet(set);
4701
- for (var i = 0; i < setValues.length; i++) {
4702
- var val2 = setValues[i];
4703
- if (innerDeepEqual(val1, val2, strict, memo)) {
4704
- set.delete(val2);
4705
- return true;
4706
- }
4707
- }
4708
- return false;
4709
- }
4710
- function findLooseMatchingPrimitives(prim) {
4711
- switch (_typeof(prim)) {
4712
- case "undefined":
4713
- return null;
4714
- case "object":
4715
- return void 0;
4716
- case "symbol":
4717
- return false;
4718
- case "string":
4719
- prim = +prim;
4720
- // Loose equal entries exist only if the string is possible to convert to
4721
- // a regular number and not NaN.
4722
- // Fall through
4723
- case "number":
4724
- if (numberIsNaN(prim)) {
4725
- return false;
4726
- }
4727
- }
4728
- return true;
4729
- }
4730
- function setMightHaveLoosePrim(a, b, prim) {
4731
- var altValue = findLooseMatchingPrimitives(prim);
4732
- if (altValue != null) return altValue;
4733
- return b.has(altValue) && !a.has(altValue);
4734
- }
4735
- function mapMightHaveLoosePrim(a, b, prim, item, memo) {
4736
- var altValue = findLooseMatchingPrimitives(prim);
4737
- if (altValue != null) {
4738
- return altValue;
4739
- }
4740
- var curB = b.get(altValue);
4741
- if (curB === void 0 && !b.has(altValue) || !innerDeepEqual(item, curB, false, memo)) {
4742
- return false;
4743
- }
4744
- return !a.has(altValue) && innerDeepEqual(item, curB, false, memo);
4745
- }
4746
- function setEquiv(a, b, strict, memo) {
4747
- var set = null;
4748
- var aValues = arrayFromSet(a);
4749
- for (var i = 0; i < aValues.length; i++) {
4750
- var val = aValues[i];
4751
- if (_typeof(val) === "object" && val !== null) {
4752
- if (set === null) {
4753
- set = /* @__PURE__ */ new Set();
4754
- }
4755
- set.add(val);
4756
- } else if (!b.has(val)) {
4757
- if (strict) return false;
4758
- if (!setMightHaveLoosePrim(a, b, val)) {
4759
- return false;
4760
- }
4761
- if (set === null) {
4762
- set = /* @__PURE__ */ new Set();
4763
- }
4764
- set.add(val);
4765
- }
4766
- }
4767
- if (set !== null) {
4768
- var bValues = arrayFromSet(b);
4769
- for (var _i = 0; _i < bValues.length; _i++) {
4770
- var _val = bValues[_i];
4771
- if (_typeof(_val) === "object" && _val !== null) {
4772
- if (!setHasEqualElement(set, _val, strict, memo)) return false;
4773
- } else if (!strict && !a.has(_val) && !setHasEqualElement(set, _val, strict, memo)) {
4774
- return false;
4775
- }
4776
- }
4777
- return set.size === 0;
4778
- }
4779
- return true;
4780
- }
4781
- function mapHasEqualEntry(set, map, key1, item1, strict, memo) {
4782
- var setValues = arrayFromSet(set);
4783
- for (var i = 0; i < setValues.length; i++) {
4784
- var key2 = setValues[i];
4785
- if (innerDeepEqual(key1, key2, strict, memo) && innerDeepEqual(item1, map.get(key2), strict, memo)) {
4786
- set.delete(key2);
4787
- return true;
4788
- }
4789
- }
4790
- return false;
4791
- }
4792
- function mapEquiv(a, b, strict, memo) {
4793
- var set = null;
4794
- var aEntries = arrayFromMap(a);
4795
- for (var i = 0; i < aEntries.length; i++) {
4796
- var _aEntries$i = _slicedToArray(aEntries[i], 2), key = _aEntries$i[0], item1 = _aEntries$i[1];
4797
- if (_typeof(key) === "object" && key !== null) {
4798
- if (set === null) {
4799
- set = /* @__PURE__ */ new Set();
4800
- }
4801
- set.add(key);
4802
- } else {
4803
- var item2 = b.get(key);
4804
- if (item2 === void 0 && !b.has(key) || !innerDeepEqual(item1, item2, strict, memo)) {
4805
- if (strict) return false;
4806
- if (!mapMightHaveLoosePrim(a, b, key, item1, memo)) return false;
4807
- if (set === null) {
4808
- set = /* @__PURE__ */ new Set();
4809
- }
4810
- set.add(key);
4811
- }
4812
- }
1464
+ if (samePartsLength == 0) {
1465
+ return to;
4813
1466
  }
4814
- if (set !== null) {
4815
- var bEntries = arrayFromMap(b);
4816
- for (var _i2 = 0; _i2 < bEntries.length; _i2++) {
4817
- var _bEntries$_i = _slicedToArray(bEntries[_i2], 2), _key = _bEntries$_i[0], item = _bEntries$_i[1];
4818
- if (_typeof(_key) === "object" && _key !== null) {
4819
- if (!mapHasEqualEntry(set, a, _key, item, strict, memo)) return false;
4820
- } else if (!strict && (!a.has(_key) || !innerDeepEqual(a.get(_key), item, false, memo)) && !mapHasEqualEntry(set, a, _key, item, false, memo)) {
4821
- return false;
4822
- }
4823
- }
4824
- return set.size === 0;
1467
+ var outputParts = [];
1468
+ for (var i = samePartsLength; i < lowerFromParts.length; i++) {
1469
+ outputParts.push("..");
4825
1470
  }
4826
- return true;
4827
- }
4828
- function objEquiv(a, b, strict, keys, memos, iterationType) {
4829
- var i = 0;
4830
- if (iterationType === kIsSet) {
4831
- if (!setEquiv(a, b, strict, memos)) {
4832
- return false;
4833
- }
4834
- } else if (iterationType === kIsMap) {
4835
- if (!mapEquiv(a, b, strict, memos)) {
4836
- return false;
4837
- }
4838
- } else if (iterationType === kIsArray) {
4839
- for (; i < a.length; i++) {
4840
- if (hasOwnProperty(a, i)) {
4841
- if (!hasOwnProperty(b, i) || !innerDeepEqual(a[i], b[i], strict, memos)) {
4842
- return false;
4843
- }
4844
- } else if (hasOwnProperty(b, i)) {
4845
- return false;
4846
- } else {
4847
- var keysA = Object.keys(a);
4848
- for (; i < keysA.length; i++) {
4849
- var key = keysA[i];
4850
- if (!hasOwnProperty(b, key) || !innerDeepEqual(a[key], b[key], strict, memos)) {
4851
- return false;
4852
- }
4853
- }
4854
- if (keysA.length !== Object.keys(b).length) {
4855
- return false;
4856
- }
4857
- return true;
4858
- }
4859
- }
1471
+ outputParts = outputParts.concat(toParts.slice(samePartsLength));
1472
+ return outputParts.join("\\");
1473
+ };
1474
+ win32._makeLong = function(path2) {
1475
+ if (!util2.isString(path2))
1476
+ return path2;
1477
+ if (!path2) {
1478
+ return "";
4860
1479
  }
4861
- for (i = 0; i < keys.length; i++) {
4862
- var _key2 = keys[i];
4863
- if (!innerDeepEqual(a[_key2], b[_key2], strict, memos)) {
4864
- return false;
4865
- }
1480
+ var resolvedPath = win32.resolve(path2);
1481
+ if (/^[a-zA-Z]\:\\/.test(resolvedPath)) {
1482
+ return "\\\\?\\" + resolvedPath;
1483
+ } else if (/^\\\\[^?.]/.test(resolvedPath)) {
1484
+ return "\\\\?\\UNC\\" + resolvedPath.substring(2);
4866
1485
  }
4867
- return true;
4868
- }
4869
- function isDeepEqual(val1, val2) {
4870
- return innerDeepEqual(val1, val2, kLoose);
4871
- }
4872
- function isDeepStrictEqual(val1, val2) {
4873
- return innerDeepEqual(val1, val2, kStrict);
4874
- }
4875
- comparisons = {
4876
- isDeepEqual,
4877
- isDeepStrictEqual
1486
+ return path2;
4878
1487
  };
4879
- return comparisons;
4880
- }
4881
- var hasRequiredAssert;
4882
- function requireAssert() {
4883
- if (hasRequiredAssert) return assert.exports;
4884
- hasRequiredAssert = 1;
4885
- function _typeof(o) {
4886
- "@babel/helpers - typeof";
4887
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
4888
- return typeof o2;
4889
- } : function(o2) {
4890
- return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
4891
- }, _typeof(o);
4892
- }
4893
- function _createClass(Constructor, protoProps, staticProps) {
4894
- Object.defineProperty(Constructor, "prototype", { writable: false });
4895
- return Constructor;
4896
- }
4897
- function _classCallCheck(instance, Constructor) {
4898
- if (!(instance instanceof Constructor)) {
4899
- throw new TypeError("Cannot call a class as a function");
1488
+ win32.dirname = function(path2) {
1489
+ var result = win32SplitPath(path2), root = result[0], dir = result[1];
1490
+ if (!root && !dir) {
1491
+ return ".";
4900
1492
  }
4901
- }
4902
- var _require = requireErrors(), _require$codes = _require.codes, ERR_AMBIGUOUS_ARGUMENT = _require$codes.ERR_AMBIGUOUS_ARGUMENT, ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_VALUE = _require$codes.ERR_INVALID_ARG_VALUE, ERR_INVALID_RETURN_VALUE = _require$codes.ERR_INVALID_RETURN_VALUE, ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS;
4903
- var AssertionError = requireAssertion_error();
4904
- var _require2 = requireUtil$1(), inspect = _require2.inspect;
4905
- var _require$types = requireUtil$1().types, isPromise = _require$types.isPromise, isRegExp = _require$types.isRegExp;
4906
- var objectAssign = requirePolyfill$2()();
4907
- var objectIs2 = requirePolyfill$1()();
4908
- var RegExpPrototypeTest = requireCallBound()("RegExp.prototype.test");
4909
- var isDeepEqual;
4910
- var isDeepStrictEqual;
4911
- function lazyLoadComparison() {
4912
- var comparison = requireComparisons();
4913
- isDeepEqual = comparison.isDeepEqual;
4914
- isDeepStrictEqual = comparison.isDeepStrictEqual;
4915
- }
4916
- var warned = false;
4917
- var assert$1 = assert.exports = ok;
4918
- var NO_EXCEPTION_SENTINEL = {};
4919
- function innerFail(obj) {
4920
- if (obj.message instanceof Error) throw obj.message;
4921
- throw new AssertionError(obj);
4922
- }
4923
- function fail(actual, expected, message, operator, stackStartFn) {
4924
- var argsLen = arguments.length;
4925
- var internalMessage;
4926
- if (argsLen === 0) {
4927
- internalMessage = "Failed";
4928
- } else if (argsLen === 1) {
4929
- message = actual;
4930
- actual = void 0;
4931
- } else {
4932
- if (warned === false) {
4933
- warned = true;
4934
- var warn = process.emitWarning ? process.emitWarning : console.warn.bind(console);
4935
- warn("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.", "DeprecationWarning", "DEP0094");
4936
- }
4937
- if (argsLen === 2) operator = "!=";
4938
- }
4939
- if (message instanceof Error) throw message;
4940
- var errArgs = {
4941
- actual,
4942
- expected,
4943
- operator: operator === void 0 ? "fail" : operator,
4944
- stackStartFn: stackStartFn || fail
4945
- };
4946
- if (message !== void 0) {
4947
- errArgs.message = message;
1493
+ if (dir) {
1494
+ dir = dir.substr(0, dir.length - 1);
4948
1495
  }
4949
- var err = new AssertionError(errArgs);
4950
- if (internalMessage) {
4951
- err.message = internalMessage;
4952
- err.generatedMessage = true;
1496
+ return root + dir;
1497
+ };
1498
+ win32.basename = function(path2, ext) {
1499
+ var f = win32SplitPath(path2)[2];
1500
+ if (ext && f.substr(-1 * ext.length) === ext) {
1501
+ f = f.substr(0, f.length - ext.length);
4953
1502
  }
4954
- throw err;
4955
- }
4956
- assert$1.fail = fail;
4957
- assert$1.AssertionError = AssertionError;
4958
- function innerOk(fn, argLen, value, message) {
4959
- if (!value) {
4960
- var generatedMessage = false;
4961
- if (argLen === 0) {
4962
- generatedMessage = true;
4963
- message = "No value argument passed to `assert.ok()`";
4964
- } else if (message instanceof Error) {
4965
- throw message;
4966
- }
4967
- var err = new AssertionError({
4968
- actual: value,
4969
- expected: true,
4970
- message,
4971
- operator: "==",
4972
- stackStartFn: fn
4973
- });
4974
- err.generatedMessage = generatedMessage;
4975
- throw err;
1503
+ return f;
1504
+ };
1505
+ win32.extname = function(path2) {
1506
+ return win32SplitPath(path2)[3];
1507
+ };
1508
+ win32.format = function(pathObject) {
1509
+ if (!util2.isObject(pathObject)) {
1510
+ throw new TypeError(
1511
+ "Parameter 'pathObject' must be an object, not " + typeof pathObject
1512
+ );
4976
1513
  }
4977
- }
4978
- function ok() {
4979
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
4980
- args[_key] = arguments[_key];
1514
+ var root = pathObject.root || "";
1515
+ if (!util2.isString(root)) {
1516
+ throw new TypeError(
1517
+ "'pathObject.root' must be a string or undefined, not " + typeof pathObject.root
1518
+ );
4981
1519
  }
4982
- innerOk.apply(void 0, [ok, args.length].concat(args));
4983
- }
4984
- assert$1.ok = ok;
4985
- assert$1.equal = function equal(actual, expected, message) {
4986
- if (arguments.length < 2) {
4987
- throw new ERR_MISSING_ARGS("actual", "expected");
4988
- }
4989
- if (actual != expected) {
4990
- innerFail({
4991
- actual,
4992
- expected,
4993
- message,
4994
- operator: "==",
4995
- stackStartFn: equal
4996
- });
1520
+ var dir = pathObject.dir;
1521
+ var base = pathObject.base || "";
1522
+ if (!dir) {
1523
+ return base;
4997
1524
  }
4998
- };
4999
- assert$1.notEqual = function notEqual(actual, expected, message) {
5000
- if (arguments.length < 2) {
5001
- throw new ERR_MISSING_ARGS("actual", "expected");
5002
- }
5003
- if (actual == expected) {
5004
- innerFail({
5005
- actual,
5006
- expected,
5007
- message,
5008
- operator: "!=",
5009
- stackStartFn: notEqual
5010
- });
1525
+ if (dir[dir.length - 1] === win32.sep) {
1526
+ return dir + base;
5011
1527
  }
1528
+ return dir + win32.sep + base;
5012
1529
  };
5013
- assert$1.deepEqual = function deepEqual(actual, expected, message) {
5014
- if (arguments.length < 2) {
5015
- throw new ERR_MISSING_ARGS("actual", "expected");
5016
- }
5017
- if (isDeepEqual === void 0) lazyLoadComparison();
5018
- if (!isDeepEqual(actual, expected)) {
5019
- innerFail({
5020
- actual,
5021
- expected,
5022
- message,
5023
- operator: "deepEqual",
5024
- stackStartFn: deepEqual
5025
- });
1530
+ win32.parse = function(pathString) {
1531
+ if (!util2.isString(pathString)) {
1532
+ throw new TypeError(
1533
+ "Parameter 'pathString' must be a string, not " + typeof pathString
1534
+ );
5026
1535
  }
5027
- };
5028
- assert$1.notDeepEqual = function notDeepEqual(actual, expected, message) {
5029
- if (arguments.length < 2) {
5030
- throw new ERR_MISSING_ARGS("actual", "expected");
5031
- }
5032
- if (isDeepEqual === void 0) lazyLoadComparison();
5033
- if (isDeepEqual(actual, expected)) {
5034
- innerFail({
5035
- actual,
5036
- expected,
5037
- message,
5038
- operator: "notDeepEqual",
5039
- stackStartFn: notDeepEqual
5040
- });
1536
+ var allParts = win32SplitPath(pathString);
1537
+ if (!allParts || allParts.length !== 4) {
1538
+ throw new TypeError("Invalid path '" + pathString + "'");
5041
1539
  }
1540
+ return {
1541
+ root: allParts[0],
1542
+ dir: allParts[0] + allParts[1].slice(0, -1),
1543
+ base: allParts[2],
1544
+ ext: allParts[3],
1545
+ name: allParts[2].slice(0, allParts[2].length - allParts[3].length)
1546
+ };
5042
1547
  };
5043
- assert$1.deepStrictEqual = function deepStrictEqual(actual, expected, message) {
5044
- if (arguments.length < 2) {
5045
- throw new ERR_MISSING_ARGS("actual", "expected");
5046
- }
5047
- if (isDeepEqual === void 0) lazyLoadComparison();
5048
- if (!isDeepStrictEqual(actual, expected)) {
5049
- innerFail({
5050
- actual,
5051
- expected,
5052
- message,
5053
- operator: "deepStrictEqual",
5054
- stackStartFn: deepStrictEqual
5055
- });
1548
+ win32.sep = "\\";
1549
+ win32.delimiter = ";";
1550
+ var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
1551
+ var posix = {};
1552
+ function posixSplitPath(filename) {
1553
+ return splitPathRe.exec(filename).slice(1);
1554
+ }
1555
+ posix.resolve = function() {
1556
+ var resolvedPath = "", resolvedAbsolute = false;
1557
+ for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
1558
+ var path2 = i >= 0 ? arguments[i] : process.cwd();
1559
+ if (!util2.isString(path2)) {
1560
+ throw new TypeError("Arguments to path.resolve must be strings");
1561
+ } else if (!path2) {
1562
+ continue;
1563
+ }
1564
+ resolvedPath = path2 + "/" + resolvedPath;
1565
+ resolvedAbsolute = path2[0] === "/";
5056
1566
  }
1567
+ resolvedPath = normalizeArray(
1568
+ resolvedPath.split("/"),
1569
+ !resolvedAbsolute
1570
+ ).join("/");
1571
+ return (resolvedAbsolute ? "/" : "") + resolvedPath || ".";
5057
1572
  };
5058
- assert$1.notDeepStrictEqual = notDeepStrictEqual;
5059
- function notDeepStrictEqual(actual, expected, message) {
5060
- if (arguments.length < 2) {
5061
- throw new ERR_MISSING_ARGS("actual", "expected");
5062
- }
5063
- if (isDeepEqual === void 0) lazyLoadComparison();
5064
- if (isDeepStrictEqual(actual, expected)) {
5065
- innerFail({
5066
- actual,
5067
- expected,
5068
- message,
5069
- operator: "notDeepStrictEqual",
5070
- stackStartFn: notDeepStrictEqual
5071
- });
1573
+ posix.normalize = function(path2) {
1574
+ var isAbsolute = posix.isAbsolute(path2), trailingSlash = path2 && path2[path2.length - 1] === "/";
1575
+ path2 = normalizeArray(path2.split("/"), !isAbsolute).join("/");
1576
+ if (!path2 && !isAbsolute) {
1577
+ path2 = ".";
5072
1578
  }
5073
- }
5074
- assert$1.strictEqual = function strictEqual(actual, expected, message) {
5075
- if (arguments.length < 2) {
5076
- throw new ERR_MISSING_ARGS("actual", "expected");
5077
- }
5078
- if (!objectIs2(actual, expected)) {
5079
- innerFail({
5080
- actual,
5081
- expected,
5082
- message,
5083
- operator: "strictEqual",
5084
- stackStartFn: strictEqual
5085
- });
1579
+ if (path2 && trailingSlash) {
1580
+ path2 += "/";
5086
1581
  }
1582
+ return (isAbsolute ? "/" : "") + path2;
5087
1583
  };
5088
- assert$1.notStrictEqual = function notStrictEqual(actual, expected, message) {
5089
- if (arguments.length < 2) {
5090
- throw new ERR_MISSING_ARGS("actual", "expected");
5091
- }
5092
- if (objectIs2(actual, expected)) {
5093
- innerFail({
5094
- actual,
5095
- expected,
5096
- message,
5097
- operator: "notStrictEqual",
5098
- stackStartFn: notStrictEqual
5099
- });
5100
- }
1584
+ posix.isAbsolute = function(path2) {
1585
+ return path2.charAt(0) === "/";
5101
1586
  };
5102
- var Comparison = /* @__PURE__ */ _createClass(function Comparison2(obj, keys, actual) {
5103
- var _this = this;
5104
- _classCallCheck(this, Comparison2);
5105
- keys.forEach(function(key) {
5106
- if (key in obj) {
5107
- if (actual !== void 0 && typeof actual[key] === "string" && isRegExp(obj[key]) && RegExpPrototypeTest(obj[key], actual[key])) {
5108
- _this[key] = actual[key];
1587
+ posix.join = function() {
1588
+ var path2 = "";
1589
+ for (var i = 0; i < arguments.length; i++) {
1590
+ var segment = arguments[i];
1591
+ if (!util2.isString(segment)) {
1592
+ throw new TypeError("Arguments to path.join must be strings");
1593
+ }
1594
+ if (segment) {
1595
+ if (!path2) {
1596
+ path2 += segment;
5109
1597
  } else {
5110
- _this[key] = obj[key];
1598
+ path2 += "/" + segment;
5111
1599
  }
5112
1600
  }
5113
- });
5114
- });
5115
- function compareExceptionKey(actual, expected, key, message, keys, fn) {
5116
- if (!(key in actual) || !isDeepStrictEqual(actual[key], expected[key])) {
5117
- if (!message) {
5118
- var a = new Comparison(actual, keys);
5119
- var b = new Comparison(expected, keys, actual);
5120
- var err = new AssertionError({
5121
- actual: a,
5122
- expected: b,
5123
- operator: "deepStrictEqual",
5124
- stackStartFn: fn
5125
- });
5126
- err.actual = actual;
5127
- err.expected = expected;
5128
- err.operator = fn.name;
5129
- throw err;
5130
- }
5131
- innerFail({
5132
- actual,
5133
- expected,
5134
- message,
5135
- operator: fn.name,
5136
- stackStartFn: fn
5137
- });
5138
1601
  }
5139
- }
5140
- function expectedException(actual, expected, msg, fn) {
5141
- if (typeof expected !== "function") {
5142
- if (isRegExp(expected)) return RegExpPrototypeTest(expected, actual);
5143
- if (arguments.length === 2) {
5144
- throw new ERR_INVALID_ARG_TYPE("expected", ["Function", "RegExp"], expected);
5145
- }
5146
- if (_typeof(actual) !== "object" || actual === null) {
5147
- var err = new AssertionError({
5148
- actual,
5149
- expected,
5150
- message: msg,
5151
- operator: "deepStrictEqual",
5152
- stackStartFn: fn
5153
- });
5154
- err.operator = fn.name;
5155
- throw err;
5156
- }
5157
- var keys = Object.keys(expected);
5158
- if (expected instanceof Error) {
5159
- keys.push("name", "message");
5160
- } else if (keys.length === 0) {
5161
- throw new ERR_INVALID_ARG_VALUE("error", expected, "may not be an empty object");
1602
+ return posix.normalize(path2);
1603
+ };
1604
+ posix.relative = function(from, to) {
1605
+ from = posix.resolve(from).substr(1);
1606
+ to = posix.resolve(to).substr(1);
1607
+ var fromParts = trimArray(from.split("/"));
1608
+ var toParts = trimArray(to.split("/"));
1609
+ var length = Math.min(fromParts.length, toParts.length);
1610
+ var samePartsLength = length;
1611
+ for (var i = 0; i < length; i++) {
1612
+ if (fromParts[i] !== toParts[i]) {
1613
+ samePartsLength = i;
1614
+ break;
5162
1615
  }
5163
- if (isDeepEqual === void 0) lazyLoadComparison();
5164
- keys.forEach(function(key) {
5165
- if (typeof actual[key] === "string" && isRegExp(expected[key]) && RegExpPrototypeTest(expected[key], actual[key])) {
5166
- return;
5167
- }
5168
- compareExceptionKey(actual, expected, key, msg, keys, fn);
5169
- });
5170
- return true;
5171
- }
5172
- if (expected.prototype !== void 0 && actual instanceof expected) {
5173
- return true;
5174
1616
  }
5175
- if (Error.isPrototypeOf(expected)) {
5176
- return false;
5177
- }
5178
- return expected.call({}, actual) === true;
5179
- }
5180
- function getActual(fn) {
5181
- if (typeof fn !== "function") {
5182
- throw new ERR_INVALID_ARG_TYPE("fn", "Function", fn);
5183
- }
5184
- try {
5185
- fn();
5186
- } catch (e) {
5187
- return e;
5188
- }
5189
- return NO_EXCEPTION_SENTINEL;
5190
- }
5191
- function checkIsPromise(obj) {
5192
- return isPromise(obj) || obj !== null && _typeof(obj) === "object" && typeof obj.then === "function" && typeof obj.catch === "function";
5193
- }
5194
- function waitForActual(promiseFn) {
5195
- return Promise.resolve().then(function() {
5196
- var resultPromise;
5197
- if (typeof promiseFn === "function") {
5198
- resultPromise = promiseFn();
5199
- if (!checkIsPromise(resultPromise)) {
5200
- throw new ERR_INVALID_RETURN_VALUE("instance of Promise", "promiseFn", resultPromise);
5201
- }
5202
- } else if (checkIsPromise(promiseFn)) {
5203
- resultPromise = promiseFn;
5204
- } else {
5205
- throw new ERR_INVALID_ARG_TYPE("promiseFn", ["Function", "Promise"], promiseFn);
5206
- }
5207
- return Promise.resolve().then(function() {
5208
- return resultPromise;
5209
- }).then(function() {
5210
- return NO_EXCEPTION_SENTINEL;
5211
- }).catch(function(e) {
5212
- return e;
5213
- });
5214
- });
5215
- }
5216
- function expectsError(stackStartFn, actual, error, message) {
5217
- if (typeof error === "string") {
5218
- if (arguments.length === 4) {
5219
- throw new ERR_INVALID_ARG_TYPE("error", ["Object", "Error", "Function", "RegExp"], error);
5220
- }
5221
- if (_typeof(actual) === "object" && actual !== null) {
5222
- if (actual.message === error) {
5223
- throw new ERR_AMBIGUOUS_ARGUMENT("error/message", 'The error message "'.concat(actual.message, '" is identical to the message.'));
5224
- }
5225
- } else if (actual === error) {
5226
- throw new ERR_AMBIGUOUS_ARGUMENT("error/message", 'The error "'.concat(actual, '" is identical to the message.'));
5227
- }
5228
- message = error;
5229
- error = void 0;
5230
- } else if (error != null && _typeof(error) !== "object" && typeof error !== "function") {
5231
- throw new ERR_INVALID_ARG_TYPE("error", ["Object", "Error", "Function", "RegExp"], error);
5232
- }
5233
- if (actual === NO_EXCEPTION_SENTINEL) {
5234
- var details = "";
5235
- if (error && error.name) {
5236
- details += " (".concat(error.name, ")");
5237
- }
5238
- details += message ? ": ".concat(message) : ".";
5239
- var fnType = stackStartFn.name === "rejects" ? "rejection" : "exception";
5240
- innerFail({
5241
- actual: void 0,
5242
- expected: error,
5243
- operator: stackStartFn.name,
5244
- message: "Missing expected ".concat(fnType).concat(details),
5245
- stackStartFn
5246
- });
5247
- }
5248
- if (error && !expectedException(actual, error, message, stackStartFn)) {
5249
- throw actual;
1617
+ var outputParts = [];
1618
+ for (var i = samePartsLength; i < fromParts.length; i++) {
1619
+ outputParts.push("..");
5250
1620
  }
5251
- }
5252
- function expectsNoError(stackStartFn, actual, error, message) {
5253
- if (actual === NO_EXCEPTION_SENTINEL) return;
5254
- if (typeof error === "string") {
5255
- message = error;
5256
- error = void 0;
5257
- }
5258
- if (!error || expectedException(actual, error)) {
5259
- var details = message ? ": ".concat(message) : ".";
5260
- var fnType = stackStartFn.name === "doesNotReject" ? "rejection" : "exception";
5261
- innerFail({
5262
- actual,
5263
- expected: error,
5264
- operator: stackStartFn.name,
5265
- message: "Got unwanted ".concat(fnType).concat(details, "\n") + 'Actual message: "'.concat(actual && actual.message, '"'),
5266
- stackStartFn
5267
- });
1621
+ outputParts = outputParts.concat(toParts.slice(samePartsLength));
1622
+ return outputParts.join("/");
1623
+ };
1624
+ posix._makeLong = function(path2) {
1625
+ return path2;
1626
+ };
1627
+ posix.dirname = function(path2) {
1628
+ var result = posixSplitPath(path2), root = result[0], dir = result[1];
1629
+ if (!root && !dir) {
1630
+ return ".";
5268
1631
  }
5269
- throw actual;
5270
- }
5271
- assert$1.throws = function throws(promiseFn) {
5272
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
5273
- args[_key2 - 1] = arguments[_key2];
1632
+ if (dir) {
1633
+ dir = dir.substr(0, dir.length - 1);
5274
1634
  }
5275
- expectsError.apply(void 0, [throws, getActual(promiseFn)].concat(args));
1635
+ return root + dir;
5276
1636
  };
5277
- assert$1.rejects = function rejects(promiseFn) {
5278
- for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
5279
- args[_key3 - 1] = arguments[_key3];
1637
+ posix.basename = function(path2, ext) {
1638
+ var f = posixSplitPath(path2)[2];
1639
+ if (ext && f.substr(-1 * ext.length) === ext) {
1640
+ f = f.substr(0, f.length - ext.length);
5280
1641
  }
5281
- return waitForActual(promiseFn).then(function(result) {
5282
- return expectsError.apply(void 0, [rejects, result].concat(args));
5283
- });
1642
+ return f;
5284
1643
  };
5285
- assert$1.doesNotThrow = function doesNotThrow(fn) {
5286
- for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
5287
- args[_key4 - 1] = arguments[_key4];
1644
+ posix.extname = function(path2) {
1645
+ return posixSplitPath(path2)[3];
1646
+ };
1647
+ posix.format = function(pathObject) {
1648
+ if (!util2.isObject(pathObject)) {
1649
+ throw new TypeError(
1650
+ "Parameter 'pathObject' must be an object, not " + typeof pathObject
1651
+ );
5288
1652
  }
5289
- expectsNoError.apply(void 0, [doesNotThrow, getActual(fn)].concat(args));
1653
+ var root = pathObject.root || "";
1654
+ if (!util2.isString(root)) {
1655
+ throw new TypeError(
1656
+ "'pathObject.root' must be a string or undefined, not " + typeof pathObject.root
1657
+ );
1658
+ }
1659
+ var dir = pathObject.dir ? pathObject.dir + posix.sep : "";
1660
+ var base = pathObject.base || "";
1661
+ return dir + base;
5290
1662
  };
5291
- assert$1.doesNotReject = function doesNotReject(fn) {
5292
- for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {
5293
- args[_key5 - 1] = arguments[_key5];
1663
+ posix.parse = function(pathString) {
1664
+ if (!util2.isString(pathString)) {
1665
+ throw new TypeError(
1666
+ "Parameter 'pathString' must be a string, not " + typeof pathString
1667
+ );
5294
1668
  }
5295
- return waitForActual(fn).then(function(result) {
5296
- return expectsNoError.apply(void 0, [doesNotReject, result].concat(args));
5297
- });
1669
+ var allParts = posixSplitPath(pathString);
1670
+ if (!allParts || allParts.length !== 4) {
1671
+ throw new TypeError("Invalid path '" + pathString + "'");
1672
+ }
1673
+ allParts[1] = allParts[1] || "";
1674
+ allParts[2] = allParts[2] || "";
1675
+ allParts[3] = allParts[3] || "";
1676
+ return {
1677
+ root: allParts[0],
1678
+ dir: allParts[0] + allParts[1].slice(0, -1),
1679
+ base: allParts[2],
1680
+ ext: allParts[3],
1681
+ name: allParts[2].slice(0, allParts[2].length - allParts[3].length)
1682
+ };
5298
1683
  };
5299
- assert$1.ifError = function ifError(err) {
5300
- if (err !== null && err !== void 0) {
5301
- var message = "ifError got unwanted exception: ";
5302
- if (_typeof(err) === "object" && typeof err.message === "string") {
5303
- if (err.message.length === 0 && err.constructor) {
5304
- message += err.constructor.name;
5305
- } else {
5306
- message += err.message;
1684
+ posix.sep = "/";
1685
+ posix.delimiter = ":";
1686
+ if (isWindows)
1687
+ path.exports = win32;
1688
+ else
1689
+ path.exports = posix;
1690
+ path.exports.posix = posix;
1691
+ path.exports.win32 = win32;
1692
+ return path.exports;
1693
+ }
1694
+ var atomicSleep = { exports: {} };
1695
+ var hasRequiredAtomicSleep;
1696
+ function requireAtomicSleep() {
1697
+ if (hasRequiredAtomicSleep) return atomicSleep.exports;
1698
+ hasRequiredAtomicSleep = 1;
1699
+ if (typeof SharedArrayBuffer !== "undefined" && typeof Atomics !== "undefined") {
1700
+ let sleep = function(ms) {
1701
+ const valid = ms > 0 && ms < Infinity;
1702
+ if (valid === false) {
1703
+ if (typeof ms !== "number" && typeof ms !== "bigint") {
1704
+ throw TypeError("sleep: ms must be a number");
5307
1705
  }
5308
- } else {
5309
- message += inspect(err);
5310
- }
5311
- var newErr = new AssertionError({
5312
- actual: err,
5313
- expected: null,
5314
- operator: "ifError",
5315
- message,
5316
- stackStartFn: ifError
5317
- });
5318
- var origStack = err.stack;
5319
- if (typeof origStack === "string") {
5320
- var tmp2 = origStack.split("\n");
5321
- tmp2.shift();
5322
- var tmp1 = newErr.stack.split("\n");
5323
- for (var i = 0; i < tmp2.length; i++) {
5324
- var pos = tmp1.indexOf(tmp2[i]);
5325
- if (pos !== -1) {
5326
- tmp1 = tmp1.slice(0, pos);
5327
- break;
5328
- }
1706
+ throw RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");
1707
+ }
1708
+ Atomics.wait(nil, 0, 0, Number(ms));
1709
+ };
1710
+ const nil = new Int32Array(new SharedArrayBuffer(4));
1711
+ atomicSleep.exports = sleep;
1712
+ } else {
1713
+ let sleep = function(ms) {
1714
+ const valid = ms > 0 && ms < Infinity;
1715
+ if (valid === false) {
1716
+ if (typeof ms !== "number" && typeof ms !== "bigint") {
1717
+ throw TypeError("sleep: ms must be a number");
5329
1718
  }
5330
- newErr.stack = "".concat(tmp1.join("\n"), "\n").concat(tmp2.join("\n"));
1719
+ throw RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");
5331
1720
  }
5332
- throw newErr;
5333
- }
5334
- };
5335
- function internalMatch(string, regexp, message, fn, fnName) {
5336
- if (!isRegExp(regexp)) {
5337
- throw new ERR_INVALID_ARG_TYPE("regexp", "RegExp", regexp);
5338
- }
5339
- var match = fnName === "match";
5340
- if (typeof string !== "string" || RegExpPrototypeTest(regexp, string) !== match) {
5341
- if (message instanceof Error) {
5342
- throw message;
5343
- }
5344
- var generatedMessage = !message;
5345
- message = message || (typeof string !== "string" ? 'The "string" argument must be of type string. Received type ' + "".concat(_typeof(string), " (").concat(inspect(string), ")") : (match ? "The input did not match the regular expression " : "The input was expected to not match the regular expression ") + "".concat(inspect(regexp), ". Input:\n\n").concat(inspect(string), "\n"));
5346
- var err = new AssertionError({
5347
- actual: string,
5348
- expected: regexp,
5349
- message,
5350
- operator: fnName,
5351
- stackStartFn: fn
5352
- });
5353
- err.generatedMessage = generatedMessage;
5354
- throw err;
5355
- }
5356
- }
5357
- assert$1.match = function match(string, regexp, message) {
5358
- internalMatch(string, regexp, message, match, "match");
5359
- };
5360
- assert$1.doesNotMatch = function doesNotMatch(string, regexp, message) {
5361
- internalMatch(string, regexp, message, doesNotMatch, "doesNotMatch");
5362
- };
5363
- function strict() {
5364
- for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
5365
- args[_key6] = arguments[_key6];
5366
- }
5367
- innerOk.apply(void 0, [strict, args.length].concat(args));
1721
+ };
1722
+ atomicSleep.exports = sleep;
5368
1723
  }
5369
- assert$1.strict = objectAssign(strict, assert$1, {
5370
- equal: assert$1.strictEqual,
5371
- deepEqual: assert$1.deepStrictEqual,
5372
- notEqual: assert$1.notStrictEqual,
5373
- notDeepEqual: assert$1.notDeepStrictEqual
5374
- });
5375
- assert$1.strict.strict = assert$1.strict;
5376
- return assert.exports;
1724
+ return atomicSleep.exports;
5377
1725
  }
5378
1726
  var sonicBoom;
5379
1727
  var hasRequiredSonicBoom;
@@ -5382,10 +1730,10 @@ function requireSonicBoom() {
5382
1730
  hasRequiredSonicBoom = 1;
5383
1731
  const fs = require$$2;
5384
1732
  const EventEmitter = requireEvents();
5385
- const inherits = requireUtil$1().inherits;
1733
+ const inherits = requireUtil().inherits;
5386
1734
  const path2 = requirePath();
5387
1735
  const sleep = requireAtomicSleep();
5388
- const assert2 = requireAssert();
1736
+ const assert = require$$2;
5389
1737
  const BUSY_WRITE_TIMEOUT = 100;
5390
1738
  const kEmptyBuffer = Buffer.allocUnsafe(0);
5391
1739
  const MAX_WRITE = 16 * 1024;
@@ -5922,7 +2270,7 @@ function requireSonicBoom() {
5922
2270
  sonic.destroyed = true;
5923
2271
  sonic._bufs = [];
5924
2272
  sonic._lens = [];
5925
- assert2(typeof sonic.fd === "number", `sonic.fd must be a number, got ${typeof sonic.fd}`);
2273
+ assert(typeof sonic.fd === "number", `sonic.fd must be a number, got ${typeof sonic.fd}`);
5926
2274
  try {
5927
2275
  fs.fsync(sonic.fd, closeWrapped);
5928
2276
  } catch {
@@ -6000,18 +2348,18 @@ function requireOnExitLeakFree() {
6000
2348
  callRefs("beforeExit");
6001
2349
  }
6002
2350
  function callRefs(event) {
6003
- for (const ref2 of refs[event]) {
6004
- const obj = ref2.deref();
6005
- const fn = ref2.fn;
2351
+ for (const ref of refs[event]) {
2352
+ const obj = ref.deref();
2353
+ const fn = ref.fn;
6006
2354
  if (obj !== void 0) {
6007
2355
  fn(obj, event);
6008
2356
  }
6009
2357
  }
6010
2358
  refs[event] = [];
6011
2359
  }
6012
- function clear(ref2) {
2360
+ function clear(ref) {
6013
2361
  for (const event of ["exit", "beforeExit"]) {
6014
- const index2 = refs[event].indexOf(ref2);
2362
+ const index2 = refs[event].indexOf(ref);
6015
2363
  refs[event].splice(index2, index2 + 1);
6016
2364
  uninstall(event);
6017
2365
  }
@@ -6021,11 +2369,11 @@ function requireOnExitLeakFree() {
6021
2369
  throw new Error("the object can't be undefined");
6022
2370
  }
6023
2371
  install(event);
6024
- const ref2 = new WeakRef(obj);
6025
- ref2.fn = fn;
2372
+ const ref = new WeakRef(obj);
2373
+ ref.fn = fn;
6026
2374
  ensureRegistry();
6027
- registry.register(obj, ref2);
6028
- refs[event].push(ref2);
2375
+ registry.register(obj, ref);
2376
+ refs[event].push(ref);
6029
2377
  }
6030
2378
  function register(obj, fn) {
6031
2379
  _register("exit", obj, fn);
@@ -6039,8 +2387,8 @@ function requireOnExitLeakFree() {
6039
2387
  }
6040
2388
  registry.unregister(obj);
6041
2389
  for (const event of ["exit", "beforeExit"]) {
6042
- refs[event] = refs[event].filter((ref2) => {
6043
- const _obj = ref2.deref();
2390
+ refs[event] = refs[event].filter((ref) => {
2391
+ const _obj = ref.deref();
6044
2392
  return _obj && _obj !== obj;
6045
2393
  });
6046
2394
  uninstall(event);
@@ -6281,8 +2629,8 @@ function requireCjs() {
6281
2629
  }
6282
2630
  var getRegExpFlags = /test/g.flags === "g" ? getRegExpFlagsModern : getRegExpFlagsLegacy;
6283
2631
  function getTagLegacy(value) {
6284
- var type2 = toStringObject.call(value);
6285
- return type2.substring(8, type2.length - 1);
2632
+ var type = toStringObject.call(value);
2633
+ return type.substring(8, type.length - 1);
6286
2634
  }
6287
2635
  function getTagModern(value) {
6288
2636
  return value[Symbol.toStringTag] || getTagLegacy(value);
@@ -7282,16 +3630,16 @@ function requirePrettifyObject() {
7282
3630
  const keysToIgnore = [].concat(skipKeys);
7283
3631
  if (excludeLoggerKeys === true) Array.prototype.push.apply(keysToIgnore, LOGGER_KEYS);
7284
3632
  let result = "";
7285
- const { plain, errors: errors2 } = Object.entries(log).reduce(({ plain: plain2, errors: errors3 }, [k, v]) => {
3633
+ const { plain, errors } = Object.entries(log).reduce(({ plain: plain2, errors: errors2 }, [k, v]) => {
7286
3634
  if (keysToIgnore.includes(k) === false) {
7287
3635
  const pretty = typeof customPrettifiers[k] === "function" ? customPrettifiers[k](v, k, log, { colors: colorizer.colors }) : v;
7288
3636
  if (errorLikeKeys.includes(k)) {
7289
- errors3[k] = pretty;
3637
+ errors2[k] = pretty;
7290
3638
  } else {
7291
3639
  plain2[k] = pretty;
7292
3640
  }
7293
3641
  }
7294
- return { plain: plain2, errors: errors3 };
3642
+ return { plain: plain2, errors: errors2 };
7295
3643
  }, { plain: {}, errors: {} });
7296
3644
  if (singleLine) {
7297
3645
  if (Object.keys(plain).length > 0) {
@@ -7308,7 +3656,7 @@ function requirePrettifyObject() {
7308
3656
  result += `${ident}${keyName}:${joinedLines.startsWith(eol) ? "" : " "}${joinedLines}${eol}`;
7309
3657
  });
7310
3658
  }
7311
- Object.entries(errors2).forEach(([keyName, keyValue]) => {
3659
+ Object.entries(errors).forEach(([keyName, keyValue]) => {
7312
3660
  const lines = typeof customPrettifiers[keyName] === "function" ? keyValue : stringifySafe(keyValue, null, 2);
7313
3661
  if (lines === void 0) return;
7314
3662
  result += prettifyError({ keyName, lines, eol, ident });
@@ -7894,4 +4242,4 @@ const index$1 = /* @__PURE__ */ _mergeNamespaces({
7894
4242
  export {
7895
4243
  index$1 as i
7896
4244
  };
7897
- //# sourceMappingURL=index-DkttuN8l.js.map
4245
+ //# sourceMappingURL=index-B-Oq3Jrm.js.map