fable 3.1.61 → 3.1.62

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/dist/fable.js CHANGED
@@ -2199,7 +2199,7 @@ try{if(!global.localStorage)return false;}catch(_){return false;}var val=global.
2199
2199
  // presumably different callback function.
2200
2200
  // This makes sure that own properties are retained, so that
2201
2201
  // decorations and such are not lost along the way.
2202
- 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;}}},{}],136:[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;}},{}],137:[function(require,module,exports){module.exports={"name":"fable","version":"3.1.61","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.56"},"dependencies":{"async.eachlimit":"^0.5.2","async.waterfall":"^0.5.2","big.js":"^7.0.1","cachetrax":"^1.0.5","cookie":"^1.1.1","data-arithmatic":"^1.0.7","dayjs":"^1.11.19","fable-log":"^3.0.17","fable-serviceproviderbase":"^3.0.18","fable-settings":"^3.0.15","fable-uuid":"^3.0.12","manyfest":"^1.0.47","simple-get":"^4.0.1"}};},{}],138:[function(require,module,exports){/**
2202
+ 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;}}},{}],136:[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;}},{}],137:[function(require,module,exports){module.exports={"name":"fable","version":"3.1.62","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.56"},"dependencies":{"async.eachlimit":"^0.5.2","async.waterfall":"^0.5.2","big.js":"^7.0.1","cachetrax":"^1.0.5","cookie":"^1.1.1","data-arithmatic":"^1.0.7","dayjs":"^1.11.19","fable-log":"^3.0.17","fable-serviceproviderbase":"^3.0.18","fable-settings":"^3.0.15","fable-uuid":"^3.0.12","manyfest":"^1.0.47","simple-get":"^4.0.1"}};},{}],138:[function(require,module,exports){/**
2203
2203
  * Fable Application Services Support Library
2204
2204
  * @author <steven@velozo.com>
2205
2205
  */// Pre-init services
@@ -3716,27 +3716,54 @@ return this.addPrecise(pEasingConfiguration.DomainRangeStart,tmpScaledValue);}}/
3716
3716
  *
3717
3717
  * @return {number|string} - The predicted dependent variable value.
3718
3718
  */predictFromRegressionModel(pRegressionCoefficients,pIndependentVariableVector){let tmpIndependentVariableVector=pIndependentVariableVector;if(!Array.isArray(pIndependentVariableVector)){tmpIndependentVariableVector=[pIndependentVariableVector];}return pRegressionCoefficients.slice(1).reduce((sum,b,i)=>{return this.addPrecise(sum,this.multiplyPrecise(b,tmpIndependentVariableVector[i]));},pRegressionCoefficients[0]);}/**
3719
+ * Resolves paired Y/X value arrays from flexible argument patterns.
3720
+ *
3721
+ * The expression parser's SetConcatArray spreads comma-separated arguments
3722
+ * as individual function parameters. This helper normalizes three calling
3723
+ * conventions into a clean paired-value result:
3724
+ *
3725
+ * 1. Two arrays: SLOPE(yArray, xArray)
3726
+ * 2. Spread scalars: SLOPE(y1,y2,...,yN, x1,x2,...,xN) — split in half
3727
+ * 3. One flat array: SLOPE([y1,...,yN,x1,...,xN]) — split in half
3728
+ *
3729
+ * Non-numeric values are filtered; only pairs where both Y and X parse
3730
+ * are kept.
3731
+ *
3732
+ * @param {...*} pArguments - Flexible: (yArr, xArr) | (y1,y2,...,x1,x2,...) | (flatArr)
3733
+ *
3734
+ * @return {Object} { cleanX, cleanY, n }
3735
+ */cleanPairedValues(){let tmpYValues;let tmpXValues;for(var _len6=arguments.length,pArguments=new Array(_len6),_key6=0;_key6<_len6;_key6++){pArguments[_key6]=arguments[_key6];}if(pArguments.length===2&&Array.isArray(pArguments[0])&&Array.isArray(pArguments[1])){// Two arrays: SLOPE(yArray, xArray)
3736
+ tmpYValues=pArguments[0];tmpXValues=pArguments[1];}else if(pArguments.length===1&&Array.isArray(pArguments[0])){// Single flat array — split in half
3737
+ let tmpFlat=pArguments[0];let tmpHalf=Math.floor(tmpFlat.length/2);tmpYValues=tmpFlat.slice(0,tmpHalf);tmpXValues=tmpFlat.slice(tmpHalf);}else if(pArguments.length>2){// Many spread scalars from expression parser — split in half
3738
+ let tmpHalf=Math.floor(pArguments.length/2);tmpYValues=pArguments.slice(0,tmpHalf);tmpXValues=pArguments.slice(tmpHalf);}else{// Two scalars or other degenerate input
3739
+ tmpYValues=Array.isArray(pArguments[0])?pArguments[0]:[pArguments[0]];tmpXValues=Array.isArray(pArguments[1])?pArguments[1]:[pArguments[1]];}let tmpPairCount=Math.min(tmpYValues.length,tmpXValues.length);let tmpCleanX=[];let tmpCleanY=[];for(let i=0;i<tmpPairCount;i++){let tmpX=this.parsePrecise(tmpXValues[i],NaN);let tmpY=this.parsePrecise(tmpYValues[i],NaN);if(!isNaN(tmpX)&&!isNaN(tmpY)){tmpCleanX.push(tmpX);tmpCleanY.push(tmpY);}}return{cleanX:tmpCleanX,cleanY:tmpCleanY,n:tmpCleanX.length};}/**
3719
3740
  * Calculates the slope of a linear regression line through paired data points.
3720
3741
  * Equivalent to Excel's SLOPE function.
3721
3742
  *
3722
3743
  * Formula: slope = (n * Σ(xy) - Σx * Σy) / (n * Σ(x²) - (Σx)²)
3723
3744
  *
3724
- * @param {Array<number|string>} pYValues - The dependent data points (known y's).
3725
- * @param {Array<number|string>} pXValues - The independent data points (known x's).
3745
+ * Calling conventions (all work through the expression parser):
3746
+ * SLOPE(yArray, xArray) — two resolved arrays
3747
+ * SLOPE(y1,y2,...,yN, x1,x2,...,xN) — inline scalars, split in half
3748
+ *
3749
+ * @param {...*} pArguments - Y values followed by X values (see cleanPairedValues).
3726
3750
  *
3727
3751
  * @return {string} The slope of the regression line.
3728
- */slopePrecise(pYValues,pXValues){let tmpYValues=Array.isArray(pYValues)?pYValues:[pYValues];let tmpXValues=Array.isArray(pXValues)?pXValues:[pXValues];let tmpN=Math.min(tmpYValues.length,tmpXValues.length);if(tmpN<2){return'0';}let tmpSumX='0';let tmpSumY='0';let tmpSumXY='0';let tmpSumX2='0';for(let i=0;i<tmpN;i++){let tmpX=this.parsePrecise(tmpXValues[i],NaN);let tmpY=this.parsePrecise(tmpYValues[i],NaN);if(isNaN(tmpX)||isNaN(tmpY)){continue;}tmpSumX=this.addPrecise(tmpSumX,tmpX);tmpSumY=this.addPrecise(tmpSumY,tmpY);tmpSumXY=this.addPrecise(tmpSumXY,this.multiplyPrecise(tmpX,tmpY));tmpSumX2=this.addPrecise(tmpSumX2,this.multiplyPrecise(tmpX,tmpX));}// slope = (n * Σ(xy) - Σx * Σy) / (n * Σ(x²) - (Σx)²)
3729
- let tmpNumerator=this.subtractPrecise(this.multiplyPrecise(tmpN,tmpSumXY),this.multiplyPrecise(tmpSumX,tmpSumY));let tmpDenominator=this.subtractPrecise(this.multiplyPrecise(tmpN,tmpSumX2),this.multiplyPrecise(tmpSumX,tmpSumX));if(this.comparePrecise(tmpDenominator,0)==0){return'0';}return this.dividePrecise(tmpNumerator,tmpDenominator);}/**
3752
+ */slopePrecise(){let tmpPaired=this.cleanPairedValues(...arguments);if(tmpPaired.n<2){return'0';}let tmpSumX='0';let tmpSumY='0';let tmpSumXY='0';let tmpSumX2='0';for(let i=0;i<tmpPaired.n;i++){tmpSumX=this.addPrecise(tmpSumX,tmpPaired.cleanX[i]);tmpSumY=this.addPrecise(tmpSumY,tmpPaired.cleanY[i]);tmpSumXY=this.addPrecise(tmpSumXY,this.multiplyPrecise(tmpPaired.cleanX[i],tmpPaired.cleanY[i]));tmpSumX2=this.addPrecise(tmpSumX2,this.multiplyPrecise(tmpPaired.cleanX[i],tmpPaired.cleanX[i]));}// slope = (n * Σ(xy) - Σx * Σy) / (n * Σ(x²) - (Σx)²)
3753
+ let tmpNumerator=this.subtractPrecise(this.multiplyPrecise(tmpPaired.n,tmpSumXY),this.multiplyPrecise(tmpSumX,tmpSumY));let tmpDenominator=this.subtractPrecise(this.multiplyPrecise(tmpPaired.n,tmpSumX2),this.multiplyPrecise(tmpSumX,tmpSumX));if(this.comparePrecise(tmpDenominator,0)==0){return'0';}return this.dividePrecise(tmpNumerator,tmpDenominator);}/**
3730
3754
  * Calculates the y-intercept of a linear regression line through paired data points.
3731
3755
  * Equivalent to Excel's INTERCEPT function.
3732
3756
  *
3733
3757
  * Formula: intercept = ȳ - slope * x̄
3734
3758
  *
3735
- * @param {Array<number|string>} pYValues - The dependent data points (known y's).
3736
- * @param {Array<number|string>} pXValues - The independent data points (known x's).
3759
+ * Calling conventions (all work through the expression parser):
3760
+ * INTERCEPT(yArray, xArray) — two resolved arrays
3761
+ * INTERCEPT(y1,y2,...,yN, x1,x2,...,xN) — inline scalars, split in half
3762
+ *
3763
+ * @param {...*} pArguments - Y values followed by X values (see cleanPairedValues).
3737
3764
  *
3738
3765
  * @return {string} The y-intercept of the regression line.
3739
- */interceptPrecise(pYValues,pXValues){let tmpYValues=Array.isArray(pYValues)?pYValues:[pYValues];let tmpXValues=Array.isArray(pXValues)?pXValues:[pXValues];let tmpSlope=this.slopePrecise(tmpYValues,tmpXValues);let tmpMeanY=this.meanPrecise(tmpYValues);let tmpMeanX=this.meanPrecise(tmpXValues);// intercept = ȳ - slope * x̄
3766
+ */interceptPrecise(){let tmpPaired=this.cleanPairedValues(...arguments);let tmpSlope=this.slopePrecise(tmpPaired.cleanY,tmpPaired.cleanX);let tmpMeanY=this.meanPrecise(tmpPaired.cleanY);let tmpMeanX=this.meanPrecise(tmpPaired.cleanX);// intercept = ȳ - slope * x̄
3740
3767
  return this.subtractPrecise(tmpMeanY,this.multiplyPrecise(tmpSlope,tmpMeanX));}/**
3741
3768
  * Evaluate a point on a cubic bezier curve at parameter t.
3742
3769
  *