@fragment-dev/cli 2026.10.30-3 → 2026.10.30-7

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 (40) hide show
  1. package/README.md +35 -0
  2. package/bin/dev.js +1 -1
  3. package/bin/run.js +3 -1
  4. package/dist/{chunk-5GFLO7UI.js → chunk-4CPAGLCS.js} +3 -3
  5. package/dist/chunk-4E5LH6UM.js +46 -0
  6. package/dist/{chunk-RBPPQTJQ.js → chunk-6CHMI6QB.js} +1144 -102
  7. package/dist/{chunk-5IXOOVRA.js → chunk-AXYDDQ64.js} +1 -1
  8. package/dist/{chunk-C7BZFVCG.js → chunk-C3IGD3FR.js} +1 -1
  9. package/dist/{chunk-IC5FEPA7.js → chunk-ERS7TGXY.js} +4 -4
  10. package/dist/{chunk-MU3PFOFX.js → chunk-EXTVHTGU.js} +6 -36
  11. package/dist/{chunk-XDLQLWN4.js → chunk-FTALVA4K.js} +10 -6
  12. package/dist/{chunk-BJCQGSYO.js → chunk-GKWT6QEB.js} +3 -3
  13. package/dist/{chunk-2B4YYDGV.js → chunk-HOYPQHWF.js} +4 -4
  14. package/dist/{chunk-CBQOKKM3.js → chunk-JSWKMWBO.js} +5 -5
  15. package/dist/{chunk-XGFUT3M2.js → chunk-N2SKO3MO.js} +2 -2
  16. package/dist/chunk-NSEYKDYC.js +398 -0
  17. package/dist/chunk-OCE3DJ2V.js +76 -0
  18. package/dist/chunk-POIPF2YW.js +609 -0
  19. package/dist/chunk-PW3XYURG.js +4917 -0
  20. package/dist/{chunk-L3PXI35O.js → chunk-WRHRJO7G.js} +6 -3
  21. package/dist/{chunk-75AAIPKL.js → chunk-WSFEOM2D.js} +0 -205
  22. package/dist/chunk-XKVEOJUH.js +85 -0
  23. package/dist/commands/gen-graphql.js +7 -6
  24. package/dist/commands/print-schema.js +9 -7
  25. package/dist/commands/simulate-scenario.js +31 -0
  26. package/dist/commands/verify-schema.js +8 -7
  27. package/dist/commands.js +21 -15
  28. package/dist/graphql.js +4 -3
  29. package/dist/index.js +21 -15
  30. package/dist/utils/formatAccountHierarchy.js +11 -0
  31. package/dist/utils/formatBalance.js +11 -0
  32. package/dist/utils/formatChartOfAccounts.js +7 -5
  33. package/dist/utils/formatEntries.js +6 -5
  34. package/dist/utils/formatScenarioAccountBalances.js +18 -0
  35. package/dist/utils/formatScenarioBalances.js +19 -0
  36. package/dist/utils/formatValidationErrors.js +3 -2
  37. package/dist/utils/schemaBackCompat.js +7 -6
  38. package/dist/utils/schemaValidation.js +6 -5
  39. package/oclif.manifest.json +43 -1
  40. package/package.json +7 -2
