pict 1.0.227 → 1.0.228

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 (166) hide show
  1. package/dist/pict.compatible.js +186 -141
  2. package/dist/pict.compatible.min.js +2 -2
  3. package/dist/pict.compatible.min.js.map +1 -1
  4. package/dist/pict.js +182 -137
  5. package/dist/pict.min.js +2 -2
  6. package/dist/pict.min.js.map +1 -1
  7. package/package.json +4 -3
  8. package/source/Pict-Browser-SafeLoad.js +2 -2
  9. package/source/Pict-Browser-SafeOnDocumentReady.js +2 -2
  10. package/source/Pict-CSS.js +6 -0
  11. package/source/Pict-Content-Assignment.js +112 -49
  12. package/source/Pict-DataProvider.js +8 -1
  13. package/source/Pict-Meadow-EntityProvider.js +7 -0
  14. package/source/Pict-Template-Provider.js +11 -7
  15. package/source/Pict.js +41 -12
  16. package/source/environments/Pict-Environment-Log.js +2 -2
  17. package/source/environments/Pict-Environment-Object.js +2 -2
  18. package/source/globals.d.ts +11 -0
  19. package/source/templates/Pict-Template-Data.js +3 -0
  20. package/source/templates/Pict-Template-Entity.js +8 -4
  21. package/source/templates/Pict-Template-Template.js +7 -4
  22. package/source/templates/Pict-Template-TemplateFromMap.js +9 -6
  23. package/source/templates/Pict-Template-TemplateSet.js +7 -4
  24. package/source/templates/Pict-Template-TemplateSetFromMap.js +9 -6
  25. package/source/templates/Pict-Template-TemplateValueSet.js +7 -4
  26. package/source/templates/data/Pict-Template-DataJson.js +3 -0
  27. package/source/templates/data/Pict-Template-DateFormat.js +5 -0
  28. package/source/templates/data/Pict-Template-DateYMD.js +5 -0
  29. package/source/templates/data/Pict-Template-Digits.js +5 -0
  30. package/source/templates/data/Pict-Template-Dollars.js +5 -0
  31. package/source/templates/data/Pict-Template-Join.js +5 -0
  32. package/source/templates/data/Pict-Template-JoinUnique.js +5 -0
  33. package/source/templates/data/Pict-Template-PascalCaseIdentifier.js +5 -0
  34. package/source/templates/data/Pict-Template-PluckJoinUnique.js +5 -0
  35. package/source/templates/data-generation/Pict-Template-RandomNumber.js +3 -0
  36. package/source/templates/data-generation/Pict-Template-RandomNumberString.js +3 -0
  37. package/source/templates/debugging/Pict-Template-Breakpoint.js +4 -0
  38. package/source/templates/debugging/Pict-Template-DataValueTree.js +5 -2
  39. package/source/templates/debugging/Pict-Template-LogStatement.js +3 -0
  40. package/source/templates/debugging/Pict-Template-LogValue.js +3 -0
  41. package/source/templates/debugging/Pict-Template-LogValueTree.js +4 -0
  42. package/source/templates/logic/Pict-Template-NotEmpty.js +3 -0
  43. package/source/templates/logic/Pict-Template-TemplateIf.js +9 -6
  44. package/source/templates/logic/Pict-Template-TemplateIfAbsolute.js +9 -6
  45. package/tsconfig.json +6 -4
  46. package/types/source/Pict-Browser-SafeLoad.d.ts +3 -0
  47. package/types/source/Pict-Browser-SafeLoad.d.ts.map +1 -0
  48. package/types/source/Pict-Browser-SafeOnDocumentReady.d.ts.map +1 -0
  49. package/types/source/Pict-Browser-Shim.d.ts.map +1 -0
  50. package/types/{Pict-CSS.d.ts → source/Pict-CSS.d.ts} +6 -0
  51. package/types/source/Pict-CSS.d.ts.map +1 -0
  52. package/types/{Pict-Content-Assignment.d.ts → source/Pict-Content-Assignment.d.ts} +24 -17
  53. package/types/source/Pict-Content-Assignment.d.ts.map +1 -0
  54. package/types/source/Pict-DataProvider.d.ts +13 -0
  55. package/types/source/Pict-DataProvider.d.ts.map +1 -0
  56. package/types/{Pict-Meadow-EntityProvider.d.ts → source/Pict-Meadow-EntityProvider.d.ts} +6 -0
  57. package/types/source/Pict-Meadow-EntityProvider.d.ts.map +1 -0
  58. package/types/{Pict-Template-Provider.d.ts → source/Pict-Template-Provider.d.ts} +15 -3
  59. package/types/source/Pict-Template-Provider.d.ts.map +1 -0
  60. package/types/{Pict.d.ts → source/Pict.d.ts} +89 -14
  61. package/types/source/Pict.d.ts.map +1 -0
  62. package/types/{environments → source/environments}/Pict-Environment-Log.d.ts +5 -5
  63. package/types/source/environments/Pict-Environment-Log.d.ts.map +1 -0
  64. package/types/{environments → source/environments}/Pict-Environment-Object.d.ts +3 -3
  65. package/types/source/environments/Pict-Environment-Object.d.ts.map +1 -0
  66. package/types/{templates → source/templates}/Pict-Template-Data.d.ts +4 -1
  67. package/types/source/templates/Pict-Template-Data.d.ts.map +1 -0
  68. package/types/{templates → source/templates}/Pict-Template-Entity.d.ts +4 -1
  69. package/types/source/templates/Pict-Template-Entity.d.ts.map +1 -0
  70. package/types/{templates → source/templates}/Pict-Template-Self.d.ts +2 -1
  71. package/types/source/templates/Pict-Template-Self.d.ts.map +1 -0
  72. package/types/{templates → source/templates}/Pict-Template-Template.d.ts +6 -3
  73. package/types/source/templates/Pict-Template-Template.d.ts.map +1 -0
  74. package/types/{templates → source/templates}/Pict-Template-TemplateFromMap.d.ts +5 -2
  75. package/types/source/templates/Pict-Template-TemplateFromMap.d.ts.map +1 -0
  76. package/types/{templates → source/templates}/Pict-Template-TemplateSet.d.ts +5 -2
  77. package/types/source/templates/Pict-Template-TemplateSet.d.ts.map +1 -0
  78. package/types/{templates → source/templates}/Pict-Template-TemplateSetFromMap.d.ts +5 -2
  79. package/types/source/templates/Pict-Template-TemplateSetFromMap.d.ts.map +1 -0
  80. package/types/{templates → source/templates}/Pict-Template-TemplateValueSet.d.ts +5 -2
  81. package/types/source/templates/Pict-Template-TemplateValueSet.d.ts.map +1 -0
  82. package/types/{templates → source/templates}/data/Pict-Template-DataJson.d.ts +4 -1
  83. package/types/source/templates/data/Pict-Template-DataJson.d.ts.map +1 -0
  84. package/types/{templates → source/templates}/data/Pict-Template-DateFormat.d.ts +6 -1
  85. package/types/source/templates/data/Pict-Template-DateFormat.d.ts.map +1 -0
  86. package/types/{templates → source/templates}/data/Pict-Template-DateYMD.d.ts +6 -1
  87. package/types/source/templates/data/Pict-Template-DateYMD.d.ts.map +1 -0
  88. package/types/{templates → source/templates}/data/Pict-Template-Digits.d.ts +6 -1
  89. package/types/source/templates/data/Pict-Template-Digits.d.ts.map +1 -0
  90. package/types/{templates → source/templates}/data/Pict-Template-Dollars.d.ts +6 -1
  91. package/types/source/templates/data/Pict-Template-Dollars.d.ts.map +1 -0
  92. package/types/{templates → source/templates}/data/Pict-Template-Join.d.ts +6 -1
  93. package/types/source/templates/data/Pict-Template-Join.d.ts.map +1 -0
  94. package/types/{templates → source/templates}/data/Pict-Template-JoinUnique.d.ts +6 -1
  95. package/types/source/templates/data/Pict-Template-JoinUnique.d.ts.map +1 -0
  96. package/types/{templates → source/templates}/data/Pict-Template-PascalCaseIdentifier.d.ts +6 -1
  97. package/types/source/templates/data/Pict-Template-PascalCaseIdentifier.d.ts.map +1 -0
  98. package/types/{templates → source/templates}/data/Pict-Template-PluckJoinUnique.d.ts +6 -1
  99. package/types/source/templates/data/Pict-Template-PluckJoinUnique.d.ts.map +1 -0
  100. package/types/{templates → source/templates}/data-generation/Pict-Template-RandomNumber.d.ts +4 -1
  101. package/types/source/templates/data-generation/Pict-Template-RandomNumber.d.ts.map +1 -0
  102. package/types/{templates → source/templates}/data-generation/Pict-Template-RandomNumberString.d.ts +4 -1
  103. package/types/source/templates/data-generation/Pict-Template-RandomNumberString.d.ts.map +1 -0
  104. package/types/{templates → source/templates}/debugging/Pict-Template-Breakpoint.d.ts +4 -1
  105. package/types/source/templates/debugging/Pict-Template-Breakpoint.d.ts.map +1 -0
  106. package/types/{templates → source/templates}/debugging/Pict-Template-DataValueTree.d.ts +5 -2
  107. package/types/source/templates/debugging/Pict-Template-DataValueTree.d.ts.map +1 -0
  108. package/types/{templates → source/templates}/debugging/Pict-Template-LogStatement.d.ts +4 -1
  109. package/types/source/templates/debugging/Pict-Template-LogStatement.d.ts.map +1 -0
  110. package/types/{templates → source/templates}/debugging/Pict-Template-LogValue.d.ts +4 -1
  111. package/types/source/templates/debugging/Pict-Template-LogValue.d.ts.map +1 -0
  112. package/types/{templates → source/templates}/debugging/Pict-Template-LogValueTree.d.ts +4 -1
  113. package/types/source/templates/debugging/Pict-Template-LogValueTree.d.ts.map +1 -0
  114. package/types/{templates → source/templates}/logic/Pict-Template-NotEmpty.d.ts +4 -1
  115. package/types/source/templates/logic/Pict-Template-NotEmpty.d.ts.map +1 -0
  116. package/types/{templates → source/templates}/logic/Pict-Template-TemplateIf-Base.d.ts +2 -1
  117. package/types/source/templates/logic/Pict-Template-TemplateIf-Base.d.ts.map +1 -0
  118. package/types/{templates → source/templates}/logic/Pict-Template-TemplateIf.d.ts +3 -1
  119. package/types/source/templates/logic/Pict-Template-TemplateIf.d.ts.map +1 -0
  120. package/types/{templates → source/templates}/logic/Pict-Template-TemplateIfAbsolute.d.ts +3 -1
  121. package/types/source/templates/logic/Pict-Template-TemplateIfAbsolute.d.ts.map +1 -0
  122. package/types/Pict-Browser-SafeLoad.d.ts +0 -3
  123. package/types/Pict-Browser-SafeLoad.d.ts.map +0 -1
  124. package/types/Pict-Browser-SafeOnDocumentReady.d.ts.map +0 -1
  125. package/types/Pict-Browser-Shim.d.ts.map +0 -1
  126. package/types/Pict-CSS.d.ts.map +0 -1
  127. package/types/Pict-Content-Assignment.d.ts.map +0 -1
  128. package/types/Pict-DataProvider.d.ts +0 -7
  129. package/types/Pict-DataProvider.d.ts.map +0 -1
  130. package/types/Pict-Meadow-EntityProvider.d.ts.map +0 -1
  131. package/types/Pict-Template-Provider.d.ts.map +0 -1
  132. package/types/Pict-Template.d.ts +0 -56
  133. package/types/Pict-Template.d.ts.map +0 -1
  134. package/types/Pict.d.ts.map +0 -1
  135. package/types/environments/Pict-Environment-Log.d.ts.map +0 -1
  136. package/types/environments/Pict-Environment-Object.d.ts.map +0 -1
  137. package/types/templates/Pict-Template-Data.d.ts.map +0 -1
  138. package/types/templates/Pict-Template-Entity.d.ts.map +0 -1
  139. package/types/templates/Pict-Template-Self.d.ts.map +0 -1
  140. package/types/templates/Pict-Template-Template.d.ts.map +0 -1
  141. package/types/templates/Pict-Template-TemplateFromMap.d.ts.map +0 -1
  142. package/types/templates/Pict-Template-TemplateSet.d.ts.map +0 -1
  143. package/types/templates/Pict-Template-TemplateSetFromMap.d.ts.map +0 -1
  144. package/types/templates/Pict-Template-TemplateValueSet.d.ts.map +0 -1
  145. package/types/templates/data/Pict-Template-DataJson.d.ts.map +0 -1
  146. package/types/templates/data/Pict-Template-DateFormat.d.ts.map +0 -1
  147. package/types/templates/data/Pict-Template-DateYMD.d.ts.map +0 -1
  148. package/types/templates/data/Pict-Template-Digits.d.ts.map +0 -1
  149. package/types/templates/data/Pict-Template-Dollars.d.ts.map +0 -1
  150. package/types/templates/data/Pict-Template-Join.d.ts.map +0 -1
  151. package/types/templates/data/Pict-Template-JoinUnique.d.ts.map +0 -1
  152. package/types/templates/data/Pict-Template-PascalCaseIdentifier.d.ts.map +0 -1
  153. package/types/templates/data/Pict-Template-PluckJoinUnique.d.ts.map +0 -1
  154. package/types/templates/data-generation/Pict-Template-RandomNumber.d.ts.map +0 -1
  155. package/types/templates/data-generation/Pict-Template-RandomNumberString.d.ts.map +0 -1
  156. package/types/templates/debugging/Pict-Template-Breakpoint.d.ts.map +0 -1
  157. package/types/templates/debugging/Pict-Template-DataValueTree.d.ts.map +0 -1
  158. package/types/templates/debugging/Pict-Template-LogStatement.d.ts.map +0 -1
  159. package/types/templates/debugging/Pict-Template-LogValue.d.ts.map +0 -1
  160. package/types/templates/debugging/Pict-Template-LogValueTree.d.ts.map +0 -1
  161. package/types/templates/logic/Pict-Template-NotEmpty.d.ts.map +0 -1
  162. package/types/templates/logic/Pict-Template-TemplateIf-Base.d.ts.map +0 -1
  163. package/types/templates/logic/Pict-Template-TemplateIf.d.ts.map +0 -1
  164. package/types/templates/logic/Pict-Template-TemplateIfAbsolute.d.ts.map +0 -1
  165. /package/types/{Pict-Browser-SafeOnDocumentReady.d.ts → source/Pict-Browser-SafeOnDocumentReady.d.ts} +0 -0
  166. /package/types/{Pict-Browser-Shim.d.ts → source/Pict-Browser-Shim.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- "use strict";function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r);}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r);}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _defineProperty2(e,r,t){return(r=_toPropertyKey2(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _classCallCheck2(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey2(o.key),o);}}function _createClass2(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey2(t){var i=_toPrimitive2(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive2(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}(function(f){if((typeof exports==="undefined"?"undefined":_typeof(exports))==="object"&&typeof module!=="undefined"){module.exports=f();}else if(typeof define==="function"&&define.amd){define([],f);}else{var g;if(typeof window!=="undefined"){g=window;}else if(typeof global!=="undefined"){g=global;}else if(typeof self!=="undefined"){g=self;}else{g=this;}g.Pict=f();}})(function(){var define,module,exports;return function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a;}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r);},p,p.exports,r,e,n,t);}return n[i].exports;}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o;}return r;}()({1:[function(require,module,exports){'use strict';var eachOfLimit=require('async.util.eachoflimit');var withoutIndex=require('async.util.withoutindex');module.exports=function eachLimit(arr,limit,iterator,cb){return eachOfLimit(limit)(arr,withoutIndex(iterator),cb);};},{"async.util.eachoflimit":3,"async.util.withoutindex":14}],2:[function(require,module,exports){'use strict';module.exports=function(tasks){function makeCallback(index){function fn(){if(tasks.length){tasks[index].apply(null,arguments);}return fn.next();}fn.next=function(){return index<tasks.length-1?makeCallback(index+1):null;};return fn;}return makeCallback(0);};},{}],3:[function(require,module,exports){var once=require('async.util.once');var noop=require('async.util.noop');var onlyOnce=require('async.util.onlyonce');var keyIterator=require('async.util.keyiterator');module.exports=function eachOfLimit(limit){return function(obj,iterator,cb){cb=once(cb||noop);obj=obj||[];var nextKey=keyIterator(obj);if(limit<=0){return cb(null);}var done=false;var running=0;var errored=false;(function replenish(){if(done&&running<=0){return cb(null);}while(running<limit&&!errored){var key=nextKey();if(key===null){done=true;if(running<=0){cb(null);}return;}running+=1;iterator(obj[key],key,onlyOnce(function(err){running-=1;if(err){cb(err);errored=true;}else{replenish();}}));}})();};};},{"async.util.keyiterator":7,"async.util.noop":9,"async.util.once":10,"async.util.onlyonce":11}],4:[function(require,module,exports){'use strict';var setImmediate=require('async.util.setimmediate');var restParam=require('async.util.restparam');module.exports=function(fn){return restParam(function(args){var callback=args.pop();args.push(function(){var innerArgs=arguments;if(sync){setImmediate(function(){callback.apply(null,innerArgs);});}else{callback.apply(null,innerArgs);}});var sync=true;fn.apply(this,args);sync=false;});};},{"async.util.restparam":12,"async.util.setimmediate":13}],5:[function(require,module,exports){'use strict';module.exports=Array.isArray||function isArray(obj){return Object.prototype.toString.call(obj)==='[object Array]';};},{}],6:[function(require,module,exports){'use strict';var isArray=require('async.util.isarray');module.exports=function isArrayLike(arr){return isArray(arr)||// has a positive integer length property
1
+ "use strict";function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n=0,F=function F(){};return{s:F,n:function n(){return _n>=r.length?{done:!0}:{done:!1,value:r[_n++]};},e:function e(r){throw r;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var o,a=!0,u=!1;return{s:function s(){t=t.call(r);},n:function n(){var r=t.next();return a=r.done,r;},e:function e(r){u=!0,o=r;},f:function f(){try{a||null==t["return"]||t["return"]();}finally{if(u)throw o;}}};}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r);}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r);}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _defineProperty2(e,r,t){return(r=_toPropertyKey2(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _classCallCheck2(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey2(o.key),o);}}function _createClass2(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey2(t){var i=_toPrimitive2(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive2(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}(function(f){if((typeof exports==="undefined"?"undefined":_typeof(exports))==="object"&&typeof module!=="undefined"){module.exports=f();}else if(typeof define==="function"&&define.amd){define([],f);}else{var g;if(typeof window!=="undefined"){g=window;}else if(typeof global!=="undefined"){g=global;}else if(typeof self!=="undefined"){g=self;}else{g=this;}g.Pict=f();}})(function(){var define,module,exports;return function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a;}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r);},p,p.exports,r,e,n,t);}return n[i].exports;}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o;}return r;}()({1:[function(require,module,exports){'use strict';var eachOfLimit=require('async.util.eachoflimit');var withoutIndex=require('async.util.withoutindex');module.exports=function eachLimit(arr,limit,iterator,cb){return eachOfLimit(limit)(arr,withoutIndex(iterator),cb);};},{"async.util.eachoflimit":3,"async.util.withoutindex":14}],2:[function(require,module,exports){'use strict';module.exports=function(tasks){function makeCallback(index){function fn(){if(tasks.length){tasks[index].apply(null,arguments);}return fn.next();}fn.next=function(){return index<tasks.length-1?makeCallback(index+1):null;};return fn;}return makeCallback(0);};},{}],3:[function(require,module,exports){var once=require('async.util.once');var noop=require('async.util.noop');var onlyOnce=require('async.util.onlyonce');var keyIterator=require('async.util.keyiterator');module.exports=function eachOfLimit(limit){return function(obj,iterator,cb){cb=once(cb||noop);obj=obj||[];var nextKey=keyIterator(obj);if(limit<=0){return cb(null);}var done=false;var running=0;var errored=false;(function replenish(){if(done&&running<=0){return cb(null);}while(running<limit&&!errored){var key=nextKey();if(key===null){done=true;if(running<=0){cb(null);}return;}running+=1;iterator(obj[key],key,onlyOnce(function(err){running-=1;if(err){cb(err);errored=true;}else{replenish();}}));}})();};};},{"async.util.keyiterator":7,"async.util.noop":9,"async.util.once":10,"async.util.onlyonce":11}],4:[function(require,module,exports){'use strict';var setImmediate=require('async.util.setimmediate');var restParam=require('async.util.restparam');module.exports=function(fn){return restParam(function(args){var callback=args.pop();args.push(function(){var innerArgs=arguments;if(sync){setImmediate(function(){callback.apply(null,innerArgs);});}else{callback.apply(null,innerArgs);}});var sync=true;fn.apply(this,args);sync=false;});};},{"async.util.restparam":12,"async.util.setimmediate":13}],5:[function(require,module,exports){'use strict';module.exports=Array.isArray||function isArray(obj){return Object.prototype.toString.call(obj)==='[object Array]';};},{}],6:[function(require,module,exports){'use strict';var isArray=require('async.util.isarray');module.exports=function isArrayLike(arr){return isArray(arr)||// has a positive integer length property
2
2
  typeof arr.length==='number'&&arr.length>=0&&arr.length%1===0;};},{"async.util.isarray":5}],7:[function(require,module,exports){'use strict';var _keys=require('async.util.keys');var isArrayLike=require('async.util.isarraylike');module.exports=function keyIterator(coll){var i=-1;var len;var keys;if(isArrayLike(coll)){len=coll.length;return function next(){i++;return i<len?i:null;};}else{keys=_keys(coll);len=keys.length;return function next(){i++;return i<len?keys[i]:null;};}};},{"async.util.isarraylike":6,"async.util.keys":8}],8:[function(require,module,exports){'use strict';module.exports=Object.keys||function keys(obj){var _keys=[];for(var k in obj){if(obj.hasOwnProperty(k)){_keys.push(k);}}return _keys;};},{}],9:[function(require,module,exports){'use strict';module.exports=function noop(){};},{}],10:[function(require,module,exports){'use strict';module.exports=function once(fn){return function(){if(fn===null)return;fn.apply(this,arguments);fn=null;};};},{}],11:[function(require,module,exports){'use strict';module.exports=function only_once(fn){return function(){if(fn===null)throw new Error('Callback was already called.');fn.apply(this,arguments);fn=null;};};},{}],12:[function(require,module,exports){'use strict';module.exports=function restParam(func,startIndex){startIndex=startIndex==null?func.length-1:+startIndex;return function(){var length=Math.max(arguments.length-startIndex,0);var rest=new Array(length);for(var index=0;index<length;index++){rest[index]=arguments[index+startIndex];}switch(startIndex){case 0:return func.call(this,rest);case 1:return func.call(this,arguments[0],rest);}};};},{}],13:[function(require,module,exports){(function(setImmediate){(function(){'use strict';var _setImmediate=typeof setImmediate==='function'&&setImmediate;var fallback=function fallback(fn){setTimeout(fn,0);};module.exports=function setImmediate(fn){// not a direct alias for IE10 compatibility
3
3
  return(_setImmediate||fallback)(fn);};}).call(this);}).call(this,require("timers").setImmediate);},{"timers":178}],14:[function(require,module,exports){'use strict';module.exports=function withoutIndex(iterator){return function(value,index,callback){return iterator(value,callback);};};},{}],15:[function(require,module,exports){'use strict';var once=require('async.util.once');var noop=require('async.util.noop');var isArray=require('async.util.isarray');var restParam=require('async.util.restparam');var ensureAsync=require('async.util.ensureasync');var iterator=require('async.iterator');module.exports=function(tasks,cb){cb=once(cb||noop);if(!isArray(tasks))return cb(new Error('First argument to waterfall must be an array of functions'));if(!tasks.length)return cb();function wrapIterator(iterator){return restParam(function(err,args){if(err){cb.apply(null,[err].concat(args));}else{var next=iterator.next();if(next){args.push(wrapIterator(next));}else{args.push(cb);}ensureAsync(iterator).apply(null,args);}});}wrapIterator(iterator(tasks))();};},{"async.iterator":2,"async.util.ensureasync":4,"async.util.isarray":5,"async.util.noop":9,"async.util.once":10,"async.util.restparam":12}],16:[function(require,module,exports){'use strict';exports.byteLength=byteLength;exports.toByteArray=toByteArray;exports.fromByteArray=fromByteArray;var lookup=[];var revLookup=[];var Arr=typeof Uint8Array!=='undefined'?Uint8Array:Array;var code='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';for(var i=0,len=code.length;i<len;++i){lookup[i]=code[i];revLookup[code.charCodeAt(i)]=i;}// Support decoding URL-safe base64 strings, as Node.js does.
4
4
  // See: https://en.wikipedia.org/wiki/Base64#URL_applications
@@ -2915,28 +2915,30 @@ AutoInitialize:true,AutoInitializeOrdinal:0,AutoSolveWithApp:true,AutoSolveOrdin
2915
2915
  var tmpOptions=Object.assign({},JSON.parse(JSON.stringify(defaultPictProviderSettings)),pOptions);_this58=_callSuper(this,PictProvider,[pFable,tmpOptions,pServiceHash]);if(!_this58.options.ProviderIdentifier){_this58.options.ProviderIdentifier="AutoProviderID-".concat(_this58.fable.getUUID());}_this58.serviceType='PictProvider';/** @type {Object} */_this58._Package=libPackage;// Convenience and consistency naming
2916
2916
  _this58.pict=_this58.fable;// Wire in the essential Pict application state
2917
2917
  _this58.AppData=_this58.pict.AppData;_this58.initializeTimestamp=false;_this58.lastSolvedTimestamp=false;for(var i=0;i<_this58.options.Templates.length;i++){var tmpDefaultTemplate=_this58.options.Templates[i];if(!tmpDefaultTemplate.hasOwnProperty('Postfix')||!tmpDefaultTemplate.hasOwnProperty('Template')){_this58.log.error("PictProvider [".concat(_this58.UUID,"]::[").concat(_this58.Hash,"] ").concat(_this58.options.ProviderIdentifier," could not load Default Template ").concat(i," in the options array."),tmpDefaultTemplate);}else{if(!tmpDefaultTemplate.Source){tmpDefaultTemplate.Source="PictProvider [".concat(_this58.UUID,"]::[").concat(_this58.Hash,"] ").concat(_this58.options.ProviderIdentifier," options object.");}_this58.pict.TemplateProvider.addDefaultTemplate(tmpDefaultTemplate.Prefix,tmpDefaultTemplate.Postfix,tmpDefaultTemplate.Template,tmpDefaultTemplate.Source);}}return _this58;}/* -------------------------------------------------------------------------- *//* Code Section: Initialization *//* -------------------------------------------------------------------------- */_inherits(PictProvider,_libFableServiceBase15);return _createClass2(PictProvider,[{key:"onBeforeInitialize",value:function onBeforeInitialize(){if(this.pict.LogNoisiness>3){this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onBeforeInitialize:"));}return true;}},{key:"onBeforeInitializeAsync",value:function onBeforeInitializeAsync(fCallback){this.onBeforeInitialize();return fCallback();}},{key:"onInitialize",value:function onInitialize(){if(this.pict.LogNoisiness>3){this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onInitialize:"));}return true;}},{key:"onInitializeAsync",value:function onInitializeAsync(fCallback){this.onInitialize();return fCallback();}},{key:"initialize",value:function initialize(){if(this.pict.LogControlFlow){this.log.trace("PICT-ControlFlow PROVIDER [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialize:"));}if(!this.initializeTimestamp){this.onBeforeInitialize();this.onInitialize();this.onAfterInitialize();this.initializeTimestamp=this.pict.log.getTimeStamp();return true;}else{this.log.warn("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initialize called but initialization is already completed. Aborting."));return false;}}},{key:"initializeAsync",value:function initializeAsync(fCallback){var _this59=this;if(this.pict.LogControlFlow){this.log.trace("PICT-ControlFlow PROVIDER [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," initializeAsync:"));}if(!this.initializeTimestamp){var tmpAnticipate=this.pict.instantiateServiceProviderWithoutRegistration('Anticipate');if(this.pict.LogNoisiness>0){this.log.info("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," beginning initialization..."));}tmpAnticipate.anticipate(this.onBeforeInitializeAsync.bind(this));tmpAnticipate.anticipate(this.onInitializeAsync.bind(this));tmpAnticipate.anticipate(this.onAfterInitializeAsync.bind(this));tmpAnticipate.wait(function(pError){_this59.initializeTimestamp=_this59.pict.log.getTimeStamp();if(_this59.pict.LogNoisiness>0){_this59.log.info("PictProvider [".concat(_this59.UUID,"]::[").concat(_this59.Hash,"] ").concat(_this59.options.ProviderIdentifier," initialization complete."));}return fCallback();});}else{this.log.warn("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," async initialize called but initialization is already completed. Aborting."));// TODO: Should this be an error?
2918
- return fCallback();}}},{key:"onAfterInitialize",value:function onAfterInitialize(){if(this.pict.LogNoisiness>3){this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onAfterInitialize:"));}return true;}},{key:"onAfterInitializeAsync",value:function onAfterInitializeAsync(fCallback){this.onAfterInitialize();return fCallback();}},{key:"onPreRender",value:function onPreRender(){if(this.pict.LogNoisiness>3){this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onPreRender:"));}return true;}},{key:"onPreRenderAsync",value:function onPreRenderAsync(fCallback){this.onPreRender();return fCallback();}},{key:"render",value:function render(){return this.onPreRender();}},{key:"renderAsync",value:function renderAsync(fCallback){this.onPreRender();return fCallback();}},{key:"onPreSolve",value:function onPreSolve(){if(this.pict.LogNoisiness>3){this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onPreSolve:"));}return true;}},{key:"onPreSolveAsync",value:function onPreSolveAsync(fCallback){this.onPreSolve();return fCallback();}},{key:"solve",value:function solve(){return this.onPreSolve();}},{key:"solveAsync",value:function solveAsync(fCallback){this.onPreSolve();return fCallback();}}]);}(libFableServiceBase);module.exports=PictProvider;},{"../package.json":132,"fable-serviceproviderbase":59}],134:[function(require,module,exports){module.exports={"name":"pict-template","version":"1.0.7","description":"Pict Template Base Class","main":"source/Pict-Template.js","scripts":{"start":"node source/Pict-Template.js","test":"npx mocha -u tdd -R spec","tests":"npx mocha -u tdd --exit -R spec --grep","coverage":"npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec","build":"npx quack build","types":"npx tsc -p . --declaration --allowJs --emitDeclarationOnly --outDir types"},"types":"types/Pict.Template.d.ts","repository":{"type":"git","url":"git+https://github.com/stevenvelozo/pict-view.git"},"author":"steven velozo <steven@velozo.com>","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/pict-view/issues"},"homepage":"https://github.com/stevenvelozo/pict-view#readme","devDependencies":{"pict":"^1.0.215","quackage":"^1.0.33","typescript":"^5.6.2"},"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"]},"dependencies":{"fable-serviceproviderbase":"^3.0.15"}};},{}],135:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');var libPackage=require('../package.json');/**
2918
+ return fCallback();}}},{key:"onAfterInitialize",value:function onAfterInitialize(){if(this.pict.LogNoisiness>3){this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onAfterInitialize:"));}return true;}},{key:"onAfterInitializeAsync",value:function onAfterInitializeAsync(fCallback){this.onAfterInitialize();return fCallback();}},{key:"onPreRender",value:function onPreRender(){if(this.pict.LogNoisiness>3){this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onPreRender:"));}return true;}},{key:"onPreRenderAsync",value:function onPreRenderAsync(fCallback){this.onPreRender();return fCallback();}},{key:"render",value:function render(){return this.onPreRender();}},{key:"renderAsync",value:function renderAsync(fCallback){this.onPreRender();return fCallback();}},{key:"onPreSolve",value:function onPreSolve(){if(this.pict.LogNoisiness>3){this.log.trace("PictProvider [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ProviderIdentifier," onPreSolve:"));}return true;}},{key:"onPreSolveAsync",value:function onPreSolveAsync(fCallback){this.onPreSolve();return fCallback();}},{key:"solve",value:function solve(){return this.onPreSolve();}},{key:"solveAsync",value:function solveAsync(fCallback){this.onPreSolve();return fCallback();}}]);}(libFableServiceBase);module.exports=PictProvider;},{"../package.json":132,"fable-serviceproviderbase":59}],134:[function(require,module,exports){module.exports={"name":"pict-template","version":"1.0.10","description":"Pict Template Base Class","main":"source/Pict-Template.js","scripts":{"start":"node source/Pict-Template.js","test":"npx mocha -u tdd -R spec","tests":"npx mocha -u tdd --exit -R spec --grep","coverage":"npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec","build":"npx quack build","types":"tsc -p ."},"types":"types/source/Pict-Template.d.ts","repository":{"type":"git","url":"git+https://github.com/stevenvelozo/pict-view.git"},"author":"steven velozo <steven@velozo.com>","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/pict-view/issues"},"homepage":"https://github.com/stevenvelozo/pict-view#readme","devDependencies":{"pict":"^1.0.227","quackage":"^1.0.36","typescript":"^5.7.2"},"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"]},"dependencies":{"fable-serviceproviderbase":"^3.0.15"}};},{}],135:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');var libPackage=require('../package.json');/** @typedef {import('pict') & {
2919
+ * [key: string]: any, // represent services for now as a workaround
2920
+ * }} Pict *//**
2919
2921
  * @class PictTemplateExpression
2920
2922
  * @classdesc The PictTemplateExpression class is a service provider for the pict anti-framework that provides template rendering services.
2921
2923
  */var PictTemplateExpression=/*#__PURE__*/function(_libFableServiceBase16){/**
2922
- * @param {Object} pFable - The Fable Framework instance
2923
- * @param {Object} pOptions - The options for the service
2924
- * @param {String} pServiceHash - The hash of the service
2925
- */function PictTemplateExpression(pFable,pOptions,pServiceHash){var _this60;_classCallCheck2(this,PictTemplateExpression);_this60=_callSuper(this,PictTemplateExpression,[pFable,pOptions,pServiceHash]);/** @type {import('pict')} */_this60.fable;_this60.pict=_this60.fable;_this60.serviceType='PictTemplate';/** @type {Object} */_this60._Package=libPackage;return _this60;}/**
2924
+ * @param {Pict} pFable - The Fable Framework instance
2925
+ * @param {any} [pOptions] - The options for the service
2926
+ * @param {String} [pServiceHash] - The hash of the service
2927
+ */function PictTemplateExpression(pFable,pOptions,pServiceHash){var _this60;_classCallCheck2(this,PictTemplateExpression);_this60=_callSuper(this,PictTemplateExpression,[pFable,pOptions,pServiceHash]);/** @type {Pict} */_this60.fable;/** @type {Pict} */_this60.pict=_this60.fable;_this60.serviceType='PictTemplate';/** @type {Object} */_this60._Package=libPackage;return _this60;}/**
2926
2928
  * Render a template expression, returning a string with the resulting content.
2927
2929
  *
2928
2930
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
2929
- * @param {object} pRecord - The json object to be used as the Record for the template render
2930
- * @param {array} pContextArray - An array of context objects accessible from the template; safe to leave empty
2931
+ * @param {any} pRecord - The json object to be used as the Record for the template render
2932
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
2931
2933
  *
2932
2934
  * @return {string} The rendered template
2933
2935
  */_inherits(PictTemplateExpression,_libFableServiceBase16);return _createClass2(PictTemplateExpression,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){return'';}/**
2934
2936
  * Render a template expression, deliver a string with the resulting content to a callback function.
2935
2937
  *
2936
2938
  * @param {string} pTemplateHash - The hash contents of the template (what's between the template start and stop tags)
2937
- * @param {object} pRecord - The json object to be used as the Record for the template render
2938
- * @param {array} pContextArray - An array of context objects accessible from the template; safe to leave empty
2939
- * @param {(error: Error?, content: String?) => void} fCallback - callback function invoked with the rendered template, or an error
2939
+ * @param {any} pRecord - The json object to be used as the Record for the template render
2940
+ * @param {Array<any>} pContextArray - An array of context objects accessible from the template; safe to leave empty
2941
+ * @param {(error?: Error, content?: String) => void} fCallback - callback function invoked with the rendered template, or an error
2940
2942
  *
2941
2943
  * @return {void}
2942
2944
  */},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){return fCallback(null,this.render(pTemplateHash,pRecord,pContextArray));}/**
@@ -2950,23 +2952,26 @@ return fCallback();}}},{key:"onAfterInitialize",value:function onAfterInitialize
2950
2952
  * Read a value from a nested object using a dot notation string.
2951
2953
  *
2952
2954
  * @param {string} pAddress - The address to resolve
2953
- * @param {object} pRecord - The record to resolve
2955
+ * @param {any} pRecord - The record to resolve
2954
2956
  * @param {Array<any>} pContextArray - The context array to resolve (optional)
2955
- * @param {object} pRootDataObject - The root data object to resolve (optional)
2957
+ * @param {any} pRootDataObject - The root data object to resolve (optional)
2956
2958
  *
2957
2959
  * @return {any} The value at the given address, or undefined
2958
- */},{key:"resolveStateFromAddress",value:function resolveStateFromAddress(pAddress,pRecord,pContextArray,pRootDataObject){var tmpContextArray=Array.isArray(pContextArray)?pContextArray:[this.pict];var tmpRootDataObject=_typeof(pRootDataObject)==='object'?pRootDataObject:{};tmpRootDataObject.Pict=this.pict;tmpRootDataObject.AppData=this.pict.AppData;tmpRootDataObject.Bundle=this.pict.Bundle;tmpRootDataObject.Context=tmpContextArray;tmpRootDataObject.Record=pRecord;return this.pict.manifest.getValueByHash(tmpRootDataObject,pAddress);}}]);}(libFableServiceBase);module.exports=PictTemplateExpression;module.exports.template_hash='Default';},{"../package.json":134,"fable-serviceproviderbase":59}],136:[function(require,module,exports){module.exports={"name":"pict-view","version":"1.0.56","description":"Pict View Base Class","main":"source/Pict-View.js","scripts":{"test":"./node_modules/.bin/mocha -u tdd -R spec","start":"node source/Pict-View.js","coverage":"./node_modules/.bin/nyc --reporter=lcov --reporter=text-lcov ./node_modules/mocha/bin/_mocha -- -u tdd -R spec","build":"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-view-image:local","docker-dev-run":"docker run -it -d --name pict-view-dev -p 30001:8080 -p 38086:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/pict-view\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" pict-view-image:local","docker-dev-shell":"docker exec -it pict-view-dev /bin/bash","types":"npx -p typescript tsc -p . --outDir types"},"types":"types/Pict-View.d.ts","repository":{"type":"git","url":"git+https://github.com/stevenvelozo/pict-view.git"},"author":"steven velozo <steven@velozo.com>","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/pict-view/issues"},"homepage":"https://github.com/stevenvelozo/pict-view#readme","devDependencies":{"browser-env":"^3.3.0","pict":"^1.0.226","quackage":"^1.0.36","typescript":"^5.7.2"},"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"]},"dependencies":{"fable":"^3.0.146","fable-serviceproviderbase":"^3.0.15"}};},{}],137:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');var libPackage=require('../package.json');var defaultPictViewSettings={DefaultRenderable:false,DefaultDestinationAddress:false,DefaultTemplateRecordAddress:false,ViewIdentifier:false,// If this is set to true, when the App initializes this will.
2960
+ */},{key:"resolveStateFromAddress",value:function resolveStateFromAddress(pAddress,pRecord,pContextArray,pRootDataObject){var tmpContextArray=Array.isArray(pContextArray)?pContextArray:[this.pict];var tmpRootDataObject=_typeof(pRootDataObject)==='object'?pRootDataObject:{};tmpRootDataObject.Pict=this.pict;tmpRootDataObject.AppData=this.pict.AppData;tmpRootDataObject.Bundle=this.pict.Bundle;tmpRootDataObject.Context=tmpContextArray;tmpRootDataObject.Record=pRecord;return this.pict.manifest.getValueByHash(tmpRootDataObject,pAddress);}}]);}(libFableServiceBase);module.exports=PictTemplateExpression;module.exports.template_hash='Default';},{"../package.json":134,"fable-serviceproviderbase":59}],136:[function(require,module,exports){module.exports={"name":"pict-view","version":"1.0.58","description":"Pict View Base Class","main":"source/Pict-View.js","scripts":{"test":"./node_modules/.bin/mocha -u tdd -R spec","start":"node source/Pict-View.js","coverage":"./node_modules/.bin/nyc --reporter=lcov --reporter=text-lcov ./node_modules/mocha/bin/_mocha -- -u tdd -R spec","build":"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-view-image:local","docker-dev-run":"docker run -it -d --name pict-view-dev -p 30001:8080 -p 38086:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/pict-view\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" pict-view-image:local","docker-dev-shell":"docker exec -it pict-view-dev /bin/bash","types":"tsc -p .","lint":"eslint source/**"},"types":"types/source/Pict-View.d.ts","repository":{"type":"git","url":"git+https://github.com/stevenvelozo/pict-view.git"},"author":"steven velozo <steven@velozo.com>","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/pict-view/issues"},"homepage":"https://github.com/stevenvelozo/pict-view#readme","devDependencies":{"@eslint/js":"^9.17.0","browser-env":"^3.3.0","eslint":"^9.17.0","pict":"^1.0.227","quackage":"^1.0.36","typescript":"^5.7.2"},"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"]},"dependencies":{"fable":"^3.0.146","fable-serviceproviderbase":"^3.0.15"}};},{}],137:[function(require,module,exports){var libFableServiceBase=require('fable-serviceproviderbase');var libPackage=require('../package.json');var defaultPictViewSettings={DefaultRenderable:false,DefaultDestinationAddress:false,DefaultTemplateRecordAddress:false,ViewIdentifier:false,// If this is set to true, when the App initializes this will.
2959
2961
  // After the App initializes, initialize will be called as soon as it's added.
2960
2962
  AutoInitialize:true,AutoInitializeOrdinal:0,// If this is set to true, when the App autorenders (on load) this will.
2961
2963
  // After the App initializes, render will be called as soon as it's added.
2962
2964
  AutoRender:true,AutoRenderOrdinal:0,AutoSolveWithApp:true,AutoSolveOrdinal:0,CSSHash:false,CSS:false,CSSProvider:false,CSSPriority:500,Templates:[],DefaultTemplates:[],Renderables:[],Manifests:{}};/** @typedef {(error?: Error) => void} ErrorCallback *//** @typedef {number | boolean} PictTimestamp *//**
2965
+ * @typedef {'replace' | 'append' | 'prepend' | 'append_once'} RenderMethod
2966
+ *//**
2963
2967
  * @typedef {Object} Renderable
2964
2968
  *
2965
2969
  * @property {string} RenderableHash - A unique hash for the renderable.
2966
2970
  * @property {string} TemplateHash] - The hash of the template to use for rendering this renderable.
2967
2971
  * @property {string} [DefaultTemplateRecordAddress] - The default address for resolving the data record for this renderable.
2968
2972
  * @property {string} [ContentDestinationAddress] - The default address (DOM CSS selector) for rendering the content of this renderable.
2969
- * @property {string} [RenderMethod] - The method to use when projecting the renderable to the DOM ('replace', 'append', 'prepend', 'append_once').
2973
+ * @property {RenderMethod} [RenderMethod=replace] - The method to use when projecting the renderable to the DOM ('replace', 'append', 'prepend', 'append_once').
2974
+ * @property {string} [TestAddress] - The address to use for testing the renderable.
2970
2975
  *//**
2971
2976
  * Represents a view in the Pict ecosystem.
2972
2977
  */var PictView=/*#__PURE__*/function(_libFableServiceBase17){/**
@@ -2994,10 +2999,10 @@ if(_this61.options.CSS){var tmpCSSHash=_this61.options.CSSHash?_this61.options.C
2994
2999
  * @param {string} [pTemplateHash] - (optional) The hash of the template for the renderable.
2995
3000
  * @param {string} [pDefaultTemplateRecordAddress] - (optional) The default data address for the template.
2996
3001
  * @param {string} [pDefaultDestinationAddress] - (optional) The default destination address for the renderable.
2997
- * @param {string} [pRenderMethod] - (optional) The method to use when rendering the renderable (ex. 'replace').
3002
+ * @param {RenderMethod} [pRenderMethod=replace] - (optional) The method to use when rendering the renderable (ex. 'replace').
2998
3003
  */_inherits(PictView,_libFableServiceBase17);return _createClass2(PictView,[{key:"addRenderable",value:function addRenderable(pRenderableHash,pTemplateHash,pDefaultTemplateRecordAddress,pDefaultDestinationAddress,pRenderMethod){/** @type {Renderable} */var tmpRenderable;if(_typeof(pRenderableHash)=='object'){// The developer passed in the renderable as an object.
2999
3004
  // Use theirs instead!
3000
- tmpRenderable=pRenderableHash;}else{var tmpRenderMethod=typeof pRenderMethod!=='string'?pRenderMethod:'replace';tmpRenderable={RenderableHash:pRenderableHash,TemplateHash:pTemplateHash,DefaultTemplateRecordAddress:pDefaultTemplateRecordAddress,ContentDestinationAddress:pDefaultDestinationAddress,RenderMethod:tmpRenderMethod};}if(typeof tmpRenderable.RenderableHash!='string'||typeof tmpRenderable.TemplateHash!='string'){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not load Renderable; RenderableHash or TemplateHash are invalid."),tmpRenderable);}else{if(this.pict.LogNoisiness>0){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," adding renderable [").concat(tmpRenderable.RenderableHash,"] pointed to template ").concat(tmpRenderable.TemplateHash,"."));}this.renderables[tmpRenderable.RenderableHash]=tmpRenderable;}}/* -------------------------------------------------------------------------- *//* Code Section: Initialization *//* -------------------------------------------------------------------------- *//**
3005
+ tmpRenderable=pRenderableHash;}else{/** @type {RenderMethod} */var tmpRenderMethod=typeof pRenderMethod!=='string'?pRenderMethod:'replace';tmpRenderable={RenderableHash:pRenderableHash,TemplateHash:pTemplateHash,DefaultTemplateRecordAddress:pDefaultTemplateRecordAddress,ContentDestinationAddress:pDefaultDestinationAddress,RenderMethod:tmpRenderMethod};}if(typeof tmpRenderable.RenderableHash!='string'||typeof tmpRenderable.TemplateHash!='string'){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not load Renderable; RenderableHash or TemplateHash are invalid."),tmpRenderable);}else{if(this.pict.LogNoisiness>0){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," adding renderable [").concat(tmpRenderable.RenderableHash,"] pointed to template ").concat(tmpRenderable.TemplateHash,"."));}this.renderables[tmpRenderable.RenderableHash]=tmpRenderable;}}/* -------------------------------------------------------------------------- *//* Code Section: Initialization *//* -------------------------------------------------------------------------- *//**
3001
3006
  * Lifecycle hook that triggers before the view is initialized.
3002
3007
  */},{key:"onBeforeInitialize",value:function onBeforeInitialize(){if(this.pict.LogNoisiness>3){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeInitialize:"));}return true;}/**
3003
3008
  * Lifecycle hook that triggers before the view is initialized (async flow).
@@ -3015,7 +3020,7 @@ tmpRenderable=pRenderableHash;}else{var tmpRenderMethod=typeof pRenderMethod!=='
3015
3020
  * Performs view initialization (async flow).
3016
3021
  *
3017
3022
  * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.
3018
- */},{key:"initializeAsync",value:function initializeAsync(fCallback){var _this62=this;if(this.pict.LogControlFlow){this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initializeAsync:"));}if(!this.initializeTimestamp){var tmpAnticipate=this.pict.instantiateServiceProviderWithoutRegistration('Anticipate');if(this.pict.LogNoisiness>0){this.log.info("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," beginning initialization..."));}tmpAnticipate.anticipate(this.onBeforeInitializeAsync.bind(this));tmpAnticipate.anticipate(this.onInitializeAsync.bind(this));tmpAnticipate.anticipate(this.onAfterInitializeAsync.bind(this));tmpAnticipate.wait(function(pError){_this62.initializeTimestamp=_this62.pict.log.getTimeStamp();if(_this62.pict.LogNoisiness>0){_this62.log.info("PictView [".concat(_this62.UUID,"]::[").concat(_this62.Hash,"] ").concat(_this62.options.ViewIdentifier," initialization complete."));}return fCallback();});}else{this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," async initialize called but initialization is already completed. Aborting."));// TODO: Should this be an error?
3023
+ */},{key:"initializeAsync",value:function initializeAsync(fCallback){var _this62=this;if(this.pict.LogControlFlow){this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," initializeAsync:"));}if(!this.initializeTimestamp){var tmpAnticipate=this.pict.instantiateServiceProviderWithoutRegistration('Anticipate');if(this.pict.LogNoisiness>0){this.log.info("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," beginning initialization..."));}tmpAnticipate.anticipate(this.onBeforeInitializeAsync.bind(this));tmpAnticipate.anticipate(this.onInitializeAsync.bind(this));tmpAnticipate.anticipate(this.onAfterInitializeAsync.bind(this));tmpAnticipate.wait(/** @param {Error} pError */function(pError){if(pError){_this62.log.error("PictView [".concat(_this62.UUID,"]::[").concat(_this62.Hash,"] ").concat(_this62.options.ViewIdentifier," initialization failed: ").concat(pError.message||pError),{stack:pError.stack});}_this62.initializeTimestamp=_this62.pict.log.getTimeStamp();if(_this62.pict.LogNoisiness>0){_this62.log.info("PictView [".concat(_this62.UUID,"]::[").concat(_this62.Hash,"] ").concat(_this62.options.ViewIdentifier," initialization complete."));}return fCallback();});}else{this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," async initialize called but initialization is already completed. Aborting."));// TODO: Should this be an error?
3019
3024
  return fCallback();}}},{key:"onAfterInitialize",value:function onAfterInitialize(){if(this.pict.LogNoisiness>3){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterInitialize:"));}return true;}/**
3020
3025
  * Lifecycle hook that triggers after the view is initialized (async flow).
3021
3026
  *
@@ -3023,9 +3028,9 @@ return fCallback();}}},{key:"onAfterInitialize",value:function onAfterInitialize
3023
3028
  */},{key:"onAfterInitializeAsync",value:function onAfterInitializeAsync(fCallback){this.onAfterInitialize();return fCallback();}/* -------------------------------------------------------------------------- *//* Code Section: Render *//* -------------------------------------------------------------------------- *//**
3024
3029
  * Lifecycle hook that triggers before the view is rendered.
3025
3030
  *
3026
- * @param {any} [pRenderable] - The renderable that will be rendered.
3027
- * @param {string} [pRenderDestinationAddress] - The address where the renderable will be rendered.
3028
- * @param {any} [pRecord] - The record (data) that will be used to render the renderable.
3031
+ * @param {Renderable} pRenderable - The renderable that will be rendered.
3032
+ * @param {string} pRenderDestinationAddress - The address where the renderable will be rendered.
3033
+ * @param {any} pRecord - The record (data) that will be used to render the renderable.
3029
3034
  */},{key:"onBeforeRender",value:function onBeforeRender(pRenderable,pRenderDestinationAddress,pRecord){// Overload this to mess with stuff before the content gets generated from the template
3030
3035
  if(this.pict.LogNoisiness>3){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onBeforeRender:"));}return true;}/**
3031
3036
  * Lifecycle hook that triggers before the view is rendered (async flow).
@@ -3033,17 +3038,17 @@ if(this.pict.LogNoisiness>3){this.log.trace("PictView [".concat(this.UUID,"]::["
3033
3038
  * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.
3034
3039
  */},{key:"onBeforeRenderAsync",value:function onBeforeRenderAsync(fCallback){return fCallback();}/**
3035
3040
  * Builds the render options for a renderable.
3036
- *
3041
+ *
3037
3042
  * For DRY purposes on the three flavors of render.
3038
- *
3039
- * @param {string} [pRenderableHash] - The hash of the renderable to render.
3040
- * @param {string} [pRenderDestinationAddress] - The address where the renderable will be rendered.
3041
- * @param {string|object} [pTemplateRecordAddress] - The address of (or actual obejct) where the data for the template is stored.
3042
- */},{key:"buildRenderOptions",value:function buildRenderOptions(pRenderableHash,pRenderDestinationAddress,pTemplateRecordAddress){var tmpRenderOptions={Valid:true};tmpRenderOptions.RenderableHash=typeof pRenderableHash==='string'?pRenderableHash:typeof this.options.DefaultRenderable=='string'?this.options.DefaultRenderable:false;if(!tmpRenderOptions.RenderableHash){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not find a suitable RenderableHash ").concat(tmpRenderOptions.RenderableHash," (param ").concat(pRenderableHash,"because it is not a valid renderable."));tmpRenderOptions.Valid=false;}tmpRenderOptions.Renderable=this.renderables[tmpRenderOptions.RenderableHash];if(!tmpRenderOptions.Renderable){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderOptions.RenderableHash," (param ").concat(pRenderableHash,") because it does not exist."));tmpRenderOptions.Valid=false;}tmpRenderOptions.DestinationAddress=typeof pRenderDestinationAddress==='string'?pRenderDestinationAddress:typeof tmpRenderOptions.Renderable.ContentDestinationAddress==='string'?tmpRenderOptions.Renderable.ContentDestinationAddress:typeof this.options.DefaultDestinationAddress==='string'?this.options.DefaultDestinationAddress:false;if(!tmpRenderOptions.DestinationAddress){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderOptions.RenderableHash," (param ").concat(pRenderableHash,") because it does not have a valid destination address (param ").concat(pRenderDestinationAddress,")."));tmpRenderOptions.Valid=false;}if(_typeof(pTemplateRecordAddress)==='object'){tmpRenderOptions.RecordAddress='Passed in as object';tmpRenderOptions.Record=pTemplateRecordAddress;}else{tmpRenderOptions.RecordAddress=typeof pTemplateRecordAddress==='string'?pTemplateRecordAddress:typeof tmpRenderOptions.Renderable.DefaultTemplateRecordAddress==='string'?tmpRenderOptions.Renderable.DefaultTemplateRecordAddress:typeof this.options.DefaultTemplateRecordAddress==='string'?this.options.DefaultTemplateRecordAddress:false;tmpRenderOptions.Record=typeof tmpRecordAddress==='string'?this.pict.DataProvider.getDataByAddress(tmpRecordAddress):undefined;}return tmpRenderOptions;}/**
3043
+ *
3044
+ * @param {string|ErrorCallback} [pRenderableHash] - The hash of the renderable to render.
3045
+ * @param {string|ErrorCallback} [pRenderDestinationAddress] - The address where the renderable will be rendered.
3046
+ * @param {string|object|ErrorCallback} [pTemplateRecordAddress] - The address of (or actual obejct) where the data for the template is stored.
3047
+ */},{key:"buildRenderOptions",value:function buildRenderOptions(pRenderableHash,pRenderDestinationAddress,pTemplateRecordAddress){var tmpRenderOptions={Valid:true};tmpRenderOptions.RenderableHash=typeof pRenderableHash==='string'?pRenderableHash:typeof this.options.DefaultRenderable=='string'?this.options.DefaultRenderable:false;if(!tmpRenderOptions.RenderableHash){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not find a suitable RenderableHash ").concat(tmpRenderOptions.RenderableHash," (param ").concat(pRenderableHash,"because it is not a valid renderable."));tmpRenderOptions.Valid=false;}tmpRenderOptions.Renderable=this.renderables[tmpRenderOptions.RenderableHash];if(!tmpRenderOptions.Renderable){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderOptions.RenderableHash," (param ").concat(pRenderableHash,") because it does not exist."));tmpRenderOptions.Valid=false;}tmpRenderOptions.DestinationAddress=typeof pRenderDestinationAddress==='string'?pRenderDestinationAddress:typeof tmpRenderOptions.Renderable.ContentDestinationAddress==='string'?tmpRenderOptions.Renderable.ContentDestinationAddress:typeof this.options.DefaultDestinationAddress==='string'?this.options.DefaultDestinationAddress:false;if(!tmpRenderOptions.DestinationAddress){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderOptions.RenderableHash," (param ").concat(pRenderableHash,") because it does not have a valid destination address (param ").concat(pRenderDestinationAddress,")."));tmpRenderOptions.Valid=false;}if(_typeof(pTemplateRecordAddress)==='object'){tmpRenderOptions.RecordAddress='Passed in as object';tmpRenderOptions.Record=pTemplateRecordAddress;}else{tmpRenderOptions.RecordAddress=typeof pTemplateRecordAddress==='string'?pTemplateRecordAddress:typeof tmpRenderOptions.Renderable.DefaultTemplateRecordAddress==='string'?tmpRenderOptions.Renderable.DefaultTemplateRecordAddress:typeof this.options.DefaultTemplateRecordAddress==='string'?this.options.DefaultTemplateRecordAddress:false;tmpRenderOptions.Record=typeof tmpRenderOptions.RecordAddress==='string'?this.pict.DataProvider.getDataByAddress(tmpRenderOptions.RecordAddress):undefined;}return tmpRenderOptions;}/**
3043
3048
  * Assigns the content to the destination address.
3044
- *
3049
+ *
3045
3050
  * For DRY purposes on the three flavors of render.
3046
- *
3051
+ *
3047
3052
  * @param {Renderable} pRenderable - The renderable to render.
3048
3053
  * @param {string} pRenderDestinationAddress - The address where the renderable will be rendered.
3049
3054
  * @param {string} pContent - The content to render.
@@ -3054,7 +3059,8 @@ if(this.pict.LogNoisiness>3){this.log.trace("PictView [".concat(this.UUID,"]::["
3054
3059
  *
3055
3060
  * @param {string} [pRenderable] - The hash of the renderable to render.
3056
3061
  * @param {string} [pRenderDestinationAddress] - The address where the renderable will be rendered.
3057
- * @param {string} [pTemplateRecordAddress] - The address where the data for the template is stored.
3062
+ * @param {string|object} [pTemplateRecordAddress] - The address where the data for the template is stored.
3063
+ * @return {boolean}
3058
3064
  */},{key:"render",value:function render(pRenderable,pRenderDestinationAddress,pTemplateRecordAddress){var tmpRenderableHash=typeof pRenderable==='string'?pRenderable:typeof this.options.DefaultRenderable=='string'?this.options.DefaultRenderable:false;if(!tmpRenderableHash){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderableHash," (param ").concat(pRenderable,") because it is not a valid renderable."));return false;}var tmpRenderable=this.renderables[tmpRenderableHash];if(!tmpRenderable){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderableHash," (param ").concat(pRenderable,") because it does not exist."));return false;}var tmpRenderDestinationAddress=typeof pRenderDestinationAddress==='string'?pRenderDestinationAddress:typeof tmpRenderable.ContentDestinationAddress==='string'?tmpRenderable.ContentDestinationAddress:typeof this.options.DefaultDestinationAddress==='string'?this.options.DefaultDestinationAddress:false;if(!tmpRenderDestinationAddress){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderableHash," (param ").concat(pRenderable,") because it does not have a valid destination address."));return false;}var tmpRecordAddress;var tmpRecord;if(_typeof(pTemplateRecordAddress)==='object'){tmpRecord=pTemplateRecordAddress;tmpRecordAddress='Passed in as object';}else{tmpRecordAddress=typeof pTemplateRecordAddress==='string'?pTemplateRecordAddress:typeof tmpRenderable.DefaultTemplateRecordAddress==='string'?tmpRenderable.DefaultTemplateRecordAddress:typeof this.options.DefaultTemplateRecordAddress==='string'?this.options.DefaultTemplateRecordAddress:false;tmpRecord=typeof tmpRecordAddress==='string'?this.pict.DataProvider.getDataByAddress(tmpRecordAddress):undefined;}// Execute the developer-overridable pre-render behavior
3059
3065
  this.onBeforeRender(tmpRenderable,tmpRenderDestinationAddress,tmpRecord);if(this.pict.LogControlFlow){this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(tmpRenderableHash,"] Destination[").concat(tmpRenderDestinationAddress,"] TemplateRecordAddress[").concat(tmpRecordAddress,"] render:"));}if(this.pict.LogNoisiness>0){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Render of Renderable[").concat(tmpRenderableHash,"] to Destination [").concat(tmpRenderDestinationAddress,"]..."));}// Generate the content output from the template and data
3060
3066
  var tmpContent=this.pict.parseTemplateByHash(tmpRenderable.TemplateHash,tmpRecord,null,[this]);if(this.pict.LogNoisiness>0){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Assigning Renderable[").concat(tmpRenderableHash,"] content length ").concat(tmpContent.length," to Destination [").concat(tmpRenderDestinationAddress,"] using render method [").concat(tmpRenderable.RenderMethod,"]."));}// Assign the content to the destination address
@@ -3062,10 +3068,12 @@ this.pict.ContentAssignment.projectContent(tmpRenderable.RenderMethod,tmpRenderD
3062
3068
  this.onAfterRender(tmpRenderable,tmpRenderDestinationAddress,tmpRecord,tmpContent);this.lastRenderedTimestamp=this.pict.log.getTimeStamp();return true;}/**
3063
3069
  * Render a renderable from this view.
3064
3070
  *
3065
- * @param {string | ErrorCallback} [pRenderableHash] - The hash of the renderable to render.
3066
- * @param {string | ErrorCallback} [pRenderDestinationAddress] - The address where the renderable will be rendered.
3067
- * @param {string | ErrorCallback} [pTemplateRecordAddress] - The address where the data for the template is stored.
3071
+ * @param {string|ErrorCallback} [pRenderableHash] - The hash of the renderable to render.
3072
+ * @param {string|ErrorCallback} [pRenderDestinationAddress] - The address where the renderable will be rendered.
3073
+ * @param {string|object|ErrorCallback} [pTemplateRecordAddress] - The address where the data for the template is stored.
3068
3074
  * @param {ErrorCallback} [fCallback] - The callback to call when the async operation is complete.
3075
+ *
3076
+ * @return {void}
3069
3077
  */},{key:"renderAsync",value:function renderAsync(pRenderableHash,pRenderDestinationAddress,pTemplateRecordAddress,fCallback){var _this63=this;var tmpRenderableHash=typeof pRenderableHash==='string'?pRenderableHash:typeof this.options.DefaultRenderable=='string'?this.options.DefaultRenderable:false;// Allow the callback to be passed in as the last parameter no matter what
3070
3078
  var tmpCallback=typeof fCallback==='function'?fCallback:typeof pTemplateRecordAddress==='function'?pTemplateRecordAddress:typeof pRenderDestinationAddress==='function'?pRenderDestinationAddress:typeof pRenderableHash==='function'?pRenderableHash:false;if(!tmpCallback){this.log.warn("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.Name," renderAsync was called without a valid callback. A callback will be generated but this could lead to race conditions."));tmpCallback=function tmpCallback(pError){if(pError){_this63.log.error("PictView [".concat(_this63.UUID,"]::[").concat(_this63.Hash,"] ").concat(_this63.options.Name," renderAsync Auto Callback Error: ").concat(pError),pError);}};}if(!tmpRenderableHash){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(tmpRenderableHash," (param ").concat(pRenderableHash,"because it is not a valid renderable."));return tmpCallback(Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not asynchronously render ").concat(tmpRenderableHash," (param ").concat(pRenderableHash,"because it is not a valid renderable.")));}var tmpRenderable=this.renderables[tmpRenderableHash];if(!tmpRenderable){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderableHash," (param ").concat(pRenderableHash,") because it does not exist."));return tmpCallback(Error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderableHash," (param ").concat(pRenderableHash,") because it does not exist.")));}var tmpRenderDestinationAddress=typeof pRenderDestinationAddress==='string'?pRenderDestinationAddress:typeof tmpRenderable.ContentDestinationAddress==='string'?tmpRenderable.ContentDestinationAddress:typeof this.options.DefaultDestinationAddress==='string'?this.options.DefaultDestinationAddress:false;if(!tmpRenderDestinationAddress){this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not render ").concat(tmpRenderableHash," (param ").concat(pRenderableHash,") because it does not have a valid destination address."));return tmpCallback(Error("Could not render ".concat(tmpRenderableHash)));}var tmpRecordAddress;var tmpRecord;if(_typeof(pTemplateRecordAddress)==='object'){tmpRecord=pTemplateRecordAddress;tmpRecordAddress='Passed in as object';}else{tmpRecordAddress=typeof pTemplateRecordAddress==='string'?pTemplateRecordAddress:typeof tmpRenderable.DefaultTemplateRecordAddress==='string'?tmpRenderable.DefaultTemplateRecordAddress:typeof this.options.DefaultTemplateRecordAddress==='string'?this.options.DefaultTemplateRecordAddress:false;tmpRecord=typeof tmpRecordAddress==='string'?this.pict.DataProvider.getDataByAddress(tmpRecordAddress):undefined;}if(this.pict.LogControlFlow){this.log.trace("PICT-ControlFlow VIEW [".concat(this.UUID,"]::[").concat(this.Hash,"] Renderable[").concat(tmpRenderableHash,"] Destination[").concat(tmpRenderDestinationAddress,"] TemplateRecordAddress[").concat(tmpRecordAddress,"] renderAsync:"));}if(this.pict.LogNoisiness>2){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," Beginning Asynchronous Render (callback-style)..."));}var tmpAnticipate=this.fable.newAnticipate();tmpAnticipate.anticipate(function(fOnBeforeRenderCallback){_this63.onBeforeRender(tmpRenderable,tmpRenderDestinationAddress,tmpRecord);_this63.onBeforeRenderAsync(fOnBeforeRenderCallback);});var tmpContent;tmpAnticipate.anticipate(function(fAsyncTemplateCallback){// Render the template (asynchronously)
3071
3079
  _this63.pict.parseTemplateByHash(tmpRenderable.TemplateHash,tmpRecord,function(pError,pContent){if(pError){_this63.log.error("PictView [".concat(_this63.UUID,"]::[").concat(_this63.Hash,"] ").concat(_this63.options.ViewIdentifier," could not render (asynchronously) ").concat(tmpRenderableHash," (param ").concat(pRenderableHash,") because it did not parse the template."),pError);return fAsyncTemplateCallback(pError);}tmpContent=pContent;if(_this63.pict.LogNoisiness>0){_this63.log.trace("PictView [".concat(_this63.UUID,"]::[").concat(_this63.Hash,"] ").concat(_this63.options.ViewIdentifier," Assigning Renderable[").concat(tmpRenderableHash,"] content length ").concat(pContent.length," to Destination [").concat(tmpRenderDestinationAddress,"] using Async render method ").concat(tmpRenderable.RenderMethod,"."));}_this63.pict.ContentAssignment.projectContent(tmpRenderable.RenderMethod,tmpRenderDestinationAddress,pContent,tmpRenderable.TestAddress);// Execute the developer-overridable asynchronous post-render behavior
@@ -3074,14 +3082,23 @@ _this63.lastRenderedTimestamp=_this63.pict.log.getTimeStamp();return fAsyncTempl
3074
3082
  *
3075
3083
  * @param {ErrorCallback} fCallback - The callback to call when the async operation is complete.
3076
3084
  */},{key:"renderDefaultAsync",value:function renderDefaultAsync(fCallback){// Render the default renderable
3077
- this.renderAsync(fCallback);}},{key:"basicRender",value:function basicRender(pRenderable,pRenderDestinationAddress,pTemplateRecordAddress){var tmpRenderOptions=this.buildRenderOptions(pRenderable,pRenderDestinationAddress,pTemplateRecordAddress);if(tmpRenderOptions.Valid){this.assignRenderContent(tmpRenderOptions.Renderable,tmpRenderOptions.DestinationAddress,this.pict.parseTemplateByHash(tmpRenderOptions.Renderable.TemplateHash,tmpRenderOptions.Record,null,[this]));return true;}else{this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(tmpRenderOptions.RenderableHash," because it is not valid."));return false;}}},{key:"basicRenderAsync",value:function basicRenderAsync(pRenderable,pRenderDestinationAddress,pTemplateRecordAddress,fCallback){var _this64=this;// Allow the callback to be passed in as the last parameter no matter what
3078
- var tmpCallback=typeof fCallback==='function'?fCallback:typeof pTemplateRecordAddress==='function'?pTemplateRecordAddress:typeof pRenderDestinationAddress==='function'?pRenderDestinationAddress:typeof pRenderable==='function'?pRenderable:false;var tmpRenderOptions=this.buildRenderOptions(pRenderable,pRenderDestinationAddress,pTemplateRecordAddress);if(tmpRenderOptions.Valid){this.pict.parseTemplateByHash(tmpRenderOptions.Renderable.TemplateHash,tmpRenderOptions.Record,function(pError,pContent){if(pError){_this64.log.error("PictView [".concat(_this64.UUID,"]::[").concat(_this64.Hash,"] ").concat(_this64.options.ViewIdentifier," could not render (asynchronously) ").concat(tmpRenderOptions.RenderableHash," because it did not parse the template."),pError);return tmpCallback(pError);}_this64.assignRenderContent(tmpRenderOptions.Renderable,tmpRenderOptions.DestinationAddress,pContent);return tmpCallback();},[this]);}else{var tmpErrorMessage="PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(tmpRenderOptions.RenderableHash," because it is not valid.");this.log.error(tmpErrorMessage);return tmpCallback(tmpErrorMessage);}}/**
3085
+ this.renderAsync(fCallback);}/**
3086
+ * @param {string} [pRenderableHash] - The hash of the renderable to render.
3087
+ * @param {string} [pRenderDestinationAddress] - The address where the renderable will be rendered.
3088
+ * @param {string|object} [pTemplateRecordAddress] - The address of (or actual obejct) where the data for the template is stored.
3089
+ */},{key:"basicRender",value:function basicRender(pRenderableHash,pRenderDestinationAddress,pTemplateRecordAddress){var tmpRenderOptions=this.buildRenderOptions(pRenderableHash,pRenderDestinationAddress,pTemplateRecordAddress);if(tmpRenderOptions.Valid){this.assignRenderContent(tmpRenderOptions.Renderable,tmpRenderOptions.DestinationAddress,this.pict.parseTemplateByHash(tmpRenderOptions.Renderable.TemplateHash,tmpRenderOptions.Record,null,[this]));return true;}else{this.log.error("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(tmpRenderOptions.RenderableHash," because it is not valid."));return false;}}/**
3090
+ * @param {string|ErrorCallback} [pRenderableHash] - The hash of the renderable to render.
3091
+ * @param {string|ErrorCallback} [pRenderDestinationAddress] - The address where the renderable will be rendered.
3092
+ * @param {string|object|ErrorCallback} [pTemplateRecordAddress] - The address of (or actual obejct) where the data for the template is stored.
3093
+ * @param {ErrorCallback} [fCallback] - The callback to call when the async operation is complete.
3094
+ */},{key:"basicRenderAsync",value:function basicRenderAsync(pRenderableHash,pRenderDestinationAddress,pTemplateRecordAddress,fCallback){var _this64=this;// Allow the callback to be passed in as the last parameter no matter what
3095
+ var tmpCallback=typeof fCallback==='function'?fCallback:typeof pTemplateRecordAddress==='function'?pTemplateRecordAddress:typeof pRenderDestinationAddress==='function'?pRenderDestinationAddress:typeof pRenderableHash==='function'?pRenderableHash:false;var tmpRenderOptions=this.buildRenderOptions(pRenderableHash,pRenderDestinationAddress,pTemplateRecordAddress);if(tmpRenderOptions.Valid){this.pict.parseTemplateByHash(tmpRenderOptions.Renderable.TemplateHash,tmpRenderOptions.Record,function(pError,pContent){if(pError){_this64.log.error("PictView [".concat(_this64.UUID,"]::[").concat(_this64.Hash,"] ").concat(_this64.options.ViewIdentifier," could not render (asynchronously) ").concat(tmpRenderOptions.RenderableHash," because it did not parse the template."),pError);return tmpCallback(pError);}_this64.assignRenderContent(tmpRenderOptions.Renderable,tmpRenderOptions.DestinationAddress,pContent);return tmpCallback();},[this]);}else{var tmpErrorMessage="PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," could not perform a basic render of ").concat(tmpRenderOptions.RenderableHash," because it is not valid.");this.log.error(tmpErrorMessage);return tmpCallback(tmpErrorMessage);}}/**
3079
3096
  * Lifecycle hook that triggers after the view is rendered.
3080
3097
  *
3081
- * @param {any} [pRenderable] - The renderable that was rendered.
3082
- * @param {string} [pRenderDestinationAddress] - The address where the renderable was rendered.
3083
- * @param {any} [pRecord] - The record (data) that was used by the renderable.
3084
- * @param {string} [pContent] - The content that was rendered.
3098
+ * @param {Renderable} pRenderable - The renderable that was rendered.
3099
+ * @param {string} pRenderDestinationAddress - The address where the renderable was rendered.
3100
+ * @param {any} pRecord - The record (data) that was used by the renderable.
3101
+ * @param {string} pContent - The content that was rendered.
3085
3102
  */},{key:"onAfterRender",value:function onAfterRender(pRenderable,pRenderDestinationAddress,pRecord,pContent){if(this.pict.LogNoisiness>3){this.log.trace("PictView [".concat(this.UUID,"]::[").concat(this.Hash,"] ").concat(this.options.ViewIdentifier," onAfterRender:"));}return true;}/**
3086
3103
  * Lifecycle hook that triggers after the view is rendered (async flow).
3087
3104
  *
@@ -4468,12 +4485,12 @@ try{if(!global.localStorage)return false;}catch(_){return false;}var val=global.
4468
4485
  // presumably different callback function.
4469
4486
  // This makes sure that own properties are retained, so that
4470
4487
  // decorations and such are not lost along the way.
4471
- 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;}}},{}],182:[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;}},{}],183:[function(require,module,exports){module.exports={"name":"pict","version":"1.0.226","description":"Pict browser library.","main":"source/Pict.js","scripts":{"start":"node source/Pict.js","test":"npx mocha -u tdd -R spec","tests":"npx mocha -u tdd --exit -R spec --grep","coverage":"npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec","build":"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-image:local","docker-dev-run":"docker run -it -d --name pict-dev -p 37447:8080 -p 19506:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/pict\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" pict-image:local","docker-dev-shell":"docker exec -it pict-dev /bin/bash","lint":"eslint source/**","types":"npx -p typescript tsc -p . --declaration --allowJs --emitDeclarationOnly --outDir types"},"types":"types/Pict.d.ts","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"]},"repository":{"type":"git","url":"git+https://stevenvelozo@github.com/stevenvelozo/pict.git"},"author":"steven velozo <steven@velozo.com>","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/pict/issues"},"homepage":"https://github.com/stevenvelozo/pict#readme","devDependencies":{"@eslint/js":"^9.17.0","eslint":"^9.17.0","globals":"^15.14.0","quackage":"^1.0.36"},"dependencies":{"cachetrax":"^1.0.4","fable":"^3.0.146","pict-application":"^1.0.23","pict-provider":"^1.0.3","pict-template":"^1.0.7","pict-view":"^1.0.56","typescript":"^5.7.2"}};},{}],184:[function(require,module,exports){// This assumes Pict has been required in the browser. Delcare these as globals so linter can do its job.
4488
+ 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;}}},{}],182:[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;}},{}],183:[function(require,module,exports){module.exports={"name":"pict","version":"1.0.228","description":"Pict browser library.","main":"source/Pict.js","scripts":{"start":"node source/Pict.js","test":"npx mocha -u tdd -R spec","tests":"npx mocha -u tdd --exit -R spec --grep","coverage":"npx nyc --reporter=lcov --reporter=text-lcov npx mocha -- -u tdd -R spec","build":"npx quack build","docker-dev-build":"docker build ./ -f Dockerfile_LUXURYCode -t pict-image:local","docker-dev-run":"docker run -it -d --name pict-dev -p 37447:8080 -p 19506:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/pict\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" pict-image:local","docker-dev-shell":"docker exec -it pict-dev /bin/bash","lint":"eslint source/**","types":"tsc -p ."},"types":"types/source/Pict.d.ts","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"]},"repository":{"type":"git","url":"git+https://stevenvelozo@github.com/stevenvelozo/pict.git"},"author":"steven velozo <steven@velozo.com>","license":"MIT","bugs":{"url":"https://github.com/stevenvelozo/pict/issues"},"homepage":"https://github.com/stevenvelozo/pict#readme","devDependencies":{"@eslint/js":"^9.17.0","@types/jquery":"^3.5.32","eslint":"^9.17.0","globals":"^15.14.0","quackage":"^1.0.36"},"dependencies":{"cachetrax":"^1.0.4","fable":"^3.0.146","pict-application":"^1.0.23","pict-provider":"^1.0.3","pict-template":"^1.0.7","pict-view":"^1.0.56","typescript":"^5.7.2"}};},{}],184:[function(require,module,exports){// This assumes Pict has been required in the browser. Delcare these as globals so linter can do its job.
4472
4489
  /* global Pict, _Pict: writeable *//**
4473
4490
  * Simple function to load a pict Application
4474
4491
  *
4475
- * @param {import('pict-application')} pPictApplication - The pict application to load.
4476
- * @param {number} pLogNoisiness - The log noisiness level.
4492
+ * @param {import('pict-application')} [pPictApplication] - The pict application to load.
4493
+ * @param {number} [pLogNoisiness] - The log noisiness level.
4477
4494
  */module.exports=function(pPictApplication,pLogNoisiness){var tmpLogNoisiness=typeof pLogNoisiness=='undefined'?0:pLogNoisiness;// Set up a basal pict on the window object
4478
4495
  if(pPictApplication&&'default_configuration'in pPictApplication&&'pict_configuration'in pPictApplication.default_configuration){window._Pict=new Pict(pPictApplication.default_configuration.pict_configuration);}else{window._Pict=new Pict();}window._Pict.LogNoisiness=tmpLogNoisiness;var tmpApplicationHash='DefaultApplication';var tmpDefaultConfiguration={};if('default_configuration'in pPictApplication){tmpDefaultConfiguration=pPictApplication.default_configuration;if('Hash'in pPictApplication.default_configuration){tmpDefaultConfiguration=pPictApplication.default_configuration;tmpApplicationHash=pPictApplication.default_configuration.Hash;}}_Pict.log.info("Loading the pict application [".concat(tmpApplicationHash,"] and associated views."));_Pict.addApplication(tmpApplicationHash,tmpDefaultConfiguration,pPictApplication);_Pict.PictApplication.initializeAsync(function(pError){if(pError){console.log('Error initializing the pict application: '+pError);}_Pict.log.info('Loading the Application and associated views.');});};},{}],185:[function(require,module,exports){/**
4479
4496
  * Provide a safe on document ready function (without needing a framework like jquery)
@@ -4481,9 +4498,9 @@ if(pPictApplication&&'default_configuration'in pPictApplication&&'pict_configura
4481
4498
  * @param {function} fCallback - The function to call when the document is ready
4482
4499
  */module.exports=function(fCallback){if(!document){console.log('No document object found; no initialization happening.');return;}// In case the document is already rendered
4483
4500
  if(document.readyState!='loading')fCallback();// Modern browsers have event listener capabilities
4484
- else if(document.addEventListener)document.addEventListener('DOMContentLoaded',fCallback);// IE <= 8 and ... other abominations
4501
+ else if(document.addEventListener)document.addEventListener('DOMContentLoaded',function(){fCallback();});//@ts-ignore IE <= 8 and ... other abominations
4485
4502
  else document.attachEvent('onreadystatechange',function(){if(document.readyState=='complete')fCallback();});};},{}],186:[function(require,module,exports){var libFableServiceBase=require('fable').ServiceProviderBase;var defaultConfiguration={// This is the address for the <script /> tag that contains the CSS.
4486
- CSSElementAddress:'#PICT-CSS'};var PictCSS=/*#__PURE__*/function(_libFableServiceBase18){function PictCSS(pFable,pOptions,pServiceHash){var _this68;_classCallCheck2(this,PictCSS);_this68=_callSuper(this,PictCSS,[pFable,pOptions,pServiceHash]);// No merging of options necessary
4503
+ CSSElementAddress:'#PICT-CSS'};var PictCSS=/*#__PURE__*/function(_libFableServiceBase18){function PictCSS(pFable,pOptions,pServiceHash){var _this68;_classCallCheck2(this,PictCSS);_this68=_callSuper(this,PictCSS,[pFable,pOptions,pServiceHash]);/** @type {any} */_this68.options;/** @type {{ ContentAssignment: import('./Pict-Content-Assignment') }} */_this68.services;// No merging of options necessary
4487
4504
  if(typeof _this68.options.CSSElementAddress==='undefined'){_this68.options.CSSElementAddress=defaultConfiguration.CSSElementAddress;}_this68.inlineCSSMap={};return _this68;}// Add a CSS fragment to the CSS map (each view can have its own CSS fragment)
4488
4505
  // Hash is shared across all views, so if 10 views all load the "My-Table-View" fragment, it will only be loaded once.
4489
4506
  _inherits(PictCSS,_libFableServiceBase18);return _createClass2(PictCSS,[{key:"addCSS",value:function addCSS(pHash,pContent,pPriority,pProvider){var tmpPriority=typeof pPriority!=='undefined'?pPriority:1000;var tmpProvidor=typeof pProvider==='string'?pProvider:'Unknown';this.inlineCSSMap[pHash]={Hash:pHash,Content:pContent,Provider:tmpProvidor,Priority:tmpPriority};}},{key:"removeCSS",value:function removeCSS(pHash){delete this.inlineCSSMap[pHash];}},{key:"generateCSS",value:function generateCSS(){var _this69=this;var tmpCSS='';var tmpCSSHashes=Object.keys(this.inlineCSSMap);// Sort the hashes by Priority
@@ -4491,10 +4508,10 @@ tmpCSSHashes.sort(function(a,b){return _this69.inlineCSSMap[a].Priority-_this69.
4491
4508
  },{key:"injectCSS",value:function injectCSS(){this.services.ContentAssignment.assignContent(this.options.CSSElementAddress,this.generateCSS());}}]);}(libFableServiceBase);module.exports=PictCSS;},{"fable":68}],187:[function(require,module,exports){var libFableServiceBase=require('fable').ServiceProviderBase;/**
4492
4509
  * Class for moving content around in the DOM.
4493
4510
  */var PictContentAssignment=/*#__PURE__*/function(_libFableServiceBase19){/**
4494
- * @param {object} pFable - The Fable library instance.
4495
- * @param {object} pOptions - The options for the service.
4496
- * @param {object} pServiceHash - The hash of services.
4497
- */function PictContentAssignment(pFable,pOptions,pServiceHash){var _this70;_classCallCheck2(this,PictContentAssignment);_this70=_callSuper(this,PictContentAssignment,[pFable,pOptions,pServiceHash]);_this70.serviceType='PictContentAssignment';// Check to see if we are running in a browser
4511
+ * @param {import('fable')} pFable - The Fable library instance.
4512
+ * @param {any} [pOptions] - The options for the service.
4513
+ * @param {string} [pServiceHash] - The hash of services.
4514
+ */function PictContentAssignment(pFable,pOptions,pServiceHash){var _this70;_classCallCheck2(this,PictContentAssignment);_this70=_callSuper(this,PictContentAssignment,[pFable,pOptions,pServiceHash]);/** @type {any} */_this70.log;_this70.serviceType='PictContentAssignment';// Check to see if we are running in a browser
4498
4515
  _this70.inBrowser=false;_this70.hasDocument=false;if((typeof window==="undefined"?"undefined":_typeof(window))=='object'){_this70.inBrowser=true;// Now check that the browser has a document object
4499
4516
  if(typeof window.document!='undefined'&&typeof window.document.querySelectorAll=='function'){_this70.hasDocument=true;}}// If we're in a browser, check to see if jQuery is available.
4500
4517
  _this70.hasJquery=false;_this70.jQuery=false;if(_this70.inBrowser&&typeof window.jQuery!=='undefined'){_this70.hasJquery=true;}/**
@@ -4503,46 +4520,51 @@ _this70.hasJquery=false;_this70.jQuery=false;if(_this70.inBrowser&&typeof window
4503
4520
  * @type {Function}
4504
4521
  * @param {string} pAddress - The address of the element. (a CSS selector)
4505
4522
  * @param {string} pContent - The content to set.
4506
- */_this70.customAssignFunction=false;/**
4523
+ */_this70.customAssignFunction=null;/**
4507
4524
  * Set this to override the default mechanism for prepend content to a DOM element.
4508
4525
  *
4509
4526
  * @type {Function}
4510
4527
  * @param {string} pAddress - The address of the element. (a CSS selector)
4511
4528
  * @param {string} pContent - The content to prepend.
4512
- */_this70.customPrependFunction=false;/**
4529
+ */_this70.customPrependFunction=null;/**
4513
4530
  * Set this to override the default mechanism for appending content to a DOM element.
4514
4531
  *
4515
4532
  * @type {Function}
4516
4533
  * @param {string} pAddress - The address of the element. (a CSS selector)
4517
4534
  * @param {string} pContent - The content to append.
4518
- */_this70.customAppendFunction=false;/**
4535
+ */_this70.customAppendFunction=null;/**
4519
4536
  * Set this to override the default mechanism for reading content from the DOM.
4520
4537
  *
4521
4538
  * @type {Function}
4522
4539
  * @param {string} pAddress - The address of the element. (a CSS selector)
4523
4540
  * @return {string} - The content of the element.
4524
- */_this70.customReadFunction=false;/**
4541
+ */_this70.customReadFunction=null;/**
4525
4542
  * Set this to override the default mechanism for getting elements.
4526
4543
  *
4527
4544
  * @type {Function}
4528
4545
  * @param {string} pAddress - The address of the element.
4529
4546
  * @return {Array<any>} - The matched elements.
4530
- */_this70.customGetElementFunction=false;// API Consumers can also craft their own attribute read function
4531
- _this70.customReadAttributeFunction=false;// API Consumers can also craft their own attribute set function
4532
- _this70.customSetAttributeFunction=false;// API Consumers can also craft their own attribute remove function
4533
- _this70.customRemoveAttributeFunction=false;// API Consumers can also craft their own class read function
4534
- _this70.customReadClassFunction=false;// API Consumers can also craft their own class set function
4535
- _this70.customSetClassFunction=false;// API Consumers can also craft their own class remove function
4536
- _this70.customRemoveClassFunction=false;return _this70;}/**
4547
+ */_this70.customGetElementFunction=null;// API Consumers can also craft their own attribute read function
4548
+ _this70.customReadAttributeFunction=null;// API Consumers can also craft their own attribute set function
4549
+ _this70.customSetAttributeFunction=null;// API Consumers can also craft their own attribute remove function
4550
+ _this70.customRemoveAttributeFunction=null;// API Consumers can also craft their own class read function
4551
+ _this70.customReadClassFunction=null;// API Consumers can also craft their own class set function
4552
+ _this70.customSetClassFunction=null;// API Consumers can also craft their own class remove function
4553
+ _this70.customRemoveClassFunction=null;return _this70;}/**
4537
4554
  * Get an element from the DOM.
4538
4555
  *
4539
4556
  * @param {string} pAddress - The address of the element.
4540
4557
  * @return {Array<any>} - The matched elements.
4541
- */_inherits(PictContentAssignment,_libFableServiceBase19);return _createClass2(PictContentAssignment,[{key:"getElement",value:function getElement(pAddress){if(this.customGetElementFunction){return this.customGetElementFunction(pAddress);}else if(this.hasJquery){var tmpElements=window.jQuery(pAddress);if(tmpElements.length==0){return[];}else{// TODO: This isn't the most efficient method, but it is the most compatible.
4542
- var tmpElementSet=[];for(var i=0;i<tmpElements.length;i++){tmpElementSet.push(tmpElements[i]);}return tmpElementSet;}}else if(this.inBrowser&&this.hasDocument){return window.document.querySelectorAll(pAddress);}else{// Just log it out for now
4543
- this.log.trace("PICT Content GET ELEMENT for [".concat(pAddress,"] will return empty because none of the browser methods are available"));return[];}}},{key:"assignContent",value:function assignContent(pAddress,pContent){if(this.customAssignFunction){return this.customAssignFunction(pAddress,pContent);}else if(this.hasJquery){// Get the element(s)
4544
- var tmpTargetElementSet=window.jQuery(pAddress);for(var i=0;i<tmpTargetElementSet.length;i++){switch(tmpTargetElementSet[i].tagName){case'INPUT':if(tmpTargetElementSet[i].type=='checkbox'){tmpTargetElementSet[i].checked=pContent;}case'SELECT':case'TEXTAREA':tmpTargetElementSet[i].value=pContent;break;case'SCRIPT':tmpTargetElementSet[i].text=pContent;break;default:tmpTargetElementSet[i].innerHTML=pContent;}}}else if(this.inBrowser&&this.hasDocument){// Get the element(s)
4545
- var _tmpTargetElementSet=window.document.querySelectorAll(pAddress);for(var _i56=0;_i56<_tmpTargetElementSet.length;_i56++){switch(_tmpTargetElementSet[_i56].tagName){case'INPUT':if(_tmpTargetElementSet[_i56].type=='checkbox'){_tmpTargetElementSet[_i56].checked=pContent;}case'SELECT':case'TEXTAREA':_tmpTargetElementSet[_i56].value=pContent;break;case'SCRIPT':_tmpTargetElementSet[_i56].text=pContent;break;default:_tmpTargetElementSet[_i56].innerHTML=pContent;}}}else{// Just log it out for now
4558
+ */_inherits(PictContentAssignment,_libFableServiceBase19);return _createClass2(PictContentAssignment,[{key:"getElement",value:function getElement(pAddress){if(this.customGetElementFunction){return this.customGetElementFunction(pAddress);}else if(this.hasJquery){var tmpElements=window.jQuery(pAddress);if(tmpElements.length==0){return[];}// TODO: This isn't the most efficient method, but it is the most compatible.
4559
+ var tmpElementSet=[];for(var i=0;i<tmpElements.length;i++){tmpElementSet.push(tmpElements[i]);}return tmpElementSet;}else if(this.inBrowser&&this.hasDocument){// convert from NodeList to Array for consistent return type
4560
+ var _tmpElements=window.document.querySelectorAll(pAddress);var _tmpElementSet=[];for(var _i56=0;_i56<_tmpElements.length;_i56++){_tmpElementSet.push(_tmpElements[_i56]);}return _tmpElementSet;}else{// Just log it out for now
4561
+ this.log.trace("PICT Content GET ELEMENT for [".concat(pAddress,"] will return empty because none of the browser methods are available"));return[];}}/**
4562
+ * @param {string} pAddress - The address of the element. (a CSS selector)
4563
+ * @param {string|boolean} pContent - The content to assign.
4564
+ * @return {void}
4565
+ */},{key:"assignContent",value:function assignContent(pAddress,pContent){if(this.customAssignFunction){return this.customAssignFunction(pAddress,pContent);}else if(this.hasJquery){// Get the element(s)
4566
+ var tmpTargetElementSet=window.jQuery(pAddress);for(var i=0;i<tmpTargetElementSet.length;i++){var tmpElement=tmpTargetElementSet[i];switch(tmpElement.tagName){case'INPUT':if(tmpElement instanceof HTMLInputElement&&tmpElement.type=='checkbox'){tmpElement.checked=Boolean(pContent);}/* falls through */case'SELECT':case'TEXTAREA':if(tmpElement instanceof HTMLInputElement||tmpElement instanceof HTMLSelectElement||tmpElement instanceof HTMLTextAreaElement){tmpElement.value=String(pContent);}break;case'SCRIPT':if(tmpElement instanceof HTMLScriptElement){tmpElement.text=String(pContent);}break;default:tmpElement.innerHTML=String(pContent);}}}else if(this.inBrowser&&this.hasDocument){// Get the element(s)
4567
+ var _tmpTargetElementSet=window.document.querySelectorAll(pAddress);for(var _i57=0;_i57<_tmpTargetElementSet.length;_i57++){var _tmpElement=_tmpTargetElementSet[_i57];switch(_tmpTargetElementSet[_i57].tagName){case'INPUT':if(_tmpElement instanceof HTMLInputElement&&_tmpElement.type=='checkbox'){_tmpElement.checked=Boolean(pContent);}/* falls through */case'SELECT':case'TEXTAREA':if(_tmpElement instanceof HTMLInputElement||_tmpElement instanceof HTMLSelectElement||_tmpElement instanceof HTMLTextAreaElement){_tmpElement.value=String(pContent);}break;case'SCRIPT':if(_tmpElement instanceof HTMLScriptElement){_tmpElement.text=String(pContent);}break;default:_tmpElement.innerHTML=String(pContent);}}}else{// Just log it out for now
4546
4568
  this.log.trace("PICT Content ASSIGN to [".concat(pAddress,"]:"),pContent);}}/**
4547
4569
  * Append content to an element.
4548
4570
  *
@@ -4562,34 +4584,34 @@ this.log.trace("PICT Content PREPEND in [".concat(pAddress,"]:"),pContent);}}/**
4562
4584
  * - prepend: Prepend the content to the destination address.
4563
4585
  * - append_once: Append the content to the destination address only if it doesn't already exist in the test address.
4564
4586
  * - replace: Replace the content of the destination address with the new content.
4565
- * @param {string} pRenderMethod
4566
- * @param {string} pDestinationAddress
4567
- * @param {string} pContent
4568
- * @param {string} pTestAddress
4587
+ * @param {string} pRenderMethod
4588
+ * @param {string} pDestinationAddress
4589
+ * @param {string} pContent
4590
+ * @param {string} pTestAddress
4569
4591
  * @returns Result of the content assignment.
4570
4592
  */},{key:"projectContent",value:function projectContent(pRenderMethod,pDestinationAddress,pContent,pTestAddress){// Assign the content to the destination address
4571
- switch(pRenderMethod){case'append':return this.appendContent(pDestinationAddress,pContent);case'prepend':return this.prependContent(pDestinationAddress,pContent);case'append_once':// Try to find the content in either the test address or the destination address
4572
- var tmpTestAddress=typeof pTestAddress=='string'?pTestAddress:pDestinationAddress;var tmpExistingContent=this.getElement(tmpTestAddress);if(tmpExistingContent.length<1){return this.appendContent(pDestinationAddress,pContent);}break;case'replace':// TODO: Should this be the default?
4573
- default:return this.assignContent(pDestinationAddress,pContent);}}/**
4593
+ switch(pRenderMethod){case'append':return this.appendContent(pDestinationAddress,pContent);case'prepend':return this.prependContent(pDestinationAddress,pContent);case'append_once':{// Try to find the content in either the test address or the destination address
4594
+ var tmpTestAddress=typeof pTestAddress=='string'?pTestAddress:pDestinationAddress;var tmpExistingContent=this.getElement(tmpTestAddress);if(tmpExistingContent.length<1){return this.appendContent(pDestinationAddress,pContent);}break;}case'replace':// TODO: Should this be the default?
4595
+ /* falls through */default:return this.assignContent(pDestinationAddress,pContent);}}/**
4574
4596
  * Read content from an element.
4575
4597
  *
4576
4598
  * @param {string} pAddress - The address of the element. (a CSS selector)
4577
4599
  *
4578
- * @return {string} - The content of the element.
4579
- */},{key:"readContent",value:function readContent(pAddress){if(this.customReadFunction){return this.customReadFunction(pAddress);}else if(this.hasJquery){var tmpTargetElement=window.jQuery(pAddress);switch(tmpTargetElement.prop('tagName')){case'INPUT':if(tmpTargetElement.attr('type')=='checkbox'){return tmpTargetElement.prop('checked');}case'SELECT':case'TEXTAREA':return tmpTargetElement.val();case'SCRIPT':return tmpTargetElement.text();default:return tmpTargetElement.html();}}else if(this.inBrowser&&this.hasDocument){var tmpTargetElementSet=window.document.querySelectorAll(pAddress);if(tmpTargetElementSet.length<1){return null;}else if(tmpTargetElementSet.length==1){switch(tmpTargetElementSet[0].tagName){case'INPUT':if(tmpTargetElementSet[0].type=='checkbox'){return tmpTargetElementSet[0].checked;}case'SELECT':case'TEXTAREA':return tmpTargetElementSet[0].value;case'SCRIPT':return tmpTargetElementSet[0].text;default:return tmpTargetElementSet[0].innerHTML;}}}else{// Just log it out for now -- nothing browser in our mix.
4600
+ * @return {boolean|string|number|string[]} - The content of the element.
4601
+ */},{key:"readContent",value:function readContent(pAddress){if(this.customReadFunction){return this.customReadFunction(pAddress);}else if(this.hasJquery){var tmpTargetElement=window.jQuery(pAddress);switch(tmpTargetElement.prop('tagName')){case'INPUT':if(tmpTargetElement.attr('type')=='checkbox'){return tmpTargetElement.prop('checked');}/* falls through */case'SELECT':case'TEXTAREA':return tmpTargetElement.val();case'SCRIPT':return tmpTargetElement.text();default:return tmpTargetElement.html();}}else if(this.inBrowser&&this.hasDocument){var tmpTargetElementSet=window.document.querySelectorAll(pAddress);if(tmpTargetElementSet.length<1){return null;}else if(tmpTargetElementSet.length==1){var tmpElement=tmpTargetElementSet[0];switch(tmpElement.tagName){case'INPUT':if(tmpElement instanceof HTMLInputElement&&tmpElement.type=='checkbox'){return tmpElement.checked;}/* falls through */case'SELECT':case'TEXTAREA':if(tmpElement instanceof HTMLInputElement||tmpElement instanceof HTMLSelectElement||tmpElement instanceof HTMLTextAreaElement){return tmpElement.value;}/* falls through */case'SCRIPT':if(tmpElement instanceof HTMLScriptElement){return tmpElement.text;}/* falls through */default:return tmpElement.innerHTML;}}}else{// Just log it out for now -- nothing browser in our mix.
4580
4602
  this.log.trace("PICT Content READ from [".concat(pAddress,"]..."));return'';}}/**
4581
4603
  * Add a class to an element.
4582
4604
  *
4583
4605
  * @param {string} pAddress - The address of the element. (a CSS selector)
4584
- * @param {string} pClass - The class to add.
4606
+ * @param {string|string[]} pClass - The class to add.
4585
4607
  */},{key:"addClass",value:function addClass(pAddress,pClass){if(this.customSetClassFunction){return this.customSetClassFunction(pAddress,pClass);}else if(this.hasJquery){// Get the element
4586
- var tmpTargetElement=window.jQuery(pAddress);tmpTargetElement.addClass(pClass);}else if(this.inBrowser&&this.hasDocument){var tmpTargetElementSet=window.document.querySelectorAll(pAddress);for(var i=0;i<tmpTargetElementSet.length;i++){tmpTargetElementSet[i].classList.add(pClass);}}else{this.log.trace("PICT Content ADDCLASS to [".concat(pAddress,"]:"),pClass);}}/**
4608
+ var tmpTargetElement=window.jQuery(pAddress);tmpTargetElement.addClass(pClass);}else if(this.inBrowser&&this.hasDocument){var tmpTargetElementSet=window.document.querySelectorAll(pAddress);for(var i=0;i<tmpTargetElementSet.length;i++){if(Array.isArray(pClass)){var _iterator=_createForOfIteratorHelper(pClass),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var tmpClass=_step.value;tmpTargetElementSet[i].classList.add(tmpClass);}}catch(err){_iterator.e(err);}finally{_iterator.f();}}else{tmpTargetElementSet[i].classList.add(pClass);}}}else{this.log.trace("PICT Content ADDCLASS to [".concat(pAddress,"]:"),pClass);}}/**
4587
4609
  * Remove a class from an element.
4588
4610
  *
4589
4611
  * @param {string} pAddress - The address of the element. (a CSS selector)
4590
- * @param {string} pClass - The class to remove.
4612
+ * @param {string|string[]} pClass - The class to remove.
4591
4613
  */},{key:"removeClass",value:function removeClass(pAddress,pClass){if(this.customRemoveClassFunction){return this.customRemoveClassFunction(pAddress,pClass);}else if(this.hasJquery){// Get the element
4592
- var tmpTargetElement=window.jQuery(pAddress);tmpTargetElement.removeClass(pClass);}else if(this.inBrowser&&this.hasDocument){var tmpTargetElementSet=window.document.querySelectorAll(pAddress);for(var i=0;i<tmpTargetElementSet.length;i++){tmpTargetElementSet[i].classList.remove(pClass);}}else{this.log.trace("PICT Content REMOVECLASS from [".concat(pAddress,"]:"),pClass);}}/**
4614
+ var tmpTargetElement=window.jQuery(pAddress);tmpTargetElement.removeClass(pClass);}else if(this.inBrowser&&this.hasDocument){var tmpTargetElementSet=window.document.querySelectorAll(pAddress);for(var i=0;i<tmpTargetElementSet.length;i++){if(Array.isArray(pClass)){var _iterator2=_createForOfIteratorHelper(pClass),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var tmpClass=_step2.value;tmpTargetElementSet[i].classList.remove(tmpClass);}}catch(err){_iterator2.e(err);}finally{_iterator2.f();}}else{tmpTargetElementSet[i].classList.remove(pClass);}}}else{this.log.trace("PICT Content REMOVECLASS from [".concat(pAddress,"]:"),pClass);}}/**
4593
4615
  * Read an attribute from an element.
4594
4616
  *
4595
4617
  * @param {string} pAddress - The address of the element. (a CSS selector)
@@ -4612,8 +4634,13 @@ var tmpTargetElement=window.jQuery(pAddress);tmpTargetElement.removeClass(pClass
4612
4634
  * @param {string} pClass - The class to check for.
4613
4635
  *
4614
4636
  * @return {boolean} - Whether the element has the class. If multiple elements are matched, returns true if any have the class.
4615
- */},{key:"hasClass",value:function hasClass(pAddress,pClass){if(this.customReadClassFunction){return this.customReadClassFunction(pAddress,pClass);}if(this.hasJquery){var tmpTargetElement=window.jQuery(pAddress);return tmpTargetElement.hasClass(pClass);}else if(this.inBrowser&&this.hasDocument){var tmpTargetElementSet=window.document.querySelectorAll(pAddress);for(var i=0;i<tmpTargetElementSet.length;i++){if(tmpTargetElementSet[i].classList.contains(pClass)){return true;}}return false;}else{this.log.trace("PICT Content HASCLASS for [".concat(pAddress,"] CLASS [").concat(pClass,"]:"));}}}]);}(libFableServiceBase);module.exports=PictContentAssignment;},{"fable":68}],188:[function(require,module,exports){var libFableServiceBase=require('fable').ServiceProviderBase;var PictDataProvider=/*#__PURE__*/function(_libFableServiceBase20){function PictDataProvider(pFable,pOptions,pServiceHash){var _this71;_classCallCheck2(this,PictDataProvider);_this71=_callSuper(this,PictDataProvider,[pFable,pOptions,pServiceHash]);_this71.serviceType='PictDataProvider';return _this71;}_inherits(PictDataProvider,_libFableServiceBase20);return _createClass2(PictDataProvider,[{key:"getDataByAddress",value:function getDataByAddress(pAddress,pData){var tmpData=typeof pData==='undefined'?{}:pData;return this.fable.manifest.getValueByHash({AppData:this.AppData,Bundle:this.Bundle,Record:tmpData},pAddress);}}]);}(libFableServiceBase);module.exports=PictDataProvider;},{"fable":68}],189:[function(require,module,exports){var libFableServiceBase=require('fable').ServiceProviderBase;var PictMeadowEntityProvider=/*#__PURE__*/function(_libFableServiceBase21){function PictMeadowEntityProvider(pFable,pOptions,pServiceHash){var _this72;_classCallCheck2(this,PictMeadowEntityProvider);_this72=_callSuper(this,PictMeadowEntityProvider,[pFable,pOptions,pServiceHash]);_this72.serviceType='PictMeadowProvider';if(_this72.fable.settings.PictDefaultURLPrefix){_this72.options.urlPrefix=_this72.fable.settings.PictDefaultURLPrefix;}else if(!_this72.options.urlPrefix){_this72.options.urlPrefix='/1.0/';}if(_this72.fable.settings.PictDefaultDownloadBatchSize){_this72.options.downloadBatchSize=_this72.fable.settings.PictDefaultDownloadBatchSize;}else if(!_this72.options.downloadBatchSize){_this72.options.downloadBatchSize=100;}_this72.restClient=_this72.fable.instantiateServiceProviderWithoutRegistration('RestClient');_this72.cache={};_this72.prepareRequestOptions=function(pOptions){return pOptions;};return _this72;}_inherits(PictMeadowEntityProvider,_libFableServiceBase21);return _createClass2(PictMeadowEntityProvider,[{key:"initializeCache",value:function initializeCache(pEntity){// This should not be happening as often as it's happening.
4616
- if(!(pEntity in this.cache)){this.cache[pEntity]=this.fable.instantiateServiceProviderWithoutRegistration('ObjectCache');// TODO: Make this a configuration?
4637
+ */},{key:"hasClass",value:function hasClass(pAddress,pClass){if(this.customReadClassFunction){return this.customReadClassFunction(pAddress,pClass);}if(this.hasJquery){var tmpTargetElement=window.jQuery(pAddress);return tmpTargetElement.hasClass(pClass);}else if(this.inBrowser&&this.hasDocument){var tmpTargetElementSet=window.document.querySelectorAll(pAddress);for(var i=0;i<tmpTargetElementSet.length;i++){if(tmpTargetElementSet[i].classList.contains(pClass)){return true;}}return false;}else{this.log.trace("PICT Content HASCLASS for [".concat(pAddress,"] CLASS [").concat(pClass,"]:"));return false;}}}]);}(libFableServiceBase);module.exports=PictContentAssignment;},{"fable":68}],188:[function(require,module,exports){var libFableServiceBase=require('fable').ServiceProviderBase;var PictDataProvider=/*#__PURE__*/function(_libFableServiceBase20){function PictDataProvider(pFable,pOptions,pServiceHash){var _this71;_classCallCheck2(this,PictDataProvider);_this71=_callSuper(this,PictDataProvider,[pFable,pOptions,pServiceHash]);/** @type {import('fable') & import('pict')} */_this71.fable;_this71.serviceType='PictDataProvider';return _this71;}/**
4638
+ * @param {string} pAddress - The address of the data to retrieve
4639
+ * @param {object} [pData] - (optional) The record to provide to the address resolver
4640
+ */_inherits(PictDataProvider,_libFableServiceBase20);return _createClass2(PictDataProvider,[{key:"getDataByAddress",value:function getDataByAddress(pAddress,pData){var tmpData=typeof pData==='undefined'?{}:pData;return this.fable.manifest.getValueByHash({AppData:this.fable.AppData,Bundle:this.fable.Bundle,Record:tmpData},pAddress);}}]);}(libFableServiceBase);module.exports=PictDataProvider;},{"fable":68}],189:[function(require,module,exports){var libFableServiceBase=require('fable').ServiceProviderBase;var PictMeadowEntityProvider=/*#__PURE__*/function(_libFableServiceBase21){function PictMeadowEntityProvider(pFable,pOptions,pServiceHash){var _this72;_classCallCheck2(this,PictMeadowEntityProvider);_this72=_callSuper(this,PictMeadowEntityProvider,[pFable,pOptions,pServiceHash]);/** @type {any} */_this72.options;/** @type {import('pict') & { settings: any }} */_this72.fable;_this72.serviceType='PictMeadowProvider';if(_this72.fable.settings.PictDefaultURLPrefix){_this72.options.urlPrefix=_this72.fable.settings.PictDefaultURLPrefix;}else if(!_this72.options.urlPrefix){_this72.options.urlPrefix='/1.0/';}if(_this72.fable.settings.PictDefaultDownloadBatchSize){_this72.options.downloadBatchSize=_this72.fable.settings.PictDefaultDownloadBatchSize;}else if(!_this72.options.downloadBatchSize){_this72.options.downloadBatchSize=100;}//@ts-ignore - FIXME - remove once we have fable types
4641
+ _this72.restClient=_this72.fable.instantiateServiceProviderWithoutRegistration('RestClient');_this72.cache={};_this72.prepareRequestOptions=function(pOptions){return pOptions;};return _this72;}_inherits(PictMeadowEntityProvider,_libFableServiceBase21);return _createClass2(PictMeadowEntityProvider,[{key:"initializeCache",value:function initializeCache(pEntity){// This should not be happening as often as it's happening.
4642
+ if(!(pEntity in this.cache)){//@ts-ignore - FIXME - remove once we have fable types
4643
+ this.cache[pEntity]=this.fable.instantiateServiceProviderWithoutRegistration('ObjectCache');// TODO: Make this a configuration?
4617
4644
  // For now cache for 30 seconds.
4618
4645
  this.cache[pEntity].maxAge=30000;this.cache[pEntity].maxLength=10000;this.fable.Bundle[pEntity]=this.cache[pEntity].RecordMap;}}},{key:"getEntity",value:function getEntity(pEntity,pIDRecord,fCallback){this.initializeCache(pEntity);// Discard anything from the cache that has expired or is over size.
4619
4646
  this.cache[pEntity].prune(function(){var _this73=this;var tmpPossibleRecord=this.cache[pEntity].read(pIDRecord);if(tmpPossibleRecord){return fCallback(null,tmpPossibleRecord);}var tmpOptions={url:"".concat(this.options.urlPrefix).concat(pEntity,"/").concat(pIDRecord)};tmpOptions=this.prepareRequestOptions(tmpOptions);return this.restClient.getJSON(tmpOptions,function(pError,pResponse,pBody){if(pBody){_this73.cache[pEntity].put(pBody,pIDRecord);}return fCallback(pError,pBody);});}.bind(this));}},{key:"getEntitySetPage",value:function getEntitySetPage(pEntity,pMeadowFilterExpression,pRecordStartCursor,pRecordCount,fCallback){var tmpURL="".concat(this.options.urlPrefix).concat(pEntity,"s/FilteredTo/").concat(pMeadowFilterExpression,"/").concat(pRecordStartCursor,"/").concat(pRecordCount);return this.restClient.getJSON(tmpURL,function(pDownloadError,pDownloadResponse,pDownloadBody){return fCallback(pDownloadError,pDownloadBody);}.bind(this));}},{key:"getEntitySetRecordCount",value:function getEntitySetRecordCount(pEntity,pMeadowFilterExpression,fCallback){var tmpURL="".concat(this.options.urlPrefix).concat(pEntity,"s/Count/FilteredTo/").concat(pMeadowFilterExpression);return this.restClient.getJSON(tmpURL,function(pError,pResponse,pBody){if(pError){this.log.error("Error getting entity count of [".concat(pEntity,"] filtered to [").concat(pMeadowFilterExpression,"] from url [").concat(tmpURL,"]: ").concat(pError));return fCallback(pError);}var tmpRecordCount=0;if(pBody.Count){tmpRecordCount=pBody.Count;}return fCallback(pError,tmpRecordCount);}.bind(this));}},{key:"getEntitySet",value:function getEntitySet(pEntity,pMeadowFilterExpression,fCallback){// TODO: Should we test for too many record IDs here by string length in pMeadowFilterExpression?
@@ -4627,12 +4654,12 @@ return fDownloadCallback(pDownloadError);});},function(pFullDownloadError){retur
4627
4654
  * @param {Object} pFable - The Fable Framework instance
4628
4655
  * @param {Object} pOptions - The options for the service
4629
4656
  * @param {String} pServiceHash - The hash of the service
4630
- */function PictTemplateProvider(pFable,pOptions,pServiceHash){var _this75;_classCallCheck2(this,PictTemplateProvider);_this75=_callSuper(this,PictTemplateProvider,[pFable,pOptions,pServiceHash]);_this75.serviceType='PictTemplateProvider';_this75.templates={};_this75.templateSources={};// Default templates are stored by prefix.
4657
+ */function PictTemplateProvider(pFable,pOptions,pServiceHash){var _this75;_classCallCheck2(this,PictTemplateProvider);_this75=_callSuper(this,PictTemplateProvider,[pFable,pOptions,pServiceHash]);/** @type {any} */_this75.log;/** @type {string} */_this75.UUID;/** @type {string} */_this75.Hash;_this75.serviceType='PictTemplateProvider';_this75.templates={};_this75.templateSources={};// Default templates are stored by prefix.
4631
4658
  // The longest prefix match is used.
4632
4659
  // Case sensitive.
4633
4660
  _this75.defaultTemplates=[];/**
4634
- * @property {Function} loadTemplateFunction - The function to load a template
4635
- */_this75.loadTemplateFunction=function(){return false;};return _this75;}/**
4661
+ * @type {(hash?: string) => { template: string, source: string }?} loadTemplateFunction - The function to load a template
4662
+ */_this75.loadTemplateFunction=function(){return null;};return _this75;}/**
4636
4663
  * Add a template to the provider.
4637
4664
  *
4638
4665
  * @param {String} pTemplateHash - The hash of the template
@@ -4659,7 +4686,7 @@ _this75.defaultTemplates=[];/**
4659
4686
  *
4660
4687
  * @param {String} pTemplateHash - The hash of the template
4661
4688
  * @return {string} - The template, or false if not found
4662
- */},{key:"checkDefaultTemplateHash",value:function checkDefaultTemplateHash(pTemplateHash){for(var i=0;i<this.defaultTemplates.length;i++){if(pTemplateHash.indexOf(this.defaultTemplates[i].postfix)==pTemplateHash.length-this.defaultTemplates[i].postfix.length&&pTemplateHash.indexOf(this.defaultTemplates[i].prefix)==0){this.templates[pTemplateHash]=this.defaultTemplates[i].template;this.templateSources[pTemplateHash]="Auto created in checkDefaultTemplateHash('".concat(pTemplateHash,"') function by PictTemplateProvider [").concat(this.UUID,"]::[").concat(this.Hash,"] from [").concat(this.defaultTemplates[i].prefix,"]...[").concat(this.defaultTemplates[i].postfix,"]");return this.templates[pTemplateHash];}}return false;}/**
4689
+ */},{key:"checkDefaultTemplateHash",value:function checkDefaultTemplateHash(pTemplateHash){for(var i=0;i<this.defaultTemplates.length;i++){if(pTemplateHash.indexOf(this.defaultTemplates[i].postfix)==pTemplateHash.length-this.defaultTemplates[i].postfix.length&&pTemplateHash.indexOf(this.defaultTemplates[i].prefix)==0){this.templates[pTemplateHash]=this.defaultTemplates[i].template;this.templateSources[pTemplateHash]="Auto created in checkDefaultTemplateHash('".concat(pTemplateHash,"') function by PictTemplateProvider [").concat(this.UUID,"]::[").concat(this.Hash,"] from [").concat(this.defaultTemplates[i].prefix,"]...[").concat(this.defaultTemplates[i].postfix,"]");return this.templates[pTemplateHash];}}return null;}/**
4663
4690
  * Get a template by hash.
4664
4691
  *
4665
4692
  * @param {String} pTemplateHash - The hash of the template
@@ -4667,17 +4694,36 @@ _this75.defaultTemplates=[];/**
4667
4694
  */},{key:"getTemplate",value:function getTemplate(pTemplateHash){// TODO: Optimize this.
4668
4695
  // If the template doesn't exist, try to load it with the loading function
4669
4696
  if(!(pTemplateHash in this.templates)){this.loadTemplate(pTemplateHash);}// If the loading function fails, try to load it from the default templates
4670
- if(!(pTemplateHash in this.templates)){this.checkDefaultTemplateHash(pTemplateHash);}if(pTemplateHash in this.templates){return this.templates[pTemplateHash];}else{return false;}}/**
4697
+ if(!(pTemplateHash in this.templates)){this.checkDefaultTemplateHash(pTemplateHash);}if(pTemplateHash in this.templates){return this.templates[pTemplateHash];}return null;}/**
4671
4698
  * Load a template by hash.
4672
4699
  *
4673
4700
  * @param {String} pTemplateHash - The hash of the template
4674
4701
  */},{key:"loadTemplate",value:function loadTemplate(pTemplateHash){var tmpTemplate=this.loadTemplateFunction(pTemplateHash);if(tmpTemplate){this.templates[pTemplateHash]=tmpTemplate.template;this.templateSources[pTemplateHash]="Loaded in loadTemplate('".concat(pTemplateHash,"') function by PictTemplateProvider [").concat(this.UUID,"]::[").concat(this.Hash,"] from [").concat(tmpTemplate.source,"]");}return tmpTemplate;}}]);}(libFableServiceBase);module.exports=PictTemplateProvider;},{"fable":68}],191:[function(require,module,exports){/**
4675
4702
  * @author <steven@velozo.com>
4676
- */var libFable=require('fable');var libPackage=require('../package.json');var PictTemplateProvider=require('./Pict-Template-Provider.js');var PictContentAssignment=require('./Pict-Content-Assignment.js');var PictDataProvider=require('./Pict-DataProvider.js');var PictCSS=require('./Pict-CSS.js');var PictMeadowEntityProvider=require('./Pict-Meadow-EntityProvider.js');/**
4703
+ *//**
4704
+ * @typedef {{
4705
+ * UUID: string,
4706
+ * settings: any,
4707
+ * fable: Fable,
4708
+ * servicesMap: any,
4709
+ * addAndInstantiateServiceType: (hash: string, prototype: any) => any,
4710
+ * addServiceType: (hash: string, prototype: any) => any,
4711
+ * instantiateServiceProvider: (hash: string, options?: any, prototype?: any) => any,
4712
+ * instantiateServiceProviderFromPrototype: (pServiceType: string, pOptions?: any, pCustomServiceHash?: string, pServicePrototype?: any) => any,
4713
+ * getUUID: () => string,
4714
+ * Utility:
4715
+ * {
4716
+ * extend: (pObject: any, ...pExtension: any[]) => any,
4717
+ * eachLimit: (pArray: any[], pLimit: number, pIterator: (pRecord: any, fRecordCallback: () => void) => void, fCallback: (pError: any) => void) => void,
4718
+ * },
4719
+ * MetaTemplate: any,
4720
+ * }} Fable
4721
+ *//** @type {{ new(...args: any[]): Fable }} */var libFable=require('fable');var libPackage=require('../package.json');var PictTemplateProvider=require('./Pict-Template-Provider.js');var PictContentAssignment=require('./Pict-Content-Assignment.js');var PictDataProvider=require('./Pict-DataProvider.js');var PictCSS=require('./Pict-CSS.js');var PictMeadowEntityProvider=require('./Pict-Meadow-EntityProvider.js');/**
4677
4722
  * Pict management object.
4678
4723
  */var Pict=/*#__PURE__*/function(_libFable){/**
4679
4724
  * @param {Object<String, any>} pSettings - The settings for the Pict instance.
4680
- */function Pict(pSettings){var _this76;_classCallCheck2(this,Pict);_this76=_callSuper(this,Pict,[pSettings]);_this76.isBrowser=new Function("try {return (this===window);} catch(pError) {return false;}");/** @type {Object} */_this76._PackageFable=_this76._Package;_this76._Package=libPackage;_this76.browserAddress='window._Pict';if('BrowserAddress'in _this76.settings){_this76.browserAddress=_this76.settings.BrowserAddress;}_this76.children=[];/**
4725
+ */function Pict(pSettings){var _this76;_classCallCheck2(this,Pict);_this76=_callSuper(this,Pict,[pSettings]);/** @type {any} */_this76.settings;_this76.isBrowser=new Function("try {return (this===window);} catch(pError) {return false;}");/** @type {Object} */_this76._PackageFable=_this76._Package;_this76._Package=libPackage;_this76.browserAddress='window._Pict';if('BrowserAddress'in _this76.settings){_this76.browserAddress=_this76.settings.BrowserAddress;}_this76.children=[];/** @type {import('pict-application')} */_this76.PictApplication=null;// shim types from fable until we export types properly
4726
+ /** @type {any} */_this76.log;/**
4681
4727
  * The templateProvider provides a basic key->template mapping with default fallback capabilities
4682
4728
  *
4683
4729
  * @type {PictTemplateProvider}
@@ -4711,27 +4757,26 @@ _this76.providers=_this76.servicesMap.PictProvider;_this76.views=_this76.service
4711
4757
  var tmpManifestKey=tmpManifestKeys[i];this.instantiateServiceProvider('Manifest',pManifestSet[tmpManifestKey],tmpManifestKey);}}}/**
4712
4758
  * Add a template expression to the template engine from the PictTemplate service.
4713
4759
  *
4714
- * @template [T extends PictTemplateProvider]
4715
- * @param {InstanceType<T>} pTemplatePrototype - The prototype class for the template expression
4760
+ * @template {new (...args: any[]) => any} T
4761
+ * @param {T} pTemplatePrototype - The prototype class for the template expression
4716
4762
  *
4717
- * @return {any} the service instance, or null if the prototype was invalid
4718
- */},{key:"addTemplate",value:function addTemplate(pTemplatePrototype){if(typeof pTemplatePrototype!='function'){this.log.warn("PICT [".concat(this.UUID,"] could not add Template; pTemplatePrototype was not a class it was ").concat(_typeof(pTemplatePrototype),"."));return null;}var tmpTemplateHash=pTemplatePrototype.template_hash;if(this.LogNoisiness>1){this.log.info("PICT-ControlFlow addTemplate [".concat(tmpTemplateHash,"]"));}return this.instantiateServiceProviderFromPrototype('PictTemplate',{},tmpTemplateHash,pTemplatePrototype);}/**
4763
+ * @return {InstanceType<T>} the service instance, or null if the prototype was invalid
4764
+ */},{key:"addTemplate",value:function addTemplate(pTemplatePrototype){if(typeof pTemplatePrototype!='function'){this.log.warn("PICT [".concat(this.UUID,"] could not add Template; pTemplatePrototype was not a class it was ").concat(_typeof(pTemplatePrototype),"."));return null;}var tmpTemplateHash=pTemplatePrototype['template_hash'];if(this.LogNoisiness>1){this.log.info("PICT-ControlFlow addTemplate [".concat(tmpTemplateHash,"]"));}return this.instantiateServiceProviderFromPrototype('PictTemplate',{},tmpTemplateHash,pTemplatePrototype);}/**
4719
4765
  * Just passing an options will construct one for us.
4720
4766
  * Passing a hash will set the hash.
4721
4767
  * Passing a prototype will use that!
4722
4768
  *
4769
+ * @template {new (...args: any[]) => any} [T=typeof import('pict-view')]
4723
4770
  * @param {String} pViewHash - The hash of the view.
4724
4771
  * @param {Object<String, any>} [pOptions] - The options for the view.
4725
- * @param {any} [pViewPrototype] - The prototype for the view.
4772
+ * @param {T} [pViewPrototype] - The prototype for the view.
4726
4773
  *
4727
- * FIXME: refer to PictView here once it has a type definition
4728
- *
4729
- * @return {any} The view instance.
4774
+ * @return {InstanceType<T>} The view instance.
4730
4775
  */},{key:"addView",value:function addView(pViewHash,pOptions,pViewPrototype){var tmpOptions=_typeof(pOptions)=='object'?pOptions:{};var tmpViewHash=typeof pViewHash=='string'?pViewHash:this.fable.getUUID();// This is here to change how the value is managed by webpack
4731
- var tmpViewPrototype=pViewPrototype;if(this.LogControlFlow){if(this.LogNoisiness>1){this.log.info("PICT-ControlFlow addView [".concat(tmpViewHash,"]:"),{Options:tmpOptions});}else{this.log.info("PICT-ControlFlow addView [".concat(tmpViewHash,"]"));}}if(typeof tmpViewPrototype!='undefined'){// If the prototype has a default_configuration, it will be merged with options.
4732
- if('default_configuration'in tmpViewPrototype){tmpOptions=this.fable.Utility.extend({},JSON.parse(JSON.stringify(tmpViewPrototype.default_configuration)),tmpOptions);}return this.instantiateServiceProviderFromPrototype('PictView',tmpOptions,tmpViewHash,tmpViewPrototype);}else{return this.instantiateServiceProvider('PictView',tmpOptions,tmpViewHash);}}/**
4776
+ var tmpViewPrototype=pViewPrototype;if(this.LogControlFlow){if(this.LogNoisiness>1){this.log.info("PICT-ControlFlow addView [".concat(tmpViewHash,"]:"),{Options:tmpOptions});}else{this.log.info("PICT-ControlFlow addView [".concat(tmpViewHash,"]"));}}if(tmpViewPrototype){// If the prototype has a default_configuration, it will be merged with options.
4777
+ var tmpDefaultViewConfiguration=tmpViewPrototype['default_configuration'];if(tmpDefaultViewConfiguration){tmpOptions=this.fable.Utility.extend({},JSON.parse(JSON.stringify(tmpDefaultViewConfiguration)),tmpOptions);}return this.instantiateServiceProviderFromPrototype('PictView',tmpOptions,tmpViewHash,tmpViewPrototype);}else{return this.instantiateServiceProvider('PictView',tmpOptions,tmpViewHash);}}/**
4733
4778
  * Add a provider unless one already exists, then return that one.
4734
- *
4779
+ *
4735
4780
  * Just passing an options will construct one for us.
4736
4781
  * Passing a hash will set the hash.
4737
4782
  * Passing a prototype will use that!
@@ -4831,7 +4876,7 @@ if(!tmpTemplateString){tmpTemplateString='';}return this.parseTemplate(tmpTempla
4831
4876
  *
4832
4877
  * @return {String?} The parsed template string, or undefined if a callback was provided
4833
4878
  */},{key:"parseTemplateSet",value:function parseTemplateSet(pTemplateString,pDataSet,fCallback,pContextArray){var _this78=this;// TODO: This will need streaming -- for now janky old string append does the trick
4834
- var tmpValue='';if(typeof fCallback=='function'){if(Array.isArray(pDataSet)||_typeof(pDataSet)=='object'){this.Utility.eachLimit(pDataSet,1,function(pRecord,fRecordTemplateCallback){return _this78.parseTemplate(pTemplateString,pRecord,function(pError,pTemplateResult){tmpValue+=pTemplateResult;return fRecordTemplateCallback();});},function(pError){return fCallback(pError,tmpValue);});}else{return fCallback(Error('Pict: Template Set: pDataSet is not an array or object.'),'');}}else{if(Array.isArray(pDataSet)||_typeof(pDataSet)=='object'){if(Array.isArray(pDataSet)){for(var i=0;i<pDataSet.length;i++){tmpValue+=this.parseTemplate(pTemplateString,pDataSet[i],null,pContextArray);}}else{var tmpKeys=Object.keys(pDataSet);for(var _i57=0;_i57<tmpKeys.length;_i57++){tmpValue+=this.parseTemplate(pTemplateString,pDataSet[tmpKeys[_i57]],null,pContextArray);}}return tmpValue;}else{return'';}}}/**
4879
+ var tmpValue='';if(typeof fCallback=='function'){if(Array.isArray(pDataSet)||_typeof(pDataSet)=='object'){this.Utility.eachLimit(pDataSet,1,function(pRecord,fRecordTemplateCallback){return _this78.parseTemplate(pTemplateString,pRecord,function(pError,pTemplateResult){tmpValue+=pTemplateResult;return fRecordTemplateCallback();});},function(pError){return fCallback(pError,tmpValue);});}else{return fCallback(Error('Pict: Template Set: pDataSet is not an array or object.'),'');}}else{if(Array.isArray(pDataSet)||_typeof(pDataSet)=='object'){if(Array.isArray(pDataSet)){for(var i=0;i<pDataSet.length;i++){tmpValue+=this.parseTemplate(pTemplateString,pDataSet[i],null,pContextArray);}}else{var tmpKeys=Object.keys(pDataSet);for(var _i58=0;_i58<tmpKeys.length;_i58++){tmpValue+=this.parseTemplate(pTemplateString,pDataSet[tmpKeys[_i58]],null,pContextArray);}}return tmpValue;}else{return'';}}}/**
4835
4880
  * Parse a template set by hash.
4836
4881
  *
4837
4882
  * @param {String} pTemplateHash - The hash of the template to parse
@@ -4868,14 +4913,14 @@ module.exports.isBrowser=new Function("try {return (this===window);} catch(pErro
4868
4913
  * @typedef {import('../Pict')} Pict
4869
4914
  *//**
4870
4915
  * @param {Pict} pPict - The pict object to attach the custom read/write functions to.
4871
- * @param {Map<String, any>} pContentMap - The content map to use for custom reads.
4916
+ * @param {Object<String, any>} pContentMap - The content map to use for custom reads.
4872
4917
  */function PictEnvironmentLog(pPict,pContentMap){_classCallCheck2(this,PictEnvironmentLog);this.contentMap=_typeof(pContentMap)=='object'?pContentMap:{};this.pict=pPict;// If this is set to false, we won't keep an array-based log of every read, assignment, append or get.
4873
4918
  this.truncateContentLength=256;this.storeEventLog=true;// Where to store each event type
4874
4919
  this.eventLog={};this.eventLog.GetElement=[];this.eventLog.Read=[];this.eventLog.Prepend=[];this.eventLog.Append=[];this.eventLog.Assign=[];this.pict.ContentAssignment.customGetElementFunction=this.customGetElementFunction.bind(this);this.pict.ContentAssignment.customReadFunction=this.customReadFunction.bind(this);this.pict.ContentAssignment.customAppendFunction=this.customAppendFunction.bind(this);this.pict.ContentAssignment.customPrependFunction=this.customPrependFunction.bind(this);this.pict.ContentAssignment.customAssignFunction=this.customAssignFunction.bind(this);this.pict.ContentAssignment.customReadAttributeFunction=this.customReadAttributeFunction.bind(this);this.pict.ContentAssignment.customSetAttributeFunction=this.customSetAttributeFunction.bind(this);}/**
4875
4920
  * Create an event log entry.
4876
4921
  *
4877
4922
  * @param {string} pAddress - The address of the event.
4878
- * @param {string} pContent - The content of the event.
4923
+ * @param {string} [pContent] - The content of the event.
4879
4924
  */return _createClass2(PictEnvironmentLog,[{key:"createEventLogEntry",value:function createEventLogEntry(pAddress,pContent){var tmpContent=typeof pContent=='undefined'?'':pContent;return{TimeStamp:this.pict.log.getTimeStamp(),Hash:pAddress,Content:tmpContent};}/**
4880
4925
  * Custom GetElement function.
4881
4926
  *
@@ -4936,22 +4981,22 @@ return this.contentMap[pAddress];}this.pict.log.warn("Mock read from Address ".c
4936
4981
  * @typedef {import('../Pict')} Pict
4937
4982
  *//**
4938
4983
  * @param {Pict} pPict - The pict object to attach the custom read/write functions to.q
4939
- * @param {Map<String, any>} pContentMap - The content map to use for custom reads.
4984
+ * @param {Object<String, any>} pContentMap - The content map to use for custom reads.
4940
4985
  */function PictEnvironmentObject(pPict,pContentMap){_classCallCheck2(this,PictEnvironmentObject);this.contentMap=_typeof(pContentMap)=='object'?pContentMap:{};this.contentMap._ATTRIBUTE_MAP={};this.contentMap._CLASS_MAP={};this.pict=pPict;// If this is set to false, we won't keep an array-based log of every read, assignment, append or get.
4941
4986
  this.truncateContentLength=256;this.storeEventLog=true;// Where to store each event type
4942
4987
  this.eventLog={};this.eventLog.GetElement=[];this.eventLog.Read=[];this.eventLog.Prepend=[];this.eventLog.Append=[];this.eventLog.Assign=[];this.eventLog.ReadAttribute=[];this.eventLog.SetAttribute=[];this.eventLog.RemoveAttribute=[];this.eventLog.ReadClass=[];this.eventLog.SetClass=[];this.eventLog.RemoveClass=[];this.pict.ContentAssignment.customGetElementFunction=this.customGetElementFunction.bind(this);this.pict.ContentAssignment.customReadFunction=this.customReadFunction.bind(this);this.pict.ContentAssignment.customAppendFunction=this.customAppendFunction.bind(this);this.pict.ContentAssignment.customPrependFunction=this.customPrependFunction.bind(this);this.pict.ContentAssignment.customAssignFunction=this.customAssignFunction.bind(this);this.pict.ContentAssignment.customReadAttributeFunction=this.customReadAttributeFunction.bind(this);this.pict.ContentAssignment.customSetAttributeFunction=this.customSetAttributeFunction.bind(this);this.pict.ContentAssignment.customRemoveAttributeFunction=this.customRemoveAttributeFunction.bind(this);this.pict.ContentAssignment.customReadClassFunction=this.customReadClassFunction.bind(this);this.pict.ContentAssignment.customSetClassFunction=this.customSetClassFunction.bind(this);this.pict.ContentAssignment.customRemoveClassFunction=this.customRemoveClassFunction.bind(this);}return _createClass2(PictEnvironmentObject,[{key:"createEventLogEntry",value:function createEventLogEntry(pAddress,pContent){var tmpContent=typeof pContent=='undefined'?'':pContent;return{TimeStamp:this.pict.log.getTimeStamp(),Hash:pAddress,Content:tmpContent};}},{key:"customGetElementFunction",value:function customGetElementFunction(pAddress){if(this.storeEventLog){this.eventLog.GetElement.push(this.createEventLogEntry(pAddress));}this.pict.log.info("Mocking an GET of Address -> [".concat(pAddress,"]"));return'';}},{key:"customReadFunction",value:function customReadFunction(pAddress){if(this.storeEventLog){this.eventLog.Read.push(this.createEventLogEntry(pAddress));}this.pict.log.info("Mocking an READ from Address -> [".concat(pAddress,"]"));if(pAddress in this.contentMap){// The data is in the content map!
4943
- return this.contentMap[pAddress];}this.pict.log.warn("Mock read from Address ".concat(pAddress," did not find a value in the content map."));return'';}},{key:"customAppendFunction",value:function customAppendFunction(pAddress,pContent){this.contentMap[pAddress]=typeof this.contentMap[pAddress]=='undefined'?pContent:this.contentMap[pAddress]+pContent;if(this.storeEventLog){this.eventLog.Append.push(this.createEventLogEntry(pAddress,pContent));}if(pContent.length>this.truncateContentLength){this.pict.log.info("Mocking an APPEND to Address -> [".concat(pAddress,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:pContent.substring(0,this.truncateContentLength)});}else{this.pict.log.info("Mocking an APPEND to Address -> [".concat(pAddress,"]"),{Content:pContent});}return'';}},{key:"customPrependFunction",value:function customPrependFunction(pAddress,pContent){this.contentMap[pAddress]=typeof this.contentMap[pAddress]=='undefined'?pContent:pContent+this.contentMap[pAddress];if(this.storeEventLog){this.eventLog.Prepend.push(this.createEventLogEntry(pAddress,pContent));}if(pContent.length>this.truncateContentLength){this.pict.log.info("Mocking an PREPEND to Address -> [".concat(pAddress,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:pContent.substring(0,this.truncateContentLength)});}else{this.pict.log.info("Mocking an PREPEND to Address -> [".concat(pAddress,"]"),{Content:pContent});}return'';}},{key:"customAssignFunction",value:function customAssignFunction(pAddress,pContent){this.contentMap[pAddress]=pContent;if(this.storeEventLog){this.eventLog.Prepend.push(this.createEventLogEntry(pAddress,pContent));}if(pContent.length>this.truncateContentLength){this.pict.log.info("Mocking an ASSIGN to Address -> [".concat(pAddress,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:pContent.substring(0,this.truncateContentLength)});}else{this.pict.log.info("Mocking an ASSIGN to Address -> [".concat(pAddress,"]"),{Content:pContent});}return'';}},{key:"initializeAttributeMapLocation",value:function initializeAttributeMapLocation(pAddress,pAttribute){if(!(pAddress in this.contentMap._ATTRIBUTE_MAP)){this.contentMap._ATTRIBUTE_MAP[pAddress]={};}if(!(pAttribute in this.contentMap._ATTRIBUTE_MAP[pAddress])){this.contentMap._ATTRIBUTE_MAP[pAddress][pAttribute]=false;}}},{key:"initializeClassMapLocation",value:function initializeClassMapLocation(pAddress){if(!(pAddress in this.contentMap._CLASS_MAP)){this.contentMap._CLASS_MAP[pAddress]=[];}}},{key:"customReadAttributeFunction",value:function customReadAttributeFunction(pAddress,pAttribute){this.initializeAttributeMapLocation(pAddress,pAttribute);var tmpContent=this.contentMap._ATTRIBUTE_MAP[pAddress][pAttribute];if(this.storeEventLog){this.eventLog.Assign.push(this.createEventLogEntry(pAddress,pAttribute));}if(tmpContent.length>this.truncateContentLength){this.pict.log.info("Mocking an ATTRIBUTE READ for Address -> [".concat(pAddress,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:tmpContent.substring(0,this.truncateContentLength)});}else{this.pict.log.info("Mocking an ATTRIBUTE READ for Address -> [".concat(pAddress,"]::[").concat(pAttribute,"]"),{Content:tmpContent});}return tmpContent;}},{key:"customSetAttributeFunction",value:function customSetAttributeFunction(pAddress,pAttribute,pValue){this.initializeAttributeMapLocation(pAddress,pAttribute);this.contentMap._ATTRIBUTE_MAP[pAddress][pAttribute]=pValue;if(this.storeEventLog){this.eventLog.Assign.push(this.createEventLogEntry(pAddress,pAttribute));}if(pValue.length>this.truncateContentLength){this.pict.log.info("Mocking an ATTRIBUTE SET for Address -> [".concat(pAddress,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:pValue.substring(0,this.truncateContentLength)});}else{this.pict.log.info("Mocking an ATTRIBUTE SET for Address -> [".concat(pAddress,"]::[").concat(pAttribute,"]"),{Content:pValue});}return pValue;}},{key:"customRemoveAttributeFunction",value:function customRemoveAttributeFunction(pAddress,pAttribute){this.initializeAttributeMapLocation(pAddress,pAttribute);var tmpContent=this.contentMap._ATTRIBUTE_MAP[pAddress][pAttribute];if(this.storeEventLog){this.eventLog.Assign.push(this.createEventLogEntry(pAddress,pAttribute));}if(tmpContent.length>this.truncateContentLength){this.pict.log.info("Mocking an ATTRIBUTE REMOVE for Address -> [".concat(pAddress,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:tmpContent.substring(0,this.truncateContentLength)});}else{this.pict.log.info("Mocking an ATTRIBUTE REMOVE for Address -> [".concat(pAddress,"]::[").concat(pAttribute,"]"),{Content:tmpContent});}delete this.contentMap._ATTRIBUTE_MAP[pAddress][pAttribute];return true;}},{key:"customReadClassFunction",value:function customReadClassFunction(pAddress,pClass){this.initializeClassMapLocation(pAddress);var tmpContent=this.contentMap._CLASS_MAP[pAddress].indexOf(pClass)>-1;if(this.storeEventLog){this.eventLog.Assign.push(this.createEventLogEntry(pAddress,pClass));}this.pict.log.info("Mocking an CLASS READ for Address -> [".concat(pAddress,"]::[").concat(pClass,"]"),{Content:tmpContent});return tmpContent;}},{key:"customSetClassFunction",value:function customSetClassFunction(pAddress,pClass){this.initializeClassMapLocation(pAddress);var tmpContent=this.contentMap._CLASS_MAP[pAddress];if(!this.contentMap._CLASS_MAP[pAddress].indexOf(pClass)>-1){this.contentMap._CLASS_MAP[pAddress].push(pClass);}if(this.storeEventLog){this.eventLog.Assign.push(this.createEventLogEntry(pAddress,pClass));}this.pict.log.info("Mocking an CLASS SET for Address -> [".concat(pAddress,"]::[").concat(pClass,"]"),{Content:tmpContent.join(' ')});return tmpContent;}},{key:"customRemoveClassFunction",value:function customRemoveClassFunction(pAddress,pClass){this.initializeClassMapLocation(pAddress);var tmpContent=this.contentMap._CLASS_MAP[pAddress];this.contentMap._CLASS_MAP[pAddress].splice(pClass);if(this.storeEventLog){this.eventLog.Assign.push(this.createEventLogEntry(pAddress,pClass));}this.pict.log.info("Mocking an CLASS REMOVE for Address -> [".concat(pAddress,"]::[").concat(pClass,"]"),{Content:tmpContent.join(' ')});return tmpContent;}}]);}();module.exports=PictEnvironmentObject;},{}],194:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderData=/*#__PURE__*/function(_libPictTemplate){/**
4988
+ return this.contentMap[pAddress];}this.pict.log.warn("Mock read from Address ".concat(pAddress," did not find a value in the content map."));return'';}},{key:"customAppendFunction",value:function customAppendFunction(pAddress,pContent){this.contentMap[pAddress]=typeof this.contentMap[pAddress]=='undefined'?pContent:this.contentMap[pAddress]+pContent;if(this.storeEventLog){this.eventLog.Append.push(this.createEventLogEntry(pAddress,pContent));}if(pContent.length>this.truncateContentLength){this.pict.log.info("Mocking an APPEND to Address -> [".concat(pAddress,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:pContent.substring(0,this.truncateContentLength)});}else{this.pict.log.info("Mocking an APPEND to Address -> [".concat(pAddress,"]"),{Content:pContent});}return'';}},{key:"customPrependFunction",value:function customPrependFunction(pAddress,pContent){this.contentMap[pAddress]=typeof this.contentMap[pAddress]=='undefined'?pContent:pContent+this.contentMap[pAddress];if(this.storeEventLog){this.eventLog.Prepend.push(this.createEventLogEntry(pAddress,pContent));}if(pContent.length>this.truncateContentLength){this.pict.log.info("Mocking an PREPEND to Address -> [".concat(pAddress,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:pContent.substring(0,this.truncateContentLength)});}else{this.pict.log.info("Mocking an PREPEND to Address -> [".concat(pAddress,"]"),{Content:pContent});}return'';}},{key:"customAssignFunction",value:function customAssignFunction(pAddress,pContent){this.contentMap[pAddress]=pContent;if(this.storeEventLog){this.eventLog.Prepend.push(this.createEventLogEntry(pAddress,pContent));}if(pContent.length>this.truncateContentLength){this.pict.log.info("Mocking an ASSIGN to Address -> [".concat(pAddress,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:pContent.substring(0,this.truncateContentLength)});}else{this.pict.log.info("Mocking an ASSIGN to Address -> [".concat(pAddress,"]"),{Content:pContent});}return'';}},{key:"initializeAttributeMapLocation",value:function initializeAttributeMapLocation(pAddress,pAttribute){if(!(pAddress in this.contentMap._ATTRIBUTE_MAP)){this.contentMap._ATTRIBUTE_MAP[pAddress]={};}if(!(pAttribute in this.contentMap._ATTRIBUTE_MAP[pAddress])){this.contentMap._ATTRIBUTE_MAP[pAddress][pAttribute]=false;}}},{key:"initializeClassMapLocation",value:function initializeClassMapLocation(pAddress){if(!(pAddress in this.contentMap._CLASS_MAP)){this.contentMap._CLASS_MAP[pAddress]=[];}}},{key:"customReadAttributeFunction",value:function customReadAttributeFunction(pAddress,pAttribute){this.initializeAttributeMapLocation(pAddress,pAttribute);var tmpContent=this.contentMap._ATTRIBUTE_MAP[pAddress][pAttribute];if(this.storeEventLog){this.eventLog.Assign.push(this.createEventLogEntry(pAddress,pAttribute));}if(tmpContent.length>this.truncateContentLength){this.pict.log.info("Mocking an ATTRIBUTE READ for Address -> [".concat(pAddress,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:tmpContent.substring(0,this.truncateContentLength)});}else{this.pict.log.info("Mocking an ATTRIBUTE READ for Address -> [".concat(pAddress,"]::[").concat(pAttribute,"]"),{Content:tmpContent});}return tmpContent;}},{key:"customSetAttributeFunction",value:function customSetAttributeFunction(pAddress,pAttribute,pValue){this.initializeAttributeMapLocation(pAddress,pAttribute);this.contentMap._ATTRIBUTE_MAP[pAddress][pAttribute]=pValue;if(this.storeEventLog){this.eventLog.Assign.push(this.createEventLogEntry(pAddress,pAttribute));}if(pValue.length>this.truncateContentLength){this.pict.log.info("Mocking an ATTRIBUTE SET for Address -> [".concat(pAddress,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:pValue.substring(0,this.truncateContentLength)});}else{this.pict.log.info("Mocking an ATTRIBUTE SET for Address -> [".concat(pAddress,"]::[").concat(pAttribute,"]"),{Content:pValue});}return pValue;}},{key:"customRemoveAttributeFunction",value:function customRemoveAttributeFunction(pAddress,pAttribute){this.initializeAttributeMapLocation(pAddress,pAttribute);var tmpContent=this.contentMap._ATTRIBUTE_MAP[pAddress][pAttribute];if(this.storeEventLog){this.eventLog.Assign.push(this.createEventLogEntry(pAddress,pAttribute));}if(tmpContent.length>this.truncateContentLength){this.pict.log.info("Mocking an ATTRIBUTE REMOVE for Address -> [".concat(pAddress,"] (log truncated to first ").concat(this.truncateContentLength," characters)"),{Content:tmpContent.substring(0,this.truncateContentLength)});}else{this.pict.log.info("Mocking an ATTRIBUTE REMOVE for Address -> [".concat(pAddress,"]::[").concat(pAttribute,"]"),{Content:tmpContent});}delete this.contentMap._ATTRIBUTE_MAP[pAddress][pAttribute];return true;}},{key:"customReadClassFunction",value:function customReadClassFunction(pAddress,pClass){this.initializeClassMapLocation(pAddress);var tmpContent=this.contentMap._CLASS_MAP[pAddress].indexOf(pClass)>-1;if(this.storeEventLog){this.eventLog.Assign.push(this.createEventLogEntry(pAddress,pClass));}this.pict.log.info("Mocking an CLASS READ for Address -> [".concat(pAddress,"]::[").concat(pClass,"]"),{Content:tmpContent});return tmpContent;}},{key:"customSetClassFunction",value:function customSetClassFunction(pAddress,pClass){this.initializeClassMapLocation(pAddress);var tmpContent=this.contentMap._CLASS_MAP[pAddress];if(this.contentMap._CLASS_MAP[pAddress].indexOf(pClass)==-1){this.contentMap._CLASS_MAP[pAddress].push(pClass);}if(this.storeEventLog){this.eventLog.Assign.push(this.createEventLogEntry(pAddress,pClass));}this.pict.log.info("Mocking an CLASS SET for Address -> [".concat(pAddress,"]::[").concat(pClass,"]"),{Content:tmpContent.join(' ')});return tmpContent;}},{key:"customRemoveClassFunction",value:function customRemoveClassFunction(pAddress,pClass){this.initializeClassMapLocation(pAddress);var tmpContent=this.contentMap._CLASS_MAP[pAddress];this.contentMap._CLASS_MAP[pAddress].splice(pClass);if(this.storeEventLog){this.eventLog.Assign.push(this.createEventLogEntry(pAddress,pClass));}this.pict.log.info("Mocking an CLASS REMOVE for Address -> [".concat(pAddress,"]::[").concat(pClass,"]"),{Content:tmpContent.join(' ')});return tmpContent;}}]);}();module.exports=PictEnvironmentObject;},{}],194:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderData=/*#__PURE__*/function(_libPictTemplate){/**
4944
4989
  * @param {Object} pFable - The Fable Framework instance
4945
4990
  * @param {Object} pOptions - The options for the service
4946
4991
  * @param {String} pServiceHash - The hash of the service
4947
- */function PictTemplateProviderData(pFable,pOptions,pServiceHash){var _this79;_classCallCheck2(this,PictTemplateProviderData);_this79=_callSuper(this,PictTemplateProviderData,[pFable,pOptions,pServiceHash]);_this79.addPattern('{~Data:','~}');_this79.addPattern('{~D:','~}');return _this79;}_inherits(PictTemplateProviderData,_libPictTemplate);return _createClass2(PictTemplateProviderData,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpRecord=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"]"));}var tmpValue='';if(tmpHash!=null){tmpValue=this.resolveStateFromAddress(tmpHash,tmpRecord,pContextArray);}if(tmpValue==null||tmpValue=='undefined'||typeof tmpValue=='undefined'){return'';}return tmpValue;}}]);}(libPictTemplate);module.exports=PictTemplateProviderData;},{"pict-template":135}],195:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderEntity=/*#__PURE__*/function(_libPictTemplate2){/**
4992
+ */function PictTemplateProviderData(pFable,pOptions,pServiceHash){var _this79;_classCallCheck2(this,PictTemplateProviderData);_this79=_callSuper(this,PictTemplateProviderData,[pFable,pOptions,pServiceHash]);/** @type {any} */_this79.log;_this79.addPattern('{~Data:','~}');_this79.addPattern('{~D:','~}');return _this79;}_inherits(PictTemplateProviderData,_libPictTemplate);return _createClass2(PictTemplateProviderData,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpRecord=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpRecord);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataRender]::[".concat(tmpHash,"]"));}var tmpValue='';if(tmpHash!=null){tmpValue=this.resolveStateFromAddress(tmpHash,tmpRecord,pContextArray);}if(tmpValue==null||tmpValue=='undefined'||typeof tmpValue=='undefined'){return'';}return tmpValue;}}]);}(libPictTemplate);module.exports=PictTemplateProviderData;},{"pict-template":135}],195:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderEntity=/*#__PURE__*/function(_libPictTemplate2){/**
4948
4993
  * @param {Object} pFable - The Fable Framework instance
4949
4994
  * @param {Object} pOptions - The options for the service
4950
4995
  * @param {String} pServiceHash - The hash of the service
4951
- */function PictTemplateProviderEntity(pFable,pOptions,pServiceHash){var _this80;_classCallCheck2(this,PictTemplateProviderEntity);_this80=_callSuper(this,PictTemplateProviderEntity,[pFable,pOptions,pServiceHash]);_this80.addPattern('{~E:','~}');_this80.addPattern('{~Entity:','~}');return _this80;}_inherits(PictTemplateProviderEntity,_libPictTemplate2);return _createClass2(PictTemplateProviderEntity,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){// TODO: Better messaging
4952
- this.log.error("Pict: Entity Render [".concat(pTemplateHash,"]: Render called in a non-asynchronous fashion. This should not happen."));return'';}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fEntityRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fEntityRender]::[".concat(tmpHash,"]"));}var tmpEntity=false;var tmpEntityID=false;var tmpEntityTemplate=false;// This expression requires 2 parts -- a third is optional, and, if present, is the template to render to.
4953
- var tmpAddressParts=tmpHash.split('^');if(tmpAddressParts.length<2){this.log.warn("Pict: Entity Render: Entity or entity ID not resolved for [".concat(tmpHash,"]"));return tmpCallback(Error("Pict: Entity Render: Entity or entity ID not resolved for [".concat(tmpHash,"]")),'');}tmpEntity=tmpAddressParts[0].trim();tmpEntityID=tmpAddressParts[1].trim();tmpEntityTemplate=tmpAddressParts[2].trim();if(!isNaN(tmpEntityID)){try{tmpEntityID=parseInt(tmpEntityID);}catch(_unused){this.log.warn("Pict: Entity Render: Could not parse entity ID.");tmpEntityID=0;}}else{// This is an address, so we need to get the value at the address
4954
- tmpEntityID=this.resolveStateFromAddress(tmpEntityID,tmpData,pContextArray);}// No Entity or EntityID
4996
+ */function PictTemplateProviderEntity(pFable,pOptions,pServiceHash){var _this80;_classCallCheck2(this,PictTemplateProviderEntity);_this80=_callSuper(this,PictTemplateProviderEntity,[pFable,pOptions,pServiceHash]);/** @type {any} */_this80.log;_this80.addPattern('{~E:','~}');_this80.addPattern('{~Entity:','~}');return _this80;}_inherits(PictTemplateProviderEntity,_libPictTemplate2);return _createClass2(PictTemplateProviderEntity,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){// TODO: Better messaging
4997
+ this.log.error("Pict: Entity Render [".concat(pTemplateHash,"]: Render called in a non-asynchronous fashion. This should not happen."));return'';}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fEntityRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fEntityRender]::[".concat(tmpHash,"]"));}var tmpEntity=false;/** @type {string|number} */var tmpEntityID='';var tmpEntityTemplate=false;// This expression requires 2 parts -- a third is optional, and, if present, is the template to render to.
4998
+ var tmpAddressParts=tmpHash.split('^');if(tmpAddressParts.length<2){this.log.warn("Pict: Entity Render: Entity or entity ID not resolved for [".concat(tmpHash,"]"));return tmpCallback(Error("Pict: Entity Render: Entity or entity ID not resolved for [".concat(tmpHash,"]")),'');}tmpEntity=tmpAddressParts[0].trim();tmpEntityID=tmpAddressParts[1].trim();tmpEntityTemplate=tmpAddressParts[2].trim();if(!isNaN(Number(tmpEntityID))){try{tmpEntityID=parseInt(String(tmpEntityID));}catch(_unused){this.log.warn("Pict: Entity Render: Could not parse entity ID.");tmpEntityID=0;}}else{// This is an address, so we need to get the value at the address
4999
+ tmpEntityID=this.resolveStateFromAddress(String(tmpEntityID),tmpData,pContextArray);}// No Entity or EntityID
4955
5000
  if(!tmpEntity||!tmpEntityID){this.log.warn("Pict: Entity Render: Entity or entity ID not resolved for [".concat(tmpHash,"] Entity: ").concat(tmpEntity," ID: ").concat(tmpEntityID));return tmpCallback(Error("Pict: Entity Render: Entity or entity ID not resolved for [".concat(tmpHash,"] Entity: ").concat(tmpEntity," ID: ").concat(tmpEntityID)),'');}if(this.pict.LogNoisiness>3){this.log.trace("Pict: Entity Render: Entity [".concat(tmpEntity,"] with ID [").concat(tmpEntityID,"] as template [").concat(tmpEntityTemplate,"] from [").concat(tmpHash,"]"));}// Now try to get the entity
4956
5001
  this.pict.EntityProvider.getEntity(tmpEntity,tmpEntityID,function(pError,pRecord){if(pError){this.log.error("Pict: Entity Render: Error getting entity [".concat(tmpEntity,"] with ID [").concat(tmpEntityID,"] for [").concat(tmpHash,"]: ").concat(pError),pError);return tmpCallback(pError,'');}// Now render the template
4957
5002
  if(tmpEntityTemplate){return this.pict.parseTemplateByHash(tmpEntityTemplate,pRecord,tmpCallback,pContextArray);}else{return tmpCallback(null,'');}}.bind(this));}}]);}(libPictTemplate);module.exports=PictTemplateProviderEntity;},{"pict-template":135}],196:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderSelf=/*#__PURE__*/function(_libPictTemplate3){/**
@@ -4962,10 +5007,10 @@ if(tmpEntityTemplate){return this.pict.parseTemplateByHash(tmpEntityTemplate,pRe
4962
5007
  * @param {Object} pFable - The Fable Framework instance
4963
5008
  * @param {Object} pOptions - The options for the service
4964
5009
  * @param {String} pServiceHash - The hash of the service
4965
- */function PictTemplateProviderTemplate(pFable,pOptions,pServiceHash){var _this82;_classCallCheck2(this,PictTemplateProviderTemplate);_this82=_callSuper(this,PictTemplateProviderTemplate,[pFable,pOptions,pServiceHash]);_this82.addPattern('{~Template:','~}');_this82.addPattern('{~T:','~}');return _this82;}_inherits(PictTemplateProviderTemplate,_libPictTemplate4);return _createClass2(PictTemplateProviderTemplate,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash=false;var tmpAddressOfData=false;// This is just a simple 2 part hash (the entity and the ID)
5010
+ */function PictTemplateProviderTemplate(pFable,pOptions,pServiceHash){var _this82;_classCallCheck2(this,PictTemplateProviderTemplate);_this82=_callSuper(this,PictTemplateProviderTemplate,[pFable,pOptions,pServiceHash]);/** @type {any} */_this82.log;_this82.addPattern('{~Template:','~}');_this82.addPattern('{~T:','~}');return _this82;}_inherits(PictTemplateProviderTemplate,_libPictTemplate4);return _createClass2(PictTemplateProviderTemplate,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
4966
5011
  var tmpHashTemplateSeparator=tmpHash.indexOf(':');tmpTemplateHash=tmpHash.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpHash.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateHash=tmpHash;}// No template hash
4967
5012
  if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]");}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
4968
- return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),null,pContextArray);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateHash=false;var tmpAddressOfData=false;// This is just a simple 2 part hash (the entity and the ID)
5013
+ return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),null,pContextArray);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
4969
5014
  var tmpHashTemplateSeparator=tmpHash.indexOf(':');tmpTemplateHash=tmpHash.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpHash.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateHash=tmpHash;}// No template hash
4970
5015
  if(!tmpTemplateHash){this.log.warn("Pict: Template Render Async: TemplateHash not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render Async: TemplateHash not resolved for [".concat(tmpHash,"]");}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
4971
5016
  // The async portion of this is a mind bender because of how entry can happen dynamically from templates
@@ -4973,11 +5018,11 @@ return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,function(pError,pVa
4973
5018
  * @param {Object} pFable - The Fable Framework instance
4974
5019
  * @param {Object} pOptions - The options for the service
4975
5020
  * @param {String} pServiceHash - The hash of the service
4976
- */function PictTemplateProviderTemplateFromMap(pFable,pOptions,pServiceHash){var _this83;_classCallCheck2(this,PictTemplateProviderTemplateFromMap);_this83=_callSuper(this,PictTemplateProviderTemplateFromMap,[pFable,pOptions,pServiceHash]);_this83.addPattern('{~TFM:','~}');_this83.addPattern('{~TemplateFromMap:','~}');return _this83;}_inherits(PictTemplateProviderTemplateFromMap,_libPictTemplate5);return _createClass2(PictTemplateProviderTemplateFromMap,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRender]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash=false;var tmpAddressOfMap=false;var tmpAddressOfKey=false;// This is a 3 part hash with the map address and the key address both
5021
+ */function PictTemplateProviderTemplateFromMap(pFable,pOptions,pServiceHash){var _this83;_classCallCheck2(this,PictTemplateProviderTemplateFromMap);_this83=_callSuper(this,PictTemplateProviderTemplateFromMap,[pFable,pOptions,pServiceHash]);/** @type {any} */_this83.log;_this83.addPattern('{~TFM:','~}');_this83.addPattern('{~TemplateFromMap:','~}');return _this83;}_inherits(PictTemplateProviderTemplateFromMap,_libPictTemplate5);return _createClass2(PictTemplateProviderTemplateFromMap,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRender]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfMap;var tmpAddressOfKey;// This is a 3 part hash with the map address and the key address both
4977
5022
  var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<3){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return'';}tmpTemplateFromMapHash=tmpTemplateHashPart[0];tmpAddressOfMap=tmpTemplateHashPart[1];tmpAddressOfKey=tmpTemplateHashPart[2];// No TemplateFromMap hash
4978
5023
  if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return'';}// Now resolve the data
4979
5024
  var tmpMap=this.resolveStateFromAddress(tmpAddressOfMap,tmpData,pContextArray);var tmpKey=this.resolveStateFromAddress(tmpAddressOfKey,tmpData,pContextArray);if(!tmpMap){this.log.warn("Pict: TemplateFromMap Render: Map not resolved for [".concat(tmpHash,"]"));return'';}tmpData=tmpMap[tmpKey];if(!tmpData){// No address was provided, just render the TemplateFromMap with what this TemplateFromMap has.
4980
- return this.pict.parseTemplateByHash(tmpTemplateFromMapHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateFromMapHash,tmpData,null,pContextArray);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash=false;var tmpAddressOfMap=false;var tmpAddressOfKey=false;// This is a 3 part hash with the map address and the key address both
5025
+ return this.pict.parseTemplateByHash(tmpTemplateFromMapHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateFromMapHash,tmpData,null,pContextArray);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfMap;var tmpAddressOfKey;// This is a 3 part hash with the map address and the key address both
4981
5026
  var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<3){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return fCallback(null,'');}tmpTemplateFromMapHash=tmpTemplateHashPart[0];tmpAddressOfMap=tmpTemplateHashPart[1];tmpAddressOfKey=tmpTemplateHashPart[2];// No TemplateFromMap hash
4982
5027
  if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
4983
5028
  var tmpMap=this.resolveStateFromAddress(tmpAddressOfMap,tmpData,pContextArray);var tmpKey=this.resolveStateFromAddress(tmpAddressOfKey,tmpData,pContextArray);if(!tmpMap){this.log.warn("Pict: TemplateFromMap Render: Map not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}tmpData=tmpMap[tmpKey];if(!tmpData){// No address was provided, just render the TemplateFromMap with what this TemplateFromMap has.
@@ -4986,10 +5031,10 @@ return this.pict.parseTemplateByHash(tmpTemplateFromMapHash,pRecord,function(pEr
4986
5031
  * @param {Object} pFable - The Fable Framework instance
4987
5032
  * @param {Object} pOptions - The options for the service
4988
5033
  * @param {String} pServiceHash - The hash of the service
4989
- */function PictTemplateProviderTemplateSet(pFable,pOptions,pServiceHash){var _this84;_classCallCheck2(this,PictTemplateProviderTemplateSet);_this84=_callSuper(this,PictTemplateProviderTemplateSet,[pFable,pOptions,pServiceHash]);_this84.addPattern('{~TemplateSet:','~}');_this84.addPattern('{~TS:','~}');return _this84;}_inherits(PictTemplateProviderTemplateSet,_libPictTemplate6);return _createClass2(PictTemplateProviderTemplateSet,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateSetRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateSetRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash=false;var tmpAddressOfData=false;// This is just a simple 2 part hash (the entity and the ID)
5034
+ */function PictTemplateProviderTemplateSet(pFable,pOptions,pServiceHash){var _this84;_classCallCheck2(this,PictTemplateProviderTemplateSet);_this84=_callSuper(this,PictTemplateProviderTemplateSet,[pFable,pOptions,pServiceHash]);/** @type {any} */_this84.log;_this84.addPattern('{~TemplateSet:','~}');_this84.addPattern('{~TS:','~}');return _this84;}_inherits(PictTemplateProviderTemplateSet,_libPictTemplate6);return _createClass2(PictTemplateProviderTemplateSet,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateSetRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateSetRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
4990
5035
  var tmpHashTemplateSeparator=tmpHash.indexOf(':');tmpTemplateHash=tmpHash.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpHash.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateHash=tmpHash;}// No template hash
4991
5036
  if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]");}if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
4992
- return this.pict.parseTemplateSetByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateSetByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),null,pContextArray);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateSetRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateSetRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash=false;var tmpAddressOfData=false;// This is a 3 part hash with the map address and the key address both
5037
+ return this.pict.parseTemplateSetByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateSetByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),null,pContextArray);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateSetRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateSetRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfData;// This is a 3 part hash with the map address and the key address both
4993
5038
  var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<2){this.log.trace("PICT TemplateFromMap [fTemplateRenderAsync]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return fCallback(null,'');}tmpTemplateFromMapHash=tmpTemplateHashPart[0];tmpAddressOfData=tmpTemplateHashPart[1];// No TemplateFromMap hash
4994
5039
  if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
4995
5040
  tmpData=this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray);if(!tmpData){// No address was provided, just render the template with what this template has.
@@ -4998,11 +5043,11 @@ return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(
4998
5043
  * @param {Object} pFable - The Fable Framework instance
4999
5044
  * @param {Object} pOptions - The options for the service
5000
5045
  * @param {String} pServiceHash - The hash of the service
5001
- */function PictTemplateProviderTemplateSetFromMap(pFable,pOptions,pServiceHash){var _this85;_classCallCheck2(this,PictTemplateProviderTemplateSetFromMap);_this85=_callSuper(this,PictTemplateProviderTemplateSetFromMap,[pFable,pOptions,pServiceHash]);_this85.addPattern('{~TSFM:','~}');_this85.addPattern('{~TemplateSetFromMap:','~}');return _this85;}_inherits(PictTemplateProviderTemplateSetFromMap,_libPictTemplate7);return _createClass2(PictTemplateProviderTemplateSetFromMap,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRender]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash=false;var tmpAddressOfMap=false;var tmpAddressOfKey=false;// This is a 3 part hash with the map address and the key address both
5046
+ */function PictTemplateProviderTemplateSetFromMap(pFable,pOptions,pServiceHash){var _this85;_classCallCheck2(this,PictTemplateProviderTemplateSetFromMap);_this85=_callSuper(this,PictTemplateProviderTemplateSetFromMap,[pFable,pOptions,pServiceHash]);/** @type {any} */_this85.log;_this85.addPattern('{~TSFM:','~}');_this85.addPattern('{~TemplateSetFromMap:','~}');return _this85;}_inherits(PictTemplateProviderTemplateSetFromMap,_libPictTemplate7);return _createClass2(PictTemplateProviderTemplateSetFromMap,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRender]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfMap;var tmpAddressOfKey;// This is a 3 part hash with the map address and the key address both
5002
5047
  var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<3){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return'';}tmpTemplateFromMapHash=tmpTemplateHashPart[0];tmpAddressOfMap=tmpTemplateHashPart[1];tmpAddressOfKey=tmpTemplateHashPart[2];// No TemplateFromMap hash
5003
5048
  if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return'';}// Now resolve the data
5004
5049
  var tmpMap=this.resolveStateFromAddress(tmpAddressOfMap,tmpData,pContextArray);var tmpKey=this.resolveStateFromAddress(tmpAddressOfKey,tmpData,pContextArray);if(!tmpMap){this.log.warn("Pict: TemplateFromMap Render: Map not resolved for [".concat(tmpHash,"]"));return'';}tmpData=tmpMap[tmpKey];if(!tmpData){// No address was provided, just render the TemplateFromMap with what this TemplateFromMap has.
5005
- return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,null,pContextArray);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash=false;var tmpAddressOfMap=false;var tmpAddressOfKey=false;// This is a 3 part hash with the map address and the key address both
5050
+ return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,null,pContextArray);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT TemplateFromMap [fTemplateFromMapSetRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfMap;var tmpAddressOfKey;// This is a 3 part hash with the map address and the key address both
5006
5051
  var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<3){this.log.trace("PICT TemplateFromMap [fTemplateFromMapRenderAsync]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return fCallback(null,'');}tmpTemplateFromMapHash=tmpTemplateHashPart[0];tmpAddressOfMap=tmpTemplateHashPart[1];tmpAddressOfKey=tmpTemplateHashPart[2];// No TemplateFromMap hash
5007
5052
  if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMapSet Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
5008
5053
  var tmpMap=this.resolveStateFromAddress(tmpAddressOfMap,tmpData,pContextArray);var tmpKey=this.resolveStateFromAddress(tmpAddressOfKey,tmpData,pContextArray);if(!tmpMap){this.log.warn("Pict: TemplateFromMapSet Render: Map not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}tmpData=tmpMap[tmpKey];if(!tmpData){// No address was provided, just render the TemplateFromMap with what this TemplateFromMap has.
@@ -5011,31 +5056,31 @@ return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(
5011
5056
  * @param {Object} pFable - The Fable Framework instance
5012
5057
  * @param {Object} pOptions - The options for the service
5013
5058
  * @param {String} pServiceHash - The hash of the service
5014
- */function PictTemplateProviderTemplateValueSet(pFable,pOptions,pServiceHash){var _this86;_classCallCheck2(this,PictTemplateProviderTemplateValueSet);_this86=_callSuper(this,PictTemplateProviderTemplateValueSet,[pFable,pOptions,pServiceHash]);_this86.addPattern('{~TemplateValueSet:','~}');_this86.addPattern('{~TVS:','~}');return _this86;}_inherits(PictTemplateProviderTemplateValueSet,_libPictTemplate8);return _createClass2(PictTemplateProviderTemplateValueSet,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateValueSetRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateValueSetRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash=false;var tmpAddressOfData=false;// This is just a simple 2 part hash (the entity and the ID)
5059
+ */function PictTemplateProviderTemplateValueSet(pFable,pOptions,pServiceHash){var _this86;_classCallCheck2(this,PictTemplateProviderTemplateValueSet);_this86=_callSuper(this,PictTemplateProviderTemplateValueSet,[pFable,pOptions,pServiceHash]);/** @type {any} */_this86.log;_this86.addPattern('{~TemplateValueSet:','~}');_this86.addPattern('{~TVS:','~}');return _this86;}_inherits(PictTemplateProviderTemplateValueSet,_libPictTemplate8);return _createClass2(PictTemplateProviderTemplateValueSet,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateValueSetRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateValueSetRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;// This is just a simple 2 part hash (the entity and the ID)
5015
5060
  var tmpHashTemplateSeparator=tmpHash.indexOf(':');tmpTemplateHash=tmpHash.substring(0,tmpHashTemplateSeparator);if(tmpHashTemplateSeparator>-1){tmpAddressOfData=tmpHash.substring(tmpHashTemplateSeparator+1);}else{tmpTemplateHash=tmpHash;}// No template hash
5016
- if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]");}tmpData=this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray);var tmpDataValueSet=[];if(Array.isArray(tmpData)){for(var i=0;i<tmpData.length;i++){tmpDataValueSet.push({Value:tmpData[i],Key:i});}}else if(_typeof(tmpData)==='object'){var tmpValueKeys=Object.keys(tmpData);for(var _i58=0;_i58<tmpValueKeys.length;_i58++){tmpDataValueSet.push({Value:tmpData[tmpValueKeys[_i58]],Key:tmpValueKeys[_i58]});}}else{tmpDataValueSet.push({Value:tmpData});}tmpData=tmpDataValueSet;if(!tmpData){// No address was provided, just render the template with what this template has.
5017
- return this.pict.parseTemplateSetByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateSetByHash(tmpTemplateHash,tmpData,null,pContextArray);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateValueSetRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateValueSetRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash=false;var tmpAddressOfData=false;// This is a 3 part hash with the map address and the key address both
5061
+ if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]");}tmpData=this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray);var tmpDataValueSet=[];if(Array.isArray(tmpData)){for(var i=0;i<tmpData.length;i++){tmpDataValueSet.push({Value:tmpData[i],Key:i});}}else if(_typeof(tmpData)==='object'){var tmpValueKeys=Object.keys(tmpData);for(var _i59=0;_i59<tmpValueKeys.length;_i59++){tmpDataValueSet.push({Value:tmpData[tmpValueKeys[_i59]],Key:tmpValueKeys[_i59]});}}else{tmpDataValueSet.push({Value:tmpData});}tmpData=tmpDataValueSet;if(!tmpData){// No address was provided, just render the template with what this template has.
5062
+ return this.pict.parseTemplateSetByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateSetByHash(tmpTemplateHash,tmpData,null,pContextArray);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateValueSetRenderAsync]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateValueSetRenderAsync]::[".concat(tmpHash,"]"));}var tmpTemplateFromMapHash;var tmpAddressOfData;// This is a 3 part hash with the map address and the key address both
5018
5063
  var tmpTemplateHashPart=tmpHash.split(':');if(tmpTemplateHashPart.length<2){this.log.trace("PICT TemplateFromMap [fTemplateRenderAsync]::[".concat(tmpHash,"] failed because there were not three stanzas in the expression [").concat(pTemplateHash,"]"));return fCallback(null,'');}tmpTemplateFromMapHash=tmpTemplateHashPart[0];tmpAddressOfData=tmpTemplateHashPart[1];// No TemplateFromMap hash
5019
5064
  if(!tmpTemplateFromMapHash){this.log.warn("Pict: TemplateFromMap Render Async: TemplateFromMapHash not resolved for [".concat(tmpHash,"]"));return fCallback(null,'');}// Now resolve the data
5020
- tmpData=this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray);var tmpDataValueSet=[];if(Array.isArray(tmpData)){for(var i=0;i<tmpData.length;i++){tmpDataValueSet.push({Value:tmpData[i],Key:i});}}else if(_typeof(tmpData)==='object'){var tmpValueKeys=Object.keys(tmpData);for(var _i59=0;_i59<tmpValueKeys.length;_i59++){tmpDataValueSet.push({Value:tmpData[tmpValueKeys[_i59]],Key:tmpData[tmpValueKeys[_i59]]});}}else{tmpDataValueSet.push({Value:tmpData});}tmpData=tmpDataValueSet;if(!tmpData){// No address was provided, just render the template with what this template has.
5065
+ tmpData=this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray);var tmpDataValueSet=[];if(Array.isArray(tmpData)){for(var i=0;i<tmpData.length;i++){tmpDataValueSet.push({Value:tmpData[i],Key:i});}}else if(_typeof(tmpData)==='object'){var tmpValueKeys=Object.keys(tmpData);for(var _i60=0;_i60<tmpValueKeys.length;_i60++){tmpDataValueSet.push({Value:tmpData[tmpValueKeys[_i60]],Key:tmpData[tmpValueKeys[_i60]]});}}else{tmpDataValueSet.push({Value:tmpData});}tmpData=tmpDataValueSet;if(!tmpData){// No address was provided, just render the template with what this template has.
5021
5066
  // The async portion of this is a mind bender because of how entry can happen dynamically from templates
5022
5067
  return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,pRecord,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}else{return this.pict.parseTemplateSetByHash(tmpTemplateFromMapHash,tmpData,function(pError,pValue){if(pError){return tmpCallback(pError,'');}return tmpCallback(null,pValue);},pContextArray);}}}]);}(libPictTemplate);module.exports=PictTemplateProviderTemplateValueSet;},{"pict-template":135}],202:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderRandomNumber=/*#__PURE__*/function(_libPictTemplate9){/**
5023
5068
  * @param {Object} pFable - The Fable Framework instance
5024
5069
  * @param {Object} pOptions - The options for the service
5025
5070
  * @param {String} pServiceHash - The hash of the service
5026
- */function PictTemplateProviderRandomNumber(pFable,pOptions,pServiceHash){var _this87;_classCallCheck2(this,PictTemplateProviderRandomNumber);_this87=_callSuper(this,PictTemplateProviderRandomNumber,[pFable,pOptions,pServiceHash]);_this87.addPattern('{~RandomNumber:','~}');_this87.addPattern('{~RN:','~}');return _this87;}_inherits(PictTemplateProviderRandomNumber,_libPictTemplate9);return _createClass2(PictTemplateProviderRandomNumber,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fRandomNumber]::[".concat(tmpHash,"]"));}var tmpMinimumNumber=0;var tmpMaxNumber=9999999;if(tmpHash.length>0){var tmpHashParts=tmpHash.split(',');if(tmpHashParts.length>0){try{tmpMinimumNumber=parseInt(tmpHashParts[0]);}catch(_unused2){tmpMinimumNumber=0;}}if(tmpHashParts.length>1){try{tmpMaxNumber=parseInt(tmpHashParts[1]);}catch(_unused3){tmpMaxNumber=9999999;}}}return this.fable.DataGeneration.randomIntegerBetween(tmpMinimumNumber,tmpMaxNumber);}}]);}(libPictTemplate);module.exports=PictTemplateProviderRandomNumber;},{"pict-template":135}],203:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderRandomNumberString=/*#__PURE__*/function(_libPictTemplate10){/**
5071
+ */function PictTemplateProviderRandomNumber(pFable,pOptions,pServiceHash){var _this87;_classCallCheck2(this,PictTemplateProviderRandomNumber);_this87=_callSuper(this,PictTemplateProviderRandomNumber,[pFable,pOptions,pServiceHash]);/** @type {any} */_this87.log;_this87.addPattern('{~RandomNumber:','~}');_this87.addPattern('{~RN:','~}');return _this87;}_inherits(PictTemplateProviderRandomNumber,_libPictTemplate9);return _createClass2(PictTemplateProviderRandomNumber,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fRandomNumber]::[".concat(tmpHash,"]"));}var tmpMinimumNumber=0;var tmpMaxNumber=9999999;if(tmpHash.length>0){var tmpHashParts=tmpHash.split(',');if(tmpHashParts.length>0){try{tmpMinimumNumber=parseInt(tmpHashParts[0]);}catch(_unused2){tmpMinimumNumber=0;}}if(tmpHashParts.length>1){try{tmpMaxNumber=parseInt(tmpHashParts[1]);}catch(_unused3){tmpMaxNumber=9999999;}}}return this.fable.DataGeneration.randomIntegerBetween(tmpMinimumNumber,tmpMaxNumber);}}]);}(libPictTemplate);module.exports=PictTemplateProviderRandomNumber;},{"pict-template":135}],203:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderRandomNumberString=/*#__PURE__*/function(_libPictTemplate10){/**
5027
5072
  * @param {Object} pFable - The Fable Framework instance
5028
5073
  * @param {Object} pOptions - The options for the service
5029
5074
  * @param {String} pServiceHash - The hash of the service
5030
- */function PictTemplateProviderRandomNumberString(pFable,pOptions,pServiceHash){var _this88;_classCallCheck2(this,PictTemplateProviderRandomNumberString);_this88=_callSuper(this,PictTemplateProviderRandomNumberString,[pFable,pOptions,pServiceHash]);_this88.addPattern('{~RandomNumberString:','~}');_this88.addPattern('{~RNS:','~}');return _this88;}_inherits(PictTemplateProviderRandomNumberString,_libPictTemplate10);return _createClass2(PictTemplateProviderRandomNumberString,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fRandomNumberString]::[".concat(tmpHash,"]"));}var tmpStringLength=4;var tmpMaxNumber=9999;if(tmpHash.length>0){var tmpHashParts=tmpHash.split(',');if(tmpHashParts.length>0){try{tmpStringLength=parseInt(tmpHashParts[0]);}catch(_unused4){tmpStringLength=4;}}if(tmpHashParts.length>1){try{tmpMaxNumber=parseInt(tmpHashParts[1]);}catch(_unused5){tmpMaxNumber=9999;}}}return this.fable.DataGeneration.randomNumericString(tmpStringLength,tmpMaxNumber);}}]);}(libPictTemplate);module.exports=PictTemplateProviderRandomNumberString;},{"pict-template":135}],204:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDollars=/*#__PURE__*/function(_libPictTemplate11){/**
5075
+ */function PictTemplateProviderRandomNumberString(pFable,pOptions,pServiceHash){var _this88;_classCallCheck2(this,PictTemplateProviderRandomNumberString);_this88=_callSuper(this,PictTemplateProviderRandomNumberString,[pFable,pOptions,pServiceHash]);/** @type {any} */_this88.log;_this88.addPattern('{~RandomNumberString:','~}');_this88.addPattern('{~RNS:','~}');return _this88;}_inherits(PictTemplateProviderRandomNumberString,_libPictTemplate10);return _createClass2(PictTemplateProviderRandomNumberString,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fRandomNumberString]::[".concat(tmpHash,"]"));}var tmpStringLength=4;var tmpMaxNumber=9999;if(tmpHash.length>0){var tmpHashParts=tmpHash.split(',');if(tmpHashParts.length>0){try{tmpStringLength=parseInt(tmpHashParts[0]);}catch(_unused4){tmpStringLength=4;}}if(tmpHashParts.length>1){try{tmpMaxNumber=parseInt(tmpHashParts[1]);}catch(_unused5){tmpMaxNumber=9999;}}}return this.fable.DataGeneration.randomNumericString(tmpStringLength,tmpMaxNumber);}}]);}(libPictTemplate);module.exports=PictTemplateProviderRandomNumberString;},{"pict-template":135}],204:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDollars=/*#__PURE__*/function(_libPictTemplate11){/**
5031
5076
  * @param {Object} pFable - The Fable Framework instance
5032
5077
  * @param {Object} pOptions - The options for the service
5033
5078
  * @param {String} pServiceHash - The hash of the service
5034
- */function PictTemplateProviderDollars(pFable,pOptions,pServiceHash){var _this89;_classCallCheck2(this,PictTemplateProviderDollars);_this89=_callSuper(this,PictTemplateProviderDollars,[pFable,pOptions,pServiceHash]);_this89.addPattern('{~DataJson:','~}');_this89.addPattern('{~DJ:','~}');return _this89;}_inherits(PictTemplateProviderDollars,_libPictTemplate11);return _createClass2(PictTemplateProviderDollars,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataJson]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataJson]::[".concat(tmpHash,"]"));}var tmpDataToStringify=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);if(!tmpDataToStringify){tmpDataToStringify=pRecord;}return JSON.stringify(tmpDataToStringify);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDollars;},{"pict-template":135}],205:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateFormat=/*#__PURE__*/function(_libPictTemplate12){/**
5079
+ */function PictTemplateProviderDollars(pFable,pOptions,pServiceHash){var _this89;_classCallCheck2(this,PictTemplateProviderDollars);_this89=_callSuper(this,PictTemplateProviderDollars,[pFable,pOptions,pServiceHash]);/** @type {any} */_this89.log;_this89.addPattern('{~DataJson:','~}');_this89.addPattern('{~DJ:','~}');return _this89;}_inherits(PictTemplateProviderDollars,_libPictTemplate11);return _createClass2(PictTemplateProviderDollars,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDataJson]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDataJson]::[".concat(tmpHash,"]"));}var tmpDataToStringify=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);if(!tmpDataToStringify){tmpDataToStringify=pRecord;}return JSON.stringify(tmpDataToStringify);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDollars;},{"pict-template":135}],205:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDateFormat=/*#__PURE__*/function(_libPictTemplate12){/**
5035
5080
  * @param {Object} pFable - The Fable Framework instance
5036
5081
  * @param {Object} pOptions - The options for the service
5037
5082
  * @param {String} pServiceHash - The hash of the service
5038
- */function PictTemplateProviderDateFormat(pFable,pOptions,pServiceHash){var _this90;_classCallCheck2(this,PictTemplateProviderDateFormat);_this90=_callSuper(this,PictTemplateProviderDateFormat,[pFable,pOptions,pServiceHash]);_this90.addPattern('{~DateFormat:','~}');return _this90;}_inherits(PictTemplateProviderDateFormat,_libPictTemplate12);return _createClass2(PictTemplateProviderDateFormat,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValueSet=tmpHash.split('^');if(tmpDateValueSet.length<2){this.log.error("PICT Template [fDateFormat]::[".concat(tmpHash,"] did not have a valid format string and date."));return'';}var tmpDateValue=this.resolveStateFromAddress(tmpDateValueSet[0],tmpData,pContextArray);if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDateFormat]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDateFormat]::[".concat(tmpHash,"]"));}// TODO: Modularize this
5083
+ */function PictTemplateProviderDateFormat(pFable,pOptions,pServiceHash){var _this90;_classCallCheck2(this,PictTemplateProviderDateFormat);_this90=_callSuper(this,PictTemplateProviderDateFormat,[pFable,pOptions,pServiceHash]);/** @type {any} */_this90.options;/** @type {any} */_this90.log;_this90.addPattern('{~DateFormat:','~}');return _this90;}_inherits(PictTemplateProviderDateFormat,_libPictTemplate12);return _createClass2(PictTemplateProviderDateFormat,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValueSet=tmpHash.split('^');if(tmpDateValueSet.length<2){this.log.error("PICT Template [fDateFormat]::[".concat(tmpHash,"] did not have a valid format string and date."));return'';}var tmpDateValue=this.resolveStateFromAddress(tmpDateValueSet[0],tmpData,pContextArray);if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDateFormat]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDateFormat]::[".concat(tmpHash,"]"));}// TODO: Modularize this
5039
5084
  var tmpDayJS=this.fable.Dates.dayJS.utc(tmpDateValue);try{// Try to cast the day to be a specific timezone if one is set for the app
5040
5085
  if(this.options.Timezone){tmpDayJS=tmpDayJS.tz(this.options.Timezone);}else{try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(pError.message||pError,")"));}}}catch(_unused6){//this.log.error(`Error casting date passed timezone using tz .. casting to the browser guess which is [${this.fable.Dates.dayJS.tz.guess()}].`);
5041
5086
  // Day.js will try to guess the user's timezone for us
@@ -5049,7 +5094,7 @@ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.
5049
5094
  * @param {Object} pFable - The Fable Framework instance
5050
5095
  * @param {Object} pOptions - The options for the service
5051
5096
  * @param {String} pServiceHash - The hash of the service
5052
- */function PictTemplateProviderDateYMD(pFable,pOptions,pServiceHash){var _this91;_classCallCheck2(this,PictTemplateProviderDateYMD);_this91=_callSuper(this,PictTemplateProviderDateYMD,[pFable,pOptions,pServiceHash]);_this91.addPattern('{~DateYMD:','~}');return _this91;}_inherits(PictTemplateProviderDateYMD,_libPictTemplate13);return _createClass2(PictTemplateProviderDateYMD,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDateFormat]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDateFormat]::[".concat(tmpHash,"]"));}// TODO: Modularize this
5097
+ */function PictTemplateProviderDateYMD(pFable,pOptions,pServiceHash){var _this91;_classCallCheck2(this,PictTemplateProviderDateYMD);_this91=_callSuper(this,PictTemplateProviderDateYMD,[pFable,pOptions,pServiceHash]);/** @type {any} */_this91.options;/** @type {any} */_this91.log;_this91.addPattern('{~DateYMD:','~}');return _this91;}_inherits(PictTemplateProviderDateYMD,_libPictTemplate13);return _createClass2(PictTemplateProviderDateYMD,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpDateValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDateFormat]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDateFormat]::[".concat(tmpHash,"]"));}// TODO: Modularize this
5053
5098
  var tmpDayJS=this.fable.Dates.dayJS.utc(tmpDateValue);try{// Try to cast the day to be a specific timezone if one is set for the app
5054
5099
  if(this.options.Timezone){tmpDayJS=tmpDayJS.tz(this.options.Timezone);}else{try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.log.error("Error guessing dayJS guess() function; dates may be formatted to GMT by default. (".concat(pError.message||pError,")"));}}}catch(_unused7){//this.log.error(`Error casting timezone using tz .. casting to the browser guess which is [${this.fable.Dates.dayJS.tz.guess()}].`);
5055
5100
  // Day.js will try to guess the user's timezone for us
@@ -5057,25 +5102,25 @@ try{tmpDayJS=tmpDayJS.tz(this.fable.Dates.dayJS.tz.guess());}catch(pError){this.
5057
5102
  * @param {Object} pFable - The Fable Framework instance
5058
5103
  * @param {Object} pOptions - The options for the service
5059
5104
  * @param {String} pServiceHash - The hash of the service
5060
- */function PictTemplateProviderDigits(pFable,pOptions,pServiceHash){var _this92;_classCallCheck2(this,PictTemplateProviderDigits);_this92=_callSuper(this,PictTemplateProviderDigits,[pFable,pOptions,pServiceHash]);_this92.addPattern('{~Digits:','~}');return _this92;}_inherits(PictTemplateProviderDigits,_libPictTemplate14);return _createClass2(PictTemplateProviderDigits,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDigits]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDigits]::[".concat(tmpHash,"]"));}var tmpColumnData=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);return this.fable.DataFormat.formatterAddCommasToNumber(this.fable.DataFormat.formatterRoundNumber(tmpColumnData,2));}}]);}(libPictTemplate);module.exports=PictTemplateProviderDigits;},{"pict-template":135}],208:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDollars=/*#__PURE__*/function(_libPictTemplate15){/**
5105
+ */function PictTemplateProviderDigits(pFable,pOptions,pServiceHash){var _this92;_classCallCheck2(this,PictTemplateProviderDigits);_this92=_callSuper(this,PictTemplateProviderDigits,[pFable,pOptions,pServiceHash]);/** @type {any} */_this92.options;/** @type {any} */_this92.log;_this92.addPattern('{~Digits:','~}');return _this92;}_inherits(PictTemplateProviderDigits,_libPictTemplate14);return _createClass2(PictTemplateProviderDigits,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDigits]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDigits]::[".concat(tmpHash,"]"));}var tmpColumnData=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);return this.fable.DataFormat.formatterAddCommasToNumber(this.fable.DataFormat.formatterRoundNumber(tmpColumnData,2));}}]);}(libPictTemplate);module.exports=PictTemplateProviderDigits;},{"pict-template":135}],208:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDollars=/*#__PURE__*/function(_libPictTemplate15){/**
5061
5106
  * @param {Object} pFable - The Fable Framework instance
5062
5107
  * @param {Object} pOptions - The options for the service
5063
5108
  * @param {String} pServiceHash - The hash of the service
5064
- */function PictTemplateProviderDollars(pFable,pOptions,pServiceHash){var _this93;_classCallCheck2(this,PictTemplateProviderDollars);_this93=_callSuper(this,PictTemplateProviderDollars,[pFable,pOptions,pServiceHash]);_this93.addPattern('{~Dollars:','~}');return _this93;}_inherits(PictTemplateProviderDollars,_libPictTemplate15);return _createClass2(PictTemplateProviderDollars,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDollars]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDollars]::[".concat(tmpHash,"]"));}var tmpColumnData=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);return this.fable.DataFormat.formatterDollars(tmpColumnData);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDollars;},{"pict-template":135}],209:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJoin=/*#__PURE__*/function(_libPictTemplate16){/**
5109
+ */function PictTemplateProviderDollars(pFable,pOptions,pServiceHash){var _this93;_classCallCheck2(this,PictTemplateProviderDollars);_this93=_callSuper(this,PictTemplateProviderDollars,[pFable,pOptions,pServiceHash]);/** @type {any} */_this93.options;/** @type {any} */_this93.log;_this93.addPattern('{~Dollars:','~}');return _this93;}_inherits(PictTemplateProviderDollars,_libPictTemplate15);return _createClass2(PictTemplateProviderDollars,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fDollars]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fDollars]::[".concat(tmpHash,"]"));}var tmpColumnData=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);return this.fable.DataFormat.formatterDollars(tmpColumnData);}}]);}(libPictTemplate);module.exports=PictTemplateProviderDollars;},{"pict-template":135}],209:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJoin=/*#__PURE__*/function(_libPictTemplate16){/**
5065
5110
  * @param {Object} pFable - The Fable Framework instance
5066
5111
  * @param {Object} pOptions - The options for the service
5067
5112
  * @param {String} pServiceHash - The hash of the service
5068
- */function PictTemplateProviderJoin(pFable,pOptions,pServiceHash){var _this94;_classCallCheck2(this,PictTemplateProviderJoin);_this94=_callSuper(this,PictTemplateProviderJoin,[pFable,pOptions,pServiceHash]);_this94.addPattern('{~Join:','~}');_this94.addPattern('{~J:','~}');return _this94;}_inherits(PictTemplateProviderJoin,_libPictTemplate16);return _createClass2(PictTemplateProviderJoin,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash;var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Join [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Join [fDataRender]::[".concat(tmpHash,"]"));}var tmpDataAddresses=tmpHash.split('^');if(tmpDataAddresses.length<2){return'';}// Get the separator string
5113
+ */function PictTemplateProviderJoin(pFable,pOptions,pServiceHash){var _this94;_classCallCheck2(this,PictTemplateProviderJoin);_this94=_callSuper(this,PictTemplateProviderJoin,[pFable,pOptions,pServiceHash]);/** @type {any} */_this94.options;/** @type {any} */_this94.log;_this94.addPattern('{~Join:','~}');_this94.addPattern('{~J:','~}');return _this94;}_inherits(PictTemplateProviderJoin,_libPictTemplate16);return _createClass2(PictTemplateProviderJoin,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash;var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Join [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Join [fDataRender]::[".concat(tmpHash,"]"));}var tmpDataAddresses=tmpHash.split('^');if(tmpDataAddresses.length<2){return'';}// Get the separator string
5069
5114
  var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];for(var i=0;i<tmpDataAddresses.length;i++){var tmpValueSet=this.resolveStateFromAddress(tmpDataAddresses[i],tmpData,pContextArray);if(tmpValueSet&&Array.isArray(tmpValueSet)){for(var j=0;j<tmpValueSet.length;j++){tmpValueList.push(tmpValueSet[j]);}}else if(tmpValueSet){tmpValueList.push(tmpValueSet);}}return tmpValueList.join(tmpSeparator);}}]);}(libPictTemplate);module.exports=PictTemplateProviderJoin;},{"pict-template":135}],210:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderJoinUnique=/*#__PURE__*/function(_libPictTemplate17){/**
5070
5115
  * @param {Object} pFable - The Fable Framework instance
5071
5116
  * @param {Object} pOptions - The options for the service
5072
5117
  * @param {String} pServiceHash - The hash of the service
5073
- */function PictTemplateProviderJoinUnique(pFable,pOptions,pServiceHash){var _this95;_classCallCheck2(this,PictTemplateProviderJoinUnique);_this95=_callSuper(this,PictTemplateProviderJoinUnique,[pFable,pOptions,pServiceHash]);_this95.addPattern('{~JoinUnique:','~}');_this95.addPattern('{~JU:','~}');return _this95;}_inherits(PictTemplateProviderJoinUnique,_libPictTemplate17);return _createClass2(PictTemplateProviderJoinUnique,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash;var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Join Unique [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Join Unique [fDataRender]::[".concat(tmpHash,"]"));}var tmpDataAddresses=tmpHash.split('^');if(tmpDataAddresses.length<2){return'';}// Get the separator string
5118
+ */function PictTemplateProviderJoinUnique(pFable,pOptions,pServiceHash){var _this95;_classCallCheck2(this,PictTemplateProviderJoinUnique);_this95=_callSuper(this,PictTemplateProviderJoinUnique,[pFable,pOptions,pServiceHash]);/** @type {any} */_this95.options;/** @type {any} */_this95.log;_this95.addPattern('{~JoinUnique:','~}');_this95.addPattern('{~JU:','~}');return _this95;}_inherits(PictTemplateProviderJoinUnique,_libPictTemplate17);return _createClass2(PictTemplateProviderJoinUnique,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash;var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Join Unique [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Join Unique [fDataRender]::[".concat(tmpHash,"]"));}var tmpDataAddresses=tmpHash.split('^');if(tmpDataAddresses.length<2){return'';}// Get the separator string
5074
5119
  var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];var tmpValueMap={};for(var i=0;i<tmpDataAddresses.length;i++){var tmpValueSet=this.resolveStateFromAddress(tmpDataAddresses[i],tmpData,pContextArray);if(tmpValueSet&&Array.isArray(tmpValueSet)){for(var j=0;j<tmpValueSet.length;j++){if(!(tmpValueSet[j]in tmpValueMap)){tmpValueMap[tmpValueSet[j]]=true;tmpValueList.push(tmpValueSet[j]);}}}else if(tmpValueSet){if(!(tmpValueSet in tmpValueMap)){tmpValueMap[tmpValueSet]=true;tmpValueList.push(tmpValueSet);}}}return tmpValueList.join(tmpSeparator);}}]);}(libPictTemplate);module.exports=PictTemplateProviderJoinUnique;},{"pict-template":135}],211:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderPascalCaseIdentifier=/*#__PURE__*/function(_libPictTemplate18){/**
5075
5120
  * @param {Object} pFable - The Fable Framework instance
5076
5121
  * @param {Object} pOptions - The options for the service
5077
5122
  * @param {String} pServiceHash - The hash of the service
5078
- */function PictTemplateProviderPascalCaseIdentifier(pFable,pOptions,pServiceHash){var _this96;_classCallCheck2(this,PictTemplateProviderPascalCaseIdentifier);_this96=_callSuper(this,PictTemplateProviderPascalCaseIdentifier,[pFable,pOptions,pServiceHash]);_this96.addPattern('{~PascalCaseIdentifier:','~}');return _this96;}_inherits(PictTemplateProviderPascalCaseIdentifier,_libPictTemplate18);return _createClass2(PictTemplateProviderPascalCaseIdentifier,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fPascalCaseIdentifier]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fPascalCaseIdentifier]::[".concat(tmpHash,"]"));}var tmpValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);if(tmpValue==null||tmpValue=='undefined'||typeof tmpValue=='undefined'){return'';}return this.pict.DataFormat.cleanNonAlphaCharacters(this.pict.DataFormat.capitalizeEachWord(tmpValue));}}]);}(libPictTemplate);module.exports=PictTemplateProviderPascalCaseIdentifier;/*
5123
+ */function PictTemplateProviderPascalCaseIdentifier(pFable,pOptions,pServiceHash){var _this96;_classCallCheck2(this,PictTemplateProviderPascalCaseIdentifier);_this96=_callSuper(this,PictTemplateProviderPascalCaseIdentifier,[pFable,pOptions,pServiceHash]);/** @type {any} */_this96.options;/** @type {any} */_this96.log;_this96.addPattern('{~PascalCaseIdentifier:','~}');return _this96;}_inherits(PictTemplateProviderPascalCaseIdentifier,_libPictTemplate18);return _createClass2(PictTemplateProviderPascalCaseIdentifier,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fPascalCaseIdentifier]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Template [fPascalCaseIdentifier]::[".concat(tmpHash,"]"));}var tmpValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);if(tmpValue==null||tmpValue=='undefined'||typeof tmpValue=='undefined'){return'';}return this.pict.DataFormat.cleanNonAlphaCharacters(this.pict.DataFormat.capitalizeEachWord(tmpValue));}}]);}(libPictTemplate);module.exports=PictTemplateProviderPascalCaseIdentifier;/*
5079
5124
  # DEAR DEAD CODE DIARY:
5080
5125
 
5081
5126
  ```javascript
@@ -5085,37 +5130,37 @@ var tmpSeparator=tmpDataAddresses.shift();var tmpValueList=[];var tmpValueMap={}
5085
5130
  * @param {Object} pFable - The Fable Framework instance
5086
5131
  * @param {Object} pOptions - The options for the service
5087
5132
  * @param {String} pServiceHash - The hash of the service
5088
- */function PictTemplateProviderPluckJoinUnique(pFable,pOptions,pServiceHash){var _this97;_classCallCheck2(this,PictTemplateProviderPluckJoinUnique);_this97=_callSuper(this,PictTemplateProviderPluckJoinUnique,[pFable,pOptions,pServiceHash]);_this97.addPattern('{~PluckJoinUnique:','~}');_this97.addPattern('{~PJU:','~}');return _this97;}_inherits(PictTemplateProviderPluckJoinUnique,_libPictTemplate19);return _createClass2(PictTemplateProviderPluckJoinUnique,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash;var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Pluck Join Unique [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Pluck Join Unique [fDataRender]::[".concat(tmpHash,"]"));}var tmpDataAddresses=tmpHash.split('^');if(tmpDataAddresses.length<3){return'';}// Get the separator string
5133
+ */function PictTemplateProviderPluckJoinUnique(pFable,pOptions,pServiceHash){var _this97;_classCallCheck2(this,PictTemplateProviderPluckJoinUnique);_this97=_callSuper(this,PictTemplateProviderPluckJoinUnique,[pFable,pOptions,pServiceHash]);/** @type {any} */_this97.options;/** @type {any} */_this97.log;_this97.addPattern('{~PluckJoinUnique:','~}');_this97.addPattern('{~PJU:','~}');return _this97;}_inherits(PictTemplateProviderPluckJoinUnique,_libPictTemplate19);return _createClass2(PictTemplateProviderPluckJoinUnique,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash;var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Pluck Join Unique [fDataRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>3){this.log.trace("PICT Pluck Join Unique [fDataRender]::[".concat(tmpHash,"]"));}var tmpDataAddresses=tmpHash.split('^');if(tmpDataAddresses.length<3){return'';}// Get the separator string
5089
5134
  var tmpSeparator=tmpDataAddresses.shift();var tmpAddress=tmpDataAddresses.shift();var tmpValueList=[];var tmpValueMap={};for(var i=0;i<tmpDataAddresses.length;i++){var tmpValueSet=this.resolveStateFromAddress(tmpDataAddresses[i],tmpData,pContextArray);if(tmpValueSet&&Array.isArray(tmpValueSet)){// This one only works on arrays of objects.
5090
5135
  for(var j=0;j<tmpValueSet.length;j++){if(tmpValueSet[j]===null||_typeof(tmpValueSet)!=='object'){continue;}var tmpValue=this.pict.manifest.getValueByHash(tmpValueSet[j],tmpAddress);if(!(tmpValue in tmpValueMap)){tmpValueMap[tmpValue]=true;tmpValueList.push(tmpValue);}}}else if(tmpValueSet){if(!(tmpValueSet in tmpValueMap)){tmpValueMap[tmpValueSet]=true;tmpValueList.push(tmpValueSet);}}}return tmpValueList.join(tmpSeparator);}}]);}(libPictTemplate);module.exports=PictTemplateProviderPluckJoinUnique;},{"pict-template":135}],213:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderBreakpoint=/*#__PURE__*/function(_libPictTemplate20){/**
5091
5136
  * @param {Object} pFable - The Fable Framework instance
5092
5137
  * @param {Object} pOptions - The options for the service
5093
5138
  * @param {String} pServiceHash - The hash of the service
5094
- */function PictTemplateProviderBreakpoint(pFable,pOptions,pServiceHash){var _this98;_classCallCheck2(this,PictTemplateProviderBreakpoint);_this98=_callSuper(this,PictTemplateProviderBreakpoint,[pFable,pOptions,pServiceHash]);_this98.addPattern('{~Breakpoint','~}');return _this98;}_inherits(PictTemplateProviderBreakpoint,_libPictTemplate20);return _createClass2(PictTemplateProviderBreakpoint,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpError=new Error("PICT Template Breakpoint: ".concat(tmpHash));this.log.trace("PICT Template Breakpoint: ".concat(tmpHash),tmpError.stack);//throw tmpError;
5139
+ */function PictTemplateProviderBreakpoint(pFable,pOptions,pServiceHash){var _this98;_classCallCheck2(this,PictTemplateProviderBreakpoint);_this98=_callSuper(this,PictTemplateProviderBreakpoint,[pFable,pOptions,pServiceHash]);/** @type {any} */_this98.log;_this98.addPattern('{~Breakpoint','~}');return _this98;}_inherits(PictTemplateProviderBreakpoint,_libPictTemplate20);return _createClass2(PictTemplateProviderBreakpoint,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpError=new Error("PICT Template Breakpoint: ".concat(tmpHash));this.log.trace("PICT Template Breakpoint: ".concat(tmpHash),tmpError.stack);//throw tmpError;
5095
5140
  debugger;// eslint-disable-line no-debugger
5096
5141
  return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderBreakpoint;},{"pict-template":135}],214:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderDataValueTree=/*#__PURE__*/function(_libPictTemplate21){/**
5097
5142
  * @param {Object} pFable - The Fable Framework instance
5098
5143
  * @param {Object} pOptions - The options for the service
5099
5144
  * @param {String} pServiceHash - The hash of the service
5100
- */function PictTemplateProviderDataValueTree(pFable,pOptions,pServiceHash){var _this99;_classCallCheck2(this,PictTemplateProviderDataValueTree);_this99=_callSuper(this,PictTemplateProviderDataValueTree,[pFable,pOptions,pServiceHash]);_this99.addPattern('{~DataTree:','~}');_this99.addPattern('{~DT:','~}');return _this99;}_inherits(PictTemplateProviderDataValueTree,_libPictTemplate21);return _createClass2(PictTemplateProviderDataValueTree,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpData=_typeof(pRecord)==='object'?pRecord:{};tmpData.TemplateHash=pTemplateHash.trim();tmpData.ValueTreeParameters=tmpData.TemplateHash.split('^');if(tmpData.ValueTreeParameters.length<1){return'';}tmpData.ResolvedValue=this.resolveStateFromAddress(tmpData.ValueTreeParameters[0],tmpData,pContextArray);tmpData.ResolvedValueType=_typeof(tmpData.ResolvedValue);try{tmpData.TreeMaxDepth=tmpData.ValueTreeParameters.length<2?1:parseInt(tmpData.ValueTreeParameters[1]);}catch(_unused8){tmpData.TreeMaxDepth=1;}var tmpPictObjectWrapTemplate=this.pict.TemplateProvider.getTemplate('PICT-Object-Wrap');if(!tmpPictObjectWrapTemplate){// This template is here because it is a default template. Users can override this template by providing their own as PICT-Object-Wrap
5145
+ */function PictTemplateProviderDataValueTree(pFable,pOptions,pServiceHash){var _this99;_classCallCheck2(this,PictTemplateProviderDataValueTree);_this99=_callSuper(this,PictTemplateProviderDataValueTree,[pFable,pOptions,pServiceHash]);/** @type {any} */_this99.log;_this99.addPattern('{~DataTree:','~}');_this99.addPattern('{~DT:','~}');return _this99;}_inherits(PictTemplateProviderDataValueTree,_libPictTemplate21);return _createClass2(PictTemplateProviderDataValueTree,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpData=_typeof(pRecord)==='object'?pRecord:{};tmpData.TemplateHash=pTemplateHash.trim();tmpData.ValueTreeParameters=tmpData.TemplateHash.split('^');if(tmpData.ValueTreeParameters.length<1){return'';}tmpData.ResolvedValue=this.resolveStateFromAddress(tmpData.ValueTreeParameters[0],tmpData,pContextArray);tmpData.ResolvedValueType=_typeof(tmpData.ResolvedValue);try{tmpData.TreeMaxDepth=tmpData.ValueTreeParameters.length<2?1:parseInt(tmpData.ValueTreeParameters[1]);}catch(_unused8){tmpData.TreeMaxDepth=1;}var tmpPictObjectWrapTemplate=this.pict.TemplateProvider.getTemplate('PICT-Object-Wrap');if(!tmpPictObjectWrapTemplate){// This template is here because it is a default template. Users can override this template by providing their own as PICT-Object-Wrap
5101
5146
  tmpPictObjectWrapTemplate="<div class=\"PICT PICTObjectSet\">{~D:Record.ObjectValueTree~}</div>";}if(tmpData.ResolvedValueType=='object'){tmpData.ObjectValueTree=this.dataValueTreeObjectSet(tmpData.ResolvedValue,tmpData.ResolvedValue,0,tmpData.TreeMaxDepth,pContextArray);}else{this.log.trace("PICT Template Log Value Tree: [".concat(tmpData.TemplateHash,"] resolved data is not an object."),tmpData.ResolvedValue);tmpData.ObjectValueTree=tmpData.ResolveValue;}return this.pict.parseTemplate(tmpPictObjectWrapTemplate,tmpData,null,pContextArray);}},{key:"dataValueTreeObjectSet",value:function dataValueTreeObjectSet(pObject,pRootObject,pCurrentDepth,pMaxDepth,pContextArray){var tmpTemplateResult='';if(_typeof(pObject)!=='object'){return tmpTemplateResult;}var tmpObjectValueKeys=Object.keys(pObject);var tmpPictObjectBranchTemplate=this.pict.TemplateProvider.getTemplate('PICT-Object-Branch');if(!tmpPictObjectBranchTemplate){// This template is here because it is a default template. Users can override this template by providing their own as PICT-Object-Branch
5102
- tmpPictObjectBranchTemplate="\n<div class=\"PICTObjectBranchDepth_{~D:Record.CurrentDepth~}\"><div class=\"PICTObjectBranch\">{~D:Record.BranchKey~}</div><div class=\"PICTObjectBranchValue\">{~D:Record.BranchValue~}</div></div>\n";}for(var i=0;i<tmpObjectValueKeys.length;i++){var tmpBranchType=_typeof(pObject[tmpObjectValueKeys[i]]);var tmpBranchValue='';switch(tmpBranchType){case'object':if(pCurrentDepth+1>pMaxDepth){tmpBranchValue='...';}else{tmpBranchValue=this.dataValueTreeObjectSet(pObject[tmpObjectValueKeys[i]],pRootObject,pCurrentDepth+1,pMaxDepth,pContextArray);}break;default:tmpBranchValue=pObject[tmpObjectValueKeys[i]];break;}var tmpDataValue={AppData:this.AppData,Bundle:this.Bundle,RootContainer:pRootObject,Container:pObject,BranchEntryCount:tmpObjectValueKeys.length,BranchIndex:i,BranchKey:tmpObjectValueKeys[i],BranchValue:tmpBranchValue,BranchDataType:tmpBranchType,CurrentDepth:pCurrentDepth,MaxDepth:pMaxDepth};tmpTemplateResult+=this.pict.parseTemplate(tmpPictObjectBranchTemplate,tmpDataValue,null,pContextArray);}return tmpTemplateResult;}}]);}(libPictTemplate);module.exports=PictTemplateProviderDataValueTree;},{"pict-template":135}],215:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogStatement=/*#__PURE__*/function(_libPictTemplate22){/**
5147
+ tmpPictObjectBranchTemplate="\n<div class=\"PICTObjectBranchDepth_{~D:Record.CurrentDepth~}\"><div class=\"PICTObjectBranch\">{~D:Record.BranchKey~}</div><div class=\"PICTObjectBranchValue\">{~D:Record.BranchValue~}</div></div>\n";}for(var i=0;i<tmpObjectValueKeys.length;i++){var tmpBranchType=_typeof(pObject[tmpObjectValueKeys[i]]);var tmpBranchValue='';switch(tmpBranchType){case'object':if(pCurrentDepth+1>pMaxDepth){tmpBranchValue='...';}else{tmpBranchValue=this.dataValueTreeObjectSet(pObject[tmpObjectValueKeys[i]],pRootObject,pCurrentDepth+1,pMaxDepth,pContextArray);}break;default:tmpBranchValue=pObject[tmpObjectValueKeys[i]];break;}var tmpDataValue={AppData:this.pict.AppData,Bundle:this.pict.Bundle,RootContainer:pRootObject,Container:pObject,BranchEntryCount:tmpObjectValueKeys.length,BranchIndex:i,BranchKey:tmpObjectValueKeys[i],BranchValue:tmpBranchValue,BranchDataType:tmpBranchType,CurrentDepth:pCurrentDepth,MaxDepth:pMaxDepth};tmpTemplateResult+=this.pict.parseTemplate(tmpPictObjectBranchTemplate,tmpDataValue,null,pContextArray);}return tmpTemplateResult;}}]);}(libPictTemplate);module.exports=PictTemplateProviderDataValueTree;},{"pict-template":135}],215:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogStatement=/*#__PURE__*/function(_libPictTemplate22){/**
5103
5148
  * @param {Object} pFable - The Fable Framework instance
5104
5149
  * @param {Object} pOptions - The options for the service
5105
5150
  * @param {String} pServiceHash - The hash of the service
5106
- */function PictTemplateProviderLogStatement(pFable,pOptions,pServiceHash){var _this100;_classCallCheck2(this,PictTemplateProviderLogStatement);_this100=_callSuper(this,PictTemplateProviderLogStatement,[pFable,pOptions,pServiceHash]);_this100.addPattern('{~LogStatement:','~}');_this100.addPattern('{~LS:','~}');return _this100;}_inherits(PictTemplateProviderLogStatement,_libPictTemplate22);return _createClass2(PictTemplateProviderLogStatement,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();this.log.trace("PICT Template Log Message: ".concat(tmpHash));return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderLogStatement;},{"pict-template":135}],216:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogValue=/*#__PURE__*/function(_libPictTemplate23){/**
5151
+ */function PictTemplateProviderLogStatement(pFable,pOptions,pServiceHash){var _this100;_classCallCheck2(this,PictTemplateProviderLogStatement);_this100=_callSuper(this,PictTemplateProviderLogStatement,[pFable,pOptions,pServiceHash]);/** @type {any} */_this100.log;_this100.addPattern('{~LogStatement:','~}');_this100.addPattern('{~LS:','~}');return _this100;}_inherits(PictTemplateProviderLogStatement,_libPictTemplate22);return _createClass2(PictTemplateProviderLogStatement,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();this.log.trace("PICT Template Log Message: ".concat(tmpHash));return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderLogStatement;},{"pict-template":135}],216:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogValue=/*#__PURE__*/function(_libPictTemplate23){/**
5107
5152
  * @param {Object} pFable - The Fable Framework instance
5108
5153
  * @param {Object} pOptions - The options for the service
5109
5154
  * @param {String} pServiceHash - The hash of the service
5110
- */function PictTemplateProviderLogValue(pFable,pOptions,pServiceHash){var _this101;_classCallCheck2(this,PictTemplateProviderLogValue);_this101=_callSuper(this,PictTemplateProviderLogValue,[pFable,pOptions,pServiceHash]);_this101.addPattern('{~LogValue:','~}');_this101.addPattern('{~LV:','~}');return _this101;}_inherits(PictTemplateProviderLogValue,_libPictTemplate23);return _createClass2(PictTemplateProviderLogValue,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);var tmpValueType=_typeof(tmpValue);if(tmpValue==null||tmpValueType=='undefined'){this.log.trace("PICT Template Log Value: [".concat(tmpHash,"] is ").concat(tmpValueType,"."));}else if(tmpValueType=='object'){this.log.trace("PICT Template Log Value: [".concat(tmpHash,"] is an object."),tmpValue);}else{this.log.trace("PICT Template Log Value: [".concat(tmpHash,"] is a ").concat(tmpValueType," = [").concat(tmpValue,"]"));}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderLogValue;},{"pict-template":135}],217:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogValueTree=/*#__PURE__*/function(_libPictTemplate24){/**
5155
+ */function PictTemplateProviderLogValue(pFable,pOptions,pServiceHash){var _this101;_classCallCheck2(this,PictTemplateProviderLogValue);_this101=_callSuper(this,PictTemplateProviderLogValue,[pFable,pOptions,pServiceHash]);/** @type {any} */_this101.log;_this101.addPattern('{~LogValue:','~}');_this101.addPattern('{~LV:','~}');return _this101;}_inherits(PictTemplateProviderLogValue,_libPictTemplate23);return _createClass2(PictTemplateProviderLogValue,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpValue=this.resolveStateFromAddress(tmpHash,tmpData,pContextArray);var tmpValueType=_typeof(tmpValue);if(tmpValue==null||tmpValueType=='undefined'){this.log.trace("PICT Template Log Value: [".concat(tmpHash,"] is ").concat(tmpValueType,"."));}else if(tmpValueType=='object'){this.log.trace("PICT Template Log Value: [".concat(tmpHash,"] is an object."),tmpValue);}else{this.log.trace("PICT Template Log Value: [".concat(tmpHash,"] is a ").concat(tmpValueType," = [").concat(tmpValue,"]"));}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderLogValue;},{"pict-template":135}],217:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderLogValueTree=/*#__PURE__*/function(_libPictTemplate24){/**
5111
5156
  * @param {Object} pFable - The Fable Framework instance
5112
5157
  * @param {Object} pOptions - The options for the service
5113
5158
  * @param {String} pServiceHash - The hash of the service
5114
- */function PictTemplateProviderLogValueTree(pFable,pOptions,pServiceHash){var _this102;_classCallCheck2(this,PictTemplateProviderLogValueTree);_this102=_callSuper(this,PictTemplateProviderLogValueTree,[pFable,pOptions,pServiceHash]);_defineProperty2(_this102,"logValueTreeObjectSet",function(pObject,pBaseAddress,pRootObject,pCurrentDepth,pMaxDepth){var tmpTemplateResult='';if(_typeof(pObject)!=='object'){return tmpTemplateResult;}var tmpObjectValueKeys=Object.keys(pObject);for(var i=0;i<tmpObjectValueKeys.length;i++){var tmpBranchType=_typeof(pObject[tmpObjectValueKeys[i]]);var tmpBranchValue='';switch(tmpBranchType){case'object':tmpBranchValue='...';break;default:tmpBranchValue=pObject[tmpObjectValueKeys[i]];break;}_this102.log.trace("[".concat(pBaseAddress,".").concat(tmpObjectValueKeys[i],"] (").concat(tmpBranchType,"): ").concat(tmpBranchValue));if(pCurrentDepth+1>pMaxDepth){return'';}else if(tmpBranchType=='object'){tmpBranchValue=_this102.logValueTreeObjectSet(pObject[tmpObjectValueKeys[i]],"".concat(pBaseAddress,".").concat(tmpObjectValueKeys[i]),pRootObject,pCurrentDepth+1,pMaxDepth);}}return'';});_this102.addPattern('{~LogValueTree:','~}');_this102.addPattern('{~LVT:','~}');return _this102;}_inherits(PictTemplateProviderLogValueTree,_libPictTemplate24);return _createClass2(PictTemplateProviderLogValueTree,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpData=_typeof(pRecord)==='object'?pRecord:{};tmpData.TemplateHash=pTemplateHash.trim();tmpData.ValueTreeParameters=tmpData.TemplateHash.split('^');if(tmpData.ValueTreeParameters.length<1){return'';}tmpData.ResolvedValue=this.resolveStateFromAddress(tmpData.ValueTreeParameters[0],tmpData,pContextArray);tmpData.ResolvedValueType=_typeof(tmpData.ResolvedValue);try{tmpData.TreeMaxDepth=tmpData.ValueTreeParameters.length<2?1:parseInt(tmpData.ValueTreeParameters[1]);}catch(_unused9){tmpData.TreeMaxDepth=1;}if(tmpData.ResolvedValueType=='object'){this.logValueTreeObjectSet(tmpData.ResolvedValue,tmpData.ValueTreeParameters[0],tmpData.ResolvedValue,0,tmpData.TreeMaxDepth);}else{this.log.trace("PICT Template Log Value Tree: [".concat(tmpData.TemplateHash,"] resolved data is not an object."),tmpData.ResolvedValue);}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderLogValueTree;},{"pict-template":135}],218:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderNotEmpty=/*#__PURE__*/function(_libPictTemplate25){/**
5159
+ */function PictTemplateProviderLogValueTree(pFable,pOptions,pServiceHash){var _this102;_classCallCheck2(this,PictTemplateProviderLogValueTree);_this102=_callSuper(this,PictTemplateProviderLogValueTree,[pFable,pOptions,pServiceHash]);/** @type {any} */_defineProperty2(_this102,"logValueTreeObjectSet",function(pObject,pBaseAddress,pRootObject,pCurrentDepth,pMaxDepth){var tmpTemplateResult='';if(_typeof(pObject)!=='object'){return tmpTemplateResult;}var tmpObjectValueKeys=Object.keys(pObject);for(var i=0;i<tmpObjectValueKeys.length;i++){var tmpBranchType=_typeof(pObject[tmpObjectValueKeys[i]]);var tmpBranchValue='';switch(tmpBranchType){case'object':tmpBranchValue='...';break;default:tmpBranchValue=pObject[tmpObjectValueKeys[i]];break;}_this102.log.trace("[".concat(pBaseAddress,".").concat(tmpObjectValueKeys[i],"] (").concat(tmpBranchType,"): ").concat(tmpBranchValue));if(pCurrentDepth+1>pMaxDepth){return'';}else if(tmpBranchType=='object'){tmpBranchValue=_this102.logValueTreeObjectSet(pObject[tmpObjectValueKeys[i]],"".concat(pBaseAddress,".").concat(tmpObjectValueKeys[i]),pRootObject,pCurrentDepth+1,pMaxDepth);}}return'';});_this102.log;_this102.addPattern('{~LogValueTree:','~}');_this102.addPattern('{~LVT:','~}');return _this102;}_inherits(PictTemplateProviderLogValueTree,_libPictTemplate24);return _createClass2(PictTemplateProviderLogValueTree,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpData=_typeof(pRecord)==='object'?pRecord:{};tmpData.TemplateHash=pTemplateHash.trim();tmpData.ValueTreeParameters=tmpData.TemplateHash.split('^');if(tmpData.ValueTreeParameters.length<1){return'';}tmpData.ResolvedValue=this.resolveStateFromAddress(tmpData.ValueTreeParameters[0],tmpData,pContextArray);tmpData.ResolvedValueType=_typeof(tmpData.ResolvedValue);try{tmpData.TreeMaxDepth=tmpData.ValueTreeParameters.length<2?1:parseInt(tmpData.ValueTreeParameters[1]);}catch(_unused9){tmpData.TreeMaxDepth=1;}if(tmpData.ResolvedValueType=='object'){this.logValueTreeObjectSet(tmpData.ResolvedValue,tmpData.ValueTreeParameters[0],tmpData.ResolvedValue,0,tmpData.TreeMaxDepth);}else{this.log.trace("PICT Template Log Value Tree: [".concat(tmpData.TemplateHash,"] resolved data is not an object."),tmpData.ResolvedValue);}return'';}}]);}(libPictTemplate);module.exports=PictTemplateProviderLogValueTree;},{"pict-template":135}],218:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderNotEmpty=/*#__PURE__*/function(_libPictTemplate25){/**
5115
5160
  * @param {Object} pFable - The Fable Framework instance
5116
5161
  * @param {Object} pOptions - The options for the service
5117
5162
  * @param {String} pServiceHash - The hash of the service
5118
- */function PictTemplateProviderNotEmpty(pFable,pOptions,pServiceHash){var _this103;_classCallCheck2(this,PictTemplateProviderNotEmpty);_this103=_callSuper(this,PictTemplateProviderNotEmpty,[pFable,pOptions,pServiceHash]);_this103.addPattern('{~NotEmpty:','~}');_this103.addPattern('{~NE:','~}');return _this103;}_inherits(PictTemplateProviderNotEmpty,_libPictTemplate25);return _createClass2(PictTemplateProviderNotEmpty,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fNotEmptyRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>2){this.log.trace("PICT Template [fNotEmptyRender]::[".concat(tmpHash,"]"));}var tmpHashParts=tmpHash.split('^');// For now just check truthiness. Not sure if this is grand.
5163
+ */function PictTemplateProviderNotEmpty(pFable,pOptions,pServiceHash){var _this103;_classCallCheck2(this,PictTemplateProviderNotEmpty);_this103=_callSuper(this,PictTemplateProviderNotEmpty,[pFable,pOptions,pServiceHash]);/** @type {any} */_this103.log;_this103.addPattern('{~NotEmpty:','~}');_this103.addPattern('{~NE:','~}');return _this103;}_inherits(PictTemplateProviderNotEmpty,_libPictTemplate25);return _createClass2(PictTemplateProviderNotEmpty,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fNotEmptyRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>2){this.log.trace("PICT Template [fNotEmptyRender]::[".concat(tmpHash,"]"));}var tmpHashParts=tmpHash.split('^');// For now just check truthiness. Not sure if this is grand.
5119
5164
  if(this.resolveStateFromAddress(tmpHashParts[0],tmpData,pContextArray)){return tmpHashParts[1];}else{return'';}}}]);}(libPictTemplate);module.exports=PictTemplateProviderNotEmpty;},{"pict-template":135}],219:[function(require,module,exports){var libPictTemplate=require('pict-template');var PictTemplateProviderTemplateIfBase=/*#__PURE__*/function(_libPictTemplate26){/**
5120
5165
  * @param {Object} pFable - The Fable Framework instance
5121
5166
  * @param {Object} pOptions - The options for the service
@@ -5124,12 +5169,12 @@ if(this.resolveStateFromAddress(tmpHashParts[0],tmpData,pContextArray)){return t
5124
5169
  * @param {Object} pFable - The Fable Framework instance
5125
5170
  * @param {Object} pOptions - The options for the service
5126
5171
  * @param {String} pServiceHash - The hash of the service
5127
- */function PictTemplateProviderTemplateIf(pFable,pOptions,pServiceHash){var _this104;_classCallCheck2(this,PictTemplateProviderTemplateIf);_this104=_callSuper(this,PictTemplateProviderTemplateIf,[pFable,pOptions,pServiceHash]);_this104.addPattern('{~TemplateIf:','~}');_this104.addPattern('{~TIf:','~}');return _this104;}_inherits(PictTemplateProviderTemplateIf,_libPictTemplateIf);return _createClass2(PictTemplateProviderTemplateIf,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash=false;var tmpAddressOfData=false;var tmpComparisonOperation=false;var tmpHashParts=tmpHash.split(':');if(tmpHashParts.length<3){this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]"));return"Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]");}tmpTemplateHash=tmpHashParts[0];tmpAddressOfData=tmpHashParts[1];tmpComparisonOperation=tmpHashParts[2];// No template hash
5172
+ */function PictTemplateProviderTemplateIf(pFable,pOptions,pServiceHash){var _this104;_classCallCheck2(this,PictTemplateProviderTemplateIf);_this104=_callSuper(this,PictTemplateProviderTemplateIf,[pFable,pOptions,pServiceHash]);/** @type {any} */_this104.log;_this104.addPattern('{~TemplateIf:','~}');_this104.addPattern('{~TIf:','~}');return _this104;}_inherits(PictTemplateProviderTemplateIf,_libPictTemplateIf);return _createClass2(PictTemplateProviderTemplateIf,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpComparisonOperation;var tmpHashParts=tmpHash.split(':');if(tmpHashParts.length<3){this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]"));return"Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]");}tmpTemplateHash=tmpHashParts[0];tmpAddressOfData=tmpHashParts[1];tmpComparisonOperation=tmpHashParts[2];// No template hash
5128
5173
  if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]");}// No comparison operation
5129
5174
  if(!tmpComparisonOperation){this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]");}// Now try to break the comparison into three parts...
5130
5175
  var tmpComparisonParts=tmpComparisonOperation.split('^');if(tmpComparisonParts.length<3){this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]"));return"Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]");}// Now look up the data at the comparison location
5131
5176
  try{var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray),tmpComparisonParts[1],this.resolveStateFromAddress(tmpComparisonParts[2],tmpData,pContextArray));if(!tmpComparisonResult){return'';}else{if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
5132
- return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),null,pContextArray);}}}catch(pError){this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError),pError);return"Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash=false;var tmpAddressOfData=false;var tmpComparisonOperation=false;var tmpHashParts=tmpHash.split(':');if(tmpHashParts.length<3){this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]")));}tmpTemplateHash=tmpHashParts[0];tmpAddressOfData=tmpHashParts[1];tmpComparisonOperation=tmpHashParts[2];// No template hash
5177
+ return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),null,pContextArray);}}}catch(pError){this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError),pError);return"Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpComparisonOperation;var tmpHashParts=tmpHash.split(':');if(tmpHashParts.length<3){this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]")));}tmpTemplateHash=tmpHashParts[0];tmpAddressOfData=tmpHashParts[1];tmpComparisonOperation=tmpHashParts[2];// No template hash
5133
5178
  if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]")));}// No comparison operation
5134
5179
  if(!tmpComparisonOperation){this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]")));}// Now try to break the comparison into three parts...
5135
5180
  var tmpComparisonParts=tmpComparisonOperation.split('^');if(tmpComparisonParts.length<3){this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]")));}// Now look up the data at the comparison location
@@ -5138,12 +5183,12 @@ var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpCompa
5138
5183
  * @param {Object} pFable - The Fable Framework instance
5139
5184
  * @param {Object} pOptions - The options for the service
5140
5185
  * @param {String} pServiceHash - The hash of the service
5141
- */function PictTemplateProviderTemplateIfAbsolute(pFable,pOptions,pServiceHash){var _this105;_classCallCheck2(this,PictTemplateProviderTemplateIfAbsolute);_this105=_callSuper(this,PictTemplateProviderTemplateIfAbsolute,[pFable,pOptions,pServiceHash]);_this105.addPattern('{~TemplateIfAbsolute:','~}');_this105.addPattern('{~TIfAbs:','~}');return _this105;}_inherits(PictTemplateProviderTemplateIfAbsolute,_libPictTemplateIf2);return _createClass2(PictTemplateProviderTemplateIfAbsolute,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash=false;var tmpAddressOfData=false;var tmpComparisonOperation=false;var tmpHashParts=tmpHash.split(':');if(tmpHashParts.length<3){this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]"));return"Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]");}tmpTemplateHash=tmpHashParts[0];tmpAddressOfData=tmpHashParts[1];tmpComparisonOperation=tmpHashParts[2];// No template hash
5186
+ */function PictTemplateProviderTemplateIfAbsolute(pFable,pOptions,pServiceHash){var _this105;_classCallCheck2(this,PictTemplateProviderTemplateIfAbsolute);_this105=_callSuper(this,PictTemplateProviderTemplateIfAbsolute,[pFable,pOptions,pServiceHash]);/** @type {any} */_this105.log;_this105.addPattern('{~TemplateIfAbsolute:','~}');_this105.addPattern('{~TIfAbs:','~}');return _this105;}_inherits(PictTemplateProviderTemplateIfAbsolute,_libPictTemplateIf2);return _createClass2(PictTemplateProviderTemplateIfAbsolute,[{key:"render",value:function render(pTemplateHash,pRecord,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpComparisonOperation;var tmpHashParts=tmpHash.split(':');if(tmpHashParts.length<3){this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]"));return"Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]");}tmpTemplateHash=tmpHashParts[0];tmpAddressOfData=tmpHashParts[1];tmpComparisonOperation=tmpHashParts[2];// No template hash
5142
5187
  if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]");}// No comparison operation
5143
5188
  if(!tmpComparisonOperation){this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]"));return"Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]");}// Now try to break the comparison into three parts...
5144
5189
  var tmpComparisonParts=tmpComparisonOperation.split('^');if(tmpComparisonParts.length<3){this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]"));return"Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]");}// Now look up the data at the comparison location
5145
5190
  try{var tmpComparisonResult=this.compareValues(this.resolveStateFromAddress(tmpComparisonParts[0],tmpData,pContextArray),tmpComparisonParts[1],tmpComparisonParts[2]);if(!tmpComparisonResult){return'';}else{if(!tmpAddressOfData){// No address was provided, just render the template with what this template has.
5146
- return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),null,pContextArray);}}}catch(pError){this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError),pError);return"Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash=false;var tmpAddressOfData=false;var tmpComparisonOperation=false;var tmpHashParts=tmpHash.split(':');if(tmpHashParts.length<3){this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]")));}tmpTemplateHash=tmpHashParts[0];tmpAddressOfData=tmpHashParts[1];tmpComparisonOperation=tmpHashParts[2];// No template hash
5191
+ return this.pict.parseTemplateByHash(tmpTemplateHash,pRecord,null,pContextArray);}else{return this.pict.parseTemplateByHash(tmpTemplateHash,this.resolveStateFromAddress(tmpAddressOfData,tmpData,pContextArray),null,pContextArray);}}}catch(pError){this.log.error("Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError),pError);return"Pict: Template Render: Error looking up comparison data for [".concat(tmpHash,"]: ").concat(pError);}}},{key:"renderAsync",value:function renderAsync(pTemplateHash,pRecord,fCallback,pContextArray){var tmpHash=pTemplateHash.trim();var tmpData=_typeof(pRecord)==='object'?pRecord:{};var tmpCallback=typeof fCallback==='function'?fCallback:function(){return'';};if(this.pict.LogNoisiness>4){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"] with tmpData:"),tmpData);}else if(this.pict.LogNoisiness>0){this.log.trace("PICT Template [fTemplateIfAbsoluteValueRender]::[".concat(tmpHash,"]"));}var tmpTemplateHash;var tmpAddressOfData;var tmpComparisonOperation;var tmpHashParts=tmpHash.split(':');if(tmpHashParts.length<3){this.log.warn("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template If Absolute Value Render: TemplateHash not complete for [".concat(tmpHash,"]")));}tmpTemplateHash=tmpHashParts[0];tmpAddressOfData=tmpHashParts[1];tmpComparisonOperation=tmpHashParts[2];// No template hash
5147
5192
  if(!tmpTemplateHash){this.log.warn("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template Render: TemplateHash not resolved for [".concat(tmpHash,"]")));}// No comparison operation
5148
5193
  if(!tmpComparisonOperation){this.log.warn("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template Render: Comparison Operation not resolved for [".concat(tmpHash,"]")));}// Now try to break the comparison into three parts...
5149
5194
  var tmpComparisonParts=tmpComparisonOperation.split('^');if(tmpComparisonParts.length<3){this.log.warn("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]"));return tmpCallback(new Error("Pict: Template Render: Comparison Operation not complete (three parts expected) for [".concat(tmpHash,"]")));}// Now look up the data at the comparison location