appwrite-cli 13.4.0 → 13.6.0

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 (75) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +2 -2
  3. package/cli.ts +4 -2
  4. package/dist/bundle-win-arm64.mjs +1633 -2075
  5. package/dist/cli.cjs +1633 -2075
  6. package/dist/index.cjs +109645 -0
  7. package/dist/index.d.ts +1 -0
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +780 -1831
  10. package/dist/lib/commands/generators/base.d.ts +16 -5
  11. package/dist/lib/commands/generators/base.d.ts.map +1 -1
  12. package/dist/lib/commands/generators/typescript/databases.d.ts.map +1 -1
  13. package/dist/lib/commands/push.d.ts +1 -0
  14. package/dist/lib/commands/push.d.ts.map +1 -1
  15. package/dist/lib/commands/schema.d.ts.map +1 -1
  16. package/dist/lib/commands/services/activities.d.ts +3 -0
  17. package/dist/lib/commands/services/activities.d.ts.map +1 -0
  18. package/dist/lib/commands/services/backups.d.ts +3 -0
  19. package/dist/lib/commands/services/backups.d.ts.map +1 -0
  20. package/dist/lib/commands/utils/attributes.d.ts +3 -1
  21. package/dist/lib/commands/utils/attributes.d.ts.map +1 -1
  22. package/dist/lib/commands/utils/pools.d.ts +3 -1
  23. package/dist/lib/commands/utils/pools.d.ts.map +1 -1
  24. package/dist/lib/constants.d.ts +1 -1
  25. package/dist/lib/json.d.ts.map +1 -1
  26. package/dist/lib/utils.d.ts +1 -0
  27. package/dist/lib/utils.d.ts.map +1 -1
  28. package/docs/examples/account/create-key.md +5 -0
  29. package/docs/examples/account/delete-key.md +4 -0
  30. package/docs/examples/account/get-key.md +4 -0
  31. package/docs/examples/account/list-keys.md +3 -0
  32. package/docs/examples/account/update-key.md +6 -0
  33. package/docs/examples/activities/get-event.md +4 -0
  34. package/docs/examples/activities/list-events.md +3 -0
  35. package/docs/examples/backups/create-archive.md +4 -0
  36. package/docs/examples/backups/create-policy.md +7 -0
  37. package/docs/examples/backups/create-restoration.md +5 -0
  38. package/docs/examples/backups/delete-archive.md +4 -0
  39. package/docs/examples/backups/delete-policy.md +4 -0
  40. package/docs/examples/backups/get-archive.md +4 -0
  41. package/docs/examples/backups/get-policy.md +4 -0
  42. package/docs/examples/backups/get-restoration.md +4 -0
  43. package/docs/examples/backups/list-archives.md +3 -0
  44. package/docs/examples/backups/list-policies.md +3 -0
  45. package/docs/examples/backups/list-restorations.md +3 -0
  46. package/docs/examples/backups/update-policy.md +4 -0
  47. package/docs/examples/projects/create-schedule.md +7 -0
  48. package/docs/examples/projects/get-schedule.md +5 -0
  49. package/docs/examples/projects/list-schedules.md +4 -0
  50. package/index.ts +1 -0
  51. package/install.ps1 +2 -2
  52. package/install.sh +1 -1
  53. package/lib/commands/generators/base.ts +30 -9
  54. package/lib/commands/generators/typescript/databases.ts +12 -18
  55. package/lib/commands/push.ts +276 -201
  56. package/lib/commands/schema.ts +1 -3
  57. package/lib/commands/services/account.ts +234 -0
  58. package/lib/commands/services/activities.ts +51 -0
  59. package/lib/commands/services/backups.ts +184 -0
  60. package/lib/commands/services/health.ts +55 -0
  61. package/lib/commands/services/migrations.ts +1 -1
  62. package/lib/commands/services/projects.ts +51 -0
  63. package/lib/commands/services/storage.ts +2 -2
  64. package/lib/commands/utils/attributes.ts +9 -6
  65. package/lib/commands/utils/pools.ts +9 -6
  66. package/lib/constants.ts +1 -1
  67. package/lib/json.ts +14 -7
  68. package/lib/utils.ts +15 -0
  69. package/package.json +19 -5
  70. package/scoop/appwrite.config.json +3 -3
  71. package/dist/lib/commands/services/console.d.ts +0 -3
  72. package/dist/lib/commands/services/console.d.ts.map +0 -1
  73. package/docs/examples/console/get-resource.md +0 -5
  74. package/docs/examples/console/variables.md +0 -3
  75. package/lib/commands/services/console.ts +0 -49
@@ -21962,9 +21962,9 @@ var require_stream_duplex = __commonJS({
21962
21962
  }
21963
21963
  });
21964
21964
 