@@ -18,7 +18,13 @@ import {
18
18
  SystemLineKindSchema,
19
19
  fillParams,
20
20
  getSchemaObjectParameters
21
- } from "./chunk-L3PXI35O.js";
21
+ } from "./chunk-WRHRJO7G.js";
22
+ import {
23
+ BadRequestError,
24
+ InternalError,
25
+ assertIsError,
26
+ assert_default
27
+ } from "./chunk-WSFEOM2D.js";
22
28
  import {
23
29
  getInstanceValueByAccountPath,
24
30
  getStructuralPath,
@@ -26,13 +32,9 @@ import {
26
32
  getSubpaths
27
33
  } from "./chunk-2QGAXOCF.js";
28
34
  import {
29
- BadRequestError,
30
35
  CurrencyMatchInputSchema,
31
- InternalError,
32
- assertIsError,
33
- assert_default,
34
36
  currencyCodes
35
- } from "./chunk-75AAIPKL.js";
37
+ } from "./chunk-NSEYKDYC.js";
36
38
  import {
37
39
  MAX_FREEFORM_TEXT_LENGTH,
38
40
  ParameterizedAmount,
@@ -642,9 +644,9 @@ var require_types = __commonJS({
642
644
  var util_1 = require_util();
643
645
  var ZodError_1 = require_ZodError();
644
646
  var ParseInputLazyPath = class {
645
- constructor(parent, value, path, key) {
647
+ constructor(parent2, value, path, key) {
646
648
  this._cachedPath = [];
647
- this.parent = parent;
649
+ this.parent = parent2;
648
650
  this.data = value;
649
651
  this._path = path;
650
652
  this._key = key;
@@ -4726,6 +4728,99 @@ var getNative_default = getNative;
4726
4728
  var WeakMap2 = getNative_default(root_default, "WeakMap");
4727
4729
  var WeakMap_default = WeakMap2;
4728
4730
 
4731
+ // ../../node_modules/lodash-es/_baseCreate.js
4732
+ init_cjs_shims();
4733
+ var objectCreate = Object.create;
4734
+ var baseCreate = /* @__PURE__ */ function() {
4735
+ function object() {
4736
+ }
4737
+ return function(proto) {
4738
+ if (!isObject_default(proto)) {
4739
+ return {};
4740
+ }
4741
+ if (objectCreate) {
4742
+ return objectCreate(proto);
4743
+ }
4744
+ object.prototype = proto;
4745
+ var result = new object();
4746
+ object.prototype = void 0;
4747
+ return result;
4748
+ };
4749
+ }();
4750
+ var baseCreate_default = baseCreate;
4751
+
4752
+ // ../../node_modules/lodash-es/_apply.js
4753
+ init_cjs_shims();
4754
+ function apply(func, thisArg, args) {
4755
+ switch (args.length) {
4756
+ case 0:
4757
+ return func.call(thisArg);
4758
+ case 1:
4759
+ return func.call(thisArg, args[0]);
4760
+ case 2:
4761
+ return func.call(thisArg, args[0], args[1]);
4762
+ case 3:
4763
+ return func.call(thisArg, args[0], args[1], args[2]);
4764
+ }
4765
+ return func.apply(thisArg, args);
4766
+ }
4767
+ var apply_default = apply;
4768
+
4769
+ // ../../node_modules/lodash-es/noop.js
4770
+ init_cjs_shims();
4771
+ function noop() {
4772
+ }
4773
+ var noop_default = noop;
4774
+
4775
+ // ../../node_modules/lodash-es/_copyArray.js
4776
+ init_cjs_shims();
4777
+ function copyArray(source, array) {
4778
+ var index = -1, length = source.length;
4779
+ array || (array = Array(length));
4780
+ while (++index < length) {
4781
+ array[index] = source[index];
4782
+ }
4783
+ return array;
4784
+ }
4785
+ var copyArray_default = copyArray;
4786
+
4787
+ // ../../node_modules/lodash-es/_shortOut.js
4788
+ init_cjs_shims();
4789
+ var HOT_COUNT = 800;
4790
+ var HOT_SPAN = 16;
4791
+ var nativeNow = Date.now;
4792
+ function shortOut(func) {
4793
+ var count = 0, lastCalled = 0;
4794
+ return function() {
4795
+ var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
4796
+ lastCalled = stamp;
4797
+ if (remaining > 0) {
4798
+ if (++count >= HOT_COUNT) {
4799
+ return arguments[0];
4800
+ }
4801
+ } else {
4802
+ count = 0;
4803
+ }
4804
+ return func.apply(void 0, arguments);
4805
+ };
4806
+ }
4807
+ var shortOut_default = shortOut;
4808
+
4809
+ // ../../node_modules/lodash-es/_setToString.js
4810
+ init_cjs_shims();
4811
+
4812
+ // ../../node_modules/lodash-es/_baseSetToString.js
4813
+ init_cjs_shims();
4814
+
4815
+ // ../../node_modules/lodash-es/constant.js
4816
+ init_cjs_shims();
4817
+ function constant(value) {
4818
+ return function() {
4819
+ return value;
4820
+ };
4821
+ }
4822
+ var constant_default = constant;
4823
+
4729
4824
  // ../../node_modules/lodash-es/_defineProperty.js
4730
4825
  init_cjs_shims();
4731
4826
  var defineProperty = function() {
@@ -4738,6 +4833,86 @@ var defineProperty = function() {
4738
4833
  }();
4739
4834
  var defineProperty_default = defineProperty;
4740
4835
 
4836
+ // ../../node_modules/lodash-es/_baseSetToString.js
4837
+ var baseSetToString = !defineProperty_default ? identity_default : function(func, string) {
4838
+ return defineProperty_default(func, "toString", {
4839
+ "configurable": true,
4840
+ "enumerable": false,
4841
+ "value": constant_default(string),
4842
+ "writable": true
4843
+ });
4844
+ };
4845
+ var baseSetToString_default = baseSetToString;
4846
+
4847
+ // ../../node_modules/lodash-es/_setToString.js
4848
+ var setToString = shortOut_default(baseSetToString_default);
4849
+ var setToString_default = setToString;
4850
+
4851
+ // ../../node_modules/lodash-es/_arrayEach.js
4852
+ init_cjs_shims();
4853
+ function arrayEach(array, iteratee) {
4854
+ var index = -1, length = array == null ? 0 : array.length;
4855
+ while (++index < length) {
4856
+ if (iteratee(array[index], index, array) === false) {
4857
+ break;
4858
+ }
4859
+ }
4860
+ return array;
4861
+ }
4862
+ var arrayEach_default = arrayEach;
4863
+
4864
+ // ../../node_modules/lodash-es/_arrayIncludes.js
4865
+ init_cjs_shims();
4866
+
4867
+ // ../../node_modules/lodash-es/_baseIndexOf.js
4868
+ init_cjs_shims();
4869
+
4870
+ // ../../node_modules/lodash-es/_baseFindIndex.js
4871
+ init_cjs_shims();
4872
+ function baseFindIndex(array, predicate, fromIndex, fromRight) {
4873
+ var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
4874
+ while (fromRight ? index-- : ++index < length) {
4875
+ if (predicate(array[index], index, array)) {
4876
+ return index;
4877
+ }
4878
+ }
4879
+ return -1;
4880
+ }
4881
+ var baseFindIndex_default = baseFindIndex;
4882
+
4883
+ // ../../node_modules/lodash-es/_baseIsNaN.js
4884
+ init_cjs_shims();
4885
+ function baseIsNaN(value) {
4886
+ return value !== value;
4887
+ }
4888
+ var baseIsNaN_default = baseIsNaN;
4889
+
4890
+ // ../../node_modules/lodash-es/_strictIndexOf.js
4891
+ init_cjs_shims();
4892
+ function strictIndexOf(array, value, fromIndex) {
4893
+ var index = fromIndex - 1, length = array.length;
4894
+ while (++index < length) {
4895
+ if (array[index] === value) {
4896
+ return index;
4897
+ }
4898
+ }
4899
+ return -1;
4900
+ }
4901
+ var strictIndexOf_default = strictIndexOf;
4902
+
4903
+ // ../../node_modules/lodash-es/_baseIndexOf.js
4904
+ function baseIndexOf(array, value, fromIndex) {
4905
+ return value === value ? strictIndexOf_default(array, value, fromIndex) : baseFindIndex_default(array, baseIsNaN_default, fromIndex);
4906
+ }
4907
+ var baseIndexOf_default = baseIndexOf;
4908
+
4909
+ // ../../node_modules/lodash-es/_arrayIncludes.js
4910
+ function arrayIncludes(array, value) {
4911
+ var length = array == null ? 0 : array.length;
4912
+ return !!length && baseIndexOf_default(array, value, 0) > -1;
4913
+ }
4914
+ var arrayIncludes_default = arrayIncludes;
4915
+
4741
4916
  // ../../node_modules/lodash-es/_isIndex.js
4742
4917
  init_cjs_shims();
4743
4918
  var MAX_SAFE_INTEGER = 9007199254740991;
@@ -4749,6 +4924,9 @@ function isIndex(value, length) {
4749
4924
  }
4750
4925
  var isIndex_default = isIndex;
4751
4926
 
4927
+ // ../../node_modules/lodash-es/_assignValue.js
4928
+ init_cjs_shims();
4929
+
4752
4930
  // ../../node_modules/lodash-es/_baseAssignValue.js
4753
4931
  init_cjs_shims();
4754
4932
  function baseAssignValue(object, key, value) {
@@ -4772,6 +4950,60 @@ function eq(value, other) {
4772
4950
  }
4773
4951
  var eq_default = eq;
4774
4952
 
4953
+ // ../../node_modules/lodash-es/_assignValue.js
4954
+ var objectProto4 = Object.prototype;
4955
+ var hasOwnProperty3 = objectProto4.hasOwnProperty;
4956
+ function assignValue(object, key, value) {
4957
+ var objValue = object[key];
4958
+ if (!(hasOwnProperty3.call(object, key) && eq_default(objValue, value)) || value === void 0 && !(key in object)) {
4959
+ baseAssignValue_default(object, key, value);
4960
+ }
4961
+ }
4962
+ var assignValue_default = assignValue;
4963
+
4964
+ // ../../node_modules/lodash-es/_copyObject.js
4965
+ init_cjs_shims();
4966
+ function copyObject(source, props, object, customizer) {
4967
+ var isNew = !object;
4968
+ object || (object = {});
4969
+ var index = -1, length = props.length;
4970
+ while (++index < length) {
4971
+ var key = props[index];
4972
+ var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
4973
+ if (newValue === void 0) {
4974
+ newValue = source[key];
4975
+ }
4976
+ if (isNew) {
4977
+ baseAssignValue_default(object, key, newValue);
4978
+ } else {
4979
+ assignValue_default(object, key, newValue);
4980
+ }
4981
+ }
4982
+ return object;
4983
+ }
4984
+ var copyObject_default = copyObject;
4985
+
4986
+ // ../../node_modules/lodash-es/_overRest.js
4987
+ init_cjs_shims();
4988
+ var nativeMax = Math.max;
4989
+ function overRest(func, start, transform) {
4990
+ start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
4991
+ return function() {
4992
+ var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
4993
+ while (++index < length) {
4994
+ array[index] = args[start + index];
4995
+ }
4996
+ index = -1;
4997
+ var otherArgs = Array(start + 1);
4998
+ while (++index < start) {
4999
+ otherArgs[index] = args[index];
5000
+ }
5001
+ otherArgs[start] = transform(array);
5002
+ return apply_default(func, this, otherArgs);
5003
+ };
5004
+ }
5005
+ var overRest_default = overRest;
5006
+
4775
5007
  // ../../node_modules/lodash-es/isArrayLike.js
4776
5008
  init_cjs_shims();
4777
5009
 
@@ -4791,9 +5023,9 @@ var isArrayLike_default = isArrayLike;
4791
5023
 
4792
5024
  // ../../node_modules/lodash-es/_isPrototype.js
4793
5025
  init_cjs_shims();
4794
- var objectProto4 = Object.prototype;
5026
+ var objectProto5 = Object.prototype;
4795
5027
  function isPrototype(value) {
4796
- var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto4;
5028
+ var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto5;
4797
5029
  return value === proto;
4798
5030
  }
4799
5031
  var isPrototype_default = isPrototype;
@@ -4827,13 +5059,13 @@ function baseIsArguments(value) {
4827
5059
  var baseIsArguments_default = baseIsArguments;
4828
5060
 
4829
5061
  // ../../node_modules/lodash-es/isArguments.js
4830
- var objectProto5 = Object.prototype;
4831
- var hasOwnProperty3 = objectProto5.hasOwnProperty;
4832
- var propertyIsEnumerable = objectProto5.propertyIsEnumerable;
5062
+ var objectProto6 = Object.prototype;
5063
+ var hasOwnProperty4 = objectProto6.hasOwnProperty;
5064
+ var propertyIsEnumerable = objectProto6.propertyIsEnumerable;
4833
5065
  var isArguments = baseIsArguments_default(/* @__PURE__ */ function() {
4834
5066
  return arguments;
4835
5067
  }()) ? baseIsArguments_default : function(value) {
4836
- return isObjectLike_default(value) && hasOwnProperty3.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
5068
+ return isObjectLike_default(value) && hasOwnProperty4.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
4837
5069
  };
4838
5070
  var isArguments_default = isArguments;
4839
5071
 
@@ -4926,12 +5158,12 @@ var isTypedArray = nodeIsTypedArray ? baseUnary_default(nodeIsTypedArray) : base
4926
5158
  var isTypedArray_default = isTypedArray;
4927
5159
 
4928
5160
  // ../../node_modules/lodash-es/_arrayLikeKeys.js
4929
- var objectProto6 = Object.prototype;
4930
- var hasOwnProperty4 = objectProto6.hasOwnProperty;
5161
+ var objectProto7 = Object.prototype;
5162
+ var hasOwnProperty5 = objectProto7.hasOwnProperty;
4931
5163
  function arrayLikeKeys(value, inherited) {
4932
5164
  var isArr = isArray_default(value), isArg = !isArr && isArguments_default(value), isBuff = !isArr && !isArg && isBuffer_default(value), isType = !isArr && !isArg && !isBuff && isTypedArray_default(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes_default(value.length, String) : [], length = result.length;
4933
5165
  for (var key in value) {
4934
- if ((inherited || hasOwnProperty4.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
5166
+ if ((inherited || hasOwnProperty5.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
4935
5167
  (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
4936
5168
  isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
4937
5169
  isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
@@ -4963,15 +5195,15 @@ var nativeKeys = overArg_default(Object.keys, Object);
4963
5195
  var nativeKeys_default = nativeKeys;
4964
5196
 
4965
5197
  // ../../node_modules/lodash-es/_baseKeys.js
4966
- var objectProto7 = Object.prototype;
4967
- var hasOwnProperty5 = objectProto7.hasOwnProperty;
5198
+ var objectProto8 = Object.prototype;
5199
+ var hasOwnProperty6 = objectProto8.hasOwnProperty;
4968
5200
  function baseKeys(object) {
4969
5201
  if (!isPrototype_default(object)) {
4970
5202
  return nativeKeys_default(object);
4971
5203
  }
4972
5204
  var result = [];
4973
5205
  for (var key in Object(object)) {
4974
- if (hasOwnProperty5.call(object, key) && key != "constructor") {
5206
+ if (hasOwnProperty6.call(object, key) && key != "constructor") {
4975
5207
  result.push(key);
4976
5208
  }
4977
5209
  }
@@ -4985,6 +5217,48 @@ function keys(object) {
4985
5217
  }
4986
5218
  var keys_default = keys;
4987
5219
 
5220
+ // ../../node_modules/lodash-es/keysIn.js
5221
+ init_cjs_shims();
5222
+
5223
+ // ../../node_modules/lodash-es/_baseKeysIn.js
5224
+ init_cjs_shims();
5225
+
5226
+ // ../../node_modules/lodash-es/_nativeKeysIn.js
5227
+ init_cjs_shims();
5228
+ function nativeKeysIn(object) {
5229
+ var result = [];
5230
+ if (object != null) {
5231
+ for (var key in Object(object)) {
5232
+ result.push(key);
5233
+ }
5234
+ }
5235
+ return result;
5236
+ }
5237
+ var nativeKeysIn_default = nativeKeysIn;
5238
+
5239
+ // ../../node_modules/lodash-es/_baseKeysIn.js
5240
+ var objectProto9 = Object.prototype;
5241
+ var hasOwnProperty7 = objectProto9.hasOwnProperty;
5242
+ function baseKeysIn(object) {
5243
+ if (!isObject_default(object)) {
5244
+ return nativeKeysIn_default(object);
5245
+ }
5246
+ var isProto = isPrototype_default(object), result = [];
5247
+ for (var key in object) {
5248
+ if (!(key == "constructor" && (isProto || !hasOwnProperty7.call(object, key)))) {
5249
+ result.push(key);
5250
+ }
5251
+ }
5252
+ return result;
5253
+ }
5254
+ var baseKeysIn_default = baseKeysIn;
5255
+
5256
+ // ../../node_modules/lodash-es/keysIn.js
5257
+ function keysIn(object) {
5258
+ return isArrayLike_default(object) ? arrayLikeKeys_default(object, true) : baseKeysIn_default(object);
5259
+ }
5260
+ var keysIn_default = keysIn;
5261
+
4988
5262
  // ../../node_modules/lodash-es/get.js
4989
5263
  init_cjs_shims();
4990
5264
 
@@ -5055,25 +5329,25 @@ var hashDelete_default = hashDelete;
5055
5329
  // ../../node_modules/lodash-es/_hashGet.js
5056
5330
  init_cjs_shims();
5057
5331
  var HASH_UNDEFINED = "__lodash_hash_undefined__";
5058
- var objectProto8 = Object.prototype;
5059
- var hasOwnProperty6 = objectProto8.hasOwnProperty;
5332
+ var objectProto10 = Object.prototype;
5333
+ var hasOwnProperty8 = objectProto10.hasOwnProperty;
5060
5334
  function hashGet(key) {
5061
5335
  var data = this.__data__;
5062
5336
  if (nativeCreate_default) {
5063
5337
  var result = data[key];
5064
5338
  return result === HASH_UNDEFINED ? void 0 : result;
5065
5339
  }
5066
- return hasOwnProperty6.call(data, key) ? data[key] : void 0;
5340
+ return hasOwnProperty8.call(data, key) ? data[key] : void 0;
5067
5341
  }
5068
5342
  var hashGet_default = hashGet;
5069
5343
 
5070
5344
  // ../../node_modules/lodash-es/_hashHas.js
5071
5345
  init_cjs_shims();
5072
- var objectProto9 = Object.prototype;
5073
- var hasOwnProperty7 = objectProto9.hasOwnProperty;
5346
+ var objectProto11 = Object.prototype;
5347
+ var hasOwnProperty9 = objectProto11.hasOwnProperty;
5074
5348
  function hashHas(key) {
5075
5349
  var data = this.__data__;
5076
- return nativeCreate_default ? data[key] !== void 0 : hasOwnProperty7.call(data, key);
5350
+ return nativeCreate_default ? data[key] !== void 0 : hasOwnProperty9.call(data, key);
5077
5351
  }
5078
5352
  var hashHas_default = hashHas;
5079
5353
 
@@ -5376,6 +5650,15 @@ function get(object, path, defaultValue) {
5376
5650
  }
5377
5651
  var get_default = get;
5378
5652
 
5653
+ // ../../node_modules/lodash-es/_flatRest.js
5654
+ init_cjs_shims();
5655
+
5656
+ // ../../node_modules/lodash-es/flatten.js
5657
+ init_cjs_shims();
5658
+
5659
+ // ../../node_modules/lodash-es/_baseFlatten.js
5660
+ init_cjs_shims();
5661
+
5379
5662
  // ../../node_modules/lodash-es/_arrayPush.js
5380
5663
  init_cjs_shims();
5381
5664
  function arrayPush(array, values) {
@@ -5387,6 +5670,100 @@ function arrayPush(array, values) {
5387
5670
  }
5388
5671
  var arrayPush_default = arrayPush;
5389
5672
 
5673
+ // ../../node_modules/lodash-es/_isFlattenable.js
5674
+ init_cjs_shims();
5675
+ var spreadableSymbol = Symbol_default ? Symbol_default.isConcatSpreadable : void 0;
5676
+ function isFlattenable(value) {
5677
+ return isArray_default(value) || isArguments_default(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
5678
+ }
5679
+ var isFlattenable_default = isFlattenable;
5680
+
5681
+ // ../../node_modules/lodash-es/_baseFlatten.js
5682
+ function baseFlatten(array, depth, predicate, isStrict, result) {
5683
+ var index = -1, length = array.length;
5684
+ predicate || (predicate = isFlattenable_default);
5685
+ result || (result = []);
5686
+ while (++index < length) {
5687
+ var value = array[index];
5688
+ if (depth > 0 && predicate(value)) {
5689
+ if (depth > 1) {
5690
+ baseFlatten(value, depth - 1, predicate, isStrict, result);
5691
+ } else {
5692
+ arrayPush_default(result, value);
5693
+ }
5694
+ } else if (!isStrict) {
5695
+ result[result.length] = value;
5696
+ }
5697
+ }
5698
+ return result;
5699
+ }
5700
+ var baseFlatten_default = baseFlatten;
5701
+
5702
+ // ../../node_modules/lodash-es/flatten.js
5703
+ function flatten(array) {
5704
+ var length = array == null ? 0 : array.length;
5705
+ return length ? baseFlatten_default(array, 1) : [];
5706
+ }
5707
+ var flatten_default = flatten;
5708
+
5709
+ // ../../node_modules/lodash-es/_flatRest.js
5710
+ function flatRest(func) {
5711
+ return setToString_default(overRest_default(func, void 0, flatten_default), func + "");
5712
+ }
5713
+ var flatRest_default = flatRest;
5714
+
5715
+ // ../../node_modules/lodash-es/isPlainObject.js
5716
+ init_cjs_shims();
5717
+
5718
+ // ../../node_modules/lodash-es/_getPrototype.js
5719
+ init_cjs_shims();
5720
+ var getPrototype = overArg_default(Object.getPrototypeOf, Object);
5721
+ var getPrototype_default = getPrototype;
5722
+
5723
+ // ../../node_modules/lodash-es/isPlainObject.js
5724
+ var objectTag2 = "[object Object]";
5725
+ var funcProto3 = Function.prototype;
5726
+ var objectProto12 = Object.prototype;
5727
+ var funcToString3 = funcProto3.toString;
5728
+ var hasOwnProperty10 = objectProto12.hasOwnProperty;
5729
+ var objectCtorString = funcToString3.call(Object);
5730
+ function isPlainObject(value) {
5731
+ if (!isObjectLike_default(value) || baseGetTag_default(value) != objectTag2) {
5732
+ return false;
5733
+ }
5734
+ var proto = getPrototype_default(value);
5735
+ if (proto === null) {
5736
+ return true;
5737
+ }
5738
+ var Ctor = hasOwnProperty10.call(proto, "constructor") && proto.constructor;
5739
+ return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString3.call(Ctor) == objectCtorString;
5740
+ }
5741
+ var isPlainObject_default = isPlainObject;
5742
+
5743
+ // ../../node_modules/lodash-es/_baseSlice.js
5744
+ init_cjs_shims();
5745
+ function baseSlice(array, start, end) {
5746
+ var index = -1, length = array.length;
5747
+ if (start < 0) {
5748
+ start = -start > length ? 0 : length + start;
5749
+ }
5750
+ end = end > length ? length : end;
5751
+ if (end < 0) {
5752
+ end += length;
5753
+ }
5754
+ length = start > end ? 0 : end - start >>> 0;
5755
+ start >>>= 0;
5756
+ var result = Array(length);
5757
+ while (++index < length) {
5758
+ result[index] = array[index + start];
5759
+ }
5760
+ return result;
5761
+ }
5762
+ var baseSlice_default = baseSlice;
5763
+
5764
+ // ../../node_modules/lodash-es/_baseClone.js
5765
+ init_cjs_shims();
5766
+
5390
5767
  // ../../node_modules/lodash-es/_Stack.js
5391
5768
  init_cjs_shims();
5392
5769
 
@@ -5453,6 +5830,40 @@ Stack.prototype.has = stackHas_default;
5453
5830
  Stack.prototype.set = stackSet_default;
5454
5831
  var Stack_default = Stack;
5455
5832
 
5833
+ // ../../node_modules/lodash-es/_baseAssign.js
5834
+ init_cjs_shims();
5835
+ function baseAssign(object, source) {
5836
+ return object && copyObject_default(source, keys_default(source), object);
5837
+ }
5838
+ var baseAssign_default = baseAssign;
5839
+
5840
+ // ../../node_modules/lodash-es/_baseAssignIn.js
5841
+ init_cjs_shims();
5842
+ function baseAssignIn(object, source) {
5843
+ return object && copyObject_default(source, keysIn_default(source), object);
5844
+ }
5845
+ var baseAssignIn_default = baseAssignIn;
5846
+
5847
+ // ../../node_modules/lodash-es/_cloneBuffer.js
5848
+ init_cjs_shims();
5849
+ var freeExports3 = typeof exports == "object" && exports && !exports.nodeType && exports;
5850
+ var freeModule3 = freeExports3 && typeof module == "object" && module && !module.nodeType && module;
5851
+ var moduleExports3 = freeModule3 && freeModule3.exports === freeExports3;
5852
+ var Buffer2 = moduleExports3 ? root_default.Buffer : void 0;
5853
+ var allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : void 0;
5854
+ function cloneBuffer(buffer, isDeep) {
5855
+ if (isDeep) {
5856
+ return buffer.slice();
5857
+ }
5858
+ var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
5859
+ buffer.copy(result);
5860
+ return result;
5861
+ }
5862
+ var cloneBuffer_default = cloneBuffer;
5863
+
5864
+ // ../../node_modules/lodash-es/_copySymbols.js
5865
+ init_cjs_shims();
5866
+
5456
5867
  // ../../node_modules/lodash-es/_getSymbols.js
5457
5868
  init_cjs_shims();
5458
5869
 
@@ -5478,8 +5889,8 @@ function stubArray() {
5478
5889
  var stubArray_default = stubArray;
5479
5890
 
5480
5891
  // ../../node_modules/lodash-es/_getSymbols.js
5481
- var objectProto10 = Object.prototype;
5482
- var propertyIsEnumerable2 = objectProto10.propertyIsEnumerable;
5892
+ var objectProto13 = Object.prototype;
5893
+ var propertyIsEnumerable2 = objectProto13.propertyIsEnumerable;
5483
5894
  var nativeGetSymbols = Object.getOwnPropertySymbols;
5484
5895
  var getSymbols = !nativeGetSymbols ? stubArray_default : function(object) {
5485
5896
  if (object == null) {
@@ -5492,6 +5903,34 @@ var getSymbols = !nativeGetSymbols ? stubArray_default : function(object) {
5492
5903
  };
5493
5904
  var getSymbols_default = getSymbols;
5494
5905
 
5906
+ // ../../node_modules/lodash-es/_copySymbols.js
5907
+ function copySymbols(source, object) {
5908
+ return copyObject_default(source, getSymbols_default(source), object);
5909
+ }
5910
+ var copySymbols_default = copySymbols;
5911
+
5912
+ // ../../node_modules/lodash-es/_copySymbolsIn.js
5913
+ init_cjs_shims();
5914
+
5915
+ // ../../node_modules/lodash-es/_getSymbolsIn.js
5916
+ init_cjs_shims();
5917
+ var nativeGetSymbols2 = Object.getOwnPropertySymbols;
5918
+ var getSymbolsIn = !nativeGetSymbols2 ? stubArray_default : function(object) {
5919
+ var result = [];
5920
+ while (object) {
5921
+ arrayPush_default(result, getSymbols_default(object));
5922
+ object = getPrototype_default(object);
5923
+ }
5924
+ return result;
5925
+ };
5926
+ var getSymbolsIn_default = getSymbolsIn;
5927
+
5928
+ // ../../node_modules/lodash-es/_copySymbolsIn.js
5929
+ function copySymbolsIn(source, object) {
5930
+ return copyObject_default(source, getSymbolsIn_default(source), object);
5931
+ }
5932
+ var copySymbolsIn_default = copySymbolsIn;
5933
+
5495
5934
  // ../../node_modules/lodash-es/_getAllKeys.js
5496
5935
  init_cjs_shims();
5497
5936
 
@@ -5509,6 +5948,13 @@ function getAllKeys(object) {
5509
5948
  }
5510
5949
  var getAllKeys_default = getAllKeys;
5511
5950
 
5951
+ // ../../node_modules/lodash-es/_getAllKeysIn.js
5952
+ init_cjs_shims();
5953
+ function getAllKeysIn(object) {
5954
+ return baseGetAllKeys_default(object, keysIn_default, getSymbolsIn_default);
5955
+ }
5956
+ var getAllKeysIn_default = getAllKeysIn;
5957
+
5512
5958
  // ../../node_modules/lodash-es/_getTag.js
5513
5959
  init_cjs_shims();
5514
5960
 
@@ -5529,7 +5975,7 @@ var Set_default = Set2;
5529
5975
 
5530
5976
  // ../../node_modules/lodash-es/_getTag.js
5531
5977
  var mapTag2 = "[object Map]";
5532
- var objectTag2 = "[object Object]";
5978
+ var objectTag3 = "[object Object]";
5533
5979
  var promiseTag = "[object Promise]";
5534
5980
  var setTag2 = "[object Set]";
5535
5981
  var weakMapTag2 = "[object WeakMap]";
@@ -5542,7 +5988,7 @@ var weakMapCtorString = toSource_default(WeakMap_default);
5542
5988
  var getTag = baseGetTag_default;
5543
5989
  if (DataView_default && getTag(new DataView_default(new ArrayBuffer(1))) != dataViewTag2 || Map_default && getTag(new Map_default()) != mapTag2 || Promise_default && getTag(Promise_default.resolve()) != promiseTag || Set_default && getTag(new Set_default()) != setTag2 || WeakMap_default && getTag(new WeakMap_default()) != weakMapTag2) {
5544
5990
  getTag = function(value) {
5545
- var result = baseGetTag_default(value), Ctor = result == objectTag2 ? value.constructor : void 0, ctorString = Ctor ? toSource_default(Ctor) : "";
5991
+ var result = baseGetTag_default(value), Ctor = result == objectTag3 ? value.constructor : void 0, ctorString = Ctor ? toSource_default(Ctor) : "";
5546
5992
  if (ctorString) {
5547
5993
  switch (ctorString) {
5548
5994
  case dataViewCtorString:
@@ -5562,54 +6008,306 @@ if (DataView_default && getTag(new DataView_default(new ArrayBuffer(1))) != data
5562
6008
  }
5563
6009
  var getTag_default = getTag;
5564
6010
 
5565
- // ../../node_modules/lodash-es/_Uint8Array.js
5566
- init_cjs_shims();
5567
- var Uint8Array = root_default.Uint8Array;
5568
- var Uint8Array_default = Uint8Array;
5569
-
5570
- // ../../node_modules/lodash-es/_baseIteratee.js
6011
+ // ../../node_modules/lodash-es/_initCloneArray.js
5571
6012
  init_cjs_shims();
6013
+ var objectProto14 = Object.prototype;
6014
+ var hasOwnProperty11 = objectProto14.hasOwnProperty;
6015
+ function initCloneArray(array) {
6016
+ var length = array.length, result = new array.constructor(length);
6017
+ if (length && typeof array[0] == "string" && hasOwnProperty11.call(array, "index")) {
6018
+ result.index = array.index;
6019
+ result.input = array.input;
6020
+ }
6021
+ return result;
6022
+ }
6023
+ var initCloneArray_default = initCloneArray;
5572
6024
 
5573
- // ../../node_modules/lodash-es/_baseMatches.js
6025
+ // ../../node_modules/lodash-es/_initCloneByTag.js
5574
6026
  init_cjs_shims();
5575
6027
 
5576
- // ../../node_modules/lodash-es/_baseIsMatch.js
6028
+ // ../../node_modules/lodash-es/_cloneArrayBuffer.js
5577
6029
  init_cjs_shims();
5578
6030
 
5579
- // ../../node_modules/lodash-es/_baseIsEqual.js
6031
+ // ../../node_modules/lodash-es/_Uint8Array.js
5580
6032
  init_cjs_shims();
6033
+ var Uint8Array = root_default.Uint8Array;
6034
+ var Uint8Array_default = Uint8Array;
5581
6035
 
5582
- // ../../node_modules/lodash-es/_baseIsEqualDeep.js
5583
- init_cjs_shims();
6036
+ // ../../node_modules/lodash-es/_cloneArrayBuffer.js
6037
+ function cloneArrayBuffer(arrayBuffer) {
6038
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
6039
+ new Uint8Array_default(result).set(new Uint8Array_default(arrayBuffer));
6040
+ return result;
6041
+ }
6042
+ var cloneArrayBuffer_default = cloneArrayBuffer;
5584
6043
 
5585
- // ../../node_modules/lodash-es/_equalArrays.js
6044
+ // ../../node_modules/lodash-es/_cloneDataView.js
5586
6045
  init_cjs_shims();
6046
+ function cloneDataView(dataView, isDeep) {
6047
+ var buffer = isDeep ? cloneArrayBuffer_default(dataView.buffer) : dataView.buffer;
6048
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
6049
+ }
6050
+ var cloneDataView_default = cloneDataView;
5587
6051
 
5588
- // ../../node_modules/lodash-es/_SetCache.js
6052
+ // ../../node_modules/lodash-es/_cloneRegExp.js
5589
6053
  init_cjs_shims();
6054
+ var reFlags = /\w*$/;
6055
+ function cloneRegExp(regexp) {
6056
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
6057
+ result.lastIndex = regexp.lastIndex;
6058
+ return result;
6059
+ }
6060
+ var cloneRegExp_default = cloneRegExp;
5590
6061
 
5591
- // ../../node_modules/lodash-es/_setCacheAdd.js
6062
+ // ../../node_modules/lodash-es/_cloneSymbol.js
5592
6063
  init_cjs_shims();
5593
- var HASH_UNDEFINED3 = "__lodash_hash_undefined__";
5594
- function setCacheAdd(value) {
5595
- this.__data__.set(value, HASH_UNDEFINED3);
5596
- return this;
6064
+ var symbolProto2 = Symbol_default ? Symbol_default.prototype : void 0;
6065
+ var symbolValueOf = symbolProto2 ? symbolProto2.valueOf : void 0;
6066
+ function cloneSymbol(symbol) {
6067
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
5597
6068
  }
5598
- var setCacheAdd_default = setCacheAdd;
6069
+ var cloneSymbol_default = cloneSymbol;
5599
6070
 
5600
- // ../../node_modules/lodash-es/_setCacheHas.js
6071
+ // ../../node_modules/lodash-es/_cloneTypedArray.js
5601
6072
  init_cjs_shims();
5602
- function setCacheHas(value) {
5603
- return this.__data__.has(value);
6073
+ function cloneTypedArray(typedArray, isDeep) {
6074
+ var buffer = isDeep ? cloneArrayBuffer_default(typedArray.buffer) : typedArray.buffer;
6075
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
5604
6076
  }
5605
- var setCacheHas_default = setCacheHas;
6077
+ var cloneTypedArray_default = cloneTypedArray;
5606
6078
 
5607
- // ../../node_modules/lodash-es/_SetCache.js
5608
- function SetCache(values) {
5609
- var index = -1, length = values == null ? 0 : values.length;
5610
- this.__data__ = new MapCache_default();
5611
- while (++index < length) {
5612
- this.add(values[index]);
6079
+ // ../../node_modules/lodash-es/_initCloneByTag.js
6080
+ var boolTag2 = "[object Boolean]";
6081
+ var dateTag2 = "[object Date]";
6082
+ var mapTag3 = "[object Map]";
6083
+ var numberTag2 = "[object Number]";
6084
+ var regexpTag2 = "[object RegExp]";
6085
+ var setTag3 = "[object Set]";
6086
+ var stringTag2 = "[object String]";
6087
+ var symbolTag2 = "[object Symbol]";
6088
+ var arrayBufferTag2 = "[object ArrayBuffer]";
6089
+ var dataViewTag3 = "[object DataView]";
6090
+ var float32Tag2 = "[object Float32Array]";
6091
+ var float64Tag2 = "[object Float64Array]";
6092
+ var int8Tag2 = "[object Int8Array]";
6093
+ var int16Tag2 = "[object Int16Array]";
6094
+ var int32Tag2 = "[object Int32Array]";
6095
+ var uint8Tag2 = "[object Uint8Array]";
6096
+ var uint8ClampedTag2 = "[object Uint8ClampedArray]";
6097
+ var uint16Tag2 = "[object Uint16Array]";
6098
+ var uint32Tag2 = "[object Uint32Array]";
6099
+ function initCloneByTag(object, tag, isDeep) {
6100
+ var Ctor = object.constructor;
6101
+ switch (tag) {
6102
+ case arrayBufferTag2:
6103
+ return cloneArrayBuffer_default(object);
6104
+ case boolTag2:
6105
+ case dateTag2:
6106
+ return new Ctor(+object);
6107
+ case dataViewTag3:
6108
+ return cloneDataView_default(object, isDeep);
6109
+ case float32Tag2:
6110
+ case float64Tag2:
6111
+ case int8Tag2:
6112
+ case int16Tag2:
6113
+ case int32Tag2:
6114
+ case uint8Tag2:
6115
+ case uint8ClampedTag2:
6116
+ case uint16Tag2:
6117
+ case uint32Tag2:
6118
+ return cloneTypedArray_default(object, isDeep);
6119
+ case mapTag3:
6120
+ return new Ctor();
6121
+ case numberTag2:
6122
+ case stringTag2:
6123
+ return new Ctor(object);
6124
+ case regexpTag2:
6125
+ return cloneRegExp_default(object);
6126
+ case setTag3:
6127
+ return new Ctor();
6128
+ case symbolTag2:
6129
+ return cloneSymbol_default(object);
6130
+ }
6131
+ }
6132
+ var initCloneByTag_default = initCloneByTag;
6133
+
6134
+ // ../../node_modules/lodash-es/_initCloneObject.js
6135
+ init_cjs_shims();
6136
+ function initCloneObject(object) {
6137
+ return typeof object.constructor == "function" && !isPrototype_default(object) ? baseCreate_default(getPrototype_default(object)) : {};
6138
+ }
6139
+ var initCloneObject_default = initCloneObject;
6140
+
6141
+ // ../../node_modules/lodash-es/isMap.js
6142
+ init_cjs_shims();
6143
+
6144
+ // ../../node_modules/lodash-es/_baseIsMap.js
6145
+ init_cjs_shims();
6146
+ var mapTag4 = "[object Map]";
6147
+ function baseIsMap(value) {
6148
+ return isObjectLike_default(value) && getTag_default(value) == mapTag4;
6149
+ }
6150
+ var baseIsMap_default = baseIsMap;
6151
+
6152
+ // ../../node_modules/lodash-es/isMap.js
6153
+ var nodeIsMap = nodeUtil_default && nodeUtil_default.isMap;
6154
+ var isMap = nodeIsMap ? baseUnary_default(nodeIsMap) : baseIsMap_default;
6155
+ var isMap_default = isMap;
6156
+
6157
+ // ../../node_modules/lodash-es/isSet.js
6158
+ init_cjs_shims();
6159
+
6160
+ // ../../node_modules/lodash-es/_baseIsSet.js
6161
+ init_cjs_shims();
6162
+ var setTag4 = "[object Set]";
6163
+ function baseIsSet(value) {
6164
+ return isObjectLike_default(value) && getTag_default(value) == setTag4;
6165
+ }
6166
+ var baseIsSet_default = baseIsSet;
6167
+
6168
+ // ../../node_modules/lodash-es/isSet.js
6169
+ var nodeIsSet = nodeUtil_default && nodeUtil_default.isSet;
6170
+ var isSet = nodeIsSet ? baseUnary_default(nodeIsSet) : baseIsSet_default;
6171
+ var isSet_default = isSet;
6172
+
6173
+ // ../../node_modules/lodash-es/_baseClone.js
6174
+ var CLONE_DEEP_FLAG = 1;
6175
+ var CLONE_FLAT_FLAG = 2;
6176
+ var CLONE_SYMBOLS_FLAG = 4;
6177
+ var argsTag3 = "[object Arguments]";
6178
+ var arrayTag2 = "[object Array]";
6179
+ var boolTag3 = "[object Boolean]";
6180
+ var dateTag3 = "[object Date]";
6181
+ var errorTag2 = "[object Error]";
6182
+ var funcTag3 = "[object Function]";
6183
+ var genTag2 = "[object GeneratorFunction]";
6184
+ var mapTag5 = "[object Map]";
6185
+ var numberTag3 = "[object Number]";
6186
+ var objectTag4 = "[object Object]";
6187
+ var regexpTag3 = "[object RegExp]";
6188
+ var setTag5 = "[object Set]";
6189
+ var stringTag3 = "[object String]";
6190
+ var symbolTag3 = "[object Symbol]";
6191
+ var weakMapTag3 = "[object WeakMap]";
6192
+ var arrayBufferTag3 = "[object ArrayBuffer]";
6193
+ var dataViewTag4 = "[object DataView]";
6194
+ var float32Tag3 = "[object Float32Array]";
6195
+ var float64Tag3 = "[object Float64Array]";
6196
+ var int8Tag3 = "[object Int8Array]";
6197
+ var int16Tag3 = "[object Int16Array]";
6198
+ var int32Tag3 = "[object Int32Array]";
6199
+ var uint8Tag3 = "[object Uint8Array]";
6200
+ var uint8ClampedTag3 = "[object Uint8ClampedArray]";
6201
+ var uint16Tag3 = "[object Uint16Array]";
6202
+ var uint32Tag3 = "[object Uint32Array]";
6203
+ var cloneableTags = {};
6204
+ cloneableTags[argsTag3] = cloneableTags[arrayTag2] = cloneableTags[arrayBufferTag3] = cloneableTags[dataViewTag4] = cloneableTags[boolTag3] = cloneableTags[dateTag3] = cloneableTags[float32Tag3] = cloneableTags[float64Tag3] = cloneableTags[int8Tag3] = cloneableTags[int16Tag3] = cloneableTags[int32Tag3] = cloneableTags[mapTag5] = cloneableTags[numberTag3] = cloneableTags[objectTag4] = cloneableTags[regexpTag3] = cloneableTags[setTag5] = cloneableTags[stringTag3] = cloneableTags[symbolTag3] = cloneableTags[uint8Tag3] = cloneableTags[uint8ClampedTag3] = cloneableTags[uint16Tag3] = cloneableTags[uint32Tag3] = true;
6205
+ cloneableTags[errorTag2] = cloneableTags[funcTag3] = cloneableTags[weakMapTag3] = false;
6206
+ function baseClone(value, bitmask, customizer, key, object, stack) {
6207
+ var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG;
6208
+ if (customizer) {
6209
+ result = object ? customizer(value, key, object, stack) : customizer(value);
6210
+ }
6211
+ if (result !== void 0) {
6212
+ return result;
6213
+ }
6214
+ if (!isObject_default(value)) {
6215
+ return value;
6216
+ }
6217
+ var isArr = isArray_default(value);
6218
+ if (isArr) {
6219
+ result = initCloneArray_default(value);
6220
+ if (!isDeep) {
6221
+ return copyArray_default(value, result);
6222
+ }
6223
+ } else {
6224
+ var tag = getTag_default(value), isFunc = tag == funcTag3 || tag == genTag2;
6225
+ if (isBuffer_default(value)) {
6226
+ return cloneBuffer_default(value, isDeep);
6227
+ }
6228
+ if (tag == objectTag4 || tag == argsTag3 || isFunc && !object) {
6229
+ result = isFlat || isFunc ? {} : initCloneObject_default(value);
6230
+ if (!isDeep) {
6231
+ return isFlat ? copySymbolsIn_default(value, baseAssignIn_default(result, value)) : copySymbols_default(value, baseAssign_default(result, value));
6232
+ }
6233
+ } else {
6234
+ if (!cloneableTags[tag]) {
6235
+ return object ? value : {};
6236
+ }
6237
+ result = initCloneByTag_default(value, tag, isDeep);
6238
+ }
6239
+ }
6240
+ stack || (stack = new Stack_default());
6241
+ var stacked = stack.get(value);
6242
+ if (stacked) {
6243
+ return stacked;
6244
+ }
6245
+ stack.set(value, result);
6246
+ if (isSet_default(value)) {
6247
+ value.forEach(function(subValue) {
6248
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
6249
+ });
6250
+ } else if (isMap_default(value)) {
6251
+ value.forEach(function(subValue, key2) {
6252
+ result.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
6253
+ });
6254
+ }
6255
+ var keysFunc = isFull ? isFlat ? getAllKeysIn_default : getAllKeys_default : isFlat ? keysIn_default : keys_default;
6256
+ var props = isArr ? void 0 : keysFunc(value);
6257
+ arrayEach_default(props || value, function(subValue, key2) {
6258
+ if (props) {
6259
+ key2 = subValue;
6260
+ subValue = value[key2];
6261
+ }
6262
+ assignValue_default(result, key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
6263
+ });
6264
+ return result;
6265
+ }
6266
+ var baseClone_default = baseClone;
6267
+
6268
+ // ../../node_modules/lodash-es/_baseIteratee.js
6269
+ init_cjs_shims();
6270
+
6271
+ // ../../node_modules/lodash-es/_baseMatches.js
6272
+ init_cjs_shims();
6273
+
6274
+ // ../../node_modules/lodash-es/_baseIsMatch.js
6275
+ init_cjs_shims();
6276
+
6277
+ // ../../node_modules/lodash-es/_baseIsEqual.js
6278
+ init_cjs_shims();
6279
+
6280
+ // ../../node_modules/lodash-es/_baseIsEqualDeep.js
6281
+ init_cjs_shims();
6282
+
6283
+ // ../../node_modules/lodash-es/_equalArrays.js
6284
+ init_cjs_shims();
6285
+
6286
+ // ../../node_modules/lodash-es/_SetCache.js
6287
+ init_cjs_shims();
6288
+
6289
+ // ../../node_modules/lodash-es/_setCacheAdd.js
6290
+ init_cjs_shims();
6291
+ var HASH_UNDEFINED3 = "__lodash_hash_undefined__";
6292
+ function setCacheAdd(value) {
6293
+ this.__data__.set(value, HASH_UNDEFINED3);
6294
+ return this;
6295
+ }
6296
+ var setCacheAdd_default = setCacheAdd;
6297
+
6298
+ // ../../node_modules/lodash-es/_setCacheHas.js
6299
+ init_cjs_shims();
6300
+ function setCacheHas(value) {
6301
+ return this.__data__.has(value);
6302
+ }
6303
+ var setCacheHas_default = setCacheHas;
6304
+
6305
+ // ../../node_modules/lodash-es/_SetCache.js
6306
+ function SetCache(values) {
6307
+ var index = -1, length = values == null ? 0 : values.length;
6308
+ this.__data__ = new MapCache_default();
6309
+ while (++index < length) {
6310
+ this.add(values[index]);
5613
6311
  }
5614
6312
  }
5615
6313
  SetCache.prototype.add = SetCache.prototype.push = setCacheAdd_default;
@@ -5712,44 +6410,44 @@ var setToArray_default = setToArray;
5712
6410
  // ../../node_modules/lodash-es/_equalByTag.js
5713
6411
  var COMPARE_PARTIAL_FLAG2 = 1;
5714
6412
  var COMPARE_UNORDERED_FLAG2 = 2;
5715
- var boolTag2 = "[object Boolean]";
5716
- var dateTag2 = "[object Date]";
5717
- var errorTag2 = "[object Error]";
5718
- var mapTag3 = "[object Map]";
5719
- var numberTag2 = "[object Number]";
5720
- var regexpTag2 = "[object RegExp]";
5721
- var setTag3 = "[object Set]";
5722
- var stringTag2 = "[object String]";
5723
- var symbolTag2 = "[object Symbol]";
5724
- var arrayBufferTag2 = "[object ArrayBuffer]";
5725
- var dataViewTag3 = "[object DataView]";
5726
- var symbolProto2 = Symbol_default ? Symbol_default.prototype : void 0;
5727
- var symbolValueOf = symbolProto2 ? symbolProto2.valueOf : void 0;
6413
+ var boolTag4 = "[object Boolean]";
6414
+ var dateTag4 = "[object Date]";
6415
+ var errorTag3 = "[object Error]";
6416
+ var mapTag6 = "[object Map]";
6417
+ var numberTag4 = "[object Number]";
6418
+ var regexpTag4 = "[object RegExp]";
6419
+ var setTag6 = "[object Set]";
6420
+ var stringTag4 = "[object String]";
6421
+ var symbolTag4 = "[object Symbol]";
6422
+ var arrayBufferTag4 = "[object ArrayBuffer]";
6423
+ var dataViewTag5 = "[object DataView]";
6424
+ var symbolProto3 = Symbol_default ? Symbol_default.prototype : void 0;
6425
+ var symbolValueOf2 = symbolProto3 ? symbolProto3.valueOf : void 0;
5728
6426
  function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
5729
6427
  switch (tag) {
5730
- case dataViewTag3:
6428
+ case dataViewTag5:
5731
6429
  if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
5732
6430
  return false;
5733
6431
  }
5734
6432
  object = object.buffer;
5735
6433
  other = other.buffer;
5736
- case arrayBufferTag2:
6434
+ case arrayBufferTag4:
5737
6435
  if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array_default(object), new Uint8Array_default(other))) {
5738
6436
  return false;
5739
6437
  }
5740
6438
  return true;
5741
- case boolTag2:
5742
- case dateTag2:
5743
- case numberTag2:
6439
+ case boolTag4:
6440
+ case dateTag4:
6441
+ case numberTag4:
5744
6442
  return eq_default(+object, +other);
5745
- case errorTag2:
6443
+ case errorTag3:
5746
6444
  return object.name == other.name && object.message == other.message;
5747
- case regexpTag2:
5748
- case stringTag2:
6445
+ case regexpTag4:
6446
+ case stringTag4:
5749
6447
  return object == other + "";
5750
- case mapTag3:
6448
+ case mapTag6:
5751
6449
  var convert = mapToArray_default;
5752
- case setTag3:
6450
+ case setTag6:
5753
6451
  var isPartial = bitmask & COMPARE_PARTIAL_FLAG2;
5754
6452
  convert || (convert = setToArray_default);
5755
6453
  if (object.size != other.size && !isPartial) {
@@ -5764,9 +6462,9 @@ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
5764
6462
  var result = equalArrays_default(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
5765
6463
  stack["delete"](object);
5766
6464
  return result;
5767
- case symbolTag2:
5768
- if (symbolValueOf) {
5769
- return symbolValueOf.call(object) == symbolValueOf.call(other);
6465
+ case symbolTag4:
6466
+ if (symbolValueOf2) {
6467
+ return symbolValueOf2.call(object) == symbolValueOf2.call(other);
5770
6468
  }
5771
6469
  }
5772
6470
  return false;
@@ -5776,8 +6474,8 @@ var equalByTag_default = equalByTag;
5776
6474
  // ../../node_modules/lodash-es/_equalObjects.js
5777
6475
  init_cjs_shims();
5778
6476
  var COMPARE_PARTIAL_FLAG3 = 1;
5779
- var objectProto11 = Object.prototype;
5780
- var hasOwnProperty8 = objectProto11.hasOwnProperty;
6477
+ var objectProto15 = Object.prototype;
6478
+ var hasOwnProperty12 = objectProto15.hasOwnProperty;
5781
6479
  function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
5782
6480
  var isPartial = bitmask & COMPARE_PARTIAL_FLAG3, objProps = getAllKeys_default(object), objLength = objProps.length, othProps = getAllKeys_default(other), othLength = othProps.length;
5783
6481
  if (objLength != othLength && !isPartial) {
@@ -5786,7 +6484,7 @@ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
5786
6484
  var index = objLength;
5787
6485
  while (index--) {
5788
6486
  var key = objProps[index];
5789
- if (!(isPartial ? key in other : hasOwnProperty8.call(other, key))) {
6487
+ if (!(isPartial ? key in other : hasOwnProperty12.call(other, key))) {
5790
6488
  return false;
5791
6489
  }
5792
6490
  }
@@ -5825,16 +6523,16 @@ var equalObjects_default = equalObjects;
5825
6523
 
5826
6524
  // ../../node_modules/lodash-es/_baseIsEqualDeep.js
5827
6525
  var COMPARE_PARTIAL_FLAG4 = 1;
5828
- var argsTag3 = "[object Arguments]";
5829
- var arrayTag2 = "[object Array]";
5830
- var objectTag3 = "[object Object]";
5831
- var objectProto12 = Object.prototype;
5832
- var hasOwnProperty9 = objectProto12.hasOwnProperty;
6526
+ var argsTag4 = "[object Arguments]";
6527
+ var arrayTag3 = "[object Array]";
6528
+ var objectTag5 = "[object Object]";
6529
+ var objectProto16 = Object.prototype;
6530
+ var hasOwnProperty13 = objectProto16.hasOwnProperty;
5833
6531
  function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
5834
- var objIsArr = isArray_default(object), othIsArr = isArray_default(other), objTag = objIsArr ? arrayTag2 : getTag_default(object), othTag = othIsArr ? arrayTag2 : getTag_default(other);
5835
- objTag = objTag == argsTag3 ? objectTag3 : objTag;
5836
- othTag = othTag == argsTag3 ? objectTag3 : othTag;
5837
- var objIsObj = objTag == objectTag3, othIsObj = othTag == objectTag3, isSameTag = objTag == othTag;
6532
+ var objIsArr = isArray_default(object), othIsArr = isArray_default(other), objTag = objIsArr ? arrayTag3 : getTag_default(object), othTag = othIsArr ? arrayTag3 : getTag_default(other);
6533
+ objTag = objTag == argsTag4 ? objectTag5 : objTag;
6534
+ othTag = othTag == argsTag4 ? objectTag5 : othTag;
6535
+ var objIsObj = objTag == objectTag5, othIsObj = othTag == objectTag5, isSameTag = objTag == othTag;
5838
6536
  if (isSameTag && isBuffer_default(object)) {
5839
6537
  if (!isBuffer_default(other)) {
5840
6538
  return false;
@@ -5847,7 +6545,7 @@ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
5847
6545
  return objIsArr || isTypedArray_default(object) ? equalArrays_default(object, other, bitmask, customizer, equalFunc, stack) : equalByTag_default(object, other, objTag, bitmask, customizer, equalFunc, stack);
5848
6546
  }
5849
6547
  if (!(bitmask & COMPARE_PARTIAL_FLAG4)) {
5850
- var objIsWrapped = objIsObj && hasOwnProperty9.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty9.call(other, "__wrapped__");
6548
+ var objIsWrapped = objIsObj && hasOwnProperty13.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty13.call(other, "__wrapped__");
5851
6549
  if (objIsWrapped || othIsWrapped) {
5852
6550
  var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
5853
6551
  stack || (stack = new Stack_default());
@@ -6050,6 +6748,27 @@ function baseIteratee(value) {
6050
6748
  }
6051
6749
  var baseIteratee_default = baseIteratee;
6052
6750
 
6751
+ // ../../node_modules/lodash-es/_createAggregator.js
6752
+ init_cjs_shims();
6753
+
6754
+ // ../../node_modules/lodash-es/_arrayAggregator.js
6755
+ init_cjs_shims();
6756
+ function arrayAggregator(array, setter, iteratee, accumulator) {
6757
+ var index = -1, length = array == null ? 0 : array.length;
6758
+ while (++index < length) {
6759
+ var value = array[index];
6760
+ setter(accumulator, value, iteratee(value), array);
6761
+ }
6762
+ return accumulator;
6763
+ }
6764
+ var arrayAggregator_default = arrayAggregator;
6765
+
6766
+ // ../../node_modules/lodash-es/_baseAggregator.js
6767
+ init_cjs_shims();
6768
+
6769
+ // ../../node_modules/lodash-es/_baseEach.js
6770
+ init_cjs_shims();
6771
+
6053
6772
  // ../../node_modules/lodash-es/_baseForOwn.js
6054
6773
  init_cjs_shims();
6055
6774
 
@@ -6082,6 +6801,77 @@ function baseForOwn(object, iteratee) {
6082
6801
  }
6083
6802
  var baseForOwn_default = baseForOwn;
6084
6803
 
6804
+ // ../../node_modules/lodash-es/_createBaseEach.js
6805
+ init_cjs_shims();
6806
+ function createBaseEach(eachFunc, fromRight) {
6807
+ return function(collection, iteratee) {
6808
+ if (collection == null) {
6809
+ return collection;
6810
+ }
6811
+ if (!isArrayLike_default(collection)) {
6812
+ return eachFunc(collection, iteratee);
6813
+ }
6814
+ var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection);
6815
+ while (fromRight ? index-- : ++index < length) {
6816
+ if (iteratee(iterable[index], index, iterable) === false) {
6817
+ break;
6818
+ }
6819
+ }
6820
+ return collection;
6821
+ };
6822
+ }
6823
+ var createBaseEach_default = createBaseEach;
6824
+
6825
+ // ../../node_modules/lodash-es/_baseEach.js
6826
+ var baseEach = createBaseEach_default(baseForOwn_default);
6827
+ var baseEach_default = baseEach;
6828
+
6829
+ // ../../node_modules/lodash-es/_baseAggregator.js
6830
+ function baseAggregator(collection, setter, iteratee, accumulator) {
6831
+ baseEach_default(collection, function(value, key, collection2) {
6832
+ setter(accumulator, value, iteratee(value), collection2);
6833
+ });
6834
+ return accumulator;
6835
+ }
6836
+ var baseAggregator_default = baseAggregator;
6837
+
6838
+ // ../../node_modules/lodash-es/_createAggregator.js
6839
+ function createAggregator(setter, initializer) {
6840
+ return function(collection, iteratee) {
6841
+ var func = isArray_default(collection) ? arrayAggregator_default : baseAggregator_default, accumulator = initializer ? initializer() : {};
6842
+ return func(collection, setter, baseIteratee_default(iteratee, 2), accumulator);
6843
+ };
6844
+ }
6845
+ var createAggregator_default = createAggregator;
6846
+
6847
+ // ../../node_modules/lodash-es/_arrayIncludesWith.js
6848
+ init_cjs_shims();
6849
+ function arrayIncludesWith(array, value, comparator) {
6850
+ var index = -1, length = array == null ? 0 : array.length;
6851
+ while (++index < length) {
6852
+ if (comparator(value, array[index])) {
6853
+ return true;
6854
+ }
6855
+ }
6856
+ return false;
6857
+ }
6858
+ var arrayIncludesWith_default = arrayIncludesWith;
6859
+
6860
+ // ../../node_modules/lodash-es/last.js
6861
+ init_cjs_shims();
6862
+ function last(array) {
6863
+ var length = array == null ? 0 : array.length;
6864
+ return length ? array[length - 1] : void 0;
6865
+ }
6866
+ var last_default = last;
6867
+
6868
+ // ../../node_modules/lodash-es/_parent.js
6869
+ init_cjs_shims();
6870
+ function parent(object, path) {
6871
+ return path.length < 2 ? object : baseGet_default(object, baseSlice_default(path, 0, -1));
6872
+ }
6873
+ var parent_default = parent;
6874
+
6085
6875
  // ../../node_modules/lodash-es/isEqual.js
6086
6876
  init_cjs_shims();
6087
6877
  function isEqual(value, other) {
@@ -6089,6 +6879,13 @@ function isEqual(value, other) {
6089
6879
  }
6090
6880
  var isEqual_default = isEqual;
6091
6881
 
6882
+ // ../../node_modules/lodash-es/keyBy.js
6883
+ init_cjs_shims();
6884
+ var keyBy = createAggregator_default(function(result, value, key) {
6885
+ baseAssignValue_default(result, key, value);
6886
+ });
6887
+ var keyBy_default = keyBy;
6888
+
6092
6889
  // ../../node_modules/lodash-es/mapValues.js
6093
6890
  init_cjs_shims();
6094
6891
  function mapValues(object, iteratee) {
@@ -6101,6 +6898,129 @@ function mapValues(object, iteratee) {
6101
6898
  }
6102
6899
  var mapValues_default = mapValues;
6103
6900
 
6901
+ // ../../node_modules/lodash-es/omit.js
6902
+ init_cjs_shims();
6903
+
6904
+ // ../../node_modules/lodash-es/_baseUnset.js
6905
+ init_cjs_shims();
6906
+ var objectProto17 = Object.prototype;
6907
+ var hasOwnProperty14 = objectProto17.hasOwnProperty;
6908
+ function baseUnset(object, path) {
6909
+ path = castPath_default(path, object);
6910
+ var index = -1, length = path.length;
6911
+ if (!length) {
6912
+ return true;
6913
+ }
6914
+ while (++index < length) {
6915
+ var key = toKey_default(path[index]);
6916
+ if (key === "__proto__" && !hasOwnProperty14.call(object, "__proto__")) {
6917
+ return false;
6918
+ }
6919
+ if ((key === "constructor" || key === "prototype") && index < length - 1) {
6920
+ return false;
6921
+ }
6922
+ }
6923
+ var obj = parent_default(object, path);
6924
+ return obj == null || delete obj[toKey_default(last_default(path))];
6925
+ }
6926
+ var baseUnset_default = baseUnset;
6927
+
6928
+ // ../../node_modules/lodash-es/_customOmitClone.js
6929
+ init_cjs_shims();
6930
+ function customOmitClone(value) {
6931
+ return isPlainObject_default(value) ? void 0 : value;
6932
+ }
6933
+ var customOmitClone_default = customOmitClone;
6934
+
6935
+ // ../../node_modules/lodash-es/omit.js
6936
+ var CLONE_DEEP_FLAG2 = 1;
6937
+ var CLONE_FLAT_FLAG2 = 2;
6938
+ var CLONE_SYMBOLS_FLAG2 = 4;
6939
+ var omit = flatRest_default(function(object, paths) {
6940
+ var result = {};
6941
+ if (object == null) {
6942
+ return result;
6943
+ }
6944
+ var isDeep = false;
6945
+ paths = arrayMap_default(paths, function(path) {
6946
+ path = castPath_default(path, object);
6947
+ isDeep || (isDeep = path.length > 1);
6948
+ return path;
6949
+ });
6950
+ copyObject_default(object, getAllKeysIn_default(object), result);
6951
+ if (isDeep) {
6952
+ result = baseClone_default(result, CLONE_DEEP_FLAG2 | CLONE_FLAT_FLAG2 | CLONE_SYMBOLS_FLAG2, customOmitClone_default);
6953
+ }
6954
+ var length = paths.length;
6955
+ while (length--) {
6956
+ baseUnset_default(result, paths[length]);
6957
+ }
6958
+ return result;
6959
+ });
6960
+ var omit_default = omit;
6961
+
6962
+ // ../../node_modules/lodash-es/_baseUniq.js
6963
+ init_cjs_shims();
6964
+
6965
+ // ../../node_modules/lodash-es/_createSet.js
6966
+ init_cjs_shims();
6967
+ var INFINITY3 = 1 / 0;
6968
+ var createSet = !(Set_default && 1 / setToArray_default(new Set_default([, -0]))[1] == INFINITY3) ? noop_default : function(values) {
6969
+ return new Set_default(values);
6970
+ };
6971
+ var createSet_default = createSet;
6972
+
6973
+ // ../../node_modules/lodash-es/_baseUniq.js
6974
+ var LARGE_ARRAY_SIZE2 = 200;
6975
+ function baseUniq(array, iteratee, comparator) {
6976
+ var index = -1, includes = arrayIncludes_default, length = array.length, isCommon = true, result = [], seen = result;
6977
+ if (comparator) {
6978
+ isCommon = false;
6979
+ includes = arrayIncludesWith_default;
6980
+ } else if (length >= LARGE_ARRAY_SIZE2) {
6981
+ var set = iteratee ? null : createSet_default(array);
6982
+ if (set) {
6983
+ return setToArray_default(set);
6984
+ }
6985
+ isCommon = false;
6986
+ includes = cacheHas_default;
6987
+ seen = new SetCache_default();
6988
+ } else {
6989
+ seen = iteratee ? [] : result;
6990
+ }
6991
+ outer:
6992
+ while (++index < length) {
6993
+ var value = array[index], computed = iteratee ? iteratee(value) : value;
6994
+ value = comparator || value !== 0 ? value : 0;
6995
+ if (isCommon && computed === computed) {
6996
+ var seenIndex = seen.length;
6997
+ while (seenIndex--) {
6998
+ if (seen[seenIndex] === computed) {
6999
+ continue outer;
7000
+ }
7001
+ }
7002
+ if (iteratee) {
7003
+ seen.push(computed);
7004
+ }
7005
+ result.push(value);
7006
+ } else if (!includes(seen, computed, comparator)) {
7007
+ if (seen !== result) {
7008
+ seen.push(computed);
7009
+ }
7010
+ result.push(value);
7011
+ }
7012
+ }
7013
+ return result;
7014
+ }
7015
+ var baseUniq_default = baseUniq;
7016
+
7017
+ // ../../node_modules/lodash-es/uniqBy.js
7018
+ init_cjs_shims();
7019
+ function uniqBy(array, iteratee) {
7020
+ return array && array.length ? baseUniq_default(array, baseIteratee_default(iteratee, 2)) : [];
7021
+ }
7022
+ var uniqBy_default = uniqBy;
7023
+
6104
7024
  // ../../libs/schema-validation/utils/transformers/coa.ts
6105
7025
  init_cjs_shims();
6106
7026
 
@@ -6175,6 +7095,25 @@ var validateAccountConsistencySettings = ({
6175
7095
  errors
6176
7096
  };
6177
7097
  };
7098
+ var validateLedgerConsistencySettings = ({
7099
+ entries
7100
+ }) => {
7101
+ const errors = [];
7102
+ const validationResult = LedgerConsistencyConfigSchema.safeParse({
7103
+ entries
7104
+ });
7105
+ if (!validationResult.success) {
7106
+ validationResult.error.errors.forEach((error) => {
7107
+ errors.push({
7108
+ message: error.message,
7109
+ path: error.path
7110
+ });
7111
+ });
7112
+ }
7113
+ return {
7114
+ errors
7115
+ };
7116
+ };
6178
7117
 
6179
7118
  // ../../libs/schema-validation/utils/currencyValidation.ts
6180
7119
  init_cjs_shims();
@@ -6852,7 +7791,7 @@ var validateAccount = ({
6852
7791
  account,
6853
7792
  path,
6854
7793
  isTemplateChild = false,
6855
- parent,
7794
+ parent: parent2,
6856
7795
  defaultConsistencyConfig
6857
7796
  }) => {
6858
7797
  const errors = [];
@@ -6863,15 +7802,15 @@ var validateAccount = ({
6863
7802
  path
6864
7803
  })
6865
7804
  );
6866
- if (!account.type && !parent) {
7805
+ if (!account.type && !parent2) {
6867
7806
  errors.push({
6868
7807
  message: `Root account ${account.key} must specify type (name: ${account.name})`,
6869
7808
  path: [...path, "type"]
6870
7809
  });
6871
7810
  }
6872
- if (parent && account.type !== parent.type) {
7811
+ if (parent2 && account.type !== parent2.type) {
6873
7812
  errors.push({
6874
- message: `Child account cannot be different than parent type ('${parent.type}' !== '${account.type}') (key: ${account.key}, name: ${account.name})`,
7813
+ message: `Child account cannot be different than parent type ('${parent2.type}' !== '${account.type}') (key: ${account.key}, name: ${account.name})`,
6875
7814
  path: [...path, "type"]
6876
7815
  });
6877
7816
  }
@@ -7219,6 +8158,90 @@ var validateInt96ValueRange = (value) => {
7219
8158
  `Values greater than ${int96MaxValue} are currently unsupported`
7220
8159
  );
7221
8160
  };
8161
+ var tokenize = (expression) => {
8162
+ const re = /\d+|[-+]|\s+/dy;
8163
+ let pos = 0;
8164
+ const tokens = [];
8165
+ let match = re.exec(expression);
8166
+ while (match !== null) {
8167
+ const start = pos;
8168
+ const end = re.lastIndex;
8169
+ const repr = match[0];
8170
+ if (!/\s/.test(repr)) {
8171
+ let type;
8172
+ if (repr === "+" || repr === "-") {
8173
+ type = repr;
8174
+ } else {
8175
+ type = "number";
8176
+ }
8177
+ tokens.push({ type, start, end, repr });
8178
+ }
8179
+ pos = end;
8180
+ match = re.exec(expression);
8181
+ }
8182
+ assert_default(pos === expression.length, BadRequestError, () => ({
8183
+ message: `Unexpected character ${expression.charAt(
8184
+ pos
8185
+ )} at position ${pos}`
8186
+ }));
8187
+ assert_default(tokens.length > 0, BadRequestError, () => ({
8188
+ message: `Empty expression cannot be evaluated`
8189
+ }));
8190
+ return tokens;
8191
+ };
8192
+ var evaluateExpression = (expression) => {
8193
+ const tokens = tokenize(expression);
8194
+ let i2 = 0;
8195
+ const assertNextToken = () => {
8196
+ assert_default(tokens[i2 + 1] !== void 0, BadRequestError, () => ({
8197
+ message: `Unexpected end of expression at position ${tokens[i2].start + tokens[i2].repr.length}`
8198
+ }));
8199
+ };
8200
+ const term = () => {
8201
+ const t2 = tokens[i2];
8202
+ assert_default(t2 !== void 0, BadRequestError, () => ({
8203
+ message: `Unexpected end of expression at position ${expression.length}`
8204
+ }));
8205
+ if (t2.type === "+") {
8206
+ assertNextToken();
8207
+ i2 += 1;
8208
+ return term();
8209
+ }
8210
+ if (t2.type === "-") {
8211
+ assertNextToken();
8212
+ i2 += 1;
8213
+ return -term();
8214
+ }
8215
+ const value2 = BigInt(tokens[i2].repr);
8216
+ i2 += 1;
8217
+ return value2;
8218
+ };
8219
+ const assertTokenIsOp = () => {
8220
+ const t2 = tokens[i2];
8221
+ assert_default(t2.type === "-" || t2.type === "+", BadRequestError, () => ({
8222
+ message: `expected operator + or - at position ${t2.start}, found ${t2.repr}`
8223
+ }));
8224
+ };
8225
+ const expr = () => {
8226
+ let value2 = term();
8227
+ while (i2 < tokens.length) {
8228
+ assertTokenIsOp();
8229
+ value2 += term();
8230
+ }
8231
+ return value2;
8232
+ };
8233
+ const value = expr();
8234
+ try {
8235
+ validateInt96ValueRange(value);
8236
+ return value;
8237
+ } catch (err) {
8238
+ assert_default(err instanceof TypeError, InternalError, () => ({
8239
+ message: "Unexpected error type",
8240
+ info: { err }
8241
+ }));
8242
+ throw new BadRequestError(err.message);
8243
+ }
8244
+ };
7222
8245
  var tokenizeWithVars = (expression) => {
7223
8246
  const re = /\d+|[-+]|\s+|{{[^{}]*}}/dy;
7224
8247
  let pos = 0;
@@ -9853,14 +10876,33 @@ var Schema = z.object({
9853
10876
  export {
9854
10877
  parseWithError,
9855
10878
  isEqual_default,
10879
+ keyBy_default,
10880
+ omit_default,
10881
+ uniqBy_default,
10882
+ isTotalBalanceSchema,
10883
+ validateLedgerConsistencySettings,
9856
10884
  getAccountStatus,
9857
10885
  N,
9858
10886
  z2 as z,
10887
+ transformAndValidateCoA,
10888
+ evaluateExpression,
9859
10889
  evaluateExpressionWithVars,
9860
10890
  areExpressionsEqual,
9861
10891
  stringify2 as stringify,
10892
+ serializeCurrency,
10893
+ assertBalancedLines,
9862
10894
  MIN_SCHEMA_LEDGER_ENTRY_DISABLED_DURATION_SECONDS,
10895
+ getStructuralPathToAccount,
10896
+ validateEntry,
10897
+ transformAndValidateEntries,
10898
+ validateGroup,
10899
+ findPaymentAccountPath,
10900
+ validatePaymentEntry,
10901
+ transformAndValidatePayments,
10902
+ reparameterizeSchemaLedgerAccountInput,
9863
10903
  ChartOfAccounts,
10904
+ parameterizeSchemaLedgerLineInput,
10905
+ parameterizeSchemaLedgerEntryConditionInput,
9864
10906
  Schema
9865
10907
  };
9866
10908
  /*! Bundled license information: