@ai-matrx/vault 0.1.33 → 0.1.35

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.
@@ -4436,7 +4436,7 @@ var init_zip_reader = __esm({
4436
4436
  }
4437
4437
  });
4438
4438
 
4439
- // ../../node_modules/.pnpm/lossless-json@4.3.1/node_modules/lossless-json/lib/esm/utils.js
4439
+ // ../../node_modules/.pnpm/lossless-json@4.3.3_patch_hash=3d667bc403737067026a4025cf7583b9ec434c0318d7d958811f88333c596dfb/node_modules/lossless-json/lib/esm/utils.js
4440
4440
  function isInteger(value) {
4441
4441
  return INTEGER_REGEX.test(value);
4442
4442
  }
@@ -4450,6 +4450,9 @@ function isSafeNumber(value, config3) {
4450
4450
  return Number.isSafeInteger(Number.parseInt(value, 10));
4451
4451
  }
4452
4452
  const num = Number.parseFloat(value);
4453
+ if (Number.isInteger(num) && !Number.isSafeInteger(num)) {
4454
+ return false;
4455
+ }
4453
4456
  const parsed = String(num);
4454
4457
  if (value === parsed) {
4455
4458
  return true;
@@ -4461,7 +4464,7 @@ function isSafeNumber(value, config3) {
4461
4464
  }
4462
4465
  if (config3?.approx === true) {
4463
4466
  const requiredDigits = 14;
4464
- if (!isInteger(value) && parsedDigits.length >= requiredDigits && valueDigits.startsWith(parsedDigits.substring(0, requiredDigits))) {
4467
+ if (parsedDigits.length >= requiredDigits && valueDigits.startsWith(parsedDigits.substring(0, requiredDigits))) {
4465
4468
  return true;
4466
4469
  }
4467
4470
  }
@@ -4528,11 +4531,21 @@ function getSignificantDigitRange(value) {
4528
4531
  };
4529
4532
  }
4530
4533
 
4531
- // ../../node_modules/.pnpm/lossless-json@4.3.1/node_modules/lossless-json/lib/esm/LosslessNumber.js
4534
+ // ../../node_modules/.pnpm/lossless-json@4.3.3_patch_hash=3d667bc403737067026a4025cf7583b9ec434c0318d7d958811f88333c596dfb/node_modules/lossless-json/lib/esm/LosslessNumber.js
4535
+ var losslessNumberMarker = /* @__PURE__ */ Symbol.for("lossless-json.LosslessNumber");
4532
4536
  var LosslessNumber = class {
4533
4537
  // numeric value as string
4534
- // type information
4538
+ value;
4539
+ /**
4540
+ * @deprecated Use the isLosslessNumber(value) function instead.
4541
+ *
4542
+ * Ordinary objects may also have an isLosslessNumber property, so this
4543
+ * field cannot reliably identify lossless numbers.
4544
+ */
4535
4545
  isLosslessNumber = true;
4546
+ get [losslessNumberMarker]() {
4547
+ return true;
4548
+ }
4536
4549
  constructor(value) {
4537
4550
  if (!isNumber(value)) {
4538
4551
  throw new Error(`Invalid number (value: "${value}")`);
@@ -4571,15 +4584,15 @@ var LosslessNumber = class {
4571
4584
  // stringified JSON since it has to be parsed into a number first.
4572
4585
  };
4573
4586
  function isLosslessNumber(value) {
4574
- return value && typeof value === "object" && value.isLosslessNumber || false;
4587
+ return value !== null && typeof value === "object" && value[losslessNumberMarker] === true;
4575
4588
  }
4576
4589
 
4577
- // ../../node_modules/.pnpm/lossless-json@4.3.1/node_modules/lossless-json/lib/esm/numberParsers.js
4590
+ // ../../node_modules/.pnpm/lossless-json@4.3.3_patch_hash=3d667bc403737067026a4025cf7583b9ec434c0318d7d958811f88333c596dfb/node_modules/lossless-json/lib/esm/numberParsers.js
4578
4591
  function parseLosslessNumber(value) {
4579
4592
  return new LosslessNumber(value);
4580
4593
  }
4581
4594
 
4582
- // ../../node_modules/.pnpm/lossless-json@4.3.1/node_modules/lossless-json/lib/esm/revive.js
4595
+ // ../../node_modules/.pnpm/lossless-json@4.3.3_patch_hash=3d667bc403737067026a4025cf7583b9ec434c0318d7d958811f88333c596dfb/node_modules/lossless-json/lib/esm/revive.js
4583
4596
  function revive(json, reviver) {
4584
4597
  return reviveValue({
4585
4598
  "": json
@@ -4607,12 +4620,17 @@ function reviveObject(object3, reviver) {
4607
4620
  }
4608
4621
  function reviveArray(array, reviver) {
4609
4622
  for (let i = 0; i < array.length; i++) {
4610
- array[i] = reviveValue(array, String(i), array[i], reviver);
4623
+ const value = reviveValue(array, String(i), array[i], reviver);
4624
+ if (value === void 0) {
4625
+ delete array[i];
4626
+ } else {
4627
+ array[i] = value;
4628
+ }
4611
4629
  }
4612
4630
  return array;
4613
4631
  }
4614
4632
 
4615
- // ../../node_modules/.pnpm/lossless-json@4.3.1/node_modules/lossless-json/lib/esm/parse.js
4633
+ // ../../node_modules/.pnpm/lossless-json@4.3.3_patch_hash=3d667bc403737067026a4025cf7583b9ec434c0318d7d958811f88333c596dfb/node_modules/lossless-json/lib/esm/parse.js
4616
4634
  function parse(text, reviver, options) {
4617
4635
  const optionsObj = typeof options === "function" ? {
4618
4636
  parseNumber: options
@@ -4650,7 +4668,7 @@ function parse(text, reviver, options) {
4650
4668
  throwObjectValueExpected();
4651
4669
  return;
4652
4670
  }
4653
- if (Object.prototype.hasOwnProperty.call(object3, key) && !isDeepEqual(value2, object3[key])) {
4671
+ if (Object.prototype.hasOwnProperty.call(object3, key)) {
4654
4672
  const returnedValue = onDuplicateKey({
4655
4673
  key,
4656
4674
  position: start + 1,
@@ -4658,10 +4676,10 @@ function parse(text, reviver, options) {
4658
4676
  newValue: value2
4659
4677
  });
4660
4678
  if (returnedValue !== void 0) {
4661
- object3[key] = returnedValue;
4679
+ setObjectKey(object3, key, returnedValue);
4662
4680
  }
4663
4681
  } else {
4664
- object3[key] = value2;
4682
+ setObjectKey(object3, key, value2);
4665
4683
  }
4666
4684
  }
4667
4685
  if (text.charCodeAt(i) !== codeClosingBrace) {
@@ -4759,6 +4777,8 @@ function parse(text, reviver, options) {
4759
4777
  while (isDigit(text.charCodeAt(i))) {
4760
4778
  i++;
4761
4779
  }
4780
+ } else {
4781
+ return void 0;
4762
4782
  }
4763
4783
  if (text.charCodeAt(i) === codeDot) {
4764
4784
  i++;
@@ -4822,11 +4842,10 @@ function parse(text, reviver, options) {
4822
4842
  function throwObjectKeyExpected() {
4823
4843
  throw new SyntaxError(`Quoted object key expected ${gotAt()}`);
4824
4844
  }
4825
- function throwDuplicateKey(_ref) {
4826
- let {
4827
- key,
4828
- position
4829
- } = _ref;
4845
+ function throwDuplicateKey({
4846
+ key,
4847
+ position
4848
+ }) {
4830
4849
  throw new SyntaxError(`Duplicate key '${key}' encountered at position ${position}`);
4831
4850
  }
4832
4851
  function throwObjectKeyOrEndExpected() {
@@ -4859,6 +4878,18 @@ function parse(text, reviver, options) {
4859
4878
  return `${got()} ${pos()}`;
4860
4879
  }
4861
4880
  }
4881
+ function setObjectKey(object3, key, value) {
4882
+ if (key === "__proto__") {
4883
+ Object.defineProperty(object3, key, {
4884
+ value,
4885
+ writable: true,
4886
+ enumerable: true,
4887
+ configurable: true
4888
+ });
4889
+ } else {
4890
+ object3[key] = value;
4891
+ }
4892
+ }
4862
4893
  function isWhitespace(code) {
4863
4894
  return code === codeSpace || code === codeNewline || code === codeTab || code === codeReturn;
4864
4895
  }
@@ -4874,22 +4905,6 @@ function isNonZeroDigit(code) {
4874
4905
  function isValidStringCharacter(code) {
4875
4906
  return code >= 32 && code <= 1114111;
4876
4907
  }
4877
- function isDeepEqual(a, b2) {
4878
- if (a === b2) {
4879
- return true;
4880
- }
4881
- if (Array.isArray(a) && Array.isArray(b2)) {
4882
- return a.length === b2.length && a.every((item, index) => isDeepEqual(item, b2[index]));
4883
- }
4884
- if (isObject(a) && isObject(b2)) {
4885
- const keys = [.../* @__PURE__ */ new Set([...Object.keys(a), ...Object.keys(b2)])];
4886
- return keys.every((key) => isDeepEqual(a[key], b2[key]));
4887
- }
4888
- return false;
4889
- }
4890
- function isObject(value) {
4891
- return typeof value === "object" && value !== null;
4892
- }
4893
4908
  var escapeCharacters = {
4894
4909
  '"': '"',
4895
4910
  "\\": "\\",
@@ -4926,7 +4941,7 @@ var codeLowercaseE = 101;
4926
4941
  var codeUppercaseF = 70;
4927
4942
  var codeLowercaseF = 102;
4928
4943
 
4929
- // ../../node_modules/.pnpm/lossless-json@4.3.1/node_modules/lossless-json/lib/esm/stringify.js
4944
+ // ../../node_modules/.pnpm/lossless-json@4.3.3_patch_hash=3d667bc403737067026a4025cf7583b9ec434c0318d7d958811f88333c596dfb/node_modules/lossless-json/lib/esm/stringify.js
4930
4945
  function stringify(value, replacer, space, numberStringifiers) {
4931
4946
  const resolvedSpace = resolveSpace(space);
4932
4947
  const replacedValue = typeof replacer === "function" ? replacer.call({
@@ -4947,7 +4962,7 @@ function stringify(value, replacer, space, numberStringifiers) {
4947
4962
  if (typeof value2 === "boolean" || typeof value2 === "number" || typeof value2 === "string" || value2 === null || value2 instanceof Date || value2 instanceof Boolean || value2 instanceof Number || value2 instanceof String) {
4948
4963
  return JSON.stringify(value2);
4949
4964
  }
4950
- if (value2?.isLosslessNumber) {
4965
+ if (isLosslessNumber(value2)) {
4951
4966
  return value2.toString();
4952
4967
  }
4953
4968
  if (typeof value2 === "bigint") {
@@ -4973,7 +4988,8 @@ function stringify(value, replacer, space, numberStringifiers) {
4973
4988
  str += childIndent;
4974
4989
  }
4975
4990
  if (typeof item !== "undefined" && typeof item !== "function") {
4976
- str += stringifyValue(item, childIndent);
4991
+ const serialized = stringifyValue(item, childIndent);
4992
+ str += serialized === void 0 ? "null" : serialized;
4977
4993
  } else {
4978
4994
  str += "null";
4979
4995
  }
@@ -4987,9 +5003,9 @@ ${indent}]` : "]";
4987
5003
  }
4988
5004
  function stringifyObject(object3, indent) {
4989
5005
  if (typeof object3.toJSON === "function") {
4990
- return stringify(object3.toJSON(), replacer, space, void 0);
5006
+ return stringifyValue(object3.toJSON(), indent);
4991
5007
  }
4992
- const keys = Array.isArray(replacer) ? replacer.map(String) : Object.keys(object3);
5008
+ const keys = Array.isArray(replacer) ? [...new Set(replacer.map(String))] : Object.keys(object3);
4993
5009
  if (keys.length === 0) {
4994
5010
  return "{}";
4995
5011
  }
@@ -4999,6 +5015,10 @@ ${indent}]` : "]";
4999
5015
  for (const key of keys) {
5000
5016
  const value2 = typeof replacer === "function" ? replacer.call(object3, key, object3[key]) : object3[key];
5001
5017
  if (includeProperty(key, value2)) {
5018
+ const serialized = stringifyValue(value2, childIndent);
5019
+ if (serialized === void 0) {
5020
+ continue;
5021
+ }
5002
5022
  if (first) {
5003
5023
  first = false;
5004
5024
  } else {
@@ -5006,7 +5026,7 @@ ${indent}]` : "]";
5006
5026
  }
5007
5027
  const keyStr = JSON.stringify(key);
5008
5028
  str += resolvedSpace ? `${childIndent + keyStr}: ` : `${keyStr}:`;
5009
- str += stringifyValue(value2, childIndent);
5029
+ str += serialized;
5010
5030
  }
5011
5031
  }
5012
5032
  str += resolvedSpace ? `
@@ -5017,12 +5037,14 @@ ${indent}}` : "}";
5017
5037
  return typeof value2 !== "undefined" && typeof value2 !== "function" && typeof value2 !== "symbol";
5018
5038
  }
5019
5039
  }
5040
+ var MAX_SPACE_LENGTH = 10;
5020
5041
  function resolveSpace(space) {
5021
5042
  if (typeof space === "number") {
5022
- return " ".repeat(space);
5043
+ const count = Math.min(Math.trunc(space), MAX_SPACE_LENGTH);
5044
+ return count >= 1 ? " ".repeat(count) : void 0;
5023
5045
  }
5024
5046
  if (typeof space === "string" && space !== "") {
5025
- return space;
5047
+ return space.slice(0, MAX_SPACE_LENGTH);
5026
5048
  }
5027
5049
  return void 0;
5028
5050
  }