fable 3.1.2 → 3.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/debug/Harness.js CHANGED
@@ -1,6 +1,23 @@
1
- // const libFable = require('../source/Fable.js');
1
+ const libFable = require('../source/Fable.js');
2
+
3
+ const _Fable = new libFable({"Product": "Harness"});
4
+
5
+ let tmpValue;
6
+
7
+ tmpValue = _Fable.Dates.dateDayDifference("2023-10-01", "2023-09-01");
8
+ console.log(`Difference in days: ${tmpValue}`);
9
+
10
+
11
+ tmpValue = _Fable.Dates.dateWeekDifference("2023-10-01", "2023-09-01");
12
+ console.log(`Difference in weeks: ${tmpValue}`);
13
+
14
+
15
+ tmpValue = _Fable.Dates.dateMonthDifference("2016-10-01", "2023-09-01");
16
+ console.log(`Difference in months: ${tmpValue}`);
17
+
18
+ tmpValue = _Fable.Dates.dateYearDifference("1963-10-01", "2023-09-01");
19
+ console.log(`Difference in years: ${tmpValue}`);
2
20
 
3
- // const _Fable = new libFable({"Product": "Hn"});
4
21
  // const _ExpressionParser = _Fable.instantiateServiceProviderIfNotExists('ExpressionParser');
5
22
 
6
23
  // const _Expression = "TotalCost = SUM(ItemCosts)";
@@ -32,4 +49,4 @@
32
49
  // }
33
50
  // console.log(`Result: ${tmpResult}`);
34
51
 
35
- const libMathHarness = require('../example_applications/mathematical_playground/Math-Solver-Harness.js');
52
+ //const libMathHarness = require('../example_applications/mathematical_playground/Math-Solver-Harness.js');
package/dist/fable.js CHANGED
@@ -3012,7 +3012,7 @@ try{if(!global.localStorage)return false;}catch(_){return false;}var val=global.
3012
3012
  // presumably different callback function.
3013
3013
  // This makes sure that own properties are retained, so that
3014
3014
  // decorations and such are not lost along the way.
3015
- module.exports=wrappy;function wrappy(fn,cb){if(fn&&cb)return wrappy(fn)(cb);if(typeof fn!=='function')throw new TypeError('need wrapper function');Object.keys(fn).forEach(function(k){wrapper[k]=fn[k];});return wrapper;function wrapper(){var args=new Array(arguments.length);for(var i=0;i<args.length;i++){args[i]=arguments[i];}var ret=fn.apply(this,args);var cb=args[args.length-1];if(typeof ret==='function'&&ret!==cb){Object.keys(cb).forEach(function(k){ret[k]=cb[k];});}return ret;}}},{}],130:[function(require,module,exports){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){var target={};for(var i=0;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;}},{}],131:[function(require,module,exports){module.exports={"name":"fable","version":"3.1.2","description":"A service dependency injection, configuration and logging library.","main":"source/Fable.js","scripts":{"start":"node source/Fable.js","coverage":"./node_modules/.bin/nyc --reporter=lcov --reporter=text-lcov ./node_modules/mocha/bin/_mocha -- -u tdd -R spec","test":"./node_modules/.bin/mocha -u tdd -R spec","build":"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t fable-image:local","docker-dev-run":"docker run -it -d --name fable-dev -p 30001:8080 -p 38086:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/fable\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" fable-image:local","docker-dev-shell":"docker exec -it fable-dev /bin/bash","tests":"./node_modules/mocha/bin/_mocha -u tdd --exit -R spec --grep"},"mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"browser":{"./source/service/Fable-Service-EnvironmentData.js":"./source/service/Fable-Service-EnvironmentData-Web.js","./source/service/Fable-Service-FilePersistence.js":"./source/service/Fable-Service-FilePersistence-Web.js"},"repository":{"type":"git","url":"https://github.com/stevenvelozo/fable.git"},"keywords":["entity","behavior"],"author":"Steven Velozo <steven@velozo.com> (http://velozo.com/)","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/fable/issues"},"homepage":"https://github.com/stevenvelozo/fable","devDependencies":{"quackage":"^1.0.38"},"dependencies":{"async.eachlimit":"^0.5.2","async.waterfall":"^0.5.2","big.js":"^6.2.2","cachetrax":"^1.0.4","cookie":"^0.6.0","data-arithmatic":"^1.0.7","dayjs":"^1.11.13","fable-log":"^3.0.16","fable-serviceproviderbase":"^3.0.15","fable-settings":"^3.0.12","fable-uuid":"^3.0.11","manyfest":"^1.0.38","simple-get":"^4.0.1"}};},{}],132:[function(require,module,exports){/**
3015
+ module.exports=wrappy;function wrappy(fn,cb){if(fn&&cb)return wrappy(fn)(cb);if(typeof fn!=='function')throw new TypeError('need wrapper function');Object.keys(fn).forEach(function(k){wrapper[k]=fn[k];});return wrapper;function wrapper(){var args=new Array(arguments.length);for(var i=0;i<args.length;i++){args[i]=arguments[i];}var ret=fn.apply(this,args);var cb=args[args.length-1];if(typeof ret==='function'&&ret!==cb){Object.keys(cb).forEach(function(k){ret[k]=cb[k];});}return ret;}}},{}],130:[function(require,module,exports){module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){var target={};for(var i=0;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;}},{}],131:[function(require,module,exports){module.exports={"name":"fable","version":"3.1.3","description":"A service dependency injection, configuration and logging library.","main":"source/Fable.js","scripts":{"start":"node source/Fable.js","coverage":"./node_modules/.bin/nyc --reporter=lcov --reporter=text-lcov ./node_modules/mocha/bin/_mocha -- -u tdd -R spec","test":"./node_modules/.bin/mocha -u tdd -R spec","build":"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t fable-image:local","docker-dev-run":"docker run -it -d --name fable-dev -p 30001:8080 -p 38086:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/fable\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" fable-image:local","docker-dev-shell":"docker exec -it fable-dev /bin/bash","tests":"./node_modules/mocha/bin/_mocha -u tdd --exit -R spec --grep"},"mocha":{"diff":true,"extension":["js"],"package":"./package.json","reporter":"spec","slow":"75","timeout":"5000","ui":"tdd","watch-files":["source/**/*.js","test/**/*.js"],"watch-ignore":["lib/vendor"]},"browser":{"./source/service/Fable-Service-EnvironmentData.js":"./source/service/Fable-Service-EnvironmentData-Web.js","./source/service/Fable-Service-FilePersistence.js":"./source/service/Fable-Service-FilePersistence-Web.js"},"repository":{"type":"git","url":"https://github.com/stevenvelozo/fable.git"},"keywords":["entity","behavior"],"author":"Steven Velozo <steven@velozo.com> (http://velozo.com/)","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/fable/issues"},"homepage":"https://github.com/stevenvelozo/fable","devDependencies":{"quackage":"^1.0.38"},"dependencies":{"async.eachlimit":"^0.5.2","async.waterfall":"^0.5.2","big.js":"^6.2.2","cachetrax":"^1.0.4","cookie":"^0.6.0","data-arithmatic":"^1.0.7","dayjs":"^1.11.13","fable-log":"^3.0.16","fable-serviceproviderbase":"^3.0.15","fable-settings":"^3.0.12","fable-uuid":"^3.0.11","manyfest":"^1.0.38","simple-get":"^4.0.1"}};},{}],132:[function(require,module,exports){/**
3016
3016
  * Fable Application Services Support Library
3017
3017
  * @author <steven@velozo.com>
3018
3018
  */ // Pre-init services
@@ -3423,7 +3423,43 @@ this.plugin_advancedFormat=require('dayjs/plugin/advancedFormat');this.dayJS.ext
3423
3423
  // You would do the following:
3424
3424
  // const localeDE = require('dayjs/locale/de');
3425
3425
  // _Fable.Dates.dayJS.locale('de');
3426
- }}module.exports=DateManipulation;},{"dayjs":28,"dayjs/plugin/advancedFormat":29,"dayjs/plugin/isoWeek":30,"dayjs/plugin/relativeTime":31,"dayjs/plugin/timezone":32,"dayjs/plugin/utc":33,"dayjs/plugin/weekOfYear":34,"dayjs/plugin/weekday":35,"fable-serviceproviderbase":53}],139:[function(require,module,exports){const libFableServiceBase=require('fable-serviceproviderbase');class FableServiceEnvironmentData extends libFableServiceBase{constructor(pFable,pOptions,pServiceHash){super(pFable,pOptions,pServiceHash);this.serviceType='EnvironmentData';this.Environment=`node.js`;}}module.exports=FableServiceEnvironmentData;},{"fable-serviceproviderbase":53}],140:[function(require,module,exports){const{PE}=require('big.js');const libFableServiceBase=require('fable-serviceproviderbase');/* Trying a different pattern for this service ...
3426
+ }/**
3427
+ * Calculates the difference in days between two dates.
3428
+ *
3429
+ * @param {string|Date|number} pDateStart - The start date. Can be a string, Date object, or timestamp.
3430
+ * @param {string|Date|number} pDateEnd - The end date. Can be a string, Date object, or timestamp. Defaults to the current date if not provided.
3431
+ * @returns {number} The difference in days between the start and end dates. Returns NaN if the start date is invalid.
3432
+ */dateDayDifference(pDateStart,pDateEnd){// If there is not a valid start date, return NaN
3433
+ if(pDateStart===undefined||pDateStart===null||pDateStart===''){return NaN;}let tmpStartDate=this.dayJS(pDateStart);// Without a valid end date, dayJS defaults to the current date
3434
+ let tmpEndDate=this.dayJS(pDateEnd);// Returns the difference in days between two dates
3435
+ return tmpEndDate.diff(tmpStartDate,'day');}/**
3436
+ * Calculates the difference in weeks between two dates.
3437
+ *
3438
+ * @param {string|Date|number} pDateStart - The start date. Can be a string, Date object, or timestamp.
3439
+ * @param {string|Date|number} pDateEnd - The end date. Can be a string, Date object, or timestamp. Defaults to the current date if not provided.
3440
+ * @returns {number} The difference in weeks between the two dates. Returns NaN if the start date is invalid.
3441
+ */dateWeekDifference(pDateStart,pDateEnd){// If there is not a valid start date, return NaN
3442
+ if(pDateStart===undefined||pDateStart===null||pDateStart===''){return NaN;}let tmpStartDate=this.dayJS(pDateStart);// Without a valid end date, dayJS defaults to the current date
3443
+ let tmpEndDate=this.dayJS(pDateEnd);// Returns the difference in weeks between two dates
3444
+ return tmpEndDate.diff(tmpStartDate,'week');}/**
3445
+ * Calculates the difference in months between two dates.
3446
+ *
3447
+ * @param {string|Date|number} pDateStart - The start date. Can be a string, Date object, or timestamp.
3448
+ * @param {string|Date|number} pDateEnd - The end date. Can be a string, Date object, or timestamp. Defaults to the current date if not provided.
3449
+ * @returns {number} The difference in months between the two dates. Returns NaN if the start date is invalid.
3450
+ */dateMonthDifference(pDateStart,pDateEnd){// If there is not a valid start date, return NaN
3451
+ if(pDateStart===undefined||pDateStart===null||pDateStart===''){return NaN;}let tmpStartDate=this.dayJS(pDateStart);// Without a valid end date, dayJS defaults to the current date
3452
+ let tmpEndDate=this.dayJS(pDateEnd);// Returns the difference in months between two dates
3453
+ return tmpEndDate.diff(tmpStartDate,'month');}/**
3454
+ * Calculates the difference in years between two dates.
3455
+ *
3456
+ * @param {string|Date|number} pDateStart - The start date. Can be a string, Date object, or timestamp.
3457
+ * @param {string|Date|number} pDateEnd - The end date. Can be a string, Date object, or timestamp. Defaults to the current date if not provided.
3458
+ * @returns {number} The difference in years between the two dates. Returns NaN if the start date is invalid.
3459
+ */dateYearDifference(pDateStart,pDateEnd){// If there is not a valid start date, return NaN
3460
+ if(pDateStart===undefined||pDateStart===null||pDateStart===''){return NaN;}let tmpStartDate=this.dayJS(pDateStart);// Without a valid end date, dayJS defaults to the current date
3461
+ let tmpEndDate=this.dayJS(pDateEnd);// Returns the difference in years between two dates
3462
+ return tmpEndDate.diff(tmpStartDate,'year');}}module.exports=DateManipulation;},{"dayjs":28,"dayjs/plugin/advancedFormat":29,"dayjs/plugin/isoWeek":30,"dayjs/plugin/relativeTime":31,"dayjs/plugin/timezone":32,"dayjs/plugin/utc":33,"dayjs/plugin/weekOfYear":34,"dayjs/plugin/weekday":35,"fable-serviceproviderbase":53}],139:[function(require,module,exports){const libFableServiceBase=require('fable-serviceproviderbase');class FableServiceEnvironmentData extends libFableServiceBase{constructor(pFable,pOptions,pServiceHash){super(pFable,pOptions,pServiceHash);this.serviceType='EnvironmentData';this.Environment=`node.js`;}}module.exports=FableServiceEnvironmentData;},{"fable-serviceproviderbase":53}],140:[function(require,module,exports){const{PE}=require('big.js');const libFableServiceBase=require('fable-serviceproviderbase');/* Trying a different pattern for this service ...
3427
3463
  *
3428
3464
  * This service is a simple expression parser that can handle math expressions, with magic(tm) lookup of addresses with a manifest.
3429
3465
  *
@@ -3562,7 +3598,7 @@ tmpCurrentTokenType='Value';tmpCurrentToken+=tmpCharacter;// continue;
3562
3598
  // }
3563
3599
  // tmpResults.ExpressionParserLog.push(`ExpressionParser.tokenize found an unknown character code ${tmpCharCode} character ${tmpCharacter} in the expression: ${pExpression} at index ${i}`);
3564
3600
  // this.log.warn(tmpResults.ExpressionParserLog[tmpResults.ExpressionParserLog.length-1]);
3565
- }if(tmpCurrentTokenType&&tmpCurrentToken.length>0){tmpResults.RawTokens.push(tmpCurrentToken);}return tmpResults.RawTokens;}}module.exports=ExpressionTokenizer;},{"./Fable-Service-ExpressionParser-Base.js":141}],143:[function(require,module,exports){module.exports={"sqrt":{"Name":"Square Root","Address":"fable.Math.sqrtPrecise"},"abs":{"Name":"Absolute Value","Address":"fable.Math.absPrecise"},"floor":{"Name":"Floor Value","Address":"fable.Math.floorPrecise"},"ceil":{"Name":"Ceiling Value","Address":"fable.Math.ceilPrecise"},"rad":{"Name":"Degrees to Radians","Address":"fable.Math.radPrecise"},"pi":{"Name":"Pi","Address":"fable.Math.piPrecise"},"sin":{"Name":"Sine","Address":"fable.Math.sin"},"cos":{"Name":"Cosine","Address":"fable.Math.cos"},"tan":{"Name":"Tangent","Address":"fable.Math.tan"},"count":{"Name":"Count Set Elements","Address":"fable.Math.countSetElements"},"sortset":{"Name":"Sort Set","Address":"fable.Math.sortSetPrecise"},"bucketset":{"Name":"Bucket Set","Address":"fable.Math.bucketSetPrecise"},"sorthistogram":{"Name":"Sort Histogram","Address":"fable.Math.sortHistogramPrecise"},"max":{"Name":"Maximum","Address":"fable.Math.maxPrecise"},"min":{"Name":"Minimum","Address":"fable.Math.minPrecise"},"sum":{"Name":"Sum","Address":"fable.Math.sumPrecise"},"avg":{"Name":"Average","Address":"fable.Math.averagePrecise"},"mean":{"Name":"Mean","Address":"fable.Math.meanPrecise"},"median":{"Name":"Median","Address":"fable.Math.medianPrecise"},"mode":{"Name":"Mode","Address":"fable.Math.modePrecise"},"round":{"Name":"Round","Address":"fable.Math.roundPrecise"},"cumulativesummation":{"Name":"Count Set Elements in a Histogram or Value Map","Address":"fable.Math.cumulativeSummation"},"countsetelements":{"Name":"Count Set Elements in a Histogram or Value Map","Address":"fable.Math.countSetElements"},"getvalue":{"Name":"Get Value from Application State or Services (AppData, etc.)","Address":"fable.Utility.getInternalValueByHash"},"aggregationhistogram":{"Name":"Generate a Histogram by Exact Value Aggregation","Address":"fable.Math.histogramAggregationByExactValueFromInternalState"},"distributionhistogram":{"Name":"Generate a Histogram Based on Value Distribution","Address":"fable.Math.histogramDistributionByExactValueFromInternalState"},"getvaluearray":{"Name":"Get Value Array from Application State or Services (AppData, etc.)","Address":"fable.Utility.createValueArrayByHashParametersFromInternal"},"getvalueobject":{"Name":"Get Value Object from Application State or Services (AppData, etc.)","Address":"fable.Utility.createValueObjectByHashParametersFromInternal"},"cleanvaluearray":{"Name":"Clean Value Array","Address":"fable.Math.cleanValueArray"},"cleanvalueobject":{"Name":"Clean Value Object","Address":"fable.Math.cleanValueObject"},"randominteger":{"Name":"Random Integer","Address":"fable.DataGeneration.randomInteger"},"randomintegerbetween":{"Name":"Random Integer Between Two Numbers","Address":"fable.DataGeneration.randomIntegerBetween"},"randomintegerupto":{"Name":"Random Integer","Address":"fable.DataGeneration.randomIntegerUpTo"},"randomfloat":{"Name":"Random Float","Address":"fable.DataGeneration.randomFloat"},"randomfloatbetween":{"Name":"Random Float","Address":"fable.DataGeneration.randomFloatBetween"},"randomfloatupto":{"Name":"Random Float","Address":"fable.DataGeneration.randomFloatUpTo"}};},{}],144:[function(require,module,exports){const libExpressionParserOperationBase=require('./Fable-Service-ExpressionParser-Base.js');class ExpressionParserLinter extends libExpressionParserOperationBase{constructor(pFable,pOptions,pServiceHash){super(pFable,pOptions,pServiceHash);this.serviceType='ExpressionParser-Linter';}lintTokenizedExpression(pTokenizedExpression,pResultObject){let tmpResults=typeof pResultObject==='object'?pResultObject:{ExpressionParserLog:[]};tmpResults.LinterResults=[];// Guard against bad data being passed in
3601
+ }if(tmpCurrentTokenType&&tmpCurrentToken.length>0){tmpResults.RawTokens.push(tmpCurrentToken);}return tmpResults.RawTokens;}}module.exports=ExpressionTokenizer;},{"./Fable-Service-ExpressionParser-Base.js":141}],143:[function(require,module,exports){module.exports={"sqrt":{"Name":"Square Root","Address":"fable.Math.sqrtPrecise"},"abs":{"Name":"Absolute Value","Address":"fable.Math.absPrecise"},"floor":{"Name":"Floor Value","Address":"fable.Math.floorPrecise"},"ceil":{"Name":"Ceiling Value","Address":"fable.Math.ceilPrecise"},"rad":{"Name":"Degrees to Radians","Address":"fable.Math.radPrecise"},"pi":{"Name":"Pi","Address":"fable.Math.piPrecise"},"sin":{"Name":"Sine","Address":"fable.Math.sin"},"cos":{"Name":"Cosine","Address":"fable.Math.cos"},"tan":{"Name":"Tangent","Address":"fable.Math.tan"},"count":{"Name":"Count Set Elements","Address":"fable.Math.countSetElements"},"sortset":{"Name":"Sort Set","Address":"fable.Math.sortSetPrecise"},"bucketset":{"Name":"Bucket Set","Address":"fable.Math.bucketSetPrecise"},"sorthistogram":{"Name":"Sort Histogram","Address":"fable.Math.sortHistogramPrecise"},"max":{"Name":"Maximum","Address":"fable.Math.maxPrecise"},"min":{"Name":"Minimum","Address":"fable.Math.minPrecise"},"sum":{"Name":"Sum","Address":"fable.Math.sumPrecise"},"avg":{"Name":"Average","Address":"fable.Math.averagePrecise"},"mean":{"Name":"Mean","Address":"fable.Math.meanPrecise"},"median":{"Name":"Median","Address":"fable.Math.medianPrecise"},"mode":{"Name":"Mode","Address":"fable.Math.modePrecise"},"round":{"Name":"Round","Address":"fable.Math.roundPrecise"},"cumulativesummation":{"Name":"Count Set Elements in a Histogram or Value Map","Address":"fable.Math.cumulativeSummation"},"countsetelements":{"Name":"Count Set Elements in a Histogram or Value Map","Address":"fable.Math.countSetElements"},"getvalue":{"Name":"Get Value from Application State or Services (AppData, etc.)","Address":"fable.Utility.getInternalValueByHash"},"aggregationhistogram":{"Name":"Generate a Histogram by Exact Value Aggregation","Address":"fable.Math.histogramAggregationByExactValueFromInternalState"},"distributionhistogram":{"Name":"Generate a Histogram Based on Value Distribution","Address":"fable.Math.histogramDistributionByExactValueFromInternalState"},"getvaluearray":{"Name":"Get Value Array from Application State or Services (AppData, etc.)","Address":"fable.Utility.createValueArrayByHashParametersFromInternal"},"getvalueobject":{"Name":"Get Value Object from Application State or Services (AppData, etc.)","Address":"fable.Utility.createValueObjectByHashParametersFromInternal"},"cleanvaluearray":{"Name":"Clean Value Array","Address":"fable.Math.cleanValueArray"},"cleanvalueobject":{"Name":"Clean Value Object","Address":"fable.Math.cleanValueObject"},"randominteger":{"Name":"Random Integer","Address":"fable.DataGeneration.randomInteger"},"randomintegerbetween":{"Name":"Random Integer Between Two Numbers","Address":"fable.DataGeneration.randomIntegerBetween"},"randomintegerupto":{"Name":"Random Integer","Address":"fable.DataGeneration.randomIntegerUpTo"},"randomfloat":{"Name":"Random Float","Address":"fable.DataGeneration.randomFloat"},"randomfloatbetween":{"Name":"Random Float","Address":"fable.DataGeneration.randomFloatBetween"},"randomfloatupto":{"Name":"Random Float","Address":"fable.DataGeneration.randomFloatUpTo"},"datedaydifference":{"Name":"Date Difference in Days","Address":"fable.Dates.dateDayDifference"},"dateweekdifference":{"Name":"Date Difference in Weeks","Address":"fable.Dates.dateWeekDifference"},"datemonthdifference":{"Name":"Date Difference in Months","Address":"fable.Dates.dateMonthDifference"},"dateyeardifference":{"Name":"Date Difference in Years","Address":"fable.Dates.dateYearDifference"}};},{}],144:[function(require,module,exports){const libExpressionParserOperationBase=require('./Fable-Service-ExpressionParser-Base.js');class ExpressionParserLinter extends libExpressionParserOperationBase{constructor(pFable,pOptions,pServiceHash){super(pFable,pOptions,pServiceHash);this.serviceType='ExpressionParser-Linter';}lintTokenizedExpression(pTokenizedExpression,pResultObject){let tmpResults=typeof pResultObject==='object'?pResultObject:{ExpressionParserLog:[]};tmpResults.LinterResults=[];// Guard against bad data being passed in
3566
3602
  if(!Array.isArray(pTokenizedExpression)){tmpResults.ExpressionParserLog.push(`ERROR: ExpressionParser.lintTokenizedExpression was passed a non-array tokenized expression.`);tmpResults.LinterResults.push(tmpResults.ExpressionParserLog[tmpResults.ExpressionParserLog.length-1]);this.log.error(tmpResults.ExpressionParserLog[tmpResults.ExpressionParserLog.length-1]);return pTokenizedExpression;}if(pTokenizedExpression.length<1){tmpResults.ExpressionParserLog.push(`ERROR: ExpressionParser.lintTokenizedExpression was passed an empty tokenized expression.`);tmpResults.LinterResults.push(tmpResults.ExpressionParserLog[tmpResults.ExpressionParserLog.length-1]);this.log.error(tmpResults.ExpressionParserLog[tmpResults.ExpressionParserLog.length-1]);return pTokenizedExpression;}// 1. Check for balanced parenthesis
3567
3603
  let tmpParenthesisDepth=0;// If it is in a state address, we don't care about the parenthesis
3568
3604
  // State addresses are between squiggly brackets
@@ -3962,13 +3998,32 @@ return 1;}return 0;}/**
3962
3998
  * Make a histogram of representative counts for exact values (.tostring() is the keys to count)
3963
3999
  * @param {Array} pValueSet
3964
4000
  * @param {string} pValueAddress
3965
- */histogramAggregationByExactValue(pValueObjectSet,pValueAddress,pValueAmountAddress,pManifest){if(!Array.isArray(pValueObjectSet)){return pValueObjectSet;}if(!pValueAddress||!pValueAmountAddress){return{};}let tmpHistogram={};for(let i=0;i<pValueObjectSet.length;i++){let tmpValue=this.fable.Utility.getValueByHash(pValueObjectSet[i],pValueAddress,pManifest).toString();let tmpAmount=this.parsePrecise(this.fable.Utility.getValueByHash(pValueObjectSet[i],pValueAmountAddress,pManifest),NaN);if(!(tmpValue in tmpHistogram)){tmpHistogram[tmpValue]=0;}if(!isNaN(tmpAmount)){tmpHistogram[tmpValue]=this.addPrecise(tmpHistogram[tmpValue],tmpAmount);}}return tmpHistogram;}histogramAggregationByExactValueFromInternalState(pValueObjectSetAddress,pValueAddress,pValueAmountAddress){if(!pValueObjectSetAddress){return{};}let tmpValueObjectSet=this.fable.Utility.getInternalValueByHash(pValueObjectSetAddress);return this.histogramAggregationByExactValue(tmpValueObjectSet,pValueAddress,pValueAmountAddress);}/**
4001
+ */histogramAggregationByExactValue(pValueObjectSet,pValueAddress,pValueAmountAddress,pManifest){if(!Array.isArray(pValueObjectSet)){return pValueObjectSet;}if(!pValueAddress||!pValueAmountAddress){return{};}let tmpHistogram={};for(let i=0;i<pValueObjectSet.length;i++){let tmpValue=this.fable.Utility.getValueByHash(pValueObjectSet[i],pValueAddress,pManifest).toString();let tmpAmount=this.parsePrecise(this.fable.Utility.getValueByHash(pValueObjectSet[i],pValueAmountAddress,pManifest),NaN);if(!(tmpValue in tmpHistogram)){tmpHistogram[tmpValue]=0;}if(!isNaN(tmpAmount)){tmpHistogram[tmpValue]=this.addPrecise(tmpHistogram[tmpValue],tmpAmount);}}return tmpHistogram;}/**
4002
+ * Aggregates a histogram by exact value from an internal state object.
4003
+ *
4004
+ * @param {string} pValueObjectSetAddress - The address of the internal value object set.
4005
+ * @param {string} pValueAddress - The address of the value to aggregate by.
4006
+ * @param {string} pValueAmountAddress - The address of the amount to aggregate.
4007
+ * @returns {Object} The aggregated histogram object. Returns an empty object if the value object set address is not provided.
4008
+ */histogramAggregationByExactValueFromInternalState(pValueObjectSetAddress,pValueAddress,pValueAmountAddress){if(!pValueObjectSetAddress){return{};}let tmpValueObjectSet=this.fable.Utility.getInternalValueByHash(pValueObjectSetAddress);return this.histogramAggregationByExactValue(tmpValueObjectSet,pValueAddress,pValueAmountAddress);}/**
3966
4009
  * Given a value object set (an array of objects), find a specific entry when
3967
4010
  * sorted by a specific value address. Supports -1 syntax for last entry.
3968
4011
  * @param {Array} pValueObjectSet
3969
4012
  * @param {string} pValueAddress
3970
4013
  * @param {Object} pManifest
3971
- */entryInSet(pValueObjectSet,pValueAddress,pEntryIndex){if(!Array.isArray(pValueObjectSet)){return pValueObjectSet;}if(!pValueAddress){return false;}if(isNaN(pEntryIndex)||pEntryIndex>=pValueObjectSet.length){return false;}let tmpValueArray=pValueObjectSet.toSorted((pLeft,pRight)=>{return this.comparePrecise(pLeft,pRight);});let tmpIndex=pEntryIndex===-1?tmpValueArray.length-1:pEntryIndex;return tmpValueArray[tmpIndex];}smallestInSet(pValueObjectSet,pValueAddress){return this.entryInSet(pValueObjectSet,pValueAddress,0);}largestInSet(pValueObjectSet,pValueAddress){return this.entryInSet(pValueObjectSet,pValueAddress,-1);}/**
4014
+ */entryInSet(pValueObjectSet,pValueAddress,pEntryIndex){if(!Array.isArray(pValueObjectSet)){return pValueObjectSet;}if(!pValueAddress){return false;}if(isNaN(pEntryIndex)||pEntryIndex>=pValueObjectSet.length){return false;}let tmpValueArray=pValueObjectSet.toSorted((pLeft,pRight)=>{return this.comparePrecise(pLeft,pRight);});let tmpIndex=pEntryIndex===-1?tmpValueArray.length-1:pEntryIndex;return tmpValueArray[tmpIndex];}/**
4015
+ * Finds the smallest value in a set of objects based on a specified value address.
4016
+ *
4017
+ * @param {Object[]} pValueObjectSet - An array of objects to search through.
4018
+ * @param {string} pValueAddress - The key or path used to access the value within each object.
4019
+ * @returns {*} The smallest value found in the set at the specified value address.
4020
+ */smallestInSet(pValueObjectSet,pValueAddress){return this.entryInSet(pValueObjectSet,pValueAddress,0);}/**
4021
+ * Finds the largest value in a set of objects based on a specified value address.
4022
+ *
4023
+ * @param {Object[]} pValueObjectSet - An array of objects to search through.
4024
+ * @param {string} pValueAddress - The address (key or path) within each object to compare values.
4025
+ * @returns {*} The largest value found at the specified address in the set of objects.
4026
+ */largestInSet(pValueObjectSet,pValueAddress){return this.entryInSet(pValueObjectSet,pValueAddress,-1);}/**
3972
4027
  * Expects an array of objects, and an address in each object to sum. Expects
3973
4028
  * an address to put the cumulative summation as well.
3974
4029
  * @param {Array} pValueObjectSet