21965
- // node_modules/safe-buffer/index.js
21965
+ // node_modules/string_decoder/node_modules/safe-buffer/index.js
21966
21966
  var require_safe_buffer = __commonJS({
21967
- "node_modules/safe-buffer/index.js"(exports, module) {
21967
+ "node_modules/string_decoder/node_modules/safe-buffer/index.js"(exports, module) {
21968
21968
  var buffer = __require("buffer");
21969
21969
  var Buffer2 = buffer.Buffer;
21970
21970
  function copyProps(src, dst) {
@@ -24524,16 +24524,16 @@ var require_base = __commonJS({
24524
24524
  }),
24525
24525
  share()
24526
24526
  );
24527
- const success19 = validation.pipe(
24527
+ const success20 = validation.pipe(
24528
24528
  filter((state) => state.isValid === true),
24529
24529
  take(1)
24530
24530
  );
24531
24531
  const error49 = validation.pipe(
24532
24532
  filter((state) => state.isValid !== true),
24533
- takeUntil(success19)
24533
+ takeUntil(success20)
24534
24534
  );
24535
24535
  return {
24536
- success: success19,
24536
+ success: success20,
24537
24537
  error: error49
24538
24538
  };
24539
24539
  }
@@ -53953,14 +53953,14 @@ var require_undici = __commonJS({
53953
53953
  }
53954
53954
  });
53955
53955
 
53956
- // node_modules/json-bigint/node_modules/bignumber.js/bignumber.js
53956
+ // node_modules/bignumber.js/bignumber.js
53957
53957
  var require_bignumber = __commonJS({
53958
- "node_modules/json-bigint/node_modules/bignumber.js/bignumber.js"(exports, module) {
53958
+ "node_modules/bignumber.js/bignumber.js"(exports, module) {
53959
53959
  (function(globalObject) {
53960
53960
  "use strict";
53961
- var BigNumber2, isNumeric = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, mathceil = Math.ceil, mathfloor = Math.floor, bignumberError = "[BigNumber Error] ", tooManyDigits = bignumberError + "Number primitive has more than 15 significant digits: ", BASE = 1e14, LOG_BASE = 14, MAX_SAFE_INTEGER = 9007199254740991, POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], SQRT_BASE = 1e7, MAX = 1e9;
53961
+ var BigNumber, isNumeric = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, mathceil = Math.ceil, mathfloor = Math.floor, bignumberError = "[BigNumber Error] ", tooManyDigits = bignumberError + "Number primitive has more than 15 significant digits: ", BASE = 1e14, LOG_BASE = 14, MAX_SAFE_INTEGER = 9007199254740991, POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], SQRT_BASE = 1e7, MAX = 1e9;
53962
53962
  function clone2(configObject) {
53963
- var div, convertBase, parseNumeric, P = BigNumber3.prototype = { constructor: BigNumber3, toString: null, valueOf: null }, ONE = new BigNumber3(1), DECIMAL_PLACES = 20, ROUNDING_MODE = 4, TO_EXP_NEG = -7, TO_EXP_POS = 21, MIN_EXP = -1e7, MAX_EXP = 1e7, CRYPTO = false, MODULO_MODE = 1, POW_PRECISION = 0, FORMAT = {
53963
+ var div, convertBase, parseNumeric, P = BigNumber2.prototype = { constructor: BigNumber2, toString: null, valueOf: null }, ONE = new BigNumber2(1), DECIMAL_PLACES = 20, ROUNDING_MODE = 4, TO_EXP_NEG = -7, TO_EXP_POS = 21, MIN_EXP = -1e7, MAX_EXP = 1e7, CRYPTO = false, MODULO_MODE = 1, POW_PRECISION = 0, FORMAT = {
53964
53964
  prefix: "",
53965
53965
  groupSize: 3,
53966
53966
  secondaryGroupSize: 0,
@@ -53971,9 +53971,9 @@ var require_bignumber = __commonJS({
53971
53971
  // non-breaking space
53972
53972
  suffix: ""
53973
53973
  }, ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyz", alphabetHasNormalDecimalDigits = true;
53974
- function BigNumber3(v, b) {
53974
+ function BigNumber2(v, b) {
53975
53975
  var alphabet, c, caseChanged, e, i, isNum, len, str, x = this;
53976
- if (!(x instanceof BigNumber3)) return new BigNumber3(v, b);
53976
+ if (!(x instanceof BigNumber2)) return new BigNumber2(v, b);
53977
53977
  if (b == null) {
53978
53978
  if (v && v._isBigNumber === true) {
53979
53979
  x.s = v.s;
@@ -54015,14 +54015,14 @@ var require_bignumber = __commonJS({
54015
54015
  } else {
54016
54016
  intCheck(b, 2, ALPHABET.length, "Base");
54017
54017
  if (b == 10 && alphabetHasNormalDecimalDigits) {
54018
- x = new BigNumber3(v);
54018
+ x = new BigNumber2(v);
54019
54019
  return round(x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE);
54020
54020
  }
54021
54021
  str = String(v);
54022
54022
  if (isNum = typeof v == "number") {
54023
54023
  if (v * 0 != 0) return parseNumeric(x, str, isNum, b);
54024
54024
  x.s = 1 / v < 0 ? (str = str.slice(1), -1) : 1;
54025
- if (BigNumber3.DEBUG && str.replace(/^0\.0*|\./, "").length > 15) {
54025
+ if (BigNumber2.DEBUG && str.replace(/^0\.0*|\./, "").length > 15) {
54026
54026
  throw Error(tooManyDigits + v);
54027
54027
  }
54028
54028
  } else {
@@ -54057,7 +54057,7 @@ var require_bignumber = __commonJS({
54057
54057
  for (len = str.length; str.charCodeAt(--len) === 48; ) ;
54058
54058
  if (str = str.slice(i, ++len)) {
54059
54059
  len -= i;
54060
- if (isNum && BigNumber3.DEBUG && len > 15 && (v > MAX_SAFE_INTEGER || v !== mathfloor(v))) {
54060
+ if (isNum && BigNumber2.DEBUG && len > 15 && (v > MAX_SAFE_INTEGER || v !== mathfloor(v))) {
54061
54061
  throw Error(tooManyDigits + x.s * v);
54062
54062
  }
54063
54063
  if ((e = e - i - 1) > MAX_EXP) {
@@ -54085,18 +54085,18 @@ var require_bignumber = __commonJS({
54085
54085
  x.c = [x.e = 0];
54086
54086
  }
54087
54087
  }
54088
- BigNumber3.clone = clone2;
54089
- BigNumber3.ROUND_UP = 0;
54090
- BigNumber3.ROUND_DOWN = 1;
54091
- BigNumber3.ROUND_CEIL = 2;
54092
- BigNumber3.ROUND_FLOOR = 3;
54093
- BigNumber3.ROUND_HALF_UP = 4;
54094
- BigNumber3.ROUND_HALF_DOWN = 5;
54095
- BigNumber3.ROUND_HALF_EVEN = 6;
54096
- BigNumber3.ROUND_HALF_CEIL = 7;
54097
- BigNumber3.ROUND_HALF_FLOOR = 8;
54098
- BigNumber3.EUCLID = 9;
54099
- BigNumber3.config = BigNumber3.set = function(obj) {
54088
+ BigNumber2.clone = clone2;
54089
+ BigNumber2.ROUND_UP = 0;
54090
+ BigNumber2.ROUND_DOWN = 1;
54091
+ BigNumber2.ROUND_CEIL = 2;
54092
+ BigNumber2.ROUND_FLOOR = 3;
54093
+ BigNumber2.ROUND_HALF_UP = 4;
54094
+ BigNumber2.ROUND_HALF_DOWN = 5;
54095
+ BigNumber2.ROUND_HALF_EVEN = 6;
54096
+ BigNumber2.ROUND_HALF_CEIL = 7;
54097
+ BigNumber2.ROUND_HALF_FLOOR = 8;
54098
+ BigNumber2.EUCLID = 9;
54099
+ BigNumber2.config = BigNumber2.set = function(obj) {
54100
54100
  var p, v;
54101
54101
  if (obj != null) {
54102
54102
  if (typeof obj == "object") {
@@ -54195,9 +54195,9 @@ var require_bignumber = __commonJS({
54195
54195
  ALPHABET
54196
54196
  };
54197
54197
  };
54198
- BigNumber3.isBigNumber = function(v) {
54198
+ BigNumber2.isBigNumber = function(v) {
54199
54199
  if (!v || v._isBigNumber !== true) return false;
54200
- if (!BigNumber3.DEBUG) return true;
54200
+ if (!BigNumber2.DEBUG) return true;
54201
54201
  var i, n, c = v.c, e = v.e, s = v.s;
54202
54202
  out: if ({}.toString.call(c) == "[object Array]") {
54203
54203
  if ((s === 1 || s === -1) && e >= -MAX && e <= MAX && e === mathfloor(e)) {
@@ -54220,13 +54220,13 @@ var require_bignumber = __commonJS({
54220
54220
  }
54221
54221
  throw Error(bignumberError + "Invalid BigNumber: " + v);
54222
54222
  };
54223
- BigNumber3.maximum = BigNumber3.max = function() {
54223
+ BigNumber2.maximum = BigNumber2.max = function() {
54224
54224
  return maxOrMin(arguments, -1);
54225
54225
  };
54226
- BigNumber3.minimum = BigNumber3.min = function() {
54226
+ BigNumber2.minimum = BigNumber2.min = function() {
54227
54227
  return maxOrMin(arguments, 1);
54228
54228
  };
54229
- BigNumber3.random = (function() {
54229
+ BigNumber2.random = (function() {
54230
54230
  var pow2_53 = 9007199254740992;
54231
54231
  var random53bitInt = Math.random() * pow2_53 & 2097151 ? function() {
54232
54232
  return mathfloor(Math.random() * pow2_53);
@@ -54234,7 +54234,7 @@ var require_bignumber = __commonJS({
54234
54234
  return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
54235
54235
  };
54236
54236
  return function(dp) {
54237
- var a, b, e, k, v, i = 0, c = [], rand = new BigNumber3(ONE);
54237
+ var a, b, e, k, v, i = 0, c = [], rand = new BigNumber2(ONE);
54238
54238
  if (dp == null) dp = DECIMAL_PLACES;
54239
54239
  else intCheck(dp, 0, MAX);
54240
54240
  k = mathceil(dp / LOG_BASE);
@@ -54295,8 +54295,8 @@ var require_bignumber = __commonJS({
54295
54295
  return rand;
54296
54296
  };
54297
54297
  })();
54298
- BigNumber3.sum = function() {
54299
- var i = 1, args = arguments, sum = new BigNumber3(args[0]);
54298
+ BigNumber2.sum = function() {
54299
+ var i = 1, args = arguments, sum = new BigNumber2(args[0]);
54300
54300
  for (; i < args.length; ) sum = sum.plus(args[i++]);
54301
54301
  return sum;
54302
54302
  };
@@ -54323,7 +54323,7 @@ var require_bignumber = __commonJS({
54323
54323
  k = POW_PRECISION;
54324
54324
  POW_PRECISION = 0;
54325
54325
  str = str.replace(".", "");
54326
- y = new BigNumber3(baseIn);
54326
+ y = new BigNumber2(baseIn);
54327
54327
  x = y.pow(str.length - i);
54328
54328
  POW_PRECISION = k;
54329
54329
  y.c = toBaseOut(
@@ -54414,7 +54414,7 @@ var require_bignumber = __commonJS({
54414
54414
  return function(x, y, dp, rm, base) {
54415
54415
  var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0, yL, yz, s = x.s == y.s ? 1 : -1, xc = x.c, yc = y.c;
54416
54416
  if (!xc || !xc[0] || !yc || !yc[0]) {
54417
- return new BigNumber3(
54417
+ return new BigNumber2(
54418
54418
  // Return NaN if either NaN, or both Infinity or 0.
54419
54419
  !x.s || !y.s || (xc ? yc && xc[0] == yc[0] : !yc) ? NaN : (
54420
54420
  // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
@@ -54422,7 +54422,7 @@ var require_bignumber = __commonJS({
54422
54422
  )
54423
54423
  );
54424
54424
  }
54425
- q = new BigNumber3(s);
54425
+ q = new BigNumber2(s);
54426
54426
  qc = q.c = [];
54427
54427
  e = x.e - y.e;
54428
54428
  s = dp + e + 1;
@@ -54527,7 +54527,7 @@ var require_bignumber = __commonJS({
54527
54527
  str = coeffToString(n.c);
54528
54528
  str = id == 1 || id == 2 && (ne <= TO_EXP_NEG || ne >= TO_EXP_POS) ? toExponential(str, ne) : toFixedPoint(str, ne, "0");
54529
54529
  } else {
54530
- n = round(new BigNumber3(n), i, rm);
54530
+ n = round(new BigNumber2(n), i, rm);
54531
54531
  e = n.e;
54532
54532
  str = coeffToString(n.c);
54533
54533
  len = str.length;
@@ -54551,9 +54551,9 @@ var require_bignumber = __commonJS({
54551
54551
  return n.s < 0 && c0 ? "-" + str : str;
54552
54552
  }
54553
54553
  function maxOrMin(args, n) {
54554
- var k, y, i = 1, x = new BigNumber3(args[0]);
54554
+ var k, y, i = 1, x = new BigNumber2(args[0]);
54555
54555
  for (; i < args.length; i++) {
54556
- y = new BigNumber3(args[i]);
54556
+ y = new BigNumber2(args[i]);
54557
54557
  if (!y.s || (k = compare(x, y)) === n || k === 0 && x.s === n) {
54558
54558
  x = y;
54559
54559
  }
@@ -54590,9 +54590,9 @@ var require_bignumber = __commonJS({
54590
54590
  base = b;
54591
54591
  s = s.replace(dotAfter, "$1").replace(dotBefore, "0.$1");
54592
54592
  }
54593
- if (str != s) return new BigNumber3(s, base);
54593
+ if (str != s) return new BigNumber2(s, base);
54594
54594
  }
54595
- if (BigNumber3.DEBUG) {
54595
+ if (BigNumber2.DEBUG) {
54596
54596
  throw Error(bignumberError + "Not a" + (b ? " base " + b : "") + " number: " + str);
54597
54597
  }
54598
54598
  x.s = null;
@@ -54694,12 +54694,12 @@ var require_bignumber = __commonJS({
54694
54694
  return n.s < 0 ? "-" + str : str;
54695
54695
  }
54696
54696
  P.absoluteValue = P.abs = function() {
54697
- var x = new BigNumber3(this);
54697
+ var x = new BigNumber2(this);
54698
54698
  if (x.s < 0) x.s = 1;
54699
54699
  return x;
54700
54700
  };
54701
54701
  P.comparedTo = function(y, b) {
54702
- return compare(this, new BigNumber3(y, b));
54702
+ return compare(this, new BigNumber2(y, b));
54703
54703
  };
54704
54704
  P.decimalPlaces = P.dp = function(dp, rm) {
54705
54705
  var c, n, v, x = this;
@@ -54707,7 +54707,7 @@ var require_bignumber = __commonJS({
54707
54707
  intCheck(dp, 0, MAX);
54708
54708
  if (rm == null) rm = ROUNDING_MODE;
54709
54709
  else intCheck(rm, 0, 8);
54710
- return round(new BigNumber3(x), dp + x.e + 1, rm);
54710
+ return round(new BigNumber2(x), dp + x.e + 1, rm);
54711
54711
  }
54712
54712
  if (!(c = x.c)) return null;
54713
54713
  n = ((v = c.length - 1) - bitFloor(this.e / LOG_BASE)) * LOG_BASE;
@@ -54716,44 +54716,44 @@ var require_bignumber = __commonJS({
54716
54716
  return n;
54717
54717
  };
54718
54718
  P.dividedBy = P.div = function(y, b) {
54719
- return div(this, new BigNumber3(y, b), DECIMAL_PLACES, ROUNDING_MODE);
54719
+ return div(this, new BigNumber2(y, b), DECIMAL_PLACES, ROUNDING_MODE);
54720
54720
  };
54721
54721
  P.dividedToIntegerBy = P.idiv = function(y, b) {
54722
- return div(this, new BigNumber3(y, b), 0, 1);
54722
+ return div(this, new BigNumber2(y, b), 0, 1);
54723
54723
  };
54724
54724
  P.exponentiatedBy = P.pow = function(n, m) {
54725
54725
  var half, isModExp, i, k, more, nIsBig, nIsNeg, nIsOdd, y, x = this;
54726
- n = new BigNumber3(n);
54726
+ n = new BigNumber2(n);
54727
54727
  if (n.c && !n.isInteger()) {
54728
54728
  throw Error(bignumberError + "Exponent not an integer: " + valueOf(n));
54729
54729
  }
54730
- if (m != null) m = new BigNumber3(m);
54730
+ if (m != null) m = new BigNumber2(m);
54731
54731
  nIsBig = n.e > 14;
54732
54732
  if (!x.c || !x.c[0] || x.c[0] == 1 && !x.e && x.c.length == 1 || !n.c || !n.c[0]) {
54733
- y = new BigNumber3(Math.pow(+valueOf(x), nIsBig ? n.s * (2 - isOdd(n)) : +valueOf(n)));
54733
+ y = new BigNumber2(Math.pow(+valueOf(x), nIsBig ? n.s * (2 - isOdd(n)) : +valueOf(n)));
54734
54734
  return m ? y.mod(m) : y;
54735
54735
  }
54736
54736
  nIsNeg = n.s < 0;
54737
54737
  if (m) {
54738
- if (m.c ? !m.c[0] : !m.s) return new BigNumber3(NaN);
54738
+ if (m.c ? !m.c[0] : !m.s) return new BigNumber2(NaN);
54739
54739
  isModExp = !nIsNeg && x.isInteger() && m.isInteger();
54740
54740
  if (isModExp) x = x.mod(m);
54741
54741
  } else if (n.e > 9 && (x.e > 0 || x.e < -1 || (x.e == 0 ? x.c[0] > 1 || nIsBig && x.c[1] >= 24e7 : x.c[0] < 8e13 || nIsBig && x.c[0] <= 9999975e7))) {
54742
54742
  k = x.s < 0 && isOdd(n) ? -0 : 0;
54743
54743
  if (x.e > -1) k = 1 / k;
54744
- return new BigNumber3(nIsNeg ? 1 / k : k);
54744
+ return new BigNumber2(nIsNeg ? 1 / k : k);
54745
54745
  } else if (POW_PRECISION) {
54746
54746
  k = mathceil(POW_PRECISION / LOG_BASE + 2);
54747
54747
  }
54748
54748
  if (nIsBig) {
54749
- half = new BigNumber3(0.5);
54749
+ half = new BigNumber2(0.5);
54750
54750
  if (nIsNeg) n.s = 1;
54751
54751
  nIsOdd = isOdd(n);
54752
54752
  } else {
54753
54753
  i = Math.abs(+valueOf(n));
54754
54754
  nIsOdd = i % 2;
54755
54755
  }
54756
- y = new BigNumber3(ONE);
54756
+ y = new BigNumber2(ONE);
54757
54757
  for (; ; ) {
54758
54758
  if (nIsOdd) {
54759
54759
  y = y.times(x);
@@ -54791,31 +54791,31 @@ var require_bignumber = __commonJS({
54791
54791
  return m ? y.mod(m) : k ? round(y, POW_PRECISION, ROUNDING_MODE, more) : y;
54792
54792
  };
54793
54793
  P.integerValue = function(rm) {
54794
- var n = new BigNumber3(this);
54794
+ var n = new BigNumber2(this);
54795
54795
  if (rm == null) rm = ROUNDING_MODE;
54796
54796
  else intCheck(rm, 0, 8);
54797
54797
  return round(n, n.e + 1, rm);
54798
54798
  };
54799
54799
  P.isEqualTo = P.eq = function(y, b) {
54800
- return compare(this, new BigNumber3(y, b)) === 0;
54800
+ return compare(this, new BigNumber2(y, b)) === 0;
54801
54801
  };
54802
54802
  P.isFinite = function() {
54803
54803
  return !!this.c;
54804
54804
  };
54805
54805
  P.isGreaterThan = P.gt = function(y, b) {
54806
- return compare(this, new BigNumber3(y, b)) > 0;
54806
+ return compare(this, new BigNumber2(y, b)) > 0;
54807
54807
  };
54808
54808
  P.isGreaterThanOrEqualTo = P.gte = function(y, b) {
54809
- return (b = compare(this, new BigNumber3(y, b))) === 1 || b === 0;
54809
+ return (b = compare(this, new BigNumber2(y, b))) === 1 || b === 0;
54810
54810
  };
54811
54811
  P.isInteger = function() {
54812
54812
  return !!this.c && bitFloor(this.e / LOG_BASE) > this.c.length - 2;
54813
54813
  };
54814
54814
  P.isLessThan = P.lt = function(y, b) {
54815
- return compare(this, new BigNumber3(y, b)) < 0;
54815
+ return compare(this, new BigNumber2(y, b)) < 0;
54816
54816
  };
54817
54817
  P.isLessThanOrEqualTo = P.lte = function(y, b) {
54818
- return (b = compare(this, new BigNumber3(y, b))) === -1 || b === 0;
54818
+ return (b = compare(this, new BigNumber2(y, b))) === -1 || b === 0;
54819
54819
  };
54820
54820
  P.isNaN = function() {
54821
54821
  return !this.s;
@@ -54831,18 +54831,18 @@ var require_bignumber = __commonJS({
54831
54831
  };
54832
54832
  P.minus = function(y, b) {
54833
54833
  var i, j, t, xLTy, x = this, a = x.s;
54834
- y = new BigNumber3(y, b);
54834
+ y = new BigNumber2(y, b);
54835
54835
  b = y.s;
54836
- if (!a || !b) return new BigNumber3(NaN);
54836
+ if (!a || !b) return new BigNumber2(NaN);
54837
54837
  if (a != b) {
54838
54838
  y.s = -b;
54839
54839
  return x.plus(y);
54840
54840
  }
54841
54841
  var xe = x.e / LOG_BASE, ye = y.e / LOG_BASE, xc = x.c, yc = y.c;
54842
54842
  if (!xe || !ye) {
54843
- if (!xc || !yc) return xc ? (y.s = -b, y) : new BigNumber3(yc ? x : NaN);
54843
+ if (!xc || !yc) return xc ? (y.s = -b, y) : new BigNumber2(yc ? x : NaN);
54844
54844
  if (!xc[0] || !yc[0]) {
54845
- return yc[0] ? (y.s = -b, y) : new BigNumber3(xc[0] ? x : (
54845
+ return yc[0] ? (y.s = -b, y) : new BigNumber2(xc[0] ? x : (
54846
54846
  // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity
54847
54847
  ROUNDING_MODE == 3 ? -0 : 0
54848
54848
  ));
@@ -54898,11 +54898,11 @@ var require_bignumber = __commonJS({
54898
54898
  };
54899
54899
  P.modulo = P.mod = function(y, b) {
54900
54900
  var q, s, x = this;
54901
- y = new BigNumber3(y, b);
54901
+ y = new BigNumber2(y, b);
54902
54902
  if (!x.c || !y.s || y.c && !y.c[0]) {
54903
- return new BigNumber3(NaN);
54903
+ return new BigNumber2(NaN);
54904
54904
  } else if (!y.c || x.c && !x.c[0]) {
54905
- return new BigNumber3(x);
54905
+ return new BigNumber2(x);
54906
54906
  }
54907
54907
  if (MODULO_MODE == 9) {
54908
54908
  s = y.s;
@@ -54918,7 +54918,7 @@ var require_bignumber = __commonJS({
54918
54918
  return y;
54919
54919
  };
54920
54920
  P.multipliedBy = P.times = function(y, b) {
54921
- var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc, base, sqrtBase, x = this, xc = x.c, yc = (y = new BigNumber3(y, b)).c;
54921
+ var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc, base, sqrtBase, x = this, xc = x.c, yc = (y = new BigNumber2(y, b)).c;
54922
54922
  if (!xc || !yc || !xc[0] || !yc[0]) {
54923
54923
  if (!x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc) {
54924
54924
  y.c = y.e = y.s = null;
@@ -54970,23 +54970,23 @@ var require_bignumber = __commonJS({
54970
54970
  return normalise(y, zc, e);
54971
54971
  };
54972
54972
  P.negated = function() {
54973
- var x = new BigNumber3(this);
54973
+ var x = new BigNumber2(this);
54974
54974
  x.s = -x.s || null;
54975
54975
  return x;
54976
54976
  };
54977
54977
  P.plus = function(y, b) {
54978
54978
  var t, x = this, a = x.s;
54979
- y = new BigNumber3(y, b);
54979
+ y = new BigNumber2(y, b);
54980
54980
  b = y.s;
54981
- if (!a || !b) return new BigNumber3(NaN);
54981
+ if (!a || !b) return new BigNumber2(NaN);
54982
54982
  if (a != b) {
54983
54983
  y.s = -b;
54984
54984
  return x.minus(y);
54985
54985
  }
54986
54986
  var xe = x.e / LOG_BASE, ye = y.e / LOG_BASE, xc = x.c, yc = y.c;
54987
54987
  if (!xe || !ye) {
54988
- if (!xc || !yc) return new BigNumber3(a / 0);
54989
- if (!xc[0] || !yc[0]) return yc[0] ? y : new BigNumber3(xc[0] ? x : a * 0);
54988
+ if (!xc || !yc) return new BigNumber2(a / 0);
54989
+ if (!xc[0] || !yc[0]) return yc[0] ? y : new BigNumber2(xc[0] ? x : a * 0);
54990
54990
  }
54991
54991
  xe = bitFloor(xe);
54992
54992
  ye = bitFloor(ye);
@@ -55027,7 +55027,7 @@ var require_bignumber = __commonJS({
55027
55027
  intCheck(sd, 1, MAX);
55028
55028
  if (rm == null) rm = ROUNDING_MODE;
55029
55029
  else intCheck(rm, 0, 8);
55030
- return round(new BigNumber3(x), sd, rm);
55030
+ return round(new BigNumber2(x), sd, rm);
55031
55031
  }
55032
55032
  if (!(c = x.c)) return null;
55033
55033
  v = c.length - 1;
@@ -55044,9 +55044,9 @@ var require_bignumber = __commonJS({
55044
55044
  return this.times("1e" + k);
55045
55045
  };
55046
55046
  P.squareRoot = P.sqrt = function() {
55047
- var m, n, r, rep, t, x = this, c = x.c, s = x.s, e = x.e, dp = DECIMAL_PLACES + 4, half = new BigNumber3("0.5");
55047
+ var m, n, r, rep, t, x = this, c = x.c, s = x.s, e = x.e, dp = DECIMAL_PLACES + 4, half = new BigNumber2("0.5");
55048
55048
  if (s !== 1 || !c || !c[0]) {
55049
- return new BigNumber3(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0);
55049
+ return new BigNumber2(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0);
55050
55050
  }
55051
55051
  s = Math.sqrt(+valueOf(x));
55052
55052
  if (s == 0 || s == 1 / 0) {
@@ -55060,9 +55060,9 @@ var require_bignumber = __commonJS({
55060
55060
  n = s.toExponential();
55061
55061
  n = n.slice(0, n.indexOf("e") + 1) + e;
55062
55062
  }
55063
- r = new BigNumber3(n);
55063
+ r = new BigNumber2(n);
55064
55064
  } else {
55065
- r = new BigNumber3(s + "");
55065
+ r = new BigNumber2(s + "");
55066
55066
  }
55067
55067
  if (r.c[0]) {
55068
55068
  e = r.e;
@@ -55152,22 +55152,22 @@ var require_bignumber = __commonJS({
55152
55152
  P.toFraction = function(md) {
55153
55153
  var d, d0, d1, d2, e, exp, n, n0, n1, q, r, s, x = this, xc = x.c;
55154
55154
  if (md != null) {
55155
- n = new BigNumber3(md);
55155
+ n = new BigNumber2(md);
55156
55156
  if (!n.isInteger() && (n.c || n.s !== 1) || n.lt(ONE)) {
55157
55157
  throw Error(bignumberError + "Argument " + (n.isInteger() ? "out of range: " : "not an integer: ") + valueOf(n));
55158
55158
  }
55159
55159
  }
55160
- if (!xc) return new BigNumber3(x);
55161
- d = new BigNumber3(ONE);
55162
- n1 = d0 = new BigNumber3(ONE);
55163
- d1 = n0 = new BigNumber3(ONE);
55160
+ if (!xc) return new BigNumber2(x);
55161
+ d = new BigNumber2(ONE);
55162
+ n1 = d0 = new BigNumber2(ONE);
55163
+ d1 = n0 = new BigNumber2(ONE);
55164
55164
  s = coeffToString(xc);
55165
55165
  e = d.e = s.length - x.e - 1;
55166
55166
  d.c[0] = POWS_TEN[(exp = e % LOG_BASE) < 0 ? LOG_BASE + exp : exp];
55167
55167
  md = !md || n.comparedTo(d) > 0 ? e > 0 ? d : n1 : n;
55168
55168
  exp = MAX_EXP;
55169
55169
  MAX_EXP = 1 / 0;
55170
- n = new BigNumber3(s);
55170
+ n = new BigNumber2(s);
55171
55171
  n0.c[0] = 0;
55172
55172
  for (; ; ) {
55173
55173
  q = div(n, d, 0, 1);
@@ -55211,1747 +55211,7 @@ var require_bignumber = __commonJS({
55211
55211
  if (b == null) {
55212
55212
  str = e <= TO_EXP_NEG || e >= TO_EXP_POS ? toExponential(coeffToString(n.c), e) : toFixedPoint(coeffToString(n.c), e, "0");
55213
55213
  } else if (b === 10 && alphabetHasNormalDecimalDigits) {
55214
- n = round(new BigNumber3(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE);
55215
- str = toFixedPoint(coeffToString(n.c), n.e, "0");
55216
- } else {
55217
- intCheck(b, 2, ALPHABET.length, "Base");
55218
- str = convertBase(toFixedPoint(coeffToString(n.c), e, "0"), 10, b, s, true);
55219
- }
55220
- if (s < 0 && n.c[0]) str = "-" + str;
55221
- }
55222
- return str;
55223
- };
55224
- P.valueOf = P.toJSON = function() {
55225
- return valueOf(this);
55226
- };
55227
- P._isBigNumber = true;
55228
- if (configObject != null) BigNumber3.set(configObject);
55229
- return BigNumber3;
55230
- }
55231
- function bitFloor(n) {
55232
- var i = n | 0;
55233
- return n > 0 || n === i ? i : i - 1;
55234
- }
55235
- function coeffToString(a) {
55236
- var s, z3, i = 1, j = a.length, r = a[0] + "";
55237
- for (; i < j; ) {
55238
- s = a[i++] + "";
55239
- z3 = LOG_BASE - s.length;
55240
- for (; z3--; s = "0" + s) ;
55241
- r += s;
55242
- }
55243
- for (j = r.length; r.charCodeAt(--j) === 48; ) ;
55244
- return r.slice(0, j + 1 || 1);
55245
- }
55246
- function compare(x, y) {
55247
- var a, b, xc = x.c, yc = y.c, i = x.s, j = y.s, k = x.e, l = y.e;
55248
- if (!i || !j) return null;
55249
- a = xc && !xc[0];
55250
- b = yc && !yc[0];
55251
- if (a || b) return a ? b ? 0 : -j : i;
55252
- if (i != j) return i;
55253
- a = i < 0;
55254
- b = k == l;
55255
- if (!xc || !yc) return b ? 0 : !xc ^ a ? 1 : -1;
55256
- if (!b) return k > l ^ a ? 1 : -1;
55257
- j = (k = xc.length) < (l = yc.length) ? k : l;
55258
- for (i = 0; i < j; i++) if (xc[i] != yc[i]) return xc[i] > yc[i] ^ a ? 1 : -1;
55259
- return k == l ? 0 : k > l ^ a ? 1 : -1;
55260
- }
55261
- function intCheck(n, min, max, name) {
55262
- if (n < min || n > max || n !== mathfloor(n)) {
55263
- throw Error(bignumberError + (name || "Argument") + (typeof n == "number" ? n < min || n > max ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(n));
55264
- }
55265
- }
55266
- function isOdd(n) {
55267
- var k = n.c.length - 1;
55268
- return bitFloor(n.e / LOG_BASE) == k && n.c[k] % 2 != 0;
55269
- }
55270
- function toExponential(str, e) {
55271
- return (str.length > 1 ? str.charAt(0) + "." + str.slice(1) : str) + (e < 0 ? "e" : "e+") + e;
55272
- }
55273
- function toFixedPoint(str, e, z3) {
55274
- var len, zs;
55275
- if (e < 0) {
55276
- for (zs = z3 + "."; ++e; zs += z3) ;
55277
- str = zs + str;
55278
- } else {
55279
- len = str.length;
55280
- if (++e > len) {
55281
- for (zs = z3, e -= len; --e; zs += z3) ;
55282
- str += zs;
55283
- } else if (e < len) {
55284
- str = str.slice(0, e) + "." + str.slice(e);
55285
- }
55286
- }
55287
- return str;
55288
- }
55289
- BigNumber2 = clone2();
55290
- BigNumber2["default"] = BigNumber2.BigNumber = BigNumber2;
55291
- if (typeof define == "function" && define.amd) {
55292
- define(function() {
55293
- return BigNumber2;
55294
- });
55295
- } else if (typeof module != "undefined" && module.exports) {
55296
- module.exports = BigNumber2;
55297
- } else {
55298
- if (!globalObject) {
55299
- globalObject = typeof self != "undefined" && self ? self : window;
55300
- }
55301
- globalObject.BigNumber = BigNumber2;
55302
- }
55303
- })(exports);
55304
- }
55305
- });
55306
-
55307
- // node_modules/json-bigint/lib/stringify.js
55308
- var require_stringify = __commonJS({
55309
- "node_modules/json-bigint/lib/stringify.js"(exports, module) {
55310
- var BigNumber2 = require_bignumber();
55311
- var JSON2 = module.exports;
55312
- (function() {
55313
- "use strict";
55314
- function f(n) {
55315
- return n < 10 ? "0" + n : n;
55316
- }
55317
- var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, gap, indent, meta3 = {
55318
- // table of character substitutions
55319
- "\b": "\\b",
55320
- " ": "\\t",
55321
- "\n": "\\n",
55322
- "\f": "\\f",
55323
- "\r": "\\r",
55324
- '"': '\\"',
55325
- "\\": "\\\\"
55326
- }, rep;
55327
- function quote(string4) {
55328
- escapable.lastIndex = 0;
55329
- return escapable.test(string4) ? '"' + string4.replace(escapable, function(a) {
55330
- var c = meta3[a];
55331
- return typeof c === "string" ? c : "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4);
55332
- }) + '"' : '"' + string4 + '"';
55333
- }
55334
- function str(key, holder) {
55335
- var i, k, v, length, mind = gap, partial2, value = holder[key], isBigNumber2 = value != null && (value instanceof BigNumber2 || BigNumber2.isBigNumber(value));
55336
- if (value && typeof value === "object" && typeof value.toJSON === "function") {
55337
- value = value.toJSON(key);
55338
- }
55339
- if (typeof rep === "function") {
55340
- value = rep.call(holder, key, value);
55341
- }
55342
- switch (typeof value) {
55343
- case "string":
55344
- if (isBigNumber2) {
55345
- return value;
55346
- } else {
55347
- return quote(value);
55348
- }
55349
- case "number":
55350
- return isFinite(value) ? String(value) : "null";
55351
- case "boolean":
55352
- case "null":
55353
- case "bigint":
55354
- return String(value);
55355
- // If the type is 'object', we might be dealing with an object or an array or
55356
- // null.
55357
- case "object":
55358
- if (!value) {
55359
- return "null";
55360
- }
55361
- gap += indent;
55362
- partial2 = [];
55363
- if (Object.prototype.toString.apply(value) === "[object Array]") {
55364
- length = value.length;
55365
- for (i = 0; i < length; i += 1) {
55366
- partial2[i] = str(i, value) || "null";
55367
- }
55368
- v = partial2.length === 0 ? "[]" : gap ? "[\n" + gap + partial2.join(",\n" + gap) + "\n" + mind + "]" : "[" + partial2.join(",") + "]";
55369
- gap = mind;
55370
- return v;
55371
- }
55372
- if (rep && typeof rep === "object") {
55373
- length = rep.length;
55374
- for (i = 0; i < length; i += 1) {
55375
- if (typeof rep[i] === "string") {
55376
- k = rep[i];
55377
- v = str(k, value);
55378
- if (v) {
55379
- partial2.push(quote(k) + (gap ? ": " : ":") + v);
55380
- }
55381
- }
55382
- }
55383
- } else {
55384
- Object.keys(value).forEach(function(k2) {
55385
- var v2 = str(k2, value);
55386
- if (v2) {
55387
- partial2.push(quote(k2) + (gap ? ": " : ":") + v2);
55388
- }
55389
- });
55390
- }
55391
- v = partial2.length === 0 ? "{}" : gap ? "{\n" + gap + partial2.join(",\n" + gap) + "\n" + mind + "}" : "{" + partial2.join(",") + "}";
55392
- gap = mind;
55393
- return v;
55394
- }
55395
- }
55396
- if (typeof JSON2.stringify !== "function") {
55397
- JSON2.stringify = function(value, replacer, space) {
55398
- var i;
55399
- gap = "";
55400
- indent = "";
55401
- if (typeof space === "number") {
55402
- for (i = 0; i < space; i += 1) {
55403
- indent += " ";
55404
- }
55405
- } else if (typeof space === "string") {
55406
- indent = space;
55407
- }
55408
- rep = replacer;
55409
- if (replacer && typeof replacer !== "function" && (typeof replacer !== "object" || typeof replacer.length !== "number")) {
55410
- throw new Error("JSON.stringify");
55411
- }
55412
- return str("", { "": value });
55413
- };
55414
- }
55415
- })();
55416
- }
55417
- });
55418
-
55419
- // node_modules/json-bigint/lib/parse.js
55420
- var require_parse2 = __commonJS({
55421
- "node_modules/json-bigint/lib/parse.js"(exports, module) {
55422
- var BigNumber2 = null;
55423
- var suspectProtoRx = /(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/;
55424
- var suspectConstructorRx = /(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;
55425
- var json_parse = function(options) {
55426
- "use strict";
55427
- var _options = {
55428
- strict: false,
55429
- // not being strict means do not generate syntax errors for "duplicate key"
55430
- storeAsString: false,
55431
- // toggles whether the values should be stored as BigNumber (default) or a string
55432
- alwaysParseAsBig: false,
55433
- // toggles whether all numbers should be Big
55434
- useNativeBigInt: false,
55435
- // toggles whether to use native BigInt instead of bignumber.js
55436
- protoAction: "error",
55437
- constructorAction: "error"
55438
- };
55439
- if (options !== void 0 && options !== null) {
55440
- if (options.strict === true) {
55441
- _options.strict = true;
55442
- }
55443
- if (options.storeAsString === true) {
55444
- _options.storeAsString = true;
55445
- }
55446
- _options.alwaysParseAsBig = options.alwaysParseAsBig === true ? options.alwaysParseAsBig : false;
55447
- _options.useNativeBigInt = options.useNativeBigInt === true ? options.useNativeBigInt : false;
55448
- if (typeof options.constructorAction !== "undefined") {
55449
- if (options.constructorAction === "error" || options.constructorAction === "ignore" || options.constructorAction === "preserve") {
55450
- _options.constructorAction = options.constructorAction;
55451
- } else {
55452
- throw new Error(
55453
- `Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${options.constructorAction}`
55454
- );
55455
- }
55456
- }
55457
- if (typeof options.protoAction !== "undefined") {
55458
- if (options.protoAction === "error" || options.protoAction === "ignore" || options.protoAction === "preserve") {
55459
- _options.protoAction = options.protoAction;
55460
- } else {
55461
- throw new Error(
55462
- `Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${options.protoAction}`
55463
- );
55464
- }
55465
- }
55466
- }
55467
- var at, ch, escapee = {
55468
- '"': '"',
55469
- "\\": "\\",
55470
- "/": "/",
55471
- b: "\b",
55472
- f: "\f",
55473
- n: "\n",
55474
- r: "\r",
55475
- t: " "
55476
- }, text, error49 = function(m) {
55477
- throw {
55478
- name: "SyntaxError",
55479
- message: m,
55480
- at,
55481
- text
55482
- };
55483
- }, next = function(c) {
55484
- if (c && c !== ch) {
55485
- error49("Expected '" + c + "' instead of '" + ch + "'");
55486
- }
55487
- ch = text.charAt(at);
55488
- at += 1;
55489
- return ch;
55490
- }, number4 = function() {
55491
- var number5, string5 = "";
55492
- if (ch === "-") {
55493
- string5 = "-";
55494
- next("-");
55495
- }
55496
- while (ch >= "0" && ch <= "9") {
55497
- string5 += ch;
55498
- next();
55499
- }
55500
- if (ch === ".") {
55501
- string5 += ".";
55502
- while (next() && ch >= "0" && ch <= "9") {
55503
- string5 += ch;
55504
- }
55505
- }
55506
- if (ch === "e" || ch === "E") {
55507
- string5 += ch;
55508
- next();
55509
- if (ch === "-" || ch === "+") {
55510
- string5 += ch;
55511
- next();
55512
- }
55513
- while (ch >= "0" && ch <= "9") {
55514
- string5 += ch;
55515
- next();
55516
- }
55517
- }
55518
- number5 = +string5;
55519
- if (!isFinite(number5)) {
55520
- error49("Bad number");
55521
- } else {
55522
- if (BigNumber2 == null) BigNumber2 = require_bignumber();
55523
- if (string5.length > 15)
55524
- return _options.storeAsString ? string5 : _options.useNativeBigInt ? BigInt(string5) : new BigNumber2(string5);
55525
- else
55526
- return !_options.alwaysParseAsBig ? number5 : _options.useNativeBigInt ? BigInt(number5) : new BigNumber2(number5);
55527
- }
55528
- }, string4 = function() {
55529
- var hex3, i, string5 = "", uffff;
55530
- if (ch === '"') {
55531
- var startAt = at;
55532
- while (next()) {
55533
- if (ch === '"') {
55534
- if (at - 1 > startAt) string5 += text.substring(startAt, at - 1);
55535
- next();
55536
- return string5;
55537
- }
55538
- if (ch === "\\") {
55539
- if (at - 1 > startAt) string5 += text.substring(startAt, at - 1);
55540
- next();
55541
- if (ch === "u") {
55542
- uffff = 0;
55543
- for (i = 0; i < 4; i += 1) {
55544
- hex3 = parseInt(next(), 16);
55545
- if (!isFinite(hex3)) {
55546
- break;
55547
- }
55548
- uffff = uffff * 16 + hex3;
55549
- }
55550
- string5 += String.fromCharCode(uffff);
55551
- } else if (typeof escapee[ch] === "string") {
55552
- string5 += escapee[ch];
55553
- } else {
55554
- break;
55555
- }
55556
- startAt = at;
55557
- }
55558
- }
55559
- }
55560
- error49("Bad string");
55561
- }, white = function() {
55562
- while (ch && ch <= " ") {
55563
- next();
55564
- }
55565
- }, word = function() {
55566
- switch (ch) {
55567
- case "t":
55568
- next("t");
55569
- next("r");
55570
- next("u");
55571
- next("e");
55572
- return true;
55573
- case "f":
55574
- next("f");
55575
- next("a");
55576
- next("l");
55577
- next("s");
55578
- next("e");
55579
- return false;
55580
- case "n":
55581
- next("n");
55582
- next("u");
55583
- next("l");
55584
- next("l");
55585
- return null;
55586
- }
55587
- error49("Unexpected '" + ch + "'");
55588
- }, value, array2 = function() {
55589
- var array3 = [];
55590
- if (ch === "[") {
55591
- next("[");
55592
- white();
55593
- if (ch === "]") {
55594
- next("]");
55595
- return array3;
55596
- }
55597
- while (ch) {
55598
- array3.push(value());
55599
- white();
55600
- if (ch === "]") {
55601
- next("]");
55602
- return array3;
55603
- }
55604
- next(",");
55605
- white();
55606
- }
55607
- }
55608
- error49("Bad array");
55609
- }, object2 = function() {
55610
- var key, object3 = /* @__PURE__ */ Object.create(null);
55611
- if (ch === "{") {
55612
- next("{");
55613
- white();
55614
- if (ch === "}") {
55615
- next("}");
55616
- return object3;
55617
- }
55618
- while (ch) {
55619
- key = string4();
55620
- white();
55621
- next(":");
55622
- if (_options.strict === true && Object.hasOwnProperty.call(object3, key)) {
55623
- error49('Duplicate key "' + key + '"');
55624
- }
55625
- if (suspectProtoRx.test(key) === true) {
55626
- if (_options.protoAction === "error") {
55627
- error49("Object contains forbidden prototype property");
55628
- } else if (_options.protoAction === "ignore") {
55629
- value();
55630
- } else {
55631
- object3[key] = value();
55632
- }
55633
- } else if (suspectConstructorRx.test(key) === true) {
55634
- if (_options.constructorAction === "error") {
55635
- error49("Object contains forbidden constructor property");
55636
- } else if (_options.constructorAction === "ignore") {
55637
- value();
55638
- } else {
55639
- object3[key] = value();
55640
- }
55641
- } else {
55642
- object3[key] = value();
55643
- }
55644
- white();
55645
- if (ch === "}") {
55646
- next("}");
55647
- return object3;
55648
- }
55649
- next(",");
55650
- white();
55651
- }
55652
- }
55653
- error49("Bad object");
55654
- };
55655
- value = function() {
55656
- white();
55657
- switch (ch) {
55658
- case "{":
55659
- return object2();
55660
- case "[":
55661
- return array2();
55662
- case '"':
55663
- return string4();
55664
- case "-":
55665
- return number4();
55666
- default:
55667
- return ch >= "0" && ch <= "9" ? number4() : word();
55668
- }
55669
- };
55670
- return function(source, reviver3) {
55671
- var result;
55672
- text = source + "";
55673
- at = 0;
55674
- ch = " ";
55675
- result = value();
55676
- white();
55677
- if (ch) {
55678
- error49("Syntax error");
55679
- }
55680
- return typeof reviver3 === "function" ? (function walk(holder, key) {
55681
- var k, v, value2 = holder[key];
55682
- if (value2 && typeof value2 === "object") {
55683
- Object.keys(value2).forEach(function(k2) {
55684
- v = walk(value2, k2);
55685
- if (v !== void 0) {
55686
- value2[k2] = v;
55687
- } else {
55688
- delete value2[k2];
55689
- }
55690
- });
55691
- }
55692
- return reviver3.call(holder, key, value2);
55693
- })({ "": result }, "") : result;
55694
- };
55695
- };
55696
- module.exports = json_parse;
55697
- }
55698
- });
55699
-
55700
- // node_modules/json-bigint/index.js
55701
- var require_json_bigint = __commonJS({
55702
- "node_modules/json-bigint/index.js"(exports, module) {
55703
- var json_stringify = require_stringify().stringify;
55704
- var json_parse = require_parse2();
55705
- module.exports = function(options) {
55706
- return {
55707
- parse: json_parse(options),
55708
- stringify: json_stringify
55709
- };
55710
- };
55711
- module.exports.parse = json_parse();
55712
- module.exports.stringify = json_stringify;
55713
- }
55714
- });
55715
-
55716
- // node_modules/bignumber.js/bignumber.js
55717
- var require_bignumber2 = __commonJS({
55718
- "node_modules/bignumber.js/bignumber.js"(exports, module) {
55719
- (function(globalObject) {
55720
- "use strict";
55721
- var BigNumber2, isNumeric = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, mathceil = Math.ceil, mathfloor = Math.floor, bignumberError = "[BigNumber Error] ", tooManyDigits = bignumberError + "Number primitive has more than 15 significant digits: ", BASE = 1e14, LOG_BASE = 14, MAX_SAFE_INTEGER = 9007199254740991, POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], SQRT_BASE = 1e7, MAX = 1e9;
55722
- function clone2(configObject) {
55723
- var div, convertBase, parseNumeric, P = BigNumber3.prototype = { constructor: BigNumber3, toString: null, valueOf: null }, ONE = new BigNumber3(1), DECIMAL_PLACES = 20, ROUNDING_MODE = 4, TO_EXP_NEG = -7, TO_EXP_POS = 21, MIN_EXP = -1e7, MAX_EXP = 1e7, CRYPTO = false, MODULO_MODE = 1, POW_PRECISION = 0, FORMAT = {
55724
- prefix: "",
55725
- groupSize: 3,
55726
- secondaryGroupSize: 0,
55727
- groupSeparator: ",",
55728
- decimalSeparator: ".",
55729
- fractionGroupSize: 0,
55730
- fractionGroupSeparator: "\xA0",
55731
- // non-breaking space
55732
- suffix: ""
55733
- }, ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyz";
55734
- function BigNumber3(v, b) {
55735
- var alphabet, c, caseChanged, e, i, isNum, len, str, x = this;
55736
- if (!(x instanceof BigNumber3)) return new BigNumber3(v, b);
55737
- if (b == null) {
55738
- if (v && v._isBigNumber === true) {
55739
- x.s = v.s;
55740
- if (!v.c || v.e > MAX_EXP) {
55741
- x.c = x.e = null;
55742
- } else if (v.e < MIN_EXP) {
55743
- x.c = [x.e = 0];
55744
- } else {
55745
- x.e = v.e;
55746
- x.c = v.c.slice();
55747
- }
55748
- return;
55749
- }
55750
- if ((isNum = typeof v == "number") && v * 0 == 0) {
55751
- x.s = 1 / v < 0 ? (v = -v, -1) : 1;
55752
- if (v === ~~v) {
55753
- for (e = 0, i = v; i >= 10; i /= 10, e++) ;
55754
- if (e > MAX_EXP) {
55755
- x.c = x.e = null;
55756
- } else {
55757
- x.e = e;
55758
- x.c = [v];
55759
- }
55760
- return;
55761
- }
55762
- str = String(v);
55763
- } else {
55764
- if (!isNumeric.test(str = String(v))) return parseNumeric(x, str, isNum);
55765
- x.s = str.charCodeAt(0) == 45 ? (str = str.slice(1), -1) : 1;
55766
- }
55767
- if ((e = str.indexOf(".")) > -1) str = str.replace(".", "");
55768
- if ((i = str.search(/e/i)) > 0) {
55769
- if (e < 0) e = i;
55770
- e += +str.slice(i + 1);
55771
- str = str.substring(0, i);
55772
- } else if (e < 0) {
55773
- e = str.length;
55774
- }
55775
- } else {
55776
- intCheck(b, 2, ALPHABET.length, "Base");
55777
- if (b == 10) {
55778
- x = new BigNumber3(v);
55779
- return round(x, DECIMAL_PLACES + x.e + 1, ROUNDING_MODE);
55780
- }
55781
- str = String(v);
55782
- if (isNum = typeof v == "number") {
55783
- if (v * 0 != 0) return parseNumeric(x, str, isNum, b);
55784
- x.s = 1 / v < 0 ? (str = str.slice(1), -1) : 1;
55785
- if (BigNumber3.DEBUG && str.replace(/^0\.0*|\./, "").length > 15) {
55786
- throw Error(tooManyDigits + v);
55787
- }
55788
- } else {
55789
- x.s = str.charCodeAt(0) === 45 ? (str = str.slice(1), -1) : 1;
55790
- }
55791
- alphabet = ALPHABET.slice(0, b);
55792
- e = i = 0;
55793
- for (len = str.length; i < len; i++) {
55794
- if (alphabet.indexOf(c = str.charAt(i)) < 0) {
55795
- if (c == ".") {
55796
- if (i > e) {
55797
- e = len;
55798
- continue;
55799
- }
55800
- } else if (!caseChanged) {
55801
- if (str == str.toUpperCase() && (str = str.toLowerCase()) || str == str.toLowerCase() && (str = str.toUpperCase())) {
55802
- caseChanged = true;
55803
- i = -1;
55804
- e = 0;
55805
- continue;
55806
- }
55807
- }
55808
- return parseNumeric(x, String(v), isNum, b);
55809
- }
55810
- }
55811
- isNum = false;
55812
- str = convertBase(str, b, 10, x.s);
55813
- if ((e = str.indexOf(".")) > -1) str = str.replace(".", "");
55814
- else e = str.length;
55815
- }
55816
- for (i = 0; str.charCodeAt(i) === 48; i++) ;
55817
- for (len = str.length; str.charCodeAt(--len) === 48; ) ;
55818
- if (str = str.slice(i, ++len)) {
55819
- len -= i;
55820
- if (isNum && BigNumber3.DEBUG && len > 15 && (v > MAX_SAFE_INTEGER || v !== mathfloor(v))) {
55821
- throw Error(tooManyDigits + x.s * v);
55822
- }
55823
- if ((e = e - i - 1) > MAX_EXP) {
55824
- x.c = x.e = null;
55825
- } else if (e < MIN_EXP) {
55826
- x.c = [x.e = 0];
55827
- } else {
55828
- x.e = e;
55829
- x.c = [];
55830
- i = (e + 1) % LOG_BASE;
55831
- if (e < 0) i += LOG_BASE;
55832
- if (i < len) {
55833
- if (i) x.c.push(+str.slice(0, i));
55834
- for (len -= LOG_BASE; i < len; ) {
55835
- x.c.push(+str.slice(i, i += LOG_BASE));
55836
- }
55837
- i = LOG_BASE - (str = str.slice(i)).length;
55838
- } else {
55839
- i -= len;
55840
- }
55841
- for (; i--; str += "0") ;
55842
- x.c.push(+str);
55843
- }
55844
- } else {
55845
- x.c = [x.e = 0];
55846
- }
55847
- }
55848
- BigNumber3.clone = clone2;
55849
- BigNumber3.ROUND_UP = 0;
55850
- BigNumber3.ROUND_DOWN = 1;
55851
- BigNumber3.ROUND_CEIL = 2;
55852
- BigNumber3.ROUND_FLOOR = 3;
55853
- BigNumber3.ROUND_HALF_UP = 4;
55854
- BigNumber3.ROUND_HALF_DOWN = 5;
55855
- BigNumber3.ROUND_HALF_EVEN = 6;
55856
- BigNumber3.ROUND_HALF_CEIL = 7;
55857
- BigNumber3.ROUND_HALF_FLOOR = 8;
55858
- BigNumber3.EUCLID = 9;
55859
- BigNumber3.config = BigNumber3.set = function(obj) {
55860
- var p, v;
55861
- if (obj != null) {
55862
- if (typeof obj == "object") {
55863
- if (obj.hasOwnProperty(p = "DECIMAL_PLACES")) {
55864
- v = obj[p];
55865
- intCheck(v, 0, MAX, p);
55866
- DECIMAL_PLACES = v;
55867
- }
55868
- if (obj.hasOwnProperty(p = "ROUNDING_MODE")) {
55869
- v = obj[p];
55870
- intCheck(v, 0, 8, p);
55871
- ROUNDING_MODE = v;
55872
- }
55873
- if (obj.hasOwnProperty(p = "EXPONENTIAL_AT")) {
55874
- v = obj[p];
55875
- if (v && v.pop) {
55876
- intCheck(v[0], -MAX, 0, p);
55877
- intCheck(v[1], 0, MAX, p);
55878
- TO_EXP_NEG = v[0];
55879
- TO_EXP_POS = v[1];
55880
- } else {
55881
- intCheck(v, -MAX, MAX, p);
55882
- TO_EXP_NEG = -(TO_EXP_POS = v < 0 ? -v : v);
55883
- }
55884
- }
55885
- if (obj.hasOwnProperty(p = "RANGE")) {
55886
- v = obj[p];
55887
- if (v && v.pop) {
55888
- intCheck(v[0], -MAX, -1, p);
55889
- intCheck(v[1], 1, MAX, p);
55890
- MIN_EXP = v[0];
55891
- MAX_EXP = v[1];
55892
- } else {
55893
- intCheck(v, -MAX, MAX, p);
55894
- if (v) {
55895
- MIN_EXP = -(MAX_EXP = v < 0 ? -v : v);
55896
- } else {
55897
- throw Error(bignumberError + p + " cannot be zero: " + v);
55898
- }
55899
- }
55900
- }
55901
- if (obj.hasOwnProperty(p = "CRYPTO")) {
55902
- v = obj[p];
55903
- if (v === !!v) {
55904
- if (v) {
55905
- if (typeof crypto != "undefined" && crypto && (crypto.getRandomValues || crypto.randomBytes)) {
55906
- CRYPTO = v;
55907
- } else {
55908
- CRYPTO = !v;
55909
- throw Error(bignumberError + "crypto unavailable");
55910
- }
55911
- } else {
55912
- CRYPTO = v;
55913
- }
55914
- } else {
55915
- throw Error(bignumberError + p + " not true or false: " + v);
55916
- }
55917
- }
55918
- if (obj.hasOwnProperty(p = "MODULO_MODE")) {
55919
- v = obj[p];
55920
- intCheck(v, 0, 9, p);
55921
- MODULO_MODE = v;
55922
- }
55923
- if (obj.hasOwnProperty(p = "POW_PRECISION")) {
55924
- v = obj[p];
55925
- intCheck(v, 0, MAX, p);
55926
- POW_PRECISION = v;
55927
- }
55928
- if (obj.hasOwnProperty(p = "FORMAT")) {
55929
- v = obj[p];
55930
- if (typeof v == "object") FORMAT = v;
55931
- else throw Error(bignumberError + p + " not an object: " + v);
55932
- }
55933
- if (obj.hasOwnProperty(p = "ALPHABET")) {
55934
- v = obj[p];
55935
- if (typeof v == "string" && !/^.$|[+-.\s]|(.).*\1/.test(v)) {
55936
- ALPHABET = v;
55937
- } else {
55938
- throw Error(bignumberError + p + " invalid: " + v);
55939
- }
55940
- }
55941
- } else {
55942
- throw Error(bignumberError + "Object expected: " + obj);
55943
- }
55944
- }
55945
- return {
55946
- DECIMAL_PLACES,
55947
- ROUNDING_MODE,
55948
- EXPONENTIAL_AT: [TO_EXP_NEG, TO_EXP_POS],
55949
- RANGE: [MIN_EXP, MAX_EXP],
55950
- CRYPTO,
55951
- MODULO_MODE,
55952
- POW_PRECISION,
55953
- FORMAT,
55954
- ALPHABET
55955
- };
55956
- };
55957
- BigNumber3.isBigNumber = function(v) {
55958
- if (!v || v._isBigNumber !== true) return false;
55959
- if (!BigNumber3.DEBUG) return true;
55960
- var i, n, c = v.c, e = v.e, s = v.s;
55961
- out: if ({}.toString.call(c) == "[object Array]") {
55962
- if ((s === 1 || s === -1) && e >= -MAX && e <= MAX && e === mathfloor(e)) {
55963
- if (c[0] === 0) {
55964
- if (e === 0 && c.length === 1) return true;
55965
- break out;
55966
- }
55967
- i = (e + 1) % LOG_BASE;
55968
- if (i < 1) i += LOG_BASE;
55969
- if (String(c[0]).length == i) {
55970
- for (i = 0; i < c.length; i++) {
55971
- n = c[i];
55972
- if (n < 0 || n >= BASE || n !== mathfloor(n)) break out;
55973
- }
55974
- if (n !== 0) return true;
55975
- }
55976
- }
55977
- } else if (c === null && e === null && (s === null || s === 1 || s === -1)) {
55978
- return true;
55979
- }
55980
- throw Error(bignumberError + "Invalid BigNumber: " + v);
55981
- };
55982
- BigNumber3.maximum = BigNumber3.max = function() {
55983
- return maxOrMin(arguments, P.lt);
55984
- };
55985
- BigNumber3.minimum = BigNumber3.min = function() {
55986
- return maxOrMin(arguments, P.gt);
55987
- };
55988
- BigNumber3.random = (function() {
55989
- var pow2_53 = 9007199254740992;
55990
- var random53bitInt = Math.random() * pow2_53 & 2097151 ? function() {
55991
- return mathfloor(Math.random() * pow2_53);
55992
- } : function() {
55993
- return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
55994
- };
55995
- return function(dp) {
55996
- var a, b, e, k, v, i = 0, c = [], rand = new BigNumber3(ONE);
55997
- if (dp == null) dp = DECIMAL_PLACES;
55998
- else intCheck(dp, 0, MAX);
55999
- k = mathceil(dp / LOG_BASE);
56000
- if (CRYPTO) {
56001
- if (crypto.getRandomValues) {
56002
- a = crypto.getRandomValues(new Uint32Array(k *= 2));
56003
- for (; i < k; ) {
56004
- v = a[i] * 131072 + (a[i + 1] >>> 11);
56005
- if (v >= 9e15) {
56006
- b = crypto.getRandomValues(new Uint32Array(2));
56007
- a[i] = b[0];
56008
- a[i + 1] = b[1];
56009
- } else {
56010
- c.push(v % 1e14);
56011
- i += 2;
56012
- }
56013
- }
56014
- i = k / 2;
56015
- } else if (crypto.randomBytes) {
56016
- a = crypto.randomBytes(k *= 7);
56017
- for (; i < k; ) {
56018
- v = (a[i] & 31) * 281474976710656 + a[i + 1] * 1099511627776 + a[i + 2] * 4294967296 + a[i + 3] * 16777216 + (a[i + 4] << 16) + (a[i + 5] << 8) + a[i + 6];
56019
- if (v >= 9e15) {
56020
- crypto.randomBytes(7).copy(a, i);
56021
- } else {
56022
- c.push(v % 1e14);
56023
- i += 7;
56024
- }
56025
- }
56026
- i = k / 7;
56027
- } else {
56028
- CRYPTO = false;
56029
- throw Error(bignumberError + "crypto unavailable");
56030
- }
56031
- }
56032
- if (!CRYPTO) {
56033
- for (; i < k; ) {
56034
- v = random53bitInt();
56035
- if (v < 9e15) c[i++] = v % 1e14;
56036
- }
56037
- }
56038
- k = c[--i];
56039
- dp %= LOG_BASE;
56040
- if (k && dp) {
56041
- v = POWS_TEN[LOG_BASE - dp];
56042
- c[i] = mathfloor(k / v) * v;
56043
- }
56044
- for (; c[i] === 0; c.pop(), i--) ;
56045
- if (i < 0) {
56046
- c = [e = 0];
56047
- } else {
56048
- for (e = -1; c[0] === 0; c.splice(0, 1), e -= LOG_BASE) ;
56049
- for (i = 1, v = c[0]; v >= 10; v /= 10, i++) ;
56050
- if (i < LOG_BASE) e -= LOG_BASE - i;
56051
- }
56052
- rand.e = e;
56053
- rand.c = c;
56054
- return rand;
56055
- };
56056
- })();
56057
- BigNumber3.sum = function() {
56058
- var i = 1, args = arguments, sum = new BigNumber3(args[0]);
56059
- for (; i < args.length; ) sum = sum.plus(args[i++]);
56060
- return sum;
56061
- };
56062
- convertBase = /* @__PURE__ */ (function() {
56063
- var decimal = "0123456789";
56064
- function toBaseOut(str, baseIn, baseOut, alphabet) {
56065
- var j, arr = [0], arrL, i = 0, len = str.length;
56066
- for (; i < len; ) {
56067
- for (arrL = arr.length; arrL--; arr[arrL] *= baseIn) ;
56068
- arr[0] += alphabet.indexOf(str.charAt(i++));
56069
- for (j = 0; j < arr.length; j++) {
56070
- if (arr[j] > baseOut - 1) {
56071
- if (arr[j + 1] == null) arr[j + 1] = 0;
56072
- arr[j + 1] += arr[j] / baseOut | 0;
56073
- arr[j] %= baseOut;
56074
- }
56075
- }
56076
- }
56077
- return arr.reverse();
56078
- }
56079
- return function(str, baseIn, baseOut, sign, callerIsToString) {
56080
- var alphabet, d, e, k, r, x, xc, y, i = str.indexOf("."), dp = DECIMAL_PLACES, rm = ROUNDING_MODE;
56081
- if (i >= 0) {
56082
- k = POW_PRECISION;
56083
- POW_PRECISION = 0;
56084
- str = str.replace(".", "");
56085
- y = new BigNumber3(baseIn);
56086
- x = y.pow(str.length - i);
56087
- POW_PRECISION = k;
56088
- y.c = toBaseOut(
56089
- toFixedPoint(coeffToString(x.c), x.e, "0"),
56090
- 10,
56091
- baseOut,
56092
- decimal
56093
- );
56094
- y.e = y.c.length;
56095
- }
56096
- xc = toBaseOut(str, baseIn, baseOut, callerIsToString ? (alphabet = ALPHABET, decimal) : (alphabet = decimal, ALPHABET));
56097
- e = k = xc.length;
56098
- for (; xc[--k] == 0; xc.pop()) ;
56099
- if (!xc[0]) return alphabet.charAt(0);
56100
- if (i < 0) {
56101
- --e;
56102
- } else {
56103
- x.c = xc;
56104
- x.e = e;
56105
- x.s = sign;
56106
- x = div(x, y, dp, rm, baseOut);
56107
- xc = x.c;
56108
- r = x.r;
56109
- e = x.e;
56110
- }
56111
- d = e + dp + 1;
56112
- i = xc[d];
56113
- k = baseOut / 2;
56114
- r = r || d < 0 || xc[d + 1] != null;
56115
- r = rm < 4 ? (i != null || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2)) : i > k || i == k && (rm == 4 || r || rm == 6 && xc[d - 1] & 1 || rm == (x.s < 0 ? 8 : 7));
56116
- if (d < 1 || !xc[0]) {
56117
- str = r ? toFixedPoint(alphabet.charAt(1), -dp, alphabet.charAt(0)) : alphabet.charAt(0);
56118
- } else {
56119
- xc.length = d;
56120
- if (r) {
56121
- for (--baseOut; ++xc[--d] > baseOut; ) {
56122
- xc[d] = 0;
56123
- if (!d) {
56124
- ++e;
56125
- xc = [1].concat(xc);
56126
- }
56127
- }
56128
- }
56129
- for (k = xc.length; !xc[--k]; ) ;
56130
- for (i = 0, str = ""; i <= k; str += alphabet.charAt(xc[i++])) ;
56131
- str = toFixedPoint(str, e, alphabet.charAt(0));
56132
- }
56133
- return str;
56134
- };
56135
- })();
56136
- div = /* @__PURE__ */ (function() {
56137
- function multiply(x, k, base) {
56138
- var m, temp, xlo, xhi, carry = 0, i = x.length, klo = k % SQRT_BASE, khi = k / SQRT_BASE | 0;
56139
- for (x = x.slice(); i--; ) {
56140
- xlo = x[i] % SQRT_BASE;
56141
- xhi = x[i] / SQRT_BASE | 0;
56142
- m = khi * xlo + xhi * klo;
56143
- temp = klo * xlo + m % SQRT_BASE * SQRT_BASE + carry;
56144
- carry = (temp / base | 0) + (m / SQRT_BASE | 0) + khi * xhi;
56145
- x[i] = temp % base;
56146
- }
56147
- if (carry) x = [carry].concat(x);
56148
- return x;
56149
- }
56150
- function compare2(a, b, aL, bL) {
56151
- var i, cmp;
56152
- if (aL != bL) {
56153
- cmp = aL > bL ? 1 : -1;
56154
- } else {
56155
- for (i = cmp = 0; i < aL; i++) {
56156
- if (a[i] != b[i]) {
56157
- cmp = a[i] > b[i] ? 1 : -1;
56158
- break;
56159
- }
56160
- }
56161
- }
56162
- return cmp;
56163
- }
56164
- function subtract(a, b, aL, base) {
56165
- var i = 0;
56166
- for (; aL--; ) {
56167
- a[aL] -= i;
56168
- i = a[aL] < b[aL] ? 1 : 0;
56169
- a[aL] = i * base + a[aL] - b[aL];
56170
- }
56171
- for (; !a[0] && a.length > 1; a.splice(0, 1)) ;
56172
- }
56173
- return function(x, y, dp, rm, base) {
56174
- var cmp, e, i, more, n, prod, prodL, q, qc, rem, remL, rem0, xi, xL, yc0, yL, yz, s = x.s == y.s ? 1 : -1, xc = x.c, yc = y.c;
56175
- if (!xc || !xc[0] || !yc || !yc[0]) {
56176
- return new BigNumber3(
56177
- // Return NaN if either NaN, or both Infinity or 0.
56178
- !x.s || !y.s || (xc ? yc && xc[0] == yc[0] : !yc) ? NaN : (
56179
- // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
56180
- xc && xc[0] == 0 || !yc ? s * 0 : s / 0
56181
- )
56182
- );
56183
- }
56184
- q = new BigNumber3(s);
56185
- qc = q.c = [];
56186
- e = x.e - y.e;
56187
- s = dp + e + 1;
56188
- if (!base) {
56189
- base = BASE;
56190
- e = bitFloor(x.e / LOG_BASE) - bitFloor(y.e / LOG_BASE);
56191
- s = s / LOG_BASE | 0;
56192
- }
56193
- for (i = 0; yc[i] == (xc[i] || 0); i++) ;
56194
- if (yc[i] > (xc[i] || 0)) e--;
56195
- if (s < 0) {
56196
- qc.push(1);
56197
- more = true;
56198
- } else {
56199
- xL = xc.length;
56200
- yL = yc.length;
56201
- i = 0;
56202
- s += 2;
56203
- n = mathfloor(base / (yc[0] + 1));
56204
- if (n > 1) {
56205
- yc = multiply(yc, n, base);
56206
- xc = multiply(xc, n, base);
56207
- yL = yc.length;
56208
- xL = xc.length;
56209
- }
56210
- xi = yL;
56211
- rem = xc.slice(0, yL);
56212
- remL = rem.length;
56213
- for (; remL < yL; rem[remL++] = 0) ;
56214
- yz = yc.slice();
56215
- yz = [0].concat(yz);
56216
- yc0 = yc[0];
56217
- if (yc[1] >= base / 2) yc0++;
56218
- do {
56219
- n = 0;
56220
- cmp = compare2(yc, rem, yL, remL);
56221
- if (cmp < 0) {
56222
- rem0 = rem[0];
56223
- if (yL != remL) rem0 = rem0 * base + (rem[1] || 0);
56224
- n = mathfloor(rem0 / yc0);
56225
- if (n > 1) {
56226
- if (n >= base) n = base - 1;
56227
- prod = multiply(yc, n, base);
56228
- prodL = prod.length;
56229
- remL = rem.length;
56230
- while (compare2(prod, rem, prodL, remL) == 1) {
56231
- n--;
56232
- subtract(prod, yL < prodL ? yz : yc, prodL, base);
56233
- prodL = prod.length;
56234
- cmp = 1;
56235
- }
56236
- } else {
56237
- if (n == 0) {
56238
- cmp = n = 1;
56239
- }
56240
- prod = yc.slice();
56241
- prodL = prod.length;
56242
- }
56243
- if (prodL < remL) prod = [0].concat(prod);
56244
- subtract(rem, prod, remL, base);
56245
- remL = rem.length;
56246
- if (cmp == -1) {
56247
- while (compare2(yc, rem, yL, remL) < 1) {
56248
- n++;
56249
- subtract(rem, yL < remL ? yz : yc, remL, base);
56250
- remL = rem.length;
56251
- }
56252
- }
56253
- } else if (cmp === 0) {
56254
- n++;
56255
- rem = [0];
56256
- }
56257
- qc[i++] = n;
56258
- if (rem[0]) {
56259
- rem[remL++] = xc[xi] || 0;
56260
- } else {
56261
- rem = [xc[xi]];
56262
- remL = 1;
56263
- }
56264
- } while ((xi++ < xL || rem[0] != null) && s--);
56265
- more = rem[0] != null;
56266
- if (!qc[0]) qc.splice(0, 1);
56267
- }
56268
- if (base == BASE) {
56269
- for (i = 1, s = qc[0]; s >= 10; s /= 10, i++) ;
56270
- round(q, dp + (q.e = i + e * LOG_BASE - 1) + 1, rm, more);
56271
- } else {
56272
- q.e = e;
56273
- q.r = +more;
56274
- }
56275
- return q;
56276
- };
56277
- })();
56278
- function format(n, i, rm, id) {
56279
- var c0, e, ne, len, str;
56280
- if (rm == null) rm = ROUNDING_MODE;
56281
- else intCheck(rm, 0, 8);
56282
- if (!n.c) return n.toString();
56283
- c0 = n.c[0];
56284
- ne = n.e;
56285
- if (i == null) {
56286
- str = coeffToString(n.c);
56287
- str = id == 1 || id == 2 && (ne <= TO_EXP_NEG || ne >= TO_EXP_POS) ? toExponential(str, ne) : toFixedPoint(str, ne, "0");
56288
- } else {
56289
- n = round(new BigNumber3(n), i, rm);
56290
- e = n.e;
56291
- str = coeffToString(n.c);
56292
- len = str.length;
56293
- if (id == 1 || id == 2 && (i <= e || e <= TO_EXP_NEG)) {
56294
- for (; len < i; str += "0", len++) ;
56295
- str = toExponential(str, e);
56296
- } else {
56297
- i -= ne;
56298
- str = toFixedPoint(str, e, "0");
56299
- if (e + 1 > len) {
56300
- if (--i > 0) for (str += "."; i--; str += "0") ;
56301
- } else {
56302
- i += e - len;
56303
- if (i > 0) {
56304
- if (e + 1 == len) str += ".";
56305
- for (; i--; str += "0") ;
56306
- }
56307
- }
56308
- }
56309
- }
56310
- return n.s < 0 && c0 ? "-" + str : str;
56311
- }
56312
- function maxOrMin(args, method) {
56313
- var n, i = 1, m = new BigNumber3(args[0]);
56314
- for (; i < args.length; i++) {
56315
- n = new BigNumber3(args[i]);
56316
- if (!n.s) {
56317
- m = n;
56318
- break;
56319
- } else if (method.call(m, n)) {
56320
- m = n;
56321
- }
56322
- }
56323
- return m;
56324
- }
56325
- function normalise(n, c, e) {
56326
- var i = 1, j = c.length;
56327
- for (; !c[--j]; c.pop()) ;
56328
- for (j = c[0]; j >= 10; j /= 10, i++) ;
56329
- if ((e = i + e * LOG_BASE - 1) > MAX_EXP) {
56330
- n.c = n.e = null;
56331
- } else if (e < MIN_EXP) {
56332
- n.c = [n.e = 0];
56333
- } else {
56334
- n.e = e;
56335
- n.c = c;
56336
- }
56337
- return n;
56338
- }
56339
- parseNumeric = /* @__PURE__ */ (function() {
56340
- var basePrefix = /^(-?)0([xbo])(?=\w[\w.]*$)/i, dotAfter = /^([^.]+)\.$/, dotBefore = /^\.([^.]+)$/, isInfinityOrNaN = /^-?(Infinity|NaN)$/, whitespaceOrPlus = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
56341
- return function(x, str, isNum, b) {
56342
- var base, s = isNum ? str : str.replace(whitespaceOrPlus, "");
56343
- if (isInfinityOrNaN.test(s)) {
56344
- x.s = isNaN(s) ? null : s < 0 ? -1 : 1;
56345
- } else {
56346
- if (!isNum) {
56347
- s = s.replace(basePrefix, function(m, p1, p2) {
56348
- base = (p2 = p2.toLowerCase()) == "x" ? 16 : p2 == "b" ? 2 : 8;
56349
- return !b || b == base ? p1 : m;
56350
- });
56351
- if (b) {
56352
- base = b;
56353
- s = s.replace(dotAfter, "$1").replace(dotBefore, "0.$1");
56354
- }
56355
- if (str != s) return new BigNumber3(s, base);
56356
- }
56357
- if (BigNumber3.DEBUG) {
56358
- throw Error(bignumberError + "Not a" + (b ? " base " + b : "") + " number: " + str);
56359
- }
56360
- x.s = null;
56361
- }
56362
- x.c = x.e = null;
56363
- };
56364
- })();
56365
- function round(x, sd, rm, r) {
56366
- var d, i, j, k, n, ni, rd, xc = x.c, pows10 = POWS_TEN;
56367
- if (xc) {
56368
- out: {
56369
- for (d = 1, k = xc[0]; k >= 10; k /= 10, d++) ;
56370
- i = sd - d;
56371
- if (i < 0) {
56372
- i += LOG_BASE;
56373
- j = sd;
56374
- n = xc[ni = 0];
56375
- rd = n / pows10[d - j - 1] % 10 | 0;
56376
- } else {
56377
- ni = mathceil((i + 1) / LOG_BASE);
56378
- if (ni >= xc.length) {
56379
- if (r) {
56380
- for (; xc.length <= ni; xc.push(0)) ;
56381
- n = rd = 0;
56382
- d = 1;
56383
- i %= LOG_BASE;
56384
- j = i - LOG_BASE + 1;
56385
- } else {
56386
- break out;
56387
- }
56388
- } else {
56389
- n = k = xc[ni];
56390
- for (d = 1; k >= 10; k /= 10, d++) ;
56391
- i %= LOG_BASE;
56392
- j = i - LOG_BASE + d;
56393
- rd = j < 0 ? 0 : n / pows10[d - j - 1] % 10 | 0;
56394
- }
56395
- }
56396
- r = r || sd < 0 || // Are there any non-zero digits after the rounding digit?
56397
- // The expression n % pows10[d - j - 1] returns all digits of n to the right
56398
- // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
56399
- xc[ni + 1] != null || (j < 0 ? n : n % pows10[d - j - 1]);
56400
- r = rm < 4 ? (rd || r) && (rm == 0 || rm == (x.s < 0 ? 3 : 2)) : rd > 5 || rd == 5 && (rm == 4 || r || rm == 6 && // Check whether the digit to the left of the rounding digit is odd.
56401
- (i > 0 ? j > 0 ? n / pows10[d - j] : 0 : xc[ni - 1]) % 10 & 1 || rm == (x.s < 0 ? 8 : 7));
56402
- if (sd < 1 || !xc[0]) {
56403
- xc.length = 0;
56404
- if (r) {
56405
- sd -= x.e + 1;
56406
- xc[0] = pows10[(LOG_BASE - sd % LOG_BASE) % LOG_BASE];
56407
- x.e = -sd || 0;
56408
- } else {
56409
- xc[0] = x.e = 0;
56410
- }
56411
- return x;
56412
- }
56413
- if (i == 0) {
56414
- xc.length = ni;
56415
- k = 1;
56416
- ni--;
56417
- } else {
56418
- xc.length = ni + 1;
56419
- k = pows10[LOG_BASE - i];
56420
- xc[ni] = j > 0 ? mathfloor(n / pows10[d - j] % pows10[j]) * k : 0;
56421
- }
56422
- if (r) {
56423
- for (; ; ) {
56424
- if (ni == 0) {
56425
- for (i = 1, j = xc[0]; j >= 10; j /= 10, i++) ;
56426
- j = xc[0] += k;
56427
- for (k = 1; j >= 10; j /= 10, k++) ;
56428
- if (i != k) {
56429
- x.e++;
56430
- if (xc[0] == BASE) xc[0] = 1;
56431
- }
56432
- break;
56433
- } else {
56434
- xc[ni] += k;
56435
- if (xc[ni] != BASE) break;
56436
- xc[ni--] = 0;
56437
- k = 1;
56438
- }
56439
- }
56440
- }
56441
- for (i = xc.length; xc[--i] === 0; xc.pop()) ;
56442
- }
56443
- if (x.e > MAX_EXP) {
56444
- x.c = x.e = null;
56445
- } else if (x.e < MIN_EXP) {
56446
- x.c = [x.e = 0];
56447
- }
56448
- }
56449
- return x;
56450
- }
56451
- function valueOf(n) {
56452
- var str, e = n.e;
56453
- if (e === null) return n.toString();
56454
- str = coeffToString(n.c);
56455
- str = e <= TO_EXP_NEG || e >= TO_EXP_POS ? toExponential(str, e) : toFixedPoint(str, e, "0");
56456
- return n.s < 0 ? "-" + str : str;
56457
- }
56458
- P.absoluteValue = P.abs = function() {
56459
- var x = new BigNumber3(this);
56460
- if (x.s < 0) x.s = 1;
56461
- return x;
56462
- };
56463
- P.comparedTo = function(y, b) {
56464
- return compare(this, new BigNumber3(y, b));
56465
- };
56466
- P.decimalPlaces = P.dp = function(dp, rm) {
56467
- var c, n, v, x = this;
56468
- if (dp != null) {
56469
- intCheck(dp, 0, MAX);
56470
- if (rm == null) rm = ROUNDING_MODE;
56471
- else intCheck(rm, 0, 8);
56472
- return round(new BigNumber3(x), dp + x.e + 1, rm);
56473
- }
56474
- if (!(c = x.c)) return null;
56475
- n = ((v = c.length - 1) - bitFloor(this.e / LOG_BASE)) * LOG_BASE;
56476
- if (v = c[v]) for (; v % 10 == 0; v /= 10, n--) ;
56477
- if (n < 0) n = 0;
56478
- return n;
56479
- };
56480
- P.dividedBy = P.div = function(y, b) {
56481
- return div(this, new BigNumber3(y, b), DECIMAL_PLACES, ROUNDING_MODE);
56482
- };
56483
- P.dividedToIntegerBy = P.idiv = function(y, b) {
56484
- return div(this, new BigNumber3(y, b), 0, 1);
56485
- };
56486
- P.exponentiatedBy = P.pow = function(n, m) {
56487
- var half, isModExp, i, k, more, nIsBig, nIsNeg, nIsOdd, y, x = this;
56488
- n = new BigNumber3(n);
56489
- if (n.c && !n.isInteger()) {
56490
- throw Error(bignumberError + "Exponent not an integer: " + valueOf(n));
56491
- }
56492
- if (m != null) m = new BigNumber3(m);
56493
- nIsBig = n.e > 14;
56494
- if (!x.c || !x.c[0] || x.c[0] == 1 && !x.e && x.c.length == 1 || !n.c || !n.c[0]) {
56495
- y = new BigNumber3(Math.pow(+valueOf(x), nIsBig ? 2 - isOdd(n) : +valueOf(n)));
56496
- return m ? y.mod(m) : y;
56497
- }
56498
- nIsNeg = n.s < 0;
56499
- if (m) {
56500
- if (m.c ? !m.c[0] : !m.s) return new BigNumber3(NaN);
56501
- isModExp = !nIsNeg && x.isInteger() && m.isInteger();
56502
- if (isModExp) x = x.mod(m);
56503
- } else if (n.e > 9 && (x.e > 0 || x.e < -1 || (x.e == 0 ? x.c[0] > 1 || nIsBig && x.c[1] >= 24e7 : x.c[0] < 8e13 || nIsBig && x.c[0] <= 9999975e7))) {
56504
- k = x.s < 0 && isOdd(n) ? -0 : 0;
56505
- if (x.e > -1) k = 1 / k;
56506
- return new BigNumber3(nIsNeg ? 1 / k : k);
56507
- } else if (POW_PRECISION) {
56508
- k = mathceil(POW_PRECISION / LOG_BASE + 2);
56509
- }
56510
- if (nIsBig) {
56511
- half = new BigNumber3(0.5);
56512
- if (nIsNeg) n.s = 1;
56513
- nIsOdd = isOdd(n);
56514
- } else {
56515
- i = Math.abs(+valueOf(n));
56516
- nIsOdd = i % 2;
56517
- }
56518
- y = new BigNumber3(ONE);
56519
- for (; ; ) {
56520
- if (nIsOdd) {
56521
- y = y.times(x);
56522
- if (!y.c) break;
56523
- if (k) {
56524
- if (y.c.length > k) y.c.length = k;
56525
- } else if (isModExp) {
56526
- y = y.mod(m);
56527
- }
56528
- }
56529
- if (i) {
56530
- i = mathfloor(i / 2);
56531
- if (i === 0) break;
56532
- nIsOdd = i % 2;
56533
- } else {
56534
- n = n.times(half);
56535
- round(n, n.e + 1, 1);
56536
- if (n.e > 14) {
56537
- nIsOdd = isOdd(n);
56538
- } else {
56539
- i = +valueOf(n);
56540
- if (i === 0) break;
56541
- nIsOdd = i % 2;
56542
- }
56543
- }
56544
- x = x.times(x);
56545
- if (k) {
56546
- if (x.c && x.c.length > k) x.c.length = k;
56547
- } else if (isModExp) {
56548
- x = x.mod(m);
56549
- }
56550
- }
56551
- if (isModExp) return y;
56552
- if (nIsNeg) y = ONE.div(y);
56553
- return m ? y.mod(m) : k ? round(y, POW_PRECISION, ROUNDING_MODE, more) : y;
56554
- };
56555
- P.integerValue = function(rm) {
56556
- var n = new BigNumber3(this);
56557
- if (rm == null) rm = ROUNDING_MODE;
56558
- else intCheck(rm, 0, 8);
56559
- return round(n, n.e + 1, rm);
56560
- };
56561
- P.isEqualTo = P.eq = function(y, b) {
56562
- return compare(this, new BigNumber3(y, b)) === 0;
56563
- };
56564
- P.isFinite = function() {
56565
- return !!this.c;
56566
- };
56567
- P.isGreaterThan = P.gt = function(y, b) {
56568
- return compare(this, new BigNumber3(y, b)) > 0;
56569
- };
56570
- P.isGreaterThanOrEqualTo = P.gte = function(y, b) {
56571
- return (b = compare(this, new BigNumber3(y, b))) === 1 || b === 0;
56572
- };
56573
- P.isInteger = function() {
56574
- return !!this.c && bitFloor(this.e / LOG_BASE) > this.c.length - 2;
56575
- };
56576
- P.isLessThan = P.lt = function(y, b) {
56577
- return compare(this, new BigNumber3(y, b)) < 0;
56578
- };
56579
- P.isLessThanOrEqualTo = P.lte = function(y, b) {
56580
- return (b = compare(this, new BigNumber3(y, b))) === -1 || b === 0;
56581
- };
56582
- P.isNaN = function() {
56583
- return !this.s;
56584
- };
56585
- P.isNegative = function() {
56586
- return this.s < 0;
56587
- };
56588
- P.isPositive = function() {
56589
- return this.s > 0;
56590
- };
56591
- P.isZero = function() {
56592
- return !!this.c && this.c[0] == 0;
56593
- };
56594
- P.minus = function(y, b) {
56595
- var i, j, t, xLTy, x = this, a = x.s;
56596
- y = new BigNumber3(y, b);
56597
- b = y.s;
56598
- if (!a || !b) return new BigNumber3(NaN);
56599
- if (a != b) {
56600
- y.s = -b;
56601
- return x.plus(y);
56602
- }
56603
- var xe = x.e / LOG_BASE, ye = y.e / LOG_BASE, xc = x.c, yc = y.c;
56604
- if (!xe || !ye) {
56605
- if (!xc || !yc) return xc ? (y.s = -b, y) : new BigNumber3(yc ? x : NaN);
56606
- if (!xc[0] || !yc[0]) {
56607
- return yc[0] ? (y.s = -b, y) : new BigNumber3(xc[0] ? x : (
56608
- // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity
56609
- ROUNDING_MODE == 3 ? -0 : 0
56610
- ));
56611
- }
56612
- }
56613
- xe = bitFloor(xe);
56614
- ye = bitFloor(ye);
56615
- xc = xc.slice();
56616
- if (a = xe - ye) {
56617
- if (xLTy = a < 0) {
56618
- a = -a;
56619
- t = xc;
56620
- } else {
56621
- ye = xe;
56622
- t = yc;
56623
- }
56624
- t.reverse();
56625
- for (b = a; b--; t.push(0)) ;
56626
- t.reverse();
56627
- } else {
56628
- j = (xLTy = (a = xc.length) < (b = yc.length)) ? a : b;
56629
- for (a = b = 0; b < j; b++) {
56630
- if (xc[b] != yc[b]) {
56631
- xLTy = xc[b] < yc[b];
56632
- break;
56633
- }
56634
- }
56635
- }
56636
- if (xLTy) t = xc, xc = yc, yc = t, y.s = -y.s;
56637
- b = (j = yc.length) - (i = xc.length);
56638
- if (b > 0) for (; b--; xc[i++] = 0) ;
56639
- b = BASE - 1;
56640
- for (; j > a; ) {
56641
- if (xc[--j] < yc[j]) {
56642
- for (i = j; i && !xc[--i]; xc[i] = b) ;
56643
- --xc[i];
56644
- xc[j] += BASE;
56645
- }
56646
- xc[j] -= yc[j];
56647
- }
56648
- for (; xc[0] == 0; xc.splice(0, 1), --ye) ;
56649
- if (!xc[0]) {
56650
- y.s = ROUNDING_MODE == 3 ? -1 : 1;
56651
- y.c = [y.e = 0];
56652
- return y;
56653
- }
56654
- return normalise(y, xc, ye);
56655
- };
56656
- P.modulo = P.mod = function(y, b) {
56657
- var q, s, x = this;
56658
- y = new BigNumber3(y, b);
56659
- if (!x.c || !y.s || y.c && !y.c[0]) {
56660
- return new BigNumber3(NaN);
56661
- } else if (!y.c || x.c && !x.c[0]) {
56662
- return new BigNumber3(x);
56663
- }
56664
- if (MODULO_MODE == 9) {
56665
- s = y.s;
56666
- y.s = 1;
56667
- q = div(x, y, 0, 3);
56668
- y.s = s;
56669
- q.s *= s;
56670
- } else {
56671
- q = div(x, y, 0, MODULO_MODE);
56672
- }
56673
- y = x.minus(q.times(y));
56674
- if (!y.c[0] && MODULO_MODE == 1) y.s = x.s;
56675
- return y;
56676
- };
56677
- P.multipliedBy = P.times = function(y, b) {
56678
- var c, e, i, j, k, m, xcL, xlo, xhi, ycL, ylo, yhi, zc, base, sqrtBase, x = this, xc = x.c, yc = (y = new BigNumber3(y, b)).c;
56679
- if (!xc || !yc || !xc[0] || !yc[0]) {
56680
- if (!x.s || !y.s || xc && !xc[0] && !yc || yc && !yc[0] && !xc) {
56681
- y.c = y.e = y.s = null;
56682
- } else {
56683
- y.s *= x.s;
56684
- if (!xc || !yc) {
56685
- y.c = y.e = null;
56686
- } else {
56687
- y.c = [0];
56688
- y.e = 0;
56689
- }
56690
- }
56691
- return y;
56692
- }
56693
- e = bitFloor(x.e / LOG_BASE) + bitFloor(y.e / LOG_BASE);
56694
- y.s *= x.s;
56695
- xcL = xc.length;
56696
- ycL = yc.length;
56697
- if (xcL < ycL) zc = xc, xc = yc, yc = zc, i = xcL, xcL = ycL, ycL = i;
56698
- for (i = xcL + ycL, zc = []; i--; zc.push(0)) ;
56699
- base = BASE;
56700
- sqrtBase = SQRT_BASE;
56701
- for (i = ycL; --i >= 0; ) {
56702
- c = 0;
56703
- ylo = yc[i] % sqrtBase;
56704
- yhi = yc[i] / sqrtBase | 0;
56705
- for (k = xcL, j = i + k; j > i; ) {
56706
- xlo = xc[--k] % sqrtBase;
56707
- xhi = xc[k] / sqrtBase | 0;
56708
- m = yhi * xlo + xhi * ylo;
56709
- xlo = ylo * xlo + m % sqrtBase * sqrtBase + zc[j] + c;
56710
- c = (xlo / base | 0) + (m / sqrtBase | 0) + yhi * xhi;
56711
- zc[j--] = xlo % base;
56712
- }
56713
- zc[j] = c;
56714
- }
56715
- if (c) {
56716
- ++e;
56717
- } else {
56718
- zc.splice(0, 1);
56719
- }
56720
- return normalise(y, zc, e);
56721
- };
56722
- P.negated = function() {
56723
- var x = new BigNumber3(this);
56724
- x.s = -x.s || null;
56725
- return x;
56726
- };
56727
- P.plus = function(y, b) {
56728
- var t, x = this, a = x.s;
56729
- y = new BigNumber3(y, b);
56730
- b = y.s;
56731
- if (!a || !b) return new BigNumber3(NaN);
56732
- if (a != b) {
56733
- y.s = -b;
56734
- return x.minus(y);
56735
- }
56736
- var xe = x.e / LOG_BASE, ye = y.e / LOG_BASE, xc = x.c, yc = y.c;
56737
- if (!xe || !ye) {
56738
- if (!xc || !yc) return new BigNumber3(a / 0);
56739
- if (!xc[0] || !yc[0]) return yc[0] ? y : new BigNumber3(xc[0] ? x : a * 0);
56740
- }
56741
- xe = bitFloor(xe);
56742
- ye = bitFloor(ye);
56743
- xc = xc.slice();
56744
- if (a = xe - ye) {
56745
- if (a > 0) {
56746
- ye = xe;
56747
- t = yc;
56748
- } else {
56749
- a = -a;
56750
- t = xc;
56751
- }
56752
- t.reverse();
56753
- for (; a--; t.push(0)) ;
56754
- t.reverse();
56755
- }
56756
- a = xc.length;
56757
- b = yc.length;
56758
- if (a - b < 0) t = yc, yc = xc, xc = t, b = a;
56759
- for (a = 0; b; ) {
56760
- a = (xc[--b] = xc[b] + yc[b] + a) / BASE | 0;
56761
- xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE;
56762
- }
56763
- if (a) {
56764
- xc = [a].concat(xc);
56765
- ++ye;
56766
- }
56767
- return normalise(y, xc, ye);
56768
- };
56769
- P.precision = P.sd = function(sd, rm) {
56770
- var c, n, v, x = this;
56771
- if (sd != null && sd !== !!sd) {
56772
- intCheck(sd, 1, MAX);
56773
- if (rm == null) rm = ROUNDING_MODE;
56774
- else intCheck(rm, 0, 8);
56775
- return round(new BigNumber3(x), sd, rm);
56776
- }
56777
- if (!(c = x.c)) return null;
56778
- v = c.length - 1;
56779
- n = v * LOG_BASE + 1;
56780
- if (v = c[v]) {
56781
- for (; v % 10 == 0; v /= 10, n--) ;
56782
- for (v = c[0]; v >= 10; v /= 10, n++) ;
56783
- }
56784
- if (sd && x.e + 1 > n) n = x.e + 1;
56785
- return n;
56786
- };
56787
- P.shiftedBy = function(k) {
56788
- intCheck(k, -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);
56789
- return this.times("1e" + k);
56790
- };
56791
- P.squareRoot = P.sqrt = function() {
56792
- var m, n, r, rep, t, x = this, c = x.c, s = x.s, e = x.e, dp = DECIMAL_PLACES + 4, half = new BigNumber3("0.5");
56793
- if (s !== 1 || !c || !c[0]) {
56794
- return new BigNumber3(!s || s < 0 && (!c || c[0]) ? NaN : c ? x : 1 / 0);
56795
- }
56796
- s = Math.sqrt(+valueOf(x));
56797
- if (s == 0 || s == 1 / 0) {
56798
- n = coeffToString(c);
56799
- if ((n.length + e) % 2 == 0) n += "0";
56800
- s = Math.sqrt(+n);
56801
- e = bitFloor((e + 1) / 2) - (e < 0 || e % 2);
56802
- if (s == 1 / 0) {
56803
- n = "1e" + e;
56804
- } else {
56805
- n = s.toExponential();
56806
- n = n.slice(0, n.indexOf("e") + 1) + e;
56807
- }
56808
- r = new BigNumber3(n);
56809
- } else {
56810
- r = new BigNumber3(s + "");
56811
- }
56812
- if (r.c[0]) {
56813
- e = r.e;
56814
- s = e + dp;
56815
- if (s < 3) s = 0;
56816
- for (; ; ) {
56817
- t = r;
56818
- r = half.times(t.plus(div(x, t, dp, 1)));
56819
- if (coeffToString(t.c).slice(0, s) === (n = coeffToString(r.c)).slice(0, s)) {
56820
- if (r.e < e) --s;
56821
- n = n.slice(s - 3, s + 1);
56822
- if (n == "9999" || !rep && n == "4999") {
56823
- if (!rep) {
56824
- round(t, t.e + DECIMAL_PLACES + 2, 0);
56825
- if (t.times(t).eq(x)) {
56826
- r = t;
56827
- break;
56828
- }
56829
- }
56830
- dp += 4;
56831
- s += 4;
56832
- rep = 1;
56833
- } else {
56834
- if (!+n || !+n.slice(1) && n.charAt(0) == "5") {
56835
- round(r, r.e + DECIMAL_PLACES + 2, 1);
56836
- m = !r.times(r).eq(x);
56837
- }
56838
- break;
56839
- }
56840
- }
56841
- }
56842
- }
56843
- return round(r, r.e + DECIMAL_PLACES + 1, ROUNDING_MODE, m);
56844
- };
56845
- P.toExponential = function(dp, rm) {
56846
- if (dp != null) {
56847
- intCheck(dp, 0, MAX);
56848
- dp++;
56849
- }
56850
- return format(this, dp, rm, 1);
56851
- };
56852
- P.toFixed = function(dp, rm) {
56853
- if (dp != null) {
56854
- intCheck(dp, 0, MAX);
56855
- dp = dp + this.e + 1;
56856
- }
56857
- return format(this, dp, rm);
56858
- };
56859
- P.toFormat = function(dp, rm, format2) {
56860
- var str, x = this;
56861
- if (format2 == null) {
56862
- if (dp != null && rm && typeof rm == "object") {
56863
- format2 = rm;
56864
- rm = null;
56865
- } else if (dp && typeof dp == "object") {
56866
- format2 = dp;
56867
- dp = rm = null;
56868
- } else {
56869
- format2 = FORMAT;
56870
- }
56871
- } else if (typeof format2 != "object") {
56872
- throw Error(bignumberError + "Argument not an object: " + format2);
56873
- }
56874
- str = x.toFixed(dp, rm);
56875
- if (x.c) {
56876
- var i, arr = str.split("."), g1 = +format2.groupSize, g2 = +format2.secondaryGroupSize, groupSeparator = format2.groupSeparator || "", intPart = arr[0], fractionPart = arr[1], isNeg = x.s < 0, intDigits = isNeg ? intPart.slice(1) : intPart, len = intDigits.length;
56877
- if (g2) i = g1, g1 = g2, g2 = i, len -= i;
56878
- if (g1 > 0 && len > 0) {
56879
- i = len % g1 || g1;
56880
- intPart = intDigits.substr(0, i);
56881
- for (; i < len; i += g1) intPart += groupSeparator + intDigits.substr(i, g1);
56882
- if (g2 > 0) intPart += groupSeparator + intDigits.slice(i);
56883
- if (isNeg) intPart = "-" + intPart;
56884
- }
56885
- str = fractionPart ? intPart + (format2.decimalSeparator || "") + ((g2 = +format2.fractionGroupSize) ? fractionPart.replace(
56886
- new RegExp("\\d{" + g2 + "}\\B", "g"),
56887
- "$&" + (format2.fractionGroupSeparator || "")
56888
- ) : fractionPart) : intPart;
56889
- }
56890
- return (format2.prefix || "") + str + (format2.suffix || "");
56891
- };
56892
- P.toFraction = function(md) {
56893
- var d, d0, d1, d2, e, exp, n, n0, n1, q, r, s, x = this, xc = x.c;
56894
- if (md != null) {
56895
- n = new BigNumber3(md);
56896
- if (!n.isInteger() && (n.c || n.s !== 1) || n.lt(ONE)) {
56897
- throw Error(bignumberError + "Argument " + (n.isInteger() ? "out of range: " : "not an integer: ") + valueOf(n));
56898
- }
56899
- }
56900
- if (!xc) return new BigNumber3(x);
56901
- d = new BigNumber3(ONE);
56902
- n1 = d0 = new BigNumber3(ONE);
56903
- d1 = n0 = new BigNumber3(ONE);
56904
- s = coeffToString(xc);
56905
- e = d.e = s.length - x.e - 1;
56906
- d.c[0] = POWS_TEN[(exp = e % LOG_BASE) < 0 ? LOG_BASE + exp : exp];
56907
- md = !md || n.comparedTo(d) > 0 ? e > 0 ? d : n1 : n;
56908
- exp = MAX_EXP;
56909
- MAX_EXP = 1 / 0;
56910
- n = new BigNumber3(s);
56911
- n0.c[0] = 0;
56912
- for (; ; ) {
56913
- q = div(n, d, 0, 1);
56914
- d2 = d0.plus(q.times(d1));
56915
- if (d2.comparedTo(md) == 1) break;
56916
- d0 = d1;
56917
- d1 = d2;
56918
- n1 = n0.plus(q.times(d2 = n1));
56919
- n0 = d2;
56920
- d = n.minus(q.times(d2 = d));
56921
- n = d2;
56922
- }
56923
- d2 = div(md.minus(d0), d1, 0, 1);
56924
- n0 = n0.plus(d2.times(n1));
56925
- d0 = d0.plus(d2.times(d1));
56926
- n0.s = n1.s = x.s;
56927
- e = e * 2;
56928
- r = div(n1, d1, e, ROUNDING_MODE).minus(x).abs().comparedTo(
56929
- div(n0, d0, e, ROUNDING_MODE).minus(x).abs()
56930
- ) < 1 ? [n1, d1] : [n0, d0];
56931
- MAX_EXP = exp;
56932
- return r;
56933
- };
56934
- P.toNumber = function() {
56935
- return +valueOf(this);
56936
- };
56937
- P.toPrecision = function(sd, rm) {
56938
- if (sd != null) intCheck(sd, 1, MAX);
56939
- return format(this, sd, rm, 2);
56940
- };
56941
- P.toString = function(b) {
56942
- var str, n = this, s = n.s, e = n.e;
56943
- if (e === null) {
56944
- if (s) {
56945
- str = "Infinity";
56946
- if (s < 0) str = "-" + str;
56947
- } else {
56948
- str = "NaN";
56949
- }
56950
- } else {
56951
- if (b == null) {
56952
- str = e <= TO_EXP_NEG || e >= TO_EXP_POS ? toExponential(coeffToString(n.c), e) : toFixedPoint(coeffToString(n.c), e, "0");
56953
- } else if (b === 10) {
56954
- n = round(new BigNumber3(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE);
55214
+ n = round(new BigNumber2(n), DECIMAL_PLACES + e + 1, ROUNDING_MODE);
56955
55215
  str = toFixedPoint(coeffToString(n.c), n.e, "0");
56956
55216
  } else {
56957
55217
  intCheck(b, 2, ALPHABET.length, "Base");
@@ -56965,8 +55225,8 @@ var require_bignumber2 = __commonJS({
56965
55225
  return valueOf(this);
56966
55226
  };
56967
55227
  P._isBigNumber = true;
56968
- if (configObject != null) BigNumber3.set(configObject);
56969
- return BigNumber3;
55228
+ if (configObject != null) BigNumber2.set(configObject);
55229
+ return BigNumber2;
56970
55230
  }
56971
55231
  function bitFloor(n) {
56972
55232
  var i = n | 0;
@@ -57026,24 +55286,433 @@ var require_bignumber2 = __commonJS({
57026
55286
  }
57027
55287
  return str;
57028
55288
  }
57029
- BigNumber2 = clone2();
57030
- BigNumber2["default"] = BigNumber2.BigNumber = BigNumber2;
55289
+ BigNumber = clone2();
55290
+ BigNumber["default"] = BigNumber.BigNumber = BigNumber;
57031
55291
  if (typeof define == "function" && define.amd) {
57032
55292
  define(function() {
57033
- return BigNumber2;
55293
+ return BigNumber;
57034
55294
  });
57035
55295
  } else if (typeof module != "undefined" && module.exports) {
57036
- module.exports = BigNumber2;
55296
+ module.exports = BigNumber;
57037
55297
  } else {
57038
55298
  if (!globalObject) {
57039
55299
  globalObject = typeof self != "undefined" && self ? self : window;
57040
55300
  }
57041
- globalObject.BigNumber = BigNumber2;
55301
+ globalObject.BigNumber = BigNumber;
57042
55302
  }
57043
55303
  })(exports);
57044
55304
  }
57045
55305
  });
57046
55306
 
55307
+ // node_modules/json-bigint/lib/stringify.js
55308
+ var require_stringify = __commonJS({
55309
+ "node_modules/json-bigint/lib/stringify.js"(exports, module) {
55310
+ var BigNumber = require_bignumber();
55311
+ var JSON2 = module.exports;
55312
+ (function() {
55313
+ "use strict";
55314
+ function f(n) {
55315
+ return n < 10 ? "0" + n : n;
55316
+ }
55317
+ var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, gap, indent, meta3 = {
55318
+ // table of character substitutions
55319
+ "\b": "\\b",
55320
+ " ": "\\t",
55321
+ "\n": "\\n",
55322
+ "\f": "\\f",
55323
+ "\r": "\\r",
55324
+ '"': '\\"',
55325
+ "\\": "\\\\"
55326
+ }, rep;
55327
+ function quote(string4) {
55328
+ escapable.lastIndex = 0;
55329
+ return escapable.test(string4) ? '"' + string4.replace(escapable, function(a) {
55330
+ var c = meta3[a];
55331
+ return typeof c === "string" ? c : "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4);
55332
+ }) + '"' : '"' + string4 + '"';
55333
+ }
55334
+ function str(key, holder) {
55335
+ var i, k, v, length, mind = gap, partial2, value = holder[key], isBigNumber3 = value != null && (value instanceof BigNumber || BigNumber.isBigNumber(value));
55336
+ if (value && typeof value === "object" && typeof value.toJSON === "function") {
55337
+ value = value.toJSON(key);
55338
+ }
55339
+ if (typeof rep === "function") {
55340
+ value = rep.call(holder, key, value);
55341
+ }
55342
+ switch (typeof value) {
55343
+ case "string":
55344
+ if (isBigNumber3) {
55345
+ return value;
55346
+ } else {
55347
+ return quote(value);
55348
+ }
55349
+ case "number":
55350
+ return isFinite(value) ? String(value) : "null";
55351
+ case "boolean":
55352
+ case "null":
55353
+ case "bigint":
55354
+ return String(value);
55355
+ // If the type is 'object', we might be dealing with an object or an array or
55356
+ // null.
55357
+ case "object":
55358
+ if (!value) {
55359
+ return "null";
55360
+ }
55361
+ gap += indent;
55362
+ partial2 = [];
55363
+ if (Object.prototype.toString.apply(value) === "[object Array]") {
55364
+ length = value.length;
55365
+ for (i = 0; i < length; i += 1) {
55366
+ partial2[i] = str(i, value) || "null";
55367
+ }
55368
+ v = partial2.length === 0 ? "[]" : gap ? "[\n" + gap + partial2.join(",\n" + gap) + "\n" + mind + "]" : "[" + partial2.join(",") + "]";
55369
+ gap = mind;
55370
+ return v;
55371
+ }
55372
+ if (rep && typeof rep === "object") {
55373
+ length = rep.length;
55374
+ for (i = 0; i < length; i += 1) {
55375
+ if (typeof rep[i] === "string") {
55376
+ k = rep[i];
55377
+ v = str(k, value);
55378
+ if (v) {
55379
+ partial2.push(quote(k) + (gap ? ": " : ":") + v);
55380
+ }
55381
+ }
55382
+ }
55383
+ } else {
55384
+ Object.keys(value).forEach(function(k2) {
55385
+ var v2 = str(k2, value);
55386
+ if (v2) {
55387
+ partial2.push(quote(k2) + (gap ? ": " : ":") + v2);
55388
+ }
55389
+ });
55390
+ }
55391
+ v = partial2.length === 0 ? "{}" : gap ? "{\n" + gap + partial2.join(",\n" + gap) + "\n" + mind + "}" : "{" + partial2.join(",") + "}";
55392
+ gap = mind;
55393
+ return v;
55394
+ }
55395
+ }
55396
+ if (typeof JSON2.stringify !== "function") {
55397
+ JSON2.stringify = function(value, replacer, space) {
55398
+ var i;
55399
+ gap = "";
55400
+ indent = "";
55401
+ if (typeof space === "number") {
55402
+ for (i = 0; i < space; i += 1) {
55403
+ indent += " ";
55404
+ }
55405
+ } else if (typeof space === "string") {
55406
+ indent = space;
55407
+ }
55408
+ rep = replacer;
55409
+ if (replacer && typeof replacer !== "function" && (typeof replacer !== "object" || typeof replacer.length !== "number")) {
55410
+ throw new Error("JSON.stringify");
55411
+ }
55412
+ return str("", { "": value });
55413
+ };
55414
+ }
55415
+ })();
55416
+ }
55417
+ });
55418
+
55419
+ // node_modules/json-bigint/lib/parse.js
55420
+ var require_parse2 = __commonJS({
55421
+ "node_modules/json-bigint/lib/parse.js"(exports, module) {
55422
+ var BigNumber = null;
55423
+ var suspectProtoRx = /(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/;
55424
+ var suspectConstructorRx = /(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;
55425
+ var json_parse = function(options) {
55426
+ "use strict";
55427
+ var _options = {
55428
+ strict: false,
55429
+ // not being strict means do not generate syntax errors for "duplicate key"
55430
+ storeAsString: false,
55431
+ // toggles whether the values should be stored as BigNumber (default) or a string
55432
+ alwaysParseAsBig: false,
55433
+ // toggles whether all numbers should be Big
55434
+ useNativeBigInt: false,
55435
+ // toggles whether to use native BigInt instead of bignumber.js
55436
+ protoAction: "error",
55437
+ constructorAction: "error"
55438
+ };
55439
+ if (options !== void 0 && options !== null) {
55440
+ if (options.strict === true) {
55441
+ _options.strict = true;
55442
+ }
55443
+ if (options.storeAsString === true) {
55444
+ _options.storeAsString = true;
55445
+ }
55446
+ _options.alwaysParseAsBig = options.alwaysParseAsBig === true ? options.alwaysParseAsBig : false;
55447
+ _options.useNativeBigInt = options.useNativeBigInt === true ? options.useNativeBigInt : false;
55448
+ if (typeof options.constructorAction !== "undefined") {
55449
+ if (options.constructorAction === "error" || options.constructorAction === "ignore" || options.constructorAction === "preserve") {
55450
+ _options.constructorAction = options.constructorAction;
55451
+ } else {
55452
+ throw new Error(
55453
+ `Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${options.constructorAction}`
55454
+ );
55455
+ }
55456
+ }
55457
+ if (typeof options.protoAction !== "undefined") {
55458
+ if (options.protoAction === "error" || options.protoAction === "ignore" || options.protoAction === "preserve") {
55459
+ _options.protoAction = options.protoAction;
55460
+ } else {
55461
+ throw new Error(
55462
+ `Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${options.protoAction}`
55463
+ );
55464
+ }
55465
+ }
55466
+ }
55467
+ var at, ch, escapee = {
55468
+ '"': '"',
55469
+ "\\": "\\",
55470
+ "/": "/",
55471
+ b: "\b",
55472
+ f: "\f",
55473
+ n: "\n",
55474
+ r: "\r",
55475
+ t: " "
55476
+ }, text, error49 = function(m) {
55477
+ throw {
55478
+ name: "SyntaxError",
55479
+ message: m,
55480
+ at,
55481
+ text
55482
+ };
55483
+ }, next = function(c) {
55484
+ if (c && c !== ch) {
55485
+ error49("Expected '" + c + "' instead of '" + ch + "'");
55486
+ }
55487
+ ch = text.charAt(at);
55488
+ at += 1;
55489
+ return ch;
55490
+ }, number4 = function() {
55491
+ var number5, string5 = "";
55492
+ if (ch === "-") {
55493
+ string5 = "-";
55494
+ next("-");
55495
+ }
55496
+ while (ch >= "0" && ch <= "9") {
55497
+ string5 += ch;
55498
+ next();
55499
+ }
55500
+ if (ch === ".") {
55501
+ string5 += ".";
55502
+ while (next() && ch >= "0" && ch <= "9") {
55503
+ string5 += ch;
55504
+ }
55505
+ }
55506
+ if (ch === "e" || ch === "E") {
55507
+ string5 += ch;
55508
+ next();
55509
+ if (ch === "-" || ch === "+") {
55510
+ string5 += ch;
55511
+ next();
55512
+ }
55513
+ while (ch >= "0" && ch <= "9") {
55514
+ string5 += ch;
55515
+ next();
55516
+ }
55517
+ }
55518
+ number5 = +string5;
55519
+ if (!isFinite(number5)) {
55520
+ error49("Bad number");
55521
+ } else {
55522
+ if (BigNumber == null) BigNumber = require_bignumber();
55523
+ if (string5.length > 15)
55524
+ return _options.storeAsString ? string5 : _options.useNativeBigInt ? BigInt(string5) : new BigNumber(string5);
55525
+ else
55526
+ return !_options.alwaysParseAsBig ? number5 : _options.useNativeBigInt ? BigInt(number5) : new BigNumber(number5);
55527
+ }
55528
+ }, string4 = function() {
55529
+ var hex3, i, string5 = "", uffff;
55530
+ if (ch === '"') {
55531
+ var startAt = at;
55532
+ while (next()) {
55533
+ if (ch === '"') {
55534
+ if (at - 1 > startAt) string5 += text.substring(startAt, at - 1);
55535
+ next();
55536
+ return string5;
55537
+ }
55538
+ if (ch === "\\") {
55539
+ if (at - 1 > startAt) string5 += text.substring(startAt, at - 1);
55540
+ next();
55541
+ if (ch === "u") {
55542
+ uffff = 0;
55543
+ for (i = 0; i < 4; i += 1) {
55544
+ hex3 = parseInt(next(), 16);
55545
+ if (!isFinite(hex3)) {
55546
+ break;
55547
+ }
55548
+ uffff = uffff * 16 + hex3;
55549
+ }
55550
+ string5 += String.fromCharCode(uffff);
55551
+ } else if (typeof escapee[ch] === "string") {
55552
+ string5 += escapee[ch];
55553
+ } else {
55554
+ break;
55555
+ }
55556
+ startAt = at;
55557
+ }
55558
+ }
55559
+ }
55560
+ error49("Bad string");
55561
+ }, white = function() {
55562
+ while (ch && ch <= " ") {
55563
+ next();
55564
+ }
55565
+ }, word = function() {
55566
+ switch (ch) {
55567
+ case "t":
55568
+ next("t");
55569
+ next("r");
55570
+ next("u");
55571
+ next("e");
55572
+ return true;
55573
+ case "f":
55574
+ next("f");
55575
+ next("a");
55576
+ next("l");
55577
+ next("s");
55578
+ next("e");
55579
+ return false;
55580
+ case "n":
55581
+ next("n");
55582
+ next("u");
55583
+ next("l");
55584
+ next("l");
55585
+ return null;
55586
+ }
55587
+ error49("Unexpected '" + ch + "'");
55588
+ }, value, array2 = function() {
55589
+ var array3 = [];
55590
+ if (ch === "[") {
55591
+ next("[");
55592
+ white();
55593
+ if (ch === "]") {
55594
+ next("]");
55595
+ return array3;
55596
+ }
55597
+ while (ch) {
55598
+ array3.push(value());
55599
+ white();
55600
+ if (ch === "]") {
55601
+ next("]");
55602
+ return array3;
55603
+ }
55604
+ next(",");
55605
+ white();
55606
+ }
55607
+ }
55608
+ error49("Bad array");
55609
+ }, object2 = function() {
55610
+ var key, object3 = /* @__PURE__ */ Object.create(null);
55611
+ if (ch === "{") {
55612
+ next("{");
55613
+ white();
55614
+ if (ch === "}") {
55615
+ next("}");
55616
+ return object3;
55617
+ }
55618
+ while (ch) {
55619
+ key = string4();
55620
+ white();
55621
+ next(":");
55622
+ if (_options.strict === true && Object.hasOwnProperty.call(object3, key)) {
55623
+ error49('Duplicate key "' + key + '"');
55624
+ }
55625
+ if (suspectProtoRx.test(key) === true) {
55626
+ if (_options.protoAction === "error") {
55627
+ error49("Object contains forbidden prototype property");
55628
+ } else if (_options.protoAction === "ignore") {
55629
+ value();
55630
+ } else {
55631
+ object3[key] = value();
55632
+ }
55633
+ } else if (suspectConstructorRx.test(key) === true) {
55634
+ if (_options.constructorAction === "error") {
55635
+ error49("Object contains forbidden constructor property");
55636
+ } else if (_options.constructorAction === "ignore") {
55637
+ value();
55638
+ } else {
55639
+ object3[key] = value();
55640
+ }
55641
+ } else {
55642
+ object3[key] = value();
55643
+ }
55644
+ white();
55645
+ if (ch === "}") {
55646
+ next("}");
55647
+ return object3;
55648
+ }
55649
+ next(",");
55650
+ white();
55651
+ }
55652
+ }
55653
+ error49("Bad object");
55654
+ };
55655
+ value = function() {
55656
+ white();
55657
+ switch (ch) {
55658
+ case "{":
55659
+ return object2();
55660
+ case "[":
55661
+ return array2();
55662
+ case '"':
55663
+ return string4();
55664
+ case "-":
55665
+ return number4();
55666
+ default:
55667
+ return ch >= "0" && ch <= "9" ? number4() : word();
55668
+ }
55669
+ };
55670
+ return function(source, reviver3) {
55671
+ var result;
55672
+ text = source + "";
55673
+ at = 0;
55674
+ ch = " ";
55675
+ result = value();
55676
+ white();
55677
+ if (ch) {
55678
+ error49("Syntax error");
55679
+ }
55680
+ return typeof reviver3 === "function" ? (function walk(holder, key) {
55681
+ var k, v, value2 = holder[key];
55682
+ if (value2 && typeof value2 === "object") {
55683
+ Object.keys(value2).forEach(function(k2) {
55684
+ v = walk(value2, k2);
55685
+ if (v !== void 0) {
55686
+ value2[k2] = v;
55687
+ } else {
55688
+ delete value2[k2];
55689
+ }
55690
+ });
55691
+ }
55692
+ return reviver3.call(holder, key, value2);
55693
+ })({ "": result }, "") : result;
55694
+ };
55695
+ };
55696
+ module.exports = json_parse;
55697
+ }
55698
+ });
55699
+
55700
+ // node_modules/json-bigint/index.js
55701
+ var require_json_bigint = __commonJS({
55702
+ "node_modules/json-bigint/index.js"(exports, module) {
55703
+ var json_stringify = require_stringify().stringify;
55704
+ var json_parse = require_parse2();
55705
+ module.exports = function(options) {
55706
+ return {
55707
+ parse: json_parse(options),
55708
+ stringify: json_stringify
55709
+ };
55710
+ };
55711
+ module.exports.parse = json_parse();
55712
+ module.exports.stringify = json_stringify;
55713
+ }
55714
+ });
55715
+
57047
55716
  // node_modules/lodash/lodash.js
57048
55717
  var require_lodash = __commonJS({
57049
55718
  "node_modules/lodash/lodash.js"(exports, module) {
@@ -64762,14 +63431,14 @@ var require_base2 = __commonJS({
64762
63431
  return { isValid: err };
64763
63432
  });
64764
63433
  }).share();
64765
- var success19 = validation.filter(function(state) {
63434
+ var success20 = validation.filter(function(state) {
64766
63435
  return state.isValid === true;
64767
63436
  }).take(1);
64768
63437
  var error49 = validation.filter(function(state) {
64769
63438
  return state.isValid !== true;
64770
- }).takeUntil(success19);
63439
+ }).takeUntil(success20);
64771
63440
  return {
64772
- success: success19,
63441
+ success: success20,
64773
63442
  error: error49
64774
63443
  };
64775
63444
  };
@@ -93398,10 +92067,23 @@ var package_default = {
93398
92067
  type: "module",
93399
92068
  homepage: "https://appwrite.io/support",
93400
92069
  description: "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
93401
- version: "13.4.0",
92070
+ version: "13.6.0",
93402
92071
  license: "BSD-3-Clause",
93403
- main: "dist/index.js",
92072
+ main: "dist/index.cjs",
92073
+ module: "dist/index.js",
93404
92074
  types: "dist/index.d.ts",
92075
+ exports: {
92076
+ ".": {
92077
+ import: {
92078
+ types: "./dist/index.d.ts",
92079
+ default: "./dist/index.js"
92080
+ },
92081
+ require: {
92082
+ types: "./dist/index.d.ts",
92083
+ default: "./dist/index.cjs"
92084
+ }
92085
+ }
92086
+ },
93405
92087
  bin: {
93406
92088
  appwrite: "dist/cli.cjs"
93407
92089
  },
@@ -93412,8 +92094,9 @@ var package_default = {
93412
92094
  scripts: {
93413
92095
  build: "npm run build:types && npm run build:runtime",
93414
92096
  "build:types": "tsc -p tsconfig.json --emitDeclarationOnly",
93415
- "build:runtime": "npm run build:lib:runtime && npm run build:cli",
93416
- "build:lib:runtime": "esbuild index.ts --bundle --platform=node --target=node18 --format=esm --loader:.hbs=text --outfile=dist/index.js",
92097
+ "build:runtime": "npm run build:lib:esm && npm run build:lib:cjs && npm run build:cli",
92098
+ "build:lib:esm": "esbuild index.ts --bundle --platform=node --target=node18 --format=esm --loader:.hbs=text --outfile=dist/index.js",
92099
+ "build:lib:cjs": "esbuild index.ts --bundle --platform=node --target=node18 --format=cjs --loader:.hbs=text --outfile=dist/index.cjs",
93417
92100
  "build:cli": "esbuild cli.ts --bundle --platform=node --target=node18 --format=cjs --loader:.hbs=text --external:fsevents --outfile=dist/cli.cjs",
93418
92101
  format: 'prettier --write "**/*.{js,ts,json,md}"',
93419
92102
  generate: "tsx scripts/generate-commands.ts",
@@ -93427,7 +92110,7 @@ var package_default = {
93427
92110
  "windows-arm64": "esbuild cli.ts --bundle --loader:.hbs=text --platform=node --target=node18 --format=esm --external:fsevents --outfile=dist/bundle-win-arm64.mjs && pkg dist/bundle-win-arm64.mjs -t node18-win-arm64 -o build/appwrite-cli-win-arm64.exe"
93428
92111
  },
93429
92112
  dependencies: {
93430
- "@appwrite.io/console": "^2.3.1",
92113
+ "@appwrite.io/console": "^3.1.0",
93431
92114
  chalk: "4.1.2",
93432
92115
  chokidar: "^3.6.0",
93433
92116
  "cli-progress": "^3.12.0",
@@ -107661,7 +106344,7 @@ import childProcess from "child_process";
107661
106344
  // lib/constants.ts
107662
106345
  var SDK_TITLE = "Appwrite";
107663
106346
  var SDK_TITLE_LOWER = "appwrite";
107664
- var SDK_VERSION = "13.4.0";
106347
+ var SDK_VERSION = "13.6.0";
107665
106348
  var SDK_NAME = "Command Line";
107666
106349
  var SDK_PLATFORM = "console";
107667
106350
  var SDK_LANGUAGE = "cli";
@@ -107799,6 +106482,14 @@ function isCloud() {
107799
106482
  const hostname3 = new URL(endpoint).hostname;
107800
106483
  return hostname3.endsWith("appwrite.io");
107801
106484
  }
106485
+ function arrayEqualsUnordered(left, right) {
106486
+ const a = Array.isArray(left) ? [...left].map((item) => String(item)).sort() : [];
106487
+ const b = Array.isArray(right) ? [...right].map((item) => String(item)).sort() : [];
106488
+ if (a.length !== b.length) {
106489
+ return false;
106490
+ }
106491
+ return a.every((value, index) => value === b[index]);
106492
+ }
107802
106493
  function filterBySchema(data, schema) {
107803
106494
  const allowedKeys = Object.keys(schema.shape);
107804
106495
  const result = {};
@@ -107816,6 +106507,8 @@ var JSONbigParser = (0, import_json_bigint.default)({ storeAsString: false });
107816
106507
  var JSONbigSerializer = (0, import_json_bigint.default)({ useNativeBigInt: true });
107817
106508
  var MAX_SAFE = BigInt(Number.MAX_SAFE_INTEGER);
107818
106509
  var MIN_SAFE = BigInt(Number.MIN_SAFE_INTEGER);
106510
+ var MAX_INT64 = BigInt("9223372036854775807");
106511
+ var MIN_INT64 = BigInt("-9223372036854775808");
107819
106512
  function isBigNumber(value) {
107820
106513
  return value !== null && typeof value === "object" && value._isBigNumber === true && typeof value.isInteger === "function" && typeof value.toFixed === "function" && typeof value.toNumber === "function";
107821
106514
  }
@@ -107827,7 +106520,10 @@ function reviver(_key, value) {
107827
106520
  if (bi >= MIN_SAFE && bi <= MAX_SAFE) {
107828
106521
  return Number(str);
107829
106522
  }
107830
- return bi;
106523
+ if (bi >= MIN_INT64 && bi <= MAX_INT64) {
106524
+ return bi;
106525
+ }
106526
+ return value.toNumber();
107831
106527
  }
107832
106528
  return value.toNumber();
107833
106529
  }
@@ -108497,7 +107193,6 @@ import os2 from "os";
108497
107193
 
108498
107194
  // node_modules/@appwrite.io/console/dist/esm/sdk.js
108499
107195
  var import_json_bigint2 = __toESM(require_json_bigint(), 1);
108500
- var import_bignumber = __toESM(require_bignumber2(), 1);
108501
107196
  function __awaiter(thisArg, _arguments, P, generator) {
108502
107197
  function adopt(value) {
108503
107198
  return value instanceof P ? value : new P(function(resolve3) {
@@ -108587,6 +107282,8 @@ Query.cursorBefore = (documentId) => new Query("cursorBefore", void 0, documentI
108587
107282
  Query.limit = (limit) => new Query("limit", void 0, limit).toString();
108588
107283
  Query.offset = (offset) => new Query("offset", void 0, offset).toString();
108589
107284
  Query.contains = (attribute, value) => new Query("contains", attribute, value).toString();
107285
+ Query.containsAny = (attribute, value) => new Query("containsAny", attribute, value).toString();
107286
+ Query.containsAll = (attribute, value) => new Query("containsAll", attribute, value).toString();
108590
107287
  Query.notContains = (attribute, value) => new Query("notContains", attribute, value).toString();
108591
107288
  Query.notSearch = (attribute, value) => new Query("notSearch", attribute, value).toString();
108592
107289
  Query.notBetween = (attribute, start, end) => new Query("notBetween", attribute, [start, end]).toString();
@@ -108617,15 +107314,23 @@ var JSONbigParser2 = (0, import_json_bigint2.default)({ storeAsString: false });
108617
107314
  var JSONbigSerializer2 = (0, import_json_bigint2.default)({ useNativeBigInt: true });
108618
107315
  var MAX_SAFE2 = BigInt(Number.MAX_SAFE_INTEGER);
108619
107316
  var MIN_SAFE2 = BigInt(Number.MIN_SAFE_INTEGER);
107317
+ var MAX_INT642 = BigInt("9223372036854775807");
107318
+ var MIN_INT642 = BigInt("-9223372036854775808");
107319
+ function isBigNumber2(value) {
107320
+ return value !== null && typeof value === "object" && value._isBigNumber === true && typeof value.isInteger === "function" && typeof value.toFixed === "function" && typeof value.toNumber === "function";
107321
+ }
108620
107322
  function reviver2(_key, value) {
108621
- if (import_bignumber.default.isBigNumber(value)) {
107323
+ if (isBigNumber2(value)) {
108622
107324
  if (value.isInteger()) {
108623
107325
  const str = value.toFixed();
108624
107326
  const bi = BigInt(str);
108625
107327
  if (bi >= MIN_SAFE2 && bi <= MAX_SAFE2) {
108626
107328
  return Number(str);
108627
107329
  }
108628
- return bi;
107330
+ if (bi >= MIN_INT642 && bi <= MAX_INT642) {
107331
+ return bi;
107332
+ }
107333
+ return value.toNumber();
108629
107334
  }
108630
107335
  return value.toNumber();
108631
107336
  }
@@ -108672,7 +107377,7 @@ var Client = class _Client {
108672
107377
  "x-sdk-name": "Console",
108673
107378
  "x-sdk-platform": "console",
108674
107379
  "x-sdk-language": "web",
108675
- "x-sdk-version": "2.3.1",
107380
+ "x-sdk-version": "3.1.0",
108676
107381
  "X-Appwrite-Response-Format": "1.8.0"
108677
107382
  };
108678
107383
  this.realtime = {
@@ -110668,7 +109373,7 @@ var Account = class {
110668
109373
  };
110669
109374
  }
110670
109375
  const provider = params.provider;
110671
- const success19 = params.success;
109376
+ const success20 = params.success;
110672
109377
  const failure = params.failure;
110673
109378
  const scopes = params.scopes;
110674
109379
  if (typeof provider === "undefined") {
@@ -110676,8 +109381,8 @@ var Account = class {
110676
109381
  }
110677
109382
  const apiPath = "/account/sessions/oauth2/{provider}".replace("{provider}", provider);
110678
109383
  const payload = {};
110679
- if (typeof success19 !== "undefined") {
110680
- payload["success"] = success19;
109384
+ if (typeof success20 !== "undefined") {
109385
+ payload["success"] = success20;
110681
109386
  }
110682
109387
  if (typeof failure !== "undefined") {
110683
109388
  payload["failure"] = failure;
@@ -111016,7 +109721,7 @@ var Account = class {
111016
109721
  };
111017
109722
  }
111018
109723
  const provider = params.provider;
111019
- const success19 = params.success;
109724
+ const success20 = params.success;
111020
109725
  const failure = params.failure;
111021
109726
  const scopes = params.scopes;
111022
109727
  if (typeof provider === "undefined") {
@@ -111024,8 +109729,8 @@ var Account = class {
111024
109729
  }
111025
109730
  const apiPath = "/account/tokens/oauth2/{provider}".replace("{provider}", provider);
111026
109731
  const payload = {};
111027
- if (typeof success19 !== "undefined") {
111028
- payload["success"] = success19;
109732
+ if (typeof success20 !== "undefined") {
109733
+ payload["success"] = success20;
111029
109734
  }
111030
109735
  if (typeof failure !== "undefined") {
111031
109736
  payload["failure"] = failure;
@@ -111237,6 +109942,385 @@ var Account = class {
111237
109942
  return this.client.call("put", uri, apiHeaders, payload);
111238
109943
  }
111239
109944
  };
109945
+ var Activities = class {
109946
+ constructor(client2) {
109947
+ this.client = client2;
109948
+ }
109949
+ listEvents(paramsOrFirst) {
109950
+ let params;
109951
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
109952
+ params = paramsOrFirst || {};
109953
+ } else {
109954
+ params = {
109955
+ queries: paramsOrFirst
109956
+ };
109957
+ }
109958
+ const queries = params.queries;
109959
+ const apiPath = "/activities/events";
109960
+ const payload = {};
109961
+ if (typeof queries !== "undefined") {
109962
+ payload["queries"] = queries;
109963
+ }
109964
+ const uri = new URL(this.client.config.endpoint + apiPath);
109965
+ const apiHeaders = {};
109966
+ return this.client.call("get", uri, apiHeaders, payload);
109967
+ }
109968
+ getEvent(paramsOrFirst) {
109969
+ let params;
109970
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
109971
+ params = paramsOrFirst || {};
109972
+ } else {
109973
+ params = {
109974
+ eventId: paramsOrFirst
109975
+ };
109976
+ }
109977
+ const eventId = params.eventId;
109978
+ if (typeof eventId === "undefined") {
109979
+ throw new AppwriteException('Missing required parameter: "eventId"');
109980
+ }
109981
+ const apiPath = "/activities/events/{eventId}".replace("{eventId}", eventId);
109982
+ const payload = {};
109983
+ const uri = new URL(this.client.config.endpoint + apiPath);
109984
+ const apiHeaders = {};
109985
+ return this.client.call("get", uri, apiHeaders, payload);
109986
+ }
109987
+ };
109988
+ var Backups = class {
109989
+ constructor(client2) {
109990
+ this.client = client2;
109991
+ }
109992
+ listArchives(paramsOrFirst) {
109993
+ let params;
109994
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
109995
+ params = paramsOrFirst || {};
109996
+ } else {
109997
+ params = {
109998
+ queries: paramsOrFirst
109999
+ };
110000
+ }
110001
+ const queries = params.queries;
110002
+ const apiPath = "/backups/archives";
110003
+ const payload = {};
110004
+ if (typeof queries !== "undefined") {
110005
+ payload["queries"] = queries;
110006
+ }
110007
+ const uri = new URL(this.client.config.endpoint + apiPath);
110008
+ const apiHeaders = {};
110009
+ return this.client.call("get", uri, apiHeaders, payload);
110010
+ }
110011
+ createArchive(paramsOrFirst, ...rest) {
110012
+ let params;
110013
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && ("services" in paramsOrFirst || "resourceId" in paramsOrFirst)) {
110014
+ params = paramsOrFirst || {};
110015
+ } else {
110016
+ params = {
110017
+ services: paramsOrFirst,
110018
+ resourceId: rest[0]
110019
+ };
110020
+ }
110021
+ const services = params.services;
110022
+ const resourceId = params.resourceId;
110023
+ if (typeof services === "undefined") {
110024
+ throw new AppwriteException('Missing required parameter: "services"');
110025
+ }
110026
+ const apiPath = "/backups/archives";
110027
+ const payload = {};
110028
+ if (typeof services !== "undefined") {
110029
+ payload["services"] = services;
110030
+ }
110031
+ if (typeof resourceId !== "undefined") {
110032
+ payload["resourceId"] = resourceId;
110033
+ }
110034
+ const uri = new URL(this.client.config.endpoint + apiPath);
110035
+ const apiHeaders = {
110036
+ "content-type": "application/json"
110037
+ };
110038
+ return this.client.call("post", uri, apiHeaders, payload);
110039
+ }
110040
+ getArchive(paramsOrFirst) {
110041
+ let params;
110042
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
110043
+ params = paramsOrFirst || {};
110044
+ } else {
110045
+ params = {
110046
+ archiveId: paramsOrFirst
110047
+ };
110048
+ }
110049
+ const archiveId = params.archiveId;
110050
+ if (typeof archiveId === "undefined") {
110051
+ throw new AppwriteException('Missing required parameter: "archiveId"');
110052
+ }
110053
+ const apiPath = "/backups/archives/{archiveId}".replace("{archiveId}", archiveId);
110054
+ const payload = {};
110055
+ const uri = new URL(this.client.config.endpoint + apiPath);
110056
+ const apiHeaders = {};
110057
+ return this.client.call("get", uri, apiHeaders, payload);
110058
+ }
110059
+ deleteArchive(paramsOrFirst) {
110060
+ let params;
110061
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
110062
+ params = paramsOrFirst || {};
110063
+ } else {
110064
+ params = {
110065
+ archiveId: paramsOrFirst
110066
+ };
110067
+ }
110068
+ const archiveId = params.archiveId;
110069
+ if (typeof archiveId === "undefined") {
110070
+ throw new AppwriteException('Missing required parameter: "archiveId"');
110071
+ }
110072
+ const apiPath = "/backups/archives/{archiveId}".replace("{archiveId}", archiveId);
110073
+ const payload = {};
110074
+ const uri = new URL(this.client.config.endpoint + apiPath);
110075
+ const apiHeaders = {
110076
+ "content-type": "application/json"
110077
+ };
110078
+ return this.client.call("delete", uri, apiHeaders, payload);
110079
+ }
110080
+ listPolicies(paramsOrFirst) {
110081
+ let params;
110082
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
110083
+ params = paramsOrFirst || {};
110084
+ } else {
110085
+ params = {
110086
+ queries: paramsOrFirst
110087
+ };
110088
+ }
110089
+ const queries = params.queries;
110090
+ const apiPath = "/backups/policies";
110091
+ const payload = {};
110092
+ if (typeof queries !== "undefined") {
110093
+ payload["queries"] = queries;
110094
+ }
110095
+ const uri = new URL(this.client.config.endpoint + apiPath);
110096
+ const apiHeaders = {};
110097
+ return this.client.call("get", uri, apiHeaders, payload);
110098
+ }
110099
+ createPolicy(paramsOrFirst, ...rest) {
110100
+ let params;
110101
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
110102
+ params = paramsOrFirst || {};
110103
+ } else {
110104
+ params = {
110105
+ policyId: paramsOrFirst,
110106
+ services: rest[0],
110107
+ retention: rest[1],
110108
+ schedule: rest[2],
110109
+ name: rest[3],
110110
+ resourceId: rest[4],
110111
+ enabled: rest[5]
110112
+ };
110113
+ }
110114
+ const policyId = params.policyId;
110115
+ const services = params.services;
110116
+ const retention = params.retention;
110117
+ const schedule = params.schedule;
110118
+ const name = params.name;
110119
+ const resourceId = params.resourceId;
110120
+ const enabled = params.enabled;
110121
+ if (typeof policyId === "undefined") {
110122
+ throw new AppwriteException('Missing required parameter: "policyId"');
110123
+ }
110124
+ if (typeof services === "undefined") {
110125
+ throw new AppwriteException('Missing required parameter: "services"');
110126
+ }
110127
+ if (typeof retention === "undefined") {
110128
+ throw new AppwriteException('Missing required parameter: "retention"');
110129
+ }
110130
+ if (typeof schedule === "undefined") {
110131
+ throw new AppwriteException('Missing required parameter: "schedule"');
110132
+ }
110133
+ const apiPath = "/backups/policies";
110134
+ const payload = {};
110135
+ if (typeof policyId !== "undefined") {
110136
+ payload["policyId"] = policyId;
110137
+ }
110138
+ if (typeof name !== "undefined") {
110139
+ payload["name"] = name;
110140
+ }
110141
+ if (typeof services !== "undefined") {
110142
+ payload["services"] = services;
110143
+ }
110144
+ if (typeof resourceId !== "undefined") {
110145
+ payload["resourceId"] = resourceId;
110146
+ }
110147
+ if (typeof enabled !== "undefined") {
110148
+ payload["enabled"] = enabled;
110149
+ }
110150
+ if (typeof retention !== "undefined") {
110151
+ payload["retention"] = retention;
110152
+ }
110153
+ if (typeof schedule !== "undefined") {
110154
+ payload["schedule"] = schedule;
110155
+ }
110156
+ const uri = new URL(this.client.config.endpoint + apiPath);
110157
+ const apiHeaders = {
110158
+ "content-type": "application/json"
110159
+ };
110160
+ return this.client.call("post", uri, apiHeaders, payload);
110161
+ }
110162
+ getPolicy(paramsOrFirst) {
110163
+ let params;
110164
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
110165
+ params = paramsOrFirst || {};
110166
+ } else {
110167
+ params = {
110168
+ policyId: paramsOrFirst
110169
+ };
110170
+ }
110171
+ const policyId = params.policyId;
110172
+ if (typeof policyId === "undefined") {
110173
+ throw new AppwriteException('Missing required parameter: "policyId"');
110174
+ }
110175
+ const apiPath = "/backups/policies/{policyId}".replace("{policyId}", policyId);
110176
+ const payload = {};
110177
+ const uri = new URL(this.client.config.endpoint + apiPath);
110178
+ const apiHeaders = {};
110179
+ return this.client.call("get", uri, apiHeaders, payload);
110180
+ }
110181
+ updatePolicy(paramsOrFirst, ...rest) {
110182
+ let params;
110183
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
110184
+ params = paramsOrFirst || {};
110185
+ } else {
110186
+ params = {
110187
+ policyId: paramsOrFirst,
110188
+ name: rest[0],
110189
+ retention: rest[1],
110190
+ schedule: rest[2],
110191
+ enabled: rest[3]
110192
+ };
110193
+ }
110194
+ const policyId = params.policyId;
110195
+ const name = params.name;
110196
+ const retention = params.retention;
110197
+ const schedule = params.schedule;
110198
+ const enabled = params.enabled;
110199
+ if (typeof policyId === "undefined") {
110200
+ throw new AppwriteException('Missing required parameter: "policyId"');
110201
+ }
110202
+ const apiPath = "/backups/policies/{policyId}".replace("{policyId}", policyId);
110203
+ const payload = {};
110204
+ if (typeof name !== "undefined") {
110205
+ payload["name"] = name;
110206
+ }
110207
+ if (typeof retention !== "undefined") {
110208
+ payload["retention"] = retention;
110209
+ }
110210
+ if (typeof schedule !== "undefined") {
110211
+ payload["schedule"] = schedule;
110212
+ }
110213
+ if (typeof enabled !== "undefined") {
110214
+ payload["enabled"] = enabled;
110215
+ }
110216
+ const uri = new URL(this.client.config.endpoint + apiPath);
110217
+ const apiHeaders = {
110218
+ "content-type": "application/json"
110219
+ };
110220
+ return this.client.call("patch", uri, apiHeaders, payload);
110221
+ }
110222
+ deletePolicy(paramsOrFirst) {
110223
+ let params;
110224
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
110225
+ params = paramsOrFirst || {};
110226
+ } else {
110227
+ params = {
110228
+ policyId: paramsOrFirst
110229
+ };
110230
+ }
110231
+ const policyId = params.policyId;
110232
+ if (typeof policyId === "undefined") {
110233
+ throw new AppwriteException('Missing required parameter: "policyId"');
110234
+ }
110235
+ const apiPath = "/backups/policies/{policyId}".replace("{policyId}", policyId);
110236
+ const payload = {};
110237
+ const uri = new URL(this.client.config.endpoint + apiPath);
110238
+ const apiHeaders = {
110239
+ "content-type": "application/json"
110240
+ };
110241
+ return this.client.call("delete", uri, apiHeaders, payload);
110242
+ }
110243
+ createRestoration(paramsOrFirst, ...rest) {
110244
+ let params;
110245
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
110246
+ params = paramsOrFirst || {};
110247
+ } else {
110248
+ params = {
110249
+ archiveId: paramsOrFirst,
110250
+ services: rest[0],
110251
+ newResourceId: rest[1],
110252
+ newResourceName: rest[2]
110253
+ };
110254
+ }
110255
+ const archiveId = params.archiveId;
110256
+ const services = params.services;
110257
+ const newResourceId = params.newResourceId;
110258
+ const newResourceName = params.newResourceName;
110259
+ if (typeof archiveId === "undefined") {
110260
+ throw new AppwriteException('Missing required parameter: "archiveId"');
110261
+ }
110262
+ if (typeof services === "undefined") {
110263
+ throw new AppwriteException('Missing required parameter: "services"');
110264
+ }
110265
+ const apiPath = "/backups/restoration";
110266
+ const payload = {};
110267
+ if (typeof archiveId !== "undefined") {
110268
+ payload["archiveId"] = archiveId;
110269
+ }
110270
+ if (typeof services !== "undefined") {
110271
+ payload["services"] = services;
110272
+ }
110273
+ if (typeof newResourceId !== "undefined") {
110274
+ payload["newResourceId"] = newResourceId;
110275
+ }
110276
+ if (typeof newResourceName !== "undefined") {
110277
+ payload["newResourceName"] = newResourceName;
110278
+ }
110279
+ const uri = new URL(this.client.config.endpoint + apiPath);
110280
+ const apiHeaders = {
110281
+ "content-type": "application/json"
110282
+ };
110283
+ return this.client.call("post", uri, apiHeaders, payload);
110284
+ }
110285
+ listRestorations(paramsOrFirst) {
110286
+ let params;
110287
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
110288
+ params = paramsOrFirst || {};
110289
+ } else {
110290
+ params = {
110291
+ queries: paramsOrFirst
110292
+ };
110293
+ }
110294
+ const queries = params.queries;
110295
+ const apiPath = "/backups/restorations";
110296
+ const payload = {};
110297
+ if (typeof queries !== "undefined") {
110298
+ payload["queries"] = queries;
110299
+ }
110300
+ const uri = new URL(this.client.config.endpoint + apiPath);
110301
+ const apiHeaders = {};
110302
+ return this.client.call("get", uri, apiHeaders, payload);
110303
+ }
110304
+ getRestoration(paramsOrFirst) {
110305
+ let params;
110306
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
110307
+ params = paramsOrFirst || {};
110308
+ } else {
110309
+ params = {
110310
+ restorationId: paramsOrFirst
110311
+ };
110312
+ }
110313
+ const restorationId = params.restorationId;
110314
+ if (typeof restorationId === "undefined") {
110315
+ throw new AppwriteException('Missing required parameter: "restorationId"');
110316
+ }
110317
+ const apiPath = "/backups/restorations/{restorationId}".replace("{restorationId}", restorationId);
110318
+ const payload = {};
110319
+ const uri = new URL(this.client.config.endpoint + apiPath);
110320
+ const apiHeaders = {};
110321
+ return this.client.call("get", uri, apiHeaders, payload);
110322
+ }
110323
+ };
111240
110324
  var Console = class {
111241
110325
  constructor(client2) {
111242
110326
  this.client = client2;
@@ -121071,21 +120155,26 @@ var Organizations = class {
121071
120155
  const apiHeaders = {};
121072
120156
  return this.client.call("get", uri, apiHeaders, payload);
121073
120157
  }
121074
- getScopes(paramsOrFirst) {
120158
+ getScopes(paramsOrFirst, ...rest) {
121075
120159
  let params;
121076
120160
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
121077
120161
  params = paramsOrFirst || {};
121078
120162
  } else {
121079
120163
  params = {
121080
- organizationId: paramsOrFirst
120164
+ organizationId: paramsOrFirst,
120165
+ projectId: rest[0]
121081
120166
  };
121082
120167
  }
121083
120168
  const organizationId = params.organizationId;
120169
+ const projectId = params.projectId;
121084
120170
  if (typeof organizationId === "undefined") {
121085
120171
  throw new AppwriteException('Missing required parameter: "organizationId"');
121086
120172
  }
121087
120173
  const apiPath = "/organizations/{organizationId}/roles".replace("{organizationId}", organizationId);
121088
120174
  const payload = {};
120175
+ if (typeof projectId !== "undefined") {
120176
+ payload["projectId"] = projectId;
120177
+ }
121089
120178
  const uri = new URL(this.client.config.endpoint + apiPath);
121090
120179
  const apiHeaders = {};
121091
120180
  return this.client.call("get", uri, apiHeaders, payload);
@@ -122661,6 +121750,114 @@ var Projects = class {
122661
121750
  };
122662
121751
  return this.client.call("delete", uri, apiHeaders, payload);
122663
121752
  }
121753
+ listSchedules(paramsOrFirst, ...rest) {
121754
+ let params;
121755
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
121756
+ params = paramsOrFirst || {};
121757
+ } else {
121758
+ params = {
121759
+ projectId: paramsOrFirst,
121760
+ queries: rest[0],
121761
+ total: rest[1]
121762
+ };
121763
+ }
121764
+ const projectId = params.projectId;
121765
+ const queries = params.queries;
121766
+ const total = params.total;
121767
+ if (typeof projectId === "undefined") {
121768
+ throw new AppwriteException('Missing required parameter: "projectId"');
121769
+ }
121770
+ const apiPath = "/projects/{projectId}/schedules".replace("{projectId}", projectId);
121771
+ const payload = {};
121772
+ if (typeof queries !== "undefined") {
121773
+ payload["queries"] = queries;
121774
+ }
121775
+ if (typeof total !== "undefined") {
121776
+ payload["total"] = total;
121777
+ }
121778
+ const uri = new URL(this.client.config.endpoint + apiPath);
121779
+ const apiHeaders = {};
121780
+ return this.client.call("get", uri, apiHeaders, payload);
121781
+ }
121782
+ createSchedule(paramsOrFirst, ...rest) {
121783
+ let params;
121784
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
121785
+ params = paramsOrFirst || {};
121786
+ } else {
121787
+ params = {
121788
+ projectId: paramsOrFirst,
121789
+ resourceType: rest[0],
121790
+ resourceId: rest[1],
121791
+ schedule: rest[2],
121792
+ active: rest[3],
121793
+ data: rest[4]
121794
+ };
121795
+ }
121796
+ const projectId = params.projectId;
121797
+ const resourceType = params.resourceType;
121798
+ const resourceId = params.resourceId;
121799
+ const schedule = params.schedule;
121800
+ const active = params.active;
121801
+ const data = params.data;
121802
+ if (typeof projectId === "undefined") {
121803
+ throw new AppwriteException('Missing required parameter: "projectId"');
121804
+ }
121805
+ if (typeof resourceType === "undefined") {
121806
+ throw new AppwriteException('Missing required parameter: "resourceType"');
121807
+ }
121808
+ if (typeof resourceId === "undefined") {
121809
+ throw new AppwriteException('Missing required parameter: "resourceId"');
121810
+ }
121811
+ if (typeof schedule === "undefined") {
121812
+ throw new AppwriteException('Missing required parameter: "schedule"');
121813
+ }
121814
+ const apiPath = "/projects/{projectId}/schedules".replace("{projectId}", projectId);
121815
+ const payload = {};
121816
+ if (typeof resourceType !== "undefined") {
121817
+ payload["resourceType"] = resourceType;
121818
+ }
121819
+ if (typeof resourceId !== "undefined") {
121820
+ payload["resourceId"] = resourceId;
121821
+ }
121822
+ if (typeof schedule !== "undefined") {
121823
+ payload["schedule"] = schedule;
121824
+ }
121825
+ if (typeof active !== "undefined") {
121826
+ payload["active"] = active;
121827
+ }
121828
+ if (typeof data !== "undefined") {
121829
+ payload["data"] = data;
121830
+ }
121831
+ const uri = new URL(this.client.config.endpoint + apiPath);
121832
+ const apiHeaders = {
121833
+ "content-type": "application/json"
121834
+ };
121835
+ return this.client.call("post", uri, apiHeaders, payload);
121836
+ }
121837
+ getSchedule(paramsOrFirst, ...rest) {
121838
+ let params;
121839
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
121840
+ params = paramsOrFirst || {};
121841
+ } else {
121842
+ params = {
121843
+ projectId: paramsOrFirst,
121844
+ scheduleId: rest[0]
121845
+ };
121846
+ }
121847
+ const projectId = params.projectId;
121848
+ const scheduleId = params.scheduleId;
121849
+ if (typeof projectId === "undefined") {
121850
+ throw new AppwriteException('Missing required parameter: "projectId"');
121851
+ }
121852
+ if (typeof scheduleId === "undefined") {
121853
+ throw new AppwriteException('Missing required parameter: "scheduleId"');
121854
+ }
121855
+ const apiPath = "/projects/{projectId}/schedules/{scheduleId}".replace("{projectId}", projectId).replace("{scheduleId}", scheduleId);
121856
+ const payload = {};
121857
+ const uri = new URL(this.client.config.endpoint + apiPath);
121858
+ const apiHeaders = {};
121859
+ return this.client.call("get", uri, apiHeaders, payload);
121860
+ }
122664
121861
  updateServiceStatus(paramsOrFirst, ...rest) {
122665
121862
  let params;
122666
121863
  if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -131316,6 +130513,8 @@ var Scopes;
131316
130513
  Scopes3["TargetsWrite"] = "targets.write";
131317
130514
  Scopes3["RulesRead"] = "rules.read";
131318
130515
  Scopes3["RulesWrite"] = "rules.write";
130516
+ Scopes3["SchedulesRead"] = "schedules.read";
130517
+ Scopes3["SchedulesWrite"] = "schedules.write";
131319
130518
  Scopes3["MigrationsRead"] = "migrations.read";
131320
130519
  Scopes3["MigrationsWrite"] = "migrations.write";
131321
130520
  Scopes3["VcsRead"] = "vcs.read";
@@ -131385,8 +130584,6 @@ var OAuthProvider;
131385
130584
  OAuthProvider2["Yandex"] = "yandex";
131386
130585
  OAuthProvider2["Zoho"] = "zoho";
131387
130586
  OAuthProvider2["Zoom"] = "zoom";
131388
- OAuthProvider2["GithubImagine"] = "githubImagine";
131389
- OAuthProvider2["GoogleImagine"] = "googleImagine";
131390
130587
  })(OAuthProvider || (OAuthProvider = {}));
131391
130588
  var Browser;
131392
130589
  (function(Browser2) {
@@ -132150,24 +131347,35 @@ var Runtime;
132150
131347
  Runtime2["Node200"] = "node-20.0";
132151
131348
  Runtime2["Node210"] = "node-21.0";
132152
131349
  Runtime2["Node22"] = "node-22";
131350
+ Runtime2["Node23"] = "node-23";
131351
+ Runtime2["Node24"] = "node-24";
131352
+ Runtime2["Node25"] = "node-25";
132153
131353
  Runtime2["Php80"] = "php-8.0";
132154
131354
  Runtime2["Php81"] = "php-8.1";
132155
131355
  Runtime2["Php82"] = "php-8.2";
132156
131356
  Runtime2["Php83"] = "php-8.3";
131357
+ Runtime2["Php84"] = "php-8.4";
132157
131358
  Runtime2["Ruby30"] = "ruby-3.0";
132158
131359
  Runtime2["Ruby31"] = "ruby-3.1";
132159
131360
  Runtime2["Ruby32"] = "ruby-3.2";
132160
131361
  Runtime2["Ruby33"] = "ruby-3.3";
131362
+ Runtime2["Ruby34"] = "ruby-3.4";
131363
+ Runtime2["Ruby40"] = "ruby-4.0";
132161
131364
  Runtime2["Python38"] = "python-3.8";
132162
131365
  Runtime2["Python39"] = "python-3.9";
132163
131366
  Runtime2["Python310"] = "python-3.10";
132164
131367
  Runtime2["Python311"] = "python-3.11";
132165
131368
  Runtime2["Python312"] = "python-3.12";
131369
+ Runtime2["Python313"] = "python-3.13";
131370
+ Runtime2["Python314"] = "python-3.14";
132166
131371
  Runtime2["Pythonml311"] = "python-ml-3.11";
132167
131372
  Runtime2["Pythonml312"] = "python-ml-3.12";
131373
+ Runtime2["Pythonml313"] = "python-ml-3.13";
132168
131374
  Runtime2["Deno140"] = "deno-1.40";
132169
131375
  Runtime2["Deno146"] = "deno-1.46";
132170
131376
  Runtime2["Deno20"] = "deno-2.0";
131377
+ Runtime2["Deno25"] = "deno-2.5";
131378
+ Runtime2["Deno26"] = "deno-2.6";
132171
131379
  Runtime2["Dart215"] = "dart-2.15";
132172
131380
  Runtime2["Dart216"] = "dart-2.16";
132173
131381
  Runtime2["Dart217"] = "dart-2.17";
@@ -132183,25 +131391,34 @@ var Runtime;
132183
131391
  Runtime2["Dotnet60"] = "dotnet-6.0";
132184
131392
  Runtime2["Dotnet70"] = "dotnet-7.0";
132185
131393
  Runtime2["Dotnet80"] = "dotnet-8.0";
131394
+ Runtime2["Dotnet10"] = "dotnet-10";
132186
131395
  Runtime2["Java80"] = "java-8.0";
132187
131396
  Runtime2["Java110"] = "java-11.0";
132188
131397
  Runtime2["Java170"] = "java-17.0";
132189
131398
  Runtime2["Java180"] = "java-18.0";
132190
131399
  Runtime2["Java210"] = "java-21.0";
132191
131400
  Runtime2["Java22"] = "java-22";
131401
+ Runtime2["Java25"] = "java-25";
132192
131402
  Runtime2["Swift55"] = "swift-5.5";
132193
131403
  Runtime2["Swift58"] = "swift-5.8";
132194
131404
  Runtime2["Swift59"] = "swift-5.9";
132195
131405
  Runtime2["Swift510"] = "swift-5.10";
131406
+ Runtime2["Swift62"] = "swift-6.2";
132196
131407
  Runtime2["Kotlin16"] = "kotlin-1.6";
132197
131408
  Runtime2["Kotlin18"] = "kotlin-1.8";
132198
131409
  Runtime2["Kotlin19"] = "kotlin-1.9";
132199
131410
  Runtime2["Kotlin20"] = "kotlin-2.0";
131411
+ Runtime2["Kotlin23"] = "kotlin-2.3";
132200
131412
  Runtime2["Cpp17"] = "cpp-17";
132201
131413
  Runtime2["Cpp20"] = "cpp-20";
132202
131414
  Runtime2["Bun10"] = "bun-1.0";
132203
131415
  Runtime2["Bun11"] = "bun-1.1";
131416
+ Runtime2["Bun12"] = "bun-1.2";
131417
+ Runtime2["Bun13"] = "bun-1.3";
132204
131418
  Runtime2["Go123"] = "go-1.23";
131419
+ Runtime2["Go124"] = "go-1.24";
131420
+ Runtime2["Go125"] = "go-1.25";
131421
+ Runtime2["Go126"] = "go-1.26";
132205
131422
  Runtime2["Static1"] = "static-1";
132206
131423
  Runtime2["Flutter324"] = "flutter-3.24";
132207
131424
  Runtime2["Flutter327"] = "flutter-3.27";
@@ -132219,24 +131436,35 @@ var Runtimes;
132219
131436
  Runtimes2["Node200"] = "node-20.0";
132220
131437
  Runtimes2["Node210"] = "node-21.0";
132221
131438
  Runtimes2["Node22"] = "node-22";
131439
+ Runtimes2["Node23"] = "node-23";
131440
+ Runtimes2["Node24"] = "node-24";
131441
+ Runtimes2["Node25"] = "node-25";
132222
131442
  Runtimes2["Php80"] = "php-8.0";
132223
131443
  Runtimes2["Php81"] = "php-8.1";
132224
131444
  Runtimes2["Php82"] = "php-8.2";
132225
131445
  Runtimes2["Php83"] = "php-8.3";
131446
+ Runtimes2["Php84"] = "php-8.4";
132226
131447
  Runtimes2["Ruby30"] = "ruby-3.0";
132227
131448
  Runtimes2["Ruby31"] = "ruby-3.1";
132228
131449
  Runtimes2["Ruby32"] = "ruby-3.2";
132229
131450
  Runtimes2["Ruby33"] = "ruby-3.3";
131451
+ Runtimes2["Ruby34"] = "ruby-3.4";
131452
+ Runtimes2["Ruby40"] = "ruby-4.0";
132230
131453
  Runtimes2["Python38"] = "python-3.8";
132231
131454
  Runtimes2["Python39"] = "python-3.9";
132232
131455
  Runtimes2["Python310"] = "python-3.10";
132233
131456
  Runtimes2["Python311"] = "python-3.11";
132234
131457
  Runtimes2["Python312"] = "python-3.12";
131458
+ Runtimes2["Python313"] = "python-3.13";
131459
+ Runtimes2["Python314"] = "python-3.14";
132235
131460
  Runtimes2["Pythonml311"] = "python-ml-3.11";
132236
131461
  Runtimes2["Pythonml312"] = "python-ml-3.12";
131462
+ Runtimes2["Pythonml313"] = "python-ml-3.13";
132237
131463
  Runtimes2["Deno140"] = "deno-1.40";
132238
131464
  Runtimes2["Deno146"] = "deno-1.46";
132239
131465
  Runtimes2["Deno20"] = "deno-2.0";
131466
+ Runtimes2["Deno25"] = "deno-2.5";
131467
+ Runtimes2["Deno26"] = "deno-2.6";
132240
131468
  Runtimes2["Dart215"] = "dart-2.15";
132241
131469
  Runtimes2["Dart216"] = "dart-2.16";
132242
131470
  Runtimes2["Dart217"] = "dart-2.17";
@@ -132252,25 +131480,34 @@ var Runtimes;
132252
131480
  Runtimes2["Dotnet60"] = "dotnet-6.0";
132253
131481
  Runtimes2["Dotnet70"] = "dotnet-7.0";
132254
131482
  Runtimes2["Dotnet80"] = "dotnet-8.0";
131483
+ Runtimes2["Dotnet10"] = "dotnet-10";
132255
131484
  Runtimes2["Java80"] = "java-8.0";
132256
131485
  Runtimes2["Java110"] = "java-11.0";
132257
131486
  Runtimes2["Java170"] = "java-17.0";
132258
131487
  Runtimes2["Java180"] = "java-18.0";
132259
131488
  Runtimes2["Java210"] = "java-21.0";
132260
131489
  Runtimes2["Java22"] = "java-22";
131490
+ Runtimes2["Java25"] = "java-25";
132261
131491
  Runtimes2["Swift55"] = "swift-5.5";
132262
131492
  Runtimes2["Swift58"] = "swift-5.8";
132263
131493
  Runtimes2["Swift59"] = "swift-5.9";
132264
131494
  Runtimes2["Swift510"] = "swift-5.10";
131495
+ Runtimes2["Swift62"] = "swift-6.2";
132265
131496
  Runtimes2["Kotlin16"] = "kotlin-1.6";
132266
131497
  Runtimes2["Kotlin18"] = "kotlin-1.8";
132267
131498
  Runtimes2["Kotlin19"] = "kotlin-1.9";
132268
131499
  Runtimes2["Kotlin20"] = "kotlin-2.0";
131500
+ Runtimes2["Kotlin23"] = "kotlin-2.3";
132269
131501
  Runtimes2["Cpp17"] = "cpp-17";
132270
131502
  Runtimes2["Cpp20"] = "cpp-20";
132271
131503
  Runtimes2["Bun10"] = "bun-1.0";
132272
131504
  Runtimes2["Bun11"] = "bun-1.1";
131505
+ Runtimes2["Bun12"] = "bun-1.2";
131506
+ Runtimes2["Bun13"] = "bun-1.3";
132273
131507
  Runtimes2["Go123"] = "go-1.23";
131508
+ Runtimes2["Go124"] = "go-1.24";
131509
+ Runtimes2["Go125"] = "go-1.25";
131510
+ Runtimes2["Go126"] = "go-1.26";
132274
131511
  Runtimes2["Static1"] = "static-1";
132275
131512
  Runtimes2["Flutter324"] = "flutter-3.24";
132276
131513
  Runtimes2["Flutter327"] = "flutter-3.27";
@@ -132407,6 +131644,13 @@ var PlatformType;
132407
131644
  PlatformType2["Reactnativeios"] = "react-native-ios";
132408
131645
  PlatformType2["Reactnativeandroid"] = "react-native-android";
132409
131646
  })(PlatformType || (PlatformType = {}));
131647
+ var ResourceType;
131648
+ (function(ResourceType2) {
131649
+ ResourceType2["Function"] = "function";
131650
+ ResourceType2["Execution"] = "execution";
131651
+ ResourceType2["Message"] = "message";
131652
+ ResourceType2["Backup"] = "backup";
131653
+ })(ResourceType || (ResourceType = {}));
132410
131654
  var ApiService;
132411
131655
  (function(ApiService3) {
132412
131656
  ApiService3["Account"] = "account";
@@ -132431,12 +131675,12 @@ var SMTPSecure;
132431
131675
  var EmailTemplateType;
132432
131676
  (function(EmailTemplateType2) {
132433
131677
  EmailTemplateType2["Verification"] = "verification";
132434
- EmailTemplateType2["Magicsession"] = "magicsession";
131678
+ EmailTemplateType2["MagicSession"] = "magicSession";
132435
131679
  EmailTemplateType2["Recovery"] = "recovery";
132436
131680
  EmailTemplateType2["Invitation"] = "invitation";
132437
- EmailTemplateType2["Mfachallenge"] = "mfachallenge";
132438
- EmailTemplateType2["Sessionalert"] = "sessionalert";
132439
- EmailTemplateType2["Otpsession"] = "otpsession";
131681
+ EmailTemplateType2["MfaChallenge"] = "mfaChallenge";
131682
+ EmailTemplateType2["SessionAlert"] = "sessionAlert";
131683
+ EmailTemplateType2["OtpSession"] = "otpSession";
132440
131684
  })(EmailTemplateType || (EmailTemplateType = {}));
132441
131685
  var EmailTemplateLocale;
132442
131686
  (function(EmailTemplateLocale2) {
@@ -132577,7 +131821,7 @@ var SmsTemplateType;
132577
131821
  SmsTemplateType2["Verification"] = "verification";
132578
131822
  SmsTemplateType2["Login"] = "login";
132579
131823
  SmsTemplateType2["Invitation"] = "invitation";
132580
- SmsTemplateType2["Mfachallenge"] = "mfachallenge";
131824
+ SmsTemplateType2["MfaChallenge"] = "mfaChallenge";
132581
131825
  })(SmsTemplateType || (SmsTemplateType = {}));
132582
131826
  var SmsTemplateLocale;
132583
131827
  (function(SmsTemplateLocale2) {
@@ -132752,24 +131996,35 @@ var BuildRuntime;
132752
131996
  BuildRuntime2["Node200"] = "node-20.0";
132753
131997
  BuildRuntime2["Node210"] = "node-21.0";
132754
131998
  BuildRuntime2["Node22"] = "node-22";
131999
+ BuildRuntime2["Node23"] = "node-23";
132000
+ BuildRuntime2["Node24"] = "node-24";
132001
+ BuildRuntime2["Node25"] = "node-25";
132755
132002
  BuildRuntime2["Php80"] = "php-8.0";
132756
132003
  BuildRuntime2["Php81"] = "php-8.1";
132757
132004
  BuildRuntime2["Php82"] = "php-8.2";
132758
132005
  BuildRuntime2["Php83"] = "php-8.3";
132006
+ BuildRuntime2["Php84"] = "php-8.4";
132759
132007
  BuildRuntime2["Ruby30"] = "ruby-3.0";
132760
132008
  BuildRuntime2["Ruby31"] = "ruby-3.1";
132761
132009
  BuildRuntime2["Ruby32"] = "ruby-3.2";
132762
132010
  BuildRuntime2["Ruby33"] = "ruby-3.3";
132011
+ BuildRuntime2["Ruby34"] = "ruby-3.4";
132012
+ BuildRuntime2["Ruby40"] = "ruby-4.0";
132763
132013
  BuildRuntime2["Python38"] = "python-3.8";
132764
132014
  BuildRuntime2["Python39"] = "python-3.9";
132765
132015
  BuildRuntime2["Python310"] = "python-3.10";
132766
132016
  BuildRuntime2["Python311"] = "python-3.11";
132767
132017
  BuildRuntime2["Python312"] = "python-3.12";
132018
+ BuildRuntime2["Python313"] = "python-3.13";
132019
+ BuildRuntime2["Python314"] = "python-3.14";
132768
132020
  BuildRuntime2["Pythonml311"] = "python-ml-3.11";
132769
132021
  BuildRuntime2["Pythonml312"] = "python-ml-3.12";
132022
+ BuildRuntime2["Pythonml313"] = "python-ml-3.13";
132770
132023
  BuildRuntime2["Deno140"] = "deno-1.40";
132771
132024
  BuildRuntime2["Deno146"] = "deno-1.46";
132772
132025
  BuildRuntime2["Deno20"] = "deno-2.0";
132026
+ BuildRuntime2["Deno25"] = "deno-2.5";
132027
+ BuildRuntime2["Deno26"] = "deno-2.6";
132773
132028
  BuildRuntime2["Dart215"] = "dart-2.15";
132774
132029
  BuildRuntime2["Dart216"] = "dart-2.16";
132775
132030
  BuildRuntime2["Dart217"] = "dart-2.17";
@@ -132785,25 +132040,34 @@ var BuildRuntime;
132785
132040
  BuildRuntime2["Dotnet60"] = "dotnet-6.0";
132786
132041
  BuildRuntime2["Dotnet70"] = "dotnet-7.0";
132787
132042
  BuildRuntime2["Dotnet80"] = "dotnet-8.0";
132043
+ BuildRuntime2["Dotnet10"] = "dotnet-10";
132788
132044
  BuildRuntime2["Java80"] = "java-8.0";
132789
132045
  BuildRuntime2["Java110"] = "java-11.0";
132790
132046
  BuildRuntime2["Java170"] = "java-17.0";
132791
132047
  BuildRuntime2["Java180"] = "java-18.0";
132792
132048
  BuildRuntime2["Java210"] = "java-21.0";
132793
132049
  BuildRuntime2["Java22"] = "java-22";
132050
+ BuildRuntime2["Java25"] = "java-25";
132794
132051
  BuildRuntime2["Swift55"] = "swift-5.5";
132795
132052
  BuildRuntime2["Swift58"] = "swift-5.8";
132796
132053
  BuildRuntime2["Swift59"] = "swift-5.9";
132797
132054
  BuildRuntime2["Swift510"] = "swift-5.10";
132055
+ BuildRuntime2["Swift62"] = "swift-6.2";
132798
132056
  BuildRuntime2["Kotlin16"] = "kotlin-1.6";
132799
132057
  BuildRuntime2["Kotlin18"] = "kotlin-1.8";
132800
132058
  BuildRuntime2["Kotlin19"] = "kotlin-1.9";
132801
132059
  BuildRuntime2["Kotlin20"] = "kotlin-2.0";
132060
+ BuildRuntime2["Kotlin23"] = "kotlin-2.3";
132802
132061
  BuildRuntime2["Cpp17"] = "cpp-17";
132803
132062
  BuildRuntime2["Cpp20"] = "cpp-20";
132804
132063
  BuildRuntime2["Bun10"] = "bun-1.0";
132805
132064
  BuildRuntime2["Bun11"] = "bun-1.1";
132065
+ BuildRuntime2["Bun12"] = "bun-1.2";
132066
+ BuildRuntime2["Bun13"] = "bun-1.3";
132806
132067
  BuildRuntime2["Go123"] = "go-1.23";
132068
+ BuildRuntime2["Go124"] = "go-1.24";
132069
+ BuildRuntime2["Go125"] = "go-1.25";
132070
+ BuildRuntime2["Go126"] = "go-1.26";
132807
132071
  BuildRuntime2["Static1"] = "static-1";
132808
132072
  BuildRuntime2["Flutter324"] = "flutter-3.24";
132809
132073
  BuildRuntime2["Flutter327"] = "flutter-3.27";
@@ -135298,8 +134562,8 @@ async function createPullInstance(options = {
135298
134562
  }) {
135299
134563
  const { silent, requiresConsoleAuth } = options;
135300
134564
  const projectClient2 = await sdkForProject();
135301
- const consoleClient2 = await sdkForConsole(requiresConsoleAuth);
135302
- const pullInstance = new Pull(projectClient2, consoleClient2, silent);
134565
+ const consoleClient = await sdkForConsole(requiresConsoleAuth);
134566
+ const pullInstance = new Pull(projectClient2, consoleClient, silent);
135303
134567
  pullInstance.setConfigDirectoryPath(localConfig.configDirectoryPath);
135304
134568
  return pullInstance;
135305
134569
  }
@@ -135308,9 +134572,9 @@ var Pull = class {
135308
134572
  consoleClient;
135309
134573
  configDirectoryPath;
135310
134574
  silent;
135311
- constructor(projectClient2, consoleClient2, silent = false) {
134575
+ constructor(projectClient2, consoleClient, silent = false) {
135312
134576
  this.projectClient = projectClient2;
135313
- this.consoleClient = consoleClient2;
134577
+ this.consoleClient = consoleClient;
135314
134578
  this.configDirectoryPath = process.cwd();
135315
134579
  this.silent = silent;
135316
134580
  }
@@ -138133,9 +137397,9 @@ var JwtManager = {
138133
137397
  timerWarn: null,
138134
137398
  timerError: null,
138135
137399
  async setup(userId = null, projectScopes = []) {
138136
- const consoleClient2 = await sdkForConsole();
138137
- const usersClient2 = new Users(consoleClient2);
138138
- const projectsClient2 = new Projects(consoleClient2);
137400
+ const consoleClient = await sdkForConsole();
137401
+ const usersClient2 = new Users(consoleClient);
137402
+ const projectsClient2 = new Projects(consoleClient);
138139
137403
  if (this.timerWarn) {
138140
137404
  clearTimeout(this.timerWarn);
138141
137405
  }
@@ -139172,7 +138436,9 @@ var Pools = class {
139172
138436
  // Milliseconds
139173
138437
  pollMaxDebounces = 30;
139174
138438
  POLL_DEFAULT_VALUE = 30;
139175
- constructor(pollMaxDebounces) {
138439
+ client;
138440
+ constructor(pollMaxDebounces, client2) {
138441
+ this.client = client2;
139176
138442
  if (pollMaxDebounces) {
139177
138443
  this.pollMaxDebounces = pollMaxDebounces;
139178
138444
  }
@@ -139181,7 +138447,7 @@ var Pools = class {
139181
138447
  if (iteration > this.pollMaxDebounces) {
139182
138448
  return false;
139183
138449
  }
139184
- const databasesService = await getDatabasesService();
138450
+ const databasesService = await getDatabasesService(this.client);
139185
138451
  const response = await databasesService.listAttributes(
139186
138452
  databaseId,
139187
138453
  collectionId,
@@ -139207,7 +138473,7 @@ var Pools = class {
139207
138473
  if (iteration > this.pollMaxDebounces) {
139208
138474
  return false;
139209
138475
  }
139210
- const databasesService = await getDatabasesService();
138476
+ const databasesService = await getDatabasesService(this.client);
139211
138477
  const response = await databasesService.listIndexes(
139212
138478
  databaseId,
139213
138479
  collectionId,
@@ -139244,7 +138510,7 @@ var Pools = class {
139244
138510
  }
139245
138511
  const { attributes } = await paginate(
139246
138512
  async (args) => {
139247
- const databasesService = await getDatabasesService();
138513
+ const databasesService = await getDatabasesService(this.client);
139248
138514
  return await databasesService.listAttributes({
139249
138515
  databaseId: args.databaseId,
139250
138516
  collectionId: args.collectionId,
@@ -139287,7 +138553,7 @@ var Pools = class {
139287
138553
  }
139288
138554
  const { attributes } = await paginate(
139289
138555
  async (args) => {
139290
- const databasesService = await getDatabasesService();
138556
+ const databasesService = await getDatabasesService(this.client);
139291
138557
  return await databasesService.listAttributes(
139292
138558
  args.databaseId,
139293
138559
  args.collectionId,
@@ -139336,7 +138602,7 @@ var Pools = class {
139336
138602
  }
139337
138603
  const { indexes } = await paginate(
139338
138604
  async (args) => {
139339
- const databasesService = await getDatabasesService();
138605
+ const databasesService = await getDatabasesService(this.client);
139340
138606
  return await databasesService.listIndexes(
139341
138607
  args.databaseId,
139342
138608
  args.collectionId,
@@ -139402,8 +138668,10 @@ var questionPushChangesConfirmation2 = [
139402
138668
  var Attributes = class {
139403
138669
  pools;
139404
138670
  skipConfirmation;
139405
- constructor(pools, skipConfirmation = false) {
139406
- this.pools = pools || new Pools();
138671
+ client;
138672
+ constructor(pools, skipConfirmation = false, client2) {
138673
+ this.client = client2;
138674
+ this.pools = pools || new Pools(void 0, client2);
139407
138675
  this.skipConfirmation = skipConfirmation;
139408
138676
  }
139409
138677
  getConfirmation = async () => {
@@ -139491,7 +138759,7 @@ var Attributes = class {
139491
138759
  };
139492
138760
  };
139493
138761
  createAttribute = async (databaseId, collectionId, attribute) => {
139494
- const databasesService = await getDatabasesService();
138762
+ const databasesService = await getDatabasesService(this.client);
139495
138763
  switch (attribute.type) {
139496
138764
  case "string":
139497
138765
  switch (attribute.format) {
@@ -139661,7 +138929,7 @@ var Attributes = class {
139661
138929
  }
139662
138930
  };
139663
138931
  updateAttribute = async (databaseId, collectionId, attribute) => {
139664
- const databasesService = await getDatabasesService();
138932
+ const databasesService = await getDatabasesService(this.client);
139665
138933
  switch (attribute.type) {
139666
138934
  case "string":
139667
138935
  switch (attribute.format) {
@@ -139815,7 +139083,7 @@ var Attributes = class {
139815
139083
  log(
139816
139084
  `Deleting ${isIndex ? "index" : "attribute"} ${attribute.key} of ${collection.name} ( ${collection["$id"]} )`
139817
139085
  );
139818
- const databasesService = await getDatabasesService();
139086
+ const databasesService = await getDatabasesService(this.client);
139819
139087
  if (isIndex) {
139820
139088
  await databasesService.deleteIndex(
139821
139089
  collection["databaseId"],
@@ -139970,7 +139238,7 @@ var Attributes = class {
139970
139238
  };
139971
139239
  createIndexes = async (indexes, collection) => {
139972
139240
  log(`Creating indexes ...`);
139973
- const databasesService = await getDatabasesService();
139241
+ const databasesService = await getDatabasesService(this.client);
139974
139242
  for (let index of indexes) {
139975
139243
  await databasesService.createIndex({
139976
139244
  databaseId: collection["databaseId"],
@@ -140191,9 +139459,9 @@ var Push = class {
140191
139459
  projectClient;
140192
139460
  consoleClient;
140193
139461
  silent;
140194
- constructor(projectClient2, consoleClient2, silent = false) {
139462
+ constructor(projectClient2, consoleClient, silent = false) {
140195
139463
  this.projectClient = projectClient2;
140196
- this.consoleClient = consoleClient2;
139464
+ this.consoleClient = consoleClient;
140197
139465
  this.silent = silent;
140198
139466
  }
140199
139467
  /**
@@ -140229,158 +139497,169 @@ var Push = class {
140229
139497
  }
140230
139498
  }
140231
139499
  async pushResources(config2, options = { all: true, skipDeprecated: true }) {
140232
- const { skipDeprecated = true } = options;
140233
- const results = {};
140234
- const allErrors = [];
140235
- const shouldPushAll = options.all === true;
140236
- if ((shouldPushAll || options.settings) && (config2.projectName || config2.settings)) {
140237
- try {
140238
- this.log("Pushing settings ...");
140239
- await this.pushSettings({
140240
- projectId: config2.projectId,
140241
- projectName: config2.projectName,
140242
- settings: config2.settings
140243
- });
140244
- this.success(
140245
- `Successfully pushed ${import_chalk11.default.bold("all")} project settings.`
140246
- );
140247
- results.settings = { success: true };
140248
- } catch (e) {
140249
- allErrors.push(e);
140250
- results.settings = { success: false, error: e.message };
140251
- }
139500
+ const previousForce = cliConfig.force;
139501
+ if (options.force !== void 0) {
139502
+ cliConfig.force = options.force;
140252
139503
  }
140253
- if ((shouldPushAll || options.buckets) && config2.buckets && config2.buckets.length > 0) {
140254
- try {
140255
- this.log("Pushing buckets ...");
140256
- const result = await this.pushBuckets(config2.buckets);
140257
- this.success(
140258
- `Successfully pushed ${import_chalk11.default.bold(result.successfullyPushed)} buckets.`
140259
- );
140260
- results.buckets = result;
140261
- allErrors.push(...result.errors);
140262
- } catch (e) {
140263
- allErrors.push(e);
140264
- results.buckets = { successfullyPushed: 0, errors: [e] };
139504
+ try {
139505
+ const { skipDeprecated = true } = options;
139506
+ const results = {};
139507
+ const allErrors = [];
139508
+ const shouldPushAll = options.all === true;
139509
+ if ((shouldPushAll || options.settings) && (config2.projectName || config2.settings)) {
139510
+ try {
139511
+ this.log("Pushing settings ...");
139512
+ await this.pushSettings({
139513
+ projectId: config2.projectId,
139514
+ projectName: config2.projectName,
139515
+ settings: config2.settings
139516
+ });
139517
+ this.success(
139518
+ `Successfully pushed ${import_chalk11.default.bold("all")} project settings.`
139519
+ );
139520
+ results.settings = { success: true };
139521
+ } catch (e) {
139522
+ allErrors.push(e);
139523
+ results.settings = { success: false, error: e.message };
139524
+ }
140265
139525
  }
140266
- }
140267
- if ((shouldPushAll || options.teams) && config2.teams && config2.teams.length > 0) {
140268
- try {
140269
- this.log("Pushing teams ...");
140270
- const result = await this.pushTeams(config2.teams);
140271
- this.success(
140272
- `Successfully pushed ${import_chalk11.default.bold(result.successfullyPushed)} teams.`
140273
- );
140274
- results.teams = result;
140275
- allErrors.push(...result.errors);
140276
- } catch (e) {
140277
- allErrors.push(e);
140278
- results.teams = { successfullyPushed: 0, errors: [e] };
139526
+ if ((shouldPushAll || options.buckets) && config2.buckets && config2.buckets.length > 0) {
139527
+ try {
139528
+ this.log("Pushing buckets ...");
139529
+ const result = await this.pushBuckets(config2.buckets);
139530
+ this.success(
139531
+ `Successfully pushed ${import_chalk11.default.bold(result.successfullyPushed)} buckets.`
139532
+ );
139533
+ results.buckets = result;
139534
+ allErrors.push(...result.errors);
139535
+ } catch (e) {
139536
+ allErrors.push(e);
139537
+ results.buckets = { successfullyPushed: 0, errors: [e] };
139538
+ }
140279
139539
  }
140280
- }
140281
- if ((shouldPushAll || options.topics) && config2.topics && config2.topics.length > 0) {
140282
- try {
140283
- this.log("Pushing topics ...");
140284
- const result = await this.pushMessagingTopics(config2.topics);
140285
- this.success(
140286
- `Successfully pushed ${import_chalk11.default.bold(result.successfullyPushed)} topics.`
140287
- );
140288
- results.topics = result;
140289
- allErrors.push(...result.errors);
140290
- } catch (e) {
140291
- allErrors.push(e);
140292
- results.topics = { successfullyPushed: 0, errors: [e] };
139540
+ if ((shouldPushAll || options.teams) && config2.teams && config2.teams.length > 0) {
139541
+ try {
139542
+ this.log("Pushing teams ...");
139543
+ const result = await this.pushTeams(config2.teams);
139544
+ this.success(
139545
+ `Successfully pushed ${import_chalk11.default.bold(result.successfullyPushed)} teams.`
139546
+ );
139547
+ results.teams = result;
139548
+ allErrors.push(...result.errors);
139549
+ } catch (e) {
139550
+ allErrors.push(e);
139551
+ results.teams = { successfullyPushed: 0, errors: [e] };
139552
+ }
140293
139553
  }
140294
- }
140295
- if ((shouldPushAll || options.functions) && config2.functions && config2.functions.length > 0) {
140296
- try {
140297
- this.log("Pushing functions ...");
140298
- const result = await this.pushFunctions(
140299
- config2.functions,
140300
- options.functionOptions
140301
- );
140302
- this.success(
140303
- `Successfully pushed ${import_chalk11.default.bold(result.successfullyPushed)} functions.`
140304
- );
140305
- results.functions = result;
140306
- allErrors.push(...result.errors);
140307
- } catch (e) {
140308
- allErrors.push(e);
140309
- results.functions = {
140310
- successfullyPushed: 0,
140311
- successfullyDeployed: 0,
140312
- failedDeployments: [],
140313
- errors: [e]
140314
- };
139554
+ if ((shouldPushAll || options.topics) && config2.topics && config2.topics.length > 0) {
139555
+ try {
139556
+ this.log("Pushing topics ...");
139557
+ const result = await this.pushMessagingTopics(config2.topics);
139558
+ this.success(
139559
+ `Successfully pushed ${import_chalk11.default.bold(result.successfullyPushed)} topics.`
139560
+ );
139561
+ results.topics = result;
139562
+ allErrors.push(...result.errors);
139563
+ } catch (e) {
139564
+ allErrors.push(e);
139565
+ results.topics = { successfullyPushed: 0, errors: [e] };
139566
+ }
140315
139567
  }
140316
- }
140317
- if ((shouldPushAll || options.sites) && config2.sites && config2.sites.length > 0) {
140318
- try {
140319
- this.log("Pushing sites ...");
140320
- const result = await this.pushSites(config2.sites, options.siteOptions);
140321
- this.success(
140322
- `Successfully pushed ${import_chalk11.default.bold(result.successfullyPushed)} sites.`
140323
- );
140324
- results.sites = result;
140325
- allErrors.push(...result.errors);
140326
- } catch (e) {
140327
- allErrors.push(e);
140328
- results.sites = {
140329
- successfullyPushed: 0,
140330
- successfullyDeployed: 0,
140331
- failedDeployments: [],
140332
- errors: [e]
140333
- };
139568
+ if ((shouldPushAll || options.functions) && config2.functions && config2.functions.length > 0) {
139569
+ try {
139570
+ this.log("Pushing functions ...");
139571
+ const result = await this.pushFunctions(
139572
+ config2.functions,
139573
+ options.functionOptions
139574
+ );
139575
+ this.success(
139576
+ `Successfully pushed ${import_chalk11.default.bold(result.successfullyPushed)} functions.`
139577
+ );
139578
+ results.functions = result;
139579
+ allErrors.push(...result.errors);
139580
+ } catch (e) {
139581
+ allErrors.push(e);
139582
+ results.functions = {
139583
+ successfullyPushed: 0,
139584
+ successfullyDeployed: 0,
139585
+ failedDeployments: [],
139586
+ errors: [e]
139587
+ };
139588
+ }
140334
139589
  }
140335
- }
140336
- if ((shouldPushAll || options.tables) && config2.tables && config2.tables.length > 0) {
140337
- try {
140338
- this.log("Pushing tables ...");
140339
- const result = await this.pushTables(config2.tables, {
140340
- attempts: options.tableOptions?.attempts,
140341
- skipConfirmation: options.skipConfirmation
140342
- });
140343
- this.success(
140344
- `Successfully pushed ${import_chalk11.default.bold(result.successfullyPushed)} tables.`
140345
- );
140346
- results.tables = result;
140347
- allErrors.push(...result.errors);
140348
- } catch (e) {
140349
- allErrors.push(e);
140350
- results.tables = { successfullyPushed: 0, errors: [e] };
139590
+ if ((shouldPushAll || options.sites) && config2.sites && config2.sites.length > 0) {
139591
+ try {
139592
+ this.log("Pushing sites ...");
139593
+ const result = await this.pushSites(
139594
+ config2.sites,
139595
+ options.siteOptions
139596
+ );
139597
+ this.success(
139598
+ `Successfully pushed ${import_chalk11.default.bold(result.successfullyPushed)} sites.`
139599
+ );
139600
+ results.sites = result;
139601
+ allErrors.push(...result.errors);
139602
+ } catch (e) {
139603
+ allErrors.push(e);
139604
+ results.sites = {
139605
+ successfullyPushed: 0,
139606
+ successfullyDeployed: 0,
139607
+ failedDeployments: [],
139608
+ errors: [e]
139609
+ };
139610
+ }
140351
139611
  }
140352
- }
140353
- if ((options.collections || shouldPushAll && !skipDeprecated) && config2.collections && config2.collections.length > 0) {
140354
- try {
140355
- this.log("Pushing collections ...");
140356
- const collectionsWithDbNames = config2.collections.map(
140357
- (collection) => {
140358
- const database = config2.databases?.find(
140359
- (db) => db.$id === collection.databaseId
140360
- );
140361
- return {
140362
- ...collection,
140363
- databaseName: database?.name ?? collection.databaseId
140364
- };
140365
- }
140366
- );
140367
- const result = await this.pushCollections(collectionsWithDbNames, {
140368
- skipConfirmation: options.skipConfirmation
140369
- });
140370
- this.success(
140371
- `Successfully pushed ${import_chalk11.default.bold(result.successfullyPushed)} collections.`
140372
- );
140373
- results.collections = result;
140374
- allErrors.push(...result.errors);
140375
- } catch (e) {
140376
- allErrors.push(e);
140377
- results.collections = { successfullyPushed: 0, errors: [e] };
139612
+ if ((shouldPushAll || options.tables) && config2.tables && config2.tables.length > 0) {
139613
+ try {
139614
+ this.log("Pushing tables ...");
139615
+ const result = await this.pushTables(config2.tables, {
139616
+ attempts: options.tableOptions?.attempts,
139617
+ skipConfirmation: options.skipConfirmation
139618
+ });
139619
+ this.success(
139620
+ `Successfully pushed ${import_chalk11.default.bold(result.successfullyPushed)} tables.`
139621
+ );
139622
+ results.tables = result;
139623
+ allErrors.push(...result.errors);
139624
+ } catch (e) {
139625
+ allErrors.push(e);
139626
+ results.tables = { successfullyPushed: 0, errors: [e] };
139627
+ }
140378
139628
  }
139629
+ if ((options.collections || shouldPushAll && !skipDeprecated) && config2.collections && config2.collections.length > 0) {
139630
+ try {
139631
+ this.log("Pushing collections ...");
139632
+ const collectionsWithDbNames = config2.collections.map(
139633
+ (collection) => {
139634
+ const database = config2.databases?.find(
139635
+ (db) => db.$id === collection.databaseId
139636
+ );
139637
+ return {
139638
+ ...collection,
139639
+ databaseName: database?.name ?? collection.databaseId
139640
+ };
139641
+ }
139642
+ );
139643
+ const result = await this.pushCollections(collectionsWithDbNames, {
139644
+ skipConfirmation: options.skipConfirmation
139645
+ });
139646
+ this.success(
139647
+ `Successfully pushed ${import_chalk11.default.bold(result.successfullyPushed)} collections.`
139648
+ );
139649
+ results.collections = result;
139650
+ allErrors.push(...result.errors);
139651
+ } catch (e) {
139652
+ allErrors.push(e);
139653
+ results.collections = { successfullyPushed: 0, errors: [e] };
139654
+ }
139655
+ }
139656
+ return {
139657
+ results,
139658
+ errors: allErrors
139659
+ };
139660
+ } finally {
139661
+ cliConfig.force = previousForce;
140379
139662
  }
140380
- return {
140381
- results,
140382
- errors: allErrors
140383
- };
140384
139663
  }
140385
139664
  async pushSettings(config2) {
140386
139665
  const projectsService = await getProjectsService(this.consoleClient);
@@ -140455,12 +139734,43 @@ var Push = class {
140455
139734
  async pushBuckets(buckets) {
140456
139735
  let successfullyPushed = 0;
140457
139736
  const errors = [];
139737
+ const hasBucketChanges = (remoteBucket, localBucket) => {
139738
+ const scalarFields = [
139739
+ "name",
139740
+ "fileSecurity",
139741
+ "enabled",
139742
+ "maximumFileSize",
139743
+ "encryption",
139744
+ "antivirus",
139745
+ "compression"
139746
+ ];
139747
+ if (scalarFields.some((field) => remoteBucket[field] !== localBucket[field])) {
139748
+ return true;
139749
+ }
139750
+ if (!arrayEqualsUnordered(
139751
+ remoteBucket["$permissions"],
139752
+ localBucket["$permissions"]
139753
+ )) {
139754
+ return true;
139755
+ }
139756
+ return !arrayEqualsUnordered(
139757
+ remoteBucket.allowedFileExtensions,
139758
+ localBucket.allowedFileExtensions
139759
+ );
139760
+ };
140458
139761
  for (const bucket of buckets) {
140459
139762
  try {
140460
139763
  this.log(`Pushing bucket ${import_chalk11.default.bold(bucket["name"])} ...`);
140461
139764
  const storageService = await getStorageService(this.projectClient);
140462
139765
  try {
140463
- await storageService.getBucket(bucket["$id"]);
139766
+ const remoteBucket = await storageService.getBucket(bucket["$id"]);
139767
+ const hasChanges = hasBucketChanges(remoteBucket, bucket);
139768
+ if (!hasChanges) {
139769
+ this.log(
139770
+ `No changes detected for bucket ${import_chalk11.default.bold(bucket["name"])}. Skipping.`
139771
+ );
139772
+ continue;
139773
+ }
140464
139774
  await storageService.updateBucket({
140465
139775
  bucketId: bucket["$id"],
140466
139776
  name: bucket.name,
@@ -140473,6 +139783,7 @@ var Push = class {
140473
139783
  antivirus: bucket.antivirus,
140474
139784
  compression: bucket.compression
140475
139785
  });
139786
+ successfullyPushed++;
140476
139787
  } catch (e) {
140477
139788
  if (e instanceof AppwriteException && Number(e.code) === 404) {
140478
139789
  await storageService.createBucket({
@@ -140487,11 +139798,11 @@ var Push = class {
140487
139798
  encryption: bucket.encryption,
140488
139799
  antivirus: bucket.antivirus
140489
139800
  });
139801
+ successfullyPushed++;
140490
139802
  } else {
140491
139803
  throw e;
140492
139804
  }
140493
139805
  }
140494
- successfullyPushed++;
140495
139806
  } catch (e) {
140496
139807
  errors.push(e);
140497
139808
  this.error(`Failed to push bucket ${bucket["name"]}: ${e.message}`);
@@ -141172,8 +140483,12 @@ var Push = class {
141172
140483
  async pushTables(tables, options = {}) {
141173
140484
  const { attempts, skipConfirmation = false } = options;
141174
140485
  const pollMaxDebounces = attempts ?? POLL_DEFAULT_VALUE;
141175
- const pools = new Pools(pollMaxDebounces);
141176
- const attributes = new Attributes(pools, skipConfirmation);
140486
+ const pools = new Pools(pollMaxDebounces, this.projectClient);
140487
+ const attributes = new Attributes(
140488
+ pools,
140489
+ skipConfirmation,
140490
+ this.projectClient
140491
+ );
141177
140492
  let tablesChanged = /* @__PURE__ */ new Set();
141178
140493
  const errors = [];
141179
140494
  await Promise.all(
@@ -141248,6 +140563,11 @@ var Push = class {
141248
140563
  indexes = indexesResult.attributes;
141249
140564
  hadChanges = columnsResult.hasChanges || indexesResult.hasChanges;
141250
140565
  if (!hadChanges && columns.length <= 0 && indexes.length <= 0) {
140566
+ if (!tablesChanged.has(table["$id"])) {
140567
+ this.log(
140568
+ `No changes detected for table ${import_chalk11.default.bold(table["name"])}. Skipping.`
140569
+ );
140570
+ }
141251
140571
  continue;
141252
140572
  }
141253
140573
  }
@@ -141276,8 +140596,12 @@ var Push = class {
141276
140596
  }
141277
140597
  async pushCollections(collections, options = {}) {
141278
140598
  const { skipConfirmation = false } = options;
141279
- const pools = new Pools(POLL_DEFAULT_VALUE);
141280
- const attributesHelper = new Attributes(pools, skipConfirmation);
140599
+ const pools = new Pools(POLL_DEFAULT_VALUE, this.projectClient);
140600
+ const attributesHelper = new Attributes(
140601
+ pools,
140602
+ skipConfirmation,
140603
+ this.projectClient
140604
+ );
141281
140605
  const errors = [];
141282
140606
  const collectionsWithState = collections;
141283
140607
  const databases2 = Array.from(
@@ -141420,8 +140744,8 @@ async function createPushInstance(options = {
141420
140744
  }) {
141421
140745
  const { silent, requiresConsoleAuth } = options;
141422
140746
  const projectClient2 = await sdkForProject();
141423
- const consoleClient2 = await sdkForConsole(requiresConsoleAuth);
141424
- return new Push(projectClient2, consoleClient2, silent);
140747
+ const consoleClient = await sdkForConsole(requiresConsoleAuth);
140748
+ return new Push(projectClient2, consoleClient, silent);
141425
140749
  }
141426
140750
  var pushResources = async ({
141427
140751
  skipDeprecated = false
@@ -141965,10 +141289,11 @@ var pushCollection = async () => {
141965
141289
  const localDatabase = localConfig.getDatabase(collection.databaseId);
141966
141290
  collection.databaseName = localDatabase.name ?? collection.databaseId;
141967
141291
  });
141292
+ const projectClient2 = await sdkForProject();
141968
141293
  if (!await approveChanges(
141969
141294
  collections,
141970
141295
  async (args) => {
141971
- const databasesService = await getDatabasesService();
141296
+ const databasesService = await getDatabasesService(projectClient2);
141972
141297
  return await databasesService.getCollection(
141973
141298
  args.databaseId,
141974
141299
  args.collectionId
@@ -142471,7 +141796,13 @@ var BaseDatabasesGenerator = class {
142471
141796
  if (!fs15.existsSync(sdkDir)) {
142472
141797
  fs15.mkdirSync(sdkDir, { recursive: true });
142473
141798
  }
142474
- for (const [relativePath, content] of result.files) {
141799
+ const fileEntries = [
141800
+ ["databases.ts", result.dbContent],
141801
+ ["types.ts", result.typesContent],
141802
+ ["index.ts", result.indexContent],
141803
+ ["constants.ts", result.constantsContent]
141804
+ ];
141805
+ for (const [relativePath, content] of fileEntries) {
142475
141806
  const filePath = path14.join(sdkDir, relativePath);
142476
141807
  const fileDir = path14.dirname(filePath);
142477
141808
  if (!fs15.existsSync(fileDir)) {
@@ -142483,10 +141814,13 @@ var BaseDatabasesGenerator = class {
142483
141814
  fs15.writeFileSync(filePath, content, "utf-8");
142484
141815
  }
142485
141816
  }
142486
- getGeneratedFilePaths(result) {
142487
- return Array.from(result.files.keys()).map(
142488
- (relativePath) => path14.join(SDK_TITLE_LOWER, relativePath)
142489
- );
141817
+ getGeneratedFilePaths(_result) {
141818
+ return [
141819
+ path14.join(SDK_TITLE_LOWER, "databases.ts"),
141820
+ path14.join(SDK_TITLE_LOWER, "types.ts"),
141821
+ path14.join(SDK_TITLE_LOWER, "index.ts"),
141822
+ path14.join(SDK_TITLE_LOWER, "constants.ts")
141823
+ ];
142490
141824
  }
142491
141825
  };
142492
141826
 
@@ -142813,29 +142147,24 @@ ${supportsServerSide ? ` create: (databaseId: string, name: string, options?: {
142813
142147
  throw new Error("Project ID is required in configuration");
142814
142148
  }
142815
142149
  const importExt = detectImportExtension();
142816
- const files = /* @__PURE__ */ new Map();
142817
142150
  const hasEntities = config2.tables && config2.tables.length > 0 || config2.collections && config2.collections.length > 0;
142818
142151
  if (!hasEntities) {
142819
142152
  console.log(
142820
142153
  "No tables or collections found in configuration. Skipping database generation."
142821
142154
  );
142822
- files.set(
142823
- "databases.ts",
142824
- "// No tables or collections found in configuration\n"
142825
- );
142826
- files.set(
142827
- "types.ts",
142828
- "// No tables or collections found in configuration\n"
142829
- );
142830
- files.set("index.ts", this.generateIndexFile(importExt));
142831
- files.set("constants.ts", this.generateConstantsFile(config2));
142832
- return { files };
142155
+ return {
142156
+ dbContent: "// No tables or collections found in configuration\n",
142157
+ typesContent: "// No tables or collections found in configuration\n",
142158
+ indexContent: this.generateIndexFile(importExt),
142159
+ constantsContent: this.generateConstantsFile(config2)
142160
+ };
142833
142161
  }
142834
- files.set("types.ts", this.generateTypesFile(config2));
142835
- files.set("databases.ts", this.generateDatabasesFile(config2, importExt));
142836
- files.set("index.ts", this.generateIndexFile(importExt));
142837
- files.set("constants.ts", this.generateConstantsFile(config2));
142838
- return { files };
142162
+ return {
142163
+ dbContent: this.generateDatabasesFile(config2, importExt),
142164
+ typesContent: this.generateTypesFile(config2),
142165
+ indexContent: this.generateIndexFile(importExt),
142166
+ constantsContent: this.generateConstantsFile(config2)
142167
+ };
142839
142168
  }
142840
142169
  };
142841
142170
 
@@ -143030,6 +142359,36 @@ account.command(`delete`).description(`Delete the currently logged in user.`).ac
143030
142359
  async () => parse3(await (await getAccountClient()).delete())
143031
142360
  )
143032
142361
  );
142362
+ account.command(`list-billing-addresses`).description(`List all billing addresses for a user.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, expired, failed`).action(
142363
+ actionRunner(
142364
+ async ({ queries }) => parse3(await (await getAccountClient()).listBillingAddresses(queries))
142365
+ )
142366
+ );
142367
+ account.command(`create-billing-address`).description(`Add a new billing address to a user's account.`).requiredOption(`--country <country>`, `Country`).requiredOption(`--city <city>`, `City`).requiredOption(`--street-address <street-address>`, `Street address`).option(`--address-line-2 <address-line-2>`, `Address line 2`).option(`--state <state>`, `State or province`).option(`--postal-code <postal-code>`, `Postal code`).action(
142368
+ actionRunner(
142369
+ async ({ country, city, streetAddress, addressLine2, state, postalCode }) => parse3(await (await getAccountClient()).createBillingAddress(country, city, streetAddress, addressLine2, state, postalCode))
142370
+ )
142371
+ );
142372
+ account.command(`get-billing-address`).description(`Get a specific billing address for a user using it's ID.`).requiredOption(`--billing-address-id <billing-address-id>`, `Unique ID of billing address`).action(
142373
+ actionRunner(
142374
+ async ({ billingAddressId }) => parse3(await (await getAccountClient()).getBillingAddress(billingAddressId))
142375
+ )
142376
+ );
142377
+ account.command(`update-billing-address`).description(`Update a specific billing address using it's ID.`).requiredOption(`--billing-address-id <billing-address-id>`, `Unique ID of billing address`).requiredOption(`--country <country>`, `Country`).requiredOption(`--city <city>`, `City`).requiredOption(`--street-address <street-address>`, `Street address`).option(`--address-line-2 <address-line-2>`, `Address line 2`).option(`--state <state>`, `State or province`).option(`--postal-code <postal-code>`, `Postal code`).action(
142378
+ actionRunner(
142379
+ async ({ billingAddressId, country, city, streetAddress, addressLine2, state, postalCode }) => parse3(await (await getAccountClient()).updateBillingAddress(billingAddressId, country, city, streetAddress, addressLine2, state, postalCode))
142380
+ )
142381
+ );
142382
+ account.command(`delete-billing-address`).description(`Delete a specific billing address using it's ID.`).requiredOption(`--billing-address-id <billing-address-id>`, `Billing address unique ID`).action(
142383
+ actionRunner(
142384
+ async ({ billingAddressId }) => parse3(await (await getAccountClient()).deleteBillingAddress(billingAddressId))
142385
+ )
142386
+ );
142387
+ account.command(`get-coupon`).description(`Get coupon details for an account.`).requiredOption(`--coupon-id <coupon-id>`, `ID of the coupon`).action(
142388
+ actionRunner(
142389
+ async ({ couponId }) => parse3(await (await getAccountClient()).getCoupon(couponId))
142390
+ )
142391
+ );
143033
142392
  account.command(`update-email`).description(`Update currently logged in user account email address. After changing user address, the user confirmation status will get reset. A new confirmation email is not sent automatically however you can use the send confirmation email endpoint again to send the confirmation email. For security measures, user password is required to complete this request.
143034
142393
  This endpoint can also be used to convert an anonymous account to a normal one, by passing an email address and a new password.
143035
142394
  `).requiredOption(`--email <email>`, `User email.`).requiredOption(`--password <password>`, `User password. Must be at least 8 chars.`).action(
@@ -143051,11 +142410,45 @@ account.command(`delete-identity`).description(`Delete an identity by its unique
143051
142410
  async ({ identityId }) => parse3(await (await getAccountClient()).deleteIdentity(identityId))
143052
142411
  )
143053
142412
  );
142413
+ account.command(`list-invoices`).description(`List all invoices tied to an account.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, amount, currency, from, to, dueAt, attempts, status, grossAmount`).action(
142414
+ actionRunner(
142415
+ async ({ queries }) => parse3(await (await getAccountClient()).listInvoices(queries))
142416
+ )
142417
+ );
143054
142418
  account.command(`create-jwt`).description(`Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Appwrite server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.`).option(`--duration <duration>`, `Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.`, parseInteger).action(
143055
142419
  actionRunner(
143056
142420
  async ({ duration: duration3 }) => parse3(await (await getAccountClient()).createJWT(duration3))
143057
142421
  )
143058
142422
  );
142423
+ account.command(`list-keys`).description(`Get a list of all API keys from the current account. `).option(
142424
+ `--total [value]`,
142425
+ `When set to false, the total count returned will be 0 and will not be calculated.`,
142426
+ (value) => value === void 0 ? true : parseBool(value)
142427
+ ).action(
142428
+ actionRunner(
142429
+ async ({ total }) => parse3(await (await getAccountClient()).listKeys(total))
142430
+ )
142431
+ );
142432
+ account.command(`create-key`).description(`Create a new account API key.`).requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`).requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`).option(`--expire <expire>`, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`).action(
142433
+ actionRunner(
142434
+ async ({ name, scopes, expire }) => parse3(await (await getAccountClient()).createKey(name, scopes, expire))
142435
+ )
142436
+ );
142437
+ account.command(`get-key`).description(`Get a key by its unique ID. This endpoint returns details about a specific API key in your account including it's scopes.`).requiredOption(`--key-id <key-id>`, `Key unique ID.`).action(
142438
+ actionRunner(
142439
+ async ({ keyId }) => parse3(await (await getAccountClient()).getKey(keyId))
142440
+ )
142441
+ );
142442
+ account.command(`update-key`).description(`Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.`).requiredOption(`--key-id <key-id>`, `Key unique ID.`).requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`).requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`).option(`--expire <expire>`, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`).action(
142443
+ actionRunner(
142444
+ async ({ keyId, name, scopes, expire }) => parse3(await (await getAccountClient()).updateKey(keyId, name, scopes, expire))
142445
+ )
142446
+ );
142447
+ account.command(`delete-key`).description(`Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.`).requiredOption(`--key-id <key-id>`, `Key unique ID.`).action(
142448
+ actionRunner(
142449
+ async ({ keyId }) => parse3(await (await getAccountClient()).deleteKey(keyId))
142450
+ )
142451
+ );
143059
142452
  account.command(`list-logs`).description(`Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset`).option(
143060
142453
  `--total [value]`,
143061
142454
  `When set to false, the total count returned will be 0 and will not be calculated.`,
@@ -143125,6 +142518,41 @@ account.command(`update-password`).description(`Update currently logged in user
143125
142518
  async ({ password, oldPassword }) => parse3(await (await getAccountClient()).updatePassword(password, oldPassword))
143126
142519
  )
143127
142520
  );
142521
+ account.command(`list-payment-methods`).description(`List payment methods for this account.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, expired, failed`).action(
142522
+ actionRunner(
142523
+ async ({ queries }) => parse3(await (await getAccountClient()).listPaymentMethods(queries))
142524
+ )
142525
+ );
142526
+ account.command(`create-payment-method`).description(`Create a new payment method for the current user account.`).action(
142527
+ actionRunner(
142528
+ async () => parse3(await (await getAccountClient()).createPaymentMethod())
142529
+ )
142530
+ );
142531
+ account.command(`get-payment-method`).description(`Get a specific payment method for the user.`).requiredOption(`--payment-method-id <payment-method-id>`, `Unique ID of payment method`).action(
142532
+ actionRunner(
142533
+ async ({ paymentMethodId }) => parse3(await (await getAccountClient()).getPaymentMethod(paymentMethodId))
142534
+ )
142535
+ );
142536
+ account.command(`update-payment-method`).description(`Update a new payment method for the current user account.`).requiredOption(`--payment-method-id <payment-method-id>`, `Unique ID of payment method`).requiredOption(`--expiry-month <expiry-month>`, `Payment expiry month`, parseInteger).requiredOption(`--expiry-year <expiry-year>`, `Expiry year`, parseInteger).option(`--state <state>`, `State of the payment method country`).action(
142537
+ actionRunner(
142538
+ async ({ paymentMethodId, expiryMonth, expiryYear, state }) => parse3(await (await getAccountClient()).updatePaymentMethod(paymentMethodId, expiryMonth, expiryYear, state))
142539
+ )
142540
+ );
142541
+ account.command(`delete-payment-method`).description(`Delete a specific payment method from a user's account.`).requiredOption(`--payment-method-id <payment-method-id>`, `Unique ID of payment method`).action(
142542
+ actionRunner(
142543
+ async ({ paymentMethodId }) => parse3(await (await getAccountClient()).deletePaymentMethod(paymentMethodId))
142544
+ )
142545
+ );
142546
+ account.command(`update-payment-method-provider`).description(`Update payment method provider.`).requiredOption(`--payment-method-id <payment-method-id>`, `Unique ID of payment method`).requiredOption(`--provider-method-id <provider-method-id>`, `Payment method ID from the payment provider`).requiredOption(`--name <name>`, `Name in the payment method`).option(`--state <state>`, `State of the payment method country`).action(
142547
+ actionRunner(
142548
+ async ({ paymentMethodId, providerMethodId, name, state }) => parse3(await (await getAccountClient()).updatePaymentMethodProvider(paymentMethodId, providerMethodId, name, state))
142549
+ )
142550
+ );
142551
+ account.command(`update-payment-method-mandate-options`).description(`Update payment method mandate options.`).requiredOption(`--payment-method-id <payment-method-id>`, `Unique ID of payment method`).action(
142552
+ actionRunner(
142553
+ async ({ paymentMethodId }) => parse3(await (await getAccountClient()).updatePaymentMethodMandateOptions(paymentMethodId))
142554
+ )
142555
+ );
143128
142556
  account.command(`update-phone`).description(`Update the currently logged in user's phone number. After updating the phone number, the phone verification status will be reset. A confirmation SMS is not sent automatically, however you can use the [POST /account/verification/phone](https://appwrite.io/docs/references/cloud/client-web/account#createPhoneVerification) endpoint to send a confirmation SMS.`).requiredOption(`--phone <phone>`, `Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.`).requiredOption(`--password <password>`, `User password. Must be at least 8 chars.`).action(
143129
142557
  actionRunner(
143130
142558
  async ({ phone, password }) => parse3(await (await getAccountClient()).updatePhone(phone, password))
@@ -143186,8 +142614,8 @@ If there is already an active session, the new session will be attached to the l
143186
142614
  A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
143187
142615
  `).requiredOption(`--provider <provider>`, `OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.`).option(`--success <success>`, `URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`).option(`--failure <failure>`, `URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`).option(`--scopes [scopes...]`, `A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.`).action(
143188
142616
  actionRunner(
143189
- async ({ provider, success: success19, failure, scopes }) => {
143190
- const url2 = (await getAccountClient()).createOAuth2Session(provider, success19, failure, scopes);
142617
+ async ({ provider, success: success20, failure, scopes }) => {
142618
+ const url2 = (await getAccountClient()).createOAuth2Session(provider, success20, failure, scopes);
143191
142619
  if (url2) console.log(url2);
143192
142620
  }
143193
142621
  )
@@ -143267,8 +142695,8 @@ If authentication succeeds, \`userId\` and \`secret\` of a token will be appende
143267
142695
 
143268
142696
  A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).`).requiredOption(`--provider <provider>`, `OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.`).option(`--success <success>`, `URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`).option(`--failure <failure>`, `URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`).option(`--scopes [scopes...]`, `A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.`).action(
143269
142697
  actionRunner(
143270
- async ({ provider, success: success19, failure, scopes }) => {
143271
- const url2 = (await getAccountClient()).createOAuth2Token(provider, success19, failure, scopes);
142698
+ async ({ provider, success: success20, failure, scopes }) => {
142699
+ const url2 = (await getAccountClient()).createOAuth2Token(provider, success20, failure, scopes);
143272
142700
  if (url2) console.log(url2);
143273
142701
  }
143274
142702
  )
@@ -143317,26 +142745,108 @@ account.command(`update-phone-verification`).description(`Use this endpoint to c
143317
142745
  )
143318
142746
  );
143319
142747
 
143320
- // lib/commands/services/console.ts
143321
- var consoleClient = null;
143322
- var getConsoleClient = async () => {
143323
- if (!consoleClient) {
142748
+ // lib/commands/services/activities.ts
142749
+ var activitiesClient = null;
142750
+ var getActivitiesClient = async () => {
142751
+ if (!activitiesClient) {
142752
+ const sdkClient = await sdkForProject();
142753
+ activitiesClient = new Activities(sdkClient);
142754
+ }
142755
+ return activitiesClient;
142756
+ };
142757
+ var activities = new Command("activities").description(commandDescriptions["activities"] ?? "").configureHelp({
142758
+ helpWidth: process.stdout.columns || 80
142759
+ });
142760
+ activities.command(`list-events`).description(`List all events for selected filters.`).option(`--queries <queries>`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on attributes such as userId, teamId, etc.`).action(
142761
+ actionRunner(
142762
+ async ({ queries }) => parse3(await (await getActivitiesClient()).listEvents(queries))
142763
+ )
142764
+ );
142765
+ activities.command(`get-event`).description(`Get event by ID.
142766
+ `).requiredOption(`--event-id <event-id>`, `Event ID.`).action(
142767
+ actionRunner(
142768
+ async ({ eventId }) => parse3(await (await getActivitiesClient()).getEvent(eventId))
142769
+ )
142770
+ );
142771
+
142772
+ // lib/commands/services/backups.ts
142773
+ var backupsClient = null;
142774
+ var getBackupsClient = async () => {
142775
+ if (!backupsClient) {
143324
142776
  const sdkClient = await sdkForProject();
143325
- consoleClient = new Console(sdkClient);
142777
+ backupsClient = new Backups(sdkClient);
143326
142778
  }
143327
- return consoleClient;
142779
+ return backupsClient;
143328
142780
  };
143329
- var console2 = new Command("console").description(commandDescriptions["console"] ?? "").configureHelp({
142781
+ var backups = new Command("backups").description(commandDescriptions["backups"] ?? "").configureHelp({
143330
142782
  helpWidth: process.stdout.columns || 80
143331
142783
  });
143332
- console2.command(`get-resource`).description(`Check if a resource ID is available.`).requiredOption(`--value <value>`, `Resource value.`).requiredOption(`--type <type>`, `Resource type.`).action(
142784
+ backups.command(`list-archives`).description(`List all archives for a project.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`).action(
142785
+ actionRunner(
142786
+ async ({ queries }) => parse3(await (await getBackupsClient()).listArchives(queries))
142787
+ )
142788
+ );
142789
+ backups.command(`create-archive`).description(`Create a new archive asynchronously for a project.`).requiredOption(`--services [services...]`, `Array of services to backup`).option(`--resource-id <resource-id>`, `Resource ID. When set, only this single resource will be backed up.`).action(
142790
+ actionRunner(
142791
+ async ({ services, resourceId }) => parse3(await (await getBackupsClient()).createArchive(services, resourceId))
142792
+ )
142793
+ );
142794
+ backups.command(`get-archive`).description(`Get a backup archive using it's ID.`).requiredOption(`--archive-id <archive-id>`, `Archive ID. Choose a custom ID\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`).action(
142795
+ actionRunner(
142796
+ async ({ archiveId }) => parse3(await (await getBackupsClient()).getArchive(archiveId))
142797
+ )
142798
+ );
142799
+ backups.command(`delete-archive`).description(`Delete an existing archive for a project.`).requiredOption(`--archive-id <archive-id>`, `Policy ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`).action(
142800
+ actionRunner(
142801
+ async ({ archiveId }) => parse3(await (await getBackupsClient()).deleteArchive(archiveId))
142802
+ )
142803
+ );
142804
+ backups.command(`list-policies`).description(`List all policies for a project.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`).action(
142805
+ actionRunner(
142806
+ async ({ queries }) => parse3(await (await getBackupsClient()).listPolicies(queries))
142807
+ )
142808
+ );
142809
+ backups.command(`create-policy`).description(`Create a new backup policy.`).requiredOption(`--policy-id <policy-id>`, `Policy ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`).requiredOption(`--services [services...]`, `Array of services to backup`).requiredOption(`--retention <retention>`, `Days to keep backups before deletion`, parseInteger).requiredOption(`--schedule <schedule>`, `Schedule CRON syntax.`).option(`--name <name>`, `Policy name. Max length: 128 chars.`).option(`--resource-id <resource-id>`, `Resource ID. When set, only this single resource will be backed up.`).option(
142810
+ `--enabled [value]`,
142811
+ `Is policy enabled? When set to 'disabled', no backups will be taken`,
142812
+ (value) => value === void 0 ? true : parseBool(value)
142813
+ ).action(
143333
142814
  actionRunner(
143334
- async ({ value, type }) => parse3(await (await getConsoleClient()).getResource(value, type))
142815
+ async ({ policyId, services, retention, schedule, name, resourceId, enabled }) => parse3(await (await getBackupsClient()).createPolicy(policyId, services, retention, schedule, name, resourceId, enabled))
143335
142816
  )
143336
142817
  );
143337
- console2.command(`variables`).description(`Get all Environment Variables that are relevant for the console.`).action(
142818
+ backups.command(`get-policy`).description(`Get a backup policy using it's ID.`).requiredOption(`--policy-id <policy-id>`, `Policy ID. Choose a custom ID\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`).action(
142819
+ actionRunner(
142820
+ async ({ policyId }) => parse3(await (await getBackupsClient()).getPolicy(policyId))
142821
+ )
142822
+ );
142823
+ backups.command(`update-policy`).description(`Update an existing policy using it's ID.`).requiredOption(`--policy-id <policy-id>`, `Policy ID. Choose a custom ID\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`).option(`--name <name>`, `Policy name. Max length: 128 chars.`).option(`--retention <retention>`, `Days to keep backups before deletion`, parseInteger).option(`--schedule <schedule>`, `Cron expression`).option(
142824
+ `--enabled [value]`,
142825
+ `Is Backup enabled? When set to 'disabled', No backup will be taken`,
142826
+ (value) => value === void 0 ? true : parseBool(value)
142827
+ ).action(
143338
142828
  actionRunner(
143339
- async () => parse3(await (await getConsoleClient()).variables())
142829
+ async ({ policyId, name, retention, schedule, enabled }) => parse3(await (await getBackupsClient()).updatePolicy(policyId, name, retention, schedule, enabled))
142830
+ )
142831
+ );
142832
+ backups.command(`delete-policy`).description(`Delete a policy using it's ID.`).requiredOption(`--policy-id <policy-id>`, `Policy ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`).action(
142833
+ actionRunner(
142834
+ async ({ policyId }) => parse3(await (await getBackupsClient()).deletePolicy(policyId))
142835
+ )
142836
+ );
142837
+ backups.command(`create-restoration`).description(`Create and trigger a new restoration for a backup on a project.`).requiredOption(`--archive-id <archive-id>`, `Backup archive ID to restore`).requiredOption(`--services [services...]`, `Array of services to restore`).option(`--new-resource-id <new-resource-id>`, `Unique Id. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`).option(`--new-resource-name <new-resource-name>`, `Database name. Max length: 128 chars.`).action(
142838
+ actionRunner(
142839
+ async ({ archiveId, services, newResourceId, newResourceName }) => parse3(await (await getBackupsClient()).createRestoration(archiveId, services, newResourceId, newResourceName))
142840
+ )
142841
+ );
142842
+ backups.command(`list-restorations`).description(`List all backup restorations for a project.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`).action(
142843
+ actionRunner(
142844
+ async ({ queries }) => parse3(await (await getBackupsClient()).listRestorations(queries))
142845
+ )
142846
+ );
142847
+ backups.command(`get-restoration`).description(`Get the current status of a backup restoration.`).requiredOption(`--restoration-id <restoration-id>`, `Restoration ID. Choose a custom ID\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`).action(
142848
+ actionRunner(
142849
+ async ({ restorationId }) => parse3(await (await getBackupsClient()).getRestoration(restorationId))
143340
142850
  )
143341
142851
  );
143342
142852
 
@@ -144196,11 +143706,26 @@ health.command(`get-queue-audits`).description(`Get the number of audit logs tha
144196
143706
  async ({ threshold }) => parse3(await (await getHealthClient()).getQueueAudits(threshold))
144197
143707
  )
144198
143708
  );
143709
+ health.command(`get-queue-billing-project-aggregation`).description(`Get billing project aggregation queue.`).option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger).action(
143710
+ actionRunner(
143711
+ async ({ threshold }) => parse3(await (await getHealthClient()).getQueueBillingProjectAggregation(threshold))
143712
+ )
143713
+ );
143714
+ health.command(`get-queue-billing-team-aggregation`).description(`Get billing team aggregation queue.`).option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger).action(
143715
+ actionRunner(
143716
+ async ({ threshold }) => parse3(await (await getHealthClient()).getQueueBillingTeamAggregation(threshold))
143717
+ )
143718
+ );
144199
143719
  health.command(`get-queue-builds`).description(`Get the number of builds that are waiting to be processed in the Appwrite internal queue server.`).option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger).action(
144200
143720
  actionRunner(
144201
143721
  async ({ threshold }) => parse3(await (await getHealthClient()).getQueueBuilds(threshold))
144202
143722
  )
144203
143723
  );
143724
+ health.command(`get-queue-priority-builds`).description(`Get the priority builds queue size.`).option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 500.`, parseInteger).action(
143725
+ actionRunner(
143726
+ async ({ threshold }) => parse3(await (await getHealthClient()).getQueuePriorityBuilds(threshold))
143727
+ )
143728
+ );
144204
143729
  health.command(`get-queue-certificates`).description(`Get the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server.`).option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger).action(
144205
143730
  actionRunner(
144206
143731
  async ({ threshold }) => parse3(await (await getHealthClient()).getQueueCertificates(threshold))
@@ -144247,6 +143772,11 @@ health.command(`get-queue-migrations`).description(`Get the number of migrations
144247
143772
  async ({ threshold }) => parse3(await (await getHealthClient()).getQueueMigrations(threshold))
144248
143773
  )
144249
143774
  );
143775
+ health.command(`get-queue-region-manager`).description(`Get region manager queue.`).option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 100.`, parseInteger).action(
143776
+ actionRunner(
143777
+ async ({ threshold }) => parse3(await (await getHealthClient()).getQueueRegionManager(threshold))
143778
+ )
143779
+ );
144250
143780
  health.command(`get-queue-stats-resources`).description(`Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.`).option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger).action(
144251
143781
  actionRunner(
144252
143782
  async ({ threshold }) => parse3(await (await getHealthClient()).getQueueStatsResources(threshold))
@@ -144257,6 +143787,11 @@ health.command(`get-queue-usage`).description(`Get the number of metrics that ar
144257
143787
  async ({ threshold }) => parse3(await (await getHealthClient()).getQueueUsage(threshold))
144258
143788
  )
144259
143789
  );
143790
+ health.command(`get-queue-threats`).description(`Get threats queue.`).option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 100.`, parseInteger).action(
143791
+ actionRunner(
143792
+ async ({ threshold }) => parse3(await (await getHealthClient()).getQueueThreats(threshold))
143793
+ )
143794
+ );
144260
143795
  health.command(`get-queue-webhooks`).description(`Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.`).option(`--threshold <threshold>`, `Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.`, parseInteger).action(
144261
143796
  actionRunner(
144262
143797
  async ({ threshold }) => parse3(await (await getHealthClient()).getQueueWebhooks(threshold))
@@ -144802,7 +144337,7 @@ var getMigrationsClient = async () => {
144802
144337
  var migrations = new Command("migrations").description(commandDescriptions["migrations"] ?? "").configureHelp({
144803
144338
  helpWidth: process.stdout.columns || 80
144804
144339
  });
144805
- migrations.command(`list`).description(`List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, statusCounters, resourceData, errors`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
144340
+ migrations.command(`list`).description(`List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, resourceId, resourceType, statusCounters, resourceData, errors`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
144806
144341
  `--total [value]`,
144807
144342
  `When set to false, the total count returned will be 0 and will not be calculated.`,
144808
144343
  (value) => value === void 0 ? true : parseBool(value)
@@ -145148,6 +144683,29 @@ projects.command(`delete-platform`).description(`Delete a platform by its unique
145148
144683
  async ({ projectId, platformId }) => parse3(await (await getProjectsClient()).deletePlatform(projectId, platformId))
145149
144684
  )
145150
144685
  );
144686
+ projects.command(`list-schedules`).description(`Get a list of all the project's schedules. You can use the query params to filter your results.`).requiredOption(`--project-id <project-id>`, `Project unique ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: resourceType, resourceId, projectId, schedule, active, region`).option(
144687
+ `--total [value]`,
144688
+ `When set to false, the total count returned will be 0 and will not be calculated.`,
144689
+ (value) => value === void 0 ? true : parseBool(value)
144690
+ ).action(
144691
+ actionRunner(
144692
+ async ({ projectId, queries, total }) => parse3(await (await getProjectsClient()).listSchedules(projectId, queries, total))
144693
+ )
144694
+ );
144695
+ projects.command(`create-schedule`).description(`Create a new schedule for a resource.`).requiredOption(`--project-id <project-id>`, `Project unique ID.`).requiredOption(`--resource-type <resource-type>`, `The resource type for the schedule. Possible values: function, execution, message, backup.`).requiredOption(`--resource-id <resource-id>`, `The resource ID to associate with this schedule.`).requiredOption(`--schedule <schedule>`, `Schedule CRON expression.`).option(
144696
+ `--active [value]`,
144697
+ `Whether the schedule is active.`,
144698
+ (value) => value === void 0 ? true : parseBool(value)
144699
+ ).option(`--data <data>`, `Schedule data as a JSON string. Used to store resource-specific context needed for execution.`).action(
144700
+ actionRunner(
144701
+ async ({ projectId, resourceType, resourceId, schedule, active, data }) => parse3(await (await getProjectsClient()).createSchedule(projectId, resourceType, resourceId, schedule, active, JSON.parse(data)))
144702
+ )
144703
+ );
144704
+ projects.command(`get-schedule`).description(`Get a schedule by its unique ID.`).requiredOption(`--project-id <project-id>`, `Project unique ID.`).requiredOption(`--schedule-id <schedule-id>`, `Schedule ID.`).action(
144705
+ actionRunner(
144706
+ async ({ projectId, scheduleId }) => parse3(await (await getProjectsClient()).getSchedule(projectId, scheduleId))
144707
+ )
144708
+ );
145151
144709
  projects.command(`update-service-status`).description(`Update the status of a specific service. Use this endpoint to enable or disable a service in your project. `).requiredOption(`--project-id <project-id>`, `Project unique ID.`).requiredOption(`--service <service>`, `Service name.`).requiredOption(`--status <status>`, `Service status.`, parseBool).action(
145152
144710
  actionRunner(
145153
144711
  async ({ projectId, service, status }) => parse3(await (await getProjectsClient()).updateServiceStatus(projectId, service, status))
@@ -145554,7 +145112,7 @@ storage.command(`create-bucket`).description(`Create a new storage bucket.`).req
145554
145112
  `--enabled [value]`,
145555
145113
  `Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.`,
145556
145114
  (value) => value === void 0 ? true : parseBool(value)
145557
- ).option(`--maximum-file-size <maximum-file-size>`, `Maximum file size allowed in bytes. Maximum allowed value is 30MB.`, parseInteger).option(`--allowed-file-extensions [allowed-file-extensions...]`, `Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.`).option(`--compression <compression>`, `Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled`).option(
145115
+ ).option(`--maximum-file-size <maximum-file-size>`, `Maximum file size allowed in bytes. Maximum allowed value is 5GB.`, parseInteger).option(`--allowed-file-extensions [allowed-file-extensions...]`, `Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.`).option(`--compression <compression>`, `Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled`).option(
145558
145116
  `--encryption [value]`,
145559
145117
  `Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled`,
145560
145118
  (value) => value === void 0 ? true : parseBool(value)
@@ -145584,7 +145142,7 @@ storage.command(`update-bucket`).description(`Update a storage bucket by its uni
145584
145142
  `--enabled [value]`,
145585
145143
  `Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.`,
145586
145144
  (value) => value === void 0 ? true : parseBool(value)
145587
- ).option(`--maximum-file-size <maximum-file-size>`, `Maximum file size allowed in bytes. Maximum allowed value is 30MB.`, parseInteger).option(`--allowed-file-extensions [allowed-file-extensions...]`, `Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.`).option(`--compression <compression>`, `Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled`).option(
145145
+ ).option(`--maximum-file-size <maximum-file-size>`, `Maximum file size allowed in bytes. Maximum allowed value is 5GB.`, parseInteger).option(`--allowed-file-extensions [allowed-file-extensions...]`, `Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.`).option(`--compression <compression>`, `Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled`).option(
145588
145146
  `--encryption [value]`,
145589
145147
  `Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled`,
145590
145148
  (value) => value === void 0 ? true : parseBool(value)
@@ -146756,7 +146314,7 @@ if (process.argv.includes("-v") || process.argv.includes("--version")) {
146756
146314
  cliConfig.all = true;
146757
146315
  }).on("option:id", function() {
146758
146316
  cliConfig.ids = this.opts().id;
146759
- }).showSuggestionAfterError().addCommand(whoami).addCommand(register).addCommand(login).addCommand(init).addCommand(pull).addCommand(push).addCommand(types).addCommand(deploy).addCommand(run).addCommand(update).addCommand(generate).addCommand(logout).addCommand(account).addCommand(console2).addCommand(databases).addCommand(functions).addCommand(graphql).addCommand(health).addCommand(locale).addCommand(messaging).addCommand(migrations).addCommand(project).addCommand(projects).addCommand(proxy).addCommand(sites).addCommand(storage).addCommand(tablesDB).addCommand(teams).addCommand(tokens).addCommand(users).addCommand(vcs).addCommand(client).parse(process.argv);
146317
+ }).showSuggestionAfterError().addCommand(whoami).addCommand(register).addCommand(login).addCommand(init).addCommand(pull).addCommand(push).addCommand(types).addCommand(deploy).addCommand(run).addCommand(update).addCommand(generate).addCommand(logout).addCommand(account).addCommand(activities).addCommand(backups).addCommand(databases).addCommand(functions).addCommand(graphql).addCommand(health).addCommand(locale).addCommand(messaging).addCommand(migrations).addCommand(project).addCommand(projects).addCommand(proxy).addCommand(sites).addCommand(storage).addCommand(tablesDB).addCommand(teams).addCommand(tokens).addCommand(users).addCommand(vcs).addCommand(client).parse(process.argv);
146760
146318
  process.stdout.columns = oldWidth;
146761
146319
  }
146762
146320
  /*! Bundled license information